Skip to content

Commit

Permalink
drm/i915/guc: Make sure to sanitize CT status
Browse files Browse the repository at this point in the history
We are sanitizing firmware status and old mmio message, but
we forget to sanitize CT status.

Fixes: e85de17 ("drm/i915/guc: Introduce guc_is_ready")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@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>
Link: https://patchwork.freedesktop.org/patch/msgid/20200207131938.2787828-1-chris@chris-wilson.co.uk
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Michal Wajdeczko authored and Chris Wilson committed Feb 7, 2020
1 parent 793c226 commit 9adcf0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/gt/uc/intel_guc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9adcf0d

Please sign in to comment.