diff options
author | Oak Zeng <Oak.Zeng@amd.com> | 2019-06-03 12:28:13 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-11 12:56:46 -0500 |
commit | 2ff528190f5cc8b326260ee030cf2eda73bdb78d (patch) | |
tree | 6fbcffd5537841e89a88b36194c1d9d02ba83069 /drivers/gpu/drm/amd | |
parent | eec0b4cf92b0d7c2892008daf4e13b5fafaf7a20 (diff) |
drm/amdkfd: Only load sdma mqd when queue is active
Also calls load_mqd with current->mm struct. The mm
struct is used to read back user wptr of the queue.
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 00ca3ddb62d7..dab6ef4a52ac 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -995,8 +995,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; |