aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2013-09-11 17:14:30 -0400
committerRob Clark <robdclark@gmail.com>2013-09-11 17:37:48 -0400
commit6b8819c811c2a80a7e5896b4d1e2580be825d590 (patch)
treec2edc9c4c5e9ee2a19e1f0a124d72245b6c3369d /drivers/gpu
parentf816f272437f3a2be0c9254d4ab8f917950d86a0 (diff)
drm/msm: workaround for missing irq
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/msm_gpu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 10cc44324166..7ddcfbebb1f2 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -230,6 +230,8 @@ static void hangcheck_timer_reset(struct msm_gpu *gpu)
230static void hangcheck_handler(unsigned long data) 230static void hangcheck_handler(unsigned long data)
231{ 231{
232 struct msm_gpu *gpu = (struct msm_gpu *)data; 232 struct msm_gpu *gpu = (struct msm_gpu *)data;
233 struct drm_device *dev = gpu->dev;
234 struct msm_drm_private *priv = dev->dev_private;
233 uint32_t fence = gpu->funcs->last_fence(gpu); 235 uint32_t fence = gpu->funcs->last_fence(gpu);
234 236
235 if (fence != gpu->hangcheck_fence) { 237 if (fence != gpu->hangcheck_fence) {
@@ -237,8 +239,6 @@ static void hangcheck_handler(unsigned long data)
237 gpu->hangcheck_fence = fence; 239 gpu->hangcheck_fence = fence;
238 } else if (fence < gpu->submitted_fence) { 240 } else if (fence < gpu->submitted_fence) {
239 /* no progress and not done.. hung! */ 241 /* no progress and not done.. hung! */
240 struct drm_device *dev = gpu->dev;
241 struct msm_drm_private *priv = dev->dev_private;
242 gpu->hangcheck_fence = fence; 242 gpu->hangcheck_fence = fence;
243 dev_err(dev->dev, "%s: hangcheck detected gpu lockup!\n", 243 dev_err(dev->dev, "%s: hangcheck detected gpu lockup!\n",
244 gpu->name); 244 gpu->name);
@@ -252,6 +252,9 @@ static void hangcheck_handler(unsigned long data)
252 /* if still more pending work, reset the hangcheck timer: */ 252 /* if still more pending work, reset the hangcheck timer: */
253 if (gpu->submitted_fence > gpu->hangcheck_fence) 253 if (gpu->submitted_fence > gpu->hangcheck_fence)
254 hangcheck_timer_reset(gpu); 254 hangcheck_timer_reset(gpu);
255
256 /* workaround for missing irq: */
257 queue_work(priv->wq, &gpu->retire_work);
255} 258}
256 259
257/* 260/*