CVT LCD display on Dragonboard

So currently working with this little LCD display I got

and when I tried it with my Pi at first it didn’t work until I followed the directions on and set the /boot/config.txt to

hdmi_group=2
hdmi_mode=87
hdmi_cvt 480 800 60 6 0 0 0


I am looking how to run a CVT display on the dragonboard, I “tried” using fbset and cvt but both seem to show no effect. I am asking for advise where to look next and if this is something possible without having to rebuild the kernel.

note: running latest version of debian


Also here is the boot error I think is preventing it

[ 9.792392] iommu: Adding device 1d00000.video-codec to group 0
[ OK ] Reached target System Initialization.[ 9.805012] qcom-venus 1d00000.video-codec: Direct firmware load for qcom/venus-1.8/venus.mdt failed with error -2

[ 9.823286] ------------[ cut here ]------------
[ 9.827307] WARNING: CPU: 0 PID: 1557 at …/arch/arm64/mm/dma-mapping.c:843 arch_teardown_dma_ops+0x28/0x48
[ 9.835266] Modules linked in: qcom_camss(+) videobuf2_dma_sg venus_core(+) videobuf2_memops mdt_loader v4l2_mem2mem videobuf2_v4l2 videobuf2_core msm_rng rng_core videodev media ip_tables x_tables i2c_qcom_cci
[ 9.864876]
[ 9.868837] CPU: 0 PID: 1557 Comm: systemd-udevd Not tainted 4.9.56-linaro-lt-qcom #1
[ 9.876797] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
[ 9.884737] task: ffff800035b3e800 task.stack: ffff8000352c4000
[ 9.892676] PC is at arch_teardown_dma_ops+0x28/0x48
[ 9.896682] LR is at arch_teardown_dma_ops+0x14/0x48
[ 9.900613] pc : [] lr : [] pstate: 20000145
[ 9.909433] sp : ffff8000352c7ad0
[ 9.913367] x29: ffff8000352c7ad0 x28: 00000000024000c0
[ 9.921308] x27: 0000000000000124 x26: ffff8000363add88
[ 9.929226] x25: 0000000000000001 x24: ffff8000363ce000
[ 9.937082] x23: 0000000000000034 x22: 00000000fffffffe
[ 9.944890] x21: ffff000000b40028 x20: ffff000009111000
[ 9.952660] x19: ffff8000367bf810 x18: 0000000000000010
[ 9.960417] x17: 0000ffff8ed94c10 x16: 0000aaaad777bbc8
[ 9.968197] x15: 0000000000000006 x14: 000000000000000a
[ 9.975946] x13: ffff000008e0f000 x12: dead000000000100
[ 9.983646] x11: ffff7e0000000000 x10: ffff800035baf400
[ 9.991296] x9 : 0000000000000000 x8 : ffff800037f2fae0
[ 9.998896] x7 : ffff800037f2fb08 x6 : 0000000000895440
[ 10.006460] x5 : ffff800035b3e800 x4 : ffff800035b3e880
[ 10.013991] x3 : 0000000000000002 x2 : ffff8000363ce538
[ 10.021480] x1 : 0000000000000000 x0 : ffff8000363ce5a8
[ 10.028903]
[ 10.032256] —[ end trace 0a47445580c59805 ]—
[ 10.035648] Call trace:
[ 10.039232] Exception stack(0xffff8000352c7900 to 0xffff8000352c7a30)
[ 10.045876] 7900: ffff8000367bf810 0001000000000000 ffff8000352c7ad0 ffff000008096810
[ 10.052552] 7920: ffff8000352c7940 ffff0000080e2364 ffff800009f7a700 ffff800037f2fa80
[ 10.059345] 7940: ffff8000352c7970 ffff0000080e3dc4 ffff800009f7a700 0000000000000000
[ 10.067204] 7960: ffff800009f7ae34 00000000000001c0 ffff8000352c79d0 ffff0000080e3f3c
[ 10.075068] 7980: 0000000000000039 ffff800036578200 ffff000008f57a78 ffff0000090e2748
[ 10.082883] 79a0: ffff8000363ce5a8 0000000000000000 ffff8000363ce538 0000000000000002
[ 10.090715] 79c0: ffff800035b3e880 ffff800035b3e800 0000000000895440 ffff800037f2fb08
[ 10.098528] 79e0: ffff800037f2fae0 0000000000000000 ffff800035baf400 ffff7e0000000000
[ 10.106329] 7a00: dead000000000100 ffff000008e0f000 000000000000000a 0000000000000006
[ 10.114168] 7a20: 0000aaaad777bbc8 0000ffff8ed94c10
[ 10.118616] [] arch_teardown_dma_ops+0x28/0x48
[ 10.126656] [] of_dma_deconfigure+0xc/0x18
[ 10.133476] [] dma_deconfigure+0xc/0x18
[ 10.136944] [] driver_probe_device+0x36c/0x440
[ 10.144656] [] __driver_attach+0x114/0x118
[ 10.151585] [] bus_for_each_dev+0x64/0xa0
[ 10.158623] [] driver_attach+0x20/0x28
[ 10.162250] [] bus_add_driver+0x1e8/0x2a0
[ 10.170211] [] driver_register+0x60/0xf8
[ 10.177626] [] __platform_driver_register+0x40/0x48
[ 10.185228] [] qcom_venus_driver_init+0x14/0x1000 [venus_core]
[ 10.193026] [] do_one_initcall+0x38/0x128
[ 10.200993] [] do_init_module+0x5c/0x1b8
[ 10.209118] [] load_module+0x1c60/0x2338
[ 10.217437] [] SyS_finit_module+0x100/0x110
[ 10.225859] [] __sys_trace_return+0x0/0x4

