OSDN Git Service

drm/i915: Define an engine class enum for the uABI
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 10 Nov 2017 14:26:27 +0000 (14:26 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 10 Nov 2017 17:20:24 +0000 (17:20 +0000)
commit1803fcbca2e444f7972430c4dc1c3e98c6ee1bc9
tree9eb996fba2ac3ebb1356768d63c432fbdb90959f
parent9511ce1ce7299029acc985ce5f96a1e2e703f084
drm/i915: Define an engine class enum for the uABI

We want to be able to report back to userspace details about an engine's
class, and in return for userspace to be able to request actions
regarding certain classes of engines. To isolate the uABI from any
variations between hw generations, we define an abstract class for the
engines and internally map onto the hw.

v2: Remove MAX from the uABI; keep it internal if we need it, but don't
let userspace make the mistake of using it themselves.
v3: s/OTHER/INVALID/
  The use of OTHER is ill-defined, so remove it from the uABI as any
  future new type of engine can define a class to suit it. But keep a
  reserved value for an invalid class, so that we can always
  unambiguously express when something doesn't belong to the
  classification.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> #v2
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171110142634.10551-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.h
include/uapi/drm/i915_drm.h