[PATCH 3/5] drm/amdkfd: use map_queues for hiq on arcturus as well
Felix Kuehling
felix.kuehling at amd.com
Fri Jan 10 23:05:40 UTC 2020
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.
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 at 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);
More information about the amd-gfx
mailing list