Skip to contentSkip to conversation

drm/amdgpu: remove the duplicated mes queue active state setting

PATCH In review Prike Liang 2 participants 3 messages Mar 28, 2025 – Apr 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: remove the duplicated mes queue active state setting

The MES queue deactivation and active status are already set in mes_userq_unmap|map(), so the caller needn't set the queue_active bit again.

---
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +1 -5
index b469b800119f..b9705cbec74d 100644
@@ -358,10 +358,8 @@ mes_userq_mqd_destroy(struct amdgpu_userq_mgr *uq_mgr,
 static int mes_userq_suspend(struct amdgpu_userq_mgr *uq_mgr,
 				   struct amdgpu_usermode_queue *queue)
 {
-	if (queue->queue_active) {
+	if (queue->queue_active)
 		mes_userq_unmap(uq_mgr, queue);
-		queue->queue_active = false;
-	}
 
 	return 0;
 }
@@ -379,8 +377,6 @@ static int mes_userq_resume(struct amdgpu_userq_mgr *uq_mgr,
 		DRM_ERROR("Failed to resume queue\n");
 		return ret;
 	}
-
-	queue->queue_active = true;
 	return 0;
 }
 
Signature · 1 line
2.34.1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Ping ..

Regards,
Prike

Quoted 45 lines

-----Original Message-----
From: Liang, Prike <[email protected]>
Sent: Friday, March 28, 2025 7:52 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH] drm/amdgpu: remove the duplicated mes queue active state setting

The MES queue deactivation and active status are already set in mes_userq_unmap|map(), so the caller needn't set the queue_active bit again.

---
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +1 -6
index b469b800119f..b9705cbec74d 100644
@@ -358,10 +358,8 @@ mes_userq_mqd_destroy(struct amdgpu_userq_mgr
 *uq_mgr,  static int mes_userq_suspend(struct amdgpu_userq_mgr *uq_mgr,
                                 struct amdgpu_usermode_queue *queue)  {
-     if (queue->queue_active) {
+     if (queue->queue_active)
              mes_userq_unmap(uq_mgr, queue);
-             queue->queue_active = false;
-     }
 
      return 0;
 }
@@ -379,8 +377,6 @@ static int mes_userq_resume(struct amdgpu_userq_mgr
 *uq_mgr,
              DRM_ERROR("Failed to resume queue\n");
              return ret;
      }
-
-     queue->queue_active = true;
      return 0;
 }
 
--

2.34.1

Acked-by on v1 1/1
#2 lore raw
In reply to Prike Liang
Quoted 6 lines · Prike Liang

The MES queue deactivation and active status are already set in mes_userq_unmap|map(), so the caller needn't set the queue_active bit again.

Quoted 32 lines
---
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +1 -6
index b469b800119f..b9705cbec74d 100644
@@ -358,10 +358,8 @@ mes_userq_mqd_destroy(struct amdgpu_userq_mgr *uq_mgr,
 static int mes_userq_suspend(struct amdgpu_userq_mgr *uq_mgr,
                                   struct amdgpu_usermode_queue *queue)
 {
-       if (queue->queue_active) {
+       if (queue->queue_active)
                mes_userq_unmap(uq_mgr, queue);
-               queue->queue_active = false;
-       }
 
        return 0;
 }
@@ -379,8 +377,6 @@ static int mes_userq_resume(struct amdgpu_userq_mgr *uq_mgr,
                DRM_ERROR("Failed to resume queue\n");
                return ret;
        }
-
-       queue->queue_active = true;
        return 0;
 }
 
--

2.34.1