From patchwork Thu Apr 21 08:40:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhangi Shrivastava X-Patchwork-Id: 8897101 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 97187BF29F for ; Thu, 21 Apr 2016 08:37:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3B382026F for ; Thu, 21 Apr 2016 08:37:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C9CB1201FA for ; Thu, 21 Apr 2016 08:37:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A9A76EC18; Thu, 21 Apr 2016 08:37:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 771216EC18 for ; Thu, 21 Apr 2016 08:37:23 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 21 Apr 2016 01:37:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,512,1455004800"; d="scan'208";a="963355877" Received: from shubhangi-desktop.iind.intel.com ([10.223.25.115]) by fmsmga002.fm.intel.com with ESMTP; 21 Apr 2016 01:37:21 -0700 From: Shubhangi Shrivastava To: intel-gfx@lists.freedesktop.org Date: Thu, 21 Apr 2016 14:10:31 +0530 Message-Id: <1461228031-2515-5-git-send-email-shubhangi.shrivastava@intel.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1461228031-2515-1-git-send-email-shubhangi.shrivastava@intel.com> References: <1461228031-2515-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 93a29b7..41c5ae63 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4165,7 +4165,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"); @@ -4188,9 +4188,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;