mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add new device types
This patch adds macros for new device types based on the device information table. Specifically, it adds the device type IDs for the following engines: - SEC - NVENC - NVDEC - NVJPG - OFA Further, the max dev types has been updated as 57 in the device info table. To support his, the corresponding macro has been updated as 58. JIRA NVGPU-9501 Change-Id: I23f17c91da8a6063457c27763a62b1a08beeed0d Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2846203 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Ankur Kishore <ankkishore@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
afb971b66e
commit
7ad50fee7c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -55,6 +55,21 @@ static inline const char *nvgpu_device_type_to_str(const struct nvgpu_device *de
|
||||
case NVGPU_DEVTYPE_LCE:
|
||||
str = "LCE";
|
||||
break;
|
||||
case NVGPU_DEVTYPE_SEC:
|
||||
str = "SEC";
|
||||
break;
|
||||
case NVGPU_DEVTYPE_NVENC:
|
||||
str = "NVENC";
|
||||
break;
|
||||
case NVGPU_DEVTYPE_NVDEC:
|
||||
str = "NVDEC";
|
||||
break;
|
||||
case NVGPU_DEVTYPE_NVJPG:
|
||||
str = "NVJPG";
|
||||
break;
|
||||
case NVGPU_DEVTYPE_NVOFA:
|
||||
str = "NVOFA";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -337,3 +352,38 @@ bool nvgpu_device_is_graphics(struct gk20a *g, const struct nvgpu_device *dev)
|
||||
|
||||
return dev->type == NVGPU_DEVTYPE_GRAPHICS;
|
||||
}
|
||||
|
||||
bool nvgpu_device_is_sec(struct gk20a *g, const struct nvgpu_device *dev)
|
||||
{
|
||||
(void)g;
|
||||
|
||||
return dev->type == NVGPU_DEVTYPE_SEC;
|
||||
}
|
||||
|
||||
bool nvgpu_device_is_nvenc(struct gk20a *g, const struct nvgpu_device *dev)
|
||||
{
|
||||
(void)g;
|
||||
|
||||
return dev->type == NVGPU_DEVTYPE_NVENC;
|
||||
}
|
||||
|
||||
bool nvgpu_device_is_nvdec(struct gk20a *g, const struct nvgpu_device *dev)
|
||||
{
|
||||
(void)g;
|
||||
|
||||
return dev->type == NVGPU_DEVTYPE_NVDEC;
|
||||
}
|
||||
|
||||
bool nvgpu_device_is_nvjpg(struct gk20a *g, const struct nvgpu_device *dev)
|
||||
{
|
||||
(void)g;
|
||||
|
||||
return dev->type == NVGPU_DEVTYPE_NVJPG;
|
||||
}
|
||||
|
||||
bool nvgpu_device_is_nvofa(struct gk20a *g, const struct nvgpu_device *dev)
|
||||
{
|
||||
(void)g;
|
||||
|
||||
return dev->type == NVGPU_DEVTYPE_NVOFA;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user