From patchwork Mon Apr 25 08:24:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhangi Shrivastava X-Patchwork-Id: 8924161 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8E882BF29F for ; Mon, 25 Apr 2016 08:22:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAC4620165 for ; Mon, 25 Apr 2016 08:22:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BFEC720166 for ; Mon, 25 Apr 2016 08:22:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 804586E51C; Mon, 25 Apr 2016 08:21:54 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id E4F3D88157 for ; Mon, 25 Apr 2016 08:21:24 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 25 Apr 2016 01:21:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,532,1455004800"; d="scan'208";a="952257123" Received: from shubhangi-desktop.iind.intel.com ([10.223.25.115]) by fmsmga001.fm.intel.com with ESMTP; 25 Apr 2016 01:21:20 -0700 From: Shubhangi Shrivastava To: intel-gfx@lists.freedesktop.org Date: Mon, 25 Apr 2016 13:54:30 +0530 Message-Id: <1461572670-32421-5-git-send-email-shubhangi.shrivastava@intel.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1461572670-32421-1-git-send-email-shubhangi.shrivastava@intel.com> References: <1461572670-32421-1-git-send-email-shubhangi.shrivastava@intel.com> Cc: Shubhangi Shrivastava Subject: [Intel-gfx] [PATCH 5/5] drm/i915: Delay acknowledging of link training for ATR X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Shubhangi Shrivastava --- 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;