aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-02-13 13:37:01 -0500
committerAlex Deucher <alexander.deucher@amd.com>2025-02-17 14:08:28 -0500
commit80513e389765c8f9543b26d8fa4bbdf0e59ff8bc (patch)
treee48a8bea47ede8ec6cca9eef62a2601fdf20f809
parentdrm/amdgpu: Add ring reset callback for JPEG2_0_0 (diff)
downloadwireguard-linux-80513e389765c8f9543b26d8fa4bbdf0e59ff8bc.tar.xz
wireguard-linux-80513e389765c8f9543b26d8fa4bbdf0e59ff8bc.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 <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>
-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 27f5318c3a26..b9bd6654f317 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1670,11 +1670,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];
}