From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] [v2] drm/i915: Expose LLC size to user space Date: Thu, 11 Jul 2013 21:46:02 +0100 Message-ID: <20130711204602.GB4218@cantiga.alporthouse.com> References: <1373425083-1276-1-git-send-email-ben@bwidawsk.net> <1373568732-3061-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (unknown [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id BC81EE5C94 for ; Thu, 11 Jul 2013 13:46:08 -0700 (PDT) Received: from fireflyinternet.com (unverified [87.106.93.118]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 129496692-1500050 for ; Thu, 11 Jul 2013 21:46:04 +0100 Content-Disposition: inline In-Reply-To: <1373568732-3061-1-git-send-email-ben@bwidawsk.net> 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 , Bryan Bell List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 11, 2013 at 11:52:12AM -0700, Ben Widawsky wrote: > The algorithm/information was originally written by Chad, though I > changed the control flow, and I think his original code had a couple of > bugs, though I didn't look very hard before rewriting. That could have > also been different interpretations of the spec. > > I've tested this on two platforms, and it seems to perform how I want. > > With this patch is a small tool for igt to query the size. This can be > used as a reference for DRI clients wishing to query the information. > > v2: Update name of the SDM location (Bryan) > Dissent: Use a new param instead of reusing HAS_LLC param (Chris, Chad) > Fix unicode multiply symbol (Ben) Shrug. I still dislike calling it LLC_SIZE since it is actually L3_SIZE. For very similar reasons, easily finding out L2 size would be useful, as would L4. > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index c8d6104..43a549d 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -1187,6 +1187,8 @@ typedef struct drm_i915_private { > /* Old dri1 support infrastructure, beware the dragons ya fools entering > * here! */ > struct i915_dri1_state dri1; > + > + size_t llc_size; Don't put it below the dungeons, it will be tainted. -Chris -- Chris Wilson, Intel Open Source Technology Centre