From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 2/7] drm/i915: Move edram detection early_sanitize
Date: Fri, 4 Oct 2013 21:22:50 -0700 [thread overview]
Message-ID: <1380946975-14431-2-git-send-email-benjamin.widawsky@intel.com> (raw)
In-Reply-To: <1380946975-14431-1-git-send-email-benjamin.widawsky@intel.com>
In order to be able to have virtual functions for the MMIO, we need to
use the raw access function. To keep things simple, just move this to
our early_sanitize code in uncore.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_dma.c | 10 ----------
drivers/gpu/drm/i915/intel_uncore.c | 11 +++++++++++
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 0a84cd5..ad55c02 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1549,16 +1549,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
intel_uncore_early_sanitize(dev);
- if (IS_HASWELL(dev) && (I915_READ(HSW_EDRAM_PRESENT) == 1)) {
- /* The docs do not explain exactly how the calculation can be
- * made. It is somewhat guessable, but for now, it's always
- * 128MB.
- * NB: We can't write IDICR yet because we do not have gt funcs
- * set up */
- dev_priv->ellc_size = 128;
- DRM_INFO("Found %zuMB of eLLC\n", dev_priv->ellc_size);
- }
-
ret = i915_gem_gtt_init(dev);
if (ret)
goto out_regs;
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 288a3a6..e9034b8 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -222,6 +222,17 @@ void intel_uncore_early_sanitize(struct drm_device *dev)
if (HAS_FPGA_DBG_UNCLAIMED(dev))
__raw_i915_write32(dev_priv, FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
+
+ if (IS_HASWELL(dev) &&
+ (__raw_i915_read32(dev_priv, HSW_EDRAM_PRESENT) == 1)) {
+ /* The docs do not explain exactly how the calculation can be
+ * made. It is somewhat guessable, but for now, it's always
+ * 128MB.
+ * NB: We can't write IDICR yet because we do not have gt funcs
+ * set up */
+ dev_priv->ellc_size = 128;
+ DRM_INFO("Found %zuMB of eLLC\n", dev_priv->ellc_size);
+ }
}
void intel_uncore_init(struct drm_device *dev)
--
1.8.4
next prev parent reply other threads:[~2013-10-05 4:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-05 4:22 [PATCH 1/7] drm/i915: Prevent using uninitialized MMIO funcs Ben Widawsky
2013-10-05 4:22 ` Ben Widawsky [this message]
2013-10-05 4:22 ` [PATCH 3/7] drm/i915: Create MMIO virtual functions Ben Widawsky
2013-10-05 4:22 ` [PATCH 4/7] drm/i915: Extra common MMIO lines Ben Widawsky
2013-10-05 4:24 ` [PATCH 4/7] [v2] drm/i915: Extract " Ben Widawsky
2013-10-05 4:22 ` [PATCH 5/7] drm/i915: Create GEN specific read MMIO Ben Widawsky
2013-10-05 4:22 ` [PATCH 6/7] drm/i915: Create GEN specific write MMIO Ben Widawsky
2013-10-05 4:22 ` [PATCH 7/7] drm/i915: Mark gen specific conditions 'likely' Ben Widawsky
2013-10-05 12:37 ` Daniel Vetter
2013-10-06 0:57 ` [PATCH 7/7] drm/i915: Remove gen specific checks in MMIO Ben Widawsky
2013-10-08 13:38 ` [PATCH 1/7] drm/i915: Prevent using uninitialized MMIO funcs Damien Lespiau
2013-10-08 15:23 ` 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=1380946975-14431-2-git-send-email-benjamin.widawsky@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=ben@bwidawsk.net \
--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