-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add DPI mode 3 (rgb565-padhi) support to vc4-kms-dpi-generic #4882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Apparently broken by commit 3c03397. Introduce new names to allow for proper addressing of overrides. Signed-off-by: Grigori Goronzy <[email protected]>
This mode is used by some DPI based display adapters, such as the 'VGA565' and 'VGA Zero' low-cost VGA adapters for the Raspberry Pi. Signed-off-by: Grigori Goronzy <[email protected]>
Adding rgb565-padhi looks fine. I want to check out the other patch. I suspect it's an issue of application order - the overrides update <&panel> or <&dpi_node>, and then fragments 0 & 1 come along and overwrite them. In which case your patch is correct to update fragments 0 & 1 instead of the base nodes. |
Yes, the problem is one of application order. Overlay application is split into three phases - preparing the overlay fragments, applying intra-overlay fragments to other fragments, and applying the remaining fragments to the base dtb. In the case of runtime overlay application, the third phase is performed by the kernel. Without the fixing patch provided here, the parameters are applied to fragment 100's panel node in phase 1, then they are overwritten by the defaults from fragment 0 in phase 2. This fix is one solution - applying the overrides to fragment 0 (and 1 - the same problem applies). The other would be to replace fragments 0 and 1 with code that directly patches the panel and dpi_node nodes:
That is a large and unnecessary change, but it does reduce the amount of overlay magic needed, relying instead on the dtc compiler to combine chunks. I did notice an asymmetry between the panel and dpi halves of the overlay. Fragment 0 targets the panel node in fragment 100, while fragment 1 targets the dpi node in the base dtb, which is also targeted by dpi_node in fragment 101. There is no overlay, and therefore no problem, but perhaps fragment 1 was intended to target dpi_node? |
Thanks, I'm starting to understand what's going on. Maybe further cleanups (for better consistency) should be tackled in a separate PR though? I'm mostly a user and just want these features to work. 😅 |
I wasn't suggesting you make any changes to your PR. We'll take it as is, since it solves the immediate problem. |
kernel: overlays: rpi-poe(-plus): Fix parameters See: raspberrypi/linux#4877 kernel: i2c: bcm2835: Make clock-stretch timeout configurable See: raspberrypi/linux#4855 kernel: Add DPI mode 3 (rgb565-padhi) support to vc4-kms-dpi-generic See: raspberrypi/linux#4882 kernel: media: i2c: imx219: Scale the pixel clock rate for the 640x480 mode See: raspberrypi/linux#4880 kernel: vc4_dpi fixes See: raspberrypi/linux#4889 kernel: Change vc4 DSI to being a bridge See: raspberrypi/linux#4878 kernel: sc16is7xx: Fix for incorrect data being transmitted See: raspberrypi/linux#4885
kernel: overlays: rpi-poe(-plus): Fix parameters See: raspberrypi/linux#4877 kernel: i2c: bcm2835: Make clock-stretch timeout configurable See: raspberrypi/linux#4855 kernel: Add DPI mode 3 (rgb565-padhi) support to vc4-kms-dpi-generic See: raspberrypi/linux#4882 kernel: media: i2c: imx219: Scale the pixel clock rate for the 640x480 mode See: raspberrypi/linux#4880 kernel: vc4_dpi fixes See: raspberrypi/linux#4889 kernel: Change vc4 DSI to being a bridge See: raspberrypi/linux#4878 kernel: sc16is7xx: Fix for incorrect data being transmitted See: raspberrypi/linux#4885
Adds support for DPI mode 3 (a different pin mapping) to the vc4-kms-dpi-generic overlay. This mode is used by some cheap DPI VGA adapters in particular, such as 'VGA565'. It can be used with these like this:
I noticed that the overrides weren't working, neither for bus format nor for the pin mapping overrides. I believe a recent refactoring broke this. I included a workaround, but I am not sure how correct it is. My Device Tree knowledge is very limited.