From: Michal Wajdeczko Date: Fri, 7 Feb 2020 13:19:38 +0000 (+0000) Subject: drm/i915/guc: Make sure to sanitize CT status X-Git-Tag: baikal/mips/sdk5.9~13997^2~18^2~129 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=3b95c03e8ccb4aff7f80b6dc536938a1549dc0bc;p=kernel.git 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: e0068b0f5445 ("drm/i915/guc: Introduce guc_is_ready") Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200207131938.2787828-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h index 7ca9e5159f05b..668b067b71e27 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 97913bbb8be3b..494a51a5200fc 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;