From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/8] drm/i915: Move execlist initialization into intel_engine_cs.c
Date: Wed, 20 Sep 2017 17:36:59 +0300 [thread overview]
Message-ID: <20170920143705.11277-3-mika.kuoppala@intel.com> (raw)
In-Reply-To: <20170920143705.11277-1-mika.kuoppala@intel.com>
Move execlist init into a common engine setup. As it is
common to both guc and hw execlists.
v2: rebase with csb changes
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/intel_engine_cs.c | 31 ++++++++++++++++++++++++++++---
drivers/gpu/drm/i915/intel_lrc.c | 19 -------------------
2 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index eb6feaf69a3b..d58e17efd243 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -380,6 +380,33 @@ static void intel_engine_init_timeline(struct intel_engine_cs *engine)
engine->timeline = &engine->i915->gt.global_timeline.engine[engine->id];
}
+static bool csb_force_mmio(struct drm_i915_private *i915)
+{
+ /* GVT emulation depends upon intercepting CSB mmio */
+ if (intel_vgpu_active(i915))
+ return true;
+
+ /*
+ * IOMMU adds unpredictable latency causing the CSB write (from the
+ * GPU into the HWSP) to only be visible some time after the interrupt
+ * (missed breadcrumb syndrome).
+ */
+ if (intel_vtd_active())
+ return true;
+
+ return false;
+}
+
+static void intel_engine_init_execlist(struct intel_engine_cs *engine)
+{
+ struct intel_engine_execlist * const el = &engine->execlist;
+
+ el->csb_use_mmio = csb_force_mmio(engine->i915);
+
+ el->queue = RB_ROOT;
+ el->first = NULL;
+}
+
/**
* intel_engines_setup_common - setup engine state not requiring hw access
* @engine: Engine to setup.
@@ -391,9 +418,7 @@ static void intel_engine_init_timeline(struct intel_engine_cs *engine)
*/
void intel_engine_setup_common(struct intel_engine_cs *engine)
{
- engine->execlist.queue = RB_ROOT;
- engine->execlist.first = NULL;
-
+ intel_engine_init_execlist(engine);
intel_engine_init_timeline(engine);
intel_engine_init_hangcheck(engine);
i915_gem_batch_pool_init(engine, &engine->batch_pool);
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 5c2fcc4936ba..a4ece4c4f291 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1784,23 +1784,6 @@ logical_ring_default_irqs(struct intel_engine_cs *engine)
engine->irq_keep_mask = GT_CONTEXT_SWITCH_INTERRUPT << shift;
}
-static bool irq_handler_force_mmio(struct drm_i915_private *i915)
-{
- /* GVT emulation depends upon intercepting CSB mmio */
- if (intel_vgpu_active(i915))
- return true;
-
- /*
- * IOMMU adds unpredictable latency causing the CSB write (from the
- * GPU into the HWSP) to only be visible some time after the interrupt
- * (missed breadcrumb syndrome).
- */
- if (intel_vtd_active())
- return true;
-
- return false;
-}
-
static void
logical_ring_setup(struct intel_engine_cs *engine)
{
@@ -1812,8 +1795,6 @@ logical_ring_setup(struct intel_engine_cs *engine)
/* Intentionally left blank. */
engine->buffer = NULL;
- engine->execlist.csb_use_mmio = irq_handler_force_mmio(dev_priv);
-
fw_domains = intel_uncore_forcewake_for_reg(dev_priv,
RING_ELSP(engine),
FW_REG_WRITE);
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-20 14:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 14:36 [PATCH 0/8] Support for more than two execlist ports (v2) Mika Kuoppala
2017-09-20 14:36 ` [PATCH 1/8] drm/i915: Make own struct for execlist items Mika Kuoppala
2017-09-21 11:55 ` Michał Winiarski
2017-09-21 12:19 ` Chris Wilson
2017-09-21 15:13 ` Joonas Lahtinen
2017-09-20 14:36 ` Mika Kuoppala [this message]
2017-09-21 12:20 ` [PATCH 2/8] drm/i915: Move execlist initialization into intel_engine_cs.c Chris Wilson
2017-09-20 14:37 ` [PATCH 3/8] drm/i915: Wrap port cancellation into a function Mika Kuoppala
2017-09-21 12:18 ` Michał Winiarski
2017-09-21 14:02 ` Mika Kuoppala
2017-09-21 12:20 ` Chris Wilson
2017-09-20 14:37 ` [PATCH 4/8] drm/i915: Add execlist_port_complete Mika Kuoppala
2017-09-21 12:21 ` Chris Wilson
2017-09-20 14:37 ` [PATCH 5/8] drm/i915: Make execlist port count variable Mika Kuoppala
2017-09-21 12:21 ` Chris Wilson
2017-09-20 14:37 ` [PATCH 6/8] drm/i915: Introduce execlist_port_* accessors Mika Kuoppala
2017-09-21 12:26 ` Chris Wilson
2017-09-21 14:45 ` Mika Kuoppala
2017-09-20 14:37 ` [PATCH 7/8] drm/i915: Keep track of reserved execlist ports Mika Kuoppala
2017-09-21 12:08 ` Mika Kuoppala
2017-09-21 12:30 ` Chris Wilson
2017-09-20 14:37 ` [PATCH 8/8] drm/i915: Improve GuC request coalescing Mika Kuoppala
2017-09-21 12:34 ` Chris Wilson
2017-09-21 12:53 ` Michał Winiarski
2017-09-20 15:19 ` ✓ Fi.CI.BAT: success for Support for more than two execlist ports (rev2) Patchwork
2017-09-20 16:34 ` ✓ Fi.CI.IGT: " Patchwork
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=20170920143705.11277-3-mika.kuoppala@intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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