diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2019-08-16 23:56:58 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-17 01:45:54 +0300 |
commit | 356c484822e6ac97dad6947c083fc45d07332c7c (patch) | |
tree | e191cfec02c2017fb2a0e89f43be0a892144370d /drivers/gpu/drm/i915/gt/uc/intel_uc.h | |
parent | 4cb3b44d6b7185611a4f0fd613c05a9e57d7ad94 (diff) | |
download | linux-356c484822e6ac97dad6947c083fc45d07332c7c.tar.xz |
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 <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>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190816205658.15020-1-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/uc/intel_uc.h')
-rw-r--r-- | drivers/gpu/drm/i915/gt/uc/intel_uc.h | 17 |
1 files changed, 16 insertions, 1 deletions
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 |