From patchwork Mon Aug 31 09:05:32 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: 7099151 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 F40C8BEEC1 for ; Mon, 31 Aug 2015 09:16:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1724120622 for ; Mon, 31 Aug 2015 09:16:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2E1162061D for ; Mon, 31 Aug 2015 09:16:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB0B36E0B2; Mon, 31 Aug 2015 02:16: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 E96306E0B2 for ; Mon, 31 Aug 2015 02:16:53 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 31 Aug 2015 02:16:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,439,1437462000"; d="scan'208";a="758994061" Received: from sonikaji-desktop.iind.intel.com ([10.223.25.81]) by orsmga001.jf.intel.com with ESMTP; 31 Aug 2015 02:16:51 -0700 From: Sonika Jindal To: intel-gfx@lists.freedesktop.org Date: Mon, 31 Aug 2015 14:35:32 +0530 Message-Id: <1441011932-5112-1-git-send-email-sonika.jindal@intel.com> X-Mailer: git-send-email 1.7.10.4 Subject: [Intel-gfx] [PATCH] drm/i915/bxt: Fix irq_port for eDP 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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: Durgadoss R Currently, HDMI hotplug with eDP as local panel is failing because the HDMI hpd is detected as a long hpd for eDP; and is thus rightfully ignored. But, it should really be handled as an interrupt on port B for HDMI (due to BXT A1 platform having HPD pins A and B swapped). This patch sets the irq_port[PORT_A] to NULL in case eDP is on port A so that irq handler does not treat it as a 'dig_port' interrupt. v2 (Sonika): Moving the setting of irq_port for BXT WA outside so that this can be set for both hdmi or dp ports. For HDMI this is required because we get interrupts for portB on the hpd line of portA for BXT A0/A1. This issue occurred because hpd on edp was not disabled which was done as part of "drm/i915: Dont enable hpd for eDP" from the series: http://lists.freedesktop.org/archives/intel-gfx/2015-August/073266.html This patch can be squashed to : commit cf1d58833f07afbb4534b15caa3fd48baa313b2c Author: Sonika Jindal Date: Mon Aug 10 10:35:36 2015 +0530 drm/i915/bxt: WA for swapped HPD pins in A stepping Signed-off-by: Durgadoss R Signed-off-by: Sonika Jindal --- drivers/gpu/drm/i915/intel_ddi.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 56d778f..bba0cb6 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -3242,15 +3242,7 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - /* - * On BXT A0/A1, sw needs to activate DDIA HPD logic and - * interrupts to check the external panel connection. - */ - if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0) - && port == PORT_B) - dev_priv->hotplug.irq_port[PORT_A] = intel_dig_port; - else - dev_priv->hotplug.irq_port[port] = intel_dig_port; + dev_priv->hotplug.irq_port[port] = intel_dig_port; } /* In theory we don't need the encoder->type check, but leave it just in @@ -3259,6 +3251,17 @@ void intel_ddi_init(struct drm_device *dev, enum port port) if (!intel_ddi_init_hdmi_connector(intel_dig_port)) goto err; } + /* + * On BXT A0/A1, sw needs to activate DDIA HPD logic and + * interrupts to check the external panel connection. + */ + if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0)) { + if (port == PORT_B) { + dev_priv->hotplug.irq_port[PORT_A] = intel_dig_port; + intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; + } else if (intel_encoder->type == INTEL_OUTPUT_EDP) + dev_priv->hotplug.irq_port[port] = NULL; + } return;