Skip to content

vc4_dpi fixes #4889

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

Merged
merged 2 commits into from
Feb 15, 2022
Merged

vc4_dpi fixes #4889

merged 2 commits into from
Feb 15, 2022

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Feb 14, 2022

Fixes RGB565 mapping, and adds BGR mappings to the overlay.

6by9 added 2 commits February 14, 2022 15:37
The mapping is incorrect for RGB565_1X16 as it should be
DPI_FORMAT_18BIT_666_RGB_1 instead of DPI_FORMAT_18BIT_666_RGB_3.

Signed-off-by: Dave Stevenson <[email protected]>
Adds mappings for bgr666, bgr666-padhi, and bgr888.

Signed-off-by: Dave Stevenson <[email protected]>
@grigorig
Copy link
Contributor

I wonder if it makes sense to add overrides to free up GPIO0/1 for general usage since they are not needed for many displays? With the current structure that would need a lot of duplication though.

@6by9
Copy link
Contributor Author

6by9 commented Feb 15, 2022

I wonder if it makes sense to add overrides to free up GPIO0/1 for general usage since they are not needed for many displays? With the current structure that would need a lot of duplication though.

That can be a later change.
Most DPI panels require at least the pixel clock. The only exception I know of is the VGA666 adapter which uses a resistor ladder as a cheap ADC to convert to VGA (which doesn't need a clock).
It'd need to duplicate all the rgb and bgr overrides to choose an alternate pinctrl setting, which isn't so much duplication.

@grigorig
Copy link
Contributor

I think you are right - the VGA adapters which I obviously had in mind are the exception, not the rule.

@aBUGSworstnightmare-rpi
Copy link
Contributor

@6by9: cd762b4 this overlay is missing the rotation parameter 'rotation = <0>;' (should go in line 16). There is also no override for it.
So, it's either the .dts that's wrong or the readme (as rotate is stated there as available dtparam)

@6by9
Copy link
Contributor Author

6by9 commented Feb 15, 2022

this overlay is missing the rotation parameter 'rotation = <0>;' (should go in line 16). There is also no override for it.
So, it's either the .dts that's wrong or the readme (as rotate is stated there as available dtparam)

No, it's correct.
The override (along with the backlight control ones are in vc4-kms-dpi.dtsi, with the default at https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/vc4-kms-dpi.dtsi#L13

@pelwell
Copy link
Contributor

pelwell commented Feb 15, 2022

So, it's either the .dts that's wrong or the readme (as rotate is stated there as available dtparam)

Actually it's neither - the overlay is correct. The rotate parameter is inherited from the included .dtsi file:

rotate = <&panel>, "rotation:0";

@aBUGSworstnightmare-rpi
Copy link
Contributor

aBUGSworstnightmare-rpi commented Feb 15, 2022

omg! Sorry two things:

  1. missed the include
  2. had a dtparam=rotation=180 instead of dtparam=rotate=180

So, all fine! Sorry fo inconveniences !

this is working fine for a 1366x768pixels display (where I needed the other color mapping)
dtoverlay=vc4-kms-dpi-generic
dtparam=clock-frequency=84750000
dtparam=bgr888=1
dtparam=hactive=1364,hfp=69,hsync=136,hbp=208
dtparam=vactive=768,vfp=3,vsync=10,vbp=17
dtparam=rotate=180

The only 'issue' that I still see is that screen configuration editor doesn't know if this rotation and shows 'DPI-1' correct (and not upside down as when rotating it via arandr).

@pelwell pelwell merged commit eafedb1 into raspberrypi:rpi-5.15.y Feb 15, 2022
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Feb 16, 2022
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
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Feb 16, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants