drm/radeon/kms/atom: get better min pixel clock info
authorMathias Fröhlich <Mathias.Froehlich@web.de>
Mon, 19 Oct 2009 21:49:49 +0000 (17:49 -0400)
committerDave Airlie <airlied@redhat.com>
Mon, 26 Oct 2009 03:28:20 +0000 (13:28 +1000)
Where supported use ulMinPixelClockPLL_Output rather than
usMinPixelClockPLL_Output for pll_out_min.  This seems to
improve pll selection on some boards.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_atombios.c

index 79d4b771c770d61b07ff632567c9852f8b6e04dc..cec67917179f53f2066025c1b244e169af9f4e48 100644 (file)
@@ -641,8 +641,12 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
                    le16_to_cpu(firmware_info->info.usReferenceClock);
                p1pll->reference_div = 0;
 
-               p1pll->pll_out_min =
-                   le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output);
+               if (crev < 2)
+                       p1pll->pll_out_min =
+                               le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output);
+               else
+                       p1pll->pll_out_min =
+                               le32_to_cpu(firmware_info->info_12.ulMinPixelClockPLL_Output);
                p1pll->pll_out_max =
                    le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output);