Commit e7ea8820 authored by Alex Deucher's avatar Alex Deucher
Browse files

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: 8521e3c5 ("drm/amd/amdgpu: limit single process inside MES")
Reviewed-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: Shaoyun Liu <shaoyun.liu@amd.com>
Cc: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
(cherry picked from commit 80513e38)
parent 8005351c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1643,10 +1643,12 @@ 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));
			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));
			if (adev->enable_mes && adev->gfx.enable_cleaner_shader)
				amdgpu_mes_set_enforce_isolation(adev, i, true);
		}
		adev->enforce_isolation[i] = partition_values[i];