drm/i915: Kill PCH_KBP
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 6 May 2019 15:26:27 +0000 (18:26 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 7 May 2019 18:49:57 +0000 (21:49 +0300)
For us KBP is 100% identical to SPT. Kill the redundant enum
value. Also bspec doesn't talk about KBP either, so this might
avoid some confusion when cross checking the code against the
spec.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190506152627.20283-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_gmbus.c

index 5ed864752c7bb5a6a7204c7cefbcdb85f90cea02..2c7a4318d13cfeb3ae4c085df030c659a032eea5 100644 (file)
@@ -195,7 +195,8 @@ intel_pch_type(const struct drm_i915_private *dev_priv, unsigned short id)
                DRM_DEBUG_KMS("Found Kaby Lake PCH (KBP)\n");
                WARN_ON(!IS_SKYLAKE(dev_priv) && !IS_KABYLAKE(dev_priv) &&
                        !IS_COFFEELAKE(dev_priv));
-               return PCH_KBP;
+               /* KBP is SPT compatible */
+               return PCH_SPT;
        case INTEL_PCH_CNP_DEVICE_ID_TYPE:
                DRM_DEBUG_KMS("Found Cannon Lake PCH (CNP)\n");
                WARN_ON(!IS_CANNONLAKE(dev_priv) && !IS_COFFEELAKE(dev_priv));
index 2bf518fea36e753afa84f6ff85a62dd469dc89a0..0a6ec61496f135ef05491fa810bec095e0f1962f 100644 (file)
@@ -532,8 +532,7 @@ enum intel_pch {
        PCH_IBX,        /* Ibexpeak PCH */
        PCH_CPT,        /* Cougarpoint/Pantherpoint PCH */
        PCH_LPT,        /* Lynxpoint/Wildcatpoint PCH */
-       PCH_SPT,        /* Sunrisepoint PCH */
-       PCH_KBP,        /* Kaby Lake PCH */
+       PCH_SPT,        /* Sunrisepoint/Kaby Lake PCH */
        PCH_CNP,        /* Cannon/Comet Lake PCH */
        PCH_ICP,        /* Ice Lake PCH */
 };
@@ -2629,7 +2628,6 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define INTEL_PCH_ID(dev_priv) ((dev_priv)->pch_id)
 #define HAS_PCH_ICP(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_ICP)
 #define HAS_PCH_CNP(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_CNP)
-#define HAS_PCH_KBP(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_KBP)
 #define HAS_PCH_SPT(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_SPT)
 #define HAS_PCH_LPT(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_LPT)
 #define HAS_PCH_LPT_LP(dev_priv) \
index 8c36a06bda3f9a22dc8f7212d06a31625a566428..969ce8b71e32cd05b088e896a26ab1f84632da22 100644 (file)
@@ -581,8 +581,7 @@ do_gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num,
        /* Display WA #0868: skl,bxt,kbl,cfl,glk,cnl */
        if (IS_GEN9_LP(dev_priv))
                bxt_gmbus_clock_gating(dev_priv, false);
-       else if (HAS_PCH_SPT(dev_priv) ||
-                HAS_PCH_KBP(dev_priv) || HAS_PCH_CNP(dev_priv))
+       else if (HAS_PCH_SPT(dev_priv) || HAS_PCH_CNP(dev_priv))
                pch_gmbus_clock_gating(dev_priv, false);
 
 retry:
@@ -691,8 +690,7 @@ out:
        /* Display WA #0868: skl,bxt,kbl,cfl,glk,cnl */
        if (IS_GEN9_LP(dev_priv))
                bxt_gmbus_clock_gating(dev_priv, true);
-       else if (HAS_PCH_SPT(dev_priv) ||
-                HAS_PCH_KBP(dev_priv) || HAS_PCH_CNP(dev_priv))
+       else if (HAS_PCH_SPT(dev_priv) || HAS_PCH_CNP(dev_priv))
                pch_gmbus_clock_gating(dev_priv, true);
 
        return ret;