From 356c484822e6ac97dad6947c083fc45d07332c7c Mon Sep 17 00:00:00 2001 From: Michal Wajdeczko Date: Fri, 16 Aug 2019 20:56:58 +0000 Subject: drm/i915/uc: Add explicit DISABLED state for firmware We really need to have separate NOT_SUPPORTED state (for lack of hardware support) and DISABLED state (to indicate user decision) as we will have to take special steps even if GuC firmware is now disabled but hardware exists and could have been previously used. v2: fix logic (Chris/CI) v3: use proper check to avoid probe failure (CI) v4: explain status transitions (Chris) Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190816205658.15020-1-michal.wajdeczko@intel.com --- drivers/gpu/drm/i915/gt/uc/intel_uc.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/i915/gt/uc/intel_uc.h') diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.h b/drivers/gpu/drm/i915/gt/uc/intel_uc.h index bfb6f97578a5..1b9404a75ac0 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.h @@ -39,14 +39,29 @@ static inline bool intel_uc_supports_guc(struct intel_uc *uc) return intel_guc_is_supported(&uc->guc); } +static inline bool intel_uc_uses_guc(struct intel_uc *uc) +{ + return intel_guc_is_enabled(&uc->guc); +} + static inline bool intel_uc_supports_guc_submission(struct intel_uc *uc) { return intel_guc_is_submission_supported(&uc->guc); } +static inline bool intel_uc_uses_guc_submission(struct intel_uc *uc) +{ + return intel_guc_is_submission_supported(&uc->guc); +} + static inline bool intel_uc_supports_huc(struct intel_uc *uc) { - return intel_huc_is_supported(&uc->huc); + return intel_uc_supports_guc(uc); +} + +static inline bool intel_uc_uses_huc(struct intel_uc *uc) +{ + return intel_huc_is_enabled(&uc->huc); } #endif -- cgit v1.2.3