diff options
author | Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> | 2019-07-24 17:18:11 -0700 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-25 07:30:41 +0100 |
commit | 9cb27945570567b75af7a8751803d41d0a6ce1a7 (patch) | |
tree | ae44a8cd5c9ae574ac2fd0f3b2922928577b6e16 /drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | |
parent | 90dd992260cc44cec8f6e41ab5e64938921912c0 (diff) |
drm/i915/huc: Copy huc rsa only once
The binary is perma-pinned and the rsa is not going to change, so copy
it only once and not on every load.
v2: onion unwind (Chris)
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Fernando Pacheco <fernando.pacheco@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> #v1
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/20190725001813.4740-7-daniele.ceraolospurio@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c index 472568843ccf..7d2d2eb94d22 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c @@ -34,21 +34,6 @@ void intel_huc_fw_init_early(struct intel_huc *huc) intel_uc_fw_init_early(&huc->fw, INTEL_UC_FW_TYPE_HUC, huc_to_gt(huc)->i915); } -static void huc_xfer_rsa(struct intel_huc *huc) -{ - size_t copied; - - /* - * HuC firmware image is outside GuC accessible range. - * Copy the RSA signature out of the image into - * the perma-pinned region set aside for it - */ - GEM_BUG_ON(huc->fw.rsa_size > huc->rsa_data->size); - copied = intel_uc_fw_copy_rsa(&huc->fw, huc->rsa_data_vaddr, - huc->rsa_data->size); - GEM_BUG_ON(copied < huc->fw.rsa_size); -} - static int huc_xfer_ucode(struct intel_huc *huc) { struct intel_uc_fw *huc_fw = &huc->fw; @@ -108,8 +93,6 @@ static int huc_fw_xfer(struct intel_uc_fw *huc_fw) { struct intel_huc *huc = container_of(huc_fw, struct intel_huc, fw); - huc_xfer_rsa(huc); - return huc_xfer_ucode(huc); } |