summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
diff options
context:
space:
mode:
authorOak Zeng <ozeng@amd.com>2018-12-05 10:15:27 -0600
committerAlex Deucher <alexander.deucher@amd.com>2019-05-24 12:21:02 -0500
commitfdfa090bc90f34543b8efd05b05a143ae6d52406 (patch)
tree5fef88dae5705d47655cee83ec04dbbef1e9b368 /drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
parent59f650a06f8f530e2412e5c47106cd8b8895bd89 (diff)
downloadlinux-fdfa090bc90f34543b8efd05b05a143ae6d52406.tar.gz
linux-fdfa090bc90f34543b8efd05b05a143ae6d52406.tar.bz2
linux-fdfa090bc90f34543b8efd05b05a143ae6d52406.zip
drm/amdkfd: Init mqd managers in device queue manager init
Previously mqd managers was initialized on demand. As there are only a few type of mqd managers, the on demand initialization doesn't save too much memory. Initialize them on device queue initialization instead and delete the get_mqd_manager interface. This makes codes more organized for future changes. Signed-off-by: Oak Zeng <ozeng@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
index 58bb3ad233a1..7a737b50bed4 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
@@ -58,12 +58,10 @@ static bool initialize(struct kernel_queue *kq, struct kfd_dev *dev,
kq->nop_packet = nop.u32all;
switch (type) {
case KFD_QUEUE_TYPE_DIQ:
- kq->mqd_mgr = dev->dqm->ops.get_mqd_manager(dev->dqm,
- KFD_MQD_TYPE_DIQ);
+ kq->mqd_mgr = dev->dqm->mqd_mgrs[KFD_MQD_TYPE_DIQ];
break;
case KFD_QUEUE_TYPE_HIQ:
- kq->mqd_mgr = dev->dqm->ops.get_mqd_manager(dev->dqm,
- KFD_MQD_TYPE_HIQ);
+ kq->mqd_mgr = dev->dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ];
break;
default:
pr_err("Invalid queue type %d\n", type);