@@ -2436,8 +2436,8 @@ static enum port dvo_port_to_port(struct drm_i915_private *i915,
[PORT_A] = { DVO_PORT_HDMIA, DVO_PORT_DPA, -1 },
[PORT_B] = { DVO_PORT_HDMIB, DVO_PORT_DPB, -1 },
[PORT_C] = { DVO_PORT_HDMIC, DVO_PORT_DPC, -1 },
- [PORT_D_XELPD] = { DVO_PORT_HDMID, DVO_PORT_DPD, -1 },
- [PORT_E_XELPD] = { DVO_PORT_HDMIE, DVO_PORT_DPE, -1 },
+ [PORT_D] = { DVO_PORT_HDMID, DVO_PORT_DPD, -1 },
+ [PORT_E] = { DVO_PORT_HDMIE, DVO_PORT_DPE, -1 },
[PORT_TC1] = { DVO_PORT_HDMIF, DVO_PORT_DPF, -1 },
[PORT_TC2] = { DVO_PORT_HDMIG, DVO_PORT_DPG, -1 },
[PORT_TC3] = { DVO_PORT_HDMIH, DVO_PORT_DPH, -1 },
@@ -4134,17 +4134,6 @@ static bool hti_uses_phy(struct drm_i915_private *i915, enum phy phy)
i915->hti_state & HDPORT_DDI_USED(phy);
}
-static enum hpd_pin xelpd_hpd_pin(struct drm_i915_private *dev_priv,
- enum port port)
-{
- if (port >= PORT_D_XELPD)
- return HPD_PORT_D + port - PORT_D_XELPD;
- else if (port >= PORT_TC1)
- return HPD_PORT_TC1 + port - PORT_TC1;
- else
- return HPD_PORT_A + port - PORT_A;
-}
-
static enum hpd_pin dg1_hpd_pin(struct drm_i915_private *dev_priv,
enum port port)
{
@@ -4313,13 +4302,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
encoder = &dig_port->base;
encoder->devdata = devdata;
- if (DISPLAY_VER(dev_priv) >= 13 && port >= PORT_D_XELPD) {
- drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs,
- DRM_MODE_ENCODER_TMDS,
- "DDI %c/PHY %c",
- port_name(port - PORT_D_XELPD + PORT_D),
- phy_name(phy));
- } else if (DISPLAY_VER(dev_priv) >= 12) {
+ if (DISPLAY_VER(dev_priv) >= 12) {
enum tc_port tc_port = intel_port_to_tc(dev_priv, port);
drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs,
@@ -4449,9 +4432,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
intel_ddi_buf_trans_init(encoder);
- if (DISPLAY_VER(dev_priv) >= 13)
- encoder->hpd_pin = xelpd_hpd_pin(dev_priv, port);
- else if (IS_DG1(dev_priv))
+ if (IS_DG1(dev_priv))
encoder->hpd_pin = dg1_hpd_pin(dev_priv, port);
else if (IS_ROCKETLAKE(dev_priv))
encoder->hpd_pin = rkl_hpd_pin(dev_priv, port);
@@ -2135,9 +2135,7 @@ bool intel_phy_is_snps(struct drm_i915_private *dev_priv, enum phy phy)
enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port)
{
- if (DISPLAY_VER(i915) >= 13 && port >= PORT_D_XELPD)
- return PHY_D + port - PORT_D_XELPD;
- else if (DISPLAY_VER(i915) >= 13 && port >= PORT_TC1)
+ if (DISPLAY_VER(i915) >= 13 && port >= PORT_TC1)
return PHY_F + port - PORT_TC1;
else if (IS_ALDERLAKE_S(i915) && port >= PORT_TC1)
return PHY_B + port - PORT_TC1;
@@ -7907,7 +7905,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
intel_ddi_init(dev_priv, PORT_A);
intel_ddi_init(dev_priv, PORT_B);
intel_ddi_init(dev_priv, PORT_C);
- intel_ddi_init(dev_priv, PORT_D_XELPD);
+ intel_ddi_init(dev_priv, PORT_D);
intel_ddi_init(dev_priv, PORT_TC1);
} else if (IS_ALDERLAKE_P(dev_priv)) {
intel_ddi_init(dev_priv, PORT_A);
@@ -220,8 +220,6 @@ enum port {
PORT_TC5,
PORT_TC6,
- PORT_D_XELPD,
- PORT_E_XELPD,
I915_MAX_PORTS
};
@@ -2338,9 +2338,9 @@ static const struct intel_ddi_port_domains
d12_port_domains[] = {
{
.port_start = PORT_A,
- .port_end = PORT_C,
+ .port_end = PORT_E,
.aux_ch_start = AUX_CH_A,
- .aux_ch_end = AUX_CH_C,
+ .aux_ch_end = AUX_CH_E,
.ddi_lanes = POWER_DOMAIN_PORT_DDI_LANES_A,
.ddi_io = POWER_DOMAIN_PORT_DDI_IO_A,
@@ -2359,50 +2359,12 @@ d12_port_domains[] = {
},
};
-static const struct intel_ddi_port_domains
-d13_port_domains[] = {
- {
- .port_start = PORT_A,
- .port_end = PORT_C,
- .aux_ch_start = AUX_CH_A,
- .aux_ch_end = AUX_CH_C,
-
- .ddi_lanes = POWER_DOMAIN_PORT_DDI_LANES_A,
- .ddi_io = POWER_DOMAIN_PORT_DDI_IO_A,
- .aux_legacy_usbc = POWER_DOMAIN_AUX_A,
- .aux_tbt = POWER_DOMAIN_INVALID,
- }, {
- .port_start = PORT_TC1,
- .port_end = PORT_TC4,
- .aux_ch_start = AUX_CH_USBC1,
- .aux_ch_end = AUX_CH_USBC4,
-
- .ddi_lanes = POWER_DOMAIN_PORT_DDI_LANES_TC1,
- .ddi_io = POWER_DOMAIN_PORT_DDI_IO_TC1,
- .aux_legacy_usbc = POWER_DOMAIN_AUX_USBC1,
- .aux_tbt = POWER_DOMAIN_AUX_TBT1,
- }, {
- .port_start = PORT_D_XELPD,
- .port_end = PORT_E_XELPD,
- .aux_ch_start = AUX_CH_D_XELPD,
- .aux_ch_end = AUX_CH_E_XELPD,
-
- .ddi_lanes = POWER_DOMAIN_PORT_DDI_LANES_D,
- .ddi_io = POWER_DOMAIN_PORT_DDI_IO_D,
- .aux_legacy_usbc = POWER_DOMAIN_AUX_D,
- .aux_tbt = POWER_DOMAIN_INVALID,
- },
-};
-
static void
intel_port_domains_for_platform(struct drm_i915_private *i915,
const struct intel_ddi_port_domains **domains,
int *domains_size)
{
- if (DISPLAY_VER(i915) >= 13) {
- *domains = d13_port_domains;
- *domains_size = ARRAY_SIZE(d13_port_domains);
- } else if (DISPLAY_VER(i915) >= 12) {
+ if (DISPLAY_VER(i915) >= 12) {
*domains = d12_port_domains;
*domains_size = ARRAY_SIZE(d12_port_domains);
} else if (DISPLAY_VER(i915) >= 11) {
@@ -164,8 +164,8 @@
[PORT_TC2] = 4, \
[PORT_TC3] = 5, \
[PORT_TC4] = 6, \
- [PORT_D_XELPD] = 7, \
- [PORT_E_XELPD] = 8, \
+ [PORT_D] = 7, \
+ [PORT_E] = 8, \
}
#define I9XX_COLORS \
@@ -35,7 +35,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 17
+#define MAX_PORTS 15
/**
* struct i915_audio_component - Used for direct communication between i915 and hda drivers
Port enums are no more used in the DDI register offset caculcation. We can remove the platform specific port redefinitions. Along with it we also get rid of the code required for handling these special definitions. Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> --- drivers/gpu/drm/i915/display/intel_bios.c | 4 +- drivers/gpu/drm/i915/display/intel_ddi.c | 23 +--------- drivers/gpu/drm/i915/display/intel_display.c | 6 +-- drivers/gpu/drm/i915/display/intel_display.h | 2 - .../drm/i915/display/intel_display_power.c | 44 ++----------------- drivers/gpu/drm/i915/i915_pci.c | 4 +- include/drm/i915_component.h | 2 +- 7 files changed, 12 insertions(+), 73 deletions(-)