From 082f8314c48c089fed482b23bf2a42112015fdd2 Mon Sep 17 00:00:00 2001 From: Amber Lin Date: Thu, 24 Sep 2015 00:00:39 -0400 Subject: [PATCH] Sync up HSA_ENGINE_ID type with Windows/Perforce HSA_ENGINE_ID in Perforce added ui32 to the typedef while in Git it doesn't. This causes conflicts to RT applications. Decision being made is to change Git to match Perforce. Change-Id: I7e9c6437b023bb23ec9578737f8534e9453589b9 --- include/hsakmttypes.h | 2 +- src/topology.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/hsakmttypes.h b/include/hsakmttypes.h index 0133fdfd9b..25e7ad0832 100644 --- a/include/hsakmttypes.h +++ b/include/hsakmttypes.h @@ -157,7 +157,7 @@ typedef union unsigned int Major : 6; // GFXIP Major engine version unsigned int Minor : 8; // GFXIP Minor engine version unsigned int Stepping : 8; // GFXIP Stepping info - }; + }ui32; } HSA_ENGINE_ID; typedef union diff --git a/src/topology.c b/src/topology.c index 0d08018bb7..1dcbf0cfeb 100644 --- a/src/topology.c +++ b/src/topology.c @@ -375,20 +375,20 @@ topology_sysfs_get_node_props(uint32_t node_id, HsaNodeProperties *props, uint32 } // get_cpu_stepping(&stepping); - props->EngineId.uCode = fw_version & 0x3ff; - props->EngineId.Major = 0; - props->EngineId.Minor = 0; - props->EngineId.Stepping = 0; + props->EngineId.ui32.uCode = fw_version & 0x3ff; + props->EngineId.ui32.Major = 0; + props->EngineId.ui32.Minor = 0; + props->EngineId.ui32.Stepping = 0; table_size = sizeof(gfxip_lookup_table)/sizeof(struct hsa_gfxip_table); for (i=0; iDeviceId) { - props->EngineId.Major = gfxip_lookup_table[i].major & 0x3f; - props->EngineId.Minor = gfxip_lookup_table[i].minor; - props->EngineId.Stepping = gfxip_lookup_table[i].stepping; + props->EngineId.ui32.Major = gfxip_lookup_table[i].major & 0x3f; + props->EngineId.ui32.Minor = gfxip_lookup_table[i].minor; + props->EngineId.ui32.Stepping = gfxip_lookup_table[i].stepping; break; } } - assert(props->EngineId.Major); + assert(props->EngineId.ui32.Major); //TODO: error handler when Device ID lookup fails err2: