diff options
author | Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> | 2018-10-02 14:54:28 -0700 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-10-04 07:29:47 +0100 |
commit | 48b426a9b9ab93481a2c5b913c2c6add5fb1001a (patch) | |
tree | 4829895947918e64e6998ff613a393c1049dc081 /drivers/gpu/drm/i915/intel_guc.h | |
parent | bc2477f7d3f3083d344b327e358e43093054023c (diff) | |
download | linux-stable-48b426a9b9ab93481a2c5b913c2c6add5fb1001a.tar.gz linux-stable-48b426a9b9ab93481a2c5b913c2c6add5fb1001a.tar.bz2 linux-stable-48b426a9b9ab93481a2c5b913c2c6add5fb1001a.zip |
drm/i915/guc: init GuC descriptors after GuC load
GuC stores some data in there, which might be stale after a reset.
We already reset the WQ head and tail, but more things are being moved
to the descriptor with the interface updates. Instead of trying to track
them one by one, always memset and init the descriptors from scratch
after GuC is loaded.
The code is also reorganized so that the above operations and the
doorbell creation are grouped as "client enabling"
v2: add proc_desc_fini for symmetry (Daniele), remove unneeded var init,
add guc_is_alive() (Michal)
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20181002215430.15049-1-daniele.ceraolospurio@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_guc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h index ad42faf48c46..0f1c4f9ebfd8 100644 --- a/drivers/gpu/drm/i915/intel_guc.h +++ b/drivers/gpu/drm/i915/intel_guc.h @@ -95,6 +95,11 @@ 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) { |