From: Simon Farnsworth Subject: Re: Half-complete kernel interface for waiting on CS completion Date: Fri, 3 Feb 2012 17:00:31 +0000 Message-ID: <201202031700.34938.simon.farnsworth@onelan.co.uk> References: <1328286629-9833-1-git-send-email-simon.farnsworth@onelan.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1598183797==" Return-path: Received: from claranet-outbound-smtp03.uk.clara.net (claranet-outbound-smtp03.uk.clara.net [195.8.89.36]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EDDA9EED4 for ; Fri, 3 Feb 2012 09:00:38 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1598183797== Content-Type: multipart/signed; boundary="nextPart1952437.DIUJNyVViF"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1952437.DIUJNyVViF Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Friday 3 February 2012, Dave Airlie wrote: > On Fri, Feb 3, 2012 at 4:30 PM, Simon Farnsworth > wrote: > > As I've got the fix I need (Mesa-dev message "[PATCH] r600g: Use a fake > > reloc to sleep for fences"), I can't really justify continuing to work = on > > this, so I'm putting out what I've got, complete with known problems, in > > case someone else gets interested. > > >=20 > I just noticed today we should backport to 8.0. If you get a GPU reset > in the old model, the app can spin forever, at least it appears thats > what gnome-shell is doing here. > I didn't fix that - I simply used the fake reloc as an alternative to busy-waiting, as I didn't want to churn the code too much. r600g cannot cope with a GPU reset that occurs before the EVENT_WRITE_EOP changes a dword in the fence BO from 0 to 1. Without the fake reloc, it will busy-wait indefinitely if that happens, using sched_yield to relinquish CPU time - with the fake reloc, it will keep calling the DRM_RADEON_GEM_WAIT_IDLE ioctl in an infinite loop. It would be fairly trivial to not loop if you went down the fake reloc path (and I can code that if requested, for a v3 Mesa patch); thinking about it, I can also code it so that we break from the loop if the fake reloc stops being busy at any time. Taking these patches further is the "obvious" correct thing, though. =2D-=20 Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/ --nextPart1952437.DIUJNyVViF Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQEcBAABAgAGBQJPLBKyAAoJEIKsye9/dtRWhEQH/jfXaU9zwWuFroi2a+2JNbDM S2VFFuFvgXwt84f4sQ4+bYCxFpccI/R3eGuHwHy4e2VGiL/XbnxlLw7Ao9HY702P 3f8eyg16cx+WHztX9Sby9y1hcY9PXP7WvE4OUc8FocS+UobgZuvf9DkTtAaz/g+h z7hMpe+dyeuHjRtdBiUCSmbw9e55D3kJQlWZfS2bFLzJAqr1hQjm22X8hm5g1Rgl RicfEYLn+8ZqjtlN7NkDYs0w2IZOXQtIzZ54PcvIYBvzZYpeDLGs2hBXGgVH7dMY TzV78nDmHKJdoinwb9FuN4Sau0zegk9X8duynT/7PSTsZ/FWsfCdpTbbGCpbYZI= =nriD -----END PGP SIGNATURE----- --nextPart1952437.DIUJNyVViF-- --===============1598183797== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1598183797==--