[PATCH] [v2] drm/i915: Expose LLC size to user space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux