From a102172c7f818bfb32c0652552983e262d11990e Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 20 Nov 2020 11:25:36 +0100 Subject: [PATCH] drm/fb-helper: Call dirty helper after writing to fbdev If fbdev uses a shadow framebuffer, call the damage handler. Otherwise the update might not make it to the screen. v2: * mark virtual screen as dirty (Ville) Signed-off-by: Thomas Zimmermann Fixes: 222ec45f4c69 ("drm/fb_helper: Support framebuffers in I/O memory") Acked-by: Maxime Ripard Acked-by: Sam Ravnborg Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: dri-devel@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-2-tzimmermann@suse.de --- drivers/gpu/drm/drm_fb_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 25edf67..9c673f3 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -2189,6 +2189,9 @@ static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char __user *buf, if (ret > 0) *ppos += ret; + if (ret > 0) + drm_fb_helper_dirty(info, 0, 0, info->var.xres_virtual, info->var.yres_virtual); + return ret ? ret : err; } -- 2.7.4