linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Helen Koike <helen.koike@collabora.com>
Cc: "Heiko Stübner" <heiko@sntech.de>,
	"Sean Paul" <seanpaul@google.com>,
	alexandros.frantzis@collabora.com,
	"David Airlie" <airlied@linux.ie>,
	daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, "Eric Anholt" <eric@anholt.net>,
	"Mamta Shukla" <mamtashukla555@gmail.com>,
	tina.zhang@intel.com, kernel@collabora.com,
	"Anthony Koo" <Anthony.Koo@amd.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Jonathan Corbet" <corbet@lwn.net>, "Sean Paul" <sean@poorly.run>,
	"David Francis" <David.Francis@amd.com>,
	linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	"Gustavo Padovan" <gustavo.padovan@collabora.com>,
	linux-rockchip@lists.infradead.org,
	"Harry Wentland" <harry.wentland@amd.com>,
	daniels@collabora.com, "Leo Li" <sunpeng.li@amd.com>,
	linux-arm-msm@vger.kernel.org,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Mikita Lipski" <mikita.lipski@amd.com>,
	"Bhawanpreet Lakha" <Bhawanpreet.Lakha@amd.com>,
	linux-arm-kernel@lists.infradead.org, dnicoara@chromium.org,
	"Stéphane Marchesin" <marcheu@google.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"tomasz Figa" <tfiga@chromium.org>,
	"Rob Clark" <robdclark@gmail.com>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	freedreno@lists.freedesktop.org, nicholas.kazlauskas@amd.com
Subject: Re: [PATCH v3 2/4] drm/atomic: rename async_{update,check} to amend_{update,check}
Date: Fri, 12 Apr 2019 15:49:57 +0200	[thread overview]
Message-ID: <20190412154957.558e49f8@collabora.com> (raw)
In-Reply-To: <20190412125827.5877-3-helen.koike@collabora.com>

Hi Helen,

On Fri, 12 Apr 2019 09:58:25 -0300
Helen Koike <helen.koike@collabora.com> wrote:

> Asynchronous update is the ability change the hw state at any time, not
> only during vblank.
> 
> Amend mode is the ability to perform 1000 commits to be applied as soon
> as possible without waiting for 1000 vblanks.
> 
> async updates can be seen as amend, but the opposite is not true.
> 
> &drm_plane_helper_funcs.atomic_async_{update,check}() was being used by
> drivers to implement amend and not async. So rename them to amend.
> 
> Also improve docs explaining the difference.
> 
> If asynchronous is required, normal page flip can be performed using
> DRM_MODE_PAGE_FLIP_ASYNC flag.
> 
> Signed-off-by: Helen Koike <helen.koike@collabora.com>
> 
> ---
> Hello,
> 
> I would like to officially clarify what async update means by adding it
> in the docs.
> Please correct me if I am wrong, but the current async_{update,check}
> callbacks are being used to do amend (the legacy cursor behavior), i.e.
> to allow 1000 updates without waiting for 1000 vblanks.

Right now, the semantic of async update is driver dependent. Some
drivers will amend the last commit touching that plane (amend semantic),
others will update the plane buffer immediately which might cause
tearing (async semantic).

> 
> So I would like to clarify this in the docs and rename the current
> callbacks to reflect this behaviour.

I'm all for this clarification, but I don't think renaming the async
hooks is a good idea, since some drivers will not do real 'amend'. So,
you're changing the name, but it's still confusing :-).

How about adding new hooks (and/or flags) for the AMEND case, and
keeping the async path untouched. We can then let drivers that
currently implement async as amend implement the amend hooks instead.
Once you've done that, you can hook that up to the legacy cursor update
path so that it first tries one then the other and finally falls back
to a sync update if none of ASYNC/AMEND is possible.

> 
> I also see that for real async updates, the flag
> DRM_MODE_PAGE_FLIP_ASYNC can be used in a normal sync update (it is
> already being used by some drivers actually, in the atomic path, not only
> in the legacy page flip, at least is what I understood from
> amdgpu_dm_atomic_commit_tail() implementation).

Yes, right now, async does not necessarily imply non-block, but
Daniel seemed to think that most users want non-block when they do an
async page flip, so maybe it should be clarified too.

Regards,

Boris

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-04-12 13:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 12:58 [PATCH v3 0/4] async vs amend - UAPI Helen Koike
2019-04-12 12:58 ` [PATCH v3 2/4] drm/atomic: rename async_{update, check} to amend_{update, check} Helen Koike
2019-04-12 13:49   ` Boris Brezillon [this message]
2019-04-12 14:06     ` [PATCH v3 2/4] drm/atomic: rename async_{update,check} to amend_{update,check} Helen Koike
2019-04-12 14:38       ` Boris Brezillon
2019-04-12 12:58 ` [PATCH RFC v3 4/4] drm/atomic: hook atomic_async_{check, update} with PAGE_FLIP_ASYNC flag Helen Koike
2019-04-12 13:39   ` [PATCH RFC v3 4/4] drm/atomic: hook atomic_async_{check,update} " Helen Koike

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=20190412154957.558e49f8@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=Anthony.Koo@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=David.Francis@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=alexandros.frantzis@collabora.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=corbet@lwn.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=dnicoara@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=freedreno@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.com \
    --cc=harry.wentland@amd.com \
    --cc=heiko@sntech.de \
    --cc=helen.koike@collabora.com \
    --cc=hjc@rock-chips.com \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mamtashukla555@gmail.com \
    --cc=marcheu@google.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=mikita.lipski@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=seanpaul@google.com \
    --cc=sunpeng.li@amd.com \
    --cc=tfiga@chromium.org \
    --cc=tina.zhang@intel.com \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).