From patchwork Thu Sep 10 13:07:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: durgadoss.r@intel.com X-Patchwork-Id: 7153921 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 1366C9F1D3 for ; Thu, 10 Sep 2015 13:07:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BCA120875 for ; Thu, 10 Sep 2015 13:07:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2EDB82073F for ; Thu, 10 Sep 2015 13:07:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A58C6E22B; Thu, 10 Sep 2015 06:07:36 -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 2AC5C6E164 for ; Thu, 10 Sep 2015 06:07:35 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 10 Sep 2015 06:07:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,504,1437462000"; d="scan'208";a="801617661" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga002.jf.intel.com with ESMTP; 10 Sep 2015 06:07:34 -0700 Received: from bgsmsx152.gar.corp.intel.com (10.224.48.50) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 10 Sep 2015 21:07:32 +0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.105]) by BGSMSX152.gar.corp.intel.com ([169.254.6.33]) with mapi id 14.03.0248.002; Thu, 10 Sep 2015 18:37:31 +0530 From: "R, Durgadoss" To: Rodrigo Vivi , "Jindal, Sonika" , "intel-gfx@lists.freedesktop.org" Thread-Topic: [Intel-gfx] [PATCH 6/6] drm/i915/bxt: Fix irq_port for eDP Thread-Index: AQHQ5xbmVjqXxK2HUUem0E2MglTkA540P9SAgAGBQSA= Date: Thu, 10 Sep 2015 13:07:30 +0000 Message-ID: <4D68720C2E767A4AA6A8796D42C8EB590925249B@BGSMSX101.gar.corp.intel.com> References: <1441373176-22302-1-git-send-email-sonika.jindal@intel.com> <1441373176-22302-7-git-send-email-sonika.jindal@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH 6/6] 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: , 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 Hi Rodrigo, I had to add this to get HDMI hotplug working on BXT. As you might already know, we have the HPD pins A & B swapped in BXT. And, we are using HPD_PORT_A as 'intel_encoder->hpd_pin' for HDMI on port B. Without this, When an HPD on HDMI (port B) happens, the interrupt is handled as an eDP (port A) interrupt in 'intel_hpd_irq_handler', since hpd_pin for HDMI port B is set as PIN A. Snippet: --- is_dig_port = intel_hpd_pin_to_port(i, &port) && dev_priv->hotplug.irq_port[port]; --- The issue occurs only when we have eDP + HDMI combination. MIPI + HDMI works well without this fix also. And all these workarounds, are due to pin swap in BXT A0/A1. We have this fix enclosed with that check as well. I tried to few other changes, but this one was less intrusive and easy to change (and notice the change). Kindly let us know if you have better ideas. Thanks, Durga From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Rodrigo Vivi Sent: Thursday, September 10, 2015 12:54 AM To: Jindal, Sonika; intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 6/6] drm/i915/bxt: Fix irq_port for eDP Nak: I don't believe we need this... Actually I believe we need the opposite... we need to enable HPD on port A for eDP errors handling... On Fri, Sep 4, 2015 at 6:38 AM Sonika Jindal wrote: 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. Signed-off-by: Durgadoss R ---  drivers/gpu/drm/i915/intel_ddi.c |   15 ++++++++++-----  1 file changed, 10 insertions(+), 5 deletions(-) -- 1.7.10.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 4823184..fec51df 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -3218,15 +3218,20 @@ void intel_ddi_init(struct drm_device *dev, enum port port)                         goto err;                 intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; +               dev_priv->hotplug.irq_port[port] = intel_dig_port;                 /*                  * On BXT A0/A1, sw needs to activate DDIA HPD logic and                  * interrupts to check the external panel connection. +                * If eDP is connected on port A, set irq_port to NULL +                * so that we do not assume an interrupt here as a +                * 'dig_port' interrupt.                  */ -               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; +               if (IS_BROXTON(dev) && (INTEL_REVID(dev) < BXT_REVID_B0)) { +                       if (port == PORT_B) +                               dev_priv->hotplug.irq_port[PORT_A] = intel_dig_port; +                       else if (intel_encoder->type == INTEL_OUTPUT_EDP) +                               dev_priv->hotplug.irq_port[port] = NULL; +               }         }         /* In theory we don't need the encoder->type check, but leave it just in