summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/uc/intel_uc.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2020-01-10 22:27:23 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-01-11 08:34:29 +0000
commit1868c7579f3522423b2f31f39e9ce752a4d457ab (patch)
treecbaa0ceb02f780d3257490ceaf396896c412d7fb /drivers/gpu/drm/i915/gt/uc/intel_uc.c
parentcc93f7b040c35e21bf6c477a37e042641c19e5ab (diff)
drm/i915/uc: Add sanitize to to intel_uc_ops
uC sanitization is only meaningful if we are running with uC present or enabled. Make this function part of the uc_ops. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> 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/20200110222723.14724-5-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/uc/intel_uc.c')
-rw-r--r--drivers/gpu/drm/i915/gt/uc/intel_uc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index 105b7792c9a0..64934a876a50 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -315,14 +315,6 @@ static int __uc_sanitize(struct intel_uc *uc)
return __intel_uc_reset_hw(uc);
}
-void intel_uc_sanitize(struct intel_uc *uc)
-{
- if (!intel_uc_supports_guc(uc))
- return;
-
- __uc_sanitize(uc);
-}
-
/* Initialize and verify the uC regs related to uC positioning in WOPCM */
static int uc_init_wopcm(struct intel_uc *uc)
{
@@ -615,6 +607,8 @@ static const struct intel_uc_ops uc_ops_off = {
};
static const struct intel_uc_ops uc_ops_on = {
+ .sanitize = __uc_sanitize,
+
.init_fw = __uc_fetch_firmwares,
.fini_fw = __uc_cleanup_firmwares,