aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
diff options
context:
space:
mode:
authorShiwu Zhang <[email protected]>2022-11-14 07:52:19 +0000
committerAlex Deucher <[email protected]>2023-06-09 13:48:59 +0000
commit993d218f82211b1e17fcea7a5f727fa16efba353 (patch)
tree1d00f529f4b5f39461707bee759b1134b0ea99aa /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
parentdrm/amdgpu: fix kcq mqd_backup buffer double free for multi-XCD (diff)
downloadkernel-993d218f82211b1e17fcea7a5f727fa16efba353.tar.gz
kernel-993d218f82211b1e17fcea7a5f727fa16efba353.zip
drm/amdgpu: remove partition attributes sys file for gfx_v9_4_3
For driver de-init like rmmod operations those partition specific attributes need to be removed accordingly. Signed-off-by: Shiwu Zhang <[email protected]> Reviewed-by: Rajneesh Bhardwaj <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index 8aea9e023275..5ff49737d7c6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1345,3 +1345,10 @@ int amdgpu_gfx_sysfs_init(struct amdgpu_device *adev)
return 0;
}
+
+void amdgpu_gfx_sysfs_fini(struct amdgpu_device *adev)
+{
+ device_remove_file(adev->dev, &dev_attr_current_compute_partition);
+ device_remove_file(adev->dev, &dev_attr_available_compute_partition);
+ device_remove_file(adev->dev, &dev_attr_current_memory_partition);
+}