@_dev-null was on the right track, and correct.
adding drm.debug=0x02
to extraargs gets us
[ 7.661478] [drm:dw_hdmi_phy_init [meson_dw_hdmi]] "400x1280" div10
[ 7.839700] [drm:meson_venc_hdmi_encoder_atomic_check [meson_dw_hdmi]] output_bus_fmt 2025
And if we do a quick lookup in the kernel for what output_bus_fmt 2025
is we get MEDIA_BUS_FMT_YUV8_1X24
and if we look in the kernel docs for dw-hdmi we see that it’s YCbCr 4:4:4 8bit
So, a quick google search lead me to https://gist.github.com/RLovelett/171c374be1ad4f14eb22fe4e271b7eeb this gist, which has us edit the edid with wxedid and making the same changes mentioned:
cp /sys/devices/platform/soc/ff900000.vpu/drm/card0/card0-HDMI-A-1/edid ~/edid.bin
Open the edid.bin file with wxEDID
Find SPF: Supported features -> vsig_format -> replace 0b01 wih 0b00
Find CHD: CEA-861 header -> change the value of YCbCr420 and YCbCr444 to 0
Find VSD: Vendor Specific Data Block -> Change the value of DC_Y444 to 0
Click Option on the panel-> Recalc Checksum
Save patched EDID and exit
Then I copied the edid.bin to /lib/firmware/edid/400x1280.bin
rebuild the initramfs with update-initramfs -u -k <mykernelversion>
add extraargs=drm.edid_firmware=edid/400x1280.bin
in /boot/uEnv.txt
reboot… and it’s working with the correct colors.
I tried to attach the edid bin, but the forums don’t accept them, so, you can find it at https://buildd-arm.kali.org/experiments/400x1280.bin - it’s only 256bytes but just in case, the sha256sum for it is b5214db82c0dec28d42828cb0052264469099a7200148025179939476e35d455
Oh, reading back over my previous post, in case someone isn’t aware of how to make an initramfs hook, the one i created goes in /etc/initramfs-tools/hooks/
and i named it… edid
and it has the following contents:
#!/bin/sh
PREREQS=""
case $1 in
prereqs) echo "${PREREQS}"; exit 0;;
esac
. /usr/share/initramfs-tools/hook-functions
copy_file firmware /lib/firmware/edid/400x1280.bin /usr/lib/firmware/edid/400x1280.bin
Don’t forget that if you want the hook to be used when update-initramfs runs, you need to sudo chmod +x /etc/initramfs-tools/hooks/edid
- and if you want to stop doing so, sudo chmod -x /etc/initramfs-tools/hooks/edid
Now you really should have everything to be able to get display on boot.
Rotating the screen:
If you want it to be 1280x400, instead of the default vertical, despite the thinking that you should pass video=HDMI-A-1=1280x400
you actually pass fbcon
the rotate
option.
-
0
- Normal rotation
-
1
- Rotate clockwise
-
2
- Rotate upside down
-
3
- Rotate counter-clockwise
So for the display as you see it in my picture, where the bottom of the screen is the opposite of the hdmi cable, your extraargs
line would look like extraargs=drm.edid_firmware=edid/400x1280.bin fbcon=rotate:3