public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND v9 0/2] drm/atomic: Ease async flip restrictions
@ 2024-11-01 18:23 André Almeida
  2024-11-01 18:23 ` [PATCH RESEND v9 1/2] drm/atomic: Let drivers decide which planes to async flip André Almeida
  2024-11-01 18:23 ` [PATCH RESEND v9 2/2] drm/amdgpu: Enable async flip on overlay planes André Almeida
  0 siblings, 2 replies; 11+ messages in thread
From: André Almeida @ 2024-11-01 18:23 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Harry Wentland, Leo Li, Rodrigo Siqueira,
	Alex Deucher, Christian König, Xinhui Pan, dmitry.baryshkov,
	Simon Ser, joshua, Xaver Hugl, Daniel Stone, ville.syrjala
  Cc: kernel-dev, dri-devel, linux-kernel, amd-gfx, André Almeida

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 a 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
 v8: https://lore.kernel.org/lkml/20240806135300.114469-1-andrealmeid@igalia.com/
 - Rebased on top of 6.12-rc1 (drm/drm-next)

Changelog
 v7: https://lore.kernel.org/dri-devel/20240618030024.500532-1-andrealmeid@igalia.com/
 - Complete rewrite

---
Changes in v10:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v9: https://lore.kernel.org/r/20241002-tonyk-async_flip-v9-0-453b1b8977bd@igalia.com

---
André Almeida (2):
      drm/atomic: Let drivers decide which planes to async flip
      drm/amdgpu: Enable async flip on overlay planes

 .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c    |  3 +-
 drivers/gpu/drm/drm_atomic_uapi.c                  | 39 ++++++++++++++++------
 2 files changed, 30 insertions(+), 12 deletions(-)
---
base-commit: 81983758430957d9a5cb3333fe324fd70cf63e7e
change-id: 20241002-tonyk-async_flip-828cfe9cf3ca

Best regards,
-- 
André Almeida <andrealmeid@igalia.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-11-12 16:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 18:23 [PATCH RESEND v9 0/2] drm/atomic: Ease async flip restrictions André Almeida
2024-11-01 18:23 ` [PATCH RESEND v9 1/2] drm/atomic: Let drivers decide which planes to async flip André Almeida
2024-11-03  4:10   ` Dmitry Baryshkov
2024-11-03  6:36   ` Christopher Snowhill
2024-11-04 20:52     ` André Almeida
2024-11-05 10:15       ` Christopher Snowhill
2024-11-05 10:51         ` Dmitry Baryshkov
2024-11-06  5:04           ` Christopher Snowhill
2024-11-01 18:23 ` [PATCH RESEND v9 2/2] drm/amdgpu: Enable async flip on overlay planes André Almeida
2024-11-11 21:10   ` Harry Wentland
2024-11-12 16:44     ` André Almeida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox