libhsakmt: add OverrideEngineId property

When HSA_OVERRIDE_GFX_VERSION is used, save the overrided GFX
version to OverrideEngineId instead of original EngineId. There
are places where real GFX properties still needed, e.g. CWSR size
calculation.

Change-Id: I9d9149bae465b7cfe55604fc19e7ca34e48b7b1c
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
This commit is contained in:
Yifan Zhang
2024-08-15 17:10:38 +08:00
committed by David Yat Sin
parent 123b2c080a
commit 3f1f68c8cb
3 changed files with 30 additions and 11 deletions
+6 -4
View File
@@ -1222,10 +1222,12 @@ static HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id,
ret = HSAKMT_STATUS_ERROR;
goto out;
}
props->EngineId.ui32.Major = major & 0x3f;
props->EngineId.ui32.Minor = minor & 0xff;
props->EngineId.ui32.Stepping = step & 0xff;
} else if (hsa_gfxip) {
props->OverrideEngineId.ui32.Major = major & 0x3f;
props->OverrideEngineId.ui32.Minor = minor & 0xff;
props->OverrideEngineId.ui32.Stepping = step & 0xff;
}
if (hsa_gfxip) {
props->EngineId.ui32.Major = hsa_gfxip->major & 0x3f;
props->EngineId.ui32.Minor = hsa_gfxip->minor & 0xff;
props->EngineId.ui32.Stepping = hsa_gfxip->stepping & 0xff;