From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3.5/5] drm/i915: Do eLLC detection earlier
Date: Sat, 13 Jul 2013 11:39:44 +0200 [thread overview]
Message-ID: <20130713093944.GN6143@phenom.ffwll.local> (raw)
In-Reply-To: <1372963366-526-1-git-send-email-ben@bwidawsk.net>
On Thu, Jul 04, 2013 at 11:42:46AM -0700, Ben Widawsky wrote:
> We need it before we set the pte_encode function pointers, which happens
> really early, in gtt_init.
>
> The problem with just doing the normal sequence earlier is we don't have
> the ability to use forcewake until after the pte functions have been set
> up.
>
> Since all solutions are somewhat ugly (barring rewriting all the init
> ordering), I've opted to do the detection really early, and the enabling
> later - since the register to detect doesn't require forcewake.
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Looking at patch 3.5 here and patch 3 I think those should be squashed
together. Ok if I do that when applying?
-Daniel
> ---
> drivers/gpu/drm/i915/i915_dma.c | 10 ++++++++++
> drivers/gpu/drm/i915/i915_gem.c | 9 +--------
> 2 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 0e22142..7eda8ab 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1524,6 +1524,16 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>
> intel_early_sanitize_regs(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 put_bridge;
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 2df993d..f9834f2 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4153,15 +4153,8 @@ i915_gem_init_hw(struct drm_device *dev)
> if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt())
> return -EIO;
>
> - if (IS_HASWELL(dev) && (I915_READ(HSW_EDRAM_PRESENT) == 1)) {
> + if (dev_priv->ellc_size)
> I915_WRITE(HSW_IDICR, I915_READ(HSW_IDICR) | IDIHASHMSK(0xf));
> - /* The docs do not explain exactly how the calculation can be
> - * made. It is somewhat guessable, but for now, it's always
> - * 128MB.
> - */
> - dev_priv->ellc_size = 128;
> - DRM_INFO("Found %zuMB of eLLC\n", dev_priv->ellc_size);
> - }
>
> if (HAS_PCH_NOP(dev)) {
> u32 temp = I915_READ(GEN7_MSG_CTL);
> --
> 1.8.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-07-13 9:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 18:02 [PATCH 1/5] drm/i915/hsw: Set correct Haswell PTE encodings Ben Widawsky
2013-07-04 18:02 ` [PATCH 2/5] drm/i915: Define some of the eLLC magic Ben Widawsky
2013-07-13 0:02 ` Rodrigo Vivi
2013-07-14 20:36 ` Ben Widawsky
2013-07-04 18:02 ` [PATCH 3/5] drm/i915: store eLLC size Ben Widawsky
2013-07-04 18:42 ` [PATCH 3.5/5] drm/i915: Do eLLC detection earlier Ben Widawsky
2013-07-13 0:04 ` Rodrigo Vivi
2013-07-13 9:39 ` Daniel Vetter [this message]
2013-07-14 20:37 ` Ben Widawsky
2013-07-16 6:02 ` [PATCH 3/5] drm/i915: store eLLC size Daniel Vetter
2013-07-04 18:02 ` [PATCH 4/5] drm/i915: Use eLLC/LLC by default when available Ben Widawsky
2013-07-04 18:17 ` Daniel Vetter
2013-07-04 18:40 ` Ben Widawsky
2013-07-13 0:08 ` Rodrigo Vivi
2013-07-04 18:02 ` [PATCH 5/5] drm/i915: debugfs entries for [e]LLC Ben Widawsky
2013-07-04 18:14 ` Daniel Vetter
2013-07-04 18:40 ` Ben Widawsky
2013-07-04 18:43 ` Daniel Vetter
2013-07-04 18:46 ` Ben Widawsky
2013-07-09 18:35 ` Chad Versace
2013-07-09 20:16 ` Ben Widawsky
2013-07-04 18:47 ` [PATCH 6/6] drm/i915: Add a param for eLLC size Ben Widawsky
2013-07-16 6:10 ` Daniel Vetter
2013-07-13 0:11 ` [PATCH 5/5] drm/i915: debugfs entries for [e]LLC Rodrigo Vivi
2013-07-13 0:00 ` [PATCH 1/5] drm/i915/hsw: Set correct Haswell PTE encodings Rodrigo Vivi
2013-07-14 20:34 ` Ben Widawsky
2013-07-15 14:16 ` Damien Lespiau
2013-07-15 14:23 ` Damien Lespiau
2013-07-15 16:54 ` Ben Widawsky
2013-07-16 6:00 ` 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=20130713093944.GN6143@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--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