dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/6] drm: Add support for atomic async page-flip
@ 2023-08-15 18:57 André Almeida
  2023-08-15 18:57 ` [PATCH v6 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits André Almeida
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: André Almeida @ 2023-08-15 18:57 UTC (permalink / raw)
  To: dri-devel, amd-gfx, linux-kernel, wayland-devel
  Cc: pierre-eric.pelloux-prayer, André Almeida,
	'Marek Olšák',
	Michel Dänzer, Randy Dunlap, Pekka Paalanen, hwentlan,
	kernel-dev, alexander.deucher, christian.koenig, joshua

Hi,

This work from me and Simon adds support for DRM_MODE_PAGE_FLIP_ASYNC through
the atomic API. This feature is already available via the legacy API. The use
case is to be able to present a new frame immediately (or as soon as
possible), even if after missing a vblank. This might result in tearing, but
it's useful when a high framerate is desired, such as for gaming.

Differently from earlier versions, this one refuses to flip if any prop changes
for async flips. The idea is that the fast path of immediate page flips doesn't
play well with modeset changes, so only the fb_id can be changed. The exception
is for mode_id changes, that might be referring to an identical mode (which
would skip a modeset). This is done to make the async API more similar to the
normal API.

Thanks,
	André

- User-space patch: https://github.com/Plagman/gamescope/pull/595
- IGT tests: https://gitlab.freedesktop.org/andrealmeid/igt-gpu-tools/-/tree/atomic_async_page_flip

Changes from v5:
- Add note in the docs that not every redundant attribute will result in no-op,
  some might cause oversynchronization issues.

v5: https://lore.kernel.org/dri-devel/20230707224059.305474-1-andrealmeid@igalia.com/

Changes from v4:
 - Documentation rewrote by Pekka Paalanen

v4: https://lore.kernel.org/dri-devel/20230701020917.143394-1-andrealmeid@igalia.com/

Changes from v3:
 - Add new patch to reject prop changes
 - Add a documentation clarifying the KMS atomic state set

v3: https://lore.kernel.org/dri-devel/20220929184307.258331-1-contact@emersion.fr/

André Almeida (1):
  drm: Refuse to async flip with atomic prop changes

Pekka Paalanen (1):
  drm/doc: Define KMS atomic state set

Simon Ser (4):
  drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits
  drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
  drm: introduce drm_mode_config.atomic_async_page_flip_not_supported
  amd/display: indicate support for atomic async page-flips on DC

 Documentation/gpu/drm-uapi.rst                | 44 ++++++++++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c  |  1 +
 drivers/gpu/drm/drm_atomic_helper.c           |  5 ++
 drivers/gpu/drm/drm_atomic_uapi.c             | 80 +++++++++++++++++--
 drivers/gpu/drm/drm_crtc_internal.h           |  2 +-
 drivers/gpu/drm/drm_ioctl.c                   |  5 ++
 drivers/gpu/drm/drm_mode_object.c             |  2 +-
 .../drm/i915/display/intel_display_driver.c   |  1 +
 drivers/gpu/drm/nouveau/nouveau_display.c     |  1 +
 include/drm/drm_mode_config.h                 | 11 +++
 include/uapi/drm/drm.h                        | 10 ++-
 include/uapi/drm/drm_mode.h                   |  9 +++
 12 files changed, 162 insertions(+), 9 deletions(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-11-13 10:18 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 18:57 [PATCH v6 0/6] drm: Add support for atomic async page-flip André Almeida
2023-08-15 18:57 ` [PATCH v6 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits André Almeida
2023-08-15 18:57 ` [PATCH v6 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP André Almeida
2023-08-15 18:57 ` [PATCH v6 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported André Almeida
2023-08-15 18:57 ` [PATCH v6 4/6] amd/display: indicate support for atomic async page-flips on DC André Almeida
2023-08-15 18:57 ` [PATCH v6 5/6] drm: Refuse to async flip with atomic prop changes André Almeida
2023-08-22  9:55   ` Sebastian Wick
2023-10-15 15:37   ` Simon Ser
2023-08-15 18:57 ` [PATCH v6 6/6] drm/doc: Define KMS atomic state set André Almeida
2023-08-17 10:37   ` Michel Dänzer
2023-08-17 10:48     ` Michel Dänzer
2023-08-21 20:02     ` André Almeida
2023-08-22 10:03       ` Michel Dänzer
2023-10-16 10:52     ` André Almeida
2023-10-16 12:18       ` Pekka Paalanen
2023-10-16 13:42         ` André Almeida
2023-10-16 14:52           ` Pekka Paalanen
2023-10-16 15:01             ` André Almeida
2023-10-16 15:10             ` Ville Syrjälä
2023-10-16 22:00               ` Simon Ser
2023-10-17 12:10                 ` Ville Syrjälä
2023-10-23  8:25                   ` Simon Ser
2023-11-13  9:18                     ` Simon Ser
2023-11-13  9:38                       ` Pekka Paalanen
2023-11-13  9:44                         ` Simon Ser
2023-11-13 10:15                           ` Pekka Paalanen
2023-11-13 10:18                             ` Simon Ser
2023-11-13  9:41                       ` Michel Dänzer
2023-11-13  9:47                         ` Simon Ser
2023-11-13  9:53                           ` Michel Dänzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).