Implement hsaKmtGetVersion
Reviewed-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
[ROCm/ROCR-Runtime commit: f081249d17]
此提交包含在:
@@ -24,6 +24,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libhsakmt.h"
|
#include "libhsakmt.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "linux/kfd_ioctl.h"
|
||||||
|
|
||||||
HSAKMT_STATUS
|
HSAKMT_STATUS
|
||||||
HSAKMTAPI
|
HSAKMTAPI
|
||||||
@@ -33,8 +36,14 @@ hsaKmtGetVersion(
|
|||||||
{
|
{
|
||||||
CHECK_KFD_OPEN();
|
CHECK_KFD_OPEN();
|
||||||
|
|
||||||
VersionInfo->KernelInterfaceMajorVersion = HSAKMT_VERSION_MAJOR;
|
struct kfd_ioctl_get_version_args args;
|
||||||
VersionInfo->KernelInterfaceMinorVersion = HSAKMT_VERSION_MINOR;
|
memset(&args, 0, sizeof(args));
|
||||||
|
|
||||||
|
if (kfd_ioctl(KFD_IOC_GET_VERSION, &args) == -1)
|
||||||
|
return HSAKMT_STATUS_ERROR;
|
||||||
|
|
||||||
|
VersionInfo->KernelInterfaceMajorVersion = args.major_version;
|
||||||
|
VersionInfo->KernelInterfaceMinorVersion = args.minor_version;
|
||||||
|
|
||||||
return HSAKMT_STATUS_SUCCESS;
|
return HSAKMT_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
新增問題並參考
封鎖使用者