[PATCH 0/2] drm/atomic: Allow drivers to write their own plane check for async

Xaver Hugl xaver.hugl at gmail.com
Tue Jan 16 16:10:18 UTC 2024


My plan is to require support for IN_FENCE_FD at least. If the driver
doesn't
allow tearing with that, then tearing just doesn't happen.

For overlay planes though, it depends on how the compositor prioritizes
things.
If the compositor prioritizes overlay planes and would like to do tearing
if possible,
then this patch works.
If the compositor prioritizes tearing and would like to do overlay planes
if possible,
it would have to know that switching to synchronous commits for a single
frame,
setting up the overlay planes and then switching back to async commits
works, and
that can't be figured out with TEST_ONLY commits.
So I think having a CAP or immutable plane property to signal that async
commits
with overlay and/or cursor planes is supported would be useful.

Am Di., 16. Jan. 2024 um 14:35 Uhr schrieb André Almeida <
andrealmeid at igalia.com>:

> + Joshua
>
> Em 16/01/2024 10:14, Pekka Paalanen escreveu:
> > On Tue, 16 Jan 2024 08:50:59 -0300
> > André Almeida <andrealmeid at igalia.com> wrote:
> >
> >> Hi Pekka,
> >>
> >> Em 16/01/2024 06:45, Pekka Paalanen escreveu:
> >>> On Tue, 16 Jan 2024 01:51:57 -0300
> >>> André Almeida <andrealmeid at igalia.com> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> AMD hardware can do more on the async flip path than just the primary
> plane, so
> >>>> to lift up the current restrictions, this patchset allows drivers to
> write their
> >>>> own check for planes for async flips.
> >>>
> >>> Hi,
> >>>
> >>> what's the userspace story for this, how could userspace know it could
> do more?
> >>> What kind of userspace would take advantage of this and in what
> situations?
> >>>
> >>> Or is this not meant for generic userspace?
> >>
> >> Sorry, I forgot to document this. So the idea is that userspace will
> >> query what they can do here with DRM_MODE_ATOMIC_TEST_ONLY calls,
> >> instead of having capabilities for each prop.
> >
> > That's the theory, but do you have a practical example?
> >
> > What other planes and props would one want change in some specific use
> > case?
> >
> > Is it just "all or nothing", or would there be room to choose and pick
> > which props you change and which you don't based on what the driver
> > supports? If the latter, then relying on TEST_ONLY might be yet another
> > combinatorial explosion to iterate through.
> >
>
> That's a good question, maybe Simon, Xaver or Joshua can share how they
> were planning to use this on Gamescope or Kwin.
>
> >
> > Thanks,
> > pq
> >
> >>>> I'm not sure if adding something new to drm_plane_funcs is the right
> way to do,
> >>>> because if we want to expand the other object types (crtc, connector)
> we would
> >>>> need to add their own drm_XXX_funcs, so feedbacks are welcome!
> >>>>
> >>>>    André
> >>>>
> >>>> André Almeida (2):
> >>>>     drm/atomic: Allow drivers to write their own plane check for async
> >>>>       flips
> >>>>     drm/amdgpu: Implement check_async_props for planes
> >>>>
> >>>>    .../amd/display/amdgpu_dm/amdgpu_dm_plane.c   | 30 +++++++++
> >>>>    drivers/gpu/drm/drm_atomic_uapi.c             | 62
> ++++++++++++++-----
> >>>>    include/drm/drm_atomic_uapi.h                 | 12 ++++
> >>>>    include/drm/drm_plane.h                       |  5 ++
> >>>>    4 files changed, 92 insertions(+), 17 deletions(-)
> >>>>
> >>>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20240116/29be59fd/attachment.htm>


More information about the amd-gfx mailing list