]> Pileus Git - ~andy/linux/commitdiff
drm/msm: workaround for missing irq
authorRob Clark <robdclark@gmail.com>
Wed, 11 Sep 2013 21:14:30 +0000 (17:14 -0400)
committerRob Clark <robdclark@gmail.com>
Wed, 11 Sep 2013 21:37:48 +0000 (17:37 -0400)
Occasionally we seem to miss an IRQ from the ME (microengine).  I'm not
entirely sure the root cause, but for now we can unwedge things by
retiring from the hangcheck timer.

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gpu.c

index 10cc44324166e33b6305bbc27ec4365e01d913dc..7ddcfbebb1f2c07af30ae963b020b3295b2c291e 100644 (file)
@@ -230,6 +230,8 @@ static void hangcheck_timer_reset(struct msm_gpu *gpu)
 static void hangcheck_handler(unsigned long data)
 {
        struct msm_gpu *gpu = (struct msm_gpu *)data;
+       struct drm_device *dev = gpu->dev;
+       struct msm_drm_private *priv = dev->dev_private;
        uint32_t fence = gpu->funcs->last_fence(gpu);
 
        if (fence != gpu->hangcheck_fence) {
@@ -237,8 +239,6 @@ static void hangcheck_handler(unsigned long data)
                gpu->hangcheck_fence = fence;
        } else if (fence < gpu->submitted_fence) {
                /* no progress and not done.. hung! */
-               struct drm_device *dev = gpu->dev;
-               struct msm_drm_private *priv = dev->dev_private;
                gpu->hangcheck_fence = fence;
                dev_err(dev->dev, "%s: hangcheck detected gpu lockup!\n",
                                gpu->name);
@@ -252,6 +252,9 @@ static void hangcheck_handler(unsigned long data)
        /* if still more pending work, reset the hangcheck timer: */
        if (gpu->submitted_fence > gpu->hangcheck_fence)
                hangcheck_timer_reset(gpu);
+
+       /* workaround for missing irq: */
+       queue_work(priv->wq, &gpu->retire_work);
 }
 
 /*