From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Chris Wilson" <chris@chris-wilson.co.uk>,
"Kristian Høgsberg" <krh@bitplanet.net>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/i915: Add soft-pinning API for execbuffer
Date: Fri, 6 Nov 2015 09:01:09 -0800 [thread overview]
Message-ID: <563CDCD5.5060707@virtuousgeek.org> (raw)
In-Reply-To: <20151106133834.GF669@nuc-i3427.alporthouse.com>
On 11/06/2015 05:38 AM, Chris Wilson wrote:
> On Thu, Nov 05, 2015 at 10:17:56AM -0800, Jesse Barnes wrote:
>> On 11/05/2015 09:51 AM, Kristian Høgsberg wrote:
>>> On Tue, Oct 6, 2015 at 3:53 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>>>> Userspace can pass in an offset that it presumes the object is located
>>>> at. The kernel will then do its utmost to fit the object into that
>>>> location. The assumption is that userspace is handling its own object
>>>> locations (for example along with full-ppgtt) and that the kernel will
>>>> rarely have to make space for the user's requests.
>>>
>>> I know the commit message isn't documentation, but the phrase "do its
>>> utmost" makes me uncomfortable. I'd like to be explicit about what
>>> might make it fail (should only be pinned fbs in case of aliased ppgtt
>>> or userspace errors such as overlapping placements), or conversely,
>>> spell out when the flag can be expected to work (full ppgtt).
>>
>> Ooh yeah that would be good to add to the execbuf man page with the
>> softpin additions. Oh wait, we don't have a man page for execbuf?
>> Someone should write one!
>
> How about:
>
> This extends the DRM_I915_GEM_EXECBUFFER2 ioctl to do the following:
> * if the user supplies a virtual address via the execobject->offset
> *and* sets the EXEC_OBJECT_PINNED flag in execobject->flags, then
> that object is placed at that offset in the address space selected
> by the context specifier in execbuffer.
> * the location must be aligned to the GTT page size, 4096 bytes
> * as the object is placed exactly as specified, it may be used in this batch
> without relocations pointing to it
>
> It may fail to do so if:
> * EINVAL is returned if the object does not have a 4096 byte aligned
> address
> * the object conflicts with another pinned object (either pinned by
> hardware in that address space, e.g. scanouts in the aliasing ppgtt)
> or within the same batch.
> EBUSY is returned if the location is pinned by hardware
> EINVAL is returned if the location is already in use by the batch
> * EINVAL is returned if the object conflicts with its own alignment (as meets
> the hardware requirements) or if the placement of the object does not fit
> within the address space
>
> All other execbuffer errors apply.
Looks great, now we just need an existing man page in which to integrate
this additional text.
Jesse
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-11-06 17:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 10:53 [PATCH 1/3] drm: Track drm_mm nodes with an interval tree Chris Wilson
2015-10-06 10:53 ` [PATCH 2/3] drm/i915: Allow the user to pass a context to any ring Chris Wilson
2015-10-06 13:57 ` Daniel, Thomas
2015-12-02 13:42 ` Tvrtko Ursulin
2015-10-06 10:53 ` [PATCH 3/3] drm/i915: Add soft-pinning API for execbuffer Chris Wilson
2015-10-06 13:59 ` Daniel, Thomas
2015-10-21 15:07 ` Daniel Vetter
2015-10-21 15:11 ` Daniel, Thomas
2015-10-23 2:31 ` Yang, Rong R
2015-10-27 11:51 ` akash goel
2015-11-05 10:57 ` Daniel, Thomas
2015-12-02 13:28 ` Chris Wilson
2015-11-05 17:51 ` Kristian Høgsberg
2015-11-05 18:17 ` Jesse Barnes
2015-11-06 13:38 ` Chris Wilson
2015-11-06 17:01 ` Jesse Barnes [this message]
2015-11-06 23:58 ` Kristian Høgsberg
2015-10-06 11:11 ` [Intel-gfx] [PATCH 1/3] drm: Track drm_mm nodes with an interval tree Daniel Vetter
2015-10-06 11:19 ` Chris Wilson
2015-10-06 12:01 ` Daniel Vetter
2015-10-07 10:22 ` David Herrmann
2015-10-16 8:54 ` Daniel, Thomas
2015-10-16 14:26 ` [Intel-gfx] " Daniel Vetter
2015-10-21 15:11 ` Daniel Vetter
2015-10-21 15:14 ` David Herrmann
2015-10-22 8:07 ` [Intel-gfx] " Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2014-05-15 15:55 [PATCH 1/3] drm/i915: Fix obj->map_and_fenceable for ppgtt Chris Wilson
2014-05-15 15:55 ` [PATCH 3/3] drm/i915: Add soft-pinning API for execbuffer Chris Wilson
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=563CDCD5.5060707@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=krh@bitplanet.net \
/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