drm/i915/dp: add lane_count check in intel_dp_check_link_status
Subsystems (2)
PATCH 1/1 drm/i915/dp: add lane_count check in intel_dp_check_link_status
Currently it's entirely possible to go through the link training step without first determining the lane_count, which is silly since we end up doing a bunch of aux transfers of size = 0, as highlighted by WARN_ON(!msg->buffer != !msg->size), and can only ever result in a 'failed to update link training' message. This can be observed during intel_dp_long_pulse where we can do the link training step, but before we have had a chance to set the link params. To avoid this we add an extra check for the lane_count in intel_dp_check_link_status, which should prevent us from doing the link training step prematurely.
v2: add WARN_ON_ONCE and FIXME comment (Ville)
References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
--- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +5 -0
@@ -4032,6 +4032,11 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)if (!to_intel_crtc (intel_encoder->base.crtc)->active)return ; +/* FIXME: we need to synchronize this sort of stuff with hardware +* readout */ +if (WARN_ON_ONCE (!intel_dp->lane_count)) +return ; +/* if link training is requested we should perform it always */ if ((intel_dp->compliance_test_type ==DP_TEST_LINK_TRAINING ) || (!drm_dp_channel_eq_ok (link_status, intel_dp->lane_count))) {
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915/dp: add lane_count check in intel_dp_check_link_status (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/dp: add lane_count check in intel_dp_check_link_status (rev2)
URL : https://patchwork.freedesktop.org/series/11667/
State : warning
== Summary ==
Series 11667v2 drm/i915/dp: add lane_count check in intel_dp_check_link_status
https://patchwork.freedesktop.org/api/1.0/series/11667/revisions/2/mbox/
Test drv_module_reload_basic:
pass -> DMESG-WARN (fi-skl-6700hq)
Test gem_exec_suspend:
Subgroup basic-s3:
dmesg-warn -> PASS (fi-skl-6700hq)
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a:
dmesg-warn -> PASS (fi-ilk-650)
Subgroup nonblocking-crc-pipe-b:
pass -> DMESG-WARN (fi-ivb-3770)
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (fi-skl-6700hq)
dmesg-warn -> PASS (fi-ilk-650)
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-skl-6700hq)
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS (fi-skl-6700hq)fi-bdw-5557u total:246 pass:231 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:246 pass:204 dwarn:0 dfail:0 fail:0 skip:42 fi-bxt-t5700 total:246 pass:216 dwarn:0 dfail:0 fail:0 skip:30 fi-byt-j1900 total:246 pass:214 dwarn:0 dfail:0 fail:1 skip:31 fi-byt-n2820 total:246 pass:210 dwarn:0 dfail:0 fail:1 skip:35 fi-hsw-4770 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-hsw-4770r total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-ilk-650 total:246 pass:184 dwarn:0 dfail:0 fail:2 skip:60 fi-ivb-3520m total:246 pass:221 dwarn:0 dfail:0 fail:0 skip:25 fi-ivb-3770 total:246 pass:220 dwarn:1 dfail:0 fail:0 skip:25 fi-skl-6260u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:246 pass:222 dwarn:1 dfail:0 fail:0 skip:23 fi-skl-6700k total:246 pass:221 dwarn:1 dfail:0 fail:0 skip:24 fi-skl-6770hq total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 fi-snb-2520m total:246 pass:210 dwarn:0 dfail:0 fail:0 skip:36 fi-snb-2600 total:246 pass:209 dwarn:0 dfail:0 fail:0 skip:37
Results at /archive/results/CI_IGT_test/Patchwork_2768/
456ed322a41b7ca9699ad10fe49775803a55656a drm-intel-nightly: 2016y-10m-19d-20h-30m-34s UTC integration manifest 95638cb drm/i915/dp: add lane_count check in intel_dp_check_link_status
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: warning for drm/i915/dp: add lane_count check in intel_dp_check_link_status (rev2)
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm/i915/dp: add
lane_countcheck inintel_dp_check_link_status(rev2)
URL : https://patchwork.freedesktop.org/series/11667/
State : warning
Quoted 7 lines
== Summary ==
Series 11667v2 drm/i915/dp: add
lane_countcheck inintel_dp_check_link_status
https://patchwork.freedesktop.org/api/1.0/series/11667/revisions/2/mbox/Test
drv_module_reload_basic:pass -> DMESG-WARN (fi-skl-6700hq)
[ 36.849247] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon [ 36.849278] [drm:intel_ddi_init [i915]] *ERROR* LSPCON init failed on port B [ 36.867178] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS [ 38.946464] Setting dangerous option inject_load_failure - tainting kernel [ 39.093675] Setting dangerous option inject_load_failure - tainting kernel [ 39.258529] Setting dangerous option inject_load_failure - tainting kernel [ 39.424800] Setting dangerous option inject_load_failure - tainting kernel [ 40.497909] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon [ 40.498321] [drm:intel_ddi_init [i915]] *ERROR* LSPCON init failed on port B [ 40.530092] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS
Created bug report https://bugs.freedesktop.org/show_bug.cgi?id=98353
Quoted 8 lines
Test
gem_exec_suspend:Subgroup basic-s3: dmesg-warn -> PASS (fi-skl-6700hq) Test kms_pipe_crc_basic: Subgroup nonblocking-crc-pipe-a: dmesg-warn -> PASS (fi-ilk-650) Subgroup nonblocking-crc-pipe-b: pass -> DMESG-WARN (fi-ivb-3770)
[ 391.061781] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 130 [ 391.062331] [drm:drm_edid_block_valid] *ERROR* EDID checksum is
invalid, remainder is 130
https://bugs.freedesktop.org/show_bug.cgi?id=98228
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä
AppliedRe: ✗ Fi.CI.BAT: warning for drm/i915/dp: add lane_count check in intel_dp_check_link_status (rev2)
Quoted 35 lines · Matthew Auld
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm/i915/dp: add
lane_countcheck inintel_dp_check_link_status(rev2)
URL : https://patchwork.freedesktop.org/series/11667/
State : warningQuoted 7 lines
== Summary ==
Series 11667v2 drm/i915/dp: add
lane_countcheck inintel_dp_check_link_status
https://patchwork.freedesktop.org/api/1.0/series/11667/revisions/2/mbox/Test
drv_module_reload_basic:pass -> DMESG-WARN (fi-skl-6700hq)[ 36.849247] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon [ 36.849278] [drm:intel_ddi_init [i915]] *ERROR* LSPCON init failed on port B [ 36.867178] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS [ 38.946464] Setting dangerous option inject_load_failure - tainting kernel [ 39.093675] Setting dangerous option inject_load_failure - tainting kernel [ 39.258529] Setting dangerous option inject_load_failure - tainting kernel [ 39.424800] Setting dangerous option inject_load_failure - tainting kernel [ 40.497909] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon [ 40.498321] [drm:intel_ddi_init [i915]] *ERROR* LSPCON init failed on port B [ 40.530092] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOSCreated bug report https://bugs.freedesktop.org/show_bug.cgi?id=98353
Quoted 8 lines
Test
gem_exec_suspend:Subgroup basic-s3: dmesg-warn -> PASS (fi-skl-6700hq) Test kms_pipe_crc_basic: Subgroup nonblocking-crc-pipe-a: dmesg-warn -> PASS (fi-ilk-650) Subgroup nonblocking-crc-pipe-b: pass -> DMESG-WARN (fi-ivb-3770)
Quoted 6 lines
[ 391.061781] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 130 [ 391.062331] [drm:drm_edid_block_valid] *ERROR* EDID checksum isinvalid, remainder is 130
Pushed to dinq. Thanks for the patch.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 25 lines · Matthew Auld
Currently it's entirely possible to go through the link training step without first determining the
lane_count, which is silly since we end up doing a bunch of aux transfers of size = 0, as highlighted byWARN_ON(!msg->buffer != !msg->size), and can only ever result in a 'failed to update link training' message. This can be observed duringintel_dp_long_pulsewhere we can do the link training step, but before we have had a chance to set the link params. To avoid this we add an extra check for thelane_countinintel_dp_check_link_status, which should prevent us from doing the link training step prematurely.v2: add
WARN_ON_ONCEand FIXME comment (Ville)References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
Cc Ville Syrjälä <[email protected]>Cc Mika Kahola <[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0
drivers/gpu/drm/i915/intel_dp.c intel_dp_check_link_status(struct intel_dp *intel_dp) · line 4038
Quoted 7 lines
drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -4032,6 +4032,11 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)if (!to_intel_crtc (intel_encoder->base.crtc)->active)return ; +/* FIXME: we need to synchronize this sort of stuff with hardware +* readout */ +if (WARN_ON_ONCE (!intel_dp->lane_count)) +return ;
One warn is better than a constant spew as can be seen eg. in
https://bugs.freedesktop.org/show_bug.cgi?id=98323
Still need to fix the real issue of course, but in the meantime
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c +1
-0+/* if link training is requested we should perform it always */ if ((intel_dp->compliance_test_type ==DP_TEST_LINK_TRAINING ) || (!drm_dp_channel_eq_ok (link_status, intel_dp->lane_count))) {Signature · 1 line
2.7.4
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 9 lines · Matthew Auld
Currently it's entirely possible to go through the link training step without first determining the
lane_count, which is silly since we end up doing a bunch of aux transfers of size = 0, as highlighted byWARN_ON(!msg->buffer != !msg->size), and can only ever result in a 'failed to update link training' message. This can be observed duringintel_dp_long_pulsewhere we can do the link training step, but before we have had a chance to set the link params. To avoid this we add an extra check for thelane_countinintel_dp_check_link_status, which should prevent us from doing the link training step prematurely.
Now we'll just have to fix the cases where we try to do this anyway:
https://bugs.freedesktop.org/show_bug.cgi?id=98374
BR,
Jani.
Quoted 27 lines
v2: add
WARN_ON_ONCEand FIXME comment (Ville)References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
Cc Ville Syrjälä <[email protected]>Cc Mika Kahola <[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/i915/intel_dp.c +5
-0@@ -4032,6 +4032,11 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)if (!to_intel_crtc (intel_encoder->base.crtc)->active)return ; +/* FIXME: we need to synchronize this sort of stuff with hardware +* readout */ +if (WARN_ON_ONCE (!intel_dp->lane_count)) +return ; +/* if link training is requested we should perform it always */ if ((intel_dp->compliance_test_type ==DP_TEST_LINK_TRAINING ) || (!drm_dp_channel_eq_ok (link_status, intel_dp->lane_count))) {
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx