drm/i915/tgl: Add additional ports for Tiger Lake
authorVandita Kulkarni <vandita.kulkarni@intel.com>
Thu, 11 Jul 2019 17:31:06 +0000 (10:31 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 11 Jul 2019 23:31:14 +0000 (16:31 -0700)
There are 2 new additional typeC ports in Tiger Lake and PORT-C is now a
combophy port. This results in 6 typeC ports and 3 combophy ports.
These 6 TC ports can be DP alternate mode, DP over thunderbolt, native
DP on legacy DP connector or native HDMI on legacy connector.

v2: Rebase on new modular FIA code (Lucas)
v3: Also add new port in port_identifier(), even though it can't
    possibly be used there (requested by José)
v4: Add conversion port->tc_port in helper function after introction of
    phy namespace (Lucas)

Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190711173115.28296-13-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display.h
include/drm/i915_component.h
include/drm/i915_drm.h

index 1662e5c2be1c15fdc90f1e72c1085a7f4f52a7d6..8445244aa5930fa79b61fda0c466f95d3a20b5c6 100644 (file)
@@ -4286,6 +4286,18 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
                intel_dig_port->ddi_io_power_domain =
                        POWER_DOMAIN_PORT_DDI_F_IO;
                break;
+       case PORT_G:
+               intel_dig_port->ddi_io_power_domain =
+                       POWER_DOMAIN_PORT_DDI_G_IO;
+               break;
+       case PORT_H:
+               intel_dig_port->ddi_io_power_domain =
+                       POWER_DOMAIN_PORT_DDI_H_IO;
+               break;
+       case PORT_I:
+               intel_dig_port->ddi_io_power_domain =
+                       POWER_DOMAIN_PORT_DDI_I_IO;
+               break;
        default:
                MISSING_CASE(port);
        }
index c13784b81fb183e3e60bdb73e65042cb85f8795c..13ff4177bebaf5f7c3c9f63a5c6fc3c38bd630c8 100644 (file)
@@ -6706,6 +6706,9 @@ enum tc_port intel_port_to_tc(struct drm_i915_private *dev_priv, enum port port)
        if (!intel_phy_is_tc(dev_priv, intel_port_to_phy(dev_priv, port)))
                return PORT_TC_NONE;
 
+       if (INTEL_GEN(dev_priv) >= 12)
+               return port - PORT_D;
+
        return port - PORT_C;
 }
 
index 1f75b0a627fd4e6be2b0031f62f6e3191f333d5b..72ce27079a56a33a80286f1bf3d5d8aa15e1185e 100644 (file)
@@ -177,6 +177,12 @@ static inline const char *port_identifier(enum port port)
                return "Port E";
        case PORT_F:
                return "Port F";
+       case PORT_G:
+               return "Port G";
+       case PORT_H:
+               return "Port H";
+       case PORT_I:
+               return "Port I";
        default:
                return "<invalid>";
        }
@@ -189,6 +195,8 @@ enum tc_port {
        PORT_TC2,
        PORT_TC3,
        PORT_TC4,
+       PORT_TC5,
+       PORT_TC6,
 
        I915_MAX_TC_PORTS
 };
index dcb95bd9dee6f8e861d41c0b70f0e8c76bbfaf7b..55c3b123581bb0f9993e6776e51cd4653bd9da7a 100644 (file)
@@ -34,7 +34,7 @@ enum i915_component_type {
 /* MAX_PORT is the number of port
  * It must be sync with I915_MAX_PORTS defined i915_drv.h
  */
-#define MAX_PORTS 6
+#define MAX_PORTS 9
 
 /**
  * struct i915_audio_component - Used for direct communication between i915 and hda drivers
index 7523e9a7b6e244474b9308b2c32ea9ef9c5e1de8..eb30062359d1d8a9530b1fa5f070b851d475b951 100644 (file)
@@ -109,6 +109,9 @@ enum port {
        PORT_D,
        PORT_E,
        PORT_F,
+       PORT_G,
+       PORT_H,
+       PORT_I,
 
        I915_MAX_PORTS
 };