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.
References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
--- drivers/gpu/drm/i915/intel_dp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +3 -0
@@ -3927,6 +3927,9 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)if (!to_intel_crtc (intel_encoder->base.crtc)->active)return ; +if (!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: failure for drm/i915/dp: add lane_count check in intel_dp_check_link_status
== Series Details ==
== Series Details ==
Series: drm/i915/dp: add lane_count check in intel_dp_check_link_status
URL : https://patchwork.freedesktop.org/series/11667/
State : failure
== Summary ==
Series 11667v1 drm/i915/dp: add lane_count check in intel_dp_check_link_status
http://patchwork.freedesktop.org/api/1.0/series/11667/revisions/1/mbox/
Test kms_cursor_legacy:
Subgroup basic-cursor-vs-flip-legacy:
pass -> FAIL (fi-bsw-n3050)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
incomplete -> PASS (fi-hsw-4770k)fi-bdw-5557u total:252 pass:235 dwarn:0 dfail:0 fail:2 skip:15 fi-bsw-n3050 total:252 pass:204 dwarn:0 dfail:0 fail:2 skip:46 fi-hsw-4770k total:252 pass:228 dwarn:0 dfail:0 fail:2 skip:22 fi-hsw-4770r total:252 pass:224 dwarn:0 dfail:0 fail:2 skip:26 fi-ivb-3520m total:252 pass:220 dwarn:0 dfail:0 fail:1 skip:31 fi-skl-6260u total:252 pass:236 dwarn:0 dfail:0 fail:2 skip:14 fi-skl-6700k total:252 pass:222 dwarn:0 dfail:0 fail:2 skip:28 fi-snb-2520m total:252 pass:207 dwarn:0 dfail:0 fail:2 skip:43 fi-snb-2600 total:252 pass:207 dwarn:0 dfail:0 fail:2 skip:43
Results at /archive/results/CI_IGT_test/Patchwork_2441/
9dc3273e7948e9b363ca56d4a86c75ded7d4532a drm-intel-nightly: 2016y-08m-27d-08h-44m-42s UTC integration manifest 0b4c8e1 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
Quoted 32 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.References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
Cc Jani Nikula <[email protected]>Signed-off-by Matthew Auld <[email protected]>---
drivers/gpu/drm/i915/intel_dp.c | 3 +++1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -3927,6 +3927,9 @@ intel_dp_check_link_status(struct intel_dp *intel_dp) if (!to_intel_crtc(intel_encoder->base.crtc)->active) return;drivers/gpu/drm/i915/intel_dp.c +3
-0+if (!intel_dp->lane_count) +return ; +
Quoted 6 lines
/* 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-Quoted 1 line
lane_count))) {
Should we place this check as part drm_dp_helper()'s drm_dp_channel_eq_ok() routine as this may happen with other than our i915 driver as well?
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 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.References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
Cc Jani Nikula <[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 3 +++ 1 file changed, 3 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 3931
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp.c +2
-0@@ -3927,6 +3927,9 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)if (!to_intel_crtc (intel_encoder->base.crtc)->active)return ; +if (!intel_dp->lane_count) +return ;
This pretty much amounts to the same thing that I did with 'active_streams' in my series [1]. The problem is that we need to sync up the state on readout to make it really work. Daniel wasn't too happy with my .sync_state() hook, so maybe we need something fancier.
Quoted 11 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 · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 34 lines · Ville Syrjälä
Quoted 22 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.References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
Cc Jani Nikula <[email protected]>Signed-off-by Matthew Auld <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0drivers/gpu/drm/i915/intel_dp.c intel_dp_check_link_status(struct intel_dp *intel_dp) · line 3931
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp.c +2
-0@@ -3927,6 +3927,9 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)if (!to_intel_crtc (intel_encoder->base.crtc)->active)return ; +if (!intel_dp->lane_count) +return ;This pretty much amounts to the same thing that I did with '
active_streams' in my series [1]. The problem is that we need to sync up the state on readout to make it really work. Daniel wasn't too happy with my .sync_state() hook, so maybe we need something fancier.
Quoted 1 line
So, looking at some recent logs I see we may hit this WARN spew a *lot*. So we probably want this patch as a temporary measure. Maybe with WARN_ONCE() + a comment, eg.
/*
* FIXME need to synchronize this sort of
* stuff properly with hardware readout.
*/
?
Quoted 20 lines
Quoted 12 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 · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx