From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v2 1/7] drm/i915: Refactor gmch hpd irq handling Date: Tue, 1 Apr 2014 10:15:33 +0200 Message-ID: <20140401081533.GI22327@phenom.ffwll.local> References: <20140331154928.GD7314@nuc-i3427.alporthouse.com> <1396338876-31475-1-git-send-email-ville.syrjala@linux.intel.com> <20140401081156.GF7314@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B86A6E510 for ; Tue, 1 Apr 2014 01:15:38 -0700 (PDT) Received: by mail-wi0-f181.google.com with SMTP id hm4so4619371wib.8 for ; Tue, 01 Apr 2014 01:15:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140401081156.GF7314@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Apr 01, 2014 at 09:11:56AM +0100, Chris Wilson wrote: > On Tue, Apr 01, 2014 at 10:54:36AM +0300, ville.syrjala@linux.intel.com w= rote: > > From: Ville Syrj=E4l=E4 > > = > > Pull all the gmch platform hotplug interrupt handling into one > > function. > > = > > v2: Move the IIR check to the caller > > s/drm_i915_private_t/struct drm_i915_private/ > > = > > Signed-off-by: Ville Syrj=E4l=E4 > = > With the addition of the comment before the posting-read, > Reviewed-by: Chris Wilson > = > > --- > > drivers/gpu/drm/i915/i915_irq.c | 69 ++++++++++++++++++---------------= -------- > > 1 file changed, 30 insertions(+), 39 deletions(-) > > = > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i91= 5_irq.c > > index 0858189..361e9b3 100644 > > --- a/drivers/gpu/drm/i915/i915_irq.c > > +++ b/drivers/gpu/drm/i915/i915_irq.c > > @@ -1647,6 +1647,29 @@ static void valleyview_pipestat_irq_handler(stru= ct drm_device *dev, u32 iir) > > gmbus_irq_handler(dev); > > } > > = > > +static void i9xx_hpd_irq_handler(struct drm_device *dev) > > +{ > > + struct drm_i915_private *dev_priv =3D dev->dev_private; > > + u32 hotplug_status =3D I915_READ(PORT_HOTPLUG_STAT); > > + > > + if (IS_G4X(dev)) { > > + u32 hotplug_trigger =3D hotplug_status & HOTPLUG_INT_STATUS_G4X; > > + > > + intel_hpd_irq_handler(dev, hotplug_trigger, hpd_status_g4x); > > + } else { > > + u32 hotplug_trigger =3D hotplug_status & HOTPLUG_INT_STATUS_I915; > > + > > + intel_hpd_irq_handler(dev, hotplug_trigger, hpd_status_i915); > > + } > > + > > + if ((IS_G4X(dev) || IS_VALLEYVIEW(dev)) && > > + hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X) > > + dp_aux_irq_handler(dev); > > + > > + I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); > = > /* Make sure hotplug status is cleared before we clear IIR, > * or else we may miss hotplug events. > */ Done&merged, thanks for the patch&review. -Daniel > > + POSTING_READ(PORT_HOTPLUG_STAT); > > +} > -Chris > = > -- = > Chris Wilson, Intel Open Source Technology Centre > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch