amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Kuehling, Felix" <Felix.Kuehling@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/5] drm/amdkfd: use map_queues for hiq on arcturus as well
Date: Mon, 13 Jan 2020 10:38:20 +0800	[thread overview]
Message-ID: <20200113023818.GA14889@jenkins-Celadon-RN> (raw)
In-Reply-To: <3eb4c086-94ba-2159-50ff-df497586d9fa@amd.com>

On Sat, Jan 11, 2020 at 07:05:40AM +0800, Kuehling, Felix wrote:
> What happens on Arcturus without this patch? Does it oops with a null 
> pointer dereference? If yes, then you should squash this patch into 
> patch 2 to avoid a broken intermediate state.

Yes, Arcturus will get a null pointer panic without this patch becasue
hiq_mqd_load is not inited in arcturus_kfd2kgd. I will squash this patch
into the patch 2.

Thanks,
Ray

> 
> Regards,
>    Felix
> 
> On 2020-01-10 1:37 a.m., Huang Rui wrote:
> > Align with gfx v9, use the map_queues packet to load hiq MQD.
> >
> > Signed-off-by: Huang Rui <ray.huang@amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 1 +
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c   | 6 +++---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h   | 3 +++
> >   3 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
> > index 3c11940..8baad42 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
> > @@ -281,6 +281,7 @@ const struct kfd2kgd_calls arcturus_kfd2kgd = {
> >   	.set_pasid_vmid_mapping = kgd_gfx_v9_set_pasid_vmid_mapping,
> >   	.init_interrupts = kgd_gfx_v9_init_interrupts,
> >   	.hqd_load = kgd_gfx_v9_hqd_load,
> > +	.hiq_mqd_load = kgd_gfx_v9_hiq_mqd_load,
> >   	.hqd_sdma_load = kgd_hqd_sdma_load,
> >   	.hqd_dump = kgd_gfx_v9_hqd_dump,
> >   	.hqd_sdma_dump = kgd_hqd_sdma_dump,
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
> > index ab8c23a..d2f9396 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
> > @@ -324,9 +324,9 @@ int kgd_gfx_v9_hqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id,
> >   	return 0;
> >   }
> >   
> > -static int kgd_gfx_v9_hiq_mqd_load(struct kgd_dev *kgd, void *mqd,
> > -				   uint32_t pipe_id, uint32_t queue_id,
> > -				   uint32_t doorbell_off)
> > +int kgd_gfx_v9_hiq_mqd_load(struct kgd_dev *kgd, void *mqd,
> > +			    uint32_t pipe_id, uint32_t queue_id,
> > +			    uint32_t doorbell_off)
> >   {
> >   	struct amdgpu_device *adev = get_amdgpu_device(kgd);
> >   	struct amdgpu_ring *kiq_ring = &adev->gfx.kiq.ring;
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h
> > index 02b1426..32dd1a9 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h
> > @@ -33,6 +33,9 @@ int kgd_gfx_v9_hqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id,
> >   			uint32_t queue_id, uint32_t __user *wptr,
> >   			uint32_t wptr_shift, uint32_t wptr_mask,
> >   			struct mm_struct *mm);
> > +int kgd_gfx_v9_hiq_mqd_load(struct kgd_dev *kgd, void *mqd,
> > +			    uint32_t pipe_id, uint32_t queue_id,
> > +			    uint32_t doorbell_off);
> >   int kgd_gfx_v9_hqd_dump(struct kgd_dev *kgd,
> >   			uint32_t pipe_id, uint32_t queue_id,
> >   			uint32_t (**dump)[2], uint32_t *n_regs);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-01-13  2:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  6:37 [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue Huang Rui
2020-01-10  6:37 ` [PATCH 2/5] drm/amdkfd: use kiq to load the mqd of hiq queue for gfx v9 (v5) Huang Rui
2020-01-10  6:37 ` [PATCH 3/5] drm/amdkfd: use map_queues for hiq on arcturus as well Huang Rui
2020-01-10 23:05   ` Felix Kuehling
2020-01-13  2:38     ` Huang Rui [this message]
2020-01-10  6:37 ` [PATCH 4/5] drm/amdkfd: use map_queues for hiq on gfx v10 " Huang Rui
2020-01-10 23:08   ` Felix Kuehling
2020-01-13  9:07     ` Huang Rui
2020-01-10  6:37 ` [PATCH 5/5] drm/amdkfd: use map_queues for hiq on gfx v8 " Huang Rui
2020-01-10 23:09   ` Felix Kuehling
2020-01-14  9:36 ` [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue Huang Rui
2020-01-14 15:30   ` Felix Kuehling
2020-01-15  2:55     ` Huang Rui

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=20200113023818.GA14889@jenkins-Celadon-RN \
    --to=ray.huang@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Felix.Kuehling@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;
as well as URLs for NNTP newsgroup(s).