Skip to content
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

drm/vc4: Allow option to transpose the output on the writeback connector #6312

Merged
merged 9 commits into from
Nov 7, 2024

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Aug 14, 2024

The hardware behind the writeback connector can do a transpose as it writes the image out.
DRM offers no mechanism to select that, but as a simple test we can note when the width/height of the buffer are swapped wrt the mode, and enable the transpose. The atomic_check obviously has to be updated too to permit that combination.

Transposing a square output buffer is left as future problem to solve.

@6by9
Copy link
Contributor Author

6by9 commented Oct 22, 2024

@jc-kynesim PR updated. It also includes all the other pending DRM tweaks that are kicking around for you/DT.

@6by9 6by9 marked this pull request as ready for review November 6, 2024 19:06
The logic for dropping a plane less than zero didn't account for the
possibility that a plane could be being upscaled with a src_rect with
width/height < 1 pixel, but not 0 subpixels.

Check for not 0 subpixels, not < 1, in both vc4 and vc6 paths.

Fixes: dac6168 ("drm/vc4: Drop planes that have 0 destination size")
Fixes: f73b18e ("drm/vc4: Drop planes that are completely off-screen")
Signed-off-by: Dave Stevenson <[email protected]>
The documentation says that the TPZ filter can not upscale,
and requesting a scaling factor > 1:1 will output the original
image in the top left, and repeat the right/bottom most pixels
thereafter.
That fits perfectly with upscaling a 1x1 image which is done
a fair amount by some compositors to give solid colour, and it
saves a large amount of LBM (TPZ is based on src size, whilst
PPF is based on dest size).

Select TPZ filter for images with source rectangle <=1.

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

6by9 commented Nov 6, 2024

JC has said he's happy with this, so drop the draft tag.

The checkpatch complaint on spaces before tabs is deliberate as it matches all the other comments in that block.

Branch rebased.

…ctors

The non-desktop property "Indicates the output should be ignored for
purposes of displaying a standard desktop environment or console."

That sounds like it should be true for all writeback and virtual
connectors as you shouldn't render a desktop to them, so set it
by default.

Signed-off-by: Dave Stevenson <[email protected]>
The limit of 32 planes per DRM device is dictated by the use
of planes_mask returning a u32.

Change to a u64 such that 64 planes can be supported by a device.

Signed-off-by: Dave Stevenson <[email protected]>
The HVS can accept an arbitrary number of planes, provided
that the overall pixel read load is within limits, and
the display list can fit into the dlist memory.

Now that DRM will support 64 planes per device, increase
the number of overlay planes from 16 to 48 so that the
dlist complexity can be increased (eg 4x4 video wall on
each of 3 displays).

Signed-off-by: Dave Stevenson <[email protected]>
Instead of having 48 generic overlay planes, assign 32 to the
writeback connector so that there is no ambiguity in wlroots
when trying to find a plane for composition using the writeback
connector vs display.

Signed-off-by: Dave Stevenson <[email protected]>
Some hardware will implement transpose as a rotation operation,
which when combined with X and Y reflect can result in a rotation,
but is a discrete operation in its own right.

Add an option for transpose only.

Signed-off-by: Dave Stevenson <[email protected]>
Some connectors, particularly writeback, can implement flip
or transpose operations as writing back to memory.

Add a connector rotation property to control this.

Signed-off-by: Dave Stevenson <[email protected]>
The txp block can implement transpose as it writes out the image
data, so expose that through the new connector rotation property.

Signed-off-by: Dave Stevenson <[email protected]>
@pelwell pelwell merged commit 8346446 into raspberrypi:rpi-6.6.y Nov 7, 2024
11 of 12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Nov 8, 2024
See: raspberrypi/linux#6458

kernel: dmaengine: dw-axi-dmac: Allow client-chosen width
See: raspberrypi/linux#6377

kernel: drm/vc4: Allow option to transpose the output on the writeback connector
See: raspberrypi/linux#6312

kernel: raspberrypi/linux#6454
See: raspberrypi/linux#6454

kernel: More dwc3 quirks
See: raspberrypi/linux#6457

kernel: mmc: quirks: add more broken Kingston Canvas Go! SD card date ranges
See: raspberrypi/linux#6447
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Nov 8, 2024
See: raspberrypi/linux#6458

kernel: dmaengine: dw-axi-dmac: Allow client-chosen width
See: raspberrypi/linux#6377

kernel: drm/vc4: Allow option to transpose the output on the writeback connector
See: raspberrypi/linux#6312

kernel: raspberrypi/linux#6454
See: raspberrypi/linux#6454

kernel: More dwc3 quirks
See: raspberrypi/linux#6457

kernel: mmc: quirks: add more broken Kingston Canvas Go! SD card date ranges
See: raspberrypi/linux#6447
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.

3 participants