On Thu, Oct 06, 2011 at 01:55:49PM -0700, Eric Anholt wrote:
> On Thu, 22 Sep 2011 16:27:11 -0700, Ben Widawsky <b...@bwidawsk.net> 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 = (drm_intel_bufmgr_gem *) bo->bufmgr;
> > +   int ret = 0;
> > +
> > +   if (bo == NULL)
> > +           return 0;
> > +
> > +   pthread_mutex_lock(&bufmgr_gem->lock);
> > +   bo->virtual = NULL;
> > +   pthread_mutex_unlock(&bufmgr_gem->lock);
> > +
> > +   return ret;
> 
> 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.
> 

My original patch did not have the extra unmap, but since we had an unmap for
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

Attachment: pgpKh1xUGzi2P.pgp
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to