OSDN Git Service

drm/vkms: Map output framebuffer BOs with drm_gem_fb_vmap()
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 30 Jul 2021 18:35:11 +0000 (20:35 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 2 Aug 2021 14:41:20 +0000 (16:41 +0200)
commit50fff206c5e3a04fcb239ad58d89cad166711b7f
treea64842833a7dfe93b460c6186a93d40ece821edd
parent0029d3182969d8dc67e4fedb00d6cf50eee74670
drm/vkms: Map output framebuffer BOs with drm_gem_fb_vmap()

Abstract the framebuffer details by mappings its BOs with a call
to drm_gem_fb_vmap(). Unmap with drm_gem_fb_vunamp().

Before, the output address with stored as raw pointer in the priv
field of struct drm_writeback_job. Introduce the new type
struct vkms_writeback_job, which holds the output mappings addresses
while the writeback job is active.

The patchset also cleans up some internal casting an setup of the
output addresses. No functional changes.

v3:
* free instances of struct vkms_writeback_job on cleanup
  or errors

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730183511.20080-6-tzimmermann@suse.de
drivers/gpu/drm/vkms/vkms_composer.c
drivers/gpu/drm/vkms/vkms_drv.h
drivers/gpu/drm/vkms/vkms_writeback.c