HDMI Resolutions testing

By pressing three times of function key. I have to also change u-boot placed in eMMC between 2015 and mainline, depending on Linux kernel which I want to boot. In other case it doesn’t want to start.

Erase before what?
Booting from SD/USB - no, but SD/USB images are generally seems to be working
Uploading new eMMC image - if I’m uploading by USB Burning Tool, I have checked Erase flash (Normal erase) and Erase bootloader.

You can try to enable “erase all”, it will wipe all the flash data on eMMC,
(including any remnants of uboot present on the device…)

Erase all option didn’t change anything. I’ve tested both images:

Maybe, but it is highly recommended while moving between different versions of uboot and OS…

If it would be helpfull, this is output of TWRP - display was working properly. I think there are almost every necessesary parameters over there.

EDID version: 1.3
Product ID code: 0004
Manufacturer: ADA
Serial number: 00000001
Manufactured in week: 1 year: 2007
Video input definition: digital signal, voltage level 0
Monitor is non-RGB
Maximum visible display size: 15 cm x 10 cm
Power management features: no active off, no suspend, no standby
Estabilished timings:
Standard timings:
	1024x600 	60 Hz (detailed)
Detailed mode clock 49000000 Hz, 255 mm x 255 mm
               0400 0405 0412 0520 hborder 0
               0258 025a 025d 026e vborder 0
edid_get_timing_validate: EDID version 1.3 does not have required info
Display timing:
 hactive 1024, hfrontp 0005, hbackp 0270 hsync 0013
 vactive 0600, vfrontp 0002, vbackp 0017 vsync 0003
 flags: hsync_low vsync_low 
Detailed mode clock 49000000 Hz, 255 mm x 255 mm
               0400 0405 0412 0520 hborder 0
               0258 025a 025d 026e vborder 0
edid_get_timing_validate: EDID version 1.3 does not have required info
dvi, mode info : clock 49000000 hdis 1024 vdis 600
 max_pxcnt   1311, max_lncnt   0621
 havon_begin 0283, havon_end   1306
 vavon_bline 0020, vavon_eline 0619
 hso_begin   0000, hso_end     0013
 vso_begin   0030, vso_end     0050
 vso_bline   0000, vso_eline   0003
use_enci: 0, hdmi_repeat: 0
PLL params for 490000kHz: m=146 frac=5555 od=16
PLL params for 490000kHz: m=a3 frac=aaaa od=8
PLL params for 490000kHz: m=a3 frac=aaaa od=4/2/1
HHI_HDMI_PLL_CNTL5: 33771290
HHI_HDMI_PLL_CNTL6: 39270000
HHI_HDMI_PLL_CNTL7: 50540000

@Terry @Gouwa @numbqq
Do you have any ideas how to fix issues with VESA resolutions? Many people use VESA resolutions in my CarPC ROMs, but we need more resolutions and more stability.
I have plans to build new ROMs for VIM1, 2, 3 and EDGE for CarPC community.

1 Like

We will add VESA resolution support for VIM3/VIM3L, but it’s not native resolution.


But users need native resolutions only…

As for native resolution, we will consider doing it after the all VESA resolution be completed.

1 Like

Hello! Tell me how to calculate the clock hd_write_reg (P_HHI_HDMI_PLL_CNTL

Edit: I made correction of calculation of clock.

If I understand documentation well (please correct me if I’m wrong), I think it is calculated like this
Target frequency can be taken from Video Timings Calculator, i.e.: https://tomverbeure.github.io/video_timings_calculator
For 1024x600 pixel clock is 49MHz (the same as I described earlier - taken from newer uboot). So you have to go now from the end - multiply by dividers values (OD1, OD2, OD3, CLK_UTIL_VID_PLL_DIV_5 and 2 if necessary - divider of input clock) to achieve value between 3 and 6 GHz and then calculate N and M to achieve values of the registers.
Then you have to insert calculated value in proper way to HDMI registers (HHI_HDMI_PLL_CNTL0-6):

OD configuration can be found here:

Why I’m writing i.e.? Because HDMI clock depends on Horizontal Total ticks and Vertical Total ticks and refresh rate. Total ticks which are sum of LCD Pixels + Front Porch + Sync + Back Porch.
This you have to place to VOUT registers. Unfortunately I think not all of them are fully documented in Datasheet. I’m also not sure that it is everything to achieve desired resolution.

Hallo @Terry,

It works for the 800x480, but i still have to set the density via ADB Shell.

$ wm density 120

Is there a way to set the density in the source file?

For your response, thank you very much.

Best Regards,


What’s the model of your device? What’s the version of your system?

Hallo @Terry,

It is VIM1_14, Android 6. I built the Image from your Android source code repository.


You can modify the file on path device/khadas

diff --git a/kvim/kvim.mk b/kvim/kvim.mk
index aa8b29a..aca2ff7 100644
--- a/kvim/kvim.mk
+++ b/kvim/kvim.mk
@@ -237,5 +237,5 @@ PRODUCT_PROPERTY_OVERRIDES += \
-  ro.sf.lcd_density=240
+  ro.sf.lcd_density=120

Hello @Terry ,

I have VIM3 board and i want to test 120 Hz display with it can you guide me for the same.
I have HDMI based monitor which can support 120 Hz display. When i check on HDMI setting on android i am getting list upto 60 Hz only not able to get any 90 Hz or 120 Hz display in HDMI resolution list.

Would be great if someone actually rewrote this in a clean & generic fashion…

Oh wait, it has been !


Thanks a lot… It works


mipi to hdmi board


If you can not make can you please tell me how to do I use serial debugging tool or build android source code?

how do we use this code, does it identify the freq or calculate them