amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue
@ 2020-01-10  6:37 Huang Rui
  2020-01-10  6:37 ` [PATCH 2/5] drm/amdkfd: use kiq to load the mqd of hiq queue for gfx v9 (v5) Huang Rui
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Huang Rui @ 2020-01-10  6:37 UTC (permalink / raw)
  To: amd-gfx, Felix Kuehling; +Cc: Alex Deucher, Huang Rui

The mec ucode will set the CP_HQD_ACTIVE bit while the queue is mapped by
MAP_QUEUES packet. So we only need set cp active field for kiq queue.

Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 +++++--
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 7 +++++--
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 7 +++++--
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 5b05334..22c69d8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -3323,8 +3323,11 @@ static int gfx_v10_0_compute_mqd_init(struct amdgpu_ring *ring)
 	tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE, 3);
 	mqd->cp_hqd_ib_control = tmp;
 
-	/* activate the queue */
-	mqd->cp_hqd_active = 1;
+	/* map_queues packet doesn't need activate the queue,
+	 * so only kiq need set this field.
+	 */
+	if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+		mqd->cp_hqd_active = 1;
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 8b9f440..306ee61 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4558,8 +4558,11 @@ static int gfx_v8_0_mqd_init(struct amdgpu_ring *ring)
 	mqd->cp_hqd_eop_wptr_mem = RREG32(mmCP_HQD_EOP_WPTR_MEM);
 	mqd->cp_hqd_eop_dones = RREG32(mmCP_HQD_EOP_DONES);
 
-	/* activate the queue */
-	mqd->cp_hqd_active = 1;
+	/* map_queues packet doesn't need activate the queue,
+	 * so only kiq need set this field.
+	 */
+	if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+		mqd->cp_hqd_active = 1;
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 45328f9..e29818b 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3313,8 +3313,11 @@ static int gfx_v9_0_mqd_init(struct amdgpu_ring *ring)
 	tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE, 3);
 	mqd->cp_hqd_ib_control = tmp;
 
-	/* activate the queue */
-	mqd->cp_hqd_active = 1;
+	/* map_queues packet doesn't need activate the queue,
+	 * so only kiq need set this field.
+	 */
+	if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+		mqd->cp_hqd_active = 1;
 
 	return 0;
 }
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-01-15  2:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10  6:37 [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue Huang Rui
2020-01-10  6:37 ` [PATCH 2/5] drm/amdkfd: use kiq to load the mqd of hiq queue for gfx v9 (v5) Huang Rui
2020-01-10  6:37 ` [PATCH 3/5] drm/amdkfd: use map_queues for hiq on arcturus as well Huang Rui
2020-01-10 23:05   ` Felix Kuehling
2020-01-13  2:38     ` Huang Rui
2020-01-10  6:37 ` [PATCH 4/5] drm/amdkfd: use map_queues for hiq on gfx v10 " Huang Rui
2020-01-10 23:08   ` Felix Kuehling
2020-01-13  9:07     ` Huang Rui
2020-01-10  6:37 ` [PATCH 5/5] drm/amdkfd: use map_queues for hiq on gfx v8 " Huang Rui
2020-01-10 23:09   ` Felix Kuehling
2020-01-14  9:36 ` [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue Huang Rui
2020-01-14 15:30   ` Felix Kuehling
2020-01-15  2:55     ` Huang Rui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).