I want to add support to linux kernel for custom lcd display with resolution of 480x1280. Evaluation board which came with this display has HDMI connection. I have already tried to add this resolution with xrandr and it works, but now I would like to support it in linux kernel so the splash screen would also be shown.
In the past I have already add support for custom display with resolution of 640x240 which was connected to LVDS port - this was trivial where I have just specified new timing in device tree in lvds-channel@0 node.
What are the proper steeps to add support for custom resolution if this custom display is connected over HDMI?
Is it possible to add custom timings into device tree for HDMI output as well?
Usually HDMI displays send EDID data over the HDMI connection and set the correct resolution automatically. Alternatively, it might work to set your custom resolution via the vidargs environment variable on U-Boot, but AFAIK this only supports valid CEA settings such as 480p, 720p and 1080p. More on this here.
Which resolution is it set to before you use xrandr? Can you also provide any relevant logs so we can find more about your display’s EDID? xrandr --props might be useful in this case.
Usually HDMI displays send EDID data over the HDMI connection and set the correct resolution automatically. Alternatively, it might work to set your custom resolution via the vidargs environment variable on U-Boot, but AFAIK this only supports valid CEA settings such as 480p, 720p and 1080p. More on this here.
Yes I am aware of that; this is EDID data retrieved from display with find /sys/ -name edid -exec cat {} ~;
Which resolution is it set to before you use xrandr?
I have also set vidargs to setenv vidargs 'mxc_hdmi.only_cea=0 video=mxcfb0:dev=hdmi,480x1280M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'
But the system sets it back to 1920x1080.
Can you also provide any relevant logs so we can find more about your display’s EDID? xrandr --props might be useful in this case.
root@apalis-imx6:~# xrandr --props
Screen 0: minimum 240 x 240, current 1920 x 1080, maximum 8192 x 8192
DISP3 BG connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
non-desktop: 0
supported: 0, 1
S:1920x1080p-60 60.00*+
S:1920x1080p-50 50.00
S:1280x720p-50 50.00
S:1280x720p-60 60.00
S:720x480p-60 59.94
V:640x480p-60 60.00
S:640x480p-60 60.00
Since the descriptor is apparently valid, I suggest you to try clearing the vidargs variable completely (e.g. setenv vidargs ''). My idea is that this may force the system to get the correct resolution from the descriptor.
Yes, clearing vidargs should make the device tree defaults rule, but since I don’t think there’s specific timings for HDMI set in the device tree, I figured Linux would perhaps get the right info from the descriptor, but sadly that’s not the case.
I’ll take a deeper look at this and get back to you.
Just want to let you know we’re looking into this. We’ve seen other issues with EDIDs and other displays, particularly with non-standard resolutions. We’ll let you know about any solutions.
Sure, we’re tackling this and I’ll make sure to keep you up-to-date on this.
I suggest you use the xrandr workaround for now. For the splash screen, you can try changing the splash screen for a rotated one. We have an article regarding this subject here.