drm/gud: Use the shadow plane helper
authorNoralf Trønnes <noralf@tronnes.org>
Wed, 30 Nov 2022 19:26:53 +0000 (20:26 +0100)
committerNoralf Trønnes <noralf@tronnes.org>
Tue, 6 Dec 2022 15:38:05 +0000 (16:38 +0100)
commitc17d048609bf09d4fc78b02964e42eafb66a337e
treef59dcb1fa68a8cbebe76bcbe0584d096098d1662
parent562fd7cc67cb6d1fe8b96e72fbca9a423b5a43be
drm/gud: Use the shadow plane helper

Use the shadow plane helper to take care of mapping the framebuffer for
CPU access. The synchronous flushing is now done inline without the use of
a worker. The async path now uses a shadow buffer to hold framebuffer
changes and it doesn't read the framebuffer behind userspace's back
anymore.

v2:
- Use src as variable name for iosys_map (Thomas)
- Prepare imported buffer for CPU access in the driver (Thomas)

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-5-435037990a83@tronnes.org
drivers/gpu/drm/gud/gud_drv.c
drivers/gpu/drm/gud/gud_internal.h
drivers/gpu/drm/gud/gud_pipe.c