Message ID | 20190522193203.23932-5-michal.wajdeczko@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | GuC fixes | expand |
Quoting Michal Wajdeczko (2019-05-22 20:31:58) > This function just check our software flag, while 'is_alive' > may suggest that we are checking runtime firmware status. > > 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> > --- > drivers/gpu/drm/i915/intel_guc.h | 10 +++++----- > drivers/gpu/drm/i915/intel_guc_submission.c | 2 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h > index 2494e84831a2..d4b015ab8a36 100644 > --- a/drivers/gpu/drm/i915/intel_guc.h > +++ b/drivers/gpu/drm/i915/intel_guc.h > @@ -96,11 +96,6 @@ struct intel_guc { > void (*notify)(struct intel_guc *guc); > }; > > -static inline bool intel_guc_is_alive(struct intel_guc *guc) > -{ > - return intel_uc_fw_is_loaded(&guc->fw); > -} > - > static > inline int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len) > { > @@ -176,6 +171,11 @@ u32 intel_guc_reserved_gtt_size(struct intel_guc *guc); > int intel_guc_reserve_ggtt_top(struct intel_guc *guc); > void intel_guc_release_ggtt_top(struct intel_guc *guc); > > +static inline bool intel_guc_is_loaded(struct intel_guc *guc) > +{ > + return intel_uc_fw_is_loaded(&guc->fw); > +} Aye, a better reflection. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h index 2494e84831a2..d4b015ab8a36 100644 --- a/drivers/gpu/drm/i915/intel_guc.h +++ b/drivers/gpu/drm/i915/intel_guc.h @@ -96,11 +96,6 @@ struct intel_guc { void (*notify)(struct intel_guc *guc); }; -static inline bool intel_guc_is_alive(struct intel_guc *guc) -{ - return intel_uc_fw_is_loaded(&guc->fw); -} - static inline int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len) { @@ -176,6 +171,11 @@ u32 intel_guc_reserved_gtt_size(struct intel_guc *guc); int intel_guc_reserve_ggtt_top(struct intel_guc *guc); void intel_guc_release_ggtt_top(struct intel_guc *guc); +static inline bool intel_guc_is_loaded(struct intel_guc *guc) +{ + return intel_uc_fw_is_loaded(&guc->fw); +} + static inline int intel_guc_sanitize(struct intel_guc *guc) { intel_uc_fw_sanitize(&guc->fw); diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c index ea0e3734d37c..987ff586d7f9 100644 --- a/drivers/gpu/drm/i915/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/intel_guc_submission.c @@ -1199,7 +1199,7 @@ static void __guc_client_disable(struct intel_guc_client *client) * the case, instead of trying (in vain) to communicate with it, let's * just cleanup the doorbell HW and our internal state. */ - if (intel_guc_is_alive(client->guc)) + if (intel_guc_is_loaded(client->guc)) destroy_doorbell(client); else __fini_doorbell(client);
This function just check our software flag, while 'is_alive' may suggest that we are checking runtime firmware status. 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> --- drivers/gpu/drm/i915/intel_guc.h | 10 +++++----- drivers/gpu/drm/i915/intel_guc_submission.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)