If the userq doesn't support in a system. then there's no
valid userq_doorbell_xa entry to walk over and then has a
no-op.

Signed-off-by: Prike Liang <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index d34572bb6fd4..439d4047a085 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -1308,15 +1308,11 @@ void amdgpu_userq_mgr_fini(struct amdgpu_userq_mgr 
*userq_mgr)
 
 int amdgpu_userq_suspend(struct amdgpu_device *adev)
 {
-       u32 ip_mask = amdgpu_userq_get_supported_ip_mask(adev);
        struct amdgpu_usermode_queue *queue;
        struct amdgpu_userq_mgr *uqm;
        unsigned long queue_id;
        int r;
 
-       if (!ip_mask)
-               return 0;
-
        xa_for_each(&adev->userq_doorbell_xa, queue_id, queue) {
                uqm = queue->userq_mgr;
                cancel_delayed_work_sync(&uqm->resume_work);
@@ -1333,15 +1329,11 @@ int amdgpu_userq_suspend(struct amdgpu_device *adev)
 
 int amdgpu_userq_resume(struct amdgpu_device *adev)
 {
-       u32 ip_mask = amdgpu_userq_get_supported_ip_mask(adev);
        struct amdgpu_usermode_queue *queue;
        struct amdgpu_userq_mgr *uqm;
        unsigned long queue_id;
        int r;
 
-       if (!ip_mask)
-               return 0;
-
        xa_for_each(&adev->userq_doorbell_xa, queue_id, queue) {
                uqm = queue->userq_mgr;
                guard(mutex)(&uqm->userq_mutex);
-- 
2.34.1

Reply via email to