From: Ben Widawsky <ben@bwidawsk.net>
To: Eric Anholt <eric@anholt.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, "Kilarski,
Bernard R" <bernard.r.kilarski@intel.com>
Subject: Re: [PATCH] intel: non-blocking mmaps on the cheap
Date: Thu, 6 Oct 2011 22:56:14 +0000 [thread overview]
Message-ID: <20111006225614.GA16304@cloud01> (raw)
In-Reply-To: <87obxthmay.fsf@eliezer.anholt.net>
[-- Attachment #1.1: Type: text/plain, Size: 1054 bytes --]
On Thu, Oct 06, 2011 at 01:55:49PM -0700, Eric Anholt wrote:
> On Thu, 22 Sep 2011 16:27:11 -0700, Ben Widawsky <ben@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 #1.2: Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-10-06 22:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 23:27 [PATCH 0/4] Nonblocking maps Ben Widawsky
2011-09-22 23:27 ` [PATCH] drm/i915: IOCTL to query the cache level of a BO Ben Widawsky
2011-09-23 8:04 ` Daniel Vetter
2011-09-23 9:00 ` Chris Wilson
2011-09-22 23:27 ` [PATCH] intel: non-blocking mmaps on the cheap Ben Widawsky
2011-09-22 23:35 ` Ben Widawsky
2011-09-23 8:52 ` Daniel Vetter
2011-10-06 20:55 ` Eric Anholt
2011-10-06 22:56 ` Ben Widawsky [this message]
2011-09-22 23:27 ` [PATCH] i965: use nonblocking maps MapRangeBuffer Ben Widawsky
2011-09-23 17:15 ` Eric Anholt
2011-09-23 18:46 ` Ben Widawsky
2011-09-23 18:56 ` [Intel-gfx] " Ben Widawsky
2011-09-23 19:21 ` Ben Widawsky
2011-09-22 23:27 ` [PATCH] gpu-tools: nonblocking map test Ben Widawsky
-- strict thread matches above, loose matches on Subject: below --
2011-09-26 1:35 [PATCH 0/5 v3] Nonblocking maps Ben Widawsky
2011-09-26 1:35 ` [PATCH] intel: non-blocking mmaps on the cheap Ben Widawsky
2011-09-20 19:19 [PATCH 1/6] RFCish: write only mappings (aka non-blocking) Daniel Vetter
2011-09-21 8:19 ` [PATCH] intel: non-blocking mmaps on the cheap Daniel Vetter
2011-09-21 18:11 ` Eric Anholt
2011-09-21 19:19 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111006225614.GA16304@cloud01 \
--to=ben@bwidawsk.net \
--cc=bernard.r.kilarski@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=eric@anholt.net \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox