diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-04 07:25:08 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-25 12:23:50 -0400 |
commit | e9808edd98679680804dfbc42c5ee8f1aa91f617 (patch) | |
tree | 5c5538b47f12b16de8faf3809479aebe76c67692 /drivers/gpu/drm/i915/i915_gem.c | |
parent | c0c7babc48c4f6943ed3070d04630ea3ac9272ee (diff) |
drm/i915: Return a mask of the active rings in the high word of busy_ioctl
The intention is to help select which engine to use for copies with
interoperating clients - such as a GL client making a request to the X
server to perform a SwapBuffers, which may require copying from the
active GL back buffer to the X front buffer.
We choose to report a mask of the active rings to future proof the
interface against any changes which may allow for the object to reside
upon multiple rings.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: bikeshed away the write ring mask and add the explanation
Chris sent in a follow-up mail why we decided to use masks.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 5c4657a54f97..4be096068b35 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3400,6 +3400,10 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, | |||
3400 | ret = i915_gem_object_flush_active(obj); | 3400 | ret = i915_gem_object_flush_active(obj); |
3401 | 3401 | ||
3402 | args->busy = obj->active; | 3402 | args->busy = obj->active; |
3403 | if (obj->ring) { | ||
3404 | BUILD_BUG_ON(I915_NUM_RINGS > 16); | ||
3405 | args->busy |= intel_ring_flag(obj->ring) << 16; | ||
3406 | } | ||
3403 | 3407 | ||
3404 | drm_gem_object_unreference(&obj->base); | 3408 | drm_gem_object_unreference(&obj->base); |
3405 | unlock: | 3409 | unlock: |