Skip to contentSkip to conversation

drm/i915/cnl: DDIA Lane capability bit not set in clone mode

PATCH In review [email protected] 4 participants 4 messages Aug 1, 2017 – Aug 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/cnl: DDIA Lane capability bit not set in clone mode

From: Clint Taylor <[email protected]>

DDIA Lane capability control 4 lane bit is not being set by firmware during clone mode boot. This occurs when multiple monitors are connected during boot. The driver will configure the port for 2 lane maximum width if this bit is not set.

Once DDIA/E lane split is supported in vbt and the i915 driver we will need to revisit this code.

---
 drivers/gpu/drm/i915/intel_ddi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +3 -2
index 494fbe0..e7644b4 100644
@@ -2713,9 +2713,10 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
 	 * configuration so that we use the proper lane count for our
 	 * calculations.
 	 */
-	if (IS_GEN9_LP(dev_priv) && port == PORT_A) {
+	if ((IS_GEN9_LP(dev_priv) || INTEL_GEN(dev_priv) >= 10) &&
+	    port == PORT_A) {
 		if (!(intel_dig_port->saved_port_bits & DDI_A_4_LANES)) {
-			DRM_DEBUG_KMS("BXT BIOS forgot to set DDI_A_4_LANES for port A; fixing\n");
+			DRM_DEBUG_KMS("BIOS forgot to set DDI_A_4_LANES for port A\n");
 			intel_dig_port->saved_port_bits |= DDI_A_4_LANES;
 			max_lanes = 4;
 		}
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915/cnl: DDIA Lane capability bit not set in clone mode

== Series Details ==

== Series Details ==

Series: drm/i915/cnl: DDIA Lane capability bit not set in clone mode
URL : https://patchwork.freedesktop.org/series/28204/
State : success

== Summary ==

Series 28204v1 drm/i915/cnl: DDIA Lane capability bit not set in clone mode
https://patchwork.freedesktop.org/api/1.0/series/28204/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-flip-vs-modeset:
                pass       -> SKIP       (fi-skl-x1585l) fdo#101781
Test kms_pipe_crc_basic:
        Subgroup hang-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-pnv-d510) fdo#101597

fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597

fi-bdw-5557u     total:280  pass:269  dwarn:0   dfail:0   fail:0   skip:11  time:451s
fi-bdw-gvtdvm    total:280  pass:266  dwarn:0   dfail:0   fail:0   skip:14  time:435s
fi-blb-e6850     total:280  pass:225  dwarn:1   dfail:0   fail:0   skip:54  time:355s
fi-bsw-n3050     total:280  pass:244  dwarn:0   dfail:0   fail:0   skip:36  time:530s
fi-bxt-j4205     total:280  pass:261  dwarn:0   dfail:0   fail:0   skip:19  time:511s
fi-byt-n2820     total:280  pass:251  dwarn:1   dfail:0   fail:0   skip:28  time:516s
fi-glk-2a        total:280  pass:261  dwarn:0   dfail:0   fail:0   skip:19  time:603s
fi-hsw-4770      total:280  pass:264  dwarn:0   dfail:0   fail:0   skip:16  time:441s
fi-hsw-4770r     total:280  pass:264  dwarn:0   dfail:0   fail:0   skip:16  time:414s
fi-ilk-650       total:280  pass:230  dwarn:0   dfail:0   fail:0   skip:50  time:417s
fi-ivb-3520m     total:280  pass:262  dwarn:0   dfail:0   fail:0   skip:18  time:499s
fi-ivb-3770      total:280  pass:262  dwarn:0   dfail:0   fail:0   skip:18  time:472s
fi-kbl-7500u     total:280  pass:262  dwarn:0   dfail:0   fail:0   skip:18  time:469s
fi-kbl-7560u     total:280  pass:270  dwarn:0   dfail:0   fail:0   skip:10  time:572s
fi-kbl-r         total:280  pass:262  dwarn:0   dfail:0   fail:0   skip:18  time:581s
fi-pnv-d510      total:280  pass:222  dwarn:3   dfail:0   fail:0   skip:55  time:561s
fi-skl-6260u     total:280  pass:270  dwarn:0   dfail:0   fail:0   skip:10  time:467s
fi-skl-6700hq    total:280  pass:263  dwarn:0   dfail:0   fail:0   skip:17  time:588s
fi-skl-6700k     total:280  pass:262  dwarn:0   dfail:0   fail:0   skip:18  time:470s
fi-skl-6770hq    total:280  pass:270  dwarn:0   dfail:0   fail:0   skip:10  time:481s
fi-skl-gvtdvm    total:280  pass:267  dwarn:0   dfail:0   fail:0   skip:13  time:442s
fi-skl-x1585l    total:280  pass:269  dwarn:0   dfail:0   fail:0   skip:11  time:473s
fi-snb-2520m     total:280  pass:252  dwarn:0   dfail:0   fail:0   skip:28  time:544s
fi-snb-2600      total:280  pass:250  dwarn:0   dfail:0   fail:1   skip:29  time:407s

fi-byt-j1900 failed to connect after reboot

f9cb5a18db70d51c9f5b3db8253d6c42255cab35 drm-tip: 2017y-08m-01d-09h-46m-24s UTC integration manifest eb1904239980 drm/i915/cnl: DDIA Lane capability bit not set in clone mode

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5304/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#2 lore raw
In reply to [email protected]

+ Art, couple questions below

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)

Quoted 21 lines · On Tue, 2017-08-01 at 09:56 -0700, [email protected] wrote:

From: Clint Taylor <[email protected]>

DDIA Lane capability control 4 lane bit is not being set by firmware during clone mode boot. This occurs when multiple monitors are connected during boot. The driver will configure the port for 2 lane maximum width if this bit is not set.

