dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Dave Airlie <airlied@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH] intel: add prime interface for getting/setting a prime bo.
Date: Sun, 15 Jul 2012 11:10:22 +0100	[thread overview]
Message-ID: <1342347038_863@CP5-2952> (raw)
In-Reply-To: <1342311766-30930-1-git-send-email-airlied@gmail.com>

On Sun, 15 Jul 2012 10:22:46 +1000, Dave Airlie <airlied@gmail.com> wrote:
> This adds interfaces for the X driver to use to create a
> prime handle from a buffer, and create a bo from a handle.
> 
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
>  intel/intel_bufmgr.h     |    4 ++++
>  intel/intel_bufmgr_gem.c |   46 ++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 50 insertions(+)
> 
> diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
> index 9b3a483..bf9ad5c 100644
> --- a/intel/intel_bufmgr.h
> +++ b/intel/intel_bufmgr.h
> @@ -192,6 +192,10 @@ void drm_intel_gem_context_destroy(drm_intel_context *ctx);
>  int drm_intel_gem_bo_context_exec(drm_intel_bo *bo, drm_intel_context *ctx,
>  				  int used, unsigned int flags);
>  
> +int drm_intel_bufmgr_gem_set_bo_prime(drm_intel_bo *bo, int *prime_fd);
> +drm_intel_bo *drm_intel_bufmgr_gem_get_bo_prime(drm_intel_bufmgr *bufmgr,
> +						int prime_fd, int size);

I think

 drm_intel_bo_gem_create_for_prime(drm_intel_bufmgr *, int prime_fd, int size);
 drm_intel_bo_gem_export_to_prime(drm_intel_bo *, int *prime_fd);

are more consistent names (with an alias for drm_intel_gem_bo_flink to
drm_intel_bo_gem_export_to_name). Or possibly from_prime to be more in
keeping with from_name, except the 'from' has the semantics of taking a
copy and 'for' has the semantics  of wrapping/proxying. At least in
comparable API. However we are probably stuck with the existing
semantics derived from drm_intel_bo_gem_create_from_name().
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

      reply	other threads:[~2012-07-15 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-15  0:22 [PATCH] intel: add prime interface for getting/setting a prime bo Dave Airlie
2012-07-15 10:10 ` Chris Wilson [this message]

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=1342347038_863@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox