diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-11-20 13:25:44 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-11-24 11:31:34 +0300 |
commit | 7d4d269c0973f7a8324d9cd2534b3b24e62c72ff (patch) | |
tree | 2a4e39edf73bbc2275776f971b9b558b885940b6 /drivers/gpu/drm/drm_fb_helper.c | |
parent | 4270d6f60d68e99e2fefd4da98eead05d2df022c (diff) | |
download | linux-7d4d269c0973f7a8324d9cd2534b3b24e62c72ff.tar.xz |
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: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-10-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/drm_fb_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 314352683447..0aac5450c8ad 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -395,14 +395,15 @@ static int drm_fb_helper_damage_blit(struct drm_fb_helper *fb_helper, struct drm_clip_rect *clip) { struct drm_client_buffer *buffer = fb_helper->buffer; - struct dma_buf_map map; + struct dma_buf_map map, dst; int ret; ret = drm_client_buffer_vmap(buffer, &map); if (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); |