[Intel-gfx] [PATCH 15/29] drm/i915: Parametrize MOCS registers

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 5 03:15:49 PST 2015


On Wed, Nov 04, 2015 at 11:20:03PM +0200, ville.syrjala at linux.intel.com wrote:
>  	if (get_mocs_settings(req->ring->dev, &t)) {
>  		/* Program the control registers */
> -		ret = emit_mocs_control_table(req, &t, GEN9_GFX_MOCS_0);
> +		ret = emit_mocs_control_table(req, &t, RCS);
>  		if (ret)
>  			return ret;
>  
> -		ret = emit_mocs_control_table(req, &t, GEN9_MFX0_MOCS_0);
> +		ret = emit_mocs_control_table(req, &t, VCS);
>  		if (ret)
>  			return ret;
>  
> -		ret = emit_mocs_control_table(req, &t, GEN9_MFX1_MOCS_0);
> +		ret = emit_mocs_control_table(req, &t, VCS2);
>  		if (ret)
>  			return ret;
>  
> -		ret = emit_mocs_control_table(req, &t, GEN9_VEBOX_MOCS_0);
> +		ret = emit_mocs_control_table(req, &t, VECS);
>  		if (ret)
>  			return ret;
>  
> -		ret = emit_mocs_control_table(req, &t, GEN9_BLT_MOCS_0);
> +		ret = emit_mocs_control_table(req, &t, BCS);
>  		if (ret)
>  			return ret;

For bonus points!

if (get_mocs_settings())
	for_each_ring(dev_priv, ring, i) {
		ret = emit_mocs_control_table(req, &t, i);
 		if (ret)
  			return ret;
	}

And then I am definitely sold.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list