[Mesa-dev] [PATCH 1/3] i965: Fix max_wm_threads for gen8

Kenneth Graunke kenneth at whitecape.org
Wed Jan 21 12:48:50 PST 2015


On Wednesday, January 21, 2015 08:17:34 PM ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> max_wm_threads depends on the GT SKU on gen8. Update the values to
> match the spec.
> 
> The max number of threads in 3DSTATE_PS is always programmed to 64
> and the hardware internally scales that depending on the GT SKU. So
> this doesn't change the max number of threads actually used, but it
> does affect the scratch space calculation.
> 
> This is most important on CHV where the old value was too small, so
> the amount of scratch space allocated wasn't sufficient to satisfy the
> actual max number of threads used. On BDW GT1 and GT2 we reduce the
> value to avoid overallocating the scratch space needlessly. BDW GT3
> is unaffected.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_device_info.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/drivers/dri/i965/brw_device_info.c
> index 65942c2..2c3af66 100644
> --- a/src/mesa/drivers/dri/i965/brw_device_info.c
> +++ b/src/mesa/drivers/dri/i965/brw_device_info.c
> @@ -198,11 +198,11 @@ static const struct brw_device_info brw_device_info_hsw_gt3 = {
>     .has_llc = true,                                 \
>     .has_pln = true,                                 \
>     .max_vs_threads = 504,                           \
> -   .max_gs_threads = 504,                           \
> -   .max_wm_threads = 384                            \
> +   .max_gs_threads = 504                            \
>  
>  static const struct brw_device_info brw_device_info_bdw_gt1 = {
>     GEN8_FEATURES, .gt = 1,
> +   .max_wm_threads = 128,
>     .urb = {
>        .size = 192,
>        .min_vs_entries = 64,
> @@ -213,6 +213,7 @@ static const struct brw_device_info brw_device_info_bdw_gt1 = {
>  
>  static const struct brw_device_info brw_device_info_bdw_gt2 = {
>     GEN8_FEATURES, .gt = 2,
> +   .max_wm_threads = 192,
>     .urb = {
>        .size = 384,
>        .min_vs_entries = 64,
> @@ -223,6 +224,7 @@ static const struct brw_device_info brw_device_info_bdw_gt2 = {
>  
>  static const struct brw_device_info brw_device_info_bdw_gt3 = {
>     GEN8_FEATURES, .gt = 3,
> +   .max_wm_threads = 384,
>     .urb = {
>        .size = 384,
>        .min_vs_entries = 64,
> @@ -239,7 +241,7 @@ static const struct brw_device_info brw_device_info_chv = {
>     .has_llc = false,
>     .max_vs_threads = 80,
>     .max_gs_threads = 80,
> -   .max_wm_threads = 102,
> +   .max_wm_threads = 128,
>     .urb = {
>        .size = 128,
>        .min_vs_entries = 64,
> 

Yikes!  Thanks for catching this!

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

One issue though...the Cherryview fix definitely should be marked for stable
(add "Cc: mesa-stable at lists.freedesktop.org" to the commit message before
pushing).  But I'm not sure whether we want the BDW space reductions to hit
stable or not.  It's probably fine, but it's also unnecessary.

We could split the patch and mark only the CHV part go to stable, or just
mark the whole thing.  I'll leave it up to you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150121/d4225a09/attachment.sig>


More information about the mesa-dev mailing list