From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50308 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030320AbbKFAkH (ORCPT ); Thu, 5 Nov 2015 19:40:07 -0500 Subject: Patch "drm/radeon/dpm: don't add pwm attributes if DPM is disabled" has been added to the 4.2-stable tree To: alexander.deucher@amd.com, gregkh@linuxfoundation.org Cc: , From: Date: Thu, 05 Nov 2015 16:40:06 -0800 Message-ID: <144677040645243@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled drm/radeon/dpm: don't add pwm attributes if DPM is disabled to the 4.2-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-dpm-don-t-add-pwm-attributes-if-dpm-is-disabled.patch and it can be found in the queue-4.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 2a7d44f47f53fa1be677f44c73d78b1bcf9c05d9 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 19 Oct 2015 09:30:42 -0400 Subject: drm/radeon/dpm: don't add pwm attributes if DPM is disabled From: Alex Deucher commit 2a7d44f47f53fa1be677f44c73d78b1bcf9c05d9 upstream. PWM fan control is only available with DPM. If DPM disabled, don't expose the PWM fan controls to avoid a crash. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92524 Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/radeon/radeon_pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -720,10 +720,14 @@ static umode_t hwmon_attributes_visible( struct radeon_device *rdev = dev_get_drvdata(dev); umode_t effective_mode = attr->mode; - /* Skip limit attributes if DPM is not enabled */ + /* Skip attributes if DPM is not enabled */ if (rdev->pm.pm_method != PM_METHOD_DPM && (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr || - attr == &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr)) + attr == &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr || + attr == &sensor_dev_attr_pwm1.dev_attr.attr || + attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr || + attr == &sensor_dev_attr_pwm1_max.dev_attr.attr || + attr == &sensor_dev_attr_pwm1_min.dev_attr.attr)) return 0; /* Skip fan attributes if fan is not present */ Patches currently in stable-queue which might be from alexander.deucher@amd.com are queue-4.2/drm-radeon-move-bl-encoder-assignment-into-bl-init.patch queue-4.2/drm-amdgpu-add-missing-dpm-check-for-kv-dpm-late-init.patch queue-4.2/drm-radeon-fix-dpms-when-driver-backlight-control-is-disabled.patch queue-4.2/drm-amdgpu-don-t-try-to-recreate-sysfs-entries-on-resume.patch queue-4.2/drm-radeon-don-t-try-to-recreate-sysfs-entries-on-resume.patch queue-4.2/drm-radeon-dpm-don-t-add-pwm-attributes-if-dpm-is-disabled.patch