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: revise the device initialization sequences

By placing the sysfs interfaces creation after `.late_int`. Since some
operations performed during `.late_init` may affect how the sysfs
interfaces should be created.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Evan Quan and committed by
Alex Deucher
90bcb9b5 3e38b634

+21 -16
+21 -16
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 3862 3862 /* Get a log2 for easy divisions. */ 3863 3863 adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps)); 3864 3864 3865 - r = amdgpu_atombios_sysfs_init(adev); 3866 - if (r) 3867 - drm_err(&adev->ddev, 3868 - "registering atombios sysfs failed (%d).\n", r); 3869 - 3870 - r = amdgpu_pm_sysfs_init(adev); 3871 - if (r) 3872 - DRM_ERROR("registering pm sysfs failed (%d).\n", r); 3873 - 3874 - r = amdgpu_ucode_sysfs_init(adev); 3875 - if (r) { 3876 - adev->ucode_sysfs_en = false; 3877 - DRM_ERROR("Creating firmware sysfs failed (%d).\n", r); 3878 - } else 3879 - adev->ucode_sysfs_en = true; 3880 - 3881 3865 /* 3882 3866 * Register gpu instance before amdgpu_device_enable_mgpu_fan_boost. 3883 3867 * Otherwise the mgpu fan boost feature will be skipped due to the ··· 3889 3905 amdgpu_virt_release_full_gpu(adev, true); 3890 3906 flush_delayed_work(&adev->delayed_init_work); 3891 3907 } 3908 + 3909 + /* 3910 + * Place those sysfs registering after `late_init`. As some of those 3911 + * operations performed in `late_init` might affect the sysfs 3912 + * interfaces creating. 3913 + */ 3914 + r = amdgpu_atombios_sysfs_init(adev); 3915 + if (r) 3916 + drm_err(&adev->ddev, 3917 + "registering atombios sysfs failed (%d).\n", r); 3918 + 3919 + r = amdgpu_pm_sysfs_init(adev); 3920 + if (r) 3921 + DRM_ERROR("registering pm sysfs failed (%d).\n", r); 3922 + 3923 + r = amdgpu_ucode_sysfs_init(adev); 3924 + if (r) { 3925 + adev->ucode_sysfs_en = false; 3926 + DRM_ERROR("Creating firmware sysfs failed (%d).\n", r); 3927 + } else 3928 + adev->ucode_sysfs_en = true; 3892 3929 3893 3930 r = sysfs_create_files(&adev->dev->kobj, amdgpu_dev_attributes); 3894 3931 if (r)