[PATCH 2/6] drm/amdkfd: Only load sdma mqd when queue is active
Zeng, Oak
Oak.Zeng at amd.com
Tue Jun 4 02:52:45 UTC 2019
Also calls load_mqd with current->mm struct. The mm
struct is used to read back user wptr of the queue.
Change-Id: I0f6d085878358dcd3a413054dbe61d1ca0fdf66d
Signed-off-by: Oak Zeng <Oak.Zeng at amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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 e5cbf21..dc1a70b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -990,8 +990,11 @@ static int create_sdma_queue_nocpsch(struct device_queue_manager *dqm,
if (retval)
goto out_deallocate_doorbell;
+ if (!q->properties.is_active)
+ return 0;
+
retval = mqd_mgr->load_mqd(mqd_mgr, q->mqd, 0, 0, &q->properties,
- NULL);
+ current->mm);
if (retval)
goto out_uninit_mqd;
--
2.7.4
More information about the amd-gfx
mailing list