All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Du, Xiaojian" <Xiaojian.Du@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/amdgpu: handle asics with 1 SDMA instance
Date: Thu, 5 May 2022 14:23:55 +0800	[thread overview]
Message-ID: <YnNtezRMTqBmge+D@amd.com> (raw)
In-Reply-To: <CADnq5_O5CiO0vW=3s6Uf3HcRnPFRO2RK6KEGbZqjwK_ofqXpjw@mail.gmail.com>

On Thu, May 05, 2022 at 10:52:31AM +0800, Alex Deucher wrote:
> On Wed, May 4, 2022 at 2:28 AM Christian König <christian.koenig@amd.com> wrote:
> >
> > Am 03.05.22 um 22:38 schrieb Alex Deucher:
> > > From: Xiaojian Du <Xiaojian.Du@amd.com>
> > >
> > > This patch will handle asics with 1 SDMA instance.
> > >
> > > Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
> > > Reviewed-by: Huang Rui <ray.huang@amd.com>
> > > Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > > ---
> > >   drivers/gpu/drm/amd/amdgpu/soc21.c | 5 +++--
> > >   1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c
> > > index 307a1da13557..29acc5573f56 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/soc21.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/soc21.c
> > > @@ -252,8 +252,9 @@ static int soc21_read_register(struct amdgpu_device *adev, u32 se_num,
> > >       *value = 0;
> > >       for (i = 0; i < ARRAY_SIZE(soc21_allowed_read_registers); i++) {
> > >               en = &soc21_allowed_read_registers[i];
> > > -             if (reg_offset !=
> > > -                 (adev->reg_offset[en->hwip][en->inst][en->seg] + en->reg_offset))
> > > +             if ((i == 7 && (adev->sdma.num_instances == 1)) || /* some asics don't have SDMA1 */
> > > +                     reg_offset !=
> > > +                     (adev->reg_offset[en->hwip][en->inst][en->seg] + en->reg_offset))
> >
> > Hui what? Why do we filter out register reads in the low level function?
> 
> It was copied from nv.c.  The proper solution is to handle it like we
> do in soc15.c:
> if (adev->reg_offset[en->hwip][en->inst] &&
>                     reg_offset != (adev->reg_offset[en->hwip][en->inst][en->seg]
>                                         + en->reg_offset))
>                     continue;
> 

The SDMA1_BASE are not contained in GC V11.0.1 APUs, so cannot refer this
pointer. Above check is better than before, thanks!

Thanks,
Ray

      reply	other threads:[~2022-05-05  6:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 20:38 [PATCH 1/2] drm/amdgpu: handle asics with 1 SDMA instance Alex Deucher
2022-05-03 20:38 ` [PATCH 2/2] drm/amdgpu: skip the new gc doorbell function for some asics Alex Deucher
2022-05-04  6:27 ` [PATCH 1/2] drm/amdgpu: handle asics with 1 SDMA instance Christian König
2022-05-05  2:52   ` Alex Deucher
2022-05-05  6:23     ` 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=YnNtezRMTqBmge+D@amd.com \
    --to=ray.huang@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Xiaojian.Du@amd.com \
    --cc=alexdeucher@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.