[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8734x872dy.fsf@minerva.mail-host-address-is-not-set>
Date: Tue, 14 Nov 2023 16:58:33 +0100
From: Javier Martinez Canillas <javierm@...hat.com>
To: Thomas Zimmermann <tzimmermann@...e.de>,
linux-kernel@...r.kernel.org
Cc: Simon Ser <contact@...rsion.fr>,
Sima Vetter <daniel.vetter@...ll.ch>,
Pekka Paalanen <pekka.paalanen@...labora.com>,
Maxime Ripard <mripard@...nel.org>,
Bilal Elmoussaoui <belmouss@...hat.com>,
Erico Nunes <nunes.erico@...il.com>, stable@...r.kernel.org,
nerdopolis <bluescreen_avenger@...izon.net>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...il.com>,
Gerd Hoffmann <kraxel@...hat.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 2/6] drm: Add
drm_atomic_helper_buffer_damage_{iter_init,merged}() helpers
Thomas Zimmermann <tzimmermann@...e.de> writes:
Hello Thomas,
Thanks a lot for your feedback.
> Hi
>
> Am 09.11.23 um 18:24 schrieb Javier Martinez Canillas:
>> To be used by drivers that do per-buffer (e.g: virtio-gpu) uploads (rather
>> than per-plane uploads), since these type of drivers need to handle buffer
>> damages instead of frame damages.
>>
>> The drm_atomic_helper_buffer_damage_iter_init() has the same logic than
>> drm_atomic_helper_damage_iter_init() but it also takes into account if the
>> framebuffer attached to plane's state has changed since the last update.
>>
>> And the drm_atomic_helper_buffer_damage_merged() is just a version of the
>> drm_atomic_helper_damage_merged() helper, but it uses the iter_init helper
>> that is mentioned above.
>>
>> Fixes: 01f05940a9a7 ("drm/virtio: Enable fb damage clips property for the primary plane")
>> Cc: <stable@...r.kernel.org> # v6.4+
>> Reported-by: nerdopolis <bluescreen_avenger@...izon.net>
>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218115
>> Suggested-by: Sima Vetter <daniel.vetter@...ll.ch>
>> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
>> ---
>>
>> drivers/gpu/drm/drm_damage_helper.c | 79 ++++++++++++++++++++++++++---
>> include/drm/drm_damage_helper.h | 7 +++
>> 2 files changed, 80 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_damage_helper.c b/drivers/gpu/drm/drm_damage_helper.c
>> index aa2325567918..b72062c9d31c 100644
>> --- a/drivers/gpu/drm/drm_damage_helper.c
>> +++ b/drivers/gpu/drm/drm_damage_helper.c
>> @@ -204,7 +204,8 @@ EXPORT_SYMBOL(drm_atomic_helper_dirtyfb);
>> static void
>> __drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter,
>> const struct drm_plane_state *old_state,
>> - const struct drm_plane_state *state)
>> + const struct drm_plane_state *state,
>> + bool buffer_damage)
>
> I think it would be preferable to drop patches one and two and instead
> add this parameter directly to drm_atomic_helper_damage_iter_init() and
> drm_atomic_helper_damage_merged(). That's a bit of churn, but more
> readable code.
>
Makes sense. I'll do that in v2.
> Best regards
> Thomas
>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
Powered by blists - more mailing lists