Implement hsaKmtGetTileConfig in thunk
Change-Id: Iba8d8efa46e3c268a03442d3db568e1b19230e94
This commit is contained in:
1 parent
df593aa076
commit
8351b3d2e8
5 files changed
+89
-1
No files matched your search
@@ -47,6 +47,7 @@ hsaKmtPmcStopTrace;
|
||||
hsaKmtMapGraphicHandle;
|
||||
hsaKmtUnmapGraphicHandle;
|
||||
hsaKmtSetTrapHandler;
|
||||
hsaKmtGetTileConfig;
|
||||
|
||||
local: *;
|
||||
};
|
||||
|
||||
@@ -386,3 +386,39 @@ hsaKmtUnmapGraphicHandle(
|
||||
|
||||
return hsaKmtUnmapMemoryToGPU(PORT_UINT64_TO_VPTR(FlatMemoryAddress));
|
||||
}
|
||||
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtGetTileConfig(
|
||||
HSAuint32 NodeId, /* IN */
|
||||
HsaGpuTileConfig *config /* IN & OUT */
|
||||
)
|
||||
{
|
||||
struct kfd_ioctl_get_tile_config_args args;
|
||||
uint32_t gpu_id;
|
||||
HSAKMT_STATUS result;
|
||||
|
||||
result = validate_nodeid(NodeId, &gpu_id);
|
||||
if (result != HSAKMT_STATUS_SUCCESS)
|
||||
return result;
|
||||
|
||||
args.gpu_id = gpu_id;
|
||||
args.tile_config_ptr = (uint64_t)config->TileConfig;
|
||||
args.macro_tile_config_ptr = (uint64_t)config->MacroTileConfig;
|
||||
args.num_tile_configs = config->NumTileConfigs;
|
||||
args.num_macro_tile_configs = config->NumMacroTileConfigs;
|
||||
|
||||
if (kmtIoctl(kfd_fd, AMDKFD_IOC_GET_TILE_CONFIG, &args) != 0) {
|
||||
return HSAKMT_STATUS_ERROR;
|
||||
}
|
||||
|
||||
config->NumTileConfigs = args.num_tile_configs;
|
||||
config->NumMacroTileConfigs = args.num_macro_tile_configs;
|
||||
|
||||
config->GbAddrConfig = args.gb_addr_config;
|
||||
|
||||
config->NumBanks = args.num_banks;
|
||||
config->NumRanks = args.num_ranks;
|
||||
|
||||
return HSAKMT_STATUS_SUCCESS;
|
||||
}
|
||||
Reference in new issue
Block a user