From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 5/6] drm/i915: initialize the PCH GTC interrupts
Date: Wed, 5 Jun 2013 14:21:55 -0300 [thread overview]
Message-ID: <1370452916-3406-6-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1370452916-3406-1-git-send-email-przanoni@gmail.com>
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
These regsiters only exist on LPT and we still don't use them.
Initialize them for the same reason as we initialize the other
interrupts we don't use (SRD, FDI_RX, AUD).
Notice that we also have CPU GTC registers, but these registers are
disabled when the power well is disabled, so they must be handled
differently. Also, they don't affect the code for package C8+ since
we need the power well disabled to enter PC8+.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 15 +++++++++++++++
drivers/gpu/drm/i915/i915_reg.h | 3 +++
2 files changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index c21055e..dc2658c 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2498,6 +2498,11 @@ static void ibx_irq_preinstall(struct drm_device *dev)
if (HAS_PCH_LPT(dev))
break;
}
+
+ if (HAS_PCH_LPT(dev)) {
+ I915_WRITE(PCH_GTCIMR, 0xffffffff);
+ POSTING_READ(PCH_GTCIMR);
+ }
}
/* drm_dma.h hooks
@@ -2657,6 +2662,11 @@ static void ibx_irq_postinstall(struct drm_device *dev)
if (HAS_PCH_LPT(dev))
break;
}
+
+ if (HAS_PCH_LPT(dev)) {
+ I915_WRITE(PCH_GTCIMR, 0xffffffff);
+ I915_WRITE(PCH_GTCIIR, I915_READ(PCH_GTCIIR));
+ }
}
static int ironlake_irq_postinstall(struct drm_device *dev)
@@ -2899,6 +2909,11 @@ static void ironlake_irq_uninstall(struct drm_device *dev)
if (HAS_PCH_LPT(dev))
break;
}
+
+ if (HAS_PCH_LPT(dev)) {
+ I915_WRITE(PCH_GTCIMR, 0xffffffff);
+ I915_WRITE(PCH_GTCIIR, I915_READ(PCH_GTCIIR));
+ }
}
static void i8xx_irq_preinstall(struct drm_device * dev)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f996e9f..6a977ce 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3740,6 +3740,9 @@
#define SRDIMR 0x64834
#define SRDIIR 0x64838
+#define PCH_GTCIMR 0xe7054
+#define PCH_GTCIIR 0xe7058
+
#define ILK_DISPLAY_CHICKEN2 0x42004
/* Required on all Ironlake and Sandybridge according to the B-Spec. */
#define ILK_ELPIN_409_SELECT (1 << 25)
--
1.8.1.2
next prev parent reply other threads:[~2013-06-05 17:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 17:21 [PATCH 0/6] Enable PC8+ states Paulo Zanoni
2013-06-05 17:21 ` [PATCH 1/6] drm/i915: add ibx_irq_preinstall Paulo Zanoni
2013-06-06 11:41 ` Daniel Vetter
2013-06-05 17:21 ` [PATCH 2/6] drm/i915: initialize Haswell audio interrupts Paulo Zanoni
2013-06-05 17:21 ` [PATCH 3/6] drm/i915: initialize FDI RX interrupts Paulo Zanoni
2013-06-05 17:21 ` [PATCH 4/6] drm/i915: initialize the Haswell SRD interrupts Paulo Zanoni
2013-06-05 17:21 ` Paulo Zanoni [this message]
2013-06-05 17:21 ` [PATCH 6/6] drm/i915: implement HSW display sequences for package C8+ Paulo Zanoni
2013-06-06 6:49 ` Chris Wilson
2013-06-06 7:40 ` Daniel Vetter
2013-06-12 16:27 ` [PATCH 0/6] Enable PC8+ states 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=1370452916-3406-6-git-send-email-przanoni@gmail.com \
--to=przanoni@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@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.