* [PATCH 01/10] drm/fb-helper: Call dirty helper after writing to fbdev
[not found] <20201116200437.17977-1-tzimmermann@suse.de>
@ 2020-11-16 20:04 ` Thomas Zimmermann
2020-11-17 16:22 ` Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Zimmermann @ 2020-11-16 20:04 UTC (permalink / raw)
To: daniel, airlied, sam, mripard, maarten.lankhorst,
christian.koenig
Cc: Daniel Vetter, virtualization, Thomas Zimmermann, dri-devel
If fbdev uses a shadow framebuffer, call the damage handler. Otherwise
the update might not make it to the screen.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 222ec45f4c69 ("drm/fb_helper: Support framebuffers in I/O memory")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: virtualization@lists.linux-foundation.org
---
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 25edf670867c..ee1a19e22df2 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, info->var.yres);
+
return ret ? ret : err;
}
--
2.29.2
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 01/10] drm/fb-helper: Call dirty helper after writing to fbdev
2020-11-16 20:04 ` [PATCH 01/10] drm/fb-helper: Call dirty helper after writing to fbdev Thomas Zimmermann
@ 2020-11-17 16:22 ` Ville Syrjälä
2020-11-18 7:56 ` Thomas Zimmermann
0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjälä @ 2020-11-17 16:22 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: airlied, Daniel Vetter, maarten.lankhorst, mripard,
virtualization, dri-devel, daniel, sam, christian.koenig
On Mon, Nov 16, 2020 at 09:04:28PM +0100, Thomas Zimmermann wrote:
> If fbdev uses a shadow framebuffer, call the damage handler. Otherwise
> the update might not make it to the screen.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 222ec45f4c69 ("drm/fb_helper: Support framebuffers in I/O memory")
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: virtualization@lists.linux-foundation.org
> ---
> 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 25edf670867c..ee1a19e22df2 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, info->var.yres);
Should that rather be 0->{x,y}res_virtual or {x,y}offset->{x,y}res?
> +
> return ret ? ret : err;
> }
>
> --
> 2.29.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 01/10] drm/fb-helper: Call dirty helper after writing to fbdev
2020-11-17 16:22 ` Ville Syrjälä
@ 2020-11-18 7:56 ` Thomas Zimmermann
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2020-11-18 7:56 UTC (permalink / raw)
To: Ville Syrjälä
Cc: airlied, Daniel Vetter, maarten.lankhorst, mripard,
virtualization, dri-devel, daniel, sam, christian.koenig
Hi
Am 17.11.20 um 17:22 schrieb Ville Syrjälä:
> On Mon, Nov 16, 2020 at 09:04:28PM +0100, Thomas Zimmermann wrote:
>> If fbdev uses a shadow framebuffer, call the damage handler. Otherwise
>> the update might not make it to the screen.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Fixes: 222ec45f4c69 ("drm/fb_helper: Support framebuffers in I/O memory")
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Maxime Ripard <mripard@kernel.org>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: virtualization@lists.linux-foundation.org
>> ---
>> 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 25edf670867c..ee1a19e22df2 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, info->var.yres);
>
> Should that rather be 0->{x,y}res_virtual or {x,y}offset->{x,y}res?
That code snippet works in drm_fb_helper_sys_write().
However these are framebuffer-relative coordinates. I guess *res_virtual
would be more correct. I'll update the patch accordingly. Thanks for
pointing this out.
Best regards
Thomas
>
>> +
>> return ret ? ret : err;
>> }
>>
>> --
>> 2.29.2
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-18 7:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20201116200437.17977-1-tzimmermann@suse.de>
2020-11-16 20:04 ` [PATCH 01/10] drm/fb-helper: Call dirty helper after writing to fbdev Thomas Zimmermann
2020-11-17 16:22 ` Ville Syrjälä
2020-11-18 7:56 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).