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

    drm/radeon/kms: Enable new pll calculation for avivo+ asics

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-enable-new-pll-calculation-for-avivo-asics.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 619efb105924d8cafa0c1dd9389e9ab506f5425d Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Mon, 31 Jan 2011 16:48:53 -0500
Subject: drm/radeon/kms: Enable new pll calculation for avivo+ asics

From: Alex Deucher <[email protected]>

commit 619efb105924d8cafa0c1dd9389e9ab506f5425d upstream.

New algo is used for r5xx+ and legacy is used for
r1xx-r4xx, rv515.

I've tested on all relevant GPUs and monitors that I
have access to and have found no problems.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=26562
https://bugzilla.kernel.org/show_bug.cgi?id=26552
May fix:
https://bugs.freedesktop.org/show_bug.cgi?id=32556

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/atombios_crtc.c   |   18 ++++++++++++++++--
 drivers/gpu/drm/radeon/radeon_atombios.c |   10 ----------
 drivers/gpu/drm/radeon/radeon_display.c  |    3 +++
 3 files changed, 19 insertions(+), 12 deletions(-)

--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -531,6 +531,7 @@ static u32 atombios_adjust_pll(struct dr
                                        dp_clock = dig_connector->dp_clock;
                                }
                        }
+/* this might work properly with the new pll algo */
 #if 0 /* doesn't work properly on some laptops */
                        /* use recommended ref_div for ss */
                        if (radeon_encoder->devices & 
(ATOM_DEVICE_LCD_SUPPORT)) {
@@ -548,6 +549,11 @@ static u32 atombios_adjust_pll(struct dr
                                        adjusted_clock = mode->clock * 2;
                                if (radeon_encoder->active_device & 
(ATOM_DEVICE_TV_SUPPORT))
                                        pll->flags |= 
RADEON_PLL_PREFER_CLOSEST_LOWER;
+                               /* rv515 needs more testing with this option */
+                               if (rdev->family != CHIP_RV515) {
+                                       if (radeon_encoder->devices & 
(ATOM_DEVICE_LCD_SUPPORT))
+                                               pll->flags |= RADEON_PLL_IS_LCD;
+                               }
                        } else {
                                if (encoder->encoder_type != 
DRM_MODE_ENCODER_DAC)
                                        pll->flags |= 
RADEON_PLL_NO_ODD_POST_DIV;
@@ -915,8 +921,16 @@ static void atombios_crtc_set_pll(struct
        /* adjust pixel clock as needed */
        adjusted_clock = atombios_adjust_pll(crtc, mode, pll, ss_enabled, &ss);
 
-       radeon_compute_pll_legacy(pll, adjusted_clock, &pll_clock, &fb_div, 
&frac_fb_div,
-                                 &ref_div, &post_div);
+       /* rv515 seems happier with the old algo */
+       if (rdev->family == CHIP_RV515)
+               radeon_compute_pll_legacy(pll, adjusted_clock, &pll_clock, 
&fb_div, &frac_fb_div,
+                                         &ref_div, &post_div);
+       else if (ASIC_IS_AVIVO(rdev))
+               radeon_compute_pll_avivo(pll, adjusted_clock, &pll_clock, 
&fb_div, &frac_fb_div,
+                                        &ref_div, &post_div);
+       else
+               radeon_compute_pll_legacy(pll, adjusted_clock, &pll_clock, 
&fb_div, &frac_fb_div,
+                                         &ref_div, &post_div);
 
        atombios_crtc_program_ss(crtc, ATOM_DISABLE, radeon_crtc->pll_id, &ss);
 
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -1136,16 +1136,6 @@ bool radeon_atom_get_clock_info(struct d
                                p1pll->pll_out_min = 64800;
                        else
                                p1pll->pll_out_min = 20000;
-               } else if (p1pll->pll_out_min > 64800) {
-                       /* Limiting the pll output range is a good thing 
generally as
-                        * it limits the number of possible pll combinations 
for a given
-                        * frequency presumably to the ones that work best on 
each card.
-                        * However, certain duallink DVI monitors seem to like
-                        * pll combinations that would be limited by this at 
least on
-                        * pre-DCE 3.0 r6xx hardware.  This might need to be 
adjusted per
-                        * family.
-                        */
-                       p1pll->pll_out_min = 64800;
                }
 
                p1pll->pll_in_min =
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -603,6 +603,9 @@ void radeon_compute_pll_legacy(struct ra
                pll_out_max = pll->pll_out_max;
        }
 
+       if (pll_out_min > 64800)
+               pll_out_min = 64800;
+
        if (pll->flags & RADEON_PLL_USE_REF_DIV)
                min_ref_div = max_ref_div = pll->reference_div;
        else {


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

queue-2.6.37/drm-radeon-kms-fix-s-r-issues-with-bios-scratch-regs.patch
queue-2.6.37/drm-radeon-remove-0x4243-pci-id.patch
queue-2.6.37/drm-radeon-kms-switch-back-to-min-max-pll-post-divider-iteration.patch
queue-2.6.37/drm-radeon-kms-add-new-pll-algo-for-avivo-asics.patch
queue-2.6.37/drm-radeon-kms-add-pll-debugging-output.patch
queue-2.6.37/drm-radeon-kms-enable-new-pll-calculation-for-avivo-asics.patch
queue-2.6.37/drm-radeon-kms-evergreen-always-set-certain-vgt-regs-at-cp-init.patch
queue-2.6.37/drm-radeon-kms-adjust-quirk-for-acer-laptop.patch
queue-2.6.37/drm-radeon-kms-make-the-mac-rv630-quirk-generic.patch
queue-2.6.37/drm-radeon-kms-re-emit-full-context-state-for-evergreen-blits.patch
queue-2.6.37/drm-radeon-kms-add-quirk-for-mac-radeon-hd-2600-card.patch
queue-2.6.37/radeon-kms-fix-dp-displayport-mode-validation.patch

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

Reply via email to