From: Oscar Mateo <oscar.mateo@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH 1/5] drm/i915: Classify the engines in class + instance
Date: Thu, 6 Apr 2017 08:00:12 -0700 [thread overview]
Message-ID: <1491490816-26965-2-git-send-email-oscar.mateo@intel.com> (raw)
In-Reply-To: <1491490816-26965-1-git-send-email-oscar.mateo@intel.com>
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
In such a way that vcs and vcs2 are just two different instances (0 and 1)
of the same engine class (VIDEO_DECODE_CLASS).
v2: Align the instance types (Tvrtko)
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/intel_engine_cs.c | 14 ++++++++++++++
drivers/gpu/drm/i915/intel_ringbuffer.h | 10 ++++++++++
2 files changed, 24 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 854e8e0..49ca7d1 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -30,6 +30,8 @@
const char *name;
unsigned int exec_id;
unsigned int hw_id;
+ enum intel_engine_class class;
+ u8 instance;
u32 mmio_base;
unsigned irq_shift;
int (*init_legacy)(struct intel_engine_cs *engine);
@@ -39,6 +41,8 @@
.name = "rcs",
.hw_id = RCS_HW,
.exec_id = I915_EXEC_RENDER,
+ .class = RENDER_CLASS,
+ .instance = 0,
.mmio_base = RENDER_RING_BASE,
.irq_shift = GEN8_RCS_IRQ_SHIFT,
.init_execlists = logical_render_ring_init,
@@ -48,6 +52,8 @@
.name = "bcs",
.hw_id = BCS_HW,
.exec_id = I915_EXEC_BLT,
+ .class = COPY_ENGINE_CLASS,
+ .instance = 0,
.mmio_base = BLT_RING_BASE,
.irq_shift = GEN8_BCS_IRQ_SHIFT,
.init_execlists = logical_xcs_ring_init,
@@ -57,6 +63,8 @@
.name = "vcs",
.hw_id = VCS_HW,
.exec_id = I915_EXEC_BSD,
+ .class = VIDEO_DECODE_CLASS,
+ .instance = 0,
.mmio_base = GEN6_BSD_RING_BASE,
.irq_shift = GEN8_VCS1_IRQ_SHIFT,
.init_execlists = logical_xcs_ring_init,
@@ -66,6 +74,8 @@
.name = "vcs2",
.hw_id = VCS2_HW,
.exec_id = I915_EXEC_BSD,
+ .class = VIDEO_DECODE_CLASS,
+ .instance = 1,
.mmio_base = GEN8_BSD2_RING_BASE,
.irq_shift = GEN8_VCS2_IRQ_SHIFT,
.init_execlists = logical_xcs_ring_init,
@@ -75,6 +85,8 @@
.name = "vecs",
.hw_id = VECS_HW,
.exec_id = I915_EXEC_VEBOX,
+ .class = VIDEO_ENHANCEMENT_CLASS,
+ .instance = 0,
.mmio_base = VEBOX_RING_BASE,
.irq_shift = GEN8_VECS_IRQ_SHIFT,
.init_execlists = logical_xcs_ring_init,
@@ -101,6 +113,8 @@
engine->hw_id = engine->guc_id = info->hw_id;
engine->mmio_base = info->mmio_base;
engine->irq_shift = info->irq_shift;
+ engine->class = info->class;
+ engine->instance = info->instance;
/* Nothing to do here, execute in order of dependencies */
engine->schedule = NULL;
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index cbe61d3..4ab590b 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -193,6 +193,16 @@ struct intel_engine_cs {
enum intel_engine_id id;
unsigned int exec_id;
unsigned int hw_id;
+
+ enum intel_engine_class {
+ RENDER_CLASS = 0,
+ VIDEO_DECODE_CLASS = 1,
+ VIDEO_ENHANCEMENT_CLASS = 2,
+ COPY_ENGINE_CLASS = 3,
+ OTHER_CLASS = 4
+ } class;
+ u8 instance;
+
unsigned int guc_id;
u32 mmio_base;
unsigned int irq_shift;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-04-06 21:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 15:00 [PATCH 0/5] Classify the engines in class + instance (v3) Oscar Mateo
2017-04-06 15:00 ` Oscar Mateo [this message]
2017-04-07 9:45 ` [PATCH 1/5] drm/i915: Classify the engines in class + instance Michal Wajdeczko
2017-04-07 9:52 ` Chris Wilson
2017-04-06 15:00 ` [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init Oscar Mateo
2017-04-06 15:00 ` [PATCH 3/5] drm/i915: Generate the engine name based on the instance number Oscar Mateo
2017-04-07 8:12 ` Tvrtko Ursulin
2017-04-07 10:31 ` Michal Wajdeczko
2017-04-06 15:00 ` [PATCH 4/5] drm/i915: Split the engine info table in two levels, using class + instance Oscar Mateo
2017-04-07 8:14 ` Tvrtko Ursulin
2017-04-07 10:43 ` Michal Wajdeczko
2017-04-06 15:00 ` [PATCH 5/5] drm/i915: Use the engine class to get the context size Oscar Mateo
2017-04-06 22:27 ` ✓ Fi.CI.BAT: success for Classify the engines in class + instance (rev4) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2017-04-10 14:34 [PATCH 0/5] Classify the engines in class + instance (v5) Oscar Mateo
2017-04-10 14:34 ` [PATCH 1/5] drm/i915: Classify the engines in class + instance Oscar Mateo
2017-04-07 9:15 [PATCH 0/5] Classify the engines in class + instance (v4) Oscar Mateo
2017-04-07 9:15 ` [PATCH 1/5] drm/i915: Classify the engines in class + instance Oscar Mateo
2017-04-07 16:20 ` Michal Wajdeczko
2017-04-06 12:55 [PATCH 0/5] Classify the engines in class + instance (v2) Oscar Mateo
2017-04-06 12:55 ` [PATCH 1/5] drm/i915: Classify the engines in class + instance Oscar Mateo
2017-04-05 9:30 [PATCH 0/5] " Oscar Mateo
2017-04-05 9:30 ` [PATCH 1/5] drm/i915: " Oscar Mateo
2017-04-06 17:45 ` Tvrtko Ursulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491490816-26965-2-git-send-email-oscar.mateo@intel.com \
--to=oscar.mateo@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox