[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230701020917.143394-1-andrealmeid@igalia.com>
Date: Fri, 30 Jun 2023 23:09:11 -0300
From: André Almeida <andrealmeid@...lia.com>
To: dri-devel@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, wayland-devel@...ts.freedesktop.org
Cc: kernel-dev@...lia.com, alexander.deucher@....com,
christian.koenig@....com, pierre-eric.pelloux-prayer@....com,
Simon Ser <contact@...rsion.fr>,
Rob Clark <robdclark@...il.com>,
Pekka Paalanen <ppaalanen@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Daniel Stone <daniel@...ishbar.org>,
'Marek Olšák' <maraeo@...il.com>,
Dave Airlie <airlied@...il.com>,
Michel Dänzer <michel.daenzer@...lbox.org>,
Italo Nicola <italonicola@...labora.com>,
Randy Dunlap <rdunlap@...radead.org>, hwentlan@....com,
joshua@...ggi.es, ville.syrjala@...ux.intel.com,
André Almeida <andrealmeid@...lia.com>
Subject: [PATCH v4 0/6] drm: Add support for atomic async page-flip
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é
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/
- 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
André Almeida (2):
drm: Refuse to async flip with atomic prop changes
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 | 19 +++++
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 +-
drivers/gpu/drm/i915/display/intel_display.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, 137 insertions(+), 9 deletions(-)
--
2.41.0
Powered by blists - more mailing lists