[Mesa-dev] [PATCH V2 2/2] i965: Simplify l3 way size computations

Francisco Jerez currojerez at riseup.net
Fri Jun 2 00:07:29 UTC 2017


Anuj Phogat <anuj.phogat at gmail.com> writes:

> By making use of l3_banks field in gen_device_info struct
> l3_way_size for gen7+ = 2 * l3_banks.
>
> V2: Keep the get_l3_way_size() function.
>
> Suggested-by: Francisco Jerez <currojerez at riseup.net>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> Cc: Francisco Jerez <currojerez at riseup.net>

Thanks, patch is:

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> ---
>  src/intel/common/gen_l3_config.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/src/intel/common/gen_l3_config.c b/src/intel/common/gen_l3_config.c
> index 0783217..e0825e9 100644
> --- a/src/intel/common/gen_l3_config.c
> +++ b/src/intel/common/gen_l3_config.c
> @@ -254,16 +254,8 @@ gen_get_l3_config(const struct gen_device_info *devinfo,
>  static unsigned
>  get_l3_way_size(const struct gen_device_info *devinfo)
>  {
> -   if (devinfo->is_baytrail)
> -      return 2;
> -
> -   else if (devinfo->gt == 1 ||
> -            devinfo->is_cherryview ||
> -            devinfo->is_broxton)
> -      return 4;
> -
> -   else
> -      return 8 * devinfo->num_slices;
> +   assert(devinfo->l3_banks);
> +   return 2 * devinfo->l3_banks;
>  }
>  
>  /**
> -- 
> 2.9.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170601/7819da72/attachment.sig>


More information about the mesa-dev mailing list