aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

DPI displays - dpi24 overlay fails on RPi4 (SOLVED)

Mon Jul 01, 2019 9:42 am

As already reported here https://www.raspberrypi.org/forums/view ... 0#p1488469 and following the request from 6by9 here https://www.raspberrypi.org/forums/view ... 5#p1488693 I'ld like to raise this topic in a new thread.

Short intro:
dpi24overlay 'dtoverlay=dpi24' entry in config.txt' does not initialize GPIO to ALT2 mode (DPI interface) on Raspberry Pi4.

A temporay workaround to get DPI displays (24bit interface) to work is using

Code: Select all

# configure DPI interface, no-pull on all DPI pins
gpio=0-27=a2,np

instead of the dpi24 overlay. Neverthless, something in the timing seems to be changed (or GPIO's don't work as expected) as the display is not working correctly.
IMG_0987_small.jpg
Adafruit 5in DPI display shows incorrect image on RPi4 (whilst settings are working on 0/3/3+)
IMG_0987_small.jpg (84.52 KiB) Viewed 4593 times
Here's the original image: https://drive.google.com/file/d/1hBS80x ... nDjJe/view

Strange thing that happens with DPI display is where the driver places it. Both display were overlapping! Sure, one can use the screen configuration tool to arrange them, but why is it working correctly in case of DSI and not for DPI?

This is what it looks like:
https://drive.google.com/file/d/1uzcuKw ... G65Yu/view
https://drive.google.com/file/d/17k4kbG ... y8-eY/view

Also noted during boot that DSI or DPI always will show console/boot screen up to the point where the new driver kicks in. Might only be a minor problem but can cause some issues, so would like to understand why this is happening.

5in display timing is the one posted here on DPI page (scroll down to the bottom) https://www.raspberrypi.org/documentati ... /README.md

So, looking forward to see your comments/solution to this issue.
Last edited by aBUGSworstnightmare on Wed Jul 31, 2019 3:22 pm, edited 1 time in total.

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Thu Jul 04, 2019 2:07 pm

need to bring this back to your attention. Any news why to overlay does nothing and reason(s) why display is not working correctly on Pi4 (but does/did on Rpi Stretch)?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7928
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 09, 2019 3:41 pm

Sorry, I don't follow the Troubleshooting forum so I've only just seen this.
aBUGSworstnightmare wrote:
Mon Jul 01, 2019 9:42 am
As already reported here https://www.raspberrypi.org/forums/view ... 0#p1488469 and following the request from 6by9 here https://www.raspberrypi.org/forums/view ... 5#p1488693 I'ld like to raise this topic in a new thread.

Short intro:
dpi24overlay 'dtoverlay=dpi24' entry in config.txt' does not initialize GPIO to ALT2 mode (DPI interface) on Raspberry Pi4.

A temporay workaround to get DPI displays (24bit interface) to work is using

Code: Select all

# configure DPI interface, no-pull on all DPI pins
gpio=0-27=a2,np

instead of the dpi24 overlay.
So that'll be a kernel pinmuxing issue where something else has claimed one or more of the GPIOs, therefore failing to pinmux for dpi24.
Looking back at your config.txt

Code: Select all

dtparam=audio=on
would be a very good candidate
Either that or using GPIO hogs to try and pinmux GPIOs without a backing driver has changed.

Probably best to raise a query in the Device Tree forum, or on https://github.com/raspberrypi/linux/issues as Phil is the expert there.
A quick test implies that dpi18 isn't working on Pi3 either, so it may well be a change with the 4.19 kernel. (My Pi3 is actually running 5.1 at present, but that should be irrelevant).
aBUGSworstnightmare wrote:Neverthless, something in the timing seems to be changed (or GPIO's don't work as expected) as the display is not working correctly.
IMG_0987_small.jpg
Here's the original image: https://drive.google.com/file/d/1hBS80x ... nDjJe/view

Strange thing that happens with DPI display is where the driver places it. Both display were overlapping! Sure, one can use the screen configuration tool to arrange them, but why is it working correctly in case of DSI and not for DPI?
Yes, the default for DRM is to overlap the screens.
Define "working correctly". I can't tell from your images what your issue is.
aBUGSworstnightmare wrote:This is what it looks like:
https://drive.google.com/file/d/1uzcuKw ... G65Yu/view
https://drive.google.com/file/d/17k4kbG ... y8-eY/view

