diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2015-08-07 20:35:21 -0400 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-08-31 11:28:09 -0400 |
commit | 2800e4c228b8961c4da1a4925cc20c16e623851b (patch) | |
tree | f3addbbeb1e3dca02e4d08efbfec4a33cf683f3c | |
parent | 11c1b657c42f65c43f866b611956ef0a10bedafc (diff) |
drm/i915/skl: Enable DDI-E
There are OEMs using DDI-E out there,
so let's enable it.
Unfortunately there is no detection bit for DDI-E
So we need to rely on VBT for that.
I also need to give credits to Xiong since before seing
his approach to check info->support_* I was creating an ugly
vbt->ddie_sfuse_strap in order to propagate the ddi presence info
v2: Rebased as last patch in the series. since all other patches
in this series are needed for anything working propperly on DDI-E.
Credits-to: "Zhang, Xiong Y" <xiong.y.zhang@intel.com>
Cc: "Zhang, Xiong Y" <xiong.y.zhang@intel.com>
Reviewed-by: Xiong Zhang <xiong.y.zhang@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 9 |
3 files changed, 18 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 313b5a73c6b4..b3e437b3bb54 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -909,19 +909,19 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, | |||
909 | /* Each DDI port can have more than one value on the "DVO Port" field, | 909 | /* Each DDI port can have more than one value on the "DVO Port" field, |
910 | * so look for all the possible values for each port and abort if more | 910 | * so look for all the possible values for each port and abort if more |
911 | * than one is found. */ | 911 | * than one is found. */ |
912 | int dvo_ports[][2] = { | 912 | int dvo_ports[][3] = { |
913 | {DVO_PORT_HDMIA, DVO_PORT_DPA}, | 913 | {DVO_PORT_HDMIA, DVO_PORT_DPA, -1}, |
914 | {DVO_PORT_HDMIB, DVO_PORT_DPB}, | 914 | {DVO_PORT_HDMIB, DVO_PORT_DPB, -1}, |
915 | {DVO_PORT_HDMIC, DVO_PORT_DPC}, | 915 | {DVO_PORT_HDMIC, DVO_PORT_DPC, -1}, |
916 | {DVO_PORT_HDMID, DVO_PORT_DPD}, | 916 | {DVO_PORT_HDMID, DVO_PORT_DPD, -1}, |
917 | {DVO_PORT_CRT, -1 /* Port E can only be DVO_PORT_CRT */ }, | 917 | {DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE}, |
918 | }; | 918 | }; |
919 | 919 | ||
920 | /* Find the child device to use, abort if more than one found. */ | 920 | /* Find the child device to use, abort if more than one found. */ |
921 | for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { | 921 | for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { |
922 | it = dev_priv->vbt.child_dev + i; | 922 | it = dev_priv->vbt.child_dev + i; |
923 | 923 | ||
924 | for (j = 0; j < 2; j++) { | 924 | for (j = 0; j < 3; j++) { |
925 | if (dvo_ports[port][j] == -1) | 925 | if (dvo_ports[port][j] == -1) |
926 | break; | 926 | break; |
927 | 927 | ||
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h index 06d0dbde2be6..a59122731efd 100644 --- a/drivers/gpu/drm/i915/intel_bios.h +++ b/drivers/gpu/drm/i915/intel_bios.h | |||
@@ -775,6 +775,8 @@ int intel_parse_bios(struct drm_device *dev); | |||
775 | #define DVO_PORT_DPC 8 | 775 | #define DVO_PORT_DPC 8 |
776 | #define DVO_PORT_DPD 9 | 776 | #define DVO_PORT_DPD 9 |
777 | #define DVO_PORT_DPA 10 | 777 | #define DVO_PORT_DPA 10 |
778 | #define DVO_PORT_DPE 11 | ||
779 | #define DVO_PORT_HDMIE 12 | ||
778 | #define DVO_PORT_MIPIA 21 | 780 | #define DVO_PORT_MIPIA 21 |
779 | #define DVO_PORT_MIPIB 22 | 781 | #define DVO_PORT_MIPIB 22 |
780 | #define DVO_PORT_MIPIC 23 | 782 | #define DVO_PORT_MIPIC 23 |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 8ea9821261ab..9bae13394e5b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -13960,6 +13960,15 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
13960 | intel_ddi_init(dev, PORT_C); | 13960 | intel_ddi_init(dev, PORT_C); |
13961 | if (found & SFUSE_STRAP_DDID_DETECTED) | 13961 | if (found & SFUSE_STRAP_DDID_DETECTED) |
13962 | intel_ddi_init(dev, PORT_D); | 13962 | intel_ddi_init(dev, PORT_D); |
13963 | /* | ||
13964 | * On SKL we don't have a way to detect DDI-E so we rely on VBT. | ||
13965 | */ | ||
13966 | if (IS_SKYLAKE(dev) && | ||
13967 | (dev_priv->vbt.ddi_port_info[PORT_E].supports_dp || | ||
13968 | dev_priv->vbt.ddi_port_info[PORT_E].supports_dvi || | ||
13969 | dev_priv->vbt.ddi_port_info[PORT_E].supports_hdmi)) | ||
13970 | intel_ddi_init(dev, PORT_E); | ||
13971 | |||
13963 | } else if (HAS_PCH_SPLIT(dev)) { | 13972 | } else if (HAS_PCH_SPLIT(dev)) { |
13964 | int found; | 13973 | int found; |
13965 | dpd_is_edp = intel_dp_is_edp(dev, PORT_D); | 13974 | dpd_is_edp = intel_dp_is_edp(dev, PORT_D); |