Once DDIA/E lane split is supported in vbt and the i915 driver we will need to revisit this code.

---
 drivers/gpu/drm/i915/intel_ddi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +0 -0
index 494fbe0..e7644b4 100644
@@ -2713,9 +2713,10 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)

we would need to fix more comment lines:

/*
* Bspec says that DDI_A_4_LANES is the only supported configuration
* for Broxton. Yet some BIOS fail to set this bit on port A if
eDP
* wasn't lit up at boot. Force this bit on in our internal

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) · line 2715

Quoted 3 lines
drivers/gpu/drm/i915/intel_ddi.c +0 -0
 	 * configuration so that we use the proper lane count for our
 	 * calculations.
 	 */

But I believe the approach we currently have with this might not be optimal. If BIOS is not bringing the port A up why should we expect it to set this bit ever? We probably need to be able to do it by ourselves, without expecting others to do...

However, I've never seen a production BIOS that never brings port A when it is present. And it is also true that spec tells: "This field must be programmed at system boot based on board configuration and may not be changed afterwards."

So I have kind of mixed feelings here on this bit.

For BXT it is so clear: "Not supported on Broxton."

Also few other future cases the 0 won't be valid, but not entirely sure if this is always true. Art?

I just noticed on spec that DDI E for CNL-U and CNL-Y are marked as "not supported", what means that for that SKU we should be able to add this workaround here, but at same time means that we need to remove the power wells support for DDI-E for these SKUs probably.

Art, could/should we set this bit blindly for all CNL?

and if yes:

Art, will it always be a decision based by SKUs now on? Or should we really rely on BIOS?

Is there another way to detect the port E presence? I don't believe VBT has that info in a reliable way, does it? Otherwise we would be using it already for the missed straps...

Thanks,
Rodrigo.

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) · line 2722

Quoted 9 lines
drivers/gpu/drm/i915/intel_ddi.c +3 -2
-	if (IS_GEN9_LP(dev_priv) && port == PORT_A) {
+	if ((IS_GEN9_LP(dev_priv) || INTEL_GEN(dev_priv) >= 10) &&
+	    port == PORT_A) {
 		if (!(intel_dig_port->saved_port_bits & DDI_A_4_LANES)) {
-			DRM_DEBUG_KMS("BXT BIOS forgot to set DDI_A_4_LANES for port A; fixing\n");
+			DRM_DEBUG_KMS("BIOS forgot to set DDI_A_4_LANES for port A\n");
 			intel_dig_port->saved_port_bits |= DDI_A_4_LANES;
 			max_lanes = 4;
 		}

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by
#3 lore raw

we confirmed that with current supported CNL skus using IS_CANNONLAKE is enogh for now.

So feel free to change that if and use

on the v2....

Quoted 88 lines · Rodrigo

+ Art, couple questions below

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)

Quoted 21 lines · On Tue, 2017-08-01 at 09:56 -0700, [email protected] wrote:

From: Clint Taylor <[email protected]>

DDIA Lane capability control 4 lane bit is not being set by firmware during clone mode boot. This occurs when multiple monitors are connected during boot. The driver will configure the port for 2 lane maximum width if this bit is not set.

Once DDIA/E lane split is supported in vbt and the i915 driver we will need to revisit this code.

---
 drivers/gpu/drm/i915/intel_ddi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +0 -0
index 494fbe0..e7644b4 100644
@@ -2713,9 +2713,10 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)

we would need to fix more comment lines:

/*
* Bspec says that DDI_A_4_LANES is the only supported configuration
* for Broxton. Yet some BIOS fail to set this bit on port A if
eDP
* wasn't lit up at boot. Force this bit on in our internal

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) · line 2715

Quoted 3 lines
drivers/gpu/drm/i915/intel_ddi.c +0 -0
       * configuration so that we use the proper lane count for our
       * calculations.
       */

But I believe the approach we currently have with this might not be optimal. If BIOS is not bringing the port A up why should we expect it to set this bit ever? We probably need to be able to do it by ourselves, without expecting others to do...

However, I've never seen a production BIOS that never brings port A when it is present. And it is also true that spec tells: "This field must be programmed at system boot based on board configuration and may not be changed afterwards."

So I have kind of mixed feelings here on this bit.

For BXT it is so clear: "Not supported on Broxton."

Also few other future cases the 0 won't be valid, but not entirely sure if this is always true. Art?

I just noticed on spec that DDI E for CNL-U and CNL-Y are marked as "not supported", what means that for that SKU we should be able to add this workaround here, but at same time means that we need to remove the power wells support for DDI-E for these SKUs probably.

Art, could/should we set this bit blindly for all CNL?

and if yes:

Art, will it always be a decision based by SKUs now on? Or should we really rely on BIOS?

Is there another way to detect the port E presence? I don't believe VBT has that info in a reliable way, does it? Otherwise we would be using it already for the missed straps...

Thanks,
Rodrigo.

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) · line 2722

Quoted 9 lines
drivers/gpu/drm/i915/intel_ddi.c +3 -2
-     if (IS_GEN9_LP(dev_priv) && port == PORT_A) {
+     if ((IS_GEN9_LP(dev_priv) || INTEL_GEN(dev_priv) >= 10) &&
+         port == PORT_A) {
              if (!(intel_dig_port->saved_port_bits & DDI_A_4_LANES)) {
-                     DRM_DEBUG_KMS("BXT BIOS forgot to set DDI_A_4_LANES for port A; fixing\n");
+                     DRM_DEBUG_KMS("BIOS forgot to set DDI_A_4_LANES for port A\n");
                      intel_dig_port->saved_port_bits |= DDI_A_4_LANES;
                      max_lanes = 4;
              }

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 6 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx