From 202c98e7169248480d97a79416cbfb1154903d99 Mon Sep 17 00:00:00 2001 From: Daniele Ceraolo Spurio Date: Tue, 18 Feb 2020 14:33:24 -0800 Subject: drm/i915/guc: Apply new uC status tracking to GuC submission as well To be able to differentiate the before and after of our commitment to GuC submission, which will be used in follow-up patches to early set-up the submission structures. v2: move functions to guc_submission.h (Michal) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Reviewed-by: John Harrison Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200218223327.11058-7-daniele.ceraolospurio@intel.com --- drivers/gpu/drm/i915/gt/uc/intel_uc.h | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (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 a41aaf353f88..c1f39bdc115a 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.h @@ -7,6 +7,7 @@ #define _INTEL_UC_H_ #include "intel_guc.h" +#include "intel_guc_submission.h" #include "intel_huc.h" #include "i915_params.h" @@ -61,33 +62,24 @@ int intel_uc_runtime_resume(struct intel_uc *uc); * - In use: wanted + firmware found on the system and successfully fetched. */ -#define __uc_state_checker(x, state, required) \ -static inline bool intel_uc_##state##_##x(struct intel_uc *uc) \ +#define __uc_state_checker(x, func, state, required) \ +static inline bool intel_uc_##state##_##func(struct intel_uc *uc) \ { \ - return intel_##x##_is_##required(&uc->x); \ + return intel_##func##_is_##required(&uc->x); \ } -#define uc_state_checkers(x) \ -__uc_state_checker(x, supports, supported) \ -__uc_state_checker(x, wants, wanted) \ -__uc_state_checker(x, uses, used) +#define uc_state_checkers(x, func) \ +__uc_state_checker(x, func, supports, supported) \ +__uc_state_checker(x, func, wants, wanted) \ +__uc_state_checker(x, func, uses, used) -uc_state_checkers(guc); -uc_state_checkers(huc); +uc_state_checkers(guc, guc); +uc_state_checkers(huc, huc); +uc_state_checkers(guc, guc_submission); #undef uc_state_checkers #undef __uc_state_checker -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); -} - #define intel_uc_ops_function(_NAME, _OPS, _TYPE, _RET) \ static inline _TYPE intel_uc_##_NAME(struct intel_uc *uc) \ { \ -- cgit v1.2.3