Commit 841b5ed7 authored by Rodrigo Vivi's avatar Rodrigo Vivi Committed by Paulo Zanoni

drm/i915/cnl: Add Port F definition.

Some Cannonlake SKUs will come with a full split between
port A and port E. This will be called port F although it
is not a 6th port, but only a split.

Note this patch alone is not sufficient for port F enabling,
it's just the first step.

v2: Fix size of dvo_ports found by Ander.
v3: Adding missing cases from intel_bios.c for Port_F
v4: Adding other missing cases and fix the commit message.
v5: Rebase on top of display headers rework.
v6 (from Paulo): improve commit message, bikeshed bit definitions.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-2-paulo.r.zanoni@intel.com
parent 0b7029b7
...@@ -1140,6 +1140,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, ...@@ -1140,6 +1140,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
{DVO_PORT_HDMIC, DVO_PORT_DPC, -1}, {DVO_PORT_HDMIC, DVO_PORT_DPC, -1},
{DVO_PORT_HDMID, DVO_PORT_DPD, -1}, {DVO_PORT_HDMID, DVO_PORT_DPD, -1},
{DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE}, {DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE},
{DVO_PORT_HDMIF, DVO_PORT_DPF, -1},
}; };
/* /*
...@@ -1690,6 +1691,7 @@ bool intel_bios_is_port_present(struct drm_i915_private *dev_priv, enum port por ...@@ -1690,6 +1691,7 @@ bool intel_bios_is_port_present(struct drm_i915_private *dev_priv, enum port por
[PORT_C] = { DVO_PORT_DPC, DVO_PORT_HDMIC, }, [PORT_C] = { DVO_PORT_DPC, DVO_PORT_HDMIC, },
[PORT_D] = { DVO_PORT_DPD, DVO_PORT_HDMID, }, [PORT_D] = { DVO_PORT_DPD, DVO_PORT_HDMID, },
[PORT_E] = { DVO_PORT_DPE, DVO_PORT_HDMIE, }, [PORT_E] = { DVO_PORT_DPE, DVO_PORT_HDMIE, },
[PORT_F] = { DVO_PORT_DPF, DVO_PORT_HDMIF, },
}; };
int i; int i;
...@@ -1728,6 +1730,7 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port) ...@@ -1728,6 +1730,7 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
[PORT_C] = DVO_PORT_DPC, [PORT_C] = DVO_PORT_DPC,
[PORT_D] = DVO_PORT_DPD, [PORT_D] = DVO_PORT_DPD,
[PORT_E] = DVO_PORT_DPE, [PORT_E] = DVO_PORT_DPE,
[PORT_F] = DVO_PORT_DPF,
}; };
int i; int i;
...@@ -1763,6 +1766,7 @@ static bool child_dev_is_dp_dual_mode(const struct child_device_config *child, ...@@ -1763,6 +1766,7 @@ static bool child_dev_is_dp_dual_mode(const struct child_device_config *child,
[PORT_C] = { DVO_PORT_DPC, DVO_PORT_HDMIC, }, [PORT_C] = { DVO_PORT_DPC, DVO_PORT_HDMIC, },
[PORT_D] = { DVO_PORT_DPD, DVO_PORT_HDMID, }, [PORT_D] = { DVO_PORT_DPD, DVO_PORT_HDMID, },
[PORT_E] = { DVO_PORT_DPE, DVO_PORT_HDMIE, }, [PORT_E] = { DVO_PORT_DPE, DVO_PORT_HDMIE, },
[PORT_F] = { DVO_PORT_DPF, DVO_PORT_HDMIF, },
}; };
if (port == PORT_A || port >= ARRAY_SIZE(port_mapping)) if (port == PORT_A || port >= ARRAY_SIZE(port_mapping))
...@@ -1929,6 +1933,11 @@ intel_bios_is_lspcon_present(struct drm_i915_private *dev_priv, ...@@ -1929,6 +1933,11 @@ intel_bios_is_lspcon_present(struct drm_i915_private *dev_priv,
if (port == PORT_D) if (port == PORT_D)
return true; return true;
break; break;
case DVO_PORT_DPF:
case DVO_PORT_HDMIF:
if (port == PORT_F)
return true;
break;
default: default:
break; break;
} }
......
...@@ -119,6 +119,7 @@ enum port { ...@@ -119,6 +119,7 @@ enum port {
PORT_C, PORT_C,
PORT_D, PORT_D,
PORT_E, PORT_E,
PORT_F,
I915_MAX_PORTS I915_MAX_PORTS
}; };
......
...@@ -1378,6 +1378,7 @@ static i915_reg_t skl_aux_ctl_reg(struct drm_i915_private *dev_priv, ...@@ -1378,6 +1378,7 @@ static i915_reg_t skl_aux_ctl_reg(struct drm_i915_private *dev_priv,
case PORT_B: case PORT_B:
case PORT_C: case PORT_C:
case PORT_D: case PORT_D:
case PORT_F:
return DP_AUX_CH_CTL(port); return DP_AUX_CH_CTL(port);
default: default:
MISSING_CASE(port); MISSING_CASE(port);
...@@ -1393,6 +1394,7 @@ static i915_reg_t skl_aux_data_reg(struct drm_i915_private *dev_priv, ...@@ -1393,6 +1394,7 @@ static i915_reg_t skl_aux_data_reg(struct drm_i915_private *dev_priv,
case PORT_B: case PORT_B:
case PORT_C: case PORT_C:
case PORT_D: case PORT_D:
case PORT_F:
return DP_AUX_CH_DATA(port, index); return DP_AUX_CH_DATA(port, index);
default: default:
MISSING_CASE(port); MISSING_CASE(port);
......
...@@ -299,6 +299,8 @@ struct bdb_general_features { ...@@ -299,6 +299,8 @@ struct bdb_general_features {
#define DVO_PORT_DPA 10 #define DVO_PORT_DPA 10
#define DVO_PORT_DPE 11 /* 193 */ #define DVO_PORT_DPE 11 /* 193 */
#define DVO_PORT_HDMIE 12 /* 193 */ #define DVO_PORT_HDMIE 12 /* 193 */
#define DVO_PORT_DPF 13 /* N/A */
#define DVO_PORT_HDMIF 14 /* N/A */
#define DVO_PORT_MIPIA 21 /* 171 */ #define DVO_PORT_MIPIA 21 /* 171 */
#define DVO_PORT_MIPIB 22 /* 171 */ #define DVO_PORT_MIPIB 22 /* 171 */
#define DVO_PORT_MIPIC 23 /* 171 */ #define DVO_PORT_MIPIC 23 /* 171 */
......
...@@ -26,9 +26,8 @@ ...@@ -26,9 +26,8 @@
/* MAX_PORT is the number of port /* MAX_PORT is the number of port
* It must be sync with I915_MAX_PORTS defined i915_drv.h * It must be sync with I915_MAX_PORTS defined i915_drv.h
* 5 should be enough as only HSW, BDW, SKL need such fix.
*/ */
#define MAX_PORTS 5 #define MAX_PORTS 6
/** /**
* struct i915_audio_component_ops - Ops implemented by i915 driver, called by hda driver * struct i915_audio_component_ops - Ops implemented by i915 driver, called by hda driver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment