Commit 7d4d269c authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/fb-helper: Copy dma-buf map before flushing shadow fb

Copy the vmap()'ed instance of struct dma_buf_map before modifying it,
in case the implementation of vunmap() depends on the exact address.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-10-tzimmermann@suse.de
parent 4270d6f6
...@@ -395,14 +395,15 @@ static int drm_fb_helper_damage_blit(struct drm_fb_helper *fb_helper, ...@@ -395,14 +395,15 @@ static int drm_fb_helper_damage_blit(struct drm_fb_helper *fb_helper,
struct drm_clip_rect *clip) struct drm_clip_rect *clip)
{ {
struct drm_client_buffer *buffer = fb_helper->buffer; struct drm_client_buffer *buffer = fb_helper->buffer;
struct dma_buf_map map; struct dma_buf_map map, dst;
int ret; int ret;
ret = drm_client_buffer_vmap(buffer, &map); ret = drm_client_buffer_vmap(buffer, &map);
if (ret) if (ret)
return ret; return ret;
drm_fb_helper_damage_blit_real(fb_helper, clip, &map); dst = map;
drm_fb_helper_damage_blit_real(fb_helper, clip, &dst);
drm_client_buffer_vunmap(buffer); drm_client_buffer_vunmap(buffer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment