[Intel-gfx] [PATCH] drm/i915/guc: Fix a warning message problem during driver unload
Jani Nikula
jani.nikula at linux.intel.com
Fri Dec 18 01:55:34 PST 2015
On Thu, 17 Dec 2015, yu.dai at intel.com wrote:
> From: Alex Dai <yu.dai at intel.com>
>
> The device struct_mutex needs to be held before releasing any GEM
> objects allocated by GuC.
This is indeed so, but your patch subject needs to say it fixes an
actual bug rather than a "warning message problem" which makes one think
it's benign.
Also, if you see a warning splat in dmesg, please include that in the
commit message when you fix it. It's *much* easier to match bug reports
with fixes when you have that.
BR,
Jani.
>
> Signed-off-by: Alex Dai <yu.dai at intel.com>
> ---
> drivers/gpu/drm/i915/intel_guc_loader.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index 625272f4..4748651 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -631,10 +631,10 @@ void intel_guc_ucode_fini(struct drm_device *dev)
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
>
> + mutex_lock(&dev->struct_mutex);
> direct_interrupts_to_host(dev_priv);
> i915_guc_submission_fini(dev);
>
> - mutex_lock(&dev->struct_mutex);
> if (guc_fw->guc_fw_obj)
> drm_gem_object_unreference(&guc_fw->guc_fw_obj->base);
> guc_fw->guc_fw_obj = NULL;
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list