Also noted during boot that DSI or DPI always will show console/boot screen up to the point where the new driver kicks in. Might only be a minor problem but can cause some issues, so would like to understand why this is happening.
Initial boot the firmware puts up the rainbow screens on active displays.
A single simplefb instance is then created for the primary display, and the console will be displayed on that.
When FKMS kicks in, the simplefb driver is evicted and replaced by the displays that DRM wishes to put up.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7928
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 8:47 am

(Moved to Device Tree, so hopefully Phil will comment)
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2589
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 10:11 am

The problem with the dpi24 overlays is that it hangs its pinmux changes to the framebuffer "fb" node. Pi 4 relies on the vc4-fkms-v3d overlay being applied which disables the old framebuffer and any associated pinmux settings.

A fix for this is for the dpi24 overlay to hedge its bets and attach to both the "fb" node and the "vc4" node, one of which should be enabled. You can download an updated overlay to try from here: https://drive.google.com/file/d/14vR6iq ... sp=sharing

Install the update with:

Code: Select all

 sudo cp dpi24.dtbo /boot/overlays
Then remove the "gpio=" workaround (if you added it) and reboot. All being well, and provided "dtparam=audio=off" and "enable_uart=off", your display should work.

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 10:53 am

o.k. restarted testing today on this topic

I've used a Manga screen 2 HDMI monitor (EDID.dat file attached to the post) and a Adafruit Kippah 5in WVGA display (connected to DPI).

I've started with below config.txt on a RPi3

Code: Select all

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

disable_overscan=1

hdmi_edid_file=1

gpu_mem=208

# --------------------
# Adafruit 5in Kippah on DPI interface
# --------------------
dtoverlay=dpi24
enable_dpi_lcd=1
#gpio=0-27=a2,np
#display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=0x6f005
dpi_timings=800 0 40 48 88 480 0 13 3 32 0 0 0 60 0 32000000 6
# --------------------

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
max_framebuffers=2
Findings: DPI interface is not initialized by the 'dpi24' overlay
2019-07-10-015420_1920x1080_scrot_small.png
DPI24 overlay fails to initialize DPI interface
2019-07-10-015420_1920x1080_scrot_small.png (14.01 KiB) Viewed 4407 times
'dtparam=audio=on' has no impact on this
2019-07-10-015510_1920x1080_scrot_small.png
removing 'dtparam=audio=on' has no impact --> DPI24 overlay still fails
2019-07-10-015510_1920x1080_scrot_small.png (13.47 KiB) Viewed 4407 times
'gpio=0-27=a2,np' configures GPIO correctly to ALT2 mode
2019-07-10-015908_1920x1080_scrot_small.png
'gpio=0-27=a2,np' configures correctly to ALT2 mode. Note that pull-ups need to be disabled!
2019-07-10-015908_1920x1080_scrot_small.png (15.32 KiB) Viewed 4407 times
DPI24 overlay on the RPi4 fails as well!

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2589
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 10:58 am

And with the updated overlay?

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 11:30 am

PhilE wrote:And with the updated overlay?
Which updated overlay? I've downloaded Raspbian 2019-07-10 today and tested with it. I did not make any update/upgrade of the OS.

So, please let me know when the overlay was updated.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2589
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 11:36 am

Read my post above.

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 11:43 am

With the DPI interface configured I continued with the RPi4 testing but - as reported alreday on 1st July the displayed image is incorrect (look at the yellow dots in the background image).
IMG_1011.JPG
incorrect background image on the DPI display --> some timing is incorrect
IMG_1011.JPG (74.36 KiB) Viewed 4379 times
IMG_1012.JPG
dual display on the RPi4
IMG_1012.JPG (86.24 KiB) Viewed 4379 times
Now moving the uSD card to an RPI3 with the new driver enable ('dtoverlay=vc4-fkms-v3d') gives a correct image on the HDMI display but DPI is distored.
IMG_1006.JPG
RPI3 with new driver enabled
IMG_1006.JPG (94.21 KiB) Viewed 4379 times
Using screen configuration tool lets both display fail
see image in next post!
Last edited by aBUGSworstnightmare on Tue Jul 16, 2019 11:45 am, edited 1 time in total.

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 11:44 am

