From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>, Daniel Vetter <daniel@ffwll.ch>
Cc: Greg KH <gregkh@linuxfoundation.org>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH] drm/i915: Android sync points for i915 v2
Date: Tue, 05 Aug 2014 17:00:46 +0200 [thread overview]
Message-ID: <53E0F19E.8050201@canonical.com> (raw)
In-Reply-To: <20140805075928.44d6a316@jbarnes-desktop>
op 05-08-14 16:59, Jesse Barnes schreef:
> On Tue, 5 Aug 2014 09:44:00 +0200
> Daniel Vetter <daniel@ffwll.ch> wrote:
>
>> On Tue, Aug 5, 2014 at 1:18 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
>>> +#define DRM_IOCTL_I915_GEM_FENCE DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_FENCE, struct drm_i915_gem_fence)
>>>
>>> /* Allow drivers to submit batchbuffers directly to hardware, relying
>>> * on the security mechanisms provided by hardware.
>>> @@ -1066,4 +1068,25 @@ struct drm_i915_gem_userptr {
>>> __u32 handle;
>>> };
>>>
>>> +/**
>>> + * drm_i915_gem_fence - create a fence
>>> + * @fd: fd for fence
>>> + * @ctx_id: context ID for fence
>>> + * @flags: flags for operation
>>> + *
>>> + * Creates a fence in @fd and returns it to the caller. This fd can be
>>> + * passed around between processes as any other fd, and can be poll'd
>>> + * and read for status.
>>> + *
>>> + * RETURNS:
>>> + * A valid fd in the @fd field or an errno on error.
>>> + */
>>> +struct drm_i915_gem_fence {
>>> + __s32 fd;
>>> + __u32 ctx_id;
>>> + __u32 flags;
>>> + __u32 pad;
>>> + char name[32];
>>> +};
>>> +
>> This doesn't really look like the interface I'd expected. Imo we just
>> need to add a flag to execbuf so that userspace can tell the kernel to
>> create a fence for that execbuf, and switch one of the leftover rsvd
>> fields to __s32 as an outparam for the fd.
> Given that I've got a new execbuf coming too, I just wanted to keep
> them separate. Any compelling reason to try to wedge it into execbuf?
It's the right place to put it, and you can get the fence for nearly free because you just created it.
~Maarten
next prev parent reply other threads:[~2014-08-05 15:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 18:58 [RFC] Sync points/fences for i915 Jesse Barnes
2014-07-31 18:58 ` [PATCH] drm/i915: Android sync points " Jesse Barnes
2014-08-01 6:23 ` Maarten Lankhorst
2014-08-04 23:18 ` [PATCH] drm/i915: Android sync points for i915 v2 Jesse Barnes
2014-08-05 7:44 ` Daniel Vetter
2014-08-05 14:59 ` Jesse Barnes
2014-08-05 15:00 ` Maarten Lankhorst [this message]
2014-08-05 15:08 ` Daniel Vetter
2014-08-05 16:05 ` Jesse Barnes
2014-08-05 16:08 ` Daniel Vetter
2014-08-05 16:32 ` Jesse Barnes
2014-08-05 17:09 ` Jesse Barnes
2014-08-05 17:43 ` Daniel Vetter
2014-08-05 17:52 ` Jesse Barnes
2014-08-05 8:09 ` Maarten Lankhorst
2014-08-05 15:03 ` Jesse Barnes
2014-08-05 15:09 ` Daniel Vetter
2014-08-01 9:04 ` [PATCH] drm/i915: Android sync points for i915 Tvrtko Ursulin
2014-08-01 16:02 ` Jesse Barnes
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=53E0F19E.8050201@canonical.com \
--to=maarten.lankhorst@canonical.com \
--cc=daniel@ffwll.ch \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.org \
--cc=john.stultz@linaro.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