From: Ben Widawsky Subject: Re: [PATCH 08/11] drm/i915/context: extend contexts to execbuffer2 Date: Mon, 5 Mar 2012 19:18:12 +0100 Message-ID: <20120305191812.52152ee4@bwidawsk.net> References: <1329253758-24943-1-git-send-email-ben@bwidawsk.net> <1329253758-24943-9-git-send-email-ben@bwidawsk.net> <871upvett7.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1726956681==" Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 727229E797 for ; Mon, 5 Mar 2012 10:19:34 -0800 (PST) In-Reply-To: <871upvett7.fsf@eliezer.anholt.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: Eric Anholt Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1726956681== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/o5IBoTV2y1IqaZ16dU/hGQU"; protocol="application/pgp-signature" --Sig_/o5IBoTV2y1IqaZ16dU/hGQU Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 15 Feb 2012 12:16:20 -0800 Eric Anholt wrote: > On Tue, 14 Feb 2012 22:09:15 +0100, Ben Widawsky wrote: > > Extend the flag parameter to support the context id (from the create > > IOCTL) so that userspace can associate a context with the batchbuffer. > >=20 > > Signed-off-by: Ben Widawsky >=20 > > @@ -1270,6 +1272,14 @@ i915_gem_do_execbuffer(struct drm_device *dev, v= oid *data, > > =20 > > exec_start =3D batch_obj->gtt_offset + args->batch_start_offset; > > exec_len =3D args->batch_len; > > + > > + if (ring->last_context) { > > + context =3D i915_get_context(file, ctx_id); >=20 > Add code here to handle context =3D=3D NULL and erroring out, since > i915_switch_context() just BUG_ONs. >=20 > > + ret =3D i915_switch_context(ring, context, &seqno); > > + if (ret) > > + goto err; > > + } > > + Nice catch. This was the result of a last minute code change (context was already found prior to this function in the original code). Fixed. --Sig_/o5IBoTV2y1IqaZ16dU/hGQU Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJPVQNkAAoJEL9nTIiJEj0pb/AIAMS7fS0xLO547XISjsYwj3Mx ccgOXWAj6H9NtfvzcXs39SnLSNmaDQnZoQuubP8yyBeUjRJemwcoOJQo6J3jgv4E FfbuXyydLaknvALG0kmyppZywGAmG17rk1t8QVuFWaCn3Rcri4nbJivgbDG0WeGW vwEWcWKUf6qrGJLy0aCXWfL4v/sdq0PejP+he42Jq7BAuhoGkXYuz6S92ZusFjx5 jhaJZPBdgJgZ/fu/dohT/Q9MmLawXCyakt1WEe88nCBmgco/t6qY+aU3aYicE8Hx alb1DmB9vbfwxxIYHLdjs1I67/2BCdI3Z7UxxN3rTFfmoirNFoGf0JEGBziHrqY= =23Ak -----END PGP SIGNATURE----- --Sig_/o5IBoTV2y1IqaZ16dU/hGQU-- --===============1726956681== 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 --===============1726956681==--