From: Thomas Zimmermann <tzimmermann@suse.de>
To: Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: Bilal Elmoussaoui <belmouss@redhat.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Javier Martinez Canillas <javierm@redhat.com>,
Maxime Ripard <mripard@kernel.org>,
Sima Vetter <daniel.vetter@ffwll.ch>,
Erico Nunes <nunes.erico@gmail.com>
Subject: Re: [PATCH v2 4/5] drm/plane: Extend damage tracking kernel-doc
Date: Fri, 17 Nov 2023 12:47:58 +0100 [thread overview]
Message-ID: <82aea98e-2470-4be5-95b2-a3ad7d9bfc90@suse.de> (raw)
In-Reply-To: <20231116172451.00a7ec9e.pekka.paalanen@collabora.com>
[-- Attachment #1.1: Type: text/plain, Size: 3008 bytes --]
Hi
Am 16.11.23 um 16:24 schrieb Pekka Paalanen:
> On Thu, 16 Nov 2023 13:34:07 +0100
> Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
>> Hi
>>
>> Am 16.11.23 um 13:14 schrieb Simon Ser:
>>> On Thursday, November 16th, 2023 at 13:06, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>>
>>>>> + * Note that there are two types of damage handling: frame damage and buffer
>>>>> + * damage. The type of damage handling implemented depends on a driver's upload
>>>>> + * target. Drivers implementing a per-plane or per-CRTC upload target need to
>>>>> + * handle frame damage while drivers implementing a per-buffer upload target
>>>>> + * need to handle buffer damage.
>>>>> + *
>>>>> + * The existing damage helpers only support the frame damage type, there is no
>>>>> + * buffer age support or similar damage accumulation algorithm implemented yet.
>>>>> + *
>>>>> + * Only drivers handling frame damage can use the mentiored damage helpers to
>>>
>>> Typo: mentioned
>>>
>>>>> + * iterate over the damaged regions. Drivers that handle buffer damage, need to
>>>>> + * set &struct drm_plane_state.ignore_damage_clips as an indication to
>>>>> + * drm_atomic_helper_damage_iter_init() that the damage clips should be ignored.
>>>>> + * In that case, the returned damage rectangle is the &drm_plane_state.src since
>>>>> + * a full plane update should happen.
>>>>> + *
>>>>> + * For more information about the two type of damage, see:
>>>>> + * https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt
>>>>> + * https://emersion.fr/blog/2019/intro-to-damage-tracking/
>>>>
>>>> One thought you might want to consider.
>>>>
>>>> These URLs are helpful. The only issue I have is that frame damage and
>>>> buffer damage are user-space concepts. The kernel bug is that damage
>>>> handling expects the backing storage/upload buffer not to change for a
>>>> given plane. If the upload buffer changes between page flips, the new
>>>> upload buffer has to be updated as a whole. Hence no damage handling then.
>>>
>>> Why would these concepts be specific to user-space? The kernel could
>>> better handle buffer damage instead of forcing full damage, by doing
>>> something similar to what user-space does.
>>
>> The terms 'frame damage' and 'buffer damage' do not exist in the kernel.
>> The problem can be better described in wording that is common within the
>> context of the kernel drivers.
>
> What terms does the kernel use for these two different concepts of
> damage?
None AFAIK. Damage is relative to the plane's backing storage/upload
buffer. That's frame damage. We never needed a name for buffer damage as
we don't support it.
Best regards
Thomas
>
>
> Thanks,
> pq
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2023-11-17 11:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 13:15 [PATCH v2 0/5] drm: Allow the damage helpers to handle buffer damage Javier Martinez Canillas
2023-11-15 13:15 ` [PATCH v2 1/5] drm: Allow drivers to indicate the damage helpers to ignore damage clips Javier Martinez Canillas
2023-11-15 13:15 ` [PATCH v2 2/5] drm/virtio: Disable damage clipping if FB changed since last page-flip Javier Martinez Canillas
2023-11-15 13:15 ` [PATCH v2 3/5] drm/vmwgfx: " Javier Martinez Canillas
2023-11-15 13:15 ` [PATCH v2 4/5] drm/plane: Extend damage tracking kernel-doc Javier Martinez Canillas
2023-11-16 12:06 ` Thomas Zimmermann
2023-11-16 12:14 ` Simon Ser
2023-11-16 12:34 ` Thomas Zimmermann
2023-11-16 15:24 ` Pekka Paalanen
2023-11-17 11:47 ` Thomas Zimmermann [this message]
2023-11-15 13:15 ` [PATCH v2 5/5] drm/todo: Add entry about implementing buffer age for damage tracking Javier Martinez Canillas
2023-11-16 4:04 ` [PATCH v2 0/5] drm: Allow the damage helpers to handle buffer damage Zack Rusin
2023-11-16 7:46 ` Javier Martinez Canillas
2023-11-16 12:07 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82aea98e-2470-4be5-95b2-a3ad7d9bfc90@suse.de \
--to=tzimmermann@suse.de \
--cc=belmouss@redhat.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=nunes.erico@gmail.com \
--cc=pekka.paalanen@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®