[Intel-gfx] [PATCH 2/4] drm/i915/gtt: Warn if the next layer scratch dma is invalid

Michel Thierry michel.thierry at intel.com
Tue Jun 30 09:59:27 PDT 2015


On 6/30/2015 4:16 PM, Mika Kuoppala wrote:
> When dma page is setup, warn if we try to point the entries
> to a uninitialized (zero) dma address. Like we do with gen6

Reviewed-by: Michel Thierry <michel.thierry at intel.com>

[Mental note to add the same in the future pdp initialize function].

>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> ---
>   drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 23f5896..78bfb88 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -427,6 +427,8 @@ static void gen8_initialize_pt(struct i915_address_space *vm,
>   {
>   	gen8_pte_t scratch_pte;
>
> +	WARN_ON(px_dma(vm->scratch_page) == 0);
> +
>   	scratch_pte = gen8_pte_encode(px_dma(vm->scratch_page),
>   				      I915_CACHE_LLC, true);
>
> @@ -488,6 +490,8 @@ static void gen8_initialize_pd(struct i915_address_space *vm,
>   {
>   	gen8_pde_t scratch_pde;
>
> +	WARN_ON(px_dma(vm->scratch_pt) == 0);
> +
>   	scratch_pde = gen8_pde_encode(px_dma(vm->scratch_pt), I915_CACHE_LLC);
>
>   	fill_px(vm->dev, pd, scratch_pde);
>


More information about the Intel-gfx mailing list