Commit 1d39f281 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Rename intel_engine_cs.exec_id to uabi_id

We want to refer to the index of the engine consistently throughout the
userspace ABI. We already have such an index through the execbuffer
engine specifier, that needs to be able to refer to each engine
specifically, so rename it the index to uabi_id to reflect its
generality beyond execbuf.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170411124306.15448-1-chris@chris-wilson.co.uk
parent b8400f01
...@@ -1166,8 +1166,8 @@ static bool check_cmd(const struct intel_engine_cs *engine, ...@@ -1166,8 +1166,8 @@ static bool check_cmd(const struct intel_engine_cs *engine,
find_reg(engine, is_master, reg_addr); find_reg(engine, is_master, reg_addr);
if (!reg) { if (!reg) {
DRM_DEBUG_DRIVER("CMD: Rejected register 0x%08X in command: 0x%08X (exec_id=%d)\n", DRM_DEBUG_DRIVER("CMD: Rejected register 0x%08X in command: 0x%08X (%s)\n",
reg_addr, *cmd, engine->exec_id); reg_addr, *cmd, engine->name);
return false; return false;
} }
...@@ -1222,11 +1222,11 @@ static bool check_cmd(const struct intel_engine_cs *engine, ...@@ -1222,11 +1222,11 @@ static bool check_cmd(const struct intel_engine_cs *engine,
desc->bits[i].mask; desc->bits[i].mask;
if (dword != desc->bits[i].expected) { if (dword != desc->bits[i].expected) {
DRM_DEBUG_DRIVER("CMD: Rejected command 0x%08X for bitmask 0x%08X (exp=0x%08X act=0x%08X) (exec_id=%d)\n", DRM_DEBUG_DRIVER("CMD: Rejected command 0x%08X for bitmask 0x%08X (exp=0x%08X act=0x%08X) (%s)\n",
*cmd, *cmd,
desc->bits[i].mask, desc->bits[i].mask,
desc->bits[i].expected, desc->bits[i].expected,
dword, engine->exec_id); dword, engine->name);
return false; return false;
} }
} }
......
...@@ -3996,7 +3996,7 @@ __busy_set_if_active(const struct dma_fence *fence, ...@@ -3996,7 +3996,7 @@ __busy_set_if_active(const struct dma_fence *fence,
if (i915_gem_request_completed(rq)) if (i915_gem_request_completed(rq))
return 0; return 0;
return flag(rq->engine->exec_id); return flag(rq->engine->uabi_id);
} }
static __always_inline unsigned int static __always_inline unsigned int
......
...@@ -57,7 +57,7 @@ static const struct engine_class_info intel_engine_classes[] = { ...@@ -57,7 +57,7 @@ static const struct engine_class_info intel_engine_classes[] = {
struct engine_info { struct engine_info {
unsigned int hw_id; unsigned int hw_id;
unsigned int exec_id; unsigned int uabi_id;
u8 class; u8 class;
u8 instance; u8 instance;
u32 mmio_base; u32 mmio_base;
...@@ -67,7 +67,7 @@ struct engine_info { ...@@ -67,7 +67,7 @@ struct engine_info {
static const struct engine_info intel_engines[] = { static const struct engine_info intel_engines[] = {
[RCS] = { [RCS] = {
.hw_id = RCS_HW, .hw_id = RCS_HW,
.exec_id = I915_EXEC_RENDER, .uabi_id = I915_EXEC_RENDER,
.class = RENDER_CLASS, .class = RENDER_CLASS,
.instance = 0, .instance = 0,
.mmio_base = RENDER_RING_BASE, .mmio_base = RENDER_RING_BASE,
...@@ -75,7 +75,7 @@ static const struct engine_info intel_engines[] = { ...@@ -75,7 +75,7 @@ static const struct engine_info intel_engines[] = {
}, },
[BCS] = { [BCS] = {
.hw_id = BCS_HW, .hw_id = BCS_HW,
.exec_id = I915_EXEC_BLT, .uabi_id = I915_EXEC_BLT,
.class = COPY_ENGINE_CLASS, .class = COPY_ENGINE_CLASS,
.instance = 0, .instance = 0,
.mmio_base = BLT_RING_BASE, .mmio_base = BLT_RING_BASE,
...@@ -83,7 +83,7 @@ static const struct engine_info intel_engines[] = { ...@@ -83,7 +83,7 @@ static const struct engine_info intel_engines[] = {
}, },
[VCS] = { [VCS] = {
.hw_id = VCS_HW, .hw_id = VCS_HW,
.exec_id = I915_EXEC_BSD, .uabi_id = I915_EXEC_BSD,
.class = VIDEO_DECODE_CLASS, .class = VIDEO_DECODE_CLASS,
.instance = 0, .instance = 0,
.mmio_base = GEN6_BSD_RING_BASE, .mmio_base = GEN6_BSD_RING_BASE,
...@@ -91,7 +91,7 @@ static const struct engine_info intel_engines[] = { ...@@ -91,7 +91,7 @@ static const struct engine_info intel_engines[] = {
}, },
[VCS2] = { [VCS2] = {
.hw_id = VCS2_HW, .hw_id = VCS2_HW,
.exec_id = I915_EXEC_BSD, .uabi_id = I915_EXEC_BSD,
.class = VIDEO_DECODE_CLASS, .class = VIDEO_DECODE_CLASS,
.instance = 1, .instance = 1,
.mmio_base = GEN8_BSD2_RING_BASE, .mmio_base = GEN8_BSD2_RING_BASE,
...@@ -99,7 +99,7 @@ static const struct engine_info intel_engines[] = { ...@@ -99,7 +99,7 @@ static const struct engine_info intel_engines[] = {
}, },
[VECS] = { [VECS] = {
.hw_id = VECS_HW, .hw_id = VECS_HW,
.exec_id = I915_EXEC_VEBOX, .uabi_id = I915_EXEC_VEBOX,
.class = VIDEO_ENHANCEMENT_CLASS, .class = VIDEO_ENHANCEMENT_CLASS,
.instance = 0, .instance = 0,
.mmio_base = VEBOX_RING_BASE, .mmio_base = VEBOX_RING_BASE,
...@@ -128,7 +128,7 @@ intel_engine_setup(struct drm_i915_private *dev_priv, ...@@ -128,7 +128,7 @@ intel_engine_setup(struct drm_i915_private *dev_priv,
WARN_ON(snprintf(engine->name, sizeof(engine->name), "%s%u", WARN_ON(snprintf(engine->name, sizeof(engine->name), "%s%u",
class_info->name, info->instance) >= class_info->name, info->instance) >=
sizeof(engine->name)); sizeof(engine->name));
engine->exec_id = info->exec_id; engine->uabi_id = info->uabi_id;
engine->hw_id = engine->guc_id = info->hw_id; engine->hw_id = engine->guc_id = info->hw_id;
engine->mmio_base = info->mmio_base; engine->mmio_base = info->mmio_base;
engine->irq_shift = info->irq_shift; engine->irq_shift = info->irq_shift;
......
...@@ -193,7 +193,7 @@ struct intel_engine_cs { ...@@ -193,7 +193,7 @@ struct intel_engine_cs {
struct drm_i915_private *i915; struct drm_i915_private *i915;
char name[INTEL_ENGINE_CS_MAX_NAME]; char name[INTEL_ENGINE_CS_MAX_NAME];
enum intel_engine_id id; enum intel_engine_id id;
unsigned int exec_id; unsigned int uabi_id;
unsigned int hw_id; unsigned int hw_id;
u8 class; u8 class;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment