From: Eric Anholt Subject: Re: [RFC PATCH 00/11] i915 HW context support Date: Thu, 16 Feb 2012 10:57:57 -0800 Message-ID: <878vk21u8a.fsf@eliezer.anholt.net> References: <1329253758-24943-1-git-send-email-ben@bwidawsk.net> <87sjibdefx.fsf@eliezer.anholt.net> <20120216130414.008f1d8e@bwidawsk.net> <20120216132142.50c130e6@bwidawsk.net> <20120216145859.66d79fd8@bwidawsk.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1798486259==" Return-path: In-Reply-To: <20120216145859.66d79fd8@bwidawsk.net> 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: Ben Widawsky Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1798486259== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Thu, 16 Feb 2012 14:58:59 +0100, Ben Widawsky wrote: > On Thu, 16 Feb 2012 13:21:42 +0100 > Ben Widawsky wrote: >=20 > > On Thu, 16 Feb 2012 13:04:14 +0100 > > Ben Widawsky wrote: > >=20 > > > On Wed, 15 Feb 2012 12:33:38 -0800 > > > Eric Anholt wrote: > > >=20 > > > > On Tue, 14 Feb 2012 22:09:07 +0100, Ben Widawsky = wrote: > > > > > These patches are a heavily revised version of the patches I wrot= e over > > > > > a year ago. These patches have passed basic tests on SNB, and IVB= , and > > > > > older versions worked on ILK. In theory, context support should = work > > > > > all the way back to Gen4, but I haven't tested it. Also since I s= uspect > > > > > ILK may be unstable, so the code has it disabled for now. > > > > >=20 > > > > > HW contexts provide a way for the GPU to save an restore certain = state > > > > > in between batchbuffer boundaries. Typically, GPU clients must re= -emit > > > > > the entire state every time they run because the client does not = know > > > > > what has been destroyed since the last time. With these patches t= he > > > > > driver will emit special instructions to do this on behalf of the= client > > > > > if it has registered a context, and included that with the batchb= uffer. > > > >=20 > > > > These patches look pretty solid. In particular, the API > > > > (create/destroy/context id in execbuf) looks like just what we want= for > > > > Mesa. I'll try to get around to testing it out soon (I'm poking at= some > > > > performance stuff currently where this might become relevant soon). > > >=20 > > > I've just started noticing GPU hangs with Ken's test mesa branch on > > > nexuiz with vsync, full 13x7 and max effects. It seems to work fine= =20 > > > with variations like windowed, lower detail, etc. Although it looks > > > weird on IVB, I cannot reproduce the hangs there. Also, I'd never see= n=20 > > > the hangs before this morning, and I'm not sure what has changed. So= =20 > > > FYI, you may want to start out with IVB (unless you want to help me=20 > > > figure out what is broken on SNB :-) > > >=20 > > > I've not tried very hard, but so far it only seems to occur when doing > > > context switches, however MI_SET_CONTEXT is nowhere in the error stat= e. > >=20 > > Seems like sandybridge + fullscreen nexuiz is the exact fail combo. >=20 > So here was part of Ken's patch > - brw->state.dirty.brw |=3D BRW_NEW_CONTEXT | BRW_NEW_BATCH; > + if (intel->hw_ctx =3D=3D NULL) > + brw->state.dirty.brw |=3D BRW_NEW_CONTEXT; > + > + brw->state.dirty.brw |=3D BRW_NEW_BATCH; >=20 >=20 > If I go back to normal and use contexts, but also set BRW_NEW_CONTEXT, I > don't get hangs. So it sounds like some part of the state isn't being > saved or restored properly. Still trying to figure out what changed to > make it break. Likely. The *idea* behind CONTEXT vs BATCH was that you could just turn the CONTEXT flagging off, but since there was no effective difference it's totally untested until now. > As a side note, IVB has weird artifacts which I thought were just > because I was using an experimental mesa, but now think it's likely the > same cause. Maybe you can figure out what isn't be saved or restored > based on seeing IVB? IVB weird rendering in nexuiz appears to be related to some failure in the FS codegen. I think. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk89UbUACgkQHUdvYGzw6vfilgCff+2QHi35eJiorY4cDl3pppfU 3S0AnicxLVCh8dBEjO5UJCbwVrDlBQHR =qMT8 -----END PGP SIGNATURE----- --=-=-=-- --===============1798486259== 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 --===============1798486259==--