From patchwork Tue Aug 25 11:50:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sivakumar Thulasimani X-Patchwork-Id: 7070931 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 8BE069F344 for ; Tue, 25 Aug 2015 11:50:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B96D320896 for ; Tue, 25 Aug 2015 11:50:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C8FF92088F for ; Tue, 25 Aug 2015 11:50:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 569236E228; Tue, 25 Aug 2015 04:50:55 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 84DEA6E228 for ; Tue, 25 Aug 2015 04:50:53 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 25 Aug 2015 04:50:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,745,1432623600"; d="scan'208";a="790478376" Received: from rtshiva-desktop.iind.intel.com ([10.223.26.71]) by fmsmga002.fm.intel.com with ESMTP; 25 Aug 2015 04:50:07 -0700 From: Sivakumar Thulasimani To: ville.syrjala@linux.intel.com, jani.nikula@linux.intel.com, intel-gfx@lists.freedesktop.org Date: Tue, 25 Aug 2015 17:20:37 +0530 Message-Id: <1440503438-13470-3-git-send-email-sivakumar.thulasimani@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1440503438-13470-1-git-send-email-sivakumar.thulasimani@intel.com> References: <1440503438-13470-1-git-send-email-sivakumar.thulasimani@intel.com> Subject: [Intel-gfx] [PATCH 2/3] drm/i915: Save sink_count for tracking changes to it 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.5 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" Sink count can change between short pulse hpd hence this patch adds a member variable to intel_dp so we can track any changes between short pulse interrupts. Signed-off-by: Sivakumar Thulasimani --- drivers/gpu/drm/i915/intel_dp.c | 5 ++--- drivers/gpu/drm/i915/intel_drv.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 9e4e27d..834f513 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -3898,7 +3898,6 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) struct drm_device *dev = dig_port->base.base.dev; struct drm_i915_private *dev_priv = dev->dev_private; uint8_t rev; - uint8_t reg; if (intel_dp_dpcd_read_wake(&intel_dp->aux, 0x000, intel_dp->dpcd, sizeof(intel_dp->dpcd)) < 0) @@ -3910,10 +3909,10 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) return false; /* DPCD not present */ if (intel_dp_dpcd_read_wake(&intel_dp->aux, DP_SINK_COUNT, - ®, 1) < 0) + &intel_dp->sink_count, 1) < 0) return false; - if (!DP_GET_SINK_COUNT(reg)) + if (!DP_GET_SINK_COUNT(intel_dp->sink_count)) return false; /* Check if the panel supports PSR */ diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 81b7d77..8aca5bb 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -712,6 +712,7 @@ struct intel_dp { enum hdmi_force_audio force_audio; bool limited_color_range; bool color_range_auto; + uint8_t sink_count; uint8_t dpcd[DP_RECEIVER_CAP_SIZE]; uint8_t psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE]; uint8_t downstream_ports[DP_MAX_DOWNSTREAM_PORTS];