* [PATCH] drm/virtio: Enable fb damage clips property for the primary plane
@ 2023-03-10 12:59 Javier Martinez Canillas
2023-03-10 13:20 ` Thomas Zimmermann
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2023-03-10 12:59 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Zimmermann, Bilal Elmoussaoui, Jocelyn Falempe,
Enric Balletbo i Serra, Christian Hergert, Albert Esteve,
Javier Martinez Canillas, Chia-I Wu, Daniel Vetter, David Airlie,
Gerd Hoffmann, Gurchetan Singh, dri-devel, virtualization
Christian Hergert reports that the driver doesn't enable the property and
that leads to always doing a full plane update, even when the driver does
support damage clipping for the primary plane.
Don't enable it for the cursor plane, because its .atomic_update callback
doesn't handle damage clips.
Reported-by: Christian Hergert <chergert@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 4c09e313bebc..a2e045f3a000 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
return plane;
drm_plane_helper_add(plane, funcs);
+
+ if (type == DRM_PLANE_TYPE_PRIMARY)
+ drm_plane_enable_fb_damage_clips(plane);
+
return plane;
}
base-commit: 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/virtio: Enable fb damage clips property for the primary plane
2023-03-10 12:59 [PATCH] drm/virtio: Enable fb damage clips property for the primary plane Javier Martinez Canillas
@ 2023-03-10 13:20 ` Thomas Zimmermann
2023-03-10 13:27 ` Javier Martinez Canillas
2023-03-13 8:52 ` Gerd Hoffmann
2023-03-13 17:28 ` Javier Martinez Canillas
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2023-03-10 13:20 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Bilal Elmoussaoui, Jocelyn Falempe, Enric Balletbo i Serra,
Christian Hergert, Albert Esteve, Chia-I Wu, Daniel Vetter,
David Airlie, Gerd Hoffmann, Gurchetan Singh, dri-devel,
virtualization
[-- Attachment #1.1: Type: text/plain, Size: 1589 bytes --]
Hi Javier
Am 10.03.23 um 13:59 schrieb Javier Martinez Canillas:
> Christian Hergert reports that the driver doesn't enable the property and
> that leads to always doing a full plane update, even when the driver does
> support damage clipping for the primary plane.
>
> Don't enable it for the cursor plane, because its .atomic_update callback
> doesn't handle damage clips.
>
> Reported-by: Christian Hergert <chergert@redhat.com>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
> index 4c09e313bebc..a2e045f3a000 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_plane.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
> @@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
virtio_gpu_plane_init() should really be two separate functions. But
withing the constrains of the current code
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Best regards
Thomas
> return plane;
>
> drm_plane_helper_add(plane, funcs);
> +
> + if (type == DRM_PLANE_TYPE_PRIMARY)
> + drm_plane_enable_fb_damage_clips(plane);
> +
> return plane;
> }
>
> base-commit: 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/virtio: Enable fb damage clips property for the primary plane
2023-03-10 13:20 ` Thomas Zimmermann
@ 2023-03-10 13:27 ` Javier Martinez Canillas
0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2023-03-10 13:27 UTC (permalink / raw)
To: Thomas Zimmermann, linux-kernel
Cc: Bilal Elmoussaoui, Jocelyn Falempe, Enric Balletbo i Serra,
Christian Hergert, Albert Esteve, Chia-I Wu, Daniel Vetter,
David Airlie, Gerd Hoffmann, Gurchetan Singh, dri-devel,
virtualization
Thomas Zimmermann <tzimmermann@suse.de> writes:
Hello Thomas,
> Hi Javier
>
> Am 10.03.23 um 13:59 schrieb Javier Martinez Canillas:
>> Christian Hergert reports that the driver doesn't enable the property and
>> that leads to always doing a full plane update, even when the driver does
>> support damage clipping for the primary plane.
>>
>> Don't enable it for the cursor plane, because its .atomic_update callback
>> doesn't handle damage clips.
>>
>> Reported-by: Christian Hergert <chergert@redhat.com>
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>> ---
>>
>> drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
>> index 4c09e313bebc..a2e045f3a000 100644
>> --- a/drivers/gpu/drm/virtio/virtgpu_plane.c
>> +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
>> @@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
>
> virtio_gpu_plane_init() should really be two separate functions. But
> withing the constrains of the current code
>
Agreed, I thought the same. I may post a follow-up patch once this lands.
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
Thanks!
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/virtio: Enable fb damage clips property for the primary plane
2023-03-10 12:59 [PATCH] drm/virtio: Enable fb damage clips property for the primary plane Javier Martinez Canillas
2023-03-10 13:20 ` Thomas Zimmermann
@ 2023-03-13 8:52 ` Gerd Hoffmann
2023-03-13 17:28 ` Javier Martinez Canillas
2 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2023-03-13 8:52 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Thomas Zimmermann, Bilal Elmoussaoui,
Jocelyn Falempe, Enric Balletbo i Serra, Christian Hergert,
Albert Esteve, Chia-I Wu, Daniel Vetter, David Airlie,
Gurchetan Singh, dri-devel, virtualization
On Fri, Mar 10, 2023 at 01:59:42PM +0100, Javier Martinez Canillas wrote:
> Christian Hergert reports that the driver doesn't enable the property and
> that leads to always doing a full plane update, even when the driver does
> support damage clipping for the primary plane.
>
> Don't enable it for the cursor plane, because its .atomic_update callback
> doesn't handle damage clips.
>
> Reported-by: Christian Hergert <chergert@redhat.com>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/virtio: Enable fb damage clips property for the primary plane
2023-03-10 12:59 [PATCH] drm/virtio: Enable fb damage clips property for the primary plane Javier Martinez Canillas
2023-03-10 13:20 ` Thomas Zimmermann
2023-03-13 8:52 ` Gerd Hoffmann
@ 2023-03-13 17:28 ` Javier Martinez Canillas
2 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2023-03-13 17:28 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Zimmermann, Bilal Elmoussaoui, Jocelyn Falempe,
Enric Balletbo i Serra, Christian Hergert, Albert Esteve,
Chia-I Wu, Daniel Vetter, David Airlie, Gerd Hoffmann,
Gurchetan Singh, dri-devel, virtualization
Javier Martinez Canillas <javierm@redhat.com> writes:
> Christian Hergert reports that the driver doesn't enable the property and
> that leads to always doing a full plane update, even when the driver does
> support damage clipping for the primary plane.
>
> Don't enable it for the cursor plane, because its .atomic_update callback
> doesn't handle damage clips.
>
> Reported-by: Christian Hergert <chergert@redhat.com>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
Pushed to drm-misc (drm-misc-next). Thanks!
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-13 17:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 12:59 [PATCH] drm/virtio: Enable fb damage clips property for the primary plane Javier Martinez Canillas
2023-03-10 13:20 ` Thomas Zimmermann
2023-03-10 13:27 ` Javier Martinez Canillas
2023-03-13 8:52 ` Gerd Hoffmann
2023-03-13 17:28 ` Javier Martinez Canillas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®