From patchwork Wed Oct 28 05:27:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sonika.jindal@intel.com X-Patchwork-Id: 7506471 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 60A519F327 for ; Wed, 28 Oct 2015 05:27:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6448020821 for ; Wed, 28 Oct 2015 05:27:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 106FB2082B for ; Wed, 28 Oct 2015 05:27:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 345536E4D9; Tue, 27 Oct 2015 22:27:14 -0700 (PDT) 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 993166E4D9 for ; Tue, 27 Oct 2015 22:27:12 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 27 Oct 2015 22:27:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,208,1444719600"; d="scan'208";a="821127734" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 27 Oct 2015 22:27:11 -0700 Received: from bgsmsx105.gar.corp.intel.com (10.223.43.197) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Oct 2015 22:27:11 -0700 Received: from bgsmsx104.gar.corp.intel.com ([169.254.5.87]) by BGSMSX105.gar.corp.intel.com ([169.254.3.62]) with mapi id 14.03.0248.002; Wed, 28 Oct 2015 10:57:08 +0530 From: "Jindal, Sonika" To: "Shrivastava, Shubhangi" , "intel-gfx@lists.freedesktop.org" Thread-Topic: [Intel-gfx] [PATCH 1/2] drm/i915: Cleanup test data during long/short hotplug Thread-Index: AQHRBmIwc88ej/f34Ui9X0rj0VAEbp6AdSCw Date: Wed, 28 Oct 2015 05:27:08 +0000 Message-ID: <000C66961D35964B9714611E548C10AD0C2FCFF3@BGSMSX104.gar.corp.intel.com> References: <1444814809-21749-1-git-send-email-shubhangi.shrivastava@intel.com> <1444814809-21749-2-git-send-email-shubhangi.shrivastava@intel.com> In-Reply-To: <1444814809-21749-2-git-send-email-shubhangi.shrivastava@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Cc: "Shrivastava, Shubhangi" Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Cleanup test data during long/short hotplug 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.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 For the edid read test, if we are capturing i2c_nack_count and i2c_defer_count, it will be better if you move the resetting of these variable just before the edid read. Also, please add some comment why we need to reset compliance_test_* at two places. Regards, Sonika -----Original Message----- From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Shubhangi Shrivastava Sent: Wednesday, October 14, 2015 2:57 PM To: intel-gfx@lists.freedesktop.org Cc: Shrivastava, Shubhangi Subject: [Intel-gfx] [PATCH 1/2] drm/i915: Cleanup test data during long/short hotplug Automated test data that is updated when a test is requested is not cleared till next automated test request is recevied which can cause various problems. This patch fixes this by clearing this during the next short pulse and on hot unplug. For example, when TEST_LINK_TRAINING is requested it is updated to appropriate variable inside intel_dp_handle_test_request but is also cleared only inside the same function. if the next short pulse does not have the AUTOMATED_TEST_REQUEST bits set the variable will not be cleared resulting in carrying incorrect test status in local variables. Signed-off-by: Sivakumar Thulasimani Signed-off-by: Shubhangi Shrivastava --- drivers/gpu/drm/i915/intel_dp.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex)); + intel_dp->compliance_test_active = 0; + intel_dp->compliance_test_type = 0; + intel_dp->compliance_test_data = 0; + if (!intel_encoder->base.crtc) return; @@ -4817,8 +4814,16 @@ intel_dp_detect(struct drm_connector *connector, bool force) status = ironlake_dp_detect(intel_dp); else status = g4x_dp_detect(intel_dp); - if (status != connector_status_connected) + if (status != connector_status_connected) { + intel_dp->compliance_test_active = 0; + intel_dp->compliance_test_type = 0; + intel_dp->compliance_test_data = 0; + + intel_dp->aux.i2c_nack_count = 0; + intel_dp->aux.i2c_defer_count = 0; + goto out; + } intel_dp_probe_oui(intel_dp); -- 2.6.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 18bcfbe..7bc75ef 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4317,13 +4317,6 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) uint8_t rxdata = 0; int status = 0; - intel_dp->compliance_test_active = 0; - intel_dp->compliance_test_type = 0; - intel_dp->compliance_test_data = 0; - - intel_dp->aux.i2c_nack_count = 0; - intel_dp->aux.i2c_defer_count = 0; - status = drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_REQUEST, &rxdata, 1); if (status <= 0) { DRM_DEBUG_KMS("Could not read test request from sink\n"); @@ -4439,6 +4432,10 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)