From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Wire up port A aux channel Date: Thu, 7 Nov 2013 15:59:13 +0200 Message-ID: <20131107135913.GR5986@intel.com> References: <20131107132050.GN5986@intel.com> <1383832195-17065-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 754D3EED86 for ; Thu, 7 Nov 2013 05:59:17 -0800 (PST) Content-Disposition: inline In-Reply-To: <1383832195-17065-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Daniel Vetter Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Thu, Nov 07, 2013 at 02:49:55PM +0100, Daniel Vetter wrote: > Useful for dp aux to work better. Also stop enabling the port A > hotplug event - eDP panels are expected to fire that interupt and > we're not really ready to deal with them. This is consistent with how > we handle port A on ilk-hsw. > = > The more important bit is that we must delay the enabling of hotplug > interrupts until all the encoders are fully set up. But we need irq > support earlier than that, hence hotplug interrupts can only be > enabled in the ->hpd_irq_setup callback. > = > v2: Drop the _HOTPLUG, it isn't (Ville). > = > Cc: Ville Syrj=E4l=E4 > Signed-off-by: Daniel Vetter Reviewed-by: Ville Syrj=E4l=E4 > --- > drivers/gpu/drm/i915/i915_irq.c | 19 +++++++++++++++++-- > drivers/gpu/drm/i915/i915_reg.h | 3 ++- > 2 files changed, 19 insertions(+), 3 deletions(-) > = > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_= irq.c > index e1bfc85d1789..9304ce3e4649 100644 > --- a/drivers/gpu/drm/i915/i915_irq.c > +++ b/drivers/gpu/drm/i915/i915_irq.c > @@ -1778,6 +1778,21 @@ static irqreturn_t gen8_irq_handler(int irq, void = *arg) > } > } > = > + if (master_ctl & GEN8_DE_PORT_IRQ) { > + tmp =3D I915_READ(GEN8_DE_PORT_IIR); > + if (tmp & GEN8_AUX_CHANNEL_A) > + dp_aux_irq_handler(dev); > + else if (tmp) > + DRM_ERROR("Unexpected DE Port interrupt\n"); > + else > + DRM_ERROR("The master control interrupt lied (DE PORT)!\n"); > + > + if (tmp) { > + I915_WRITE(GEN8_DE_PORT_IIR, tmp); > + ret =3D IRQ_HANDLED; > + } > + } > + > for_each_pipe(pipe) { > uint32_t pipe_iir; > = > @@ -2883,8 +2898,8 @@ static void gen8_de_irq_postinstall(struct drm_i915= _private *dev_priv) > } > POSTING_READ(GEN8_DE_PIPE_ISR(0)); > = > - I915_WRITE(GEN8_DE_PORT_IMR, ~_PORT_DP_A_HOTPLUG); > - I915_WRITE(GEN8_DE_PORT_IER, _PORT_DP_A_HOTPLUG); > + I915_WRITE(GEN8_DE_PORT_IMR, ~GEN8_AUX_CHANNEL_A); > + I915_WRITE(GEN8_DE_PORT_IER, GEN8_AUX_CHANNEL_A); > POSTING_READ(GEN8_DE_PORT_IER); > } > = > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_= reg.h > index 9e7588345017..fe8cb4cc0296 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -4073,7 +4073,8 @@ > #define GEN8_DE_PORT_IMR 0x44444 > #define GEN8_DE_PORT_IIR 0x44448 > #define GEN8_DE_PORT_IER 0x4444c > -#define _PORT_DP_A_HOTPLUG (1 << 3) > +#define GEN8_PORT_DP_A_HOTPLUG (1 << 3) > +#define GEN8_AUX_CHANNEL_A (1 << 0) > = > #define GEN8_DE_MISC_ISR 0x44460 > #define GEN8_DE_MISC_IMR 0x44464 > -- = > 1.8.4.rc3 -- = Ville Syrj=E4l=E4 Intel OTC