diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-20 05:17:36 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-22 04:34:40 -0500 |
commit | 5dce5b9387a06eb9301fa1cede07922a5a4d7a29 (patch) | |
tree | d09048bfeb1c2a6fe73f3822482eda4da2d620ae /drivers/gpu/drm/i915/intel_drv.h | |
parent | 2e82a7203182d0883d0f9450d40ad6e1c6578ad9 (diff) |
drm/i915: Wait for completion of pending flips when starved of fences
On older generations (gen2, gen3) the GPU requires fences for many
operations, such as blits. The display hardware also requires fences for
scanouts and this leads to a situation where an arbitrary number of
fences may be pinned by old scanouts following a pageflip but before we
have executed the unpin workqueue. This is unpredictable by userspace
and leads to random EDEADLK when submitting an otherwise benign
execbuffer. However, we can detect when we have an outstanding flip and
so cause userspace to wait upon their completion before finally
declaring that the system is starved of fences. This is really no worse
than forcing the GPU to stall waiting for older execbuffer to retire and
release their fences before we can reallocate them for the next
execbuffer.
v2: move the test for a pending fb unpin to a common routine for
later reuse during eviction
Reported-and-tested-by: dimon@gmx.net
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jon Bloomfield <jon.bloomfield@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 8754db9e3d52..fbfaaba5cc3b 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -626,6 +626,7 @@ void intel_ddi_get_config(struct intel_encoder *encoder, | |||
626 | 626 | ||
627 | /* intel_display.c */ | 627 | /* intel_display.c */ |
628 | const char *intel_output_name(int output); | 628 | const char *intel_output_name(int output); |
629 | bool intel_has_pending_fb_unpin(struct drm_device *dev); | ||
629 | int intel_pch_rawclk(struct drm_device *dev); | 630 | int intel_pch_rawclk(struct drm_device *dev); |
630 | void intel_mark_busy(struct drm_device *dev); | 631 | void intel_mark_busy(struct drm_device *dev); |
631 | void intel_mark_fb_busy(struct drm_i915_gem_object *obj, | 632 | void intel_mark_fb_busy(struct drm_i915_gem_object *obj, |