]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: rename & update eb_select_ring()
authorDave Gordon <david.s.gordon@intel.com>
Wed, 20 Jul 2016 17:16:07 +0000 (18:16 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Jul 2016 08:59:46 +0000 (09:59 +0100)
commit730876dce03280f7620d12128119d8e7bef33cb2
treeb803925ac9450548d77c2fbbd24b07dc20f1f1e1
parentc5e31b3e107dfcfab51499bd61d94542d2252406
drm/i915: rename & update eb_select_ring()

'ring' is an old deprecated term for a GPU engine, so we're trying to
phase out all such terminology. eb_select_ring() not only has 'ring'
(meaning engine) in its name, but it has an ugly calling convention
whereby it returns an errno and stores a pointer-to-engine indirectly
through an output parameter. As there is only one error it ever returns
(-EINVAL), we can make it return the pointer directly, and have the
caller pass back the error code -EINVAL if the pointer result is NULL.

Thus we can replace
- ret = eb_select_ring(dev_priv, file, args, &engine);
- if (ret)
- return ret;
with
+ engine = eb_select_engine(dev_priv, file, args);
+ if (!engine)
+ return -EINVAL;
for increased clarity and maybe save a few cycles too.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1469034967-15840-4-git-send-email-david.s.gordon@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem_execbuffer.c