From: David Weinehall <david.weinehall@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v4] drm/i915: Speed up DMC firmware loading
Date: Tue, 5 Sep 2017 16:10:50 +0300 [thread overview]
Message-ID: <20170905131050.11655-1-david.weinehall@linux.intel.com> (raw)
In-Reply-To: <20170904183804.28815-1-david.weinehall@linux.intel.com>
Currently we're doing:
1. acquire lock
2. write word to hardware
3. release lock
4. repeat from 1
to load the DMC firmware. Due to the cost of acquiring/releasing a lock,
and the size of the DMC firmware, this slows down DMC loading a lot.
This patch simply acquires the lock, writes the entire firmware,
then releases the lock. Testing shows resume speedups
in the order of 10ms on platforms with DMC firmware (GEN9+).
v2: Per feedback from Chris & Ville there's no need to do the whole
forcewake dance, so lose that bit (Chris, Ville)
v3: Actually send the new version of the patch...
v4: Don't acquire the uncore lock. Disable preempt. (Chris)
Signed-off-by: David Weinehall <david.weinehall@linux.intel.com>
---
drivers/gpu/drm/i915/intel_csr.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index 965988f79a55..cdfb624eb82d 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -252,8 +252,14 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)
}
fw_size = dev_priv->csr.dmc_fw_size;
+ assert_rpm_wakelock_held(dev_priv);
+
+ preempt_disable();
+
for (i = 0; i < fw_size; i++)
- I915_WRITE(CSR_PROGRAM(i), payload[i]);
+ I915_WRITE_FW(CSR_PROGRAM(i), payload[i]);
+
+ preempt_enable();
for (i = 0; i < dev_priv->csr.mmio_count; i++) {
I915_WRITE(dev_priv->csr.mmioaddr[i],
--
2.14.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-09-05 13:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 18:38 [PATCH v2] drm/i915: Speed up DMC firmware loading David Weinehall
2017-09-04 18:55 ` Chris Wilson
2017-09-04 19:09 ` David Weinehall
2017-09-04 18:57 ` ✓ Fi.CI.BAT: success for drm/i915: Speed up DMC firmware loading (rev2) Patchwork
2017-09-04 19:08 ` [PATCH v3] drm/i915: Speed up DMC firmware loading David Weinehall
2017-09-04 19:14 ` Chris Wilson
2017-09-04 19:15 ` Chris Wilson
2017-09-04 19:25 ` David Weinehall
2017-09-04 19:46 ` ✓ Fi.CI.BAT: success for drm/i915: Speed up DMC firmware loading (rev3) Patchwork
2017-09-04 19:59 ` ✗ Fi.CI.IGT: warning for drm/i915: Speed up DMC firmware loading (rev2) Patchwork
2017-09-04 21:32 ` ✗ Fi.CI.IGT: warning for drm/i915: Speed up DMC firmware loading (rev3) Patchwork
2017-09-05 13:10 ` David Weinehall [this message]
2017-09-05 13:25 ` [PATCH v4] drm/i915: Speed up DMC firmware loading Chris Wilson
2017-09-05 13:33 ` David Weinehall
2017-09-05 14:09 ` Chris Wilson
2017-09-05 13:38 ` ✓ Fi.CI.BAT: success for drm/i915: Speed up DMC firmware loading (rev4) Patchwork
2017-09-05 15:10 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-25 13:49 ` Chris Wilson
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=20170905131050.11655-1-david.weinehall@linux.intel.com \
--to=david.weinehall@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