[PATCH 7/8] drm/amdkfd: Use ASIC-specific SDMA MQD type

Oded Gabbay oded.gabbay at gmail.com
Thu Nov 2 15:01:50 UTC 2017


On Thu, Nov 2, 2017 at 1:22 AM, Felix Kuehling <Felix.Kuehling at amd.com> wrote:
> Signed-off-by: shaoyun liu <shaoyun.liu at amd.com>
> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 13 +++++--------
>  drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c  |  5 +++++
>  drivers/gpu/drm/amd/amdkfd/kfd_priv.h            |  2 --
>  3 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
> index ea02bfa..9873929 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
> @@ -36,6 +36,11 @@ static inline struct cik_mqd *get_mqd(void *mqd)
>         return (struct cik_mqd *)mqd;
>  }
>
> +static inline struct cik_sdma_rlc_registers *get_sdma_mqd(void *mqd)
> +{
> +       return (struct cik_sdma_rlc_registers *)mqd;
> +}
> +
>  static int init_mqd(struct mqd_manager *mm, void **mqd,
>                 struct kfd_mem_obj **mqd_mem_obj, uint64_t *gart_addr,
>                 struct queue_properties *q)
> @@ -362,14 +367,6 @@ static int update_mqd_hiq(struct mqd_manager *mm, void *mqd,
>         return 0;
>  }
>
> -struct cik_sdma_rlc_registers *get_sdma_mqd(void *mqd)
> -{
> -       struct cik_sdma_rlc_registers *m;
> -
> -       m = (struct cik_sdma_rlc_registers *)mqd;
> -
> -       return m;
> -}
>
>  struct mqd_manager *mqd_manager_init_cik(enum KFD_MQD_TYPE type,
>                 struct kfd_dev *dev)
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
> index 4ea854f..dc92497 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
> @@ -38,6 +38,11 @@ static inline struct vi_mqd *get_mqd(void *mqd)
>         return (struct vi_mqd *)mqd;
>  }
>
> +static inline struct vi_sdma_mqd *get_sdma_mqd(void *mqd)
> +{
> +       return (struct vi_sdma_mqd *)mqd;
> +}
> +
>  static int init_mqd(struct mqd_manager *mm, void **mqd,
>                         struct kfd_mem_obj **mqd_mem_obj, uint64_t *gart_addr,
>                         struct queue_properties *q)
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index 9e4134c..4750473 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -643,8 +643,6 @@ int kgd2kfd_resume(struct kfd_dev *kfd);
>  int kfd_init_apertures(struct kfd_process *process);
>
>  /* Queue Context Management */
> -struct cik_sdma_rlc_registers *get_sdma_mqd(void *mqd);
> -
>  int init_queue(struct queue **q, const struct queue_properties *properties);
>  void uninit_queue(struct queue *q);
>  void print_queue_properties(struct queue_properties *q);
> --
> 2.7.4
>
This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay at gmail.com>


More information about the amd-gfx mailing list