drm/i915: Add HAS_PCH_LPT_H()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 30 Nov 2015 14:23:44 +0000 (16:23 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 2 Dec 2015 09:22:57 +0000 (11:22 +0200)
We have HAS_PCH_LPT_LP() already, so add HAS_PCH_LPT_H() and use it
where appropriate.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448893432-6978-4-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_panel.c

index 256a3bcc5f70a4b15a97bf52d36058d4a5d08d5e..ba611c7108603cba65bc9b2b0d8e480775f2aa88 100644 (file)
@@ -2615,6 +2615,7 @@ struct drm_i915_cmd_table {
 #define HAS_PCH_SPT(dev) (INTEL_PCH_TYPE(dev) == PCH_SPT)
 #define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
 #define HAS_PCH_LPT_LP(dev) (__I915__(dev)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE)
+#define HAS_PCH_LPT_H(dev) (__I915__(dev)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE)
 #define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
 #define HAS_PCH_IBX(dev) (INTEL_PCH_TYPE(dev) == PCH_IBX)
 #define HAS_PCH_NOP(dev) (INTEL_PCH_TYPE(dev) == PCH_NOP)
index 2805f0d4ba4501c7aa3d1c991c3dc6bf93a79792..02bddb02e4dab634f1298cac31d36dcdda3db3ae 100644 (file)
@@ -711,7 +711,7 @@ static uint32_t hsw_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
                if (index)
                        return 0;
                return DIV_ROUND_CLOSEST(dev_priv->cdclk_freq, 2000);
-       } else if (dev_priv->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
+       } else if (HAS_PCH_LPT_H(dev_priv)) {
                /* Workaround for non-ULT HSW */
                switch (index) {
                case 0: return 63;
index d4beac3c19a467967a2eb7e3f93e9ceae1f8e56e..eb42b388a5e99518be1a90ebb92c094bcdbea8af 100644 (file)
@@ -1308,7 +1308,7 @@ static u32 lpt_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz)
        else
                mul = 128;
 
-       if (dev_priv->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE)
+       if (HAS_PCH_LPT_H(dev_priv))
                clock = MHz(135); /* LPT:H */
        else
                clock = MHz(24); /* LPT:LP */