From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rodrigo Vivi Subject: Re: [PATCH 6/6] drm/i915/bxt: Fix irq_port for eDP Date: Wed, 09 Sep 2015 19:24:11 +0000 Message-ID: References: <1441373176-22302-1-git-send-email-sonika.jindal@intel.com> <1441373176-22302-7-git-send-email-sonika.jindal@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2052291471==" Return-path: Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 980F96E285 for ; Wed, 9 Sep 2015 12:24:21 -0700 (PDT) Received: by ioiz6 with SMTP id z6so34403052ioi.2 for ; Wed, 09 Sep 2015 12:24:20 -0700 (PDT) In-Reply-To: <1441373176-22302-7-git-send-email-sonika.jindal@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Sonika Jindal , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============2052291471== Content-Type: multipart/alternative; boundary=001a113eacdaf31b7b051f556d87 --001a113eacdaf31b7b051f556d87 Content-Type: text/plain; charset=UTF-8 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(-) > > 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 > -- > 1.7.10.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > --001a113eacdaf31b7b051f556d87 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Nak: I don't believe we need this... Actually I believ= e we need the opposite... we need to enable HPD on port A for eDP errors ha= ndling...




On Fri, Sep 4, 2015 at 6:38 AM Sonika Jin= dal <sonika.jindal@intel.com<= /a>> wrote:
From: Durgadoss R &l= t;durgadoss.r@in= tel.com>

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 <durgadoss.r@intel.com>
---
=C2=A0drivers/gpu/drm/i915/intel_ddi.c |=C2=A0 =C2=A015 ++++++++++-----
=C2=A01 file changed, 10 insertions(+), 5 deletions(-)

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 po= rt port)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 goto err;

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 intel_dig_port->= hpd_pulse =3D intel_dp_hpd_pulse;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev_priv->hotplu= g.irq_port[port] =3D intel_dig_port;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /*
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* On BXT A0/A= 1, sw needs to activate DDIA HPD logic and
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* interrupts = to check the external panel connection.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * If eDP is connec= ted on port A, set irq_port to NULL
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * so that we do no= t assume an interrupt here as a
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * 'dig_port= 9; interrupt.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (IS_BROXTON(dev_= priv) && (INTEL_REVID(dev) < BXT_REVID_B0)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &&am= p; port =3D=3D PORT_B)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0dev_priv->hotplug.irq_port[PORT_A] =3D intel_dig_port;
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0dev_priv->hotplug.irq_port[port] =3D intel_dig_port;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (IS_BROXTON(dev)= && (INTEL_REVID(dev) < BXT_REVID_B0)) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (port =3D=3D PORT_B)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev_priv->hotplug.irq_port[PORT_A]= =3D intel_dig_port;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0else if (intel_encoder->type =3D=3D INTEL_OUTPUT_EDP)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev_priv->hotplug.irq_port[port] = =3D NULL;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* In theory we don't need the encoder->= type check, but leave it just in
--
1.7.10.4

_______________________________________________
Intel-gfx mailing list
Intel-= gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo= /intel-gfx
--001a113eacdaf31b7b051f556d87-- --===============2052291471== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============2052291471==--