aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-02-13 18:37:01 +0000
committerAlex Deucher <[email protected]>2025-02-25 17:22:56 +0000
commite7ea88207cef513514e706aacc534527ac88b9b8 (patch)
tree02778103f2375190a3e0c13fd511f04d0f25ceee /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
parentMAINTAINERS: update amdgpu maintainers list (diff)
downloadkernel-e7ea88207cef513514e706aacc534527ac88b9b8.tar.gz
kernel-e7ea88207cef513514e706aacc534527ac88b9b8.zip
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: 8521e3c5f058 ("drm/amd/amdgpu: limit single process inside MES") Reviewed-by: Srinivasan Shanmugam <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Shaoyun Liu <[email protected]> Cc: Srinivasan Shanmugam <[email protected]> (cherry picked from commit 80513e389765c8f9543b26d8fa4bbdf0e59ff8bc)
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index 784b03abb3a4..c6aff3ddb42d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1643,11 +1643,13 @@ static ssize_t amdgpu_gfx_set_enforce_isolation(struct device *dev,
if (adev->enforce_isolation[i] && !partition_values[i]) {
/* Going from enabled to disabled */
amdgpu_vmid_free_reserved(adev, AMDGPU_GFXHUB(i));
- amdgpu_mes_set_enforce_isolation(adev, i, false);
+ if (adev->enable_mes && adev->gfx.enable_cleaner_shader)
+ amdgpu_mes_set_enforce_isolation(adev, i, false);
} else if (!adev->enforce_isolation[i] && partition_values[i]) {
/* Going from disabled to enabled */
amdgpu_vmid_alloc_reserved(adev, AMDGPU_GFXHUB(i));
- amdgpu_mes_set_enforce_isolation(adev, i, true);
+ if (adev->enable_mes && adev->gfx.enable_cleaner_shader)
+ amdgpu_mes_set_enforce_isolation(adev, i, true);
}
adev->enforce_isolation[i] = partition_values[i];
}