]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Decouple execbuf uAPI from internal implementation
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 15 Jan 2016 15:12:50 +0000 (15:12 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 21 Jan 2016 10:55:44 +0000 (10:55 +0000)
commit07dfa5497ec38a27fc939ae02fc116333eea9e8f
tree03f880cd80a81a438eea1002fa58bae2e0cc2e1c
parent77db8f5c7494133efa044a842ead349665e85fd2
drm/i915: Decouple execbuf uAPI from internal implementation

At the moment execbuf ring selection is fully coupled to
internal ring ids which is not a good thing on its own.

This dependency is also spread between two source files and
not spelled out at either side which makes it hidden and
fragile.

This patch decouples this dependency by introducing an explicit
translation table of execbuf uAPI to ring id close to the only
call site (i915_gem_do_execbuffer).

This way we are free to change driver internal implementation
details without breaking userspace. All state relating to the
uAPI is now contained in, or next to, i915_gem_do_execbuffer.

As a side benefit, this patch decreases the compiled size
of i915_gem_do_execbuffer.

v2: Extract ring selection into eb_select_ring. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1452870770-13981-1-git-send-email-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h