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 source rectangle fixes #6350

Draft
wants to merge 2 commits into
base: rpi-6.6.y
Choose a base branch
from
Draft

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Sep 11, 2024

@cillian64 As discussed:

  • fix for your sub 1 pixel source rectangle issue (even if we don't fully understand how it became <1pixel)
  • potential patch to save LBM for your upscaled 1x1 solid colour fills. (I need to patch modetest or kmstest to allow me to test source rectangles easily)

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 <dave.stevenson@raspberrypi.com>
@6by9 6by9 marked this pull request as draft September 11, 2024 15:13
@6by9
Copy link
Contributor Author

6by9 commented Sep 11, 2024

Converted to draft as using the TPZ filter really doesn't work at present, and needs to either be fixed (if possible) or dropped.

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 <dave.stevenson@raspberrypi.com>
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.

1 participant