AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Simon Ser <contact@emersion.fr>
Cc: andrealmeid@igalia.com, daniel.vetter@ffwll.ch,
	amd-gfx@lists.freedesktop.org,
	wayland-devel@lists.freedesktop.org, mwen@igalia.com,
	dri-devel@lists.freedesktop.org, alexander.deucher@amd.com,
	joshua@froggi.es, hwentlan@amd.com, nicholas.kazlauskas@amd.com,
	ville.syrjala@linux.intel.com
Subject: Re: [PATCH v2 4/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits
Date: Wed, 31 Aug 2022 10:50:07 +0300	[thread overview]
Message-ID: <20220831105007.69e4c3e0@eldfell> (raw)
In-Reply-To: <20220830172851.269402-5-contact@emersion.fr>

[-- Attachment #1: Type: text/plain, Size: 2466 bytes --]

On Tue, 30 Aug 2022 17:29:35 +0000
Simon Ser <contact@emersion.fr> wrote:

> If the driver supports it, allow user-space to supply the
> DRM_MODE_PAGE_FLIP_ASYNC flag to request an async page-flip.
> Set drm_crtc_state.async_flip accordingly.
> 
> Document that drivers will reject atomic commits if an async
> flip isn't possible. This allows user-space to fall back to
> something else. For instance, Xorg falls back to a blit.
> Another option is to wait as close to the next vblank as
> possible before performing the page-flip to reduce latency.
> 
> v2: document new uAPI
> 
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Co-developed-by: André Almeida <andrealmeid@igalia.com>
> Signed-off-by: André Almeida <andrealmeid@igalia.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Joshua Ashton <joshua@froggi.es>
> Cc: Melissa Wen <mwen@igalia.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Harry Wentland <hwentlan@amd.com>
> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_atomic_uapi.c | 28 +++++++++++++++++++++++++---
>  include/uapi/drm/drm_mode.h       |  4 ++++
>  2 files changed, 29 insertions(+), 3 deletions(-)

...

> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 86a292c3185a..cce1a1bea645 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -942,6 +942,10 @@ struct hdr_output_metadata {
>   * Request that the page-flip is performed as soon as possible, ie. with no
>   * delay due to waiting for vblank. This may cause tearing to be visible on
>   * the screen.
> + *
> + * When used with atomic uAPI, the driver will return an error if the hardware
> + * doesn't support performing an asynchronous page-flip for this update.
> + * User-space should handle this, e.g. by falling back to a regular page-flip.
>   */
>  #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
>  #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4

Hi Simon,

recalling what Ville explained that enabling async flips might require
one more sync flip first, how is that supposed to work?

A TEST_ONLY commit is not allowed to change hardware state, and a
failing real commit is not allowed to change hardware state either
(right?), therefore a failing async flip cannot prepare the next flip
to be async, meaning async will never work.


Thanks,
pq

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-08-31  7:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 17:29 [PATCH v2 0/6] Add support for atomic async page-flips Simon Ser
2022-08-30 17:29 ` [PATCH v2 1/6] amd/display: only accept async flips for fast updates Simon Ser
2022-08-30 17:29 ` [PATCH v2 2/6] drm: document DRM_MODE_PAGE_FLIP_ASYNC Simon Ser
2022-08-30 17:29 ` [PATCH v2 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported Simon Ser
2022-08-30 17:29 ` [PATCH v2 4/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits Simon Ser
2022-08-31  7:50   ` Pekka Paalanen [this message]
2022-08-31 14:56     ` Simon Ser
2022-08-31 15:52       ` Ville Syrjälä
2022-08-30 17:29 ` [PATCH v2 5/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP Simon Ser
2022-08-30 17:29 ` [PATCH v2 6/6] amd/display: indicate support for atomic async page-flips on DC Simon Ser
2022-09-22 14:16 ` [PATCH v2 0/6] Add support for atomic async page-flips André Almeida
2022-09-29 14:13 ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220831105007.69e4c3e0@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@igalia.com \
    --cc=contact@emersion.fr \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hwentlan@amd.com \
    --cc=joshua@froggi.es \
    --cc=mwen@igalia.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wayland-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox