drm/i915: fix intel_ddi_get_cdclk_freq for ULT machines
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 20 Nov 2012 15:27:43 +0000 (13:27 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 21 Nov 2012 16:47:11 +0000 (17:47 +0100)
For now, this code is just used by the eDP AUX channel frequency.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_ddi.c

index 669afcabe3b1823781db583730c65d847e9d25e2..87c06f97fa896b23429be1e3ee2eaadfa4de1184 100644 (file)
@@ -1161,6 +1161,8 @@ struct drm_i915_file_private {
 #define IS_VALLEYVIEW(dev)     (INTEL_INFO(dev)->is_valleyview)
 #define IS_HASWELL(dev)        (INTEL_INFO(dev)->is_haswell)
 #define IS_MOBILE(dev)         (INTEL_INFO(dev)->is_mobile)
+#define IS_ULT(dev)            (IS_HASWELL(dev) && \
+                                ((dev)->pci_device & 0xFF00) == 0x0A00)
 
 /*
  * The genX designation typically refers to the render engine, so render
index d706d538e8b74c404253bb322c5fc51adc5e1898..852012b6fc5bbe98fcdc73ff31b2006f79a16315 100644 (file)
@@ -1309,6 +1309,8 @@ int intel_ddi_get_cdclk_freq(struct drm_i915_private *dev_priv)
        else if ((I915_READ(LCPLL_CTL) & LCPLL_CLK_FREQ_MASK) ==
                 LCPLL_CLK_FREQ_450)
                return 450;
+       else if (IS_ULT(dev_priv->dev))
+               return 338;
        else
                return 540;
 }