diff options
author | Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> | 2019-07-25 10:46:55 -0700 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-26 09:07:08 +0100 |
commit | edad25476ba353cfc0f3b34b150888b46f18e8a6 (patch) | |
tree | d7b50df4f0b641a670148ba16dfd0cfc6a8384d3 /drivers/gpu/drm/i915/gt/uc/intel_uc.c | |
parent | 97dee74bb34a1364c6b3f3f2e3f31165063d3c6e (diff) | |
download | linux-edad25476ba353cfc0f3b34b150888b46f18e8a6.tar.bz2 |
drm/i915/guc: init submission structures as part of guc_init
guc->stage_desc_pool is required as part of the init parameters and
there is no reason we have to init them after HuC. This fixes a NULL
ptr dereference due to guc->stage_desc_pool not being set (no fixes
tag since GuC submission can't be enabled yet).
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
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/20190725174655.24382-1-daniele.ceraolospurio@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/uc/intel_uc.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/uc/intel_uc.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c index 8205b3c81048..5b9b20d1cb6d 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c @@ -397,21 +397,8 @@ int intel_uc_init(struct intel_uc *uc) goto err_guc; } - if (intel_uc_is_using_guc_submission(uc)) { - /* - * This is stuff we need to have available at fw load time - * if we are planning to enable submission later - */ - ret = intel_guc_submission_init(guc); - if (ret) - goto err_huc; - } - return 0; -err_huc: - if (intel_uc_is_using_huc(uc)) - intel_huc_fini(huc); err_guc: intel_guc_fini(guc); return ret; @@ -426,9 +413,6 @@ void intel_uc_fini(struct intel_uc *uc) GEM_BUG_ON(!intel_uc_fw_supported(&guc->fw)); - if (intel_uc_is_using_guc_submission(uc)) - intel_guc_submission_fini(guc); - if (intel_uc_is_using_huc(uc)) intel_huc_fini(&uc->huc); |