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:
parent
6e04b2248d
commit
d7c0b0477b
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue