[Intel-gfx] [PATCH] drm/i915/guc: Fix a warning message problem during driver unload
yu.dai at intel.com
yu.dai at intel.com
Wed Dec 16 17:32:06 PST 2015
From: Alex Dai <yu.dai at intel.com>
The device struct_mutex needs to be held before releasing any GEM
objects allocated by GuC.
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;
--
2.5.0
More information about the Intel-gfx
mailing list