From patchwork Thu Apr 7 10:33:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhangi Shrivastava X-Patchwork-Id: 8770901 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 C676BC0553 for ; Thu, 7 Apr 2016 10:30:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0167201EC for ; Thu, 7 Apr 2016 10:30:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 42B20201C7 for ; Thu, 7 Apr 2016 10:30:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9E8F6E96D; Thu, 7 Apr 2016 10:30:06 +0000 (UTC) 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 815C96E96D for ; Thu, 7 Apr 2016 10:30:05 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 07 Apr 2016 03:30:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,449,1455004800"; d="scan'208";a="940224883" Received: from shubhangi-desktop.iind.intel.com ([10.223.25.115]) by fmsmga001.fm.intel.com with ESMTP; 07 Apr 2016 03:30:03 -0700 From: Shubhangi Shrivastava To: intel-gfx@lists.freedesktop.org Date: Thu, 7 Apr 2016 16:03:18 +0530 Message-Id: <1460025198-19359-1-git-send-email-shubhangi.shrivastava@intel.com> X-Mailer: git-send-email 2.6.1 Cc: Shubhangi Shrivastava Subject: [Intel-gfx] [PATCH] drm/i915: Fixing eDP detection on certain platforms 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 Sink count was read for eDP as well as DP. But in some cases the sink count for eDP is received as zero, as against the expected non zero value. This is seen in: commit 30d9aa4265fe4b2b28239934770b2c2d59858df3 Author: Shubhangi Shrivastava Date: Wed Mar 30 18:05:25 2016 +0530 drm/i915: Read sink_count dpcd always This patch fixes the issue by removing the sink count check for both DP and eDP and allows it to be checked only for DP. Fixes: 30d9aa4265fe ("drm/i915: Read sink_count dpcd always") Signed-off-by: Sivakumar Thulasimani Signed-off-by: Shubhangi Shrivastava Reviewed-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_dp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index da0c3d2..bd5287b 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -3806,7 +3806,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) * downstream port information. So, an early return here saves * time from performing other operations which are not required. */ - if (!intel_dp->sink_count) + if (!is_edp(intel_dp) && !intel_dp->sink_count) return false; /* Check if the panel supports PSR */ @@ -4345,7 +4345,8 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp) /* If we're HPD-aware, SINK_COUNT changes dynamically */ if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 && - intel_dp->downstream_ports[0] & DP_DS_PORT_HPD) { + intel_dp->downstream_ports[0] & DP_DS_PORT_HPD && + !is_edp(intel_dp)) { return intel_dp->sink_count ? connector_status_connected : connector_status_disconnected;