lkml.org 
[lkml]   [2010]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[092/114] drm/radeon/kms/pm: bail early if nothings changing
    2.6.35-stable review patch.  If anyone has any objections, please let us know.

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

    From: Alex Deucher <alexdeucher@gmail.com>

    commit 4e186b2d6c878793587c35d7f06c94565d76e9b8 upstream.

    If we aren't changing the power state, no need to take
    locks and schedule fences, etc.

    There seem to be lock ordering issues in the CP and
    fence code in some cases; see bug 29140 below.

    Fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=29140
    Possibly also:
    https://bugzilla.kernel.org/show_bug.cgi?id=16581

    Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/gpu/drm/radeon/radeon_pm.c | 5 +++++
    1 file changed, 5 insertions(+)

    --- a/drivers/gpu/drm/radeon/radeon_pm.c
    +++ b/drivers/gpu/drm/radeon/radeon_pm.c
    @@ -224,6 +224,11 @@ static void radeon_pm_set_clocks(struct
    {
    int i;

    + /* no need to take locks, etc. if nothing's going to change */
    + if ((rdev->pm.requested_clock_mode_index == rdev->pm.current_clock_mode_index) &&
    + (rdev->pm.requested_power_state_index == rdev->pm.current_power_state_index))
    + return;
    +
    mutex_lock(&rdev->ddev->struct_mutex);
    mutex_lock(&rdev->vram_mutex);
    mutex_lock(&rdev->cp.mutex);



    \
     
     \ /
      Last update: 2010-08-25 01:11    [W:4.123 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site