|
@@ -4163,6 +4163,30 @@ static int i9xx_misc_get_display_clock_speed(struct drm_device *dev)
|
|
|
return 200000;
|
|
|
}
|
|
|
|
|
|
+static int pnv_get_display_clock_speed(struct drm_device *dev)
|
|
|
+{
|
|
|
+ u16 gcfgc = 0;
|
|
|
+
|
|
|
+ pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
|
|
|
+
|
|
|
+ switch (gcfgc & GC_DISPLAY_CLOCK_MASK) {
|
|
|
+ case GC_DISPLAY_CLOCK_267_MHZ_PNV:
|
|
|
+ return 267000;
|
|
|
+ case GC_DISPLAY_CLOCK_333_MHZ_PNV:
|
|
|
+ return 333000;
|
|
|
+ case GC_DISPLAY_CLOCK_444_MHZ_PNV:
|
|
|
+ return 444000;
|
|
|
+ case GC_DISPLAY_CLOCK_200_MHZ_PNV:
|
|
|
+ return 200000;
|
|
|
+ default:
|
|
|
+ DRM_ERROR("Unknown pnv display core clock 0x%04x\n", gcfgc);
|
|
|
+ case GC_DISPLAY_CLOCK_133_MHZ_PNV:
|
|
|
+ return 133000;
|
|
|
+ case GC_DISPLAY_CLOCK_167_MHZ_PNV:
|
|
|
+ return 167000;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static int i915gm_get_display_clock_speed(struct drm_device *dev)
|
|
|
{
|
|
|
u16 gcfgc = 0;
|
|
@@ -9605,9 +9629,12 @@ static void intel_init_display(struct drm_device *dev)
|
|
|
else if (IS_I915G(dev))
|
|
|
dev_priv->display.get_display_clock_speed =
|
|
|
i915_get_display_clock_speed;
|
|
|
- else if (IS_I945GM(dev) || IS_845G(dev) || IS_PINEVIEW_M(dev))
|
|
|
+ else if (IS_I945GM(dev) || IS_845G(dev))
|
|
|
dev_priv->display.get_display_clock_speed =
|
|
|
i9xx_misc_get_display_clock_speed;
|
|
|
+ else if (IS_PINEVIEW(dev))
|
|
|
+ dev_priv->display.get_display_clock_speed =
|
|
|
+ pnv_get_display_clock_speed;
|
|
|
else if (IS_I915GM(dev))
|
|
|
dev_priv->display.get_display_clock_speed =
|
|
|
i915gm_get_display_clock_speed;
|