The error comes from the video encoder (and is a known bug for 17.09). It will not affect the display.

Can you run the following command on the DB410C and share the output:

xxd /sys/devices/platform/soc/1a00000.mdss/drm/card0/card0-HDMI-A-1/edid
linaro@linaro-alip:~$ xxd /sys/devices/platform/soc/1a00000.mdss/drm/card0/card0-HDMI-A-1/edid
00000000: 00ff ffff ffff ff00 418e 1122 5b01 0000  ........A.."[...
00000010: 2213 0103 8030 1b78 2ae6 15a6 5549 9927  "....0.x*...UI.'
00000020: 1350 54bf ef00 714f 8140 8180 9500 950f  .PT...qO.@......
00000030: b300 d1c0 0101 023a 8018 7138 2d40 582c  .......:..q8-@X,
00000040: 4500 de0d 1100 001e 0000 00fd 0038 4c1e  E............8L.
00000050: 5311 000a 2020 2020 2020 0000 00fc 0050  S...      .....P
00000060: 5832 3231 304d 570a 2020 2020 0000 00ff  X2210MW.    ....
00000070: 0050 5735 3939 384a 4130 3033 3437 015d  .PW5998JA00347.]
00000080: 0203 1ff1 4c01 0203 0405 1011 1213 141e  ....L...........
00000090: 1f23 0907 0183 0100 0065 030c 0010 008c  .#.......e......
000000a0: 0ad0 8a20 e02d 1010 3e96 00de 0d11 0000  ... .-..>.......
000000b0: 1801 1d00 7251 d01e 206e 2855 00de 0d11  ....rQ.. n(U....
000000c0: 0000 1e8c 0ad0 9020 4031 200c 4055 00de  ....... @1 .@U..
000000d0: 0d11 0000 1800 0000 0000 0000 0000 0000  ................
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000f0: 0000 0000 0000 0000 0000 0000 0000 0048  ...............H

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

00000000: 00ff ffff ffff ff00 0481 0400 0100 0000  ................
00000010: 0111 0103 800f 0a00 0a00 0000 0000 0000  ................
00000020: 0000 0000 0000 0101 0101 0101 0101 0101  ................
00000030: 0101 0101 0101 800c e080 1020 2d30 2830  ........... -0(0
00000040: d300 6c44 0000 0018 0000 0010 0000 0000  ..lD............
00000050: 0000 0000 0000 0000 0000 0000 0010 0000  ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0010  ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0017  ................

Hi Daniel:

Oops, I gave you the EDID from the monitor I have that works. I meant to give you the EDID from a monitor that Spencer is using (I have two of them at my desk).

When I connect and boot with the 4 inch monitor connected my edid file is empty (zero bytes).

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

@ljking: Does the zero bytes come from ls -l <fname> or something like wc -b <fname> (ls does not give accurate file size for files in sysfs). Also does the contents of the edid change during a hotplug?

Hi Daniel

I started out running xxd and it gave me nothing, so then I ran ls -al which also said zero. The other files in the same directory, like modes, have contents that show up with xxd, and ls -al shows a file size of 4096.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

Odd that you should each get a different EDID.

Anyhow decoding @sjfricke’s EDID we get:

Extracted contents:
header:          00 ff ff ff ff ff ff 00
serial number:   04 81 04 00 01 00 00 00 01 11
version:         01 03
basic params:    80 0f 0a 00 0a
chroma info:     00 00 00 00 00 00 00 00 00 00
established:     00 00 00
standard:        01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
descriptor 1:    80 0c e0 80 10 20 2d 30 28 30 d3 00 6c 44 00 00 00 18
descriptor 2:    00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
descriptor 3:    00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
descriptor 4:    00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
extensions:      00
checksum:        17

Manufacturer: ADA Model 4 Serial Number 1
Made week 1 of 2007
EDID version: 1.3
Digital display
Maximum image size: 15 cm x 10 cm
Gamma: 1.00
Supported color formats: RGB 4:4:4, YCrCb 4:4:4
First detailed timing is preferred timing
Established timings supported:
Standard timings supported:
Detailed mode: Clock 32.000 MHz, 108 mm x 68 mm
                480  520  568  608 hborder 0
                800  813  816  845 vborder 0
               -hsync -vsync 
Dummy block
Dummy block
Dummy block
Checksum: 0x17 (valid)
EDID block does NOT conform to EDID 1.3!
        Missing name descriptor
        Missing monitor ranges

I must admit I’m not sure if this is valid or not. HDMI does require EDID 1.3… but your display isn’t actually a HDMI device, its a DVI-D device with a HDMI connector.

Anyhow I’m able to force my DB410C to adopt this EDID (copy the binary to /lib/firmware/edid/480x800.bin, echo edid/480x800.bin > /sys/module/drm_kms_helper/parameters/edid_firmware and then hotpug and sent Crtl-Alt-F4 to make sure we’re showing a console). When I do this the files in sysfs look OK but I don’t get any image on my monitor…

To go further I’ll have to enable some debug features in DRM…

Hi Spencer @sjfricke

I also purchased a slightly different version of the WaveShare 5 inch display. This one has the connector on the side. The LCD works perfectly, however I haven’t manged to get the touch screen running. I suspect it is just a matter of enabling the right USB driver, but I hadn’t bothered, I just wanted the display.

I have recently moved over to using the 7 inch display. Everything works on it right out of the box.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

… and with echo 4 > /sys/module/drm/parameters/debug we get:

[ 7135.394905] [drm:drm_mode_debug_printmodeline] Modeline 40:"480x800" 62 32000 480 520 568 608 800 813 816 845 0x48 0xa
[ 7135.394932] [drm:drm_mode_prune_invalid] Not using 480x800 mode: VIRTUAL_Y
[ 7135.394971] [drm:drm_setup_crtcs] 
[ 7135.395002] [drm:drm_setup_crtcs] connector 37 enabled? yes
[ 7135.395027] [drm:drm_setup_crtcs] looking for cmdline mode on connector 37
[ 7135.395051] [drm:drm_setup_crtcs] looking for preferred mode on connector 37 0
[ 7135.395071] [drm:drm_setup_crtcs] found mode none
[ 7135.395094] [drm:drm_setup_crtcs] picking CRTCs for 65535x65535 config

Note the Not using 480x800 mode: VIRTUAL_Y which means the display stack has decided it cannot support the video mode… leaving it with nothing suitable. VIRTUAL_Y means the height of the display is too large but I haven’t yet managed to trace through the code to work out what the limit should be.

@sjfricke

It’s possible my last experiement was a little bogus… I had booted my DB410C with nothing connected which means fb0 adopts a default value (1024x768). When I boot with a monitor attached fb0 adopts 1920x1080, once I have done this I can force your EDID and the DB410C no longer rejects the 480x800 video mode.

So a couple of experiments:

  1. Can you confirm that the 4" display was connected to the DB410C before the DB410C was powered on (and that the display is not powered by the DB410C itselt). If not, make sure that the display is powered from something else, then power cycle the DB410C.

  2. Can you boot the DB410C with it connected to a high res display device (HDMI TV, big monitor). After it has booted disconnect the big monitor and attach the small display (and press Ctrl-Alt-F4). Can you see anything?

Hey, thanks again both helping.

  1. The setup I have is both the display and board are powered separately and also I made sure the HDMI was connected before as I read how the kernel looks for the best display to connect

  2. I tried the TV first approach and the screen is still blank, and the tty terminal doesn’t appear either. I don’t think this is a desktop UI issue as I get just a black screen.

I did notice that cat /sys/class/graphics/fb0/modes returns U:1920x1080p-0 when I don’t have anything plugged in or the big tv but when I boot with 4inch it displays U:480x800p-0

Is there anything checking how the Pi is running it? I am currently trying to reverse engineer how the Pi got it too work with these commands

All the fields in the Pi config appear to correspond to kernel options to force a video mode. The best documentation I know of here is:
https://wiki.archlinux.org/index.php/kernel_mode_setting#Forcing_modes_and_EDID

To change the kernel command line you need to apt install abootimg which allows you to unpack and repack the boot partition:

abootimg -x /dev/disk/by-partlabel/boot
vi bootimg.cfg
abootimg -u  /dev/disk/by-partlabel/boot -f bootimg.cfg
1 Like

@danielt

I still want to figure out this monitor for my project, but been busy atm. thanks for the abootimg tip, I see you guys just added that to the Documentation repo a month ago, didn’t know that was a thing

I haven’t been keeping up with all the pings I get from the docs repo. So, until now, I didn’t know that tip had been absorbed into the docs either!