[Intel-gfx] [PATCH 14/15] drm/i915: Cleanup aliasging ppgtt alongside the global gtt
Thierry, Michel
michel.thierry at intel.com
Fri Aug 8 15:09:25 CEST 2014
> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Daniel Vetter
> Sent: Wednesday, August 06, 2014 2:05 PM
> To: Intel Graphics Development
> Cc: Daniel Vetter
> Subject: [Intel-gfx] [PATCH 14/15] drm/i915: Cleanup aliasging ppgtt
> alongside the global gtt
>
> Also remove related WARN_ONs which seem to have been hit since a rather
> long time. But apperently no one noticed since our module reload is
> already WARNING-infested :(
>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_dma.c | 4 ----
> drivers/gpu/drm/i915/i915_gem_gtt.c | 7 +++++++
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c
> b/drivers/gpu/drm/i915/i915_dma.c
> index c176a6c97c80..94afe7c4458b 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1388,7 +1388,6 @@ cleanup_gem:
> i915_gem_cleanup_ringbuffer(dev);
> i915_gem_context_fini(dev);
> mutex_unlock(&dev->struct_mutex);
> - WARN_ON(dev_priv->mm.aliasing_ppgtt);
> cleanup_irq:
> drm_irq_uninstall(dev);
> cleanup_gem_stolen:
> @@ -1897,7 +1896,6 @@ int i915_driver_unload(struct drm_device *dev)
> mutex_lock(&dev->struct_mutex);
> i915_gem_cleanup_ringbuffer(dev);
> i915_gem_context_fini(dev);
> - WARN_ON(dev_priv->mm.aliasing_ppgtt);
> mutex_unlock(&dev->struct_mutex);
> i915_gem_cleanup_stolen(dev);
>
> @@ -1905,8 +1903,6 @@ int i915_driver_unload(struct drm_device *dev)
> i915_free_hws(dev);
> }
>
> - WARN_ON(!list_empty(&dev_priv->vm_list));
> -
> drm_vblank_cleanup(dev);
>
> intel_teardown_gmbus(dev);
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c
> b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 2eab0b6a32e8..ff031bb1f296 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1801,6 +1801,12 @@ void i915_global_gtt_cleanup(struct drm_device
> *dev)
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct i915_address_space *vm = &dev_priv->gtt.base;
>
> + if (dev_priv->mm.aliasing_ppgtt) {
> + struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
> +
> + ppgtt->base.cleanup(&ppgtt->base);
> + }
> +
> if (drm_mm_initialized(&vm->mm)) {
> drm_mm_takedown(&vm->mm);
> list_del(&vm->global_link);
> @@ -1808,6 +1814,7 @@ void i915_global_gtt_cleanup(struct drm_device
> *dev)
>
> vm->cleanup(vm);
> }
> +
> static int setup_scratch_page(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
> --
> 1.9.3
Reviewed-by: Michel Thierry <michel.thierry at intel.com>
>
> _______________________________________________
> 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/20140808/c0b04113/attachment.bin>
More information about the Intel-gfx
mailing list