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

Thierry, Michel michel.thierry at intel.com
Thu Jul 31 17:47:42 CEST 2014



> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Daniel Vetter
> Sent: Wednesday, July 30, 2014 8:42 PM
> To: Intel Graphics Development
> Cc: Daniel Vetter
> Subject: [Intel-gfx] [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 at ffwll.ch>
> ---
>  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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6656 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140731/46a97d88/attachment.bin>


More information about the Intel-gfx mailing list