[Intel-gfx] [RFC] drm/i915: context support unit test
daniel at ffwll.ch
Tue Dec 28 14:36:17 PST 2010
On Sat, Dec 25, 2010 at 02:53:04PM -0800, Ben Widawsky wrote:
> I am requesting comments on the unit test for the context support I will be
> adding. Attached is the unit test. I intend to create wrappers for the create
> and destroy Ioctls in libdrm, unless someone has a better solution to reuse the
> existing API. For the time being, I plan to use the rsvd1 field in the exec2
> structure to store the context.
> In summary, you'll see two new Ioctls in this test, and one new DRM API, but
> once it's cleaned up, it will probably be 3 new Ioctls, and 3 new DRM APIs.
> Also I realize this test doesn't cover a lot of the bad cases, but that will
> be included later.
Just a few questions on the api:
- How does this tie in with the multiple ringbuffer support? Is the kernel
supposed to lazily allocate contexts for each ring as soon as userspaces
uses it on a given ring for the first time? imho the simpler approach
than adding an explicit ring arg to the ctx_create ioctl.
- (Assuming that the context stores pointers to the indirect state
objects - public docs are unclear in that matter) How do you plan to
handle bo eviction? The simplest thing is probably to bail on execbuf
in the kernel and ask userspace to reissue a complete context. Also: How
does the kernel know that evicting/moving a given bo invalidates a
certain context? Do you intend to create that connection implicitly with
i915_gem_domain_instruction or with some new reloc flag?
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48
More information about the Intel-gfx