libhsakmt: Deprecate is_gfx700()
Condition generalized by (get_gfxv_by_node_id(NodeId) == GFX_VERSION_KAVERI) Signed-off-by: Graham Sider <Graham.Sider@amd.com> Change-Id: Iff4f77043e3ce8e48a9e84fbf257ebf59abf5bbb
このコミットが含まれているのは:
@@ -203,7 +203,6 @@ HSAKMT_STATUS gpuid_to_nodeid(uint32_t gpu_id, uint32_t* node_id);
|
||||
uint32_t get_gfxv_by_node_id(HSAuint32 node_id);
|
||||
bool prefer_ats(HSAuint32 node_id);
|
||||
uint16_t get_device_id_by_node_id(HSAuint32 node_id);
|
||||
bool is_kaveri(HSAuint32 node_id);
|
||||
uint16_t get_device_id_by_gpu_id(HSAuint32 gpu_id);
|
||||
uint32_t get_direct_link_cpu(uint32_t gpu_node);
|
||||
int get_drm_render_fd_by_gpu_id(HSAuint32 gpu_id);
|
||||
|
||||
+5
-5
@@ -51,7 +51,11 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtSetMemoryPolicy(HSAuint32 Node,
|
||||
pr_debug("[%s] node %d; default %d; alternate %d\n",
|
||||
__func__, Node, DefaultPolicy, AlternatePolicy);
|
||||
|
||||
if (!is_kaveri(Node))
|
||||
result = validate_nodeid(Node, &gpu_id);
|
||||
if (result != HSAKMT_STATUS_SUCCESS)
|
||||
return result;
|
||||
|
||||
if (get_gfxv_by_node_id(Node) != GFX_VERSION_KAVERI)
|
||||
/* This is a legacy API useful on Kaveri only. On dGPU
|
||||
* the alternate aperture is setup and used
|
||||
* automatically for coherent allocations. Don't let
|
||||
@@ -59,10 +63,6 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtSetMemoryPolicy(HSAuint32 Node,
|
||||
*/
|
||||
return HSAKMT_STATUS_NOT_IMPLEMENTED;
|
||||
|
||||
result = validate_nodeid(Node, &gpu_id);
|
||||
if (result != HSAKMT_STATUS_SUCCESS)
|
||||
return result;
|
||||
|
||||
/*
|
||||
* We accept any legal policy and alternate address location.
|
||||
* You get CC everywhere anyway.
|
||||
|
||||
+2
-7
@@ -2154,7 +2154,8 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtGetNodeMemoryProperties(HSAuint32 NodeId,
|
||||
* For dGPU the topology node contains Local Memory and it is added by
|
||||
* the for loop above
|
||||
*/
|
||||
if (is_kaveri(NodeId) && i < NumBanks && g_props[NodeId].node.LocalMemSize > 0 &&
|
||||
if (get_gfxv_by_node_id(NodeId) == GFX_VERSION_KAVERI && i < NumBanks &&
|
||||
g_props[NodeId].node.LocalMemSize > 0 &&
|
||||
fmm_get_aperture_base_and_limit(FMM_GPUVM, gpu_id,
|
||||
&MemoryProperties[i].VirtualBaseAddress, &aperture_limit) == HSAKMT_STATUS_SUCCESS) {
|
||||
MemoryProperties[i].HeapType = HSA_HEAPTYPE_FRAME_BUFFER_PRIVATE;
|
||||
@@ -2291,12 +2292,6 @@ bool prefer_ats(HSAuint32 node_id)
|
||||
&& g_props[node_id].node.NumFComputeCores;
|
||||
}
|
||||
|
||||
bool is_kaveri(HSAuint32 node_id)
|
||||
{
|
||||
return g_props[node_id].node.EngineId.ui32.Major == 7
|
||||
&& g_props[node_id].node.EngineId.ui32.Minor == 0;
|
||||
}
|
||||
|
||||
uint16_t get_device_id_by_gpu_id(HSAuint32 gpu_id)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする