diff options
author | Michal Wajdeczko <[email protected]> | 2020-02-07 13:19:38 +0000 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2020-02-07 17:12:17 +0000 |
commit | 9adcf0db237c7db6cadc83a8ed8cbc5a4bf8623b (patch) | |
tree | 5ec23bcfc62b5a517675ffcd0fefa090a53ac819 | |
parent | 793c226173675ea7f8591d22803a1432e2b724e0 (diff) |
drm/i915/guc: Make sure to sanitize CT status
We are sanitizing firmware status and old mmio message, but
we forget to sanitize CT status.
Fixes: e85de1770385 ("drm/i915/guc: Introduce guc_is_ready")
Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Chris Wilson <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/gt/uc/intel_guc.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h index 7ca9e5159f05..668b067b71e2 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h @@ -161,6 +161,7 @@ static inline bool intel_guc_is_ready(struct intel_guc *guc) static inline int intel_guc_sanitize(struct intel_guc *guc) { intel_uc_fw_sanitize(&guc->fw); + intel_guc_ct_sanitize(&guc->ct); guc->mmio_msg = 0; return 0; diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h index 97913bbb8be3..494a51a5200f 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h @@ -65,6 +65,11 @@ void intel_guc_ct_fini(struct intel_guc_ct *ct); int intel_guc_ct_enable(struct intel_guc_ct *ct); void intel_guc_ct_disable(struct intel_guc_ct *ct); +static inline void intel_guc_ct_sanitize(struct intel_guc_ct *ct) +{ + ct->enabled = false; +} + static inline bool intel_guc_ct_enabled(struct intel_guc_ct *ct) { return ct->enabled; |