AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Su, Jinzhou (Joe)" <Jinzhou.Su@amd.com>
Cc: "Kamliya, Prakash" <Prakash.Kamliya@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: Set doorbell range for gfx ring
Date: Fri, 27 Nov 2020 16:42:30 +0800	[thread overview]
Message-ID: <20201127084230.GA605160@hr-amd> (raw)
In-Reply-To: <20201127080907.12337-1-Jinzhou.Su@amd.com>

On Fri, Nov 27, 2020 at 04:09:07PM +0800, Su, Jinzhou (Joe) wrote:
> If there are 2 gfx rings, the doorbell lower range of second ring
> will override the first ring.
> 
> Signed-off-by: Jinzhou.Su <Jinzhou.Su@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index ffbda6680a68..f33e54b01d3a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -6357,8 +6357,11 @@ static int gfx_v10_0_gfx_mqd_init(struct amdgpu_ring *ring)
>  				    DOORBELL_EN, 0);
>  	mqd->cp_rb_doorbell_control = tmp;
>  
> -	/* set doorbell range */
> -	gfx_v10_0_cp_gfx_set_doorbell(adev, ring);
> +	/*if there are 2 gfx rings, set the lower doorbell range of the first ring,
> +	 *otherwise the range of the second ring will override the first ring */
> +	if (ring->doorbell_index == adev->doorbell_index.gfx_ring0 << 1)

Maybe you can compare if ring->name is "gfx_0.0.0" here.

Anyway, patch is Reviewed-by: Huang Rui <ray.huang@amd.com>

> +		gfx_v10_0_cp_gfx_set_doorbell(adev, ring);
> +
>  	/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */
>  	ring->wptr = 0;
>  	mqd->cp_gfx_hqd_rptr = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_RPTR);
> -- 
> 2.17.1
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2020-11-27  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  8:09 [PATCH] drm/amdgpu: Set doorbell range for gfx ring Jinzhou Su
2020-11-27  8:42 ` Huang Rui [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=20201127084230.GA605160@hr-amd \
    --to=ray.huang@amd.com \
    --cc=Jinzhou.Su@amd.com \
    --cc=Prakash.Kamliya@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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