lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFZQkGwG7FLU1Lw8aRo20ox3ccJbEntSB=iZZURrXEJKLQoyhw@mail.gmail.com>
Date: Wed, 29 Jan 2025 15:36:52 +0100
From: Xaver Hugl <xaver.hugl@...il.com>
To: André Almeida <andrealmeid@...lia.com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
	Harry Wentland <harry.wentland@....com>, Leo Li <sunpeng.li@....com>, 
	Rodrigo Siqueira <Rodrigo.Siqueira@....com>, Alex Deucher <alexander.deucher@....com>, 
	Christian König <christian.koenig@....com>, 
	Xinhui Pan <Xinhui.Pan@....com>, dmitry.baryshkov@...aro.org, 
	Simon Ser <contact@...rsion.fr>, joshua@...ggi.es, Daniel Stone <daniel@...ishbar.org>, 
	ville.syrjala@...ux.intel.com, kernel-dev@...lia.com, 
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	amd-gfx@...ts.freedesktop.org
Subject: Re: [PATCH v12 2/2] drm/amdgpu: Enable async flip on overlay planes

Am Mo., 27. Jan. 2025 um 21:00 Uhr schrieb André Almeida
<andrealmeid@...lia.com>:
>
> amdgpu can handle async flips on overlay planes, so allow it for atomic
> async checks.
>
> Signed-off-by: André Almeida <andrealmeid@...lia.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?

>         new_plane_state = drm_atomic_get_new_plane_state(state, plane);
>         new_crtc_state = drm_atomic_get_new_crtc_state(state, new_plane_state->crtc);
>         dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
>         /* Reject overlay cursors for now*/
> -       if (dm_new_crtc_state->cursor_mode == DM_CURSOR_OVERLAY_MODE)
> +       if (!flip && dm_new_crtc_state->cursor_mode == DM_CURSOR_OVERLAY_MODE)
>                 return -EINVAL;
>
>         return 0;
>
> --
> 2.48.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