drm/vc4: Fix YUV plane handling when planes are in different buffers
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Tue, 3 Jan 2023 15:16:50 +0000 (15:16 +0000)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Tue, 3 Jan 2023 16:02:18 +0000 (16:02 +0000)
commit00177449a84bb25913e565c42ae7d4a14e6d4a6d
treeb3020d71d5ddd9b91511cccbde8566238b56dcac
parent3f4092766eaf692ed79b69f59c98dbe38e557fe7
drm/vc4: Fix YUV plane handling when planes are in different buffers

YUV images can either be presented as one allocation with offsets
for the different planes, or multiple allocations with 0 offsets.

The driver only ever calls drm_fb_[dma|cma]_get_gem_obj with plane
index 0, therefore any application using the second approach was
incorrectly rendered.

Correctly determine the address for each plane, removing the
assumption that the base address is the same for each.

Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_plane.c