[PATCH] drm/amdgpu: enable enforce_isolation sysfs node on VFs

SRINIVASAN SHANMUGAM srinivasan.shanmugam at amd.com
Wed Oct 9 11:08:35 UTC 2024


On 10/9/2024 1:35 AM, Alex Deucher wrote:
> It should be enabled on both bare metal and VFs.
>
> Fixes: e189be9b2e38 ("drm/amdgpu: Add enforce_isolation sysfs attribute")
> Signed-off-by: Alex Deucher<alexander.deucher at amd.com>
> Cc: Srinivasan Shanmugam<srinivasan.shanmugam at amd.com>
> Cc: Amber Lin<Amber.Lin at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 11 ++++-------
>   1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index 2fe75c920a73..ae692d0591ba 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> @@ -1625,11 +1625,9 @@ int amdgpu_gfx_sysfs_isolation_shader_init(struct amdgpu_device *adev)
>   {
>   	int r;
>   
> -	if (!amdgpu_sriov_vf(adev)) {
> -		r = device_create_file(adev->dev, &dev_attr_enforce_isolation);
> -		if (r)
> -			return r;
> -	}
> +	r = device_create_file(adev->dev, &dev_attr_enforce_isolation);
> +	if (r)
> +		return r;
>   
>   	r = device_create_file(adev->dev, &dev_attr_run_cleaner_shader);
>   	if (r)
> @@ -1640,8 +1638,7 @@ int amdgpu_gfx_sysfs_isolation_shader_init(struct amdgpu_device *adev)
>   
>   void amdgpu_gfx_sysfs_isolation_shader_fini(struct amdgpu_device *adev)
>   {
> -	if (!amdgpu_sriov_vf(adev))
> -		device_remove_file(adev->dev, &dev_attr_enforce_isolation);
> +	device_remove_file(adev->dev, &dev_attr_enforce_isolation);
>   	device_remove_file(adev->dev, &dev_attr_run_cleaner_shader);
>   }
>   
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/20241009/a850304c/attachment.htm>


More information about the amd-gfx mailing list