This is a note to let you know that I've just added the patch titled

    drm/radeon/kms: add bounds checking to avivo pll algo

to the 2.6.37-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-kms-add-bounds-checking-to-avivo-pll-algo.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From a4b40d5d97f5c9ad0b7f4bf2818291ca184bb433 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Mon, 14 Feb 2011 11:43:10 -0500
Subject: drm/radeon/kms: add bounds checking to avivo pll algo

From: Alex Deucher <[email protected]>

commit a4b40d5d97f5c9ad0b7f4bf2818291ca184bb433 upstream.

Prevent divider overflow.
Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=28932

Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

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

--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -461,6 +461,11 @@ static void avivo_get_fb_div(struct rade
        tmp *= target_clock;
        *fb_div = tmp / pll->reference_freq;
        *frac_fb_div = tmp % pll->reference_freq;
+
+        if (*fb_div > pll->max_feedback_div)
+               *fb_div = pll->max_feedback_div;
+        else if (*fb_div < pll->min_feedback_div)
+                *fb_div = pll->min_feedback_div;
 }
 
 static u32 avivo_get_post_div(struct radeon_pll *pll,
@@ -494,6 +499,11 @@ static u32 avivo_get_post_div(struct rad
                        post_div--;
        }
 
+       if (post_div > pll->max_post_div)
+               post_div = pll->max_post_div;
+       else if (post_div < pll->min_post_div)
+               post_div = pll->min_post_div;
+
        return post_div;
 }
 


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.37/drm-radeon-kms-add-bounds-checking-to-avivo-pll-algo.patch
queue-2.6.37/drm-radeon-kms-hopefully-fix-pll-issues-for-real-v3.patch
queue-2.6.37/drm-radeon-kms-add-connector-table-for-mac-g5-9600.patch
queue-2.6.37/drm-radeon-kms-fix-interlaced-modes-on-dce4.patch
queue-2.6.37/drm-radeon-kms-improve-6xx-7xx-cs-error-output.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to