On ti, 2015-03-17 at 11:52 +0100, Daniel Vetter wrote: > On Tue, Mar 17, 2015 at 11:39:51AM +0200, Imre Deak wrote: > > From: Shashank Sharma <shashank.sharma@xxxxxxxxx> > > > > This patch adds a hot plug interrupt handler function for BXT. > > What this function typically does is: > > 1. Check if hot plug is enabled from hot plug control register. > > 2. Call hpd_irq_handler with appropriate trigger to detect a > > plug storm and schedule a bottom half. > > 3. Clear sticky status bits in hot plug control register.. > > > > Reviewed-by: Satheeshakrishna M <satheeshakrishna.m@xxxxxxxxx> > > Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> > > Signed-off-by: Shashank Sharma <shashank.sharma@xxxxxxxxx> > > --- > > drivers/gpu/drm/i915/i915_irq.c | 45 +++++++++++++++++++++++++++++++++++++++-- > > 1 file changed, 43 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > > index a51c00e..4a2f85b 100644 > > --- a/drivers/gpu/drm/i915/i915_irq.c > > +++ b/drivers/gpu/drm/i915/i915_irq.c > > @@ -2227,6 +2227,38 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg) > > return ret; > > } > > > > +static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status) > > +{ > > + struct drm_i915_private *dev_priv = dev->dev_private; > > + uint32_t hp_control; > > + uint32_t hp_trigger; > > + > > + /* Get the status */ > > + hp_trigger = iir_status & BXT_DE_PORT_HOTPLUG_MASK; > > + hp_control = I915_READ(BXT_HOTPLUG_CTL); > > + > > + /* Hotplug not enabled ? */ > > + if (unlikely(!(hp_control & BXT_HOTPLUG_CTL_MASK))) { > > + DRM_ERROR("Interrupt when HPD disabled\n"); > > + return; > > + } > > + > > + DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n", > > + hp_control & BXT_HOTPLUG_CTL_MASK); > > + > > + /* Check for HPD storm and schedule bottom half */ > > + intel_hpd_irq_handler(dev, hp_trigger, hp_control, hpd_bxt); > > + > > + /* > > + * Todo: Save the hot plug status for bottom half before > > + * clearing the sticky status bits, else the status will be > > + * lost. > > + */ > > This seems to be ok, but code to handle long/short pulse in > intel_hpd_irq_handler seems to be missing. Oops. Yea, that's completely missing, we need at least a new bxt_port_to_hotplug_shift(). Will follow up with this. Why always shuffling around the bits??:) > And we absolutely need that for > mst ports (I guess bxt has those?). Yea, port B and C. --Imre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx