Patch "drm/radeon: don't try to recreate sysfs entries on resume" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/radeon: don't try to recreate sysfs entries on resume
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-radeon-don-t-try-to-recreate-sysfs-entries-on-resume.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
49abb26651167c892393cd9f2ad23df429645ed9Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Fri, 23 Oct 2015 10:38:52 -0400
Subject: drm/radeon: don't try to recreate sysfs entries on resume
From: Alex Deucher <[email protected]>
commit 49abb26651167c892393cd9f2ad23df429645ed9 upstream.
Fixes a harmless error message caused by:51a4726b04e880fdd9b4e0e58b13f70b0a68a7f5
--- drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_pm.c | 35 +++++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-)
drivers/gpu/drm/radeon/radeon.h +1 -0
@@ -1656,6 +1656,7 @@ struct radeon_pm {u8 fan_max_rpm;/* dpm */ bool dpm_enabled; +bool sysfs_initialized;struct radeon_dpm dpm; };
drivers/gpu/drm/radeon/radeon_pm.c +21 -14
@@ -1533,19 +1533,23 @@ int radeon_pm_late_init(struct radeon_deif (rdev->pm.pm_method ==PM_METHOD_DPM ) {if (rdev->pm.dpm_enabled) { - ret =device_create_file (rdev->dev, &dev_attr_power_dpm_state); -if (ret) -DRM_ERROR ("failed to create device file for dpm state\n" ); - ret =device_create_file (rdev->dev, &dev_attr_power_dpm_force_performance_level); -if (ret) -DRM_ERROR ("failed to create device file for dpm state\n" ); -/* XXX: these are noops for dpm but are here for backwards compat */ - ret =device_create_file (rdev->dev, &dev_attr_power_profile); -if (ret) -DRM_ERROR ("failed to create device file for power profile\n" ); - ret =device_create_file (rdev->dev, &dev_attr_power_method); -if (ret) -DRM_ERROR ("failed to create device file for power method\n" ); +if (!rdev->pm.sysfs_initialized) { + ret =device_create_file (rdev->dev, &dev_attr_power_dpm_state); +if (ret) +DRM_ERROR ("failed to create device file for dpm state\n" ); + ret =device_create_file (rdev->dev, &dev_attr_power_dpm_force_performance_level); +if (ret) +DRM_ERROR ("failed to create device file for dpm state\n" ); +/* XXX: these are noops for dpm but are here for backwards compat */ + ret =device_create_file (rdev->dev, &dev_attr_power_profile); +if (ret) +DRM_ERROR ("failed to create device file for power profile\n" ); + ret =device_create_file (rdev->dev, &dev_attr_power_method); +if (ret) +DRM_ERROR ("failed to create device file for power method\n" ); +if (!ret) + rdev->pm.sysfs_initialized = true; + }mutex_lock (&rdev->pm.mutex); ret =radeon_dpm_late_enable (rdev);
@@ -1561,7 +1565,8 @@ int radeon_pm_late_init(struct radeon_de } } }else { -if (rdev->pm.num_power_states >1 ) { +if ((rdev->pm.num_power_states >1 ) && + (!rdev->pm.sysfs_initialized)) {/* where's the best place to put these? */ ret =device_create_file (rdev->dev, &dev_attr_power_profile);if (ret)
@@ -1569,6 +1574,8 @@ int radeon_pm_late_init(struct radeon_de ret =device_create_file (rdev->dev, &dev_attr_power_method);if (ret)DRM_ERROR ("failed to create device file for power method\n" ); +if (!ret) + rdev->pm.sysfs_initialized = true; } }return ret;
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/drm-radeon-move-bl-encoder-assignment-into-bl-init.patch queue-4.1/drm-radeon-fix-dpms-when-driver-backlight-control-is-disabled.patch queue-4.1/drm-radeon-don-t-try-to-recreate-sysfs-entries-on-resume.patch queue-4.1/drm-radeon-dpm-don-t-add-pwm-attributes-if-dpm-is-disabled.patch