diff options
author | Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> | 2019-07-13 11:00:07 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-13 19:51:32 +0100 |
commit | e3f503f1c7331a4f895b97426e7d769a89e864db (patch) | |
tree | a8c79edaea92b68e9f94bacef274b0f2e9799836 /drivers/gpu/drm/i915/intel_uc.c | |
parent | a30eff49d08ca32b6c4e573a4b07c13b4881f2d3 (diff) |
drm/i915/uc: replace uc init/fini misc
The "misc" terminology doesn't clearly explain what we intend to cover
in this phase. The only thing we used ot do in there apart from FW fetch
was initializing the log workqueue, with the latter being required only in
the very rare case where we enable the log relay. As we no longer create
our own workqueue, piggybacking on the system_highpri_wq instead, we can
rename the function to clarify that they only fetch/release the blobs.
v2: only create log wq when needed (Michal), reword commit msg
accordingly
v3: after rebase the wq is gone, reword commit msg accordingly
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190713100016.8026-2-chris@chris-wilson.co.uk
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_uc.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index bc589efd3a6d..00baaccc2f1c 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -349,44 +349,26 @@ static void guc_disable_communication(struct intel_guc *guc) DRM_INFO("GuC communication disabled\n"); } -int intel_uc_init_misc(struct drm_i915_private *i915) +void intel_uc_fetch_firmwares(struct drm_i915_private *i915) { - struct intel_guc *guc = &i915->guc; - struct intel_huc *huc = &i915->huc; - int ret; - if (!USES_GUC(i915)) - return 0; - - ret = intel_guc_init_misc(guc); - if (ret) - return ret; - - if (USES_HUC(i915)) { - ret = intel_huc_init_misc(huc); - if (ret) - goto err_guc; - } + return; - return 0; + intel_uc_fw_fetch(i915, &i915->guc.fw); -err_guc: - intel_guc_fini_misc(guc); - return ret; + if (USES_HUC(i915)) + intel_uc_fw_fetch(i915, &i915->huc.fw); } -void intel_uc_fini_misc(struct drm_i915_private *i915) +void intel_uc_cleanup_firmwares(struct drm_i915_private *i915) { - struct intel_guc *guc = &i915->guc; - struct intel_huc *huc = &i915->huc; - if (!USES_GUC(i915)) return; if (USES_HUC(i915)) - intel_huc_fini_misc(huc); + intel_uc_fw_cleanup_fetch(&i915->huc.fw); - intel_guc_fini_misc(guc); + intel_uc_fw_cleanup_fetch(&i915->guc.fw); } int intel_uc_init(struct drm_i915_private *i915) |