Message ID | 20201120102545.4047-7-tzimmermann@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/fb-helper: Various fixes and cleanups | expand |
On Fri, Nov 20, 2020 at 11:25:41AM +0100, Thomas Zimmermann wrote: > Flushing the shadow framebuffer and invoking the dirty callback are two > separate operations, so do them seprately. The flush operation is paired > with calls to vmap and vunmap. They are not needed for the dirty callback, > which performs its own invocations if necessary. > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index c9018ffff5f9..bdfdf60e7bd8 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -417,13 +417,11 @@ static void drm_fb_helper_damage_work(struct work_struct *work) if (ret) return; drm_fb_helper_damage_blit_real(helper, &clip_copy, &map); + drm_client_buffer_vunmap(helper->buffer); } if (helper->fb->funcs->dirty) helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, &clip_copy, 1); - - if (helper->buffer) - drm_client_buffer_vunmap(helper->buffer); } /**
Flushing the shadow framebuffer and invoking the dirty callback are two separate operations, so do them seprately. The flush operation is paired with calls to vmap and vunmap. They are not needed for the dirty callback, which performs its own invocations if necessary. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> --- drivers/gpu/drm/drm_fb_helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)