Re: [PATCH] drm/i915: Do not re-allocate vmas in aliasing ppgtt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michel Thierry <michel.thierry@xxxxxxxxx> writes:

> Aliasing ppgtt is fully allocated right after creation, thus shouldn't
> need to call allocate_va_range in i915_vma_bind.
>
> This duplication started after commit 5c5f645773b6d147bf68c350674dc3ef4f8de83d
> ("drm/i915: drm/i915: Unify aliasing ppgtt handling"), as aliasing ppgtt
> now also uses allocate_va_range.
>

I understood that Daniel's intention was to unify the initialization
and the handling of ppgtt vm areas. The only special case for
aliasing ppgtt would be that the whole vm area would be preallocated
after generic ppgtt_init (what the Unify patch does).

Even with full ppgtt, we get calls to allocate_va_range where
there is already structure in place (as we dont teardown vm space).

I would prefer to keep the aliasing like that. There might
be small performance cost if we omit checking for aliasing
early. But we gain common code path and aliasing looks like
less special and only contained in init (in this case).

Thanks,
-Mika

> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> Signed-off-by: Michel Thierry <michel.thierry@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 7b13273..e8c0ab0 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3242,7 +3242,7 @@ int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
>  {
>  	int ret;
>  
> -	if (vma->vm->allocate_va_range) {
> +	if (vma->vm->allocate_va_range && USES_FULL_PPGTT(dev)) {
>  		trace_i915_va_alloc(vma->vm, vma->node.start,
>  				    vma->node.size,
>  				    VM_TO_TRACE_NAME(vma->vm));
> -- 
> 2.1.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux