[Intel-gfx] [PATCH 15/53] drm/i915/bdw: Don't write PDP in the legacy way when using LRCs

Volkin, Bradley D bradley.d.volkin at intel.com
Thu Jun 19 01:42:48 CEST 2014


On Fri, Jun 13, 2014 at 08:37:33AM -0700, oscar.mateo at intel.com wrote:
> From: Oscar Mateo <oscar.mateo at intel.com>
> 
> This is mostly for correctness so that we know we are running the LR
> context correctly (this is, the PDPs are contained inside the context
> object).
> 
> v2: Move the check to inside the enable PPGTT function. The switch
> happens in two places: the legacy context switch (that we won't hit
> when Execlists are enabled) and the PPGTT enable, which unfortunately
> we need. This would look much nicer if the ppgtt->enable was part of
> the ring init, where it logically belongs.
> 
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 8b3cde7..9f0c69e 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -844,6 +844,11 @@ static int gen8_ppgtt_enable(struct i915_hw_ppgtt *ppgtt)
>  		if (USES_FULL_PPGTT(dev))
>  			continue;
>  
> +		/* In the case of Execlists, we don't want to write the PDPs
> +		 * in the legacy way (they live inside the context now) */
> +		if (intel_enable_execlists(dev))
> +			return 0;

Along the lines of one of Daniel's comments about the module parameter,
I think we could use some clarity on when to use intel_enable_execlists()
vs lrc_enabled vs i915.enable_execlists.

Brad

> +
>  		ret = ppgtt->switch_mm(ppgtt, ring, true);
>  		if (ret)
>  			goto err_out;
> -- 
> 1.9.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



More information about the Intel-gfx mailing list