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_huc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/i915/gt/uc/intel_huc.h') diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h index f8a4557c8d6d..644c059fe01d 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.h @@ -38,7 +38,12 @@ static inline int intel_huc_sanitize(struct intel_huc *huc) static inline bool intel_huc_is_supported(struct intel_huc *huc) { - return intel_uc_fw_supported(&huc->fw); + return intel_uc_fw_is_supported(&huc->fw); +} + +static inline bool intel_huc_is_enabled(struct intel_huc *huc) +{ + return intel_uc_fw_is_enabled(&huc->fw); } static inline bool intel_huc_is_authenticated(struct intel_huc *huc) -- cgit v1.2.3