drm/amdkfd: Delete KFD_MQD_TYPE_COMPUTE

It is the same as KFD_MQD_TYPE_CP, so delete it. As a result, we will
have one less mqd mananger per device.

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Yong Zhao 2019-11-08 23:57:37 -05:00 committed by Alex Deucher
parent 6e04b2248d
commit d7c0b0477b
6 changed files with 4 additions and 9 deletions

View File

@ -1595,7 +1595,7 @@ static int get_wave_state(struct device_queue_manager *dqm,
goto dqm_unlock; 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) { if (!mqd_mgr->get_wave_state) {
r = -EINVAL; r = -EINVAL;

View File

@ -374,7 +374,6 @@ struct mqd_manager *mqd_manager_init_cik(enum KFD_MQD_TYPE type,
switch (type) { switch (type) {
case KFD_MQD_TYPE_CP: case KFD_MQD_TYPE_CP:
case KFD_MQD_TYPE_COMPUTE:
mqd->allocate_mqd = allocate_mqd; mqd->allocate_mqd = allocate_mqd;
mqd->init_mqd = init_mqd; mqd->init_mqd = init_mqd;
mqd->free_mqd = free_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); mqd = mqd_manager_init_cik(type, dev);
if (!mqd) if (!mqd)
return NULL; 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; mqd->update_mqd = update_mqd_hawaii;
return mqd; return mqd;
} }

View File

@ -401,7 +401,6 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
switch (type) { switch (type) {
case KFD_MQD_TYPE_CP: case KFD_MQD_TYPE_CP:
case KFD_MQD_TYPE_COMPUTE:
pr_debug("%s@%i\n", __func__, __LINE__); pr_debug("%s@%i\n", __func__, __LINE__);
mqd->allocate_mqd = allocate_mqd; mqd->allocate_mqd = allocate_mqd;
mqd->init_mqd = init_mqd; mqd->init_mqd = init_mqd;

View File

@ -444,7 +444,6 @@ struct mqd_manager *mqd_manager_init_v9(enum KFD_MQD_TYPE type,
switch (type) { switch (type) {
case KFD_MQD_TYPE_CP: case KFD_MQD_TYPE_CP:
case KFD_MQD_TYPE_COMPUTE:
mqd->allocate_mqd = allocate_mqd; mqd->allocate_mqd = allocate_mqd;
mqd->init_mqd = init_mqd; mqd->init_mqd = init_mqd;
mqd->free_mqd = free_mqd; mqd->free_mqd = free_mqd;

View File

@ -425,7 +425,6 @@ struct mqd_manager *mqd_manager_init_vi(enum KFD_MQD_TYPE type,
switch (type) { switch (type) {
case KFD_MQD_TYPE_CP: case KFD_MQD_TYPE_CP:
case KFD_MQD_TYPE_COMPUTE:
mqd->allocate_mqd = allocate_mqd; mqd->allocate_mqd = allocate_mqd;
mqd->init_mqd = init_mqd; mqd->init_mqd = init_mqd;
mqd->free_mqd = free_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); mqd = mqd_manager_init_vi(type, dev);
if (!mqd) if (!mqd)
return NULL; 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; mqd->update_mqd = update_mqd_tonga;
return mqd; return mqd;
} }

View File

@ -508,8 +508,7 @@ struct queue {
* Please read the kfd_mqd_manager.h description. * Please read the kfd_mqd_manager.h description.
*/ */
enum KFD_MQD_TYPE { enum KFD_MQD_TYPE {
KFD_MQD_TYPE_COMPUTE = 0, /* for no cp scheduling */ KFD_MQD_TYPE_HIQ = 0, /* for hiq */
KFD_MQD_TYPE_HIQ, /* for hiq */
KFD_MQD_TYPE_CP, /* for cp queues and diq */ KFD_MQD_TYPE_CP, /* for cp queues and diq */
KFD_MQD_TYPE_SDMA, /* for sdma queues */ KFD_MQD_TYPE_SDMA, /* for sdma queues */
KFD_MQD_TYPE_DIQ, /* for diq */ KFD_MQD_TYPE_DIQ, /* for diq */