Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: sunpeng.li@amd.com, amd-gfx@lists.freedesktop.org
Cc: harry.wentland@amd.com, Rodrigo.Siqueira@amd.com,
	stable@vger.kernel.org,
	Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Subject: Re: [PATCH] drm/amd/display: Fail atomic_check early on normalize_zpos error
Date: Mon, 13 Feb 2023 11:01:06 -0500	[thread overview]
Message-ID: <904b2f2c-960f-d564-3741-4f5c184d8a10@amd.com> (raw)
In-Reply-To: <20230213155126.29435-1-sunpeng.li@amd.com>

On 2/13/23 10:51, sunpeng.li@amd.com wrote:
> From: Leo Li <sunpeng.li@amd.com>
> 
> [Why]
> 
> drm_atomic_normalize_zpos() can return an error code when there's
> modeset lock contention. This was being ignored.
> 
> [How]
> 
> Bail out of atomic check if normalize_zpos() returns an error.
> 
> Fixes: b261509952bc ("drm/amd/display: Fix double cursor on non-video RGB MPO")
> Signed-off-by: Leo Li <sunpeng.li@amd.com>
> Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>

Cc: stable@vger.kernel.org

Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>

> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index c10982f841f98..cb2a57503000d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -9889,7 +9889,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>   	 * `dcn10_can_pipe_disable_cursor`). By now, all modified planes are in
>   	 * atomic state, so call drm helper to normalize zpos.
>   	 */
> -	drm_atomic_normalize_zpos(dev, state);
> +	ret = drm_atomic_normalize_zpos(dev, state);
> +	if (ret) {
> +		drm_dbg(dev, "drm_atomic_normalize_zpos() failed\n");
> +		goto fail;
> +	}
>   
>   	/* Remove exiting planes if they are modified */
>   	for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {

-- 
Hamza


      reply	other threads:[~2023-02-13 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 15:51 [PATCH] drm/amd/display: Fail atomic_check early on normalize_zpos error sunpeng.li
2023-02-13 16:01 ` Hamza Mahfooz [this message]

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=904b2f2c-960f-d564-3741-4f5c184d8a10@amd.com \
    --to=hamza.mahfooz@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=mikhail.v.gavrilov@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=sunpeng.li@amd.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