From patchwork Thu Dec 13 16:09:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 1875381 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id D8D3FDF23A for ; Thu, 13 Dec 2012 16:11:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AFFDEE67CD for ; Thu, 13 Dec 2012 08:11:11 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A79CE68D2 for ; Thu, 13 Dec 2012 08:09:14 -0800 (PST) Received: by mail-we0-f177.google.com with SMTP id x48so957998wey.36 for ; Thu, 13 Dec 2012 08:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=su8gE+MnJ8L2yC+psFP4xN+GEj44r+ERP6nuRNb3OV4=; b=RKvcW8pyttMXWGbNqCAYgPM50Gw5vmT6AeeDlhc7Z1P45MxsrKr/yfwZAeYlmHpFKc KEC5Ppho19H/V6teMDS4JtWu+xg/L+SGpvgyb63XIyvelaSOSgETXUl7rw2+Cq0nGlRK sel9eSlWKAI1lFFJrW1eNkMhHHbB5E5ZefMmeUvBvepiJoaRI/XP2chOlHGV4to0yN/3 iyxsf/LVA/vHmHxXhQzdDqF5G5+vH+yw3fo1ocGR6NFltLx4XFxls7X3IpCNhKszPyJB NN1xBl6v+wWYr/gjhniD5fJwpHJf9Q2xIHjU4ipWNBZKR4Nz3ZG0R9UqLISuShWSE3sJ XAfA== Received: by 10.194.86.40 with SMTP id m8mr9297855wjz.24.1355414953533; Thu, 13 Dec 2012 08:09:13 -0800 (PST) Received: from localhost.localdomain ([83.217.123.106]) by mx.google.com with ESMTPS id d9sm8649072wiw.0.2012.12.13.08.09.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Dec 2012 08:09:12 -0800 (PST) From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Thu, 13 Dec 2012 16:09:01 +0000 Message-Id: <1355414944-1494-3-git-send-email-damien.lespiau@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1355414944-1494-1-git-send-email-damien.lespiau@gmail.com> References: <1355414944-1494-1-git-send-email-damien.lespiau@gmail.com> Subject: [Intel-gfx] [PATCH 3/6] drm/i915/dp: Read the HPD status before trying to read the DPCD X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Damien Lespiau Just like: Author: Damien Lespiau Date: Wed Dec 12 19:37:22 2012 +0000 drm/i915/hdmi: Read the HPD status before trying to read the EDID But this time for DiplayPort. v2: Adapt to the ibx_ name change and don't add commit hash (Chris Wilson, Jani Nikula) Reviewed-by: Jani Nikula Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index b2130bc..19a0d89 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2248,6 +2248,8 @@ static enum drm_connector_status ironlake_dp_detect(struct intel_dp *intel_dp) { struct drm_device *dev = intel_dp_to_dev(intel_dp); + struct drm_i915_private *dev_priv = dev->dev_private; + struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); enum drm_connector_status status; /* Can't disconnect eDP, but you can close the lid... */ @@ -2258,6 +2260,9 @@ ironlake_dp_detect(struct intel_dp *intel_dp) return status; } + if (!ibx_digital_port_connected(dev_priv, intel_dig_port)) + return connector_status_disconnected; + return intel_dp_detect_dpcd(intel_dp); }