intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/8] drm/i915: Make display gtt offsets u32
Date: Fri, 15 Jan 2016 12:03:58 +0200	[thread overview]
Message-ID: <20160115100358.GA23290@intel.com> (raw)
In-Reply-To: <20160114223653.GC15852@nuc-i3427.alporthouse.com>

On Thu, Jan 14, 2016 at 10:36:53PM +0000, Chris Wilson wrote:
> On Thu, Jan 14, 2016 at 03:22:15PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Using 'unsigned long' for ggtt offsets doesn't make much sense. Use
> > 'u32' instead since we've not yet seen a >4GiB ggtt.
> 
> We should do:
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 2e460b369e82..2ce16acceb75 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3143,6 +3143,13 @@ int i915_gem_gtt_init(struct drm_device *dev)
>         if (ret)
>                 return ret;
>  
> +       if (gtt->base.total >> 32) {
> +               DRM_ERROR("The code does not expect a Global GTT with more that 32bits of address space! Found %lldM!\n",
> +                         gtt->base.total >> 20);
> +               gtt->base.total = 1ull << 32;
> +               gtt->mappable_end = min(gtt->mappable_end, gtt->base.total);
> +       }
> +
>         /* GMADR is the PCI mmio aperture into the global GTT. */
>         DRM_INFO("Memory usable by graphics device = %lluM\n",
>                  gtt->base.total >> 20);
> 
> To get that early warning in.

Seems reasonable. Feel free to slap on
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-01-15 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 13:22 [PATCH 0/8] drm/i915: Some more fb offsets[] prep stuff ville.syrjala
2016-01-14 13:22 ` [PATCH 1/8] drm/i915: Don't leak framebuffer_references if drm_framebuffer_init() fails ville.syrjala
2016-01-14 13:22 ` [PATCH 2/8] drm/i915: Set i915_ggtt_view_normal type explicitly ville.syrjala
2016-01-14 13:22 ` [PATCH 3/8] drm/i915: Pass the dma_addr_t array as const to rotate_pages() ville.syrjala
2016-01-14 13:22 ` [PATCH 4/8] drm/i915: Rename the rotated gtt view member to 'rotated' ville.syrjala
2016-01-14 13:22 ` [PATCH 5/8] drm/i915: Pass stride to rotate_pages() ville.syrjala
2016-01-14 13:22 ` [PATCH 6/8] drm/i915: Pass rotation_info to intel_rotate_fb_obj_pages() ville.syrjala
2016-01-14 13:22 ` [PATCH 7/8] drm/i915: Make display gtt offsets u32 ville.syrjala
2016-01-14 22:36   ` Chris Wilson
2016-01-15 10:03     ` Ville Syrjälä [this message]
2016-01-14 13:22 ` [PATCH 8/8] drm/i915: Standardize on 'cpp' for bytes per pixel ville.syrjala
2016-01-14 14:49 ` ✗ failure: Fi.CI.BAT Patchwork
2016-01-14 15:00   ` Ville Syrjälä
2016-01-15 12:03     ` Chris Wilson
2016-01-15 19:12 ` [PATCH 0/8] drm/i915: Some more fb offsets[] prep stuff Ville Syrjälä

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=20160115100358.GA23290@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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;
as well as URLs for NNTP newsgroup(s).