aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-25 05:19:17 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-25 07:23:12 -0400
commit30dbf0c07ff4e3e21b827e2a9d6ff7eb34458819 (patch)
tree273083a7e570ce8ac43a327451afd4172645af7b /drivers/gpu/drm/i915/i915_drv.h
parentf787a5f59e1b0e320a6b0a37e9a2e306551d1e40 (diff)
drm/i915: Adjust hangcheck EIO semantics
Owain Ainsworth reported an issue between the interaction of the hangcheck and userspace immediately (and permanently) falling back to s/w rasterisation. In order to break the mutex and begin resetting the GPU, we must abort the current operation (usually within the wait) and climb sufficiently far back up the call chain to drop the mutex. In his implementation, Owain has a loop within the ioctl handler to detect the hang and then sleep until the error handler has run. I've chosen to return to userspace and report an EAGAIN which should trigger the userspace ioctl handler to repeat the call (simply because it felt less invasive...). Before hitting a wedged GPU, we then wait upon completion of the error handler. Reported-by: Owain G. Ainsworth <zerooa@googlemail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 2611e85bdd3d..f2ff258cdfd5 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -363,6 +363,7 @@ typedef struct drm_i915_private {
363 spinlock_t error_lock; 363 spinlock_t error_lock;
364 struct drm_i915_error_state *first_error; 364 struct drm_i915_error_state *first_error;
365 struct work_struct error_work; 365 struct work_struct error_work;
366 struct completion error_completion;
366 struct workqueue_struct *wq; 367 struct workqueue_struct *wq;
367 368
368 /* Display functions */ 369 /* Display functions */
@@ -957,6 +958,7 @@ extern void i915_mem_takedown(struct mem_block **heap);
957extern void i915_mem_release(struct drm_device * dev, 958extern void i915_mem_release(struct drm_device * dev,
958 struct drm_file *file_priv, struct mem_block *heap); 959 struct drm_file *file_priv, struct mem_block *heap);
959/* i915_gem.c */ 960/* i915_gem.c */
961int i915_gem_check_is_wedged(struct drm_device *dev);
960int i915_gem_init_ioctl(struct drm_device *dev, void *data, 962int i915_gem_init_ioctl(struct drm_device *dev, void *data,
961 struct drm_file *file_priv); 963 struct drm_file *file_priv);
962int i915_gem_create_ioctl(struct drm_device *dev, void *data, 964int i915_gem_create_ioctl(struct drm_device *dev, void *data,