From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Report amount of usable graphics memory in MiB Date: Sun, 11 Nov 2012 18:48:55 +0100 Message-ID: <20121111174855.GL5854@phenom.ffwll.local> References: <1352626485-14742-1-git-send-email-chris@chris-wilson.co.uk> <20121111093406.0000262c@unknown> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DF689E8C4 for ; Sun, 11 Nov 2012 09:47:41 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id c1so3006563eek.36 for ; Sun, 11 Nov 2012 09:47:40 -0800 (PST) Content-Disposition: inline In-Reply-To: <20121111093406.0000262c@unknown> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sun, Nov 11, 2012 at 09:34:06AM -0800, Ben Widawsky wrote: > On Sun, 11 Nov 2012 09:34:45 +0000 > Chris Wilson wrote: > > > ...rather than kilo-PTE. > > > > Signed-off-by: Chris Wilson > > --- > > drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > > index e7515e8..938710a 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > > @@ -708,7 +708,7 @@ int i915_gem_gtt_init(struct drm_device *dev) > > } > > > > /* GMADR is the PCI aperture used by SW to access tiled GFX surfaces in a linear fashion. */ > > - DRM_INFO("Memory Usable by graphics device = %dK\n", dev_priv->mm.gtt->gtt_total_entries >> 10); > > + DRM_INFO("Memory Usable by graphics device = %dM\n", dev_priv->mm.gtt->gtt_total_entries >> 8); > > DRM_DEBUG_DRIVER("GMADR size = %dM\n", dev_priv->mm.gtt->gtt_mappable_entries >> 8); > > DRM_DEBUG_DRIVER("GTT stolen size = %dM\n", dev_priv->mm.gtt->stolen_size >> 20); > > > > Shouldn't it be >> 18 though, not >> 8? Each pte entry stands for a 4k page, so entries is already size >> 12, so we only need to shift by 8 to get M. Patch merged to dinq. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch