HDMI disabled in Android - how to enable?

The information in the hardware notes is confusing. It says the following:

The HDMI port on HiKey supports TVs and Monitors with an HDMI interface at display resolutions of 1920x1080 (or 1920x1200) pixels down to 640x480 pixels.`

But then it also says:

[Information on Android To Be Written] At the moment resolution is locked at 1280x720p.

It would be really helpful to definitively know whether the HiKey960 can support 800x480 over HDMI, and if so how to configure it.

That’s not even the same hardware.

On that subject I notice that whilst the link David posts is for the wrong board there is currently a similar page to the Hikey960 and it looks “dead” to me. It is not linked from anywhere in the docs. I think it is just an unmaintained copy 'n paste artefact that should be removed… we’ll see if anyone else agrees:

Is there any way to force DMT timings instead of CEA?

Couldn’t find any option in the modedb docs, but maybe it’s an option in the video chipset?

I’ve been struggling with this for three solid days and getting nowhere. Would really appreciate any help/assistance that anybody can offer.

I have an Elecrow 5" 800x480 HDMI panel which uses a RealTek RTD2660H chipset (datasheet).

The display works perfectly with my Windows desktop PC, Linux laptop and Raspberry Pi2. But it refuses to work with my HiKey960.

I followed the instructions on the source.android.com/setup/devices page to build the latest Android and kernel and flashed them to the device. I have also set the following options in BoardConfig.mk:

BOARD_KERNEL_CMDLINE += video=HDMI-A-1:800x480@60

On startup I see the Android bootloader icon flash up briefly, but it looks very corrupt with black lines running through it. After that it’s a black screen and nothing is displayed.

If I change the BOARD_KERNEL_CMDLINE options to 400x800@60 then the Android screen appears but again it’s very corrupt. I don’t have an image to hand, but it’s like the whole display is twisting and lines are running into each other.

I noticed adv7511_drv.c has the following entry so I would expect the display to work:

    (mode->hdisplay == 800  && mode->vdisplay == 480  && mode->clock == 32000)) {

Perhaps the clock value is wrong, although I couldn’t find the right one in the datasheet?

There are no useful entries in dmesg or logcat. I’ve previously posted the very few messages that are displayed. I couldn’t find any way of enabling any additional logging.

Really appreciate any help with this. Cannot believe I’ve been struggling with this for 3 days on the HiKey960 when the panel works perfectly on three other platforms.

Thanks.

Here is a photograph of what the display looks like with kernel option video=HDMI-A-1:400x800@60

This is the only mode I can find where something is displayed on the screen from the HiKey.

Any ideas whether this is a timing issue?

EDITED
Assuming your HiKey 960 is in developer mode, you could try to change its resolution and dpi with adb (in the Android SDK).
Connect HiKey 960 to PC with a USB cable. Windows PC : https://developer.android.com/studio/run/win-usb.html or https://developer.android.com/studio/run/oem-usb.html
Start Console window and type :
adb shell wm size 800x480
AND (186.59 ppi calculated here : https://www.sven.de/dpi/)
adb shell wm density 187
THEN (reboot the device)
adb reboot

Or if available : “Smallest width” in “Developer settings”.

Slowly making progress now but still several issues.

I’m forcing the HDMI output to be enabled with:

BOARD_KERNEL_CMDLINE += video=HDMI-A-1:e

When I connect the HiKey960 to my 800x480 display it doesn’t detect; the panel says “No Signal”. However if I first connect the HiKey960 to a large Samsung HDMI TV (1920x1080) then the Android interface is displayed. I can then disconnect from the Samsung and connect my 800x480 panel which then comes to life. Then I can set the right resolution with wm size commands.

So there seems to be a problem where the HiKey cannot activate the 800x480 panel at startup, but can activated the Samsung TV? Not sure why that is but it’s a pain having to keep swapping displays every time I reboot. Appreciate any thoughts on this?

The second problem is the HDMI output is landscape, but I need it to be in portrait like a cellphone. I’ve added the following to build.prop but the display remains in landscape. Does anyone know how to force portrait mode on HDMI outputs?

# Screen rotation options
persist.demo.hdmirotation=portrait
ro.sf.hwrotation=270
config.override_forced_orient=true

Thanks for any help you can offer.

Is your panel powered by USB?

If it is, then that is the reason why it isn’t working on boot. HDMI hot plug does not work on these boards at the moment, and the USB power has to be turned on by the kernel. By the time the display is powered on by USB, it is too late for the kernel to detect it during its normal startup routine.

If you can, try powering the display using an external power supply, before powering on the hikey960.

The panel is powered by USB, but I’m supplying it externally - not from the HiKey960 USB port.

Are you connecting the 800x480 panel before switching on the 960 ?
If so, it sounds like the exact opposite is happening of what’s written here under “Know Limitations” (the HDMI hotplug not working which @doitright mentioned):

Yes, the 800x480 panel is connected and powered externally before I switch on the HiKey960.

Type “adb shell wm size”. Watch the format of the resolution that is displayed. It’s usually “narrow X wide” (e.g. 480 x 800). If the output displays as “800x480” try specifying the resolution as “adb shell wm size 480x800” instead of “800x480”.

You can also try setting just the dpi in build.prop with “ro.sf.lcd_density=187”. Instead of the adb commands.
This will probably only make stuff smaller or bigger though.

AFAIK this should be enough. But I’m not an expert.

So the recommended method doesn’t work, but the unsupported method (hot swapping / hot plugging) does work. That is so weird.

Is there only a HDMI input on the panel ?
If not, make sure that the HDMI input on the display is active/selected before switching on the 960.

Have you checked if there are screen resolution kernel boot parameters for Android ?
Similar to “video=” and “vga=” that are in Linux, or fbpanel in U-boot.
Alas, I’m not familiar with those on Android.

He is NOT triggering hotplugging. He is booting it with a different monitor, and it sets up to THAT monitor. Then when he unplugs that monitor and switches to the small one, nothing in the hikey960 changes – the kernel retains the configurations for the monitor it booted with.

The theory that I’m going to go with is that there is some strange issue in the code running on the RTD2660H. I have two theories about what is going on with it;

  1. It is not supplying an EDID that the hikey kernel is able to work with,
  2. It is not supplying its EDID fast enough. Could be that it isn’t even booting up until after something in the HDMI signals for it to do so.

The problem with that monitor is that its made by some no-name shop in China, and Chinese vendors are notoriously useless for technical support and are code hoarders. And that means that the only way to get the monitor working on the hikey will likely be to find some way to force it into a specific mode, i.e., hardcode an appropriate EDID into the kernel and tell it to ignore any connections to the monitor.

I’ll see if I can get my hands on a Windows PC with an HDMI interface so I can run DumpEDID

http://www.nirsoft.net/utils/dump_edid.html

Hopefully that will have some useful information on supported resolutions.

Here is the output of DumpEDID showing the capabilities of my 5" HDMI panel:

Active                   : Yes
Registry Key             : DISPLAY\MPI5008\4&110b2ec7&0&UID206395
Monitor Name             : MPI5008
Serial Number            : B3432845
Manufacture Week         : 34 / 2011
ManufacturerID           : 2358 (0x0936)
ProductID                : 20488 (0x5008)
Serial Number (Numeric)  : 16843009 (0x01010101)
EDID Version             : 1.3
Display Gamma            : 2.20
Vertical Frequency       : 50 - 76 Hz
Horizontal Frequency     : 30 - 81 KHz
Maximum Image Size       : 41 X 26 cm (19.1 Inch)
Maximum Resolution       : 800 X 480
Support Standby Mode     : Yes
Support Suspend Mode     : Yes
Support Low-Power Mode   : Yes
Support Default GTF      : No
Digital                  : Yes

Supported Display Modes  :

     720 X  400  70 Hz
     640 X  480  60 Hz
     640 X  480  72 Hz
     640 X  480  75 Hz
     800 X  480  60 Hz

Here is some more detailed information from another EDID tool:

Vendor/Product Identification:

	Monitor Name : 	MPI5008
	Monitor Serial Number : 	B3432845
	Manufacturer Name : 	MPI
	Product Id : 	5008
	Serial Number : 	16843009
	Week Of Manufacture : 	34
	Year Of Manufacture : 	2011
	EDIDVersion : 	V1.3
	Number Of Extension Flag : 	1

Display parameters:

	Video Input Definition : 	Digital Signal
	DFP1X Compatible Interface : 	False
	Max Horizontal Image Size : 	410 mm
	Max Vertical Image Size : 	260 mm
	Max Display Size : 	19.1 Inches

Power Management and Features:

	Standby : 	Supported
	Suspend : 	Supported
	ActiveOff : 	Supported
	Video Input : 	1
	sRGB Default ColorSpace : 	True
	Default GTF : 	Not Supported
	Prefered Timing Mode : 	True

Gamma/Color and Etablished Timings:

	Display Gamma : 	2.2
	Red : 	x = 0.64 - y = 0.334
	Green : 	x = 0.286 - y = 0.599
	Blue : 	x = 0.154 - y = 0.077
	White : 	x = 0.313 - y = 0.329

	Etablished Timings : 	
		640 x 480 @ 75Hz (VESA)
		640 x 480 @ 72Hz (VESA)
		640 x 480 @ 60Hz (IBM, VGA)
		720 x 400 @ 70Hz (IBM, VGA)

	Display Type : 	RGB Color Display

Standard Timing:


Preferred Detailed Timing:

	Pixel Clock : 	29.57 Mhz

	Horizontal Active : 	800 pixels
	Horizontal Blanking : 	192 pixels
	Horizontal Sync Offset : 	16 pixels
	Horizontal Sync Pulse Width : 	80 pixels
	Horizontal Border : 	0 pixels
	Horizontal Size : 	255 mm

	Vertical Active : 	480 lines
	Vertical Blanking : 	17 lines
	Vertical Sync Offset : 	1 lines
	Vertical Sync Pulse Width : 	3 lines
	Vertical Border : 	0 lines
	Vertical Size : 	255 mm

	Input Type : 	Digital Separate
	Interlaced : 	False
	VerticalPolarity : 	True
	HorizontalPolarity : 	False

Monitor Range Limit:

	Maximum Vertical Frequency : 	76 Hz
	Minimum Vertical Frequency : 	50 Hz
	Maximum Horizontal Frequency : 	81 KHz
	Minimum Horizontal Frequency : 	30 KHz
	Maximum Pixel Clock : 	140 MHz

Stereo Display:

	Stereo Display : 	Normal display (no stereo)

RAW Data:

0x00	 00 FF FF FF FF FF FF 00 36 09 08 50 01 01 01 01	
0x10	 22 15 01 03 80 29 1A 78 EE E5 B5 A3 55 49 99 27	
0x20	 13 50 54 AC 00 00 01 01 01 01 01 01 01 01 01 01	
0x30	 01 01 01 01 01 01 8D 0B 20 C0 30 E0 11 10 10 50	
0x40	 13 00 FF FF 00 00 00 1C 00 00 00 FC 00 4D 50 49	
0x50	 35 30 30 38 0A 20 20 20 20 20 00 00 00 FD 00 32	
0x60	 4C 1E 51 0E 00 0A 20 20 20 20 20 20 00 00 00 FF	
0x70	 00 42 33 34 33 32 38 34 35 0A 20 20 20 20 01 6F

OK, so that must be happening.

First dump :

Second dump :

Is it on each run that 800x480 is not listed under “Established Timings” ?
But is further down, under “Preferred Detailed Timing:”

I think this is normal.

This display device is not a HDMI device (TV like), it is a DVI-D device (computer monitor like). A computer monitor EDID has a bitfield containing the industry standard (a.k.a. established) timings is supports together with a list of constraints (min/max Hfreq, min/max Vfreq) that can be used to automatically derive non-standard video modes if needed. Finally there is a preferred timing which gives the “best” settings for the monitor (for LCD devices this is typically the native resolution).

800x480 is omitted from the established timings because this is not a permitted established timing.

I suspect something in this EDID is confusing the display stack (though I haven’t yet figured out what).

The most significant problem I can see is that the Hfreq of the Preferred Detailed Timing (which is 800x480@60) is not within this monitors own specification. Specifically with a pixel clock of 29.570Khz and 992 clocks per line results in a Hfreq of 29.81 which is below the minimum horizontal frequency!

Out of interest what happens if you request 800x480@72, 800x480@64 or 800x480@65 on the kernel command line?