Skip to content

Commit 80513e3

Browse files
committed
drm/amdgpu/gfx: only call mes for enforce isolation if supported
This should not be called on chips without MES so check if MES is enabled and if the cleaner shader is supported. Fixes: 8521e3c ("drm/amd/amdgpu: limit single process inside MES") Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Shaoyun Liu <shaoyun.liu@amd.com> Cc: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
1 parent 500c04d commit 80513e3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,11 +1670,13 @@ static ssize_t amdgpu_gfx_set_enforce_isolation(struct device *dev,
16701670
if (adev->enforce_isolation[i] && !partition_values[i]) {
16711671
/* Going from enabled to disabled */
16721672
amdgpu_vmid_free_reserved(adev, AMDGPU_GFXHUB(i));
1673-
amdgpu_mes_set_enforce_isolation(adev, i, false);
1673+
if (adev->enable_mes && adev->gfx.enable_cleaner_shader)
1674+
amdgpu_mes_set_enforce_isolation(adev, i, false);
16741675
} else if (!adev->enforce_isolation[i] && partition_values[i]) {
16751676
/* Going from disabled to enabled */
16761677
amdgpu_vmid_alloc_reserved(adev, AMDGPU_GFXHUB(i));
1677-
amdgpu_mes_set_enforce_isolation(adev, i, true);
1678+
if (adev->enable_mes && adev->gfx.enable_cleaner_shader)
1679+
amdgpu_mes_set_enforce_isolation(adev, i, true);
16781680
}
16791681
adev->enforce_isolation[i] = partition_values[i];
16801682
}

0 commit comments

Comments
 (0)