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.z...@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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to