From: Rodrigo Vivi <rodrigo.vivi@gmail.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 5/9] drm/i915: add dev_priv->pm_irq_mask
Date: Wed, 14 Aug 2013 21:36:01 -0300 [thread overview]
Message-ID: <20130815003601.GA16945@bratislava> (raw)
In-Reply-To: <1375826239-3060-6-git-send-email-przanoni@gmail.com>
On Tue, Aug 06, 2013 at 06:57:15PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> Just like irq_mask and gt_irq_mask, use it to track the status of
> GEN6_PMIMR so we don't need to read it again every time we call
> snb_update_pm_irq.
>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/i915_irq.c | 12 +++++++-----
> 2 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 9ff09a2..b621f5e 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1097,6 +1097,7 @@ typedef struct drm_i915_private {
> /** Cached value of IMR to avoid reads in updating the bitfield */
> u32 irq_mask;
> u32 gt_irq_mask;
> + u32 pm_irq_mask;
>
> struct work_struct hotplug_work;
> bool enable_hotplug_processing;
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index a1255da..d96bd1b 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -142,16 +142,17 @@ static void snb_update_pm_irq(struct drm_i915_private *dev_priv,
> uint32_t interrupt_mask,
> uint32_t enabled_irq_mask)
> {
> - uint32_t pmimr, new_val;
> + uint32_t new_val;
>
> assert_spin_locked(&dev_priv->irq_lock);
>
> - pmimr = new_val = I915_READ(GEN6_PMIMR);
> + new_val = dev_priv->pm_irq_mask;
> new_val &= ~interrupt_mask;
> new_val |= (~enabled_irq_mask & interrupt_mask);
>
> - if (new_val != pmimr) {
> - I915_WRITE(GEN6_PMIMR, new_val);
> + if (new_val != dev_priv->pm_irq_mask) {
> + dev_priv->pm_irq_mask = new_val;
> + I915_WRITE(GEN6_PMIMR, dev_priv->pm_irq_mask);
> POSTING_READ(GEN6_PMIMR);
> }
> }
> @@ -2221,8 +2222,9 @@ static void gen5_gt_irq_postinstall(struct drm_device *dev)
> if (HAS_VEBOX(dev))
> pm_irqs |= PM_VEBOX_USER_INTERRUPT;
>
> + dev_priv->pm_irq_mask = 0xffffffff;
> I915_WRITE(GEN6_PMIIR, I915_READ(GEN6_PMIIR));
> - I915_WRITE(GEN6_PMIMR, 0xffffffff);
Same write happening at gen5_gt_irq_preinstall...
it is already strange a gen5_ func using a GEN6 reg, but maybe we have to use this same pm_irq_mask there also...
> + I915_WRITE(GEN6_PMIMR, dev_priv->pm_irq_mask);
> I915_WRITE(GEN6_PMIER, pm_irqs);
> POSTING_READ(GEN6_PMIER);
> }
> --
> 1.8.1.2
Anyways, feel free to use:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-08-15 0:36 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 21:57 [PATCH 0/9] Haswell Package C8+ Paulo Zanoni
2013-08-06 21:57 ` [PATCH 1/9] drm/i915: add the FCLK case to intel_ddi_get_cdclk_freq Paulo Zanoni
2013-08-14 18:42 ` Rodrigo Vivi
2013-08-06 21:57 ` [PATCH 2/9] drm/i915: wrap GTIMR changes Paulo Zanoni
2013-08-15 0:19 ` Rodrigo Vivi
2013-08-15 13:21 ` Paulo Zanoni
2013-08-06 21:57 ` [PATCH 3/9] drm/i915: wrap GEN6_PMIMR changes Paulo Zanoni
2013-08-15 0:22 ` Rodrigo Vivi
2013-08-15 13:23 ` Paulo Zanoni
2013-08-06 21:57 ` [PATCH 4/9] drm/i915: don't update GEN6_PMIMR when it's not needed Paulo Zanoni
2013-08-07 0:35 ` Chris Wilson
2013-08-07 13:34 ` Paulo Zanoni
2013-08-07 14:14 ` Chris Wilson
2013-08-20 14:18 ` Daniel Vetter
2013-08-15 0:28 ` Rodrigo Vivi
2013-08-06 21:57 ` [PATCH 5/9] drm/i915: add dev_priv->pm_irq_mask Paulo Zanoni
2013-08-15 0:36 ` Rodrigo Vivi [this message]
2013-08-15 13:31 ` Paulo Zanoni
2013-08-06 21:57 ` [PATCH 6/9] drm/i915: don't disable/reenable IVB error interrupts when not needed Paulo Zanoni
2013-08-15 0:41 ` Rodrigo Vivi
2013-08-20 14:21 ` Daniel Vetter
2013-08-20 14:43 ` Paulo Zanoni
2013-08-20 15:11 ` Daniel Vetter
2013-08-20 18:07 ` Paulo Zanoni
2013-08-06 21:57 ` [PATCH 7/9] drm/i915: allow package C8+ states on Haswell (disabled) Paulo Zanoni
2013-08-07 0:54 ` Chris Wilson
2013-08-07 13:38 ` Paulo Zanoni
2013-08-07 14:20 ` Chris Wilson
2013-08-07 16:02 ` Daniel Vetter
2013-08-09 20:10 ` Paulo Zanoni
2013-08-09 20:32 ` Chris Wilson
2013-08-09 21:34 ` Paulo Zanoni
2013-08-10 7:55 ` Daniel Vetter
2013-08-10 8:04 ` Chris Wilson
2013-08-12 22:02 ` Paulo Zanoni
2013-08-09 20:42 ` Chris Wilson
2013-08-09 21:25 ` Paulo Zanoni
2013-08-06 21:57 ` [PATCH 8/9] drm/i915: add i915_pc8_status debugfs file Paulo Zanoni
2013-08-06 21:57 ` [PATCH 9/9] drm/i915: enable Package C8+ by default Paulo Zanoni
2013-08-06 22:31 ` [PATCH 0/9] Haswell Package C8+ Daniel Vetter
2013-08-07 13:30 ` Paulo Zanoni
2013-08-09 20:04 ` [PATCH 6.1/9] drm/i915: don't queue PM events we won't process Paulo Zanoni
2013-08-09 20:04 ` [PATCH 6.2/9] drm/i915: fix how we mask PMIMR when adding work to the queue Paulo Zanoni
2013-08-20 14:26 ` Daniel Vetter
2013-08-09 20:04 ` [PATCH 6.3/9] drm/i915: merge HSW and SNB PM irq handlers Paulo Zanoni
2013-08-14 19:21 ` Ben Widawsky
2013-08-15 14:51 ` Paulo Zanoni
2013-08-20 14:27 ` Daniel Vetter
2013-08-14 18:36 ` [PATCH 6.1/9] drm/i915: don't queue PM events we won't process Ben Widawsky
2013-08-15 14:50 ` Paulo Zanoni
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=20130815003601.GA16945@bratislava \
--to=rodrigo.vivi@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=przanoni@gmail.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.