From patchwork Thu Aug 27 08:48:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sivakumar Thulasimani X-Patchwork-Id: 7081701 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 492D79F1C2 for ; Thu, 27 Aug 2015 08:48:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E9B9209A0 for ; Thu, 27 Aug 2015 08:47:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9A02B2099F for ; Thu, 27 Aug 2015 08:47:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C4596ECEF; Thu, 27 Aug 2015 01:47:58 -0700 (PDT) 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 D0E346ECF2 for ; Thu, 27 Aug 2015 01:47:55 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 27 Aug 2015 01:47:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,421,1437462000"; d="scan'208";a="756353477" Received: from rtshiva-desktop.iind.intel.com ([10.223.26.71]) by orsmga001.jf.intel.com with ESMTP; 27 Aug 2015 01:47:54 -0700 From: Sivakumar Thulasimani To: ville.syrjala@linux.intel.com, jani.nikula@linux.intel.com, intel-gfx@lists.freedesktop.org Date: Thu, 27 Aug 2015 14:18:29 +0530 Message-Id: <1440665312-26698-2-git-send-email-sivakumar.thulasimani@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1440665312-26698-1-git-send-email-sivakumar.thulasimani@intel.com> References: <1440665312-26698-1-git-send-email-sivakumar.thulasimani@intel.com> Subject: [Intel-gfx] [PATCH 1/4] drm/i915: read dpcd 0 - 12 & link_status always 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.6 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 From: "Thulasimani,Sivakumar" Compliance requires the driver to read dpcd register 0 to 12 and registers 0x200 to 0x205 to be read always. Current code performs dpcd read for short pulse interrupts only if the sink is enabled. This patch forces read for link status and registers 0 to 12. Signed-off-by: Sivakumar Thulasimani Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 8a66a44..76561e0 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4374,12 +4374,6 @@ intel_dp_check_link_status(struct intel_dp *intel_dp) WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex)); - if (!intel_encoder->base.crtc) - return; - - if (!to_intel_crtc(intel_encoder->base.crtc)->active) - return; - /* Try to read receiver status if the link appears to be up */ if (!intel_dp_get_link_status(intel_dp, link_status)) { return; @@ -4390,6 +4384,12 @@ intel_dp_check_link_status(struct intel_dp *intel_dp) return; } + if (!intel_encoder->base.crtc) + return; + + if (!to_intel_crtc(intel_encoder->base.crtc)->active) + return; + /* Try to read the source of the interrupt */ if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 && intel_dp_get_sink_irq(intel_dp, &sink_irq_vector)) {