mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: "Benjamin Cheng" <ben@bcheng.me>,
	"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>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amd/display: Write to correct dirty_rect
Date: Mon, 13 Mar 2023 08:00:29 -0400	[thread overview]
Message-ID: <6f9453d7-d7c0-62ff-c7e9-42067a9fb207@amd.com> (raw)
In-Reply-To: <20230313004739.3110719-1-ben@bcheng.me>

On 3/12/23 20:47, Benjamin Cheng wrote:
> When FB_DAMAGE_CLIPS are provided in a non-MPO scenario, the loop does
> not use the counter i. This causes the fill_dc_dity_rect() to always
> fill dirty_rects[0], causing graphical artifacts when a damage clip
> aware DRM client sends more than 1 damage clip.
> 
> Instead, use the flip_addrs->dirty_rect_count which is incremented by
> fill_dc_dirty_rect() on a successful fill.
> 
> Fixes: 30ebe41582d1 ("drm/amd/display: add FB_DAMAGE_CLIPS support")
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2453
> Signed-off-by: Benjamin Cheng <ben@bcheng.me>

Applied, thanks for catching this!

> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> 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 8af58bba503f..a89ec2cc4ffc 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -5130,9 +5130,9 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,
>   
>   		for (; flip_addrs->dirty_rect_count < num_clips; clips++)
>   			fill_dc_dirty_rect(new_plane_state->plane,
> -					   &dirty_rects[i], clips->x1,
> -					   clips->y1, clips->x2 - clips->x1,
> -					   clips->y2 - clips->y1,
> +					   &dirty_rects[flip_addrs->dirty_rect_count],
> +					   clips->x1, clips->y1,
> +					   clips->x2 - clips->x1, clips->y2 - clips->y1,
>   					   &flip_addrs->dirty_rect_count,
>   					   false);
>   		return;

-- 
Hamza


      reply	other threads:[~2023-03-13 11:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13  0:47 Benjamin Cheng
2023-03-13 12:00 ` 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=6f9453d7-d7c0-62ff-c7e9-42067a9fb207@amd.com \
    --to=hamza.mahfooz@amd.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=ben@bcheng.me \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®