diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-20 04:26:13 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-05 15:30:20 -0500 |
commit | f900db4758ac251e9a9d31d32d48551cab071479 (patch) | |
tree | b4c00b6f1c2d1b7f447000ea54459fbef6f6f2c2 /drivers/gpu/drm/i915/intel_display.c | |
parent | 6f0ea9e212b36fe831f104ab2ac7582b9741600a (diff) |
drm/i915: Perform pageflip using mmio if the GPU is terminally wedged
After a hang and failed reset, we cannot use the GPU to execute the page
flip instructions. Instead we can force a synchronous mmio flip. (Later,
we can reduce the synchronicity of the mmio flip by moving some of the
delays off to a worker, like the current page flip code; see vblank
tasks.)
References: https://bugs.freedesktop.org/show_bug.cgi?id=72631
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 680f4c7bd62d..45bd176b68b5 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -8653,6 +8653,9 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, | |||
8653 | fb->pitches[0] != crtc->fb->pitches[0])) | 8653 | fb->pitches[0] != crtc->fb->pitches[0])) |
8654 | return -EINVAL; | 8654 | return -EINVAL; |
8655 | 8655 | ||
8656 | if (i915_terminally_wedged(&dev_priv->gpu_error)) | ||
8657 | goto out_hang; | ||
8658 | |||
8656 | work = kzalloc(sizeof(*work), GFP_KERNEL); | 8659 | work = kzalloc(sizeof(*work), GFP_KERNEL); |
8657 | if (work == NULL) | 8660 | if (work == NULL) |
8658 | return -ENOMEM; | 8661 | return -ENOMEM; |
@@ -8727,6 +8730,13 @@ cleanup: | |||
8727 | free_work: | 8730 | free_work: |
8728 | kfree(work); | 8731 | kfree(work); |
8729 | 8732 | ||
8733 | if (ret == -EIO) { | ||
8734 | out_hang: | ||
8735 | intel_crtc_wait_for_pending_flips(crtc); | ||
8736 | ret = intel_pipe_set_base(crtc, crtc->x, crtc->y, fb); | ||
8737 | if (ret == 0 && event) | ||
8738 | drm_send_vblank_event(dev, intel_crtc->pipe, event); | ||
8739 | } | ||
8730 | return ret; | 8740 | return ret; |
8731 | } | 8741 | } |
8732 | 8742 | ||