HDMI Resolutions testing

I want to test ramdisk_1024x768p60hz.img on Ubuntu V170220, but I can’t figure it out how to get to U-Boot Shell. Can someone help me ?

Basically, it’s quite common method to boot into U-Boot, you can Google for that, and following steps for your reference:

  • Connect and Setup Serial Tool
  • Power on VIM
  • Keep hitting Space at the moment your VIM is powering on to boot into U-Boot.

Enjoy!

hi, how would we transpose those to linux and fbset command line params ??
tks

hi ravelo, command line arguments are not supported at present.

The custom HDMI resolutions still not work, It looks like I didn’t figure out the correct parameters. i will try it later. could you help me to find the right way to figure it out :grinning:

Actually, it’s not too hard to achieve that, follow thoughts for your reference:

  • Boot into U-Boot and setup the HDMI Resolution at the U-Boot Command Line
  • Add a script to parse the command line and get the HDMI parameter
  • Pass the HDMI parameter to fbset

You can refer following scrips which is used on RPi or Odroid-C2:

#!/bin/sh

for x in $(cat /proc/cmdline); do
        case ${x} in
                m_bpp=*) export bpp=${x#*=} ;;
                hdmimode=*) export mode=${x#*=} ;;
        esac
done

HPD_STATE=/sys/class/amhdmitx/amhdmitx0/hpd_state
DISP_CAP=/sys/class/amhdmitx/amhdmitx0/disp_cap
DISP_MODE=/sys/class/display/mode

echo $mode > $DISP_MODE

common_display_setup() {
        M="0 0 $(($X - 1)) $(($Y - 1))"
        Y_VIRT=$(($Y * 2))
        fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT $bpp
        echo $mode > /sys/class/display/mode
        echo 0 > /sys/class/graphics/fb0/free_scale
        echo 1 > /sys/class/graphics/fb0/freescale_mode
        echo $M > /sys/class/graphics/fb0/free_scale_axis
        echo $M > /sys/class/graphics/fb0/window_axis

        echo 0 > /sys/class/graphics/fb1/free_scale
        echo 1 > /sys/class/graphics/fb1/freescale_mode
}

case $mode in
		480*) 
			export X=720 
			export Y=480 
			;;
		576*)
			export X=720
			export Y=576
			;;
		720p*)
			export X=1280
			export Y=720
			;;
		1080*)
			export X=1920
			export Y=1080
			;;
		2160p*)
			export X=3840
			export Y=2160
			;;
		smpte24hz*)
			export X=3840
			export Y=2160
			;;
		640x480p60hz*)
			export X=640
			export Y=480
			;;
		800x480p60hz*)
			export X=800
			export Y=480
			;;
		800x600p60hz*)
			export X=800
			export Y=600
			;;
		1024x600p60hz*)
			export X=1024
			export Y=600
			;;
		1024x768p60hz*)
			export X=1024
			export Y=768
			;;
		1280x800p60hz*)
			export X=1280
			export Y=800
			;;
		1280x1024p60hz*)
			export X=1280
			export Y=1024
			;;
		1360x768p60hz*)
			export X=1360
			export Y=768
			;;
		1440x900p60hz*)
			export X=1440
			export Y=900
			;;
		1600x900p60hz*)
			export X=1600
			export Y=900
			;;
		1680x1050p60hz*)
			export X=1680
			export Y=1050
			;;
		1600x1200p60hz*)
			export X=1600
			export Y=1200
			;;
		1920x1200p60hz*)
			export X=1920
			export Y=1200
			;;
		2560x1080p60hz*)
			export X=2560
			export Y=1080
			;;
		2560x1440p60hz*)
			export X=2560
			export Y=1440
			;;
		2560x1600p60hz*)
			export X=2560
			export Y=1600
			;;
		3440x1440p60hz*)
			export X=3440
			export Y=1440
			;;
esac

common_display_setup

# Console unblack
echo 0 > /sys/class/graphics/fb0/blank
echo 0 > /sys/class/graphics/fb1/blank
1 Like

thank you, I’ll try this!

this way, once the resolution is set in u-boot (in bootargs, iirc),
then when linux boots, it sets the same resolution as the one chosen by u-boot

hi,
when I try to run this on @numbqq’ s customised 412rc6 mainline kernel,
some of the folder and files do not exist and some are readonly,
see here:

root@ivnVimPro:/etc/modprobe.d# fbset -fb /dev/fb0 -g 1280 720 1280 1440 24
ioctl FBIOPUT_VSCREENINFO: Invalid argument
root@ivnVimPro:/etc/modprobe.d# fbset -fb /dev/fb1 -g 32 32 32 32 32
open /dev/fb1: No such file or directory
root@ivnVimPro:/etc/modprobe.d# echo 0 > /sys/class/graphics/fb0/free_scale
bash: /sys/class/graphics/fb0/free_scale: Permission denied
root@ivnVimPro:/etc/modprobe.d# echo 1 > /sys/class/graphics/fb0/freescale_mode
bash: /sys/class/graphics/fb0/freescale_mode: Permission denied
root@ivnVimPro:/etc/modprobe.d# echo 0 0 1279 719 > /sys/class/graphics/fb0/free_scale_axis
bash: /sys/class/graphics/fb0/free_scale_axis: Permission denied
root@ivnVimPro:/etc/modprobe.d# echo 0 0 1279 719 > /sys/class/graphics/fb0/window_axis
bash: /sys/class/graphics/fb0/window_axis: Permission denied
root@ivnVimPro:/etc/modprobe.d# echo 0 > /sys/class/graphics/fb1/free_scale
bash: /sys/class/graphics/fb1/free_scale: No such file or directory

is his normal and how to fix it ? tks

Do you solved the problem?

please explain “thus”

We’ve push the Amlogic to add the support for VESA, and latest Nougat Kernel have already updated with it. We tested 1024x768 and works fine but still need more testing before release new ROM.
Thanks.
@linuxxr

commit 7853d8e4f95d54ce4ff75dcfc94b2f88db6963ba
Author: Yi Zhou <yi.zhou@amlogic.com>
Date:   Wed Jun 28 13:00:24 2017 +0800

    PD#147458(146857): hdmitx: support several VESA modes.
    
    1) VESA Support mode lists:
    640x480p60hz,   800x600p60hz,   800x480p60hz,   852x480p60hz,
    854x480p60hz,   1024x600p60hz,  1024x768p60hz,  1152x864p75hz,
    1280x768p60hz,  1280x800p60hz,  1280x960p60hz,  1280x1024p60hz,
    1360x768p60hz,  1366x768p60hz,  1400x1050p60hz, 1440x900p60hz,
    1600x900p60hz,  1600x1200p60hz, 1680x1050p60hz, 1920x1200p60hz,
    2160x1200p90hz, 2560x1600p60hz
    
    (Only on gxl, the next 4 modes wait for the latest VESA Spec, TODO)
    1280x600p60h, 3440x1440p60hz, 2560x1440p60hz, 2560x1080p60hz
    
    2) Add SYSFS vesa_cap node:
    > # cat /sys/class/amhdmitx/amhdmitx/vesa_cap
    640x480p60hz
    800x600p60hz
    1024x768p60hz
    1152x864p75hz
    1280x800p60hz
    1280x960p60hz
    Duplicat cea_cap as disp_cap.
    
    3) Notice that the CharRate of 2560x1600p60hz is above 340Mbps.
    
    Change-Id: I1ba98c8a86180650954a043c9380ef888f0c6cec
    Signed-off-by: yi.zhou@amlogic.com <yi.zhou@amlogic.com>


1 Like

Hi, terry!
Very nice!!!
How to test this ROM? And how to get this source?

Hi, Davemf:
I wiil provide the ROM at next week because i need more time to test it.
Thanks.

1 Like

Hi, Terry!
What about 1280*480 resolution for LQ123K1LG03 LCD Screen?
We use this screen for car dashboard. This is an exclusive development.

1 Like

New VIM1 Android & Ubuntu ROM are uploading now, @Terry & @numbqq will update the details tomorrow.

I released Nougat ROM. You can flash it and have a test.
About source code on github, I’m uploading now,
Thanks.

1 Like

I flashed this ROM. Where is Vesa resolutions?
How to select it? Is it /system/etc/mesondisplay.cfg file or not?

Can you provide below kernel printing log for me ?

[    1.597429@0] EDID Parser:
[    1.598692@0] hdmitx: get dtd0 vic: 3
[    1.601914@0] dump_dtd_info[1900]
[    1.605253@0] pixel_clock 2700
[    1.608295@0] h_active 1440
[    1.611105@0] h_blank 276
[    1.613753@0] v_active 120
[    1.616543@0] v_blank 11
[    1.618971@0] h_sync_offset 38
[    1.622030@0] h_sync 124
[    1.624566@0] v_sync_offset 4
[    1.627576@0] v_sync 3
[    1.629951@0] hdmitx: get PMT vic: 97
[    1.633583@0] hdmitx: edid: find IEEEOUT
[    1.637555@0] hdmitx: update rx hdr info 0 at edid parsing
[    1.643079@0] 00ffffffffffff0061a403000100000001190103807a46780acf74a3574cb023
[    1.643079@0] 09484c2108008180454061409500010101010101010108e80030f2705a80b058
[    1.643079@0] 8a00c48e2100001e023a801871382d40582c4500c48e2100001e000000fc004d
[    1.643079@0] 692054560a20202020202020000000fd003b461f8c3c000a20202020202001de

1 display - 1280*800

EDID Parser:
[ 1.632607@0] PLUGIN_DVI_OUT
[ 1.632650@0] hdmitx: edid: not find IEEEOUT
[ 1.636604@0] hdmitx: edid: HDMI: set default vic
[ 1.641275@0] hdmitx: edid: check sum invalid
[ 1.645674@0] hdmitx: update rx hdr info 0 at edid parsing
[ 1.651200@0] hdmitx: edid: 49 errors between two reading
[ 1.656718@0] hdmitx: edid: check sum invalid
[ 1.661007@0] 00ffffffffffff004c2d02090000000029150103804627780aee91a3544c9926
[ 1.661007@0] 0f5054bdef80714f81c0810081809500a9c0b30001019a20009051201c304088
[ 1.661007@0] 1300a05a0000001c662156aa51001e30468f3300a05a000001ffffffffffffff
[ 1.661007@0] ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
[ 1.661007@0]
[ 1.661007@0]
[ 1.688546@3] Freeing initrd memory: 1468K (ffffffc073d2f000 - ffffffc073e9e000)
[ 1.700909@0] hdmitx: edid: check sum invalid
[ 1.705207@0] 00ffffffffffff004c2d02090000000029150103804627780aee91a3544c9926
[ 1.705207@0] 0f5054bdef80714f9fffffffffffffffffffffffffffffffffffffffffffffff
[ 1.705207@0] ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
[ 1.705207@0] ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
[ 1.705207@0]
[ 1.705207@0]

2 display 1440*900

EDID Parser:
[ 1.597037@0] dump_dtd_info[1900]
[ 1.597045@1] Unpacking initramfs…
[ 1.603534@0] pixel_clock 0
[ 1.606331@0] h_active 0
[ 1.608914@0] h_blank 16
[ 1.611408@0] v_active 768
[ 1.614162@0] v_blank 22
[ 1.616660@0] h_sync_offset 48
[ 1.619834@0] h_sync 32
[ 1.622171@0] v_sync_offset 3
[ 1.625143@0] v_sync 7
[ 1.627528@0] hdmitx: get PMT vic: 16
[ 1.631226@0] hdmitx: edid: find IEEEOUT
[ 1.635130@0] hdmitx: update rx hdr info 0 at edid parsing
[ 1.640708@0] 00ffffffffffff007fff0000000000001413010380301e782aee91a3544c9926
[ 1.640708@0] 0f5054afce0095008180814001010101010101010101023a801871382d40582c
[ 1.640708@0] 4500dfa41100001e000000ff00300a2020202020202020202020000000fc0048
[ 1.640708@0] 444d490a2020202020202020000000fd00384c1e5314000a20202020202001e4
[ 1.640708@0]
[ 1.640708@0]
[ 1.658504@2] Freeing initrd memory: 1468K (ffffffc073d2f000 - ffffffc073e9e000)
[ 1.680577@0] 020323714f1403041213050107169f101511060223097f078301000066030c00
[ 1.680577@0] 100080000000100000163030203700dfa41100001a0000001000841a30302036
[ 1.680577@0] 00dfa41100001a0000001000d01e20b8285540dfa41100001e00000010001c16
[ 1.680577@0] 20582c2500dfa41100009e000000100000384c1e5314000a202020202020009b

I’m at home and it is midnight in China.
I will reply for you tomorrow.
Very sorry.

1 Like