summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson2010-09-26 23:47:46 +0200
committerChris Wilson2010-09-26 23:50:36 +0200
commitced270fa893735363f74bf96e0a8a05ec330d04d (patch)
tree3037b69b31358ee18ecd30758f6a4e4c79c809cc /drivers/gpu/drm/i915/i915_gem.c
parentdrm/i915: fix debugging compilation error from previous commit (diff)
downloadkernel-qcow2-linux-ced270fa893735363f74bf96e0a8a05ec330d04d.tar.gz
kernel-qcow2-linux-ced270fa893735363f74bf96e0a8a05ec330d04d.tar.xz
kernel-qcow2-linux-ced270fa893735363f74bf96e0a8a05ec330d04d.zip
drm/i915: Ensure that the mode change flushing is currently uninterruptible
Introduced by 48b956c5, I had thought I had already fixed this. Oh well. Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 78282edc02ca..1025508e5916 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2858,10 +2858,17 @@ i915_gem_object_set_to_display_plane(struct drm_gem_object *obj,
if (obj_priv->gtt_space == NULL)
return -EINVAL;
- ret = i915_gem_object_flush_gpu_write_domain(obj, pipelined);
+ ret = i915_gem_object_flush_gpu_write_domain(obj, true);
if (ret)
return ret;
+ /* Currently, we are always called from an non-interruptible context. */
+ if (!pipelined) {
+ ret = i915_gem_object_wait_rendering(obj, false);
+ if (ret)
+ return ret;
+ }
+
i915_gem_object_flush_cpu_write_domain(obj);
old_read_domains = obj->read_domains;