HDMI Resolutions testing

We are debugging 1024x768 resolution for HDMI VESA. But it’s need more times to add more HDMI VESA resolution. However, the 1280x480 resolution is not included on our plan list.

VIM3 1024X768P60hz resolution

1 Like

Hi there everyone,
I’ve moved post from VIM3 forum.

I’m trying to run 7" LCD display with 1024x600 resolution without success on Khadas VIM3, either on Android Pie (Vims-Pie-V200103, V200320, V200617, build from sources or ready images) and Ubuntu with kernel 4.9. Display doesn’t work also on U-Boot 2015 (hdmitx command). Display starts, but doesn’t show properly - HDMI parameters seems to be set invalid.

Display is working properly on U-Boot 2020 and Ubuntu with kernel 5.6.

As far as I can see values for registers for HDMI PLL CLOCK for 1024x600p60hz seems to be missing in kernel 4.9 and earliers:

localhost kernel: [ 3860.826498@2] hdmitx: video: already init VIC = 0  Now VIC = 773
localhost kernel: [ 3860.826503@2] hdmitx: video: rx edid only support RGB format  
localhost kernel: [ 3860.826505@2] hdmitx: hdmitx: VESA only support RGB format 
localhost kernel: [ 3860.826508@2] hdmitx: hw: div40: 0 
localhost kernel: [ 3860.856337@0] hdmitx: ddc w1b error 0x54 0x20 0x00
localhost kernel: [ 3860.856350@0] hdmitx: frac_rate = 1
localhost kernel: [ 3860.856357@0] hdmitx: config HPLL = 4115866 frac_rate = 1
localhost kernel: [ 3860.856362@0] hdmitx: **error hpll clk: 4115866**
localhost kernel: [ 3860.856365@0] hdmitx: config HPLL done
localhost kernel: [ 3860.856371@0] hdmitx: set_hpll_od3_clk_div[610] div = 6
localhost kernel: [ 3860.856378@0] hdmitx: j = 16  vid_clk_div = 2
localhost kernel: [ 3860.856385@0] hdmitx: set enc for VIC: 773
localhost kernel: [ 3860.978352@0] hdmitx: hw:  config hdmitx IP vic = 773 cd:4 cs: 0
localhost kernel: [ 3860.988455@0] hdmitx: video: Sink is DVI device
localhost kernel: [ 3860.989080@0] hdmitx: system: irq 80000001 0
localhost kernel: [ 3861.090336@0] hdmitx: [0x10000103]: 0x00000008
localhost kernel: [ 3861.090341@0] hdmitx: [0x10000104]: 0x00000001
localhost kernel: [ 3861.090347@0] hdmitx: [0x10000170]: 0x00000010
localhost kernel: [ 3861.090351@0] hdmitx: [0x10000180]: 0x000000ff
localhost kernel: [ 3861.090354@0] hdmitx: [0x10000181]: 0x000000ff
localhost kernel: [ 3861.090358@0] hdmitx: [0x10000182]: 0x00000003
localhost kernel: [ 3861.090362@0] hdmitx: [0x10000183]: 0x00000007
localhost kernel: [ 3861.090366@0] hdmitx: [0x10000184]: 0x0000003f
localhost kernel: [ 3861.090369@0] hdmitx: [0x10000185]: 0x00000002
localhost kernel: [ 3861.090374@0] hdmitx: [0x10000187]: 0x000000ff
localhost kernel: [ 3861.090377@0] hdmitx: [0x10000188]: 0x00000003

I see there is a 1024x600 resolution in setting_enc_clk_val_24 table in drivers\amlogic\vout\hdmitx\hdmi_tx_20\hw\hw_clk.c:

 	{{HDMIV_1024x600p60hz,
 	  HDMI_VIC_END},
 		4115866, 4, 2, 1, VID_PLL_DIV_5, 2, 1, 1, -1},

But in set_g12a_hpll_clk_out(…) in drivers\amlogic\media\vout\hdmitx\hdmi_tx_20\hw\hw_12a.c I don’t see 4115866 clock.

I’ve tried to add values calculated by myself, but without success.

	case 4115866:
		hd_write_reg(P_HHI_HDMI_PLL_CNTL0, 0x3b0004ab);
		hd_write_reg(P_HHI_HDMI_PLL_CNTL1, 0x0000fd3a);
		hd_write_reg(P_HHI_HDMI_PLL_CNTL2, 0x00000000);
		hd_write_reg(P_HHI_HDMI_PLL_CNTL3, 0x0a691c00);
		hd_write_reg(P_HHI_HDMI_PLL_CNTL4, 0x33771290);
		hd_write_reg(P_HHI_HDMI_PLL_CNTL5, 0x39270000);
		hd_write_reg(P_HHI_HDMI_PLL_CNTL6, 0x50540000);
		printk("HPLL: 0x%lx\n", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));
		hd_set_reg_bits(P_HHI_HDMI_PLL_CNTL0, 0x0, 29, 1);
		printk("HPLL: 0x%lx\n", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));
		WAIT_FOR_PLL_LOCKED(P_HHI_HDMI_PLL_CNTL0);
		printk("HPLL: 0x%lx\n", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));
		break;

I’ve also tried to change change to values received from U-Boot 2020 (values are not hardcoded, but calculated in hdmi driver). Clock is changed to 4900000, of course I’ve changed it in setting_enc_clk_val_24:

        case 4900000:
                hd_write_reg(P_HHI_HDMI_PLL_CNTL0, 0x3b3a04a3);
                hd_write_reg(P_HHI_HDMI_PLL_CNTL1, 0x0000aaaa);
                hd_write_reg(P_HHI_HDMI_PLL_CNTL2, 0x00000000);
                hd_write_reg(P_HHI_HDMI_PLL_CNTL3, 0x0a691c00);
                hd_write_reg(P_HHI_HDMI_PLL_CNTL4, 0x33771290);
                hd_write_reg(P_HHI_HDMI_PLL_CNTL5, 0x39270000);
                hd_write_reg(P_HHI_HDMI_PLL_CNTL6, 0x50540000);
                printk("HPLL: 0x%lx\n", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));
                hd_set_reg_bits(P_HHI_HDMI_PLL_CNTL0, 0x0, 29, 1);
                printk("HPLL: 0x%lx\n", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));
                WAIT_FOR_PLL_LOCKED(P_HHI_HDMI_PLL_CNTL0);
                printk("HPLL: 0x%lx\n", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));
                break;

After listed above changes register applies and display shows “something”, but for sure it is not the expected result.

echo 1024x600p60hz > /sys/class/amhdmitx/amhdmitx0/disp_mode
[  101.299354@0] hdmitx: video: already init VIC = 16  Now VIC = 773
[  101.299833@0] hdmitx: video: rx edid only support RGB format
[  101.305751@0] hdmitx: hdmitx: VESA only support RGB format
[  101.311379@0] hdmitx: hw: div40: 0
[  101.340577@0] hdmitx: ddc w1b error 0x54 0x20 0x00
[  101.340622@0] hdmitx: frac_rate = 1
[  101.343276@0] hdmitx: config HPLL = 4900000 frac_rate = 1
[  101.349018@0] hdmitx: HPLL: 0xdb3a04a3
[  101.352440@0] hdmitx: config HPLL done
[  101.356063@0] hdmitx: set_hpll_od3_clk_div[643] div = 6
[  101.361411@0] hdmitx: j = 16  vid_clk_div = 2
[  101.368299@0] hdmitx: set enc for VIC: 773
[  101.410566@0] hdmitx: hw:  config hdmitx IP vic = 773 cd:4 cs: 0
[  101.421123@0] hdmitx: video: Sink is DVI device
[  101.421619@0] hdmitx: system: irq 80000001 0
[  101.526670@0] hdmitx: [0x10000103]: 0x00000008
[  101.526723@0] hdmitx: [0x10000104]: 0x00000001
[  101.529928@0] hdmitx: [0x10000170]: 0x00000010
[  101.534450@0] hdmitx: [0x10000180]: 0x000000ff
[  101.538795@0] hdmitx: [0x10000181]: 0x000000ff
[  101.543660@0] hdmitx: [0x10000182]: 0x00000003
[  101.547605@0] hdmitx: [0x10000183]: 0x00000007
[  101.552054@0] hdmitx: [0x10000184]: 0x0000003f
[  101.556485@0] hdmitx: [0x10000185]: 0x00000002
[  101.560867@0] hdmitx: [0x10000187]: 0x000000ff
[  101.567929@0] hdmitx: [0x10000188]: 0x00000003

echo 1024x600p60hz > sys/class/display/mode
[  355.682900@4] vout: vmode set to 1024x600p60hz
[  355.689811@4] fb: current vmode=1024x600p60hz, cmd: 0x10000
[  355.689865@4] vlock: event MODE_CHANGE_PRE 0
[  355.694284@4] hdmitx: hdmitx_set_current_vmode[4722]
[  355.699233@4] hdmitx: system: recalc before 1024x600p60hz 60 1
[  355.704970@4] hdmitx: system: recalc after 1024x600p60hz 2997 50
[  355.711285@4] hdmitx: system: get current mode: 1024x600p60hz
[  355.716695@4] hdmitx: system: update physcial size: 150 100
[  355.724714@4] hdmitx: video: already init VIC = 0  Now VIC = 773
[  355.728145@4] hdmitx: video: rx edid only support RGB format
[  355.733675@4] hdmitx: hdmitx: VESA only support RGB format
[  355.739177@4] hdmitx: hw: div40: 0
[  355.768613@0] hdmitx: ddc w1b error 0x54 0x20 0x00
[  355.768670@0] hdmitx: frac_rate = 1
[  355.771621@0] hdmitx: config HPLL = 4900000 frac_rate = 1
[  355.777098@0] hdmitx: HPLL: 0xdb3a04a3
[  355.780645@0] hdmitx: config HPLL done
[  355.784151@0] hdmitx: set_hpll_od3_clk_div[643] div = 6
[  355.789578@0] hdmitx: j = 16  vid_clk_div = 2
[  355.794105@0] hdmitx: set enc for VIC: 773
[  355.839034@0] hdmitx: hw:  config hdmitx IP vic = 773 cd:4 cs: 0
[  355.849693@0] hdmitx: video: Sink is DVI device
[  355.849891@0] hdmitx: hw: set audio
[  355.852363@0] hdmitx: hw: hdmitx tx_aud_src = 0
[  355.856711@0] hdmitx: system: irq 80000001 0
[  355.862634@0] hdmitx: fs = 0, cd = 4, tmds_clk = 50400
[  355.866034@0] hdmitx: hw: aud_n_para = 6144
[  355.870413@0] hdmitx: hw: set channel status
[  355.874594@0] hdmitx: system: update rx hdr info 0
[  355.879298@0] vout: new mode 1024x600p60hz set ok
[  355.886217@0] fb: current vmode=1024x600p60hz, cmd: 0x20000
[  355.889634@0] DOLBY: vout_notify_callback: VOUT_EVENT_MODE_CHANGE
[  355.895552@0] vlock: event MODE_CHANGE
[  355.901530@5] vout: vout_io_open
[  355.902453@5] vout: vout_ioctl: cmd_dir = 0x2, cmd_nr = 0x0
[  355.913805@5] vout: vout_io_release
[  355.958548@0] hdmitx: [0x10000103]: 0x00000008
[  355.958578@0] hdmitx: [0x10000104]: 0x00000001
[  355.961783@0] hdmitx: [0x10000170]: 0x00000010
[  355.966228@0] hdmitx: [0x10000180]: 0x000000ff
[  355.970664@0] hdmitx: [0x10000181]: 0x000000ff
[  355.975175@0] hdmitx: [0x10000182]: 0x00000003
[  355.979490@0] hdmitx: [0x10000183]: 0x00000007
[  355.983900@0] hdmitx: [0x10000184]: 0x0000003f
[  355.988322@0] hdmitx: [0x10000185]: 0x00000002
[  355.992840@0] hdmitx: [0x10000187]: 0x000000ff
[  355.997167@0] hdmitx: [0x10000188]: 0x00000003

I’ve modified /vendor/etc/mesondisplay.cfg:

 130|console:/vendor/etc # cat mesondisplay.cfg
 MID g12b 1024 600 32 1 1024 600 32 1
 busybox fbset -fb /dev/graphics/fb0 -g 1024 600 1024 600 32
 busybox fbset -fb /dev/graphics/fb1 -g 1024 600 1024 600 32

I was trying adding resolution by fbset in console and changing wm size to 1024x600, but still it looks like this.

Any ideas how to solve it?

Vladimir.v.v suggested improper power supply or HDMI cable. But if it would be the problem with cable or power supply, why with U-Boot 2020 and Kernel 5.6 it is working?
But to be sure, I’ve triple checked (other cables HDMI and USB, same cable with other board, other power supply), so for sure cable and power supply is not the problem.

Hi sometimes the clock gets misaligned by some offset or something, by accident in the booting process and everything screws up… that is the reason you are getting these Bars on the display,

Also mainline kernel is more friendly towards modifications made to the different settings, giving it a bit more flexibility, something the 4.9 kernel doesn’t offer much…

please clarify the display model?I agree with you, it may be some kind of firmware incompatibility

vim3 requires a power supply up to 12V 2A

Waveshare 7inch Capacitive Touch Screen LCD ©, 1024×600, HDMI, IPS:
https://www.waveshare.com/7inch-hdmi-lcd-c.htm

I was trying few different power supply without any changes, bo the main one was 5.1V, 3A.
I will ask again - if it would be power supply why it would be working properly on the same board in the same hardware configuration, but with U-Boot 2020 and Ubuntu with Kernel 5.6 and not working on the older one?
In addition I’ve checked it is working properly with 1080p screen with Android Pie with 4.9 kernel.

I’ve found also that EDID is not recognized properly on Android Pie with 4.9 kernel:

console:/ $ cat /sys/class/amhdmitx/amhdmitx0/edid
Rx Manufacturer Name: ADA
Rx Product Code: 0004
Rx Serial Number: 00000001
Rx Product Name:
Manufacture Week: 1
Manufacture Year: 2007
Physcial size(cm): 15 x 10
EDID Version: 1.3
EDID block number: 0x0
blk0 chksum: 0x12
Source Physical Address[a.b.c.d]: 0.0.0.0
native Mode 0, VIC (native 3):
ColorDeepSupport 0
3 4 16
Audio {format, channel, freq, cce}
{1, 1, 7, 1}
Speaker Allocation: 0
Vendor: 0x0 ( DVI device)
MaxTMDSClock1 150 MHz
vLatency:  Invalid/Unknown
aLatency:  Invalid/Unknown
i_vLatency:  Invalid/Unknown
i_aLatency:  Invalid/Unknown
SCDC: 0
RR_Cap: 0
LTE_340M_Scramble: 0

checkvalue: 0x00000000

This is how it looks on Ubuntu with kernel 5.6:

root@Khadas:/sys/class/graphics/fb0/device/drm/card0/card0-HDMI-A-1# cat edid | edid-decode
EDID version: 1.3
Manufacturer: ADA Model 4 Serial Number 1
Made in week 1 of 2007
Digital display
Maximum image size: 15 cm x 10 cm
Gamma: 1.00
RGB color display
First detailed timing is preferred timing
Display x,y Chromaticity:
  Red:   0.0000, 0.0000
  Green: 0.0000, 0.0000
  Blue:  0.0000, 0.0000
  White: 0.0000, 0.0000
Established timings supported:
Standard timings supported:
Detailed mode: Clock 49.000 MHz, 255 mm x 255 mm
               1024 1029 1042 1312 hborder 0
                600  602  605  622 vborder 0
               -hsync -vsync
               VertFreq: 60 Hz, HorFreq: 37347 Hz
Dummy block
Dummy block
Dummy block
Checksum: 0x12 (valid)



Screen 0: minimum 320 x 200, current 1024 x 600, maximum 3840 x 2160
HDMI-1 connected primary 1024x600+0+0 (0x42) normal (normal left inverted right x axis y axis) 150mm x 100mm
        Identifier: 0x40
        Timestamp:  14093
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 1.0
        Clones:
        CRTC:       0
        CRTCs:      0
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter:
        EDID:
                00ffffffffffff000481040001000000
                01110103800f0a000a00000000000000
                00000000000001010101010101010101
                0101010101012413002041581620050d
                2300ffff000000180000001000000000
                00000000000000000000000000100000
                00000000000000000000000000000010
                00000000000000000000000000000012
        non-desktop: 0
                range: (0, 1)
        link-status: Good
                supported: Good, Bad
  1024x600 (0x42) 49.000MHz -HSync -VSync *current +preferred
        v: height  600 start  602 end  605 total  622           clock  60.04Hz
r        h: width  1024 start 1029 end 1042 total 1312 skew    0 clock  37.35KHz

I suspect HDMI PLL settings.
I’ve add them as mentioned before, because the PLL settings were missing (I think so)…
But I don’t belive myself, so I’m not sure I’ve added them properly :smiley:

I am not much of a software nerd here, and this just based on stuff I have heard on this forum,
you can take a look around the Forum for more info,

I looked at the Display you were using, we had a person who was using the same display, he had some touch panel issues (later solved), by chance are you using SD/USB images ?
the eMMC images shouldn’t have such a problem…

I’ve been trying to run three images of Android Pie 9 from Khadas (200103, 200319, 200624) uploaded by USB to eMMC, Krescue images (two or three if I remember well) of Android Pie. Result is worse, because there is even no pink image only white one with noise.

I’ve also compiled from the sources (from Khadas git repository) without and with my patch (patch try?) and uploaded them to eMMC.
Without the changes - I have the same result as on ready to use images from Khadas.
With the changes I see the image placed in post above.

I’ve taken a look to patches placed in this topic, but most of them applies to VIM1 or VIM2, which have different SoC and doesn’t applies to VIM3. Moreover some of the changes have been already applied to the existing images, but it doesn’t change anything.

Anyway, thank for the answers Electr1 and Vladimir.v.v. I still have hope for solution :slight_smile:

2 Likes

Hello @pawelseweryn

We don’t have a monitor with resolution 1024x600@60hz, could you please run the 4.9 ubuntu image and provide the result of this command to me ?

$ edid-decode < /sys/class/amhdmitx/amhdmitx0/rawedid
1 Like

Hello @numbqq,
sure, please find output listed below. EDID looks better, display shows nothing (black screen) instead of white screen with noise like in Android.
Ubuntu version: VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_EMMC_V0.9-20200530, uploaded through USB Bootloader

EDID

khadas@Khadas:~$ uname -a
Linux Khadas 4.9.224 #29 SMP PREEMPT Sat May 30 14:20:51 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
khadas@Khadas:~$ edid-decode < /sys/class/amhdmitx/amhdmitx0/rawedid
EDID version: 1.3
Manufacturer: ADA Model 4 Serial Number 1
Made in week 1 of 2007
Digital display
Maximum image size: 15 cm x 10 cm
Gamma: 1.00
RGB color display
First detailed timing is preferred timing
Display x,y Chromaticity:
  Red:   0.0000, 0.0000
  Green: 0.0000, 0.0000
  Blue:  0.0000, 0.0000
  White: 0.0000, 0.0000
Established timings supported:
Standard timings supported:
Detailed mode: Clock 49.000 MHz, 255 mm x 255 mm
               1024 1029 1042 1312 hborder 0
                600  602  605  622 vborder 0
               -hsync -vsync
               VertFreq: 60 Hz, HorFreq: 37347 Hz
Dummy block
Dummy block
Dummy block
Checksum: 0x12 (valid)

KERN.LOG

Jul 22 13:38:07 localhost kernel: [  123.326447@0] hdmitx: edid: EDID Parser:
Jul 22 13:38:07 localhost kernel: [  123.326455@0] hdmitx: edid: EDID BlockCount=0
Jul 22 13:38:07 localhost kernel: [  123.326458@0] hdmitx: edid: set default vic
Jul 22 13:38:07 localhost kernel: [  123.326462@0] hdmitx: edid: edid blk0 checksum:0 ext_flag:0
Jul 22 13:38:07 localhost kernel: [  123.326467@0] hdmitx: edid: check sum valid
Jul 22 13:38:07 localhost kernel: [  123.326473@0] hdmitx: edid: blk0 raw data
Jul 22 13:38:07 localhost kernel: [  123.326499@0] hdmitx: edid:
Jul 22 13:38:07 localhost kernel: [  123.326504@0] hdmitx: system: update physcial size: 150 100
Jul 22 13:38:07 localhost kernel: [  123.326527@0] hdmitx: system: get current mode: 1024x600p60hz
Jul 22 13:38:07 localhost kernel: [  123.326532@0] hdmitx: system: update rx hdr info 0
Jul 22 13:38:07 localhost kernel: [  123.326536@0] hdmitx: system: update physcial size: 150 100
Jul 22 13:38:07 localhost kernel: [  123.326573@0] hdmitx: video: already init VIC = 0  Now VIC = 773
Jul 22 13:38:07 localhost kernel: [  123.326578@0] hdmitx: video: rx edid only support RGB format
Jul 22 13:38:07 localhost kernel: [  123.326581@0] hdmitx: hdmitx: VESA only support RGB format
Jul 22 13:38:07 localhost kernel: [  123.326585@0] hdmitx: hw: div40: 0
Jul 22 13:38:07 localhost kernel: [  123.354533@0] hdmitx: system: irq 80000001 0
Jul 22 13:38:07 localhost kernel: [  123.356319@0] hdmitx: ddc w1b error 0x54 0x20 0x00
Jul 22 13:38:07 localhost kernel: [  123.356330@0] hdmitx: frac_rate = 1
Jul 22 13:38:07 localhost kernel: [  123.356338@0] hdmitx: config HPLL = 4115866 frac_rate = 1
Jul 22 13:38:07 localhost kernel: [  123.356342@0] hdmitx: error hpll clk: 4115866
Jul 22 13:38:07 localhost kernel: [  123.356345@0] hdmitx: config HPLL done
Jul 22 13:38:07 localhost kernel: [  123.356351@0] hdmitx: set_hpll_od3_clk_div[610] div = 6
Jul 22 13:38:07 localhost kernel: [  123.356358@0] hdmitx: j = 16  vid_clk_div = 2
Jul 22 13:38:07 localhost kernel: [  123.356365@0] hdmitx: set enc for VIC: 773
Jul 22 13:38:07 localhost kernel: [  123.458426@0] hdmitx: [0x10000104]: 0x00000001
Jul 22 13:38:07 localhost kernel: [  123.458435@0] hdmitx: [0x10000180]: 0x000000ff
Jul 22 13:38:07 localhost kernel: [  123.458439@0] hdmitx: [0x10000181]: 0x000000ff
Jul 22 13:38:07 localhost kernel: [  123.458443@0] hdmitx: [0x10000182]: 0x00000003
Jul 22 13:38:07 localhost kernel: [  123.458447@0] hdmitx: [0x10000183]: 0x00000007
Jul 22 13:38:07 localhost kernel: [  123.458450@0] hdmitx: [0x10000184]: 0x0000003f
Jul 22 13:38:07 localhost kernel: [  123.458454@0] hdmitx: [0x10000185]: 0x00000002
Jul 22 13:38:07 localhost kernel: [  123.458458@0] hdmitx: [0x10000187]: 0x000000ff
Jul 22 13:38:07 localhost kernel: [  123.458462@0] hdmitx: [0x10000188]: 0x00000003
Jul 22 13:38:07 localhost kernel: [  123.478322@0] hdmitx: hw:  config hdmitx IP vic = 773 cd:4 cs: 0
Jul 22 13:38:07 localhost kernel: [  123.478423@0] hdmitx: reg: HDMITX-DWC addr=0x10004006 rd_data=0x04
Jul 22 13:38:07 localhost kernel: [  123.478427@0] hdmitx: reg: Error: HDMITX-DWC exp_data=0xff mask=0x9f
Jul 22 13:38:07 localhost kernel: [  123.488437@0] hdmitx: video: Sink is DVI device

Hello @pawelseweryn

We have a plan to add more VESA resolutions support, 1024x600p60hz is included, we need some time to debug, will update you once it is OK.

Thanks.

3 Likes

Hello @numbqq,
Ok, I look forward to get VESA resolutions working properly :slight_smile:
If you would like me to test some patch with display, please let me know. I’ve prepared environment, toolchains, sources and other stuff.

4 Likes

If in env.txt, in line 62, instead of hdmi=720p60hz, write hdmi=1024x600p60hz, then it works fine(ubuntu focal 4.9 kernel sd_usb boot). But auto-detection of the resolution does not pick up the desired resolution(similarly works and 1600x1200p60hz)

1 Like

At least write a mini guide for us, using the example of adding a resolution of 1024x600 for android 9. I think I’m not the only one who will be grateful. And it will go so quickly. Everyone will test their monitor and post their results! Thanks in advance!

Hello @tedal

You mean a fixed resolution 1024x600p60hz works? I don’t have such monitor so I’m not sure.
@pawelseweryn Can you try this ?

Add a new resolution is related to many low level operations, such as registers and clock settings, not only a mini guide can resolve this issue.

Hello @all,
unfortunatelly still not working. hdmi=1024x600p60hz in env.txt doesn’t change anything.
Tested with:

  1. VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_EMMC_V0.9-20200530.img
  2. VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_EMMC_V20191231.img

/boot/ is not being mounted in Android and I can’t find way to mount it manually. It says: I/O error. Any ideas?

Dmesg still says: hdmitx: error hpll clk: 4115866

khadas@Khadas:~$ sudo dmesg | grep hdmi
[sudo] password for khadas:
[    0.000000] Kernel command line: root=UUID=5b9091cd-1c27-4750-b83c-5ce5e026b9c1 rootfstype=ext4 rootflags=data=writeback rw ubootpart=NULL console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0 logo=osd0,loaded,0x3d800000,1024x600p60hz vout=1024x600p60hz,enable hdmimode=1024x600p60hz  fsck.repair=yes net.ifnames=0 ddr_size= wol_enable=0 jtag=disable mac=c8:63:14:70:53:66 androidboot.mac=c8:63:14:70:53:66  fan=auto khadas_board=VIM3 hwver=VIM3.V12 coherent_pool=2M reboot_mode=normal imagetype=EMMC uboottype=vendor
[    0.000000] vout: get hdmimode: 1024x600p60hz
[    0.566262] hdmitx: system: amhdmitx_probe start
[    0.566282] hdmitx: system: Ver: 20190624
[    0.566317] hdmitx: system: hdmitx_device.chip_type : 11
[    0.566357] hdmitx: system: not find match pwr-ctl
[    0.566400] hdmitx: system: not find drm_amhdmitx
[    0.566430] hdmitx: system: hpd irq = 36
[    0.566542] hdmitx: system: hdcp22_tx_skp failed to probe
[    0.566561] hdmitx: system: hdcp22_tx_esm failed to probe
[    0.566963] vout: vout1: register server: hdmitx_vout_server
[    0.566983] vout: vout2: register server: hdmitx_vout2_server
[    0.567488] hdmitx: hdmitx20: Mapped PHY: 0xffd00000
[    0.567514] hdmitx: hdmitx20: Mapped PHY: 0xff634400
[    0.567537] hdmitx: hdmitx20: Mapped PHY: 0xff900000
[    0.567566] hdmitx: hdmitx20: Mapped PHY: 0xff800000
[    0.567585] hdmitx: hdmitx20: Mapped PHY: 0xff63c000
[    0.567602] hdmitx: hdmitx20: Mapped PHY: 0xffd00000
[    0.567619] hdmitx: hdmitx20: Mapped PHY: 0xff608000
[    0.567637] hdmitx: hdmitx20: Mapped PHY: 0xff600000
[    0.567657] hdmitx: hdmitx20: Mapped PHY: 0xffe01000
[    0.567678] hdmitx: hw: hdmitx_get_format:0x0
[    0.567694] hdmitx: hw: P_HHI_HDMI_CLK_CNTL :0x100
[    0.567709] hdmitx: hw: P_HHI_HDMI_PLL_CNTL :0x20000000
[    0.567945] hdmitx: hw: avmute set to 1
[    0.567962] hdmitx: system: fmt_attr default
[    0.568070] hdmitx: system: amhdmitx_probe end
[    0.568688] hdmitx: system: irq 2 0
[    0.570061] hdmitx: hdmitx_set_current_vmode[3724]
[    0.570078] hdmitx: system: recalc before 1024x600p60hz 60 1
[    0.570096] hdmitx: system: recalc after 1024x600p60hz 2997 50
[    0.570112] hdmitx: alread display in uboot
[    1.085531] hdmitx: system: plugin
[    1.157669] hdmitx: edid: EDID Parser:
[    1.157694] hdmitx: edid: EDID BlockCount=0
[    1.157713] hdmitx: edid: set default vic
[    1.157733] hdmitx: edid: edid blk0 checksum:0 ext_flag:0
[    1.157756] hdmitx: edid: check sum valid
[    1.157777] hdmitx: edid: blk0 raw data
[    1.157829] hdmitx: edid:
[    1.157940] hdmitx: system: update physcial size: 150 100
[    1.157980] hdmitx: system: get current mode: 1024x600p60hz
[    1.158002] hdmitx: system: update rx hdr info 0
[    1.158021] hdmitx: system: update physcial size: 150 100
[    1.158078] hdmitx: video: already init VIC = 0  Now VIC = 773
[    1.158101] hdmitx: video: rx edid only support RGB format
[    1.158121] hdmitx: hdmitx: VESA only support RGB format
[    1.158142] hdmitx: hw: div40: 0
[    1.187707] hdmitx: ddc w1b error 0x54 0x20 0x00
[    1.187735] hdmitx: frac_rate = 1
[    1.187757] hdmitx: config HPLL = 4115866 frac_rate = 1
**[    1.187778] hdmitx: error hpll clk: 4115866**
[    1.187797] hdmitx: config HPLL done
[    1.187818] hdmitx: set_hpll_od3_clk_div[610] div = 6
[    1.187842] hdmitx: j = 16  vid_clk_div = 2
[    1.187866] hdmitx: set enc for VIC: 773
[    1.309878] hdmitx: hw:  config hdmitx IP vic = 773 cd:4 cs: 0
[    1.309991] hdmitx: reg: HDMITX-DWC addr=0x10004006 rd_data=0x00
[    1.310013] hdmitx: reg: Error: HDMITX-DWC exp_data=0xff mask=0x9f
[    1.320037] hdmitx: video: Sink is DVI device
[    1.320102] hdmitx: hw: set audio
[    1.320123] hdmitx: hw: hdmitx tx_aud_src = 0
[    1.320153] hdmitx: fs = 0, cd = 4, tmds_clk = 50400
[    1.320174] hdmitx: hw: aud_n_para = 6144
[    1.320198] hdmitx: hw: set channel status
[    1.320245] hdmitx: hw: set audio
[    1.320263] hdmitx: hw: hdmitx tx_aud_src = 0
[    1.320291] hdmitx: fs = 0, cd = 4, tmds_clk = 50400
[    1.320311] hdmitx: hw: aud_n_para = 6144
[    1.320336] hdmitx: hw: set channel status
[   11.770753] hdmitx: hdcp: hdmitx_hdcp_init
[   12.081840] [RX]-hdmirx: hdmirx_init.
[   13.090242] cectx ff80023c.aocec: no hdmirx regs
[   13.430272] hdmitx: audio: aout notify format CT_PCM
[   13.434829] hdmitx: hw: set audio
[   13.438295] hdmitx: hw: hdmitx tx_aud_src = 0
[   13.442814] hdmitx: fs = 3, cd = 4, tmds_clk = 50400
[   13.447913] hdmitx: hw: aud_n_para = 6144
[   13.452081] hdmitx: hw: set channel status
[   13.456347] hdmitx: audio: Audio Type: PCM
[   13.460575] hdmitx: audio: set audio param

Ok, I’ve tested it with VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_SD-USB_V0.9-20200530 and display is working! :slight_smile: Without touchscreen, but same display shows image properly.
You need to change env.txt as @tedal said:
line 62 to hdmi=1024x600p60hz
and also
line 19 to hdmi_autodetect=no

It is quite suprising, because
On EMMC image we have: Linux Khadas 4.9.224 #29 SMP PREEMPT Sat May 30 14:20:51 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
On SD/USB image we have: Linux Khadas 4.9.224 #29 SMP PREEMPT Sat May 30 14:20:51 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

It seems to be the same build. Why SD/USB is working while EMMC not?

Quite suprising is that dmesg also says:

[    1.187803] hdmitx: config HPLL = 4115866 frac_rate = 1
[    1.187824] hdmitx: error hpll clk: 4115866
[    1.187843] hdmitx: config HPLL done

Any ideas what to do to make now Android working with display? :slight_smile:

So, summary:
Android:
None of tested working (Vims-Pie-V200103, V200320, V200617, either installed by USB-burn-installer and Krescue)

Ubuntu:
VIMx.Ubuntu.mainline.5.5.xfce.bionic.test.emmc installed from Krescue - works display and touchscreen
VIM3_Ubuntu-gnome-focal_Linux-5.7-rc7_arm64_SD-USB_V0.9-20200530.img - works display and touchscreen
Ubuntu Focal with kernel 5.7 and xfce build from sources using Fenix works - works display and touchscreen
VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_SD-USB_V0.9-20200530 - works display, but not touchscreen
VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_EMMC_V0.9-20200530.img - none of display and ts working
VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_EMMC_V20191231.img - none of display and ts working

Yes, it’s the same kernel.

How you boot the SD image ? Have you erase the eMMC ?