summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_uc_fw.h
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2023-10-25 20:57:42 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:43:22 +0300
commit484ecffac91067e44273afa727fb1b9855058c9a (patch)
tree06dd4cbb91bd8be997cf1ec40e55684512b8c656 /drivers/gpu/drm/xe/xe_uc_fw.h
parenta9a95523c84957b7863796b5d1df2f3f5dca4519 (diff)
downloadlinux-484ecffac91067e44273afa727fb1b9855058c9a.tar.xz
drm/xe/huc: Extract version and binary offset from new HuC headers
The GSC-enabled HuC binary starts with a GSC header, which is followed by the legacy-style CSS header and the binary itself. We can parse the GSC headers to find the HuC version and the location of the binary to be used for the DMA transfer. The parsing function has been designed to be re-used for the GSC binary, so the entry names are external parameters (because the GSC uses different ones) and the CSS entry is optional (because the GSC doesn't have it). v2: move new code to uc_fw.c, better comments and error checking, split old code move to separate patch (Lucas), move headers and documentation to uc_fw_abi.h. v3: use 2 separate loops, rework marker check (Lucas) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_uc_fw.h')
-rw-r--r--drivers/gpu/drm/xe/xe_uc_fw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_uc_fw.h b/drivers/gpu/drm/xe/xe_uc_fw.h
index a519c77d4962..1d1a0c156cdf 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.h
+++ b/drivers/gpu/drm/xe/xe_uc_fw.h
@@ -21,7 +21,7 @@ void xe_uc_fw_print(struct xe_uc_fw *uc_fw, struct drm_printer *p);
static inline u32 xe_uc_fw_rsa_offset(struct xe_uc_fw *uc_fw)
{
- return sizeof(struct uc_css_header) + uc_fw->ucode_size;
+ return sizeof(struct uc_css_header) + uc_fw->ucode_size + uc_fw->css_offset;
}
static inline void xe_uc_fw_change_status(struct xe_uc_fw *uc_fw,