[Intel-gfx] [PATCH] drm/i915: Only unlink ggtt->global_link after i915_gem_load

Chris Wilson chris at chris-wilson.co.uk
Mon Dec 16 19:58:20 CET 2013


On Mon, Dec 16, 2013 at 12:01:07PM +0000, Chris Wilson wrote:
> If i915_driver_load fails before i915_gem_load we try to unlink the ggtt
> prior to initialising the list and triggering an oops.

This is incomplete.
 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index df1410ecbb8b..6364c503f97d 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1683,11 +1683,11 @@ out_gem_unload:
>  	intel_teardown_gmbus(dev);
>  	intel_teardown_mchbar(dev);
>  	destroy_workqueue(dev_priv->wq);
> +	list_del(&dev_priv->gtt.base.global_link);
+	dev_priv->gtt.base.cleanup(&dev_priv->gtt.base);
>  out_mtrrfree:
>  	arch_phys_wc_del(dev_priv->gtt.mtrr);
>  	io_mapping_free(dev_priv->gtt.mappable);
>  out_gtt:
> -	list_del(&dev_priv->gtt.base.global_link);
-  	drm_mm_takedown(&dev_priv->gtt.base.mm);
-  	dev_priv->gtt.base.cleanup(&dev_priv->gtt.base);

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list