mbox series

[v2,0/6] Add support for atomic async page-flips

Message ID 20220830172851.269402-1-contact@emersion.fr (mailing list archive)
Headers show
Series Add support for atomic async page-flips | expand

Message

Simon Ser Aug. 30, 2022, 5:29 p.m. UTC
This series adds support for DRM_MODE_PAGE_FLIP_ASYNC for atomic
commits, aka. "immediate flip" (which might result in tearing).
The feature was only available via the legacy uAPI, however for
gaming use-cases it may be desirable to enable it via the atomic
uAPI too.

- v1: https://patchwork.freedesktop.org/series/107683/
- User-space patch: https://github.com/Plagman/gamescope/pull/595
- IGT patch: https://patchwork.freedesktop.org/series/107681/

Main changes in v2: add docs, fail atomic commit if async flip isn't
possible.

Tested on an AMD Picasso iGPU.

Simon Ser (6):
  amd/display: only accept async flips for fast updates
  drm: document DRM_MODE_PAGE_FLIP_ASYNC
  drm: introduce drm_mode_config.atomic_async_page_flip_not_supported
  drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits
  drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
  amd/display: indicate support for atomic async page-flips on DC

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  8 ++++++
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 10 +++++++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c  |  1 +
 drivers/gpu/drm/drm_atomic_uapi.c             | 28 +++++++++++++++++--
 drivers/gpu/drm/drm_ioctl.c                   |  5 ++++
 drivers/gpu/drm/i915/display/intel_display.c  |  1 +
 drivers/gpu/drm/nouveau/nouveau_display.c     |  1 +
 drivers/gpu/drm/vc4/vc4_kms.c                 |  1 +
 include/drm/drm_mode_config.h                 | 11 ++++++++
 include/uapi/drm/drm.h                        | 10 ++++++-
 include/uapi/drm/drm_mode.h                   | 11 ++++++++
 11 files changed, 83 insertions(+), 4 deletions(-)

Comments

André Almeida Sept. 22, 2022, 2:16 p.m. UTC | #1
Hi Simon,

On 8/30/22 14:29, Simon Ser wrote:
> This series adds support for DRM_MODE_PAGE_FLIP_ASYNC for atomic
> commits, aka. "immediate flip" (which might result in tearing).
> The feature was only available via the legacy uAPI, however for
> gaming use-cases it may be desirable to enable it via the atomic
> uAPI too.
> 
> - v1: https://patchwork.freedesktop.org/series/107683/
> - User-space patch: https://github.com/Plagman/gamescope/pull/595
> - IGT patch: https://patchwork.freedesktop.org/series/107681/
> 
> Main changes in v2: add docs, fail atomic commit if async flip isn't
> possible.
> 
> Tested on an AMD Picasso iGPU.
> 

I tested on an AMD vangogh GPU and worked with the IGT tests.

This series is Reviewed-by: André Almeida <andrealmeid@igalia.com>

> Simon Ser (6):
>    amd/display: only accept async flips for fast updates
>    drm: document DRM_MODE_PAGE_FLIP_ASYNC
>    drm: introduce drm_mode_config.atomic_async_page_flip_not_supported
>    drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits
>    drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
>    amd/display: indicate support for atomic async page-flips on DC
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  8 ++++++
>   .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 10 +++++++
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c  |  1 +
>   drivers/gpu/drm/drm_atomic_uapi.c             | 28 +++++++++++++++++--
>   drivers/gpu/drm/drm_ioctl.c                   |  5 ++++
>   drivers/gpu/drm/i915/display/intel_display.c  |  1 +
>   drivers/gpu/drm/nouveau/nouveau_display.c     |  1 +
>   drivers/gpu/drm/vc4/vc4_kms.c                 |  1 +
>   include/drm/drm_mode_config.h                 | 11 ++++++++
>   include/uapi/drm/drm.h                        | 10 ++++++-
>   include/uapi/drm/drm_mode.h                   | 11 ++++++++
>   11 files changed, 83 insertions(+), 4 deletions(-)
>
Alex Deucher Sept. 29, 2022, 2:13 p.m. UTC | #2
On Tue, Aug 30, 2022 at 1:29 PM Simon Ser <contact@emersion.fr> wrote:
>
> This series adds support for DRM_MODE_PAGE_FLIP_ASYNC for atomic
> commits, aka. "immediate flip" (which might result in tearing).
> The feature was only available via the legacy uAPI, however for
> gaming use-cases it may be desirable to enable it via the atomic
> uAPI too.
>
> - v1: https://patchwork.freedesktop.org/series/107683/
> - User-space patch: https://github.com/Plagman/gamescope/pull/595
> - IGT patch: https://patchwork.freedesktop.org/series/107681/
>
> Main changes in v2: add docs, fail atomic commit if async flip isn't
> possible.
>
> Tested on an AMD Picasso iGPU.

Series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

>
> Simon Ser (6):
>   amd/display: only accept async flips for fast updates
>   drm: document DRM_MODE_PAGE_FLIP_ASYNC
>   drm: introduce drm_mode_config.atomic_async_page_flip_not_supported
>   drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits
>   drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
>   amd/display: indicate support for atomic async page-flips on DC
>
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  8 ++++++
>  .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 10 +++++++
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c  |  1 +
>  drivers/gpu/drm/drm_atomic_uapi.c             | 28 +++++++++++++++++--
>  drivers/gpu/drm/drm_ioctl.c                   |  5 ++++
>  drivers/gpu/drm/i915/display/intel_display.c  |  1 +
>  drivers/gpu/drm/nouveau/nouveau_display.c     |  1 +
>  drivers/gpu/drm/vc4/vc4_kms.c                 |  1 +
>  include/drm/drm_mode_config.h                 | 11 ++++++++
>  include/uapi/drm/drm.h                        | 10 ++++++-
>  include/uapi/drm/drm_mode.h                   | 11 ++++++++
>  11 files changed, 83 insertions(+), 4 deletions(-)
>
> --
> 2.37.2
>
>