diff mbox series

[v2,2/7] drm/i915/guc/ct: Drop guards in enable/disable calls

Message ID 20191217012316.13271-2-daniele.ceraolospurio@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/7] drm/i915/guc: Merge communication_stop and communication_disable | expand

Commit Message

Daniele Ceraolo Spurio Dec. 17, 2019, 1:23 a.m. UTC
We track the status of the GuC much more closely now and we expect the
enable/disable functions to be correctly called only once. If this isn't
true we do want to flag it as a flow failure (via the BUG_ON in the ctch
functions) and not silently ignore the call.

Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Michal Wajdeczko Dec. 17, 2019, 9:30 p.m. UTC | #1
On Tue, 17 Dec 2019 02:23:11 +0100, Daniele Ceraolo Spurio  
<daniele.ceraolospurio@intel.com> wrote:

> We track the status of the GuC much more closely now and we expect the
> enable/disable functions to be correctly called only once. If this isn't
> true we do want to flag it as a flow failure (via the BUG_ON in the ctch
> functions) and not silently ignore the call.
>
> Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index f74ba4750a94..b23b46619742 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -862,9 +862,6 @@  int intel_guc_ct_enable(struct intel_guc_ct *ct)
 	struct intel_guc *guc = ct_to_guc(ct);
 	struct intel_guc_ct_channel *ctch = &ct->host_channel;
 
-	if (ctch->enabled)
-		return 0;
-
 	return ctch_enable(guc, ctch);
 }
 
@@ -877,8 +874,5 @@  void intel_guc_ct_disable(struct intel_guc_ct *ct)
 	struct intel_guc *guc = ct_to_guc(ct);
 	struct intel_guc_ct_channel *ctch = &ct->host_channel;
 
-	if (!ctch->enabled)
-		return;
-
 	ctch_disable(guc, ctch);
 }