lkml.org 
[lkml]   [2015]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.1 28/86] drm/radeon/dpm: dont add pwm attributes if DPM is disabled
    Date
    4.1-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Alex Deucher <alexander.deucher@amd.com>

    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 <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    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 */



    \
     
     \ /
      Last update: 2015-11-06 22:01    [W:4.301 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site