From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Intel graphics driver community testing & development
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2 4/4] drm/i915: Codify our assumption that the Global GTT is <= 4GiB
Date: Fri, 18 Mar 2016 10:56:55 +0000 [thread overview]
Message-ID: <56EBDEF7.3050101@linux.intel.com> (raw)
In-Reply-To: <1458290579-27783-4-git-send-email-joonas.lahtinen@linux.intel.com>
On 18/03/16 08:42, Joonas Lahtinen wrote:
> From: Chris Wilson <chris@chris-wilson.co.uk>
>
> Throughout the code base, we use u32 for offsets into the global GTT. If
> we ever see any hardware with a larger GGTT, then we run the real risk
> of silent corruption. So test for our assumption up front so that we
> have a nice reminder should the time come when it fails.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> [Rebased and changed 1ull -> 1ULL]
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 8a9fa03..ba144ba 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3191,6 +3191,13 @@ int i915_gem_gtt_init(struct drm_device *dev)
> if (ret)
> return ret;
>
> + if ((ggtt->base.total - 1) >> 32) {
> + DRM_ERROR("We never expected a Global GTT with more than 32bits of address space! Found %lldM!\n",
> + ggtt->base.total >> 20);
MB or MiB?
> + ggtt->base.total = 1ULL << 32;
> + ggtt->mappable_end = min(ggtt->mappable_end, ggtt->base.total);
> + }
> +
> /*
> * Initialise stolen early so that we may reserve preallocated
> * objects for the BIOS to KMS transition.
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-03-18 10:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 8:42 [PATCH v2 1/4] drm/i915/gtt: Reference mappable_end variable from pointer Joonas Lahtinen
2016-03-18 8:42 ` [PATCH v2 2/4] drm/i915: Rename dev_priv->gtt to dev_priv->ggtt Joonas Lahtinen
2016-03-18 8:42 ` [PATCH v2 3/4] drm/i915/gtt: Clean up GGTT probing code Joonas Lahtinen
2016-03-18 8:42 ` [PATCH v2 4/4] drm/i915: Codify our assumption that the Global GTT is <= 4GiB Joonas Lahtinen
2016-03-18 10:56 ` Tvrtko Ursulin [this message]
2016-03-18 11:08 ` Chris Wilson
2016-03-18 12:39 ` Mika Kuoppala
2016-03-18 12:48 ` Mika Kuoppala
2016-03-18 10:46 ` [PATCH v2 1/4] drm/i915/gtt: Reference mappable_end variable from pointer Tvrtko Ursulin
2016-03-18 12:11 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/4] " Patchwork
2016-03-18 12:56 ` Joonas Lahtinen
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=56EBDEF7.3050101@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.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