From: Eric Anholt Subject: Re: [PATCH 26/43] drm/i915: Only clear the GPU domains upon a successful finish Date: Fri, 16 Dec 2011 12:07:41 -0800 Message-ID: <878vmcxotu.fsf@eliezer.anholt.net> References: <1323867460-5486-1-git-send-email-daniel.vetter@ffwll.ch> <1323867460-5486-26-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1248670002==" Return-path: In-Reply-To: <1323867460-5486-26-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter , Keith Packard Cc: intel-gfx , stable@kernel.org List-Id: intel-gfx@lists.freedesktop.org --===============1248670002== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 14 Dec 2011 13:57:23 +0100, Daniel Vetter = wrote: > From: Chris Wilson >=20 > By clearing the GPU read domains before waiting upon the buffer, we run > the risk of the wait being interrupted and the domains prematurely > cleared. The next time we attempt to wait upon the buffer (after > userspace handles the signal), we believe that the buffer is idle and so > skip the wait. >=20 > There are a number of bugs across all generations which show signs of an > overly haste reuse of active buffers. I think this patch is better as: diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_ge= m.c index 683ff1e..cb5ff10 100644 =2D-- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3126,9 +3126,6 @@ i915_gem_object_finish_gpu(struct drm_i915_gem_object= *obj) { int ret; =20 =2D if ((obj->base.read_domains & I915_GEM_GPU_DOMAINS) =3D=3D 0) =2D return 0; =2D if (obj->base.write_domain & I915_GEM_GPU_DOMAINS) { ret =3D i915_gem_flush_ring(obj->ring, 0, obj->base.write_d= omain); if (ret) While I think it was valid other than in this function, the implication between (read_domains & I915_GEM_GPU_DOMAINS) <-> obj->active is less clear than just relying on i915_gem_object_wait_rendering()'s use of obj->active. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk7rpQ0ACgkQHUdvYGzw6vf4dgCdFBLFhD+N2vd0H35Q+UHxsHaC HlUAni+2xUpext7QZYJWDeFNxBY2Rouv =8iLx -----END PGP SIGNATURE----- --=-=-=-- --===============1248670002== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1248670002==--