agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
510 stars 398 forks source link

Raspberry pi 4, 7 inc touchscreen not working, no display #1192

Closed karaketir16 closed 7 months ago

karaketir16 commented 1 year ago

Description

Raspberry pi 4, 7 inc touchscreen not working. Shows rainbow on boot, and then shows only white screen.

changing dtoverlay=vc4-kms-v3d to dtoverlay=vc4-fkms-v3d in sdcard/boot fixes my problem.

Additional information you deem important (e.g. issue happens only occasionally):

VC4DTBO ?= "vc4-kms-v3d" in rpi-config_git.bb can be made conditional for raspberrypi4.

Additional details (revisions used, host distro, etc.):

mickledore, poky, core-image-sato

abehonest commented 8 months ago

I had the exact same problem and can confirm that this fix works for Freenove touchscreens. Instead of changing dtoverlay from vc4-kms-v3d to vc4-fkms-v3c, go to your build's local.conf file in (your_build's_name)/conf/local.conf and add this line: VC4DTBO = "vc4-fkms-v3d". This overrides the default setting of VC4DTBO in rpi-config_git.bb, which in turn changes dtoverlay at build time.

agherzan commented 8 months ago

Have we reported this upstream? Do we have any context on why this happens? KMS should be working on RPI4.

karaketir16 commented 8 months ago

https://forums.raspberrypi.com/viewtopic.php?p=1507247#p1507337

fkms is adopted as standard on the Pi4.
kms doesn't exist on the Pi4, and requires configuration in significantly different ways.

This is a reply from: 6by9

As forums say: he/she is Raspberry Pi Engineer & Forum Moderator

kraj commented 8 months ago

https://forums.raspberrypi.com/viewtopic.php?p=1507247#p1507337

fkms is adopted as standard on the Pi4.
kms doesn't exist on the Pi4, and requires configuration in significantly different ways.

This is a reply from: 6by9

As forums say: he/she is Raspberry Pi Engineer & Forum Moderator

that was before vc4 driver was complete. What dtb is used in raspbian today ? Can you check and report back ?

matthiasklein commented 8 months ago

I used the following in kirkstone a few days ago:

RPI_EXTRA_CONFIG = '\n\
# Raspberry Pi 7\" display/touch screen\n\
dtoverlay=vc4-kms-dsi-7inch\n\
'
mainmachine commented 8 months ago

There are discussions of the issue OP is facing here, however:

The "legacy firmware" and "FKMS" display modes used in earlier versions of Raspberry Pi OS are no longer supported; KMS (Kernel Mode Setting) is now used instead. Reference

As of the Bookworm rebase of RPIOS (if not just before that...?) the preferred choice is vc4-kms-v3d - that's the open source driver, which is working great on newer kernels (6.1.0-rpi6-rpi-v8 is current on RPIOS). The default should now be vc4-kms-v3d, and in cases like what @karaketir16 is doing, you can change the overlays to suit your specific hardware:

dtoverlay=vc4-kms-dsi-7inch
dtoverlay=rpi-ft5406

There are discussions of the issue OP is facing here and also:

https://forums.raspberrypi.com/viewtopic.php?t=312042 https://forums.raspberrypi.com/viewtopic.php?t=346690

karaketir16 commented 8 months ago

I cannot try it now, because I no longer have a Pi4 to experiment with. I had tried it with the 'kirkstone' branch and the 5.15.34-v7 kernel version.

I am currently checking the kernel version on a Raspberry Pi 2, and I think I used the same version for the Raspberry Pi 4. The only thing I changed was the 'MACHINE' setting

agherzan commented 7 months ago

Closing for now, but feel free to ping me if this needs work on this layer.