Skip to content

Commit

Permalink
drm/amdgpu: enable mes v12 self test
Browse files Browse the repository at this point in the history
1. fix available compute queue to use
2. enable mes v12 self test

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Jack Xiao authored and Alex Deucher committed May 2, 2024
1 parent 6628f77 commit 745f46b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)

for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {
/* use only 1st MEC pipes */
if (i >= 4)
if (i >= adev->gfx.mec.num_pipe_per_mec)
continue;
adev->mes.compute_hqd_mask[i] = 0xc;
}
Expand Down
6 changes: 6 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,12 @@ static int mes_v12_0_early_init(void *handle)

static int mes_v12_0_late_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;

/* it's only intended for use in mes_self_test case, not for s0ix and reset */
if (!amdgpu_in_reset(adev) && !adev->in_s0ix && !adev->in_suspend)
amdgpu_mes_self_test(adev);

return 0;
}

Expand Down

0 comments on commit 745f46b

Please sign in to comment.