Skip to content

Commit bd94b24

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/gfx11: set MQD as appriopriate for queue types
commit 27f5e0c upstream. Set the MQD as appropriate for the kernel vs user queues. Acked-by: Christian König <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 063d6683208722b1875f888a45084e3d112701ac) Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b013c68 commit bd94b24

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4124,6 +4124,8 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,
41244124
#endif
41254125
if (prop->tmz_queue)
41264126
tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, TMZ_MATCH, 1);
4127+
if (!prop->kernel_queue)
4128+
tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, RB_NON_PRIV, 1);
41274129
mqd->cp_gfx_hqd_cntl = tmp;
41284130

41294131
/* set up cp_doorbell_control */
@@ -4276,8 +4278,10 @@ static int gfx_v11_0_compute_mqd_init(struct amdgpu_device *adev, void *m,
42764278
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, UNORD_DISPATCH, 1);
42774279
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, TUNNEL_DISPATCH,
42784280
prop->allow_tunneling);
4279-
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, PRIV_STATE, 1);
4280-
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, KMD_QUEUE, 1);
4281+
if (prop->kernel_queue) {
4282+
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, PRIV_STATE, 1);
4283+
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, KMD_QUEUE, 1);
4284+
}
42814285
if (prop->tmz_queue)
42824286
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, TMZ, 1);
42834287
mqd->cp_hqd_pq_control = tmp;

0 commit comments

Comments
 (0)