]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu: enable enforce_isolation sysfs node on VFs
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Oct 2024 20:02:48 +0000 (16:02 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Oct 2024 15:47:41 +0000 (11:47 -0400)
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@amd.com>
Cc: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Cc: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
(cherry picked from commit dc8847b054fd6679866ed4ee861e069e54c10799)

drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

index 83e54697f0ee83faf89395600978cdd28af4e1be..f1ffab5a1eaed9d4e56845025775b13ce751e7ea 100644 (file)
@@ -1635,11 +1635,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)
@@ -1650,8 +1648,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);
 }