[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240618030024.500532-1-andrealmeid@igalia.com>
Date: Tue, 18 Jun 2024 00:00:15 -0300
From: André Almeida <andrealmeid@...lia.com>
To: dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
nouveau@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: kernel-dev@...lia.com,
Melissa Wen <mwen@...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>,
Sam Ravnborg <sam@...nborg.org>,
Boris Brezillon <bbrezillon@...nel.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Karol Herbst <kherbst@...hat.com>,
Lyude Paul <lyude@...hat.com>,
André Almeida <andrealmeid@...lia.com>
Subject: [PATCH v7 0/9] drm: Support per-plane async flip configuration
AMD hardware can do async flips with overlay planes, but currently there's no
easy way to enable that in DRM. To solve that, this patchset creates a new
drm_plane field, bool async_flip, that allows drivers to choose which plane can
or cannot do async flips. This is latter used on drm_atomic_set_property when
users want to do async flips.
Patch 1 allows async commits with IN_FENCE_ID in any driver.
Patches 2 to 7 have no functional change. As per current code, every driver that
allows async page flips using the atomic API, allows doing it only in the
primary plane. Those patches then enable it for every driver.
Every driver that I found out capable of doing async flips were changed here.
The drivers that weren't touch don't have any mention to
mode_config::async_page_flip, so they are not currently advertising to userspace
that they can do async flips.
Patch 8 changes the current DRM uAPI check from allowing only primary planes to
allowing any plane that the driver allows flipping asynchronously.
Patch 9 finally enables async flip on overlay planes for amdgpu.
Changes from v6:
- Added async_flip check for i915/skl planes (Rodrigo)
- Commit the plane->async_flip check just after all driver had set their
async_flip capabilities (Dmitry)
https://lore.kernel.org/dri-devel/20240614153535.351689-1-andrealmeid@igalia.com/
Changes from v5:
- Instead of enabling plane->async_flip in the common code, move it to driver
code.
- Enable primary plane async flip on every driver
https://lore.kernel.org/dri-devel/20240612193713.167448-1-andrealmeid@igalia.com/
André Almeida (9):
drm/atomic: Allow userspace to use explicit sync with atomic async
flips
drm: Support per-plane async flip configuration
drm/amdgpu: Enable async flips on the primary plane
drm: atmel-hlcdc: Enable async flips on the primary plane
drm/i915: Enable async flips on the primary plane
drm/nouveau: Enable async flips on the primary plane
drm/vc4: Enable async flips on the primary plane
drm: Enable per-plane async flip check
drm/amdgpu: Make it possible to async flip overlay planes
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 2 ++
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 3 +++
drivers/gpu/drm/drm_atomic_uapi.c | 8 +++++---
drivers/gpu/drm/i915/display/i9xx_plane.c | 3 +++
drivers/gpu/drm/i915/display/skl_universal_plane.c | 1 +
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++++
drivers/gpu/drm/nouveau/dispnv50/wndw.c | 4 ++++
drivers/gpu/drm/vc4/vc4_plane.c | 4 +++-
include/drm/drm_plane.h | 5 +++++
9 files changed, 30 insertions(+), 4 deletions(-)
--
2.45.2
Powered by blists - more mailing lists