All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Subject: [PATCH 5/5] drm/i915: Delay acknowledging of link training for ATR
Date: Mon, 25 Apr 2016 13:54:30 +0530	[thread overview]
Message-ID: <1461572670-32421-5-git-send-email-shubhangi.shrivastava@intel.com> (raw)
In-Reply-To: <1461572670-32421-1-git-send-email-shubhangi.shrivastava@intel.com>

Automated test request will wait for ack or nak before proceeding.
Acknowledging them ahead of time is not always good especially for
link training related requests. Scenarios where we need to do
full detection it is likely that the new detect might not read the
automated request since we have alreay ack'ed the request. So
send the ack response only when performing link training with the
given parameters.

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               | 10 ++++++----
 drivers/gpu/drm/i915/intel_dp_link_training.c |  3 +++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 77882ac..7a0da43 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4130,7 +4130,7 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp,
 	case DP_TEST_LINK_TRAINING:
 		DRM_DEBUG_KMS("LINK_TRAINING test requested\n");
 		intel_dp->compliance_test_type = DP_TEST_LINK_TRAINING;
-		response = intel_dp_autotest_link_training(intel_dp);
+		intel_dp_autotest_link_training(intel_dp);
 		break;
 	case DP_TEST_LINK_VIDEO_PATTERN:
 		DRM_DEBUG_KMS("TEST_PATTERN test requested\n");
@@ -4153,9 +4153,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp,
 	}
 
 update_status:
-	status = intel_dp_write_test_reply(intel_dp, response);
-	if (status <= 0)
-		DRM_DEBUG_KMS("Could not write test response to sink\n");
+	if (intel_dp->compliance_test_type != DP_TEST_LINK_TRAINING) {
+		status = intel_dp_write_test_reply(intel_dp, response);
+		if (status <= 0)
+			DRM_DEBUG_KMS("Could not write test response to sink\n");
+	}
 }
 
 static int
diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c
index 0b8eefc..54df07a 100644
--- a/drivers/gpu/drm/i915/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/intel_dp_link_training.c
@@ -120,6 +120,9 @@ intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
 	intel_dp_compute_rate(intel_dp, intel_dp->link_rate,
 			      &link_bw, &rate_select);
 
+	if (intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING)
+		intel_dp_write_test_reply(intel_dp, DP_TEST_ACK);
+
 	/* Write the link configuration data */
 	link_config[0] = link_bw;
 	link_config[1] = intel_dp->lane_count;
-- 
2.6.1

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

  parent reply	other threads:[~2016-04-25  8:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Shubhangi Shrivastava [this message]
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 5/5] drm/i915: Delay acknowledging of link training for ATR Shubhangi Shrivastava

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461572670-32421-5-git-send-email-shubhangi.shrivastava@intel.com \
    --to=shubhangi.shrivastava@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.