From: Chris Wilson <chris@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] intel: Mark bo's exported to prime as not reusable
Date: Fri, 14 Sep 2012 22:03:41 +0100 [thread overview]
Message-ID: <6c3329$62mgcc@orsmga002.jf.intel.com> (raw)
In-Reply-To: <CAOeoa-cnpHU1-rm8+DjJhRCoWej8LH8z-Bf_gKgmT-LSQh74cg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]
On Fri, 14 Sep 2012 17:01:18 -0400, Kristian Høgsberg <krh@bitplanet.net> wrote:
> On Fri, Sep 14, 2012 at 4:40 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > On Fri, 14 Sep 2012 16:37:53 -0400, Kristian Høgsberg <krh@bitplanet.net> wrote:
> >> It's the same situation as flink and we need take the same pre-cautions.
> >> ---
> >> intel/intel_bufmgr_gem.c | 8 +++++++-
> >> 1 file changed, 7 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
> >> index 3bcc849..92c0444 100644
> >> --- a/intel/intel_bufmgr_gem.c
> >> +++ b/intel/intel_bufmgr_gem.c
> >> @@ -2472,8 +2472,14 @@ drm_intel_bo_gem_export_to_prime(drm_intel_bo *bo, int *prime_fd)
> >> {
> >> drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
> >> drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
> >> + int ret;
> >>
> >> - return drmPrimeHandleToFD(bufmgr_gem->fd, bo_gem->gem_handle, DRM_CLOEXEC, prime_fd);
> >> + ret = drmPrimeHandleToFD(bufmgr_gem->fd, bo_gem->gem_handle,
> >> + DRM_CLOEXEC, prime_fd);
> >> + if (ret == 0)
> >> + bo_gem->reusable = false;
> >
> > Now that you mention it...
> > To be consistent with libdrm_intel, we should return -errno on error; so
> > rephrasing this as
> > if (ret)
> > return -errno;
> >
> > bo_gem->reusable = false;
> > return 0;
> >
> > would work better.
>
> Argh, yes, I copy and pasted that from drm_intel_gem_bo_flink() but
> edited it away later... with that change, can I add your reviewed-by
> and commit?
Yes,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-09-14 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 20:37 [PATCH] intel: Mark bo's exported to prime as not reusable Kristian Høgsberg
2012-09-14 20:40 ` Chris Wilson
2012-09-14 21:01 ` Kristian Høgsberg
2012-09-14 21:03 ` Chris Wilson [this message]
2012-09-15 2:12 ` Kristian Høgsberg
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='6c3329$62mgcc@orsmga002.jf.intel.com' \
--to=chris@chris-wilson.co.uk \
--cc=dri-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.