PhilE wrote:
Tue Jul 16, 2019 11:36 am
Read my post above.
Sorry PhilE, but when I made my post yours wasn't there! althought the timestamp says something different!

I will try it, but please let me know when the overlay was updated!

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 11:45 am

IMG_1007.JPG
trying dual display on a RPi3 fails
IMG_1007.JPG (95.84 KiB) Viewed 4376 times

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2589
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 11:58 am

It's a test overlay, uploaded to Google Drive for download shortly before my post. If it solves the problem it will become part of the standard releases.

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 16, 2019 12:03 pm

Will have to test later. Will answer here.

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

New dpi24.dtbo - Raspberry Zero

Thu Jul 18, 2019 11:21 am

works fine on Raspberry Zero
IMG_1015.jpg
dpi24.dtbo - test on Rpi Zero WH
IMG_1015.jpg (108.47 KiB) Viewed 4200 times

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

New dpi24.dtbo - Raspberry 3

Thu Jul 18, 2019 11:23 am

works fine on Raspberry Pi3
IMG_1019.jpg
Desktop background image is displayed correctly
IMG_1019.jpg (82.36 KiB) Viewed 4199 times
IMG_1018.jpg
dpi24.dtbo - test on Raspberry 3
IMG_1018.jpg (98.02 KiB) Viewed 4199 times

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

New dpi24.dtbo - Raspberry Pi4

Thu Jul 18, 2019 11:26 am

Tested on Raspberry Pi4 as well. Works, but image is diplayed incorrectly (yellow dots in the background image). Same uSD card/settings as used on the Rpi3/Zero.
IMG_1016.jpg
working on a RPi4, but not correctly (different GPIO timing on Rpi4 compared to Rpi3?)
IMG_1016.jpg (125.27 KiB) Viewed 4197 times
IMG_1017.jpg
incorrect . look at yellow dots in the Rpi4 desktop background and compare to RPi3 and Zero (which display the image correct)
IMG_1017.jpg (85.48 KiB) Viewed 4197 times

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2589
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: DPI displays - dpi24 overlay fails on RPi4

Thu Jul 18, 2019 1:00 pm

That's a different problem. Can you open an issue in the Firmware repo?

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Thu Jul 18, 2019 1:43 pm

PhilE wrote:
Thu Jul 18, 2019 1:00 pm
That's a different problem. Can you open an issue in the Firmware repo?
Done

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25035
Joined: Sat Jul 30, 2011 7:41 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 30, 2019 10:12 am

Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25035
Joined: Sat Jul 30, 2011 7:41 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 30, 2019 10:15 am

Just to repeat what I have written in the repo, not been able to reproduce this.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 30, 2019 10:37 am

Hi jamesh

can you let me know which PI4 (1/2/4GB) you've tested this?
Saw this issue on a 1GB and on a 2GB RAM version (don't have a 4GB Pi4).

Can you share your config.txt and let me know which firmware you've tested with? This post happend before recent changes to the firmware (for hdmi_timings). Let me know ans I will re-test.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2589
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 30, 2019 10:41 am

Have you tried displaying a test card - grey ramps, colour bars etc? That corruption looks like it's image content-specific.

aBUGSworstnightmare
Posts: 1627
Joined: Tue Jun 30, 2015 1:35 pm

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 30, 2019 11:42 am

PhilE wrote:
Tue Jul 30, 2019 10:41 am
Have you tried displaying a test card - grey ramps, colour bars etc? That corruption looks like it's image content-specific.
Once I know the HW/SW level which jamesh tested with I can do a test as well.
Can be one of the RGB lines which is not working correctly too

I have lot's of test images for TFTs ...
640x480 G003.PNG
640x480 G003.PNG (1.08 KiB) Viewed 3796 times
640x480 G005.PNG
640x480 G005.PNG (1.58 KiB) Viewed 3796 times
... just to name a few

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2589
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: DPI displays - dpi24 overlay fails on RPi4

Tue Jul 30, 2019 11:47 am

Try those images on the dpi24 display using the Pi4 configuration you had a few posts back.

Return to “Device Tree”