drm/i915/cnl: Force DDI_A_4_LANES when needed.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/cnl: Force DDI_A_4_LANES when needed.
As we faced in BXT, on CNL DDI_A_4_LANES is not set as expected when system is boot with multiple monitors connected. This result in wrong lane setup impacting the max data rate available and consequently blocking modeset on eDP, resulting in a blank screen.
Most of CNL SKUs don't support DDI-E.
The only SKU that supports DDI-E is the same that supports the full A/E split called DDI-F.
Also when DDI-F is used DDI-E cannot be used because they share Interrupts. So DDI-E is almost useless. Anyways let's consider this is possible and rely on VBT for that.
Since this become a trend this commit also adds an extra commit message so in the future we have an extra insight when we are dealing with this same case.
This patch was initialy start by Clint, but required many changes including full commit message. So Credits entirely to Clint for finding this.
--- drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +18 -6
@@ -2803,17 +2803,29 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) }/* -* 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 +* Some BIOS might fail to set this bit on port A if eDP +* wasn't lit up at boot. Force this bit when needed on in our internal * configuration so that we use the proper lane count for our * calculations. */ -if (IS_GEN9_LP (dev_priv) && 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" ); +if (port ==PORT_A && + !(intel_dig_port->saved_port_bits &DDI_A_4_LANES )) { + +/* Broxton: Bspec says that DDI_A_4_LANES is the only supported +* configuration +* Cannonlake: Most of SKUs don't support DDI_E, and the only +* one who does also have a full A/E split called +* DDI_F what makes DDI_E useless. However for this +* case let's trust VBT info. +*/ +if (IS_GEN9_LP (dev_priv) || + ((IS_CANNONLAKE (dev_priv)) && + !intel_bios_is_port_present (dev_priv,PORT_E ))) { +DRM_DEBUG_KMS ("Forcing DDI_A_4_LANES for port A\n" ); intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; max_lanes =4 ; + }else { +DRM_DEBUG_KMS ("DDI A configured for 2 lanes\n" ); } }
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/cnl: Force DDI_A_4_LANES when needed.
== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Force DDI_A_4_LANES when needed.
URL : https://patchwork.freedesktop.org/series/32398/
State : success
== Summary ==
Series 32398v1 drm/i915/cnl: Force DDI_A_4_LANES when needed.
https://patchwork.freedesktop.org/api/1.0/series/32398/revisions/1/mbox/
Test chamelium:
Subgroup dp-hpd-fast:
incomplete -> SKIP (fi-bdw-gvtdvm) fdo#102332
Subgroup dp-crc-fast:
fail -> PASS (fi-kbl-7500u) fdo#102514
Test gem_ringfill:
Subgroup basic-default-hang:
dmesg-warn -> PASS (fi-pnv-d510) fdo#101600
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-j1900) fdo#101705fdo#102332 https://bugs.freedesktop.org/show_bug.cgi?id=102332
fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:442s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:450s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:379s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:526s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:265s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:497s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:497s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:495s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:479s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:567s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:417s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:252s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:580s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:456s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:428s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:432s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:499s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:458s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:493s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:575s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:480s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:590s fi-pnv-d510 total:289 pass:223 dwarn:0 dfail:0 fail:0 skip:66 time:547s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:452s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:653s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:518s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:502s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:466s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:564s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:421s
0760516f31272c1c7cbdb6e415b4f367d3681d8e drm-tip: 2017y-10m-20d-18h-40m-36s UTC integration manifest 06df7d3664b5 drm/i915/cnl: Force DDI_A_4_LANES when needed.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6133/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/cnl: Force DDI_A_4_LANES when needed.
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Force DDI_A_4_LANES when needed.
URL : https://patchwork.freedesktop.org/series/32398/
State : success
== Summary ==
Test kms_busy:
Subgroup extended-modeset-hang-newfb-with-reset-render-B:
dmesg-warn -> PASS (shard-hsw) fdo#103038
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-hsw) fdo#99912fdo#103038 https://bugs.freedesktop.org/show_bug.cgi?id=103038
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
shard-hsw total:2540 pass:1429 dwarn:1 dfail:0 fail:9 skip:1101 time:9277s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6133/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 57 lines · Rodrigo Vivi
As we faced in BXT, on CNL
DDI_A_4_LANESis not set as expected when system is boot with multiple monitors connected. This result in wrong lane setup impacting the max data rate available and consequently blocking modeset on eDP, resulting in a blank screen.Most of CNL SKUs don't support DDI-E.
The only SKU that supports DDI-E is the same that supports the full A/E split called DDI-F.Also when DDI-F is used DDI-E cannot be used because they share Interrupts. So DDI-E is almost useless. Anyways let's consider this is possible and rely on VBT for that.
Since this become a trend this commit also adds an extra commit message so in the future we have an extra insight when we are dealing with this same case.
This patch was initialy start by Clint, but required many changes including full commit message. So Credits entirely to Clint for finding this.
Suggested-by Clint Taylor <[email protected]>Cc Clint Taylor <[email protected]>Cc Mika Kahola <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +5
-6@@ -2803,17 +2803,29 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) }/* -* 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 +* Some BIOS might fail to set this bit on port A if eDP +* wasn't lit up at boot. Force this bit when needed on in our internal * configuration so that we use the proper lane count for our * calculations. */ -if (IS_GEN9_LP (dev_priv) && 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" ); +if (port ==PORT_A && + !(intel_dig_port->saved_port_bits &DDI_A_4_LANES )) { +
drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) · line 2823
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-0+/* Broxton: Bspec says that DDI_A_4_LANES is the only supported +* configuration +* Cannonlake: Most of SKUs don't support DDI_E, and the only +* one who does also have a full A/E split called +* DDI_F what makes DDI_E useless. However for this +* case let's trust VBT info. +*/ +if (IS_GEN9_LP (dev_priv) || + ((IS_CANNONLAKE (dev_priv)) && + !intel_bios_is_port_present (dev_priv,PORT_E ))) {
Can you extract all these messy conditions into some kind of (ideally less convoluted) helper function? In the end I think it would be cool if this part of the code ends up looking something like:
if (intel_ddi_a_force_4_lanes(dig_port)) {
DRM_DEBUG_KMS(...);
dig_port->saved_port_bits |= DDI_A_4_LANES;
max_lanes = 4;
}Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0+DRM_DEBUG_KMS ("Forcing DDI_A_4_LANES for port A\n" ); intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; max_lanes =4 ; + }else { +DRM_DEBUG_KMS ("DDI A configured for 2 lanes\n" ); } }Signature · 1 line
2.13.5
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/cnl: Force DDI_A_4_LANES when needed.
As we faced in BXT, on CNL DDI_A_4_LANES is not set as expected when system is boot with multiple monitors connected. This result in wrong lane setup impacting the max data rate available and consequently blocking modeset on eDP, resulting in a blank screen.
Most of CNL SKUs don't support DDI-E.
The only SKU that supports DDI-E is the same that supports the full A/E split called DDI-F.
Also when DDI-F is used DDI-E cannot be used because they share Interrupts. So DDI-E is almost useless. Anyways let's consider this is possible and rely on VBT for that.
This patch was initialy start by Clint, but required many changes including full commit message. So Credits entirely to Clint for finding this.
v2: Extract all messy conditions into a helper function
as suggested by Ville.
Along with simplification I removed the debug message on the working case since now all conditions are grouped.
--- drivers/gpu/drm/i915/intel_ddi.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +25 -11
@@ -2694,6 +2694,24 @@ intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)return connector; } +static bool intel_ddi_a_force_4_lanes (struct intel_digital_port *dport) +{ +struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev); + +/* Broxton: Bspec says that DDI_A_4_LANES is the only supported +* configuration +* Cannonlake: Most of SKUs don't support DDI_E, and the only +* one who does also have a full A/E split called +* DDI_F what makes DDI_E useless. However for this +* case let's trust VBT info. +*/ +return dport->port ==PORT_A && + !(dport->saved_port_bits &DDI_A_4_LANES ) && + (IS_GEN9_LP (dev_priv) || + ((IS_CANNONLAKE (dev_priv)) && + !intel_bios_is_port_present (dev_priv,PORT_E ))); +} +void intel_ddi_init (struct drm_i915_private *dev_priv,enum port port) {struct intel_digital_port *intel_dig_port;
@@ -2803,18 +2821,14 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) }/* -* 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 -* configuration so that we use the proper lane count for our -* calculations. +* Some BIOS might fail to set this bit on port A if eDP +* wasn't lit up at boot. Force this bit set when needed +* so we use the proper lane count for our calculations. */ -if (IS_GEN9_LP (dev_priv) && 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" ); - intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; - max_lanes =4 ; - } +if (intel_ddi_a_force_4_lanes (intel_dig_port)) { +DRM_DEBUG_KMS ("Forcing DDI_A_4_LANES for port A\n" ); + intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; + max_lanes =4 ; } intel_dig_port->max_lanes = max_lanes;
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 49 lines · Rodrigo Vivi
As we faced in BXT, on CNL
DDI_A_4_LANESis not set as expected when system is boot with multiple monitors connected. This result in wrong lane setup impacting the max data rate available and consequently blocking modeset on eDP, resulting in a blank screen.Most of CNL SKUs don't support DDI-E.
The only SKU that supports DDI-E is the same that supports the full A/E split called DDI-F.Also when DDI-F is used DDI-E cannot be used because they share Interrupts. So DDI-E is almost useless. Anyways let's consider this is possible and rely on VBT for that.
This patch was initialy start by Clint, but required many changes including full commit message. So Credits entirely to Clint for finding this.
v2: Extract all messy conditions into a helper function
as suggested by Ville.
Along with simplification I removed the debug message on the working case since now all conditions are grouped.Suggested-by Clint Taylor <[email protected]>Cc Clint Taylor <[email protected]>Cc Mika Kahola <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +5
-0@@ -2694,6 +2694,24 @@ intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)return connector; } +static bool intel_ddi_a_force_4_lanes (struct intel_digital_port *dport) +{ +struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev); + +/* Broxton: Bspec says that DDI_A_4_LANES is the only supported
drivers/gpu/drm/i915/intel_ddi.c intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port) · line 2711
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-0+* configuration +* Cannonlake: Most of SKUs don't support DDI_E, and the only +* one who does also have a full A/E split called +* DDI_F what makes DDI_E useless. However for this +* case let's trust VBT info. +*/ +return dport->port ==PORT_A && + !(dport->saved_port_bits & DDI_A_4_LANES) && + (IS_GEN9_LP(dev_priv) || + ((IS_CANNONLAKE(dev_priv)) &&
^ ^
Those don't look necessary.
It still took me a while to parse that thing. Maybe it should be split even further? Eg. something like:
{
if (port != PORT_A)
return false;
if (saved_port_bits & 4_LANES)
return false;
/* blah */
if (BXT)
return true;
/* meh */
if (CNL && !port_e_present)
return true;
return false;
}But your code looks correct as well, and I can live with it if you want to keep it as is. So, with the extra parens removed
Quoted 34 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-11+ !intel_bios_is_port_present(dev_priv, PORT_E))); +} +void intel_ddi_init (struct drm_i915_private *dev_priv,enum port port) {struct intel_digital_port *intel_dig_port;@@ -2803,18 +2821,14 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) }/* -* 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 -* configuration so that we use the proper lane count for our -* calculations. +* Some BIOS might fail to set this bit on port A if eDP +* wasn't lit up at boot. Force this bit set when needed +* so we use the proper lane count for our calculations. */ -if (IS_GEN9_LP (dev_priv) && 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" ); - intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; - max_lanes =4 ; - } +if (intel_ddi_a_force_4_lanes (intel_dig_port)) { +DRM_DEBUG_KMS ("Forcing DDI_A_4_LANES for port A\n" ); + intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; + max_lanes =4 ; } intel_dig_port->max_lanes = max_lanes;Signature · 1 line
2.13.5
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/cnl: Force DDI_A_4_LANES when needed.
As we faced in BXT, on CNL DDI_A_4_LANES is not set as expected when system is boot with multiple monitors connected. This result in wrong lane setup impacting the max data rate available and consequently blocking modeset on eDP, resulting in a blank screen.
Most of CNL SKUs don't support DDI-E.
The only SKU that supports DDI-E is the same that supports the full A/E split called DDI-F.
Also when DDI-F is used DDI-E cannot be used because they share Interrupts. So DDI-E is almost useless. Anyways let's consider this is possible and rely on VBT for that.
This patch was initialy start by Clint, but required many changes including full commit message. So Credits entirely to Clint for finding this.
v2: Extract all messy conditions into a helper function
as suggested by Ville.
Along with simplification I removed the debug message on the working case since now all conditions are grouped.
v3: Split the conditions even more as suggested by Ville.
Get's cleaner and easier to add new cases in the future.
--- drivers/gpu/drm/i915/intel_ddi.c | 46 ++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +35 -11
@@ -2694,6 +2694,34 @@ intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)return connector; } +static bool intel_ddi_a_force_4_lanes (struct intel_digital_port *dport) +{ +struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev); + +if (dport->port !=PORT_A ) +return false; + +if (dport->saved_port_bits &DDI_A_4_LANES ) +return false; + +/* Broxton/Geminilake: Bspec says that DDI_A_4_LANES is the only +* supported configuration +*/ +if (IS_GEN9_LP (dev_priv)) +return true; + +/* Cannonlake: Most of SKUs don't support DDI_E, and the only +* one who does also have a full A/E split called +* DDI_F what makes DDI_E useless. However for this +* case let's trust VBT info. +*/ +if (IS_CANNONLAKE (dev_priv) && + !intel_bios_is_port_present (dev_priv,PORT_E )) +return true; + +return false; +} +void intel_ddi_init (struct drm_i915_private *dev_priv,enum port port) {struct intel_digital_port *intel_dig_port;
@@ -2803,18 +2831,14 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) }/* -* 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 -* configuration so that we use the proper lane count for our -* calculations. +* Some BIOS might fail to set this bit on port A if eDP +* wasn't lit up at boot. Force this bit set when needed +* so we use the proper lane count for our calculations. */ -if (IS_GEN9_LP (dev_priv) && 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" ); - intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; - max_lanes =4 ; - } +if (intel_ddi_a_force_4_lanes (intel_dig_port)) { +DRM_DEBUG_KMS ("Forcing DDI_A_4_LANES for port A\n" ); + intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; + max_lanes =4 ; } intel_dig_port->max_lanes = max_lanes;
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 29 lines · Rodrigo Vivi
As we faced in BXT, on CNL
DDI_A_4_LANESis not set as expected when system is boot with multiple monitors connected. This result in wrong lane setup impacting the max data rate available and consequently blocking modeset on eDP, resulting in a blank screen.Most of CNL SKUs don't support DDI-E.
The only SKU that supports DDI-E is the same that supports the full A/E split called DDI-F.Also when DDI-F is used DDI-E cannot be used because they share Interrupts. So DDI-E is almost useless. Anyways let's consider this is possible and rely on VBT for that.
This patch was initialy start by Clint, but required many changes including full commit message. So Credits entirely to Clint for finding this.
v2: Extract all messy conditions into a helper function
as suggested by Ville.
Along with simplification I removed the debug message on the working case since now all conditions are grouped.
v3: Split the conditions even more as suggested by Ville.
Get's cleaner and easier to add new cases in the future.
Quoted 6 lines
Suggested-by Clint Taylor <[email protected]>Cc Clint Taylor <[email protected]>Cc Mika Kahola <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
Quoted 71 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 46 ++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +35
-11@@ -2694,6 +2694,34 @@ intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)return connector; } +static bool intel_ddi_a_force_4_lanes (struct intel_digital_port *dport) +{ +struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev); + +if (dport->port !=PORT_A ) +return false; + +if (dport->saved_port_bits &DDI_A_4_LANES ) +return false; + +/* Broxton/Geminilake: Bspec says that DDI_A_4_LANES is the only +* supported configuration +*/ +if (IS_GEN9_LP (dev_priv)) +return true; + +/* Cannonlake: Most of SKUs don't support DDI_E, and the only +* one who does also have a full A/E split called +* DDI_F what makes DDI_E useless. However for this +* case let's trust VBT info. +*/ +if (IS_CANNONLAKE (dev_priv) && + !intel_bios_is_port_present (dev_priv,PORT_E )) +return true; + +return false; +} +void intel_ddi_init (struct drm_i915_private *dev_priv,enum port port) {struct intel_digital_port *intel_dig_port;@@ -2803,18 +2831,14 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) }/* -* 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 -* configuration so that we use the proper lane count for our -* calculations. +* Some BIOS might fail to set this bit on port A if eDP +* wasn't lit up at boot. Force this bit set when needed +* so we use the proper lane count for our calculations. */ -if (IS_GEN9_LP (dev_priv) && 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" ); - intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; - max_lanes =4 ; - } +if (intel_ddi_a_force_4_lanes (intel_dig_port)) { +DRM_DEBUG_KMS ("Forcing DDI_A_4_LANES for port A\n" ); + intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; + max_lanes =4 ; } intel_dig_port->max_lanes = max_lanes;Signature · 1 line
2.13.5
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerQuoted 30 lines · Ville Syrjälä
Quoted 29 lines · Rodrigo Vivi
As we faced in BXT, on CNL
DDI_A_4_LANESis not set as expected when system is boot with multiple monitors connected. This result in wrong lane setup impacting the max data rate available and consequently blocking modeset on eDP, resulting in a blank screen.Most of CNL SKUs don't support DDI-E.
The only SKU that supports DDI-E is the same that supports the full A/E split called DDI-F.Also when DDI-F is used DDI-E cannot be used because they share Interrupts. So DDI-E is almost useless. Anyways let's consider this is possible and rely on VBT for that.
This patch was initialy start by Clint, but required many changes including full commit message. So Credits entirely to Clint for finding this.
v2: Extract all messy conditions into a helper function
as suggested by Ville.
Along with simplification I removed the debug message on the working case since now all conditions are grouped.
v3: Split the conditions even more as suggested by Ville.
Get's cleaner and easier to add new cases in the future.
Quoted 8 lines
Quoted 6 lines
Suggested-by Clint Taylor <[email protected]>Cc Clint Taylor <[email protected]>Cc Mika Kahola <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>
Thanks for review and all great suggestions.
Merged to dinq.
Quoted 69 lines
Quoted 69 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 46 ++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +35
-11@@ -2694,6 +2694,34 @@ intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)return connector; } +static bool intel_ddi_a_force_4_lanes (struct intel_digital_port *dport) +{ +struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev); + +if (dport->port !=PORT_A ) +return false; + +if (dport->saved_port_bits &DDI_A_4_LANES ) +return false; + +/* Broxton/Geminilake: Bspec says that DDI_A_4_LANES is the only +* supported configuration +*/ +if (IS_GEN9_LP (dev_priv)) +return true; + +/* Cannonlake: Most of SKUs don't support DDI_E, and the only +* one who does also have a full A/E split called +* DDI_F what makes DDI_E useless. However for this +* case let's trust VBT info. +*/ +if (IS_CANNONLAKE (dev_priv) && + !intel_bios_is_port_present (dev_priv,PORT_E )) +return true; + +return false; +} +void intel_ddi_init (struct drm_i915_private *dev_priv,enum port port) {struct intel_digital_port *intel_dig_port;@@ -2803,18 +2831,14 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) }/* -* 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 -* configuration so that we use the proper lane count for our -* calculations. +* Some BIOS might fail to set this bit on port A if eDP +* wasn't lit up at boot. Force this bit set when needed +* so we use the proper lane count for our calculations. */ -if (IS_GEN9_LP (dev_priv) && 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" ); - intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; - max_lanes =4 ; - } +if (intel_ddi_a_force_4_lanes (intel_dig_port)) { +DRM_DEBUG_KMS ("Forcing DDI_A_4_LANES for port A\n" ); + intel_dig_port->saved_port_bits |=DDI_A_4_LANES ; + max_lanes =4 ; }
Quoted 7 lines
Quoted 3 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0intel_dig_port->max_lanes = max_lanes;Signature · 1 line
2.13.5Signature · 2 lines
Ville Syrjälä Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev2)
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev2)
URL : https://patchwork.freedesktop.org/series/32398/
State : success
== Summary ==
Series 32398v2 drm/i915/cnl: Force DDI_A_4_LANES when needed.
https://patchwork.freedesktop.org/api/1.0/series/32398/revisions/2/mbox/
Test chamelium:
Subgroup dp-crc-fast:
fail -> PASS (fi-kbl-7500u) fdo#102514
Test gem_exec_reloc:
Subgroup basic-cpu-active:
pass -> FAIL (fi-gdg-551) fdo#102582 +2
Subgroup basic-write-gtt-active:
pass -> FAIL (fi-gdg-551) fdo#102582
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
fail -> PASS (fi-gdg-551) fdo#102618
incomplete -> PASS (fi-skl-6700hq) fdo#103410 +1
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-kbl-7560u) fdo#102846fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618
fdo#103410 https://bugs.freedesktop.org/show_bug.cgi?id=103410
fdo#102846 https://bugs.freedesktop.org/show_bug.cgi?id=102846
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:440s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:452s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:368s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:522s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:265s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:505s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:492s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:493s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:476s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:553s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:416s fi-gdg-551 total:289 pass:174 dwarn:1 dfail:0 fail:5 skip:109 time:249s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:583s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:427s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:426s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:431s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:493s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:457s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:491s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:574s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:476s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:583s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:553s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:455s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:647s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:523s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:498s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:456s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:559s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:420s
d2ec28c53833297976d0754e0e82c3d7490b149c drm-tip: 2017y-10m-23d-08h-55m-00s UTC integration manifest d2ab26975b01 drm/i915/cnl: Force DDI_A_4_LANES when needed.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6144/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev3)
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev3)
URL : https://patchwork.freedesktop.org/series/32398/
State : success
== Summary ==
Series 32398v3 drm/i915/cnl: Force DDI_A_4_LANES when needed.
https://patchwork.freedesktop.org/api/1.0/series/32398/revisions/3/mbox/
Test chamelium:
Subgroup dp-crc-fast:
fail -> PASS (fi-kbl-7500u) fdo#102514
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
fail -> PASS (fi-gdg-551) fdo#102618
incomplete -> PASS (fi-skl-6700hq) fdo#103410 +1
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-kbl-7560u) fdo#102846fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618
fdo#103410 https://bugs.freedesktop.org/show_bug.cgi?id=103410
fdo#102846 https://bugs.freedesktop.org/show_bug.cgi?id=102846
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:444s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:456s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:371s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:515s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:263s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:502s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:492s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:496s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:556s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:417s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:251s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:577s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:447s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:432s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:434s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:481s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:459s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:489s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:572s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:476s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:580s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:543s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:649s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:514s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:500s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:451s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:576s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:421s
d2ec28c53833297976d0754e0e82c3d7490b149c drm-tip: 2017y-10m-23d-08h-55m-00s UTC integration manifest 01111073b1d1 drm/i915/cnl: Force DDI_A_4_LANES when needed.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6145/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev2)
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev2)
URL : https://patchwork.freedesktop.org/series/32398/
State : success
== Summary ==
Test kms_flip:
Subgroup flip-vs-wf_vblank-interruptible:
pass -> FAIL (shard-hsw) fdo#100368 +1
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-B-planes:
skip -> PASS (shard-hsw)
Test kms_plane_multiple:
Subgroup atomic-pipe-B-tiling-x:
skip -> PASS (shard-hsw)fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
shard-hsw total:2540 pass:1429 dwarn:3 dfail:0 fail:11 skip:1097 time:9158s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6144/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev3)
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Force DDI_A_4_LANES when needed. (rev3)
URL : https://patchwork.freedesktop.org/series/32398/
State : success
== Summary ==
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-B-planes:
skip -> PASS (shard-hsw)
Test kms_plane_multiple:
Subgroup atomic-pipe-B-tiling-x:
skip -> PASS (shard-hsw)
Test kms_busy:
Subgroup extended-modeset-hang-oldfb-with-reset-render-C:
dmesg-warn -> PASS (shard-hsw) fdo#102249
Test drv_module_reload:
Subgroup basic-reload-inject:
dmesg-warn -> PASS (shard-hsw) fdo#102707fdo#102249 https://bugs.freedesktop.org/show_bug.cgi?id=102249
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
shard-hsw total:2540 pass:1433 dwarn:1 dfail:0 fail:9 skip:1097 time:9205s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6145/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx