mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
drm/amdgpu: don't try to recreate sysfs entries on resume
Fixes an error on resume caused by:
fa022a9b65
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
This commit is contained in:
parent
49abb26651
commit
c86f5ebfbd
2 changed files with 6 additions and 0 deletions
|
@ -1654,6 +1654,7 @@ struct amdgpu_pm {
|
||||||
u8 fan_max_rpm;
|
u8 fan_max_rpm;
|
||||||
/* dpm */
|
/* dpm */
|
||||||
bool dpm_enabled;
|
bool dpm_enabled;
|
||||||
|
bool sysfs_initialized;
|
||||||
struct amdgpu_dpm dpm;
|
struct amdgpu_dpm dpm;
|
||||||
const struct firmware *fw; /* SMC firmware */
|
const struct firmware *fw; /* SMC firmware */
|
||||||
uint32_t fw_version;
|
uint32_t fw_version;
|
||||||
|
|
|
@ -695,6 +695,9 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (adev->pm.sysfs_initialized)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (adev->pm.funcs->get_temperature == NULL)
|
if (adev->pm.funcs->get_temperature == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
adev->pm.int_hwmon_dev = hwmon_device_register_with_groups(adev->dev,
|
adev->pm.int_hwmon_dev = hwmon_device_register_with_groups(adev->dev,
|
||||||
|
@ -723,6 +726,8 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adev->pm.sysfs_initialized = true;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue