Skip to content

Commit 5d7f6c7

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/gfx12: set MQD as appriopriate for queue types
commit 29f155c upstream. Set the MQD as appropriate for the kernel vs user queues. Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 7b9110f) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bd94b24 commit 5d7f6c7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3022,6 +3022,8 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,
30223022
#endif
30233023
if (prop->tmz_queue)
30243024
tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, TMZ_MATCH, 1);
3025+
if (!prop->kernel_queue)
3026+
tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, RB_NON_PRIV, 1);
30253027
mqd->cp_gfx_hqd_cntl = tmp;
30263028

30273029
/* set up cp_doorbell_control */
@@ -3171,8 +3173,10 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m,
31713173
(order_base_2(AMDGPU_GPU_PAGE_SIZE / 4) - 1));
31723174
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, UNORD_DISPATCH, 1);
31733175
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, TUNNEL_DISPATCH, 0);
3174-
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, PRIV_STATE, 1);
3175-
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, KMD_QUEUE, 1);
3176+
if (prop->kernel_queue) {
3177+
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, PRIV_STATE, 1);
3178+
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, KMD_QUEUE, 1);
3179+
}
31763180
if (prop->tmz_queue)
31773181
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, TMZ, 1);
31783182
mqd->cp_hqd_pq_control = tmp;

0 commit comments

Comments
 (0)