[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240706011214.380390-1-andrealmeid@igalia.com>
Date: Fri, 5 Jul 2024 22:12:12 -0300
From: André Almeida <andrealmeid@...lia.com>
To: dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Cc: kernel-dev@...lia.com,
alexander.deucher@....com,
christian.koenig@....com,
Simon Ser <contact@...rsion.fr>,
Pekka Paalanen <ppaalanen@...il.com>,
daniel@...ll.ch,
Daniel Stone <daniel@...ishbar.org>,
'Marek Olšák' <maraeo@...il.com>,
Dave Airlie <airlied@...il.com>,
ville.syrjala@...ux.intel.com,
Xaver Hugl <xaver.hugl@...il.com>,
Joshua Ashton <joshua@...ggi.es>,
Michel Dänzer <michel.daenzer@...lbox.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
André Almeida <andrealmeid@...lia.com>
Subject: [PATCH v8 0/1] drm/atomic: Ease async flip restrictions
Hi,
As per my previous patchsets, the goal of this work is to find a nice way to
allow amdgpu to perform async page flips in the overlay plane as well, not
only on the primary one. Currently, when using the atomic uAPI, this is the only
type of plane allowed to do async flips, and every driver accepts it.
In my last version, I had created a static field `bool async_flip` for
drm_planes. When creating new planes, drivers could tell if such plane was
allowed or not to do async flips. This would be latter checked on the atomic
uAPI whenever the DRM_MODE_PAGE_FLIP_ASYNC was present.
However, Dmitry Baryshkov raised a valid point about getting confused with the
existing atomic_async_check() code, giving that is an function to do basically
what I want: to let drivers tell DRM whether a giving plane can do async flips
or not. It turns out atomic_async_check() is implemented by drivers to deal with
the legacy cursor update, so it's not wired with the atomic uAPI because is
something that precedes such API.
So my new proposal is to just reuse this same function in the atomic uAPI path.
The plane restrictions defined at atomic_async_check() should work in this
codepath as well. And I will be able to allow overlays planes by modifying
amdgpu_dm_plane_atomic_async_check(), and anyone else have a proper place to
play with async plane restrictions as well.
One note is that currently we always allow async flips for primary planes,
regardless of the drivers, but not every atomic_async_check() implementation
allows primary planes (because they were writing targeting cursor planes
anyway...). To avoid regressions, my patch only calls atomic_async_check() for
non primary planes, and always allows primary ones.
Thoughts?
Changelog
v7: https://lore.kernel.org/dri-devel/20240618030024.500532-1-andrealmeid@igalia.com/
- Complete rewrite
André Almeida (2):
drm/atomic: Let drivers decide which planes to async flip
drm/amdgpu: Enable async flip on overlay planes
.../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +--
drivers/gpu/drm/drm_atomic_uapi.c | 21 ++++++++++++++-----
2 files changed, 17 insertions(+), 7 deletions(-)
--
2.45.2
Powered by blists - more mailing lists