Commit 5de51fa0 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson

drm/i915/uc: Remove redundant ucode offset definition

According to Firmware layout definition, uCode is located right
after CSS header, so ucode offset is always same as header size.
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190726184212.1836-2-michal.wajdeczko@intel.com
parent 3a8c63d2
...@@ -229,7 +229,6 @@ void intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915) ...@@ -229,7 +229,6 @@ void intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915)
} }
/* uCode size must calculated from other sizes */ /* uCode size must calculated from other sizes */
uc_fw->ucode_offset = sizeof(struct uc_css_header);
uc_fw->ucode_size = (css->size_dw - css->header_size_dw) * sizeof(u32); uc_fw->ucode_size = (css->size_dw - css->header_size_dw) * sizeof(u32);
/* now RSA */ /* now RSA */
...@@ -239,7 +238,7 @@ void intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915) ...@@ -239,7 +238,7 @@ void intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915)
err = -ENOEXEC; err = -ENOEXEC;
goto fail; goto fail;
} }
uc_fw->rsa_offset = uc_fw->ucode_offset + uc_fw->ucode_size; uc_fw->rsa_offset = sizeof(struct uc_css_header) + uc_fw->ucode_size;
uc_fw->rsa_size = css->key_size_dw * sizeof(u32); uc_fw->rsa_size = css->key_size_dw * sizeof(u32);
/* At least, it should have header, uCode and RSA. Size of all three. */ /* At least, it should have header, uCode and RSA. Size of all three. */
...@@ -536,8 +535,7 @@ void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p) ...@@ -536,8 +535,7 @@ void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p)
drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n", drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n",
uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted, uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted,
uc_fw->major_ver_found, uc_fw->minor_ver_found); uc_fw->major_ver_found, uc_fw->minor_ver_found);
drm_printf(p, "\tuCode: offset %u, size %u\n", drm_printf(p, "\tuCode: %u bytes\n", uc_fw->ucode_size);
uc_fw->ucode_offset, uc_fw->ucode_size);
drm_printf(p, "\tRSA: offset %u, size %u\n", drm_printf(p, "\tRSA: offset %u, size %u\n",
uc_fw->rsa_offset, uc_fw->rsa_size); uc_fw->rsa_offset, uc_fw->rsa_size);
} }
...@@ -77,7 +77,6 @@ struct intel_uc_fw { ...@@ -77,7 +77,6 @@ struct intel_uc_fw {
u32 rsa_size; u32 rsa_size;
u32 rsa_offset; u32 rsa_offset;
u32 ucode_size; u32 ucode_size;
u32 ucode_offset;
}; };
static inline static inline
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment