Skip to content

Commit

Permalink
drm/amdgpu/mes: update hqd masks when disable_kq is set
Browse files Browse the repository at this point in the history
Make all resources available to user queues.

Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Suggested-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Alex Deucher committed Apr 8, 2025
1 parent f091fa7 commit acdc43f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
* Set GFX pipe 0 queue 1-7 for MES scheduling
* mask = 1111 1110b
*/
adev->mes.gfx_hqd_mask[i] = 0xFE;
adev->mes.gfx_hqd_mask[i] = adev->gfx.disable_kq ? 0xFF : 0xFE;
else
/*
* GFX pipe 0 queue 0 is being used by Kernel queue.
* Set GFX pipe 0 queue 1 for MES scheduling
* mask = 10b
*/
adev->mes.gfx_hqd_mask[i] = 0x2;
adev->mes.gfx_hqd_mask[i] = adev->gfx.disable_kq ? 0x3 : 0x2;
}

num_pipes = adev->gfx.mec.num_pipe_per_mec * adev->gfx.mec.num_mec;
Expand All @@ -142,7 +142,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {
if (i >= num_pipes)
break;
adev->mes.compute_hqd_mask[i] = 0xc;
adev->mes.compute_hqd_mask[i] = adev->gfx.disable_kq ? 0xF : 0xC;
}

num_pipes = adev->sdma.num_instances;
Expand Down

0 comments on commit acdc43f

Please sign in to comment.