drm/vc4: Correct address offset for planes with src_[xy] offsets
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 16 Oct 2023 11:13:38 +0000 (12:13 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:06 +0000 (11:35 +0000)
commit5e68a4e15d2a7082a9de27725fed7a750faa8450
tree52f1b32a80e7961fa26b6101c09c497436efdb67
parent503d11050f6590af03a140f2df5684d5a7254d83
drm/vc4: Correct address offset for planes with src_[xy] offsets

11cf37e741b4 switched to using drm_fb_dma_get_gem_addr instead of
drm_fb_dma_get_gem_obj and adding fb->offset[].

However the tiled formats need to compute the offset in a more
involved manner than drm_fb_dma_get_gem_addr applies, and we
were ending up with the offset for src_[xy] being applied twice.

Switch back to using drm_fb_dma_get_gem_obj and fully computing
the offsets ourselves.

Fixes: 11cf37e741b4 ("drm/vc4: Move the buffer offset out of the vc4_plane_state")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_plane.c