[Mesa-dev] [PATCH] nvc0: add MP performance counters for SM35 (GK110:GM107)

Ilia Mirkin imirkin at alum.mit.edu
Tue Feb 16 21:04:04 UTC 2016


On Tue, Feb 16, 2016 at 3:59 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>  static inline const struct nvc0_hw_sm_query_cfg **
>  nvc0_hw_sm_get_queries(struct nvc0_screen *screen)
>  {
> +   const struct nvc0_hw_sm_query_cfg **queries = NULL;
>     struct nouveau_device *dev = screen->base.device;
>
> -   if (dev->chipset == 0xc0 || dev->chipset == 0xc8)
> -      return sm20_hw_sm_queries;
> -   return sm21_hw_sm_queries;
> +   switch (dev->chipset & ~0xf) {
> +   case 0xc0:
> +   case 0xd0:
> +      if (dev->chipset == 0xc0 || dev->chipset == 0xc8)
> +         queries = sm20_hw_sm_queries;
> +      else
> +         queries = sm21_hw_sm_queries;
> +      break;
> +   case 0xe0:
> +      queries = sm30_hw_sm_queries;
> +      break;
> +   case 0xf0:
> +   case 0x100:
> +      queries = sm35_hw_sm_queries;
> +      break;
> +   default:
> +      break;
> +   }
> +   return queries;
>  }

This might be wider to do based on 3d class. For example GK20A (aka
0xea chipset) uses SM35.


More information about the mesa-dev mailing list