mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: Xaver Hugl <xaver.hugl@gmail.com>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Xinhui Pan" <Xinhui.Pan@amd.com>,
	dmitry.baryshkov@linaro.org, "Simon Ser" <contact@emersion.fr>,
	joshua@froggi.es, "Daniel Stone" <daniel@fooishbar.org>,
	ville.syrjala@linux.intel.com, kernel-dev@igalia.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v12 2/2] drm/amdgpu: Enable async flip on overlay planes
Date: Wed, 29 Jan 2025 12:53:05 -0300	[thread overview]
Message-ID: <59b06cd5-979d-47a7-b955-c565b23ae21b@igalia.com> (raw)
In-Reply-To: <CAFZQkGwG7FLU1Lw8aRo20ox3ccJbEntSB=iZZURrXEJKLQoyhw@mail.gmail.com>

Em 29/01/2025 11:36, Xaver Hugl escreveu:
> Am Mo., 27. Jan. 2025 um 21:00 Uhr schrieb André Almeida
> <andrealmeid@igalia.com>:
>>
>> amdgpu can handle async flips on overlay planes, so allow it for atomic
>> async checks.
>>
>> Signed-off-by: André Almeida <andrealmeid@igalia.com>
>> ---
>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 10 ++++++----
>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
>> index 774cc3f4f3fd9a964fe48c66eb596d2f6dfee602..6bfed3d1530e6610eea025b477f409ee505870da 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
>> @@ -1258,21 +1258,23 @@ static int amdgpu_dm_plane_atomic_check(struct drm_plane *plane,
>>   }
>>
>>   static int amdgpu_dm_plane_atomic_async_check(struct drm_plane *plane,
>> -                                             struct drm_atomic_state *state)
>> +                                             struct drm_atomic_state *state, bool flip)
>>   {
>>          struct drm_crtc_state *new_crtc_state;
>>          struct drm_plane_state *new_plane_state;
>>          struct dm_crtc_state *dm_new_crtc_state;
>>
>> -       /* Only support async updates on cursor planes. */
>> -       if (plane->type != DRM_PLANE_TYPE_CURSOR)
>> +       if (flip) {
>> +               if (plane->type != DRM_PLANE_TYPE_OVERLAY)
>> +                       return -EINVAL;
>> +       } else if (plane->type != DRM_PLANE_TYPE_CURSOR)
>>                  return -EINVAL;
> 
> This changes the logic for cursor updates, flipping on the cursor
> plane allowed async updates before. Is that intentional?
> 

It's not the intention of this patch to disable async updates on cursor 
planes... but I don't think it's happening here? Async plane updates and 
async page flips are different things.

Any function that used to call amdgpu_dm_plane_atomic_async_check() for 
an async update on a cursor plane will continue to being able to do that.

For callers of _atomic_async_check() from a page flip path (like 
drm_atomic_set_property()), those couldn't flip a cursor plane, and will 
continue to be like that for now.

At least this is my analysis, please let me know if I got something wrong.

  reply	other threads:[~2025-01-29 15:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 19:59 [PATCH v12 0/2] drm/atomic: Ease async flip restrictions André Almeida
2025-01-27 19:59 ` [PATCH v12 1/2] drm/atomic: Let drivers decide which planes to async flip André Almeida
2025-01-27 19:59 ` [PATCH v12 2/2] drm/amdgpu: Enable async flip on overlay planes André Almeida
2025-01-29 14:36   ` Xaver Hugl
2025-01-29 15:53     ` André Almeida [this message]
2025-01-29 17:23       ` Xaver Hugl
2025-02-06 22:22   ` Harry Wentland
2025-02-12 14:54     ` Alex Deucher
2025-02-13 22:55 ` [PATCH v12 0/2] drm/atomic: Ease async flip restrictions Dmitry Baryshkov

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=59b06cd5-979d-47a7-b955-c565b23ae21b@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=contact@emersion.fr \
    --cc=daniel@fooishbar.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=joshua@froggi.es \
    --cc=kernel-dev@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sunpeng.li@amd.com \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=xaver.hugl@gmail.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

all inboxes | Powered by JetHome®