Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ced270fa authored by Chris Wilson's avatar Chris Wilson
Browse files

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: default avatarSitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 53b2087d
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -2858,10 +2858,17 @@ i915_gem_object_set_to_display_plane(struct drm_gem_object *obj,
	if (obj_priv->gtt_space == NULL)
	if (obj_priv->gtt_space == NULL)
		return -EINVAL;
		return -EINVAL;


	ret = i915_gem_object_flush_gpu_write_domain(obj, pipelined);
	ret = i915_gem_object_flush_gpu_write_domain(obj, true);
	if (ret)
	if (ret)
		return 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);
	i915_gem_object_flush_cpu_write_domain(obj);


	old_read_domains = obj->read_domains;
	old_read_domains = obj->read_domains;