[Intel-gfx] i915: hotplug events gone wild
ykzhao
yakui.zhao at intel.com
Mon Feb 1 02:03:48 CET 2010
On Sun, 2010-01-31 at 19:49 +0800, Andrew Lutomirski wrote:
> On Sat, Jan 30, 2010 at 10:02 PM, Andrew Lutomirski <luto at mit.edu> wrote:
> > [I posted this bug earlier with a terrible description as "resume
> > lagginess and other problems." Here it is again with a better bug
> > report.]
> >
> > I'm running 2.6.33-rc5 (plus some wireless-testing stuff, but I've
> > seen this problem on a variety of 2.6.33-rc? kernels). Every now and
> > then, X starts to lag badly on my GM45 laptop. When this happens, I
> > usually see a bunch of events in udevmonitor. Running with
> > drm.debug=0x02 (and the patch below to keep the log under control), I
> > see tons of messages like this:
>
> I triggered it again. This time, the messages looked like
> (drm.debug=3 from a different VT to avoid all the hotplug stuff
> running off the screen, and running a different debugging hack -- see
> all the way at the bottom):
>
> [ 1324.285057] [drm:i915_driver_irq_handler], hotplug event received,
> stat 0x28200000, mask 0x38000800
>From the stat value it seems that this is related with the HDMI hotplug.
Will you please confirm whether th HDMI is pluged/unpluged in your test?
Thanks
Yakui.
> [ 1324.285086] [drm:i915_hotplug_work_func], i915_hotplug_work_func
> [ 1324.285093] [drm:drm_sysfs_hotplug_event], generating hotplug event
> [ 1324.290356] [drm:i915_driver_irq_handler], hotplug event received,
> stat 0x28200000, mask 0x38000800
> [ 1324.290388] [drm:i915_hotplug_work_func], i915_hotplug_work_func
> [ 1324.290395] [drm:drm_sysfs_hotplug_event], generating hotplug event
> [ 1324.296512] [drm:i915_driver_irq_handler], hotplug event received,
> stat 0x28200000, mask 0x38000800
> [ 1324.296536] [drm:i915_hotplug_work_func], i915_hotplug_work_func
> [ 1324.296543] [drm:drm_sysfs_hotplug_event], generating hotplug event
> [ 1324.307078] [drm:i915_driver_irq_handler], hotplug event received,
> stat 0x20200000, mask 0x38000800
> [ 1324.307104] [drm:i915_hotplug_work_func], i915_hotplug_work_func
> [ 1324.307111] [drm:drm_sysfs_hotplug_event], generating hotplug event
>
> From X, I got:
>
> [ 1174.177474] [drm:drm_ioctl], pid=1889, cmd=0x40046460, nr=0x60, dev
> 0xe200, auth=1
> [ 1174.177480] [drm:drm_ioctl], pid=1889, cmd=0x400c645f, nr=0x5f, dev
> 0xe200, auth=1
> [ 1174.177485] [drm:drm_ioctl], pid=1889, cmd=0x400c645f, nr=0x5f, dev
> 0xe200, auth=1
> [ 1174.177492] [drm:drm_ioctl], pid=1889, cmd=0x40046460, nr=0x60, dev
> 0xe200, auth=1
> [ 1174.177497] [drm:drm_ioctl], pid=1889, cmd=0x40046460, nr=0x60, dev
> 0xe200, auth=1
> [ 1174.177522] [drm:drm_ioctl], pid=1889, cmd=0xc0086457, nr=0x57, dev
> 0xe200, auth=1
> [ 1174.177528] [drm:drm_ioctl], pid=1889, cmd=0xc00c6466, nr=0x66, dev
> 0xe200, auth=1
>
> Using intel_reg_write to set PORT_HOTPLUG_EN to 0 silenced udevmonitor
> but did *not* make X stop lagging.
>
> Restarting X helped for a few minutes, but then the bug triggered again.
>
> --Andy
>
> The patch was:
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 0c67924..d0977ea 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1618,7 +1618,7 @@ i915_add_request(struct drm_device *dev, struct
> drm_file *file_priv,
> OUT_RING(MI_USER_INTERRUPT);
> ADVANCE_LP_RING();
>
> - DRM_DEBUG_DRIVER("%d\n", seqno);
> + //DRM_DEBUG_DRIVER("%d\n", seqno);
>
> request->seqno = seqno;
> request->emitted_jiffies = jiffies;
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 89a071a..0cda630 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -266,6 +266,7 @@ static void i915_hotplug_work_func(struct work_struct *work)
> }
> }
> /* Just fire off a uevent and let userspace tell us what to do */
> + DRM_DEBUG_DRIVER("i915_hotplug_work_func\n");
> drm_sysfs_hotplug_event(dev);
> }
>
> @@ -616,8 +617,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
> (iir & I915_DISPLAY_PORT_INTERRUPT)) {
> u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT);
>
> - DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n",
> - hotplug_status);
> + DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x, mask 0x%08x\n",
> + hotplug_status, dev_priv->hotplug_supported_mask);
> if (hotplug_status & dev_priv->hotplug_supported_mask)
> queue_work(dev_priv->wq,
> &dev_priv->hotplug_work);
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 45da78e..f2040bf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3759,7 +3759,7 @@ static void intel_gpu_idle_timer(unsigned long arg)
> struct drm_device *dev = (struct drm_device *)arg;
> drm_i915_private_t *dev_priv = dev->dev_private;
>
> - DRM_DEBUG_DRIVER("idle timer fired, downclocking\n");
> + //DRM_DEBUG_DRIVER("idle timer fired, downclocking\n");
>
> dev_priv->busy = false;
>
> @@ -3774,7 +3774,7 @@ static void intel_crtc_idle_timer(unsigned long arg)
> struct drm_crtc *crtc = &intel_crtc->base;
> drm_i915_private_t *dev_priv = crtc->dev->dev_private;
>
> - DRM_DEBUG_DRIVER("idle timer fired, downclocking\n");
> + //DRM_DEBUG_DRIVER("idle timer fired, downclocking\n");
>
> intel_crtc->busy = false;
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list