diff mbox series

[3/4] drm/i915/uc: Remove redundant GuC support checks

Message ID 20190804195052.31140-4-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show
Series Don't fail on HuC early init errors | expand

Commit Message

Michal Wajdeczko Aug. 4, 2019, 7:50 p.m. UTC
Since commit db81bc6eb9c0 ("drm/i915/uc: Consider enable_guc
modparam during fw selection") we have started using firmware
status as main indicator of the GuC support. No need to use
same checks twice.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Chris Wilson Aug. 5, 2019, 5:20 p.m. UTC | #1
Quoting Michal Wajdeczko (2019-08-04 20:50:51)
> Since commit db81bc6eb9c0 ("drm/i915/uc: Consider enable_guc
> modparam during fw selection") we have started using firmware
> status as main indicator of the GuC support. No need to use
> same checks twice.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index fe526698eee2..1ddd252419ec 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -306,9 +306,6 @@  int intel_uc_init(struct intel_uc *uc)
 	if (!intel_uc_supports_guc(uc))
 		return 0;
 
-	if (!intel_uc_fw_supported(&guc->fw))
-		return -ENODEV;
-
 	/* XXX: GuC submission is unavailable for now */
 	GEM_BUG_ON(intel_uc_supports_guc_submission(uc));
 
@@ -336,8 +333,6 @@  void intel_uc_fini(struct intel_uc *uc)
 	if (!intel_uc_supports_guc(uc))
 		return;
 
-	GEM_BUG_ON(!intel_uc_fw_supported(&guc->fw));
-
 	if (intel_uc_supports_huc(uc))
 		intel_huc_fini(&uc->huc);
 
@@ -351,7 +346,7 @@  static int __uc_sanitize(struct intel_uc *uc)
 	struct intel_guc *guc = &uc->guc;
 	struct intel_huc *huc = &uc->huc;
 
-	GEM_BUG_ON(!intel_uc_fw_supported(&guc->fw));
+	GEM_BUG_ON(!intel_uc_supports_guc(uc));
 
 	intel_huc_sanitize(huc);
 	intel_guc_sanitize(guc);
@@ -429,8 +424,6 @@  int intel_uc_init_hw(struct intel_uc *uc)
 	if (!intel_uc_supports_guc(uc))
 		return 0;
 
-	GEM_BUG_ON(!intel_uc_fw_supported(&guc->fw));
-
 	ret = uc_init_wopcm(uc);
 	if (ret)
 		goto err_out;
@@ -530,8 +523,6 @@  void intel_uc_fini_hw(struct intel_uc *uc)
 	if (!intel_guc_is_running(guc))
 		return;
 
-	GEM_BUG_ON(!intel_uc_fw_supported(&guc->fw));
-
 	if (intel_uc_supports_guc_submission(uc))
 		intel_guc_submission_disable(guc);