drm/i915/cfl: Basic DDI plumbing for Coffee Lake.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 9 Jun 2017 22:02:50 +0000 (15:02 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 12 Jun 2017 16:48:58 +0000 (09:48 -0700)
All here is pretty much like Kabylake.

Including CFL-U has to use same ddi translation table
as KBL-U for now.

v2: Include missed IS_COFFEELAKE on edp trans table. (DK)
    Handle CFL-U with same translation table as KBL-U. (DK and
    confirmed with HW engineers)

v3: Adding missed case for IS_CFL_ULT. (DK).

v4: Duh! Now with the real IS_CFL_ULT instead of KBL one. (DK)
    Also use IS_GEN9_BC when possible. (DK)

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1497045770-21302-1-git-send-email-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_ddi.c

index c3ea485cb82af979e9f3be094c83068fc14ceccd..467786d25348f815f3e03f4614b5b90df6d27a0b 100644 (file)
@@ -2810,6 +2810,8 @@ intel_info(const struct drm_i915_private *dev_priv)
                                 (INTEL_DEVID(dev_priv) & 0x00F0) == 0x0020)
 #define IS_SKL_GT4(dev_priv)   (IS_SKYLAKE(dev_priv) && \
                                 (INTEL_DEVID(dev_priv) & 0x00F0) == 0x0030)
+#define IS_CFL_ULT(dev_priv)   (IS_COFFEELAKE(dev_priv) && \
+                                (INTEL_DEVID(dev_priv) & 0x00F0) == 0x00A0)
 
 #define IS_ALPHA_SUPPORT(intel_info) ((intel_info)->is_alpha_support)
 
index 721c2e2c12a30d8527aae4a9f18fb3a7dc7ea46c..db8093863f0ccc7e603fc183cf79905ab91fc75e 100644 (file)
@@ -544,7 +544,7 @@ kbl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries)
        if (IS_KBL_ULX(dev_priv)) {
                *n_entries = ARRAY_SIZE(kbl_y_ddi_translations_dp);
                return kbl_y_ddi_translations_dp;
-       } else if (IS_KBL_ULT(dev_priv)) {
+       } else if (IS_KBL_ULT(dev_priv) || IS_CFL_ULT(dev_priv)) {
                *n_entries = ARRAY_SIZE(kbl_u_ddi_translations_dp);
                return kbl_u_ddi_translations_dp;
        } else {
@@ -560,7 +560,8 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)
                if (IS_SKL_ULX(dev_priv) || IS_KBL_ULX(dev_priv)) {
                        *n_entries = ARRAY_SIZE(skl_y_ddi_translations_edp);
                        return skl_y_ddi_translations_edp;
-               } else if (IS_SKL_ULT(dev_priv) || IS_KBL_ULT(dev_priv)) {
+               } else if (IS_SKL_ULT(dev_priv) || IS_KBL_ULT(dev_priv) ||
+                          IS_CFL_ULT(dev_priv)) {
                        *n_entries = ARRAY_SIZE(skl_u_ddi_translations_edp);
                        return skl_u_ddi_translations_edp;
                } else {
@@ -569,7 +570,7 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)
                }
        }
 
-       if (IS_KABYLAKE(dev_priv))
+       if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))
                return kbl_get_buf_trans_dp(dev_priv, n_entries);
        else
                return skl_get_buf_trans_dp(dev_priv, n_entries);
@@ -625,7 +626,7 @@ static const struct ddi_buf_trans *
 intel_ddi_get_buf_trans_dp(struct drm_i915_private *dev_priv,
                           int *n_entries)
 {
-       if (IS_KABYLAKE(dev_priv)) {
+       if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv)) {
                return kbl_get_buf_trans_dp(dev_priv, n_entries);
        } else if (IS_SKYLAKE(dev_priv)) {
                return skl_get_buf_trans_dp(dev_priv, n_entries);
@@ -645,7 +646,7 @@ static const struct ddi_buf_trans *
 intel_ddi_get_buf_trans_edp(struct drm_i915_private *dev_priv,
                            int *n_entries)
 {
-       if (IS_KABYLAKE(dev_priv) || IS_SKYLAKE(dev_priv)) {
+       if (IS_GEN9_BC(dev_priv)) {
                return skl_get_buf_trans_edp(dev_priv, n_entries);
        } else if (IS_BROADWELL(dev_priv)) {
                return bdw_get_buf_trans_edp(dev_priv, n_entries);
@@ -1618,7 +1619,7 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)
                if (dp_iboost) {
                        iboost = dp_iboost;
                } else {
-                       if (IS_KABYLAKE(dev_priv))
+                       if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))
                                ddi_translations = kbl_get_buf_trans_dp(dev_priv,
                                                                        &n_entries);
                        else