HDMI Resolutions testing

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:
VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_EMMC_V0.9-20200530
VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_EMMC_V20191231

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_CNTL: b3a04a3
HHI_HDMI_PLL_CNTL2: aaaa
HHI_HDMI_PLL_CNTL3: 0
HHI_HDMI_PLL_CNTL4: a691c00
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.

2 Likes

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
CodeCogsEqn
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,

Doel

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.

Thanks.

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=320
 else
 PRODUCT_PROPERTY_OVERRIDES += \
-  ro.sf.lcd_density=240
+  ro.sf.lcd_density=120
 endif

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 !

4 Likes

Thanks a lot… It works

480X1280

mipi to hdmi board

Android

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

@Terry can you support 480x1280 for this LCD ?
And if possible PM me the installation instructions, i’ve just received my VIM1

For some reason they made it 480x1280 instead of 1280x480 , got it working on raspberry pi4 and windows 10 but not on VIM1

1 Like