All of lore.kernel.org
 help / color / mirror / Atom feed
From: deepak.s@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Update PM interrupts before updating the freq
Date: Thu,  5 Mar 2015 09:38:23 +0530	[thread overview]
Message-ID: <1425528503-7760-2-git-send-email-deepak.s@linux.intel.com> (raw)
In-Reply-To: <1425528503-7760-1-git-send-email-deepak.s@linux.intel.com>

From: Deepak S <deepak.s@linux.intel.com>

We update the GT PM interrupts mask at the end of set rps. We observed even
though we are requesting a RPn or RP0, there is a chance to get a DOWN or UP
interrupts before interrupts mask. These extra interrupts are simply wasting
cpu cycles. In this patch we mask the interrupts for given freq before
requesting new frequency.

Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 2e1ed07..bbfe4f0 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3879,12 +3879,12 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
 	if (WARN_ONCE(IS_CHERRYVIEW(dev) && (val & 1),
 		      "Odd GPU freq value\n"))
 		val &= ~1;
+	
+	I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
 
 	if (val != dev_priv->rps.cur_freq)
 		vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ, val);
 
-	I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
-
 	dev_priv->rps.cur_freq = val;
 	trace_intel_gpu_freq_change(intel_gpu_freq(dev_priv, val));
 }
-- 
1.9.1

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

  reply	other threads:[~2015-03-05  4:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05  4:08 [PATCH] drm/i915: Remove wait for for punit to updates freq deepak.s
2015-03-05  4:08 ` deepak.s [this message]
2015-03-05 10:30   ` [PATCH] drm/i915: Update PM interrupts before updating the freq shuang.he
2015-03-05  7:46 ` [PATCH] drm/i915: Remove wait for for punit to updates freq shuang.he
2015-04-13 11:55 ` Jani Nikula
2015-04-13 12:10   ` Ville Syrjälä
2015-04-28 10:43     ` Deepak S
2015-04-28 18:16 ` Jesse Barnes
2015-04-28 18:32   ` Ville Syrjälä
2015-04-29  2:50     ` Deepak S
2015-04-29 10:26       ` Ville Syrjälä
2015-04-30 10:04         ` Deepak S
2015-05-04  7:59           ` Daniel Vetter
2015-04-29  2:37   ` Deepak S
  -- strict thread matches above, loose matches on Subject: below --
2015-07-10 13:01 [PATCH] drm/i915: Update PM interrupts before updating the freq Praveen Paneri
2015-07-11 13:41 ` shuang.he
2015-07-11 16:46 ` Chris Wilson
2015-07-13  9:28   ` Daniel Vetter

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=1425528503-7760-2-git-send-email-deepak.s@linux.intel.com \
    --to=deepak.s@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 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.