Export microcode version of sDMA

Change-Id: I86fa5da5e72af13a2e76e6e3be4667a7220923d5
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Этот коммит содержится в:
Philip Yang
2018-03-09 15:31:38 -05:00
родитель 19dacdecd3
Коммит 1bf93d4e89
2 изменённых файлов: 18 добавлений и 11 удалений
+15 -3
Просмотреть файл
@@ -150,10 +150,10 @@ typedef struct _HsaSystemProperties
HSAuint32 PlatformRev; // HSA platform revision, reflects Platform Table Revision ID
} HsaSystemProperties;
typedef union
typedef union
{
HSAuint32 Value;
struct
struct
{
unsigned int uCode : 10; // ucode packet processor version
unsigned int Major : 6; // GFXIP Major engine version
@@ -162,6 +162,17 @@ typedef union
}ui32;
} HSA_ENGINE_ID;
typedef union
{
HSAuint32 Value;
struct
{
unsigned int uCodeSDMA: 10; // ucode version SDMA engine
unsigned int uCodeRes : 10; // ucode version (reserved)
unsigned int Reserved : 12; // Reserved, must be 0
};
} HSA_ENGINE_VERSION;
typedef union
{
HSAuint32 Value;
@@ -251,7 +262,8 @@ typedef struct _HsaNodeProperties
HSAuint16 MarketingName[HSA_PUBLIC_NAME_SIZE]; // Public name of the "device" on the node (board or APU name).
// Unicode string
HSAuint8 AMDName[HSA_PUBLIC_NAME_SIZE]; //CAL Name of the "device", ASCII
HSAuint8 Reserved[64];
HSA_ENGINE_VERSION uCodeEngineVersions;
HSAuint8 Reserved[60];
} HsaNodeProperties;
+3 -8
Просмотреть файл
@@ -740,7 +740,6 @@ HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id,
char path[256];
unsigned long long prop_val;
uint32_t i, prog, major, minor, step;
uint16_t fw_version = 0;
int read_size;
const struct hsa_gfxip_table *hsa_gfxip;
char namebuf[HSA_PUBLIC_NAME_SIZE];
@@ -815,7 +814,7 @@ HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id,
else if (strcmp(prop_name, "max_slots_scratch_cu") == 0)
props->MaxSlotsScratchCU = (uint32_t)prop_val;
else if (strcmp(prop_name, "fw_version") == 0)
fw_version = (uint16_t)prop_val;
props->EngineId.Value = (uint32_t)prop_val & 0x3ff;
else if (strcmp(prop_name, "vendor_id") == 0)
props->VendorId = (uint32_t)prop_val;
else if (strcmp(prop_name, "device_id") == 0)
@@ -830,14 +829,10 @@ HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id,
props->LocalMemSize = prop_val;
else if (strcmp(prop_name, "drm_render_minor") == 0)
props->DrmRenderMinor = (int32_t)prop_val;
else if (strcmp(prop_name, "sdma_fw_version") == 0)
props->uCodeEngineVersions.Value = (uint32_t)prop_val & 0x3ff;
}
props->EngineId.ui32.uCode = fw_version & 0x3ff;
props->EngineId.ui32.Major = 0;
props->EngineId.ui32.Minor = 0;
props->EngineId.ui32.Stepping = 0;
hsa_gfxip = find_hsa_gfxip_device(props->DeviceId);
if (hsa_gfxip) {
envvar = getenv("HSA_OVERRIDE_GFX_VERSION");