From: Dave Gordon <david.s.gordon@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] drm/i915: Split late "for_each_ring" loop from i915_gem_init_hw()
Date: Tue, 30 Jun 2015 16:01:10 +0100 [thread overview]
Message-ID: <1435676471-30925-1-git-send-email-david.s.gordon@intel.com> (raw)
This function has recently been updated by several patches, including:
drm/i915: Add explicit request management to i915_gem_init_hw()
drm/i915: Moved the for_each_ring loop outside of i915_gem_context_enable()
Now we need to move the entire loop into a separate function, replacing
the inline loop with a call. This will allow a future patch to add a
call from another locations (for now, there are no other calls).
The split marks the distinction between early initialisation using
MMIO register access to set up non-context registers, and late
initialisation using batchbuffers containing LRI instructions to
set up context-specific registers.
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/i915_gem.c | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index ea9caf2..bc7c510 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2882,6 +2882,7 @@ bool i915_gem_clflush_object(struct drm_i915_gem_object *obj, bool force);
int __must_check i915_gem_init(struct drm_device *dev);
int i915_gem_init_rings(struct drm_device *dev);
int __must_check i915_gem_init_hw(struct drm_device *dev);
+int i915_gem_init_hw_late(struct drm_device *dev);
int i915_gem_l3_remap(struct drm_i915_gem_request *req, int slice);
void i915_gem_init_swizzling(struct drm_device *dev);
void i915_gem_cleanup_ringbuffer(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 52efe43..1887e60 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5073,6 +5073,20 @@ i915_gem_init_hw(struct drm_device *dev)
goto out;
}
+ ret = i915_gem_init_hw_late(dev);
+
+out:
+ intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
+ return ret;
+}
+
+int
+i915_gem_init_hw_late(struct drm_device *dev)
+{
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ struct intel_engine_cs *ring;
+ int ret, i, j;
+
/* Now it is safe to go back round and do everything else: */
for_each_ring(ring, dev_priv, i) {
struct drm_i915_gem_request *req;
@@ -5110,7 +5124,6 @@ i915_gem_init_hw(struct drm_device *dev)
}
out:
- intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
return ret;
}
--
1.7.9.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2015-06-30 15:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 15:01 Dave Gordon [this message]
2015-06-30 15:01 ` [PATCH 2/2] drm/i915: Defer late hardware initialisation until first open Dave Gordon
2015-06-30 15:08 ` Chris Wilson
2015-07-01 9:27 ` [PATCH] drm/i915: Asynchronously initialise the GPU state Chris Wilson
2015-07-01 13:07 ` Daniel Vetter
2015-07-01 13:17 ` Chris Wilson
2015-07-01 14:07 ` Daniel Vetter
2015-07-01 14:15 ` Chris Wilson
2015-07-02 12:20 ` [PATCH 2/2] drm/i915: Defer late hardware initialisation until first open shuang.he
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=1435676471-30925-1-git-send-email-david.s.gordon@intel.com \
--to=david.s.gordon@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