From: Ben Widawsky <ben@bwidawsk.net>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Skip Stolen Memory first page.
Date: Wed, 30 Jul 2014 20:57:04 -0700 [thread overview]
Message-ID: <20140731035703.GA1284@bwidawsk.net> (raw)
In-Reply-To: <1406742466-25128-1-git-send-email-rodrigo.vivi@intel.com>
On Wed, Jul 30, 2014 at 10:47:46AM -0700, Rodrigo Vivi wrote:
> WA to skip the first page of stolen memory due to sporadic HW write on *CS Idle
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_stolen.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
> index 21c025a..3acefb3 100644
> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> @@ -290,6 +290,7 @@ int i915_gem_init_stolen(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
> int bios_reserved = 0;
> + int initial_reserved = 0;
>
> #ifdef CONFIG_INTEL_IOMMU
> if (intel_iommu_gfx_mapped && INTEL_INFO(dev)->gen < 8) {
> @@ -314,9 +315,13 @@ int i915_gem_init_stolen(struct drm_device *dev)
> if (WARN_ON(bios_reserved > dev_priv->gtt.stolen_size))
> return 0;
>
> + /* WaSkipStolenMemoryFirstPage */
> + if (INTEL_INFO(dev)->gen >= 8)
> + initial_reserved = 4096;
> +
> /* Basic memrange allocator for stolen space */
> - drm_mm_init(&dev_priv->mm.stolen, 0, dev_priv->gtt.stolen_size -
> - bios_reserved);
> + drm_mm_init(&dev_priv->mm.stolen, initial_reserved,
> + dev_priv->gtt.stolen_size - bios_reserved);
>
> return 0;
> }
Actually, you need to fix the size in the initialization:
drm_mm_init(stolen, 4096, dev_priv->gtt.stolen_size - bios_reserved - 4096);
Also, I think we have a bug here today, you need to
dev_priv->gtt.stolen_size -= ...
Or else we don't have the correct assertion in
i915_pages_create_for_stolen(). I didn't look carefully if it's safe to
currently do it, but it does seem wrong to me as it is.
With the first fix (I didn't verify that's the real workaround name),
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-07-31 3:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 17:47 [PATCH] drm/i915: Skip Stolen Memory first page Rodrigo Vivi
2014-07-31 3:57 ` Ben Widawsky [this message]
2014-07-31 5:57 ` Chris Wilson
2014-07-31 13:39 ` Ville Syrjälä
2014-07-31 19:08 ` Rodrigo Vivi
2014-08-01 16:34 ` Jesse Barnes
2015-02-03 16:11 ` Siluvery, Arun
2015-02-03 17:40 ` Ville Syrjälä
2015-02-03 19:24 ` 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=20140731035703.GA1284@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox