[PATCH] drm/amdgpu/gfx: only call mes for enforce isolation if supported
SRINIVASAN SHANMUGAM
srinivasan.shanmugam at amd.com
Thu Feb 13 18:43:52 UTC 2025
On 2/14/2025 12:09 AM, Alex Deucher wrote:
> 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")
> Signed-off-by: Alex Deucher<alexander.deucher at amd.com>
> Cc: Shaoyun Liu<shaoyun.liu at amd.com>
> Cc: Srinivasan Shanmugam<srinivasan.shanmugam at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 ++++--
> 1 file 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 27f5318c3a26c..b9bd6654f3172 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];
> }
Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20250214/295b068c/attachment-0001.htm>
More information about the amd-gfx
mailing list