drm/i915: Check DDI max lanes after applying BXT workaround
Subsystems (2)
PATCH 1/1 drm/i915: Check DDI max lanes after applying BXT workaround
In commit bfb9faab8 we added a workaround for some BXT BIOS that fail to properly initialize the DDI_A_4_LANES bit of the control register (4 lanes is the only valid configuration on BXT since there is no DDI E to share with). A recent patch added some additional checks on this register bit before the workaround gets applied; this breaks eDP on BXT in some settings. Some minor code shuffling is all we need to restore the workaround.
--- drivers/gpu/drm/i915/intel_ddi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_ddi.c +3 -1
@@ -3288,7 +3288,6 @@ void intel_ddi_init(struct drm_device *dev, enum port port) intel_dig_port->saved_port_bits =I915_READ (DDI_BUF_CTL (port)) & (DDI_BUF_PORT_REVERSAL |DDI_A_4_LANES ); - intel_dig_port->max_lanes = max_lanes;/* * Bspec says that DDI_A_4_LANES is the only supported configuration
@@ -3301,9 +3300,12 @@ void intel_ddi_init(struct drm_device *dev, enum port port)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 ; } } + intel_dig_port->max_lanes = max_lanes; + intel_encoder->type =INTEL_OUTPUT_UNKNOWN ; intel_encoder->crtc_mask = (1 <<0 ) | (1 <<1 ) | (1 <<2 ); intel_encoder->cloneable =0 ;
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Check DDI max lanes after applying BXT workaround
== Summary ==
== Summary ==
Series 2907v1 drm/i915: Check DDI max lanes after applying BXT workaround
http://patchwork.freedesktop.org/api/1.0/series/2907/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a:
skip -> PASS (byt-nuc)bdw-nuci7 total:156 pass:147 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:159 pass:147 dwarn:0 dfail:0 fail:0 skip:12 bsw-nuc-2 total:159 pass:129 dwarn:0 dfail:0 fail:0 skip:30 byt-nuc total:159 pass:136 dwarn:0 dfail:0 fail:0 skip:23 hsw-brixbox total:159 pass:146 dwarn:0 dfail:0 fail:0 skip:13 hsw-gt2 total:159 pass:149 dwarn:0 dfail:0 fail:0 skip:10 ilk-hp8440p total:159 pass:111 dwarn:0 dfail:0 fail:0 skip:48 ivb-t430s total:159 pass:145 dwarn:0 dfail:0 fail:0 skip:14 skl-i5k-2 total:159 pass:144 dwarn:1 dfail:0 fail:0 skip:14 snb-dellxps total:159 pass:137 dwarn:0 dfail:0 fail:0 skip:22 snb-x220t total:159 pass:137 dwarn:0 dfail:0 fail:1 skip:21
Results at /archive/results/CI_IGT_test/Patchwork_1316/
5de97b25e5f3c5a63ee243a9d3b22d30792f7d3e drm-intel-nightly: 2016y-01m-29d-07h-32m-09s UTC integration manifest cd1230ad5beadb9ae06d21c73b48887e26840663 drm/i915: Check DDI max lanes after applying BXT workaround
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 28 lines · Matt Roper
In commit
bfb9faab8we added a workaround for some BXT BIOS that fail to properly initialize theDDI_A_4_LANESbit of the control register (4 lanes is the only valid configuration on BXT since there is no DDI E to share with). A recent patch added some additional checks on this register bit before the workaround gets applied; this breaks eDP on BXT in some settings. Some minor code shuffling is all we need to restore the workaround.Cc Ville Syrjälä <[email protected]>Fixes 7cd87cb80 ("drm/i915: Check max number of lanes when registering DDI ports")Signed-off-by Matt Roper <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_ddi.c +0
-1@@ -3288,7 +3288,6 @@ void intel_ddi_init(struct drm_device *dev, enum port port) intel_dig_port->saved_port_bits =I915_READ (DDI_BUF_CTL (port)) & (DDI_BUF_PORT_REVERSAL |DDI_A_4_LANES ); - intel_dig_port->max_lanes = max_lanes;/* * Bspec says that DDI_A_4_LANES is the only supported configuration
drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3308
Quoted 9 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -3301,9 +3300,12 @@ void intel_ddi_init(struct drm_device *dev, enum port port)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 ; } } + intel_dig_port->max_lanes = max_lanes; +
Oops, my bad.
Might be a bit nicer to really fixup the register value before determining max_lanes, but since there's no port E on BXT it doesn't really matter I suppose. So this fix should be fine as is.
Quoted 5 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0intel_encoder->type =INTEL_OUTPUT_UNKNOWN ; intel_encoder->crtc_mask = (1 <<0 ) | (1 <<1 ) | (1 <<2 ); intel_encoder->cloneable =0 ;Signature · 1 line
2.1.4
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Matt Roper
AppliedQuoted 41 lines · Ville Syrjälä
Quoted 28 lines · Matt Roper
In commit
bfb9faab8we added a workaround for some BXT BIOS that fail to properly initialize theDDI_A_4_LANESbit of the control register (4 lanes is the only valid configuration on BXT since there is no DDI E to share with). A recent patch added some additional checks on this register bit before the workaround gets applied; this breaks eDP on BXT in some settings. Some minor code shuffling is all we need to restore the workaround.Cc Ville Syrjälä <[email protected]>Fixes 7cd87cb80 ("drm/i915: Check max number of lanes when registering DDI ports")Signed-off-by Matt Roper <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_ddi.c +0
-1@@ -3288,7 +3288,6 @@ void intel_ddi_init(struct drm_device *dev, enum port port) intel_dig_port->saved_port_bits =I915_READ (DDI_BUF_CTL (port)) & (DDI_BUF_PORT_REVERSAL |DDI_A_4_LANES ); - intel_dig_port->max_lanes = max_lanes;/* * Bspec says that DDI_A_4_LANES is the only supported configuration drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3308
Quoted 9 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -3301,9 +3300,12 @@ void intel_ddi_init(struct drm_device *dev, enum port port)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 ; } } + intel_dig_port->max_lanes = max_lanes; +Oops, my bad.
Quoted 5 lines
Might be a bit nicer to really fixup the register value before determining
max_lanes, but since there's no port E on BXT it doesn't really matter I suppose. So this fix should be fine as is.Reviewed-by Ville Syrjälä <[email protected]>
Pushed to dinq; thanks for the review.
Matt
Quoted 10 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0intel_encoder->type =INTEL_OUTPUT_UNKNOWN ; intel_encoder->crtc_mask = (1 <<0 ) | (1 <<1 ) | (1 <<2 ); intel_encoder->cloneable =0 ;Signature · 1 line
2.1.4Signature · 2 lines
Ville Syrjälä Intel OTC
Signature · 9 lines
Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx