diff mbox

[v12,07/11] drm/i915/guc: Update i915.enable_guc_loading check in intel_uc_fini_hw

Message ID 1506581329-29720-8-git-send-email-sagar.a.kamble@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sagar.a.kamble@intel.com Sept. 28, 2017, 6:48 a.m. UTC
With most of the GuC disabling now separated from enable_guc_submission
parameter, only function that needs GuC parameter check is
i915_disable_guc_ggtt as that is enabled based on GuC kernel parameters.
Hence i915_disable_guc_ggtt is being called when enable_guc_loading is
set.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/intel_uc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Joonas Lahtinen Sept. 29, 2017, 12:29 p.m. UTC | #1
On Thu, 2017-09-28 at 12:18 +0530, Sagar Arun Kamble wrote:
> With most of the GuC disabling now separated from enable_guc_submission
> parameter, only function that needs GuC parameter check is
> i915_disable_guc_ggtt as that is enabled based on GuC kernel parameters.
> Hence i915_disable_guc_ggtt is being called when enable_guc_loading is
> set.
> 
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>

This already depends on the previus changes, so I'm waiting for a
re-roll of the series after discussion on the previous patches.

Regards, Joonas
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index ea7c39c..b900e95 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -471,9 +471,6 @@  void intel_uc_fini_hw(struct drm_i915_private *dev_priv)
 {
 	guc_free_load_err_log(&dev_priv->guc);
 
-	if (!i915_modparams.enable_guc_loading)
-		return;
-
 	i915_guc_submission_disable(dev_priv);
 
 	guc_disable_communication(&dev_priv->guc);
@@ -481,7 +478,8 @@  void intel_uc_fini_hw(struct drm_i915_private *dev_priv)
 	gen9_disable_guc_interrupts(dev_priv);
 	i915_guc_submission_fini(dev_priv);
 
-	i915_ggtt_disable_guc(dev_priv);
+	if (i915_modparams.enable_guc_loading)
+		i915_ggtt_disable_guc(dev_priv);
 }
 
 int intel_uc_runtime_suspend(struct drm_i915_private *dev_priv)