From: Eric Anholt Subject: Re: [PATCH 08/11] drm/i915/context: extend contexts to execbuffer2 Date: Wed, 15 Feb 2012 12:16:20 -0800 Message-ID: <871upvett7.fsf@eliezer.anholt.net> References: <1329253758-24943-1-git-send-email-ben@bwidawsk.net> <1329253758-24943-9-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0256781812==" Return-path: In-Reply-To: <1329253758-24943-9-git-send-email-ben@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: intel-gfx@lists.freedesktop.org Cc: Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org --===============0256781812== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable 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 > @@ -1270,6 +1272,14 @@ i915_gem_do_execbuffer(struct drm_device *dev, voi= d *data, >=20=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); Add code here to handle context =3D=3D NULL and erroring out, since i915_switch_context() just BUG_ONs. > + ret =3D i915_switch_context(ring, context, &seqno); > + if (ret) > + goto err; > + } > + --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk88EpQACgkQHUdvYGzw6vfsswCePxmRNSCxEre47AGdNl97k/It ntQAnR4cKxRA1XHgYZit27QPnoL72Zg8 =M91M -----END PGP SIGNATURE----- --=-=-=-- --===============0256781812== 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 --===============0256781812==--