All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Subject: [PATCH 4/4] drm/i915/bxt: Tune L3 SQC credits based on actual latencies
Date: Mon, 25 Apr 2016 15:38:08 +0300	[thread overview]
Message-ID: <1461587888-5047-4-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1461587888-5047-1-git-send-email-imre.deak@intel.com>

BSpec says we need to fine tune these values, so comply. I checked this
with random GPU benchmarks and it does seem to improve things.

Note that I considered to program this from the ring as part of the
context specific workarounds there, I decided against that for the
following reasons:
- It's not a context specific setting, it's part of whatever (power-)
  context the GPU manages regardless of context scheduling to
  save/restore things across power transitions. So it's enough to
  program it once.
- Atm, we don't apply workarounds for engines other than the render
  engine from the ring (although this could be added if needed).
- The same setting is programmed via MMIO for BDW and it makes
  sense to program it the same way on BXT too.

CC: Chris Wilson <chris@chris-wilson.co.uk>
CC: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index fcfdb7f..101035b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -76,6 +76,16 @@ static void bxt_init_clock_gating(struct drm_device *dev)
 	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
 		I915_WRITE(GEN9_CLKGATE_DIS_0, I915_READ(GEN9_CLKGATE_DIS_0) |
 			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/*
+	 * Note that for dynamic reprogramming we'd need to do a stalling flush
+	 * operation, but we can do away with that here, since the GPU is idle
+	 * at this point.
+	 */
+	if (IS_BXT_REVID(dev_priv, BXT_REVID_A1, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,
+			   L3_GENERAL_PRIO_CREDITS(62) |
+			   L3_HIGH_PRIO_CREDITS(2));
 }
 
 static void i915_pineview_get_mem_freq(struct drm_device *dev)
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-04-25 12:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 12:38 [PATCH 1/4] drm/i915/bdw: Add missing delay during L3 SQC credit programming Imre Deak
2016-04-25 12:38 ` [PATCH 2/4] drm/i915: Clean up L3 SQC register field definitions Imre Deak
2016-04-26  8:11   ` Mika Kuoppala
2016-04-26  9:03     ` Imre Deak
2016-04-26  9:21       ` Imre Deak
2016-04-26 16:55   ` Ville Syrjälä
2016-04-25 12:38 ` [PATCH 3/4] drm/i915/chv: Tune L3 SQC credits based on actual latencies Imre Deak
2016-04-25 13:16   ` Ville Syrjälä
2016-04-26 16:19     ` Ville Syrjälä
2016-04-26 16:39   ` [PATCH v2 " Imre Deak
2016-04-26 16:51     ` Ville Syrjälä
2016-04-25 12:38 ` Imre Deak [this message]
2016-04-26 16:41   ` [PATCH v2 4/4] drm/i915/bxt: " Imre Deak
2016-04-26 16:53     ` Ville Syrjälä
2016-04-25 14:03 ` ✗ Fi.CI.BAT: failure for series starting with [1/4] drm/i915/bdw: Add missing delay during L3 SQC credit programming Patchwork
2016-04-26 16:55 ` [PATCH 1/4] " Ville Syrjälä

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=1461587888-5047-4-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.