From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH] intel: non-blocking mmaps on the cheap Date: Thu, 6 Oct 2011 22:56:14 +0000 Message-ID: <20111006225614.GA16304@cloud01> References: <1316734033-17228-1-git-send-email-ben@bwidawsk.net> <1316734033-17228-3-git-send-email-ben@bwidawsk.net> <87obxthmay.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0121955333==" 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 2AD3F9E761 for ; Thu, 6 Oct 2011 15:52:29 -0700 (PDT) In-Reply-To: <87obxthmay.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: Daniel Vetter , intel-gfx@lists.freedesktop.org, "Kilarski, Bernard R" List-Id: intel-gfx@lists.freedesktop.org --===============0121955333== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 06, 2011 at 01:55:49PM -0700, Eric Anholt wrote: > On Thu, 22 Sep 2011 16:27:11 -0700, Ben Widawsky wrote: > > +/** > > + * unmap an object in the non-blocking mode > > + */ > > +int drm_intel_gem_bo_unmap_nonblocking(drm_intel_bo *bo) > > +{ > > + drm_intel_bufmgr_gem *bufmgr_gem =3D (drm_intel_bufmgr_gem *) bo->buf= mgr; > > + int ret =3D 0; > > + > > + if (bo =3D=3D NULL) > > + return 0; > > + > > + pthread_mutex_lock(&bufmgr_gem->lock); > > + bo->virtual =3D NULL; > > + pthread_mutex_unlock(&bufmgr_gem->lock); > > + > > + return ret; >=20 > You dereffed bo before checking for NULL, so the compiler will just drop > that NULL check. I realize this is copy'n'paste from bo_unmap_gtt, but > I don't see why this new copy of bo_unmap_gtt exists anyway. >=20 My original patch did not have the extra unmap, but since we had an unmap f= or gtt and non-gtt case, Danvet complains that it wasn't symmetric. I honestly care so little about what we decide for this, I'd like you two to fight it out. Ben --jI8keyz6grp/JLjh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJOjjIOAAoJEL9nTIiJEj0puywIAJTHZd1Y5MARH7On9OR/KwEv 3Og59PxjQX45eZ7ANf3QnxHwRU0MJx/pdPkLOmkRlG+v4r3OzJOWQ5GGUxpjMQkz wmjxD9XUt8YSl8id6DcTLEjQitCn7u90/zshppekXjsayUw/ChYSppLon7NodVgF k1U7tC2ybbg7NpXcEY0bj/e8q/C5LGnTFUK2K8KM3uFaxoUuuYy0XFW+ORLPvEog cWKZjFiac+0yf/GWq2Sp33qdJzGsXw/Yi9+GXIx0xuq9r13q5Zo20cfVLsSAKvxV rGhyOp2P3W5HCpXjZ0zQkU/Q7y/KWjpmrYZrsrFUlTEesh1w5mdq8L7XOKfB5lo= =ODpp -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh-- --===============0121955333== 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 --===============0121955333==--