From 00f167dfd698af43f0ffcca97ce5677df91c2012 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Sun, 17 Nov 2013 14:29:46 +0000 Subject: drm/i915: Only clear write-domains after a successful wait-seqno From Chris Wilson 5ca3f11716a0487110745824ad5282bf4c00d211 in ubuntu 3.8 daa13e1ca587bc773c1aae415ed1af6554117bd4 in mainline linux https://bugs.freedesktop.org/show_bug.cgi?id=66163 --- sys/dev/pci/drm/i915/i915_gem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c index 0501e7296b4..453b7b7661b 100644 --- a/sys/dev/pci/drm/i915/i915_gem.c +++ b/sys/dev/pci/drm/i915/i915_gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem.c,v 1.41 2013/11/02 22:58:10 kettenis Exp $ */ +/* $OpenBSD: i915_gem.c,v 1.42 2013/11/17 14:29:45 jsg Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth * @@ -1161,7 +1161,8 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj, /* Manually manage the write flush as we may have not yet * retired the buffer. */ - if (obj->last_write_seqno && + if (ret == 0 && + obj->last_write_seqno && i915_seqno_passed(seqno, obj->last_write_seqno)) { obj->last_write_seqno = 0; obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; -- cgit v1.2.3