[PATCH] drm/amdkfd: Delete KFD_MQD_TYPE_COMPUTE
Felix Kuehling
felix.kuehling at amd.com
Wed Nov 20 17:55:21 UTC 2019
n 2019-11-15 11:07, Yong Zhao wrote:
> It is the same as KFD_MQD_TYPE_CP, so delete it. As a result, we will
> have one less mqd mananger per device.
>
> Change-Id: Iaa98fc17be06b216de7a826c3577f44bc0536b4c
> Signed-off-by: Yong Zhao <Yong.Zhao at amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +-
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 3 +--
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 -
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 1 -
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 3 +--
> drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 +--
> 6 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> index b42f34ef2b5c..f7f6df40875e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> @@ -1595,7 +1595,7 @@ static int get_wave_state(struct device_queue_manager *dqm,
> goto dqm_unlock;
> }
>
> - mqd_mgr = dqm->mqd_mgrs[KFD_MQD_TYPE_COMPUTE];
> + mqd_mgr = dqm->mqd_mgrs[KFD_MQD_TYPE_CP];
>
> if (!mqd_mgr->get_wave_state) {
> r = -EINVAL;
> 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 28876aceb14b..b08694ec65d7 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
> @@ -374,7 +374,6 @@ struct mqd_manager *mqd_manager_init_cik(enum KFD_MQD_TYPE type,
>
> switch (type) {
> case KFD_MQD_TYPE_CP:
> - case KFD_MQD_TYPE_COMPUTE:
> mqd->allocate_mqd = allocate_mqd;
> mqd->init_mqd = init_mqd;
> mqd->free_mqd = free_mqd;
> @@ -442,7 +441,7 @@ struct mqd_manager *mqd_manager_init_cik_hawaii(enum KFD_MQD_TYPE type,
> mqd = mqd_manager_init_cik(type, dev);
> if (!mqd)
> return NULL;
> - if ((type == KFD_MQD_TYPE_CP) || (type == KFD_MQD_TYPE_COMPUTE))
> + if (type == KFD_MQD_TYPE_CP)
> mqd->update_mqd = update_mqd_hawaii;
> return mqd;
> }
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> index 579c5ffcfa79..5a0e30441be8 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> @@ -401,7 +401,6 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
>
> switch (type) {
> case KFD_MQD_TYPE_CP:
> - case KFD_MQD_TYPE_COMPUTE:
> pr_debug("%s@%i\n", __func__, __LINE__);
> mqd->allocate_mqd = allocate_mqd;
> mqd->init_mqd = init_mqd;
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
> index 22a819c888d8..bdbcea22ad12 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
> @@ -444,7 +444,6 @@ struct mqd_manager *mqd_manager_init_v9(enum KFD_MQD_TYPE type,
>
> switch (type) {
> case KFD_MQD_TYPE_CP:
> - case KFD_MQD_TYPE_COMPUTE:
> mqd->allocate_mqd = allocate_mqd;
> mqd->init_mqd = init_mqd;
> mqd->free_mqd = free_mqd;
> 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 7d144f56f421..c9e1151b5a57 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
> @@ -425,7 +425,6 @@ struct mqd_manager *mqd_manager_init_vi(enum KFD_MQD_TYPE type,
>
> switch (type) {
> case KFD_MQD_TYPE_CP:
> - case KFD_MQD_TYPE_COMPUTE:
> mqd->allocate_mqd = allocate_mqd;
> mqd->init_mqd = init_mqd;
> mqd->free_mqd = free_mqd;
> @@ -494,7 +493,7 @@ struct mqd_manager *mqd_manager_init_vi_tonga(enum KFD_MQD_TYPE type,
> mqd = mqd_manager_init_vi(type, dev);
> if (!mqd)
> return NULL;
> - if ((type == KFD_MQD_TYPE_CP) || (type == KFD_MQD_TYPE_COMPUTE))
> + if (type == KFD_MQD_TYPE_CP)
> mqd->update_mqd = update_mqd_tonga;
> return mqd;
> }
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index 1049759dc6bb..514896bef99a 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -508,8 +508,7 @@ struct queue {
> * Please read the kfd_mqd_manager.h description.
> */
> enum KFD_MQD_TYPE {
> - KFD_MQD_TYPE_COMPUTE = 0, /* for no cp scheduling */
> - KFD_MQD_TYPE_HIQ, /* for hiq */
> + KFD_MQD_TYPE_HIQ = 0, /* for hiq */
> KFD_MQD_TYPE_CP, /* for cp queues and diq */
> KFD_MQD_TYPE_SDMA, /* for sdma queues */
> KFD_MQD_TYPE_DIQ, /* for diq */
More information about the amd-gfx
mailing list