@@ -4074,7 +4074,8 @@ static uint8_t intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)
return test_result;
}
-static void intel_dp_handle_test_request(struct intel_dp *intel_dp)
+static void intel_dp_handle_test_request(struct intel_dp *intel_dp,
+ bool short_pulse)
{
uint8_t response = DP_TEST_NAK;
uint8_t rxdata = 0;
@@ -4086,6 +4087,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp)
goto update_status;
}
+ if (short_pulse && rxdata != DP_TEST_LINK_TRAINING) {
+ DRM_ERROR("Invalid test request in short pulse\n");
+ goto update_status;
+ }
+
switch (rxdata) {
case DP_TEST_LINK_TRAINING:
DRM_DEBUG_KMS("LINK_TRAINING test requested\n");
@@ -4258,7 +4264,7 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
sink_irq_vector);
if (sink_irq_vector & DP_AUTOMATED_TEST_REQUEST)
- DRM_DEBUG_DRIVER("Test request in short pulse not handled\n");
+ intel_dp_handle_test_request(intel_dp, true);
if (sink_irq_vector & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
}
@@ -4612,7 +4618,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
sink_irq_vector);
if (sink_irq_vector & DP_AUTOMATED_TEST_REQUEST)
- intel_dp_handle_test_request(intel_dp);
+ intel_dp_handle_test_request(intel_dp, false);
if (sink_irq_vector & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
}