summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_gem_framebuffer_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_framebuffer_helper.h
parentdrm/mgag200: Compute PLL values during atomic check (diff)
downloadlinux-43b36232ded23ce943224df3d1451f981446ae23.tar.xz
linux-43b36232ded23ce943224df3d1451f981446ae23.zip
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_framebuffer_helper.h')
-rw-r--r--include/drm/drm_gem_framebuffer_helper.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/drm/drm_gem_framebuffer_helper.h b/include/drm/drm_gem_framebuffer_helper.h
index ff2024dd7b77..905727719ead 100644
--- a/include/drm/drm_gem_framebuffer_helper.h
+++ b/include/drm/drm_gem_framebuffer_helper.h
@@ -40,7 +40,8 @@ drm_gem_fb_create_with_dirty(struct drm_device *dev, struct drm_file *file,
const struct drm_mode_fb_cmd2 *mode_cmd);
int drm_gem_fb_vmap(struct drm_framebuffer *fb,
- struct dma_buf_map map[static DRM_FORMAT_MAX_PLANES]);
+ struct dma_buf_map map[static DRM_FORMAT_MAX_PLANES],
+ struct dma_buf_map data[DRM_FORMAT_MAX_PLANES]);
void drm_gem_fb_vunmap(struct drm_framebuffer *fb,
struct dma_buf_map map[static DRM_FORMAT_MAX_PLANES]);
int drm_gem_fb_begin_cpu_access(struct drm_framebuffer *fb, enum dma_data_direction dir);