public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/i915: Handle automated test requests for short pulse hpd
@ 2016-04-25  8:24 Shubhangi Shrivastava
  2016-04-25  8:24 ` [PATCH 2/5] drm/i915: Read test values for lane_count and link_rate Shubhangi Shrivastava
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Shubhangi Shrivastava @ 2016-04-25  8:24 UTC (permalink / raw)
  To: intel-gfx; +Cc: Shubhangi Shrivastava

This patch adds support for automated test requests during
short pulse handling in gen platforms.

Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7df17d12..1b26c59 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -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");
 	}
-- 
2.6.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH 1/5] drm/i915: Handle automated test requests for short pulse hpd
@ 2016-04-21  8:40 Shubhangi Shrivastava
  2016-04-21  8:40 ` [PATCH 2/5] drm/i915: Read test values for lane_count and link_rate Shubhangi Shrivastava
  0 siblings, 1 reply; 10+ messages in thread
From: Shubhangi Shrivastava @ 2016-04-21  8:40 UTC (permalink / raw)
  To: intel-gfx; +Cc: Shubhangi Shrivastava

This patch adds support for automated test requests during
short pulse handling in gen platforms.

Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 8b88161..2a14603 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4109,7 +4109,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;
@@ -4121,6 +4122,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");
@@ -4293,7 +4299,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");
 	}
@@ -4647,7 +4653,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");
 	}
-- 
2.6.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-05-02  9:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25  8:24 [PATCH 1/5] drm/i915: Handle automated test requests for short pulse hpd Shubhangi Shrivastava
2016-04-25  8:24 ` [PATCH 2/5] drm/i915: Read test values for lane_count and link_rate Shubhangi Shrivastava
2016-04-26  4:09   ` Navare, Manasi D
2016-05-02  9:08     ` Shubhangi Shrivastava
2016-05-02  9:16       ` Thulasimani, Sivakumar
2016-04-25  8:24 ` [PATCH 3/5] drm/i915: Cleanup panel IRQ handling Shubhangi Shrivastava
2016-04-25  8:24 ` [PATCH 4/5] drm/i915: Extract test reply to separate function Shubhangi Shrivastava
2016-04-25  8:24 ` [PATCH 5/5] drm/i915: Delay acknowledging of link training for ATR Shubhangi Shrivastava
2016-04-25 10:21 ` ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915: Handle automated test requests for short pulse hpd Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2016-04-21  8:40 [PATCH 1/5] " Shubhangi Shrivastava
2016-04-21  8:40 ` [PATCH 2/5] drm/i915: Read test values for lane_count and link_rate Shubhangi Shrivastava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox