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>
This commit is contained in:
parent
eec0b4cf92
commit
2ff528190f
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue