aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt/uc/intel_uc.h
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.h
parentdrm/i915/uc: Add init/fini to to intel_uc_ops (diff)
downloadlinux-dev-1868c7579f3522423b2f31f39e9ce752a4d457ab.tar.xz
linux-dev-1868c7579f3522423b2f31f39e9ce752a4d457ab.zip
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.h')
-rw-r--r--drivers/gpu/drm/i915/gt/uc/intel_uc.h3
1 files changed, 2 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 8c0ce0d9f190..49c913524686 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.h
@@ -13,6 +13,7 @@
struct intel_uc;
struct intel_uc_ops {
+ int (*sanitize)(struct intel_uc *uc);
void (*init_fw)(struct intel_uc *uc);
void (*fini_fw)(struct intel_uc *uc);
void (*init)(struct intel_uc *uc);
@@ -33,7 +34,6 @@ struct intel_uc {
void intel_uc_init_early(struct intel_uc *uc);
void intel_uc_driver_late_release(struct intel_uc *uc);
void intel_uc_init_mmio(struct intel_uc *uc);
-void intel_uc_sanitize(struct intel_uc *uc);
void intel_uc_reset_prepare(struct intel_uc *uc);
void intel_uc_suspend(struct intel_uc *uc);
void intel_uc_runtime_suspend(struct intel_uc *uc);
@@ -77,6 +77,7 @@ static inline _TYPE intel_uc_##_NAME(struct intel_uc *uc) \
return uc->ops->_OPS(uc); \
return _RET; \
}
+intel_uc_ops_function(sanitize, sanitize, int, 0);
intel_uc_ops_function(fetch_firmwares, init_fw, void, );
intel_uc_ops_function(cleanup_firmwares, fini_fw, void, );
intel_uc_ops_function(init, init, void, );