* [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
@ 2020-04-23 18:19 Imre Deak
2020-04-23 19:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Imre Deak @ 2020-04-23 18:19 UTC (permalink / raw)
To: intel-gfx
Using an AUX channel which by default belongs to a non-TypeC PHY won't
work on a TypeC PHY, since - as a side-effect besides providing an AUX
channel - the AUX channel power well affects power manangement specific
to the TypeC subsystem. Using a TypeC AUX channel on a non-TypeC PHY
would probably also cause problems, so for simplicity prevent both.
This fixes at least an ICL-Y machine in CI, which has a buggy VBT
setting AUX-B as an alternative channel for port C.
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_bios.c | 84 +++++++++++++++--------
1 file changed, 57 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 839124647202..10d463723d12 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -1538,11 +1538,38 @@ static enum port get_port_by_aux_ch(struct drm_i915_private *i915, u8 aux_ch)
return PORT_NONE;
}
+static enum aux_ch
+intel_bios_port_info_aux_ch(const struct ddi_vbt_port_info *info)
+{
+ switch (info->alternate_aux_channel) {
+ case DP_AUX_A:
+ return AUX_CH_A;
+ case DP_AUX_B:
+ return AUX_CH_B;
+ case DP_AUX_C:
+ return AUX_CH_C;
+ case DP_AUX_D:
+ return AUX_CH_D;
+ case DP_AUX_E:
+ return AUX_CH_E;
+ case DP_AUX_F:
+ return AUX_CH_F;
+ case DP_AUX_G:
+ return AUX_CH_G;
+ default:
+ MISSING_CASE(info->alternate_aux_channel);
+ return AUX_CH_A;
+ }
+}
+
static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
enum port port)
{
struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[port];
enum port p;
+ enum aux_ch aux_ch;
+ bool aux_is_tc;
+ bool phy_is_tc;
if (!info->alternate_aux_channel)
return;
@@ -1571,6 +1598,35 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
info->supports_dp = false;
info->alternate_aux_channel = 0;
+
+ return;
+ }
+
+ aux_ch = intel_bios_port_info_aux_ch(info);
+ /* The AUX CH -> default port is a 1:1 mapping. */
+ aux_is_tc = intel_phy_is_tc(dev_priv,
+ intel_port_to_phy(dev_priv,
+ (enum port)aux_ch));
+ phy_is_tc = intel_phy_is_tc(dev_priv,
+ intel_port_to_phy(dev_priv, port));
+ if (aux_is_tc != phy_is_tc) {
+ /*
+ * Using an AUX channel which by default belongs to a TypeC
+ * PHY can't be used for non-TypeC PHYs and vice-versa. The
+ * reason is that TypeC AUX power wells can only be enabled in
+ * the current TypeC mode of the PHY and have an effect on power
+ * management specific to the TypeC subsystem.
+ */
+ drm_dbg_kms(&dev_priv->drm,
+ "Port %c on a %s PHY is trying to use the %s AUX CH %c, "
+ "disabling DP support on this port.\n",
+ port_name(port),
+ phy_is_tc ? "TypeC" : "non-TypeC",
+ aux_is_tc ? "TypeC" : "non-TypeC",
+ aux_ch_name(aux_ch));
+
+ info->supports_dp = false;
+ info->alternate_aux_channel = 0;
}
}
@@ -2595,33 +2651,7 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
return aux_ch;
}
- switch (info->alternate_aux_channel) {
- case DP_AUX_A:
- aux_ch = AUX_CH_A;
- break;
- case DP_AUX_B:
- aux_ch = AUX_CH_B;
- break;
- case DP_AUX_C:
- aux_ch = AUX_CH_C;
- break;
- case DP_AUX_D:
- aux_ch = AUX_CH_D;
- break;
- case DP_AUX_E:
- aux_ch = AUX_CH_E;
- break;
- case DP_AUX_F:
- aux_ch = AUX_CH_F;
- break;
- case DP_AUX_G:
- aux_ch = AUX_CH_G;
- break;
- default:
- MISSING_CASE(info->alternate_aux_channel);
- aux_ch = AUX_CH_A;
- break;
- }
+ aux_ch = intel_bios_port_info_aux_ch(info);
drm_dbg_kms(&dev_priv->drm, "using AUX %c for port %c (VBT)\n",
aux_ch_name(aux_ch), port_name(port));
--
2.23.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
2020-04-23 18:19 [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports Imre Deak
@ 2020-04-23 19:03 ` Patchwork
2020-04-23 20:41 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-04-28 7:55 ` [Intel-gfx] [PATCH] " Jani Nikula
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-04-23 19:03 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
URL : https://patchwork.freedesktop.org/series/76405/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8354 -> Patchwork_17444
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/index.html
Known issues
------------
Here are the changes found in Patchwork_17444 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@dp-edid-read:
- fi-kbl-7500u: [PASS][1] -> [FAIL][2] ([i915#976])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html
[i915#976]: https://gitlab.freedesktop.org/drm/intel/issues/976
Participating hosts (48 -> 44)
------------------------------
Additional (2): fi-kbl-7560u fi-bwr-2160
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8354 -> Patchwork_17444
CI-20190529: 20190529
CI_DRM_8354: 6ec6eeeda39e1733777f9115ba813a992a47b5fe @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5608: e7bcaf1dd251d454706c7cd64282f531aec50183 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17444: bf5e56c5f4fe0da1b56e14c0b6247fefe501fec2 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
bf5e56c5f4fe drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
2020-04-23 18:19 [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports Imre Deak
2020-04-23 19:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
@ 2020-04-23 20:41 ` Patchwork
2020-04-28 7:55 ` [Intel-gfx] [PATCH] " Jani Nikula
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-04-23 20:41 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
URL : https://patchwork.freedesktop.org/series/76405/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8354_full -> Patchwork_17444_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17444_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_workarounds@suspend-resume-context:
- shard-iclb: [PASS][1] -> [INCOMPLETE][2] ([i915#1185])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-iclb2/igt@gem_workarounds@suspend-resume-context.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-iclb3/igt@gem_workarounds@suspend-resume-context.html
* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-skl: [PASS][3] -> [INCOMPLETE][4] ([i915#69])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-skl2/igt@i915_suspend@fence-restore-tiled2untiled.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-skl5/igt@i915_suspend@fence-restore-tiled2untiled.html
* igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen:
- shard-apl: [PASS][5] -> [FAIL][6] ([i915#54] / [i915#95])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-apl2/igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-apl4/igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen.html
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-skl: [PASS][7] -> [INCOMPLETE][8] ([i915#300])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-skl6/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-skl5/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [PASS][9] -> [FAIL][10] ([i915#72])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-glk9/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-glk7/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
* igt@kms_draw_crc@draw-method-rgb565-blt-xtiled:
- shard-glk: [PASS][11] -> [FAIL][12] ([i915#52] / [i915#54])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-glk8/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-glk6/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][13] -> [FAIL][14] ([i915#1188])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-skl8/igt@kms_hdr@bpc-switch-dpms.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-skl4/igt@kms_hdr@bpc-switch-dpms.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-apl: [PASS][15] -> [DMESG-WARN][16] ([i915#180]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-apl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-apl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
- shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([i915#180])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-kbl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-kbl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145] / [i915#265])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-skl2/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-skl5/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
#### Possible fixes ####
* {igt@kms_flip@flip-vs-expired-vblank@b-edp1}:
- shard-skl: [FAIL][21] ([i915#79]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-skl10/igt@kms_flip@flip-vs-expired-vblank@b-edp1.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-skl9/igt@kms_flip@flip-vs-expired-vblank@b-edp1.html
* {igt@kms_flip@flip-vs-suspend-interruptible@c-dp1}:
- shard-apl: [DMESG-WARN][23] ([i915#180]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-apl8/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [FAIL][25] ([i915#1188]) -> [PASS][26] +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-skl9/igt@kms_hdr@bpc-switch-suspend.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-skl7/igt@kms_hdr@bpc-switch-suspend.html
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [FAIL][27] ([fdo#108145] / [i915#265]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-skl8/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-skl1/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
* igt@kms_psr@psr2_sprite_mmap_cpu:
- shard-iclb: [SKIP][29] ([fdo#109441]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-iclb1/igt@kms_psr@psr2_sprite_mmap_cpu.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
* igt@kms_setmode@basic:
- shard-apl: [FAIL][31] ([i915#31]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-apl6/igt@kms_setmode@basic.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-apl7/igt@kms_setmode@basic.html
* {igt@perf@blocking-parameterized}:
- shard-iclb: [FAIL][33] ([i915#1542]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-iclb7/igt@perf@blocking-parameterized.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-iclb3/igt@perf@blocking-parameterized.html
* {igt@perf@polling-parameterized}:
- shard-hsw: [FAIL][35] ([i915#1542]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-hsw2/igt@perf@polling-parameterized.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-hsw2/igt@perf@polling-parameterized.html
#### Warnings ####
* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- shard-snb: [INCOMPLETE][37] ([i915#82]) -> [SKIP][38] ([fdo#109271]) +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-snb2/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-snb6/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-apl: [FAIL][39] ([i915#49] / [i915#95]) -> [FAIL][40] ([i915#49])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-apl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt.html
* igt@kms_psr2_su@page_flip:
- shard-iclb: [SKIP][41] ([fdo#109642] / [fdo#111068]) -> [FAIL][42] ([i915#608])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8354/shard-iclb1/igt@kms_psr2_su@page_flip.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/shard-iclb2/igt@kms_psr2_su@page_flip.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#1185]: https://gitlab.freedesktop.org/drm/intel/issues/1185
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#300]: https://gitlab.freedesktop.org/drm/intel/issues/300
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#608]: https://gitlab.freedesktop.org/drm/intel/issues/608
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8354 -> Patchwork_17444
CI-20190529: 20190529
CI_DRM_8354: 6ec6eeeda39e1733777f9115ba813a992a47b5fe @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5608: e7bcaf1dd251d454706c7cd64282f531aec50183 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17444: bf5e56c5f4fe0da1b56e14c0b6247fefe501fec2 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17444/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
2020-04-23 18:19 [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports Imre Deak
2020-04-23 19:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-23 20:41 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
@ 2020-04-28 7:55 ` Jani Nikula
2020-04-28 8:30 ` Imre Deak
2 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2020-04-28 7:55 UTC (permalink / raw)
To: Imre Deak, intel-gfx
On Thu, 23 Apr 2020, Imre Deak <imre.deak@intel.com> wrote:
> Using an AUX channel which by default belongs to a non-TypeC PHY won't
> work on a TypeC PHY, since - as a side-effect besides providing an AUX
> channel - the AUX channel power well affects power manangement specific
> to the TypeC subsystem. Using a TypeC AUX channel on a non-TypeC PHY
> would probably also cause problems, so for simplicity prevent both.
>
> This fixes at least an ICL-Y machine in CI, which has a buggy VBT
> setting AUX-B as an alternative channel for port C.
Is it a production machine? Not happy about adding stuff for pre-pro
machines with buggy VBT. It'll bite us later. It always has.
Also, hate to see VBT code call into intel_display.c (intel_phy_is_tc).
BR,
Jani.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 84 +++++++++++++++--------
> 1 file changed, 57 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 839124647202..10d463723d12 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1538,11 +1538,38 @@ static enum port get_port_by_aux_ch(struct drm_i915_private *i915, u8 aux_ch)
> return PORT_NONE;
> }
>
> +static enum aux_ch
> +intel_bios_port_info_aux_ch(const struct ddi_vbt_port_info *info)
> +{
> + switch (info->alternate_aux_channel) {
> + case DP_AUX_A:
> + return AUX_CH_A;
> + case DP_AUX_B:
> + return AUX_CH_B;
> + case DP_AUX_C:
> + return AUX_CH_C;
> + case DP_AUX_D:
> + return AUX_CH_D;
> + case DP_AUX_E:
> + return AUX_CH_E;
> + case DP_AUX_F:
> + return AUX_CH_F;
> + case DP_AUX_G:
> + return AUX_CH_G;
> + default:
> + MISSING_CASE(info->alternate_aux_channel);
> + return AUX_CH_A;
> + }
> +}
> +
> static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> enum port port)
> {
> struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[port];
> enum port p;
> + enum aux_ch aux_ch;
> + bool aux_is_tc;
> + bool phy_is_tc;
>
> if (!info->alternate_aux_channel)
> return;
> @@ -1571,6 +1598,35 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
>
> info->supports_dp = false;
> info->alternate_aux_channel = 0;
> +
> + return;
> + }
> +
> + aux_ch = intel_bios_port_info_aux_ch(info);
> + /* The AUX CH -> default port is a 1:1 mapping. */
> + aux_is_tc = intel_phy_is_tc(dev_priv,
> + intel_port_to_phy(dev_priv,
> + (enum port)aux_ch));
> + phy_is_tc = intel_phy_is_tc(dev_priv,
> + intel_port_to_phy(dev_priv, port));
> + if (aux_is_tc != phy_is_tc) {
> + /*
> + * Using an AUX channel which by default belongs to a TypeC
> + * PHY can't be used for non-TypeC PHYs and vice-versa. The
> + * reason is that TypeC AUX power wells can only be enabled in
> + * the current TypeC mode of the PHY and have an effect on power
> + * management specific to the TypeC subsystem.
> + */
> + drm_dbg_kms(&dev_priv->drm,
> + "Port %c on a %s PHY is trying to use the %s AUX CH %c, "
> + "disabling DP support on this port.\n",
> + port_name(port),
> + phy_is_tc ? "TypeC" : "non-TypeC",
> + aux_is_tc ? "TypeC" : "non-TypeC",
> + aux_ch_name(aux_ch));
> +
> + info->supports_dp = false;
> + info->alternate_aux_channel = 0;
> }
> }
>
> @@ -2595,33 +2651,7 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
> return aux_ch;
> }
>
> - switch (info->alternate_aux_channel) {
> - case DP_AUX_A:
> - aux_ch = AUX_CH_A;
> - break;
> - case DP_AUX_B:
> - aux_ch = AUX_CH_B;
> - break;
> - case DP_AUX_C:
> - aux_ch = AUX_CH_C;
> - break;
> - case DP_AUX_D:
> - aux_ch = AUX_CH_D;
> - break;
> - case DP_AUX_E:
> - aux_ch = AUX_CH_E;
> - break;
> - case DP_AUX_F:
> - aux_ch = AUX_CH_F;
> - break;
> - case DP_AUX_G:
> - aux_ch = AUX_CH_G;
> - break;
> - default:
> - MISSING_CASE(info->alternate_aux_channel);
> - aux_ch = AUX_CH_A;
> - break;
> - }
> + aux_ch = intel_bios_port_info_aux_ch(info);
>
> drm_dbg_kms(&dev_priv->drm, "using AUX %c for port %c (VBT)\n",
> aux_ch_name(aux_ch), port_name(port));
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
2020-04-28 7:55 ` [Intel-gfx] [PATCH] " Jani Nikula
@ 2020-04-28 8:30 ` Imre Deak
2020-04-28 9:05 ` Jani Nikula
0 siblings, 1 reply; 7+ messages in thread
From: Imre Deak @ 2020-04-28 8:30 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Tue, Apr 28, 2020 at 10:55:49AM +0300, Jani Nikula wrote:
> On Thu, 23 Apr 2020, Imre Deak <imre.deak@intel.com> wrote:
> > Using an AUX channel which by default belongs to a non-TypeC PHY won't
> > work on a TypeC PHY, since - as a side-effect besides providing an AUX
> > channel - the AUX channel power well affects power manangement specific
> > to the TypeC subsystem. Using a TypeC AUX channel on a non-TypeC PHY
> > would probably also cause problems, so for simplicity prevent both.
> >
> > This fixes at least an ICL-Y machine in CI, which has a buggy VBT
> > setting AUX-B as an alternative channel for port C.
>
> Is it a production machine?
Yes.
> Not happy about adding stuff for pre-pro machines with buggy VBT.
> It'll bite us later. It always has.
If there is a buggy VBT with this issue it will cause a problem
somewhere down the pipeline which is difficult to track down, power well
timeouts, machine hangs etc. I would like to catch this early and avoid
having to spend time debugging these other issues.
> Also, hate to see VBT code call into intel_display.c (intel_phy_is_tc).
That's the way to determine if a port/PHY is TypeC on a platform or not.
--Imre
>
> BR,
> Jani.
>
>
> >
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_bios.c | 84 +++++++++++++++--------
> > 1 file changed, 57 insertions(+), 27 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> > index 839124647202..10d463723d12 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> > @@ -1538,11 +1538,38 @@ static enum port get_port_by_aux_ch(struct drm_i915_private *i915, u8 aux_ch)
> > return PORT_NONE;
> > }
> >
> > +static enum aux_ch
> > +intel_bios_port_info_aux_ch(const struct ddi_vbt_port_info *info)
> > +{
> > + switch (info->alternate_aux_channel) {
> > + case DP_AUX_A:
> > + return AUX_CH_A;
> > + case DP_AUX_B:
> > + return AUX_CH_B;
> > + case DP_AUX_C:
> > + return AUX_CH_C;
> > + case DP_AUX_D:
> > + return AUX_CH_D;
> > + case DP_AUX_E:
> > + return AUX_CH_E;
> > + case DP_AUX_F:
> > + return AUX_CH_F;
> > + case DP_AUX_G:
> > + return AUX_CH_G;
> > + default:
> > + MISSING_CASE(info->alternate_aux_channel);
> > + return AUX_CH_A;
> > + }
> > +}
> > +
> > static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> > enum port port)
> > {
> > struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[port];
> > enum port p;
> > + enum aux_ch aux_ch;
> > + bool aux_is_tc;
> > + bool phy_is_tc;
> >
> > if (!info->alternate_aux_channel)
> > return;
> > @@ -1571,6 +1598,35 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> >
> > info->supports_dp = false;
> > info->alternate_aux_channel = 0;
> > +
> > + return;
> > + }
> > +
> > + aux_ch = intel_bios_port_info_aux_ch(info);
> > + /* The AUX CH -> default port is a 1:1 mapping. */
> > + aux_is_tc = intel_phy_is_tc(dev_priv,
> > + intel_port_to_phy(dev_priv,
> > + (enum port)aux_ch));
> > + phy_is_tc = intel_phy_is_tc(dev_priv,
> > + intel_port_to_phy(dev_priv, port));
> > + if (aux_is_tc != phy_is_tc) {
> > + /*
> > + * Using an AUX channel which by default belongs to a TypeC
> > + * PHY can't be used for non-TypeC PHYs and vice-versa. The
> > + * reason is that TypeC AUX power wells can only be enabled in
> > + * the current TypeC mode of the PHY and have an effect on power
> > + * management specific to the TypeC subsystem.
> > + */
> > + drm_dbg_kms(&dev_priv->drm,
> > + "Port %c on a %s PHY is trying to use the %s AUX CH %c, "
> > + "disabling DP support on this port.\n",
> > + port_name(port),
> > + phy_is_tc ? "TypeC" : "non-TypeC",
> > + aux_is_tc ? "TypeC" : "non-TypeC",
> > + aux_ch_name(aux_ch));
> > +
> > + info->supports_dp = false;
> > + info->alternate_aux_channel = 0;
> > }
> > }
> >
> > @@ -2595,33 +2651,7 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
> > return aux_ch;
> > }
> >
> > - switch (info->alternate_aux_channel) {
> > - case DP_AUX_A:
> > - aux_ch = AUX_CH_A;
> > - break;
> > - case DP_AUX_B:
> > - aux_ch = AUX_CH_B;
> > - break;
> > - case DP_AUX_C:
> > - aux_ch = AUX_CH_C;
> > - break;
> > - case DP_AUX_D:
> > - aux_ch = AUX_CH_D;
> > - break;
> > - case DP_AUX_E:
> > - aux_ch = AUX_CH_E;
> > - break;
> > - case DP_AUX_F:
> > - aux_ch = AUX_CH_F;
> > - break;
> > - case DP_AUX_G:
> > - aux_ch = AUX_CH_G;
> > - break;
> > - default:
> > - MISSING_CASE(info->alternate_aux_channel);
> > - aux_ch = AUX_CH_A;
> > - break;
> > - }
> > + aux_ch = intel_bios_port_info_aux_ch(info);
> >
> > drm_dbg_kms(&dev_priv->drm, "using AUX %c for port %c (VBT)\n",
> > aux_ch_name(aux_ch), port_name(port));
>
> --
> Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
2020-04-28 8:30 ` Imre Deak
@ 2020-04-28 9:05 ` Jani Nikula
2020-04-28 9:59 ` Imre Deak
0 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2020-04-28 9:05 UTC (permalink / raw)
To: imre.deak; +Cc: intel-gfx
On Tue, 28 Apr 2020, Imre Deak <imre.deak@intel.com> wrote:
> On Tue, Apr 28, 2020 at 10:55:49AM +0300, Jani Nikula wrote:
>> On Thu, 23 Apr 2020, Imre Deak <imre.deak@intel.com> wrote:
>> > Using an AUX channel which by default belongs to a non-TypeC PHY won't
>> > work on a TypeC PHY, since - as a side-effect besides providing an AUX
>> > channel - the AUX channel power well affects power manangement specific
>> > to the TypeC subsystem. Using a TypeC AUX channel on a non-TypeC PHY
>> > would probably also cause problems, so for simplicity prevent both.
>> >
>> > This fixes at least an ICL-Y machine in CI, which has a buggy VBT
>> > setting AUX-B as an alternative channel for port C.
>>
>> Is it a production machine?
>
> Yes.
*sigh*
Yeah I guess that settles it, we'll need this. :/
Ack.
BR,
Jani.
>
>> Not happy about adding stuff for pre-pro machines with buggy VBT.
>> It'll bite us later. It always has.
>
> If there is a buggy VBT with this issue it will cause a problem
> somewhere down the pipeline which is difficult to track down, power well
> timeouts, machine hangs etc. I would like to catch this early and avoid
> having to spend time debugging these other issues.
>
>> Also, hate to see VBT code call into intel_display.c (intel_phy_is_tc).
>
> That's the way to determine if a port/PHY is TypeC on a platform or not.
>
> --Imre
>
>>
>> BR,
>> Jani.
>>
>>
>> >
>> > Signed-off-by: Imre Deak <imre.deak@intel.com>
>> > ---
>> > drivers/gpu/drm/i915/display/intel_bios.c | 84 +++++++++++++++--------
>> > 1 file changed, 57 insertions(+), 27 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
>> > index 839124647202..10d463723d12 100644
>> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
>> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
>> > @@ -1538,11 +1538,38 @@ static enum port get_port_by_aux_ch(struct drm_i915_private *i915, u8 aux_ch)
>> > return PORT_NONE;
>> > }
>> >
>> > +static enum aux_ch
>> > +intel_bios_port_info_aux_ch(const struct ddi_vbt_port_info *info)
>> > +{
>> > + switch (info->alternate_aux_channel) {
>> > + case DP_AUX_A:
>> > + return AUX_CH_A;
>> > + case DP_AUX_B:
>> > + return AUX_CH_B;
>> > + case DP_AUX_C:
>> > + return AUX_CH_C;
>> > + case DP_AUX_D:
>> > + return AUX_CH_D;
>> > + case DP_AUX_E:
>> > + return AUX_CH_E;
>> > + case DP_AUX_F:
>> > + return AUX_CH_F;
>> > + case DP_AUX_G:
>> > + return AUX_CH_G;
>> > + default:
>> > + MISSING_CASE(info->alternate_aux_channel);
>> > + return AUX_CH_A;
>> > + }
>> > +}
>> > +
>> > static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
>> > enum port port)
>> > {
>> > struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[port];
>> > enum port p;
>> > + enum aux_ch aux_ch;
>> > + bool aux_is_tc;
>> > + bool phy_is_tc;
>> >
>> > if (!info->alternate_aux_channel)
>> > return;
>> > @@ -1571,6 +1598,35 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
>> >
>> > info->supports_dp = false;
>> > info->alternate_aux_channel = 0;
>> > +
>> > + return;
>> > + }
>> > +
>> > + aux_ch = intel_bios_port_info_aux_ch(info);
>> > + /* The AUX CH -> default port is a 1:1 mapping. */
>> > + aux_is_tc = intel_phy_is_tc(dev_priv,
>> > + intel_port_to_phy(dev_priv,
>> > + (enum port)aux_ch));
>> > + phy_is_tc = intel_phy_is_tc(dev_priv,
>> > + intel_port_to_phy(dev_priv, port));
>> > + if (aux_is_tc != phy_is_tc) {
>> > + /*
>> > + * Using an AUX channel which by default belongs to a TypeC
>> > + * PHY can't be used for non-TypeC PHYs and vice-versa. The
>> > + * reason is that TypeC AUX power wells can only be enabled in
>> > + * the current TypeC mode of the PHY and have an effect on power
>> > + * management specific to the TypeC subsystem.
>> > + */
>> > + drm_dbg_kms(&dev_priv->drm,
>> > + "Port %c on a %s PHY is trying to use the %s AUX CH %c, "
>> > + "disabling DP support on this port.\n",
>> > + port_name(port),
>> > + phy_is_tc ? "TypeC" : "non-TypeC",
>> > + aux_is_tc ? "TypeC" : "non-TypeC",
>> > + aux_ch_name(aux_ch));
>> > +
>> > + info->supports_dp = false;
>> > + info->alternate_aux_channel = 0;
>> > }
>> > }
>> >
>> > @@ -2595,33 +2651,7 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
>> > return aux_ch;
>> > }
>> >
>> > - switch (info->alternate_aux_channel) {
>> > - case DP_AUX_A:
>> > - aux_ch = AUX_CH_A;
>> > - break;
>> > - case DP_AUX_B:
>> > - aux_ch = AUX_CH_B;
>> > - break;
>> > - case DP_AUX_C:
>> > - aux_ch = AUX_CH_C;
>> > - break;
>> > - case DP_AUX_D:
>> > - aux_ch = AUX_CH_D;
>> > - break;
>> > - case DP_AUX_E:
>> > - aux_ch = AUX_CH_E;
>> > - break;
>> > - case DP_AUX_F:
>> > - aux_ch = AUX_CH_F;
>> > - break;
>> > - case DP_AUX_G:
>> > - aux_ch = AUX_CH_G;
>> > - break;
>> > - default:
>> > - MISSING_CASE(info->alternate_aux_channel);
>> > - aux_ch = AUX_CH_A;
>> > - break;
>> > - }
>> > + aux_ch = intel_bios_port_info_aux_ch(info);
>> >
>> > drm_dbg_kms(&dev_priv->drm, "using AUX %c for port %c (VBT)\n",
>> > aux_ch_name(aux_ch), port_name(port));
>>
>> --
>> Jani Nikula, Intel Open Source Graphics Center
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports
2020-04-28 9:05 ` Jani Nikula
@ 2020-04-28 9:59 ` Imre Deak
0 siblings, 0 replies; 7+ messages in thread
From: Imre Deak @ 2020-04-28 9:59 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Tue, Apr 28, 2020 at 12:05:35PM +0300, Jani Nikula wrote:
> On Tue, 28 Apr 2020, Imre Deak <imre.deak@intel.com> wrote:
> > On Tue, Apr 28, 2020 at 10:55:49AM +0300, Jani Nikula wrote:
> >> On Thu, 23 Apr 2020, Imre Deak <imre.deak@intel.com> wrote:
> >> > Using an AUX channel which by default belongs to a non-TypeC PHY won't
> >> > work on a TypeC PHY, since - as a side-effect besides providing an AUX
> >> > channel - the AUX channel power well affects power manangement specific
> >> > to the TypeC subsystem. Using a TypeC AUX channel on a non-TypeC PHY
> >> > would probably also cause problems, so for simplicity prevent both.
> >> >
> >> > This fixes at least an ICL-Y machine in CI, which has a buggy VBT
> >> > setting AUX-B as an alternative channel for port C.
> >>
> >> Is it a production machine?
> >
> > Yes.
Err, I meant to say it's a pre-production machine icl-dsi. However, the
problem is not specific to whether the machine is pre-pro or not. A VBT
with this problem on a production machine would cause the same problem.
> *sigh*
>
> Yeah I guess that settles it, we'll need this. :/
>
> Ack.
>
> >> Not happy about adding stuff for pre-pro machines with buggy VBT.
> >> It'll bite us later. It always has.
> >
> > If there is a buggy VBT with this issue it will cause a problem
> > somewhere down the pipeline which is difficult to track down, power well
> > timeouts, machine hangs etc. I would like to catch this early and avoid
> > having to spend time debugging these other issues.
> >
> >> Also, hate to see VBT code call into intel_display.c (intel_phy_is_tc).
> >
> > That's the way to determine if a port/PHY is TypeC on a platform or not.
> >
> > --Imre
> >
> >>
> >> BR,
> >> Jani.
> >>
> >>
> >> >
> >> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> >> > ---
> >> > drivers/gpu/drm/i915/display/intel_bios.c | 84 +++++++++++++++--------
> >> > 1 file changed, 57 insertions(+), 27 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> >> > index 839124647202..10d463723d12 100644
> >> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> >> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> >> > @@ -1538,11 +1538,38 @@ static enum port get_port_by_aux_ch(struct drm_i915_private *i915, u8 aux_ch)
> >> > return PORT_NONE;
> >> > }
> >> >
> >> > +static enum aux_ch
> >> > +intel_bios_port_info_aux_ch(const struct ddi_vbt_port_info *info)
> >> > +{
> >> > + switch (info->alternate_aux_channel) {
> >> > + case DP_AUX_A:
> >> > + return AUX_CH_A;
> >> > + case DP_AUX_B:
> >> > + return AUX_CH_B;
> >> > + case DP_AUX_C:
> >> > + return AUX_CH_C;
> >> > + case DP_AUX_D:
> >> > + return AUX_CH_D;
> >> > + case DP_AUX_E:
> >> > + return AUX_CH_E;
> >> > + case DP_AUX_F:
> >> > + return AUX_CH_F;
> >> > + case DP_AUX_G:
> >> > + return AUX_CH_G;
> >> > + default:
> >> > + MISSING_CASE(info->alternate_aux_channel);
> >> > + return AUX_CH_A;
> >> > + }
> >> > +}
> >> > +
> >> > static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> >> > enum port port)
> >> > {
> >> > struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[port];
> >> > enum port p;
> >> > + enum aux_ch aux_ch;
> >> > + bool aux_is_tc;
> >> > + bool phy_is_tc;
> >> >
> >> > if (!info->alternate_aux_channel)
> >> > return;
> >> > @@ -1571,6 +1598,35 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> >> >
> >> > info->supports_dp = false;
> >> > info->alternate_aux_channel = 0;
> >> > +
> >> > + return;
> >> > + }
> >> > +
> >> > + aux_ch = intel_bios_port_info_aux_ch(info);
> >> > + /* The AUX CH -> default port is a 1:1 mapping. */
> >> > + aux_is_tc = intel_phy_is_tc(dev_priv,
> >> > + intel_port_to_phy(dev_priv,
> >> > + (enum port)aux_ch));
> >> > + phy_is_tc = intel_phy_is_tc(dev_priv,
> >> > + intel_port_to_phy(dev_priv, port));
> >> > + if (aux_is_tc != phy_is_tc) {
> >> > + /*
> >> > + * Using an AUX channel which by default belongs to a TypeC
> >> > + * PHY can't be used for non-TypeC PHYs and vice-versa. The
> >> > + * reason is that TypeC AUX power wells can only be enabled in
> >> > + * the current TypeC mode of the PHY and have an effect on power
> >> > + * management specific to the TypeC subsystem.
> >> > + */
> >> > + drm_dbg_kms(&dev_priv->drm,
> >> > + "Port %c on a %s PHY is trying to use the %s AUX CH %c, "
> >> > + "disabling DP support on this port.\n",
> >> > + port_name(port),
> >> > + phy_is_tc ? "TypeC" : "non-TypeC",
> >> > + aux_is_tc ? "TypeC" : "non-TypeC",
> >> > + aux_ch_name(aux_ch));
> >> > +
> >> > + info->supports_dp = false;
> >> > + info->alternate_aux_channel = 0;
> >> > }
> >> > }
> >> >
> >> > @@ -2595,33 +2651,7 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
> >> > return aux_ch;
> >> > }
> >> >
> >> > - switch (info->alternate_aux_channel) {
> >> > - case DP_AUX_A:
> >> > - aux_ch = AUX_CH_A;
> >> > - break;
> >> > - case DP_AUX_B:
> >> > - aux_ch = AUX_CH_B;
> >> > - break;
> >> > - case DP_AUX_C:
> >> > - aux_ch = AUX_CH_C;
> >> > - break;
> >> > - case DP_AUX_D:
> >> > - aux_ch = AUX_CH_D;
> >> > - break;
> >> > - case DP_AUX_E:
> >> > - aux_ch = AUX_CH_E;
> >> > - break;
> >> > - case DP_AUX_F:
> >> > - aux_ch = AUX_CH_F;
> >> > - break;
> >> > - case DP_AUX_G:
> >> > - aux_ch = AUX_CH_G;
> >> > - break;
> >> > - default:
> >> > - MISSING_CASE(info->alternate_aux_channel);
> >> > - aux_ch = AUX_CH_A;
> >> > - break;
> >> > - }
> >> > + aux_ch = intel_bios_port_info_aux_ch(info);
> >> >
> >> > drm_dbg_kms(&dev_priv->drm, "using AUX %c for port %c (VBT)\n",
> >> > aux_ch_name(aux_ch), port_name(port));
> >>
> >> --
> >> Jani Nikula, Intel Open Source Graphics Center
>
> --
> Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-28 10:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 18:19 [Intel-gfx] [PATCH] drm/i915/icl+: Prevent using non-TypeC AUX channels on TypeC ports Imre Deak
2020-04-23 19:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-23 20:41 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-04-28 7:55 ` [Intel-gfx] [PATCH] " Jani Nikula
2020-04-28 8:30 ` Imre Deak
2020-04-28 9:05 ` Jani Nikula
2020-04-28 9:59 ` Imre Deak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.