PINE64
1024x600 resolution support - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88)
+--- Thread: 1024x600 resolution support (/showthread.php?tid=13392)



1024x600 resolution support - monte - 03-14-2021

I have Rock64 that I want to use with this HDMI display by Waveshare: https://www.waveshare.com/wiki/7inch_HDMI_LCD_(H)_(with_case). It has native resolution of 1024x600 and that is the main problem.
I tried latest Armbian and latest Ubuntu 18.04 Bionic by ayufan. In first case it runs only 1080p and I can't set any other resolution, and haven't found any help on their forum, with the second image I can chose between multiple standard resolutions, but there is no native one and the image looks bad (obviously).
I tried to set native resolution with xrandr:
Code:
xrandr --newmode "1024x600" 49.00 1024 1029 1042 1312 600 602 605 622 -hsync +vsync
xrandr --addmode HDMI-1 "1024x600"
xrandr --output HDMI-1 --mode "1024x600"
When I do so screen turns black and there is message in dmesg:
Code:
[  195.715484] rockchip-vop ff370000.vop: [drm:vop_crtc_enable] Update mode to 1024x600p0, type: 11
[  195.717392] dwhdmi-rockchip ff3c0000.hdmi: Rate 24000000 missing; compute N dynamically

I thought that values for video mode might be wrong, so I decoded edid from the display and took the settings I've found there. But that didn't change anything.

So I understand, that rockchip's driver doesn't have needed clock, but why can't it calculate it dynamically, if it says, it does?

I also tried recompiling u-boot for armbian with proper mode, as I read it might help, but it also did nothing and I don't know where to look now. If it's a driver in a kernel that needs patching, I would like to know which exactly, because trying to find needed information not having any prior knowledge of rockchip devices is hard.

I will be happy to get any help with this or at least if someone tells me that it can't be done, if it so for sure.


RE: 1024x600 resolution support - monte - 03-14-2021

So I have found some kind of a solution. I looked at all available video modes and the clock settings they have. This way I knew what clocks are supported in the kernel. Then I chose the one that was close to desired value and constructed the modeline with cvt.
To anyone who may look for a solution, as I did, here are my final settings:
Code:
xrandr --newmode 1024x600 49.50 1024 1029 1042 1312 600 602 605 622 -hsync +vsync
xrandr --addmode HDMI-1 1024x600
xrandr --newmode 1024x576 49.50 1024 1072 1168 1312 576 579 584 600 -hsync +vsync
xrandr --addmode HDMI-1 1024x576
This only works in ayufan's build, Armbians with new mainline kernel aren't good in terms of graphics support. The reason I've made two resolutions is that though native resolution is stated to be 1024x600 and it seems to be correct, the image is not square with this resolution, it looks squashed a little. 1024x576 seems to be correct geometrically, but is little blurrier (I wonder if this panel has not square pixels), so you can try and choose the one you like more. Anyway both of this resolutions give much better image then the standard and the screen works as it supposed.
I would like to have better solution, because now if you disconnect/reconnect the display it sets random resolution and you have to set it again manually. Also console resolution is wrong still, but it may be fixed with fbset, but I didn't test it.