summaryrefslogtreecommitdiff
path: root/include/drm/drm_gem_atomic_helper.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2021-08-03 14:59:18 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2021-08-08 20:26:16 +0200
commit43b36232ded23ce943224df3d1451f981446ae23 (patch)
treeab730cdf3dc18388832a34fbc03ed6da7b30fb19 /include/drm/drm_gem_atomic_helper.h
parent0a6dab7d07d25c6d1e6dff0c31bac11ef1803f8a (diff)
drm/gem: Provide offset-adjusted framebuffer BO mappings
Add an additional argument to drm_gem_fb_vmap() to return each BO's mapping adjusted by the respective offset. Update all callers. The newly returned values point to the first byite of the data stored in the framebuffer BOs. Drivers that access the BO data should use it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210803125928.27780-2-tzimmermann@suse.de
Diffstat (limited to 'include/drm/drm_gem_atomic_helper.h')
-rw-r--r--include/drm/drm_gem_atomic_helper.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drm_gem_atomic_helper.h b/include/drm/drm_gem_atomic_helper.h
index f9f8b6f0494a..48222a107873 100644
--- a/include/drm/drm_gem_atomic_helper.h
+++ b/include/drm/drm_gem_atomic_helper.h
@@ -42,6 +42,14 @@ struct drm_shadow_plane_state {
* prepare_fb callback and removed in the cleanup_fb callback.
*/
struct dma_buf_map map[DRM_FORMAT_MAX_PLANES];
+
+ /**
+ * @data: Address of each framebuffer BO's data
+ *
+ * The address of the data stored in each mapping. This is different
+ * for framebuffers with non-zero offset fields.
+ */
+ struct dma_buf_map data[DRM_FORMAT_MAX_PLANES];
};
/**