Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: drop pm_sysfs_en flag from amdgpu_device structure

pm_sysfs_en is overlapped with pm.sysfs_initialized, so drop it
for simplifying code(no functional change).

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Guchun Chen and committed by
Alex Deucher
53e9d836 d6530c33

+3 -7
-1
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 1022 1022 bool in_runpm; 1023 1023 bool has_pr3; 1024 1024 1025 - bool pm_sysfs_en; 1026 1025 bool ucode_sysfs_en; 1027 1026 bool psp_sysfs_en; 1028 1027
+3 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 3863 3863 adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps)); 3864 3864 3865 3865 r = amdgpu_pm_sysfs_init(adev); 3866 - if (r) { 3867 - adev->pm_sysfs_en = false; 3868 - DRM_ERROR("registering pm debugfs failed (%d).\n", r); 3869 - } else 3870 - adev->pm_sysfs_en = true; 3866 + if (r) 3867 + DRM_ERROR("registering pm sysfs failed (%d).\n", r); 3871 3868 3872 3869 r = amdgpu_ucode_sysfs_init(adev); 3873 3870 if (r) { ··· 4010 4013 if (adev->mman.initialized) 4011 4014 drain_workqueue(adev->mman.bdev.wq); 4012 4015 4013 - if (adev->pm_sysfs_en) 4016 + if (adev->pm.sysfs_initialized) 4014 4017 amdgpu_pm_sysfs_fini(adev); 4015 4018 if (adev->ucode_sysfs_en) 4016 4019 amdgpu_ucode_sysfs_fini(adev);