[Intel-gfx] [PATCH 5/9] drm/i915: Rename drm_gem_object_unreference in preparation for lockless free

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Wed Jul 20 11:43:28 UTC 2016


On ke, 2016-07-20 at 09:59 +0100, Chris Wilson wrote:

> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index 605c69658d2c..75a1496ceb6f 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -737,13 +737,15 @@ void intel_guc_fini(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
>  
> +	if (!guc_fw->guc_fw_obj)
> +		return;
> +

This is definitely not a mechanical change, should be split to separate
patch (maybe outside of this series too).

With that split out,

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas

>  	mutex_lock(&dev->struct_mutex);
>  	direct_interrupts_to_host(dev_priv);
>  	i915_guc_submission_disable(dev_priv);
>  	i915_guc_submission_fini(dev_priv);
>  
> -	if (guc_fw->guc_fw_obj)
> -		drm_gem_object_unreference(&guc_fw->guc_fw_obj->base);
> +	i915_gem_object_put(guc_fw->guc_fw_obj);
>  	guc_fw->guc_fw_obj = NULL;
>  	mutex_unlock(&dev->struct_mutex);
>  

-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list