Re: [PATCH 5/7] drm/i915: Initialize the aliasing ppgtt as part of global gtt

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

 




> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf
> Of Daniel Vetter
> Sent: Wednesday, July 30, 2014 8:42 PM
> To: Intel Graphics Development
> Cc: Daniel Vetter
> Subject:  [PATCH 5/7] drm/i915: Initialize the aliasing ppgtt
as part
> of global gtt
> 
> Stuffing this into the context setup code doesn't make a lot of sense.
> Also reusing the real ppgtt setup code makes even less sense since the
> aliasing ppgtt isn't a real address space. Leaving all that stuff
> unitialized will make sure that we catch any abusers promptly.
> 
> This is also a prep work to clean up the context->ppgtt link.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem_context.c | 13 +------------
>  drivers/gpu/drm/i915/i915_gem_gtt.c     | 31
> +++++++++++++++++++++++++------
>  2 files changed, 26 insertions(+), 18 deletions(-)
> 
> @@ -1766,6 +1771,20 @@ int i915_gem_setup_global_gtt(struct drm_device
> *dev,
>  	/* And finally clear the reserved guard page */
>  	ggtt_vm->clear_range(ggtt_vm, end - PAGE_SIZE, PAGE_SIZE, true);
> 
> +	if (HAS_ALIASING_PPGTT(dev) && USES_FULL_PPGTT(dev)) {
> +		struct i915_hw_ppgtt *ppgtt;
> +
> +		ppgtt = kzalloc(sizeof(*ppgtt), GFP_KERNEL);
> +		if (!ppgtt)
> +			return -ENOMEM;
> +
> +		ret = __hw_ppgtt_init(dev, ppgtt);
> +		if (!ret)
__hw_ppgtt_init will return '0' if successful.
  
> +			return ret;
> +
> +		dev_priv->mm.aliasing_ppgtt = ppgtt;
> +	}
> +
>  	return 0;
>  }
> 
> --
> 1.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
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