mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: add API to extract GPU timeout mode
Bug 1706457 Change-Id: Iab76bcb7cabc55d99b5acd932716d30da6f01b46 Signed-off-by: Chris Dragan <kdragan@nvidia.com> Reviewed-on: http://git-master/r/835852 Reviewed-on: http://git-master/r/836454 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
7afb57e608
commit
8feddd88d0
@@ -449,6 +449,22 @@ static int nvgpu_dbg_gpu_ioctl_timeout(struct dbg_session_gk20a *dbg_s,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void nvgpu_dbg_gpu_ioctl_get_timeout(struct dbg_session_gk20a *dbg_s,
|
||||||
|
struct nvgpu_dbg_gpu_timeout_args *args)
|
||||||
|
{
|
||||||
|
int status;
|
||||||
|
struct gk20a *g = get_gk20a(dbg_s->pdev);
|
||||||
|
|
||||||
|
mutex_lock(&g->dbg_sessions_lock);
|
||||||
|
status = g->timeouts_enabled;
|
||||||
|
mutex_unlock(&g->dbg_sessions_lock);
|
||||||
|
|
||||||
|
if (status)
|
||||||
|
args->enable = NVGPU_DBG_GPU_IOCTL_TIMEOUT_ENABLE;
|
||||||
|
else
|
||||||
|
args->enable = NVGPU_DBG_GPU_IOCTL_TIMEOUT_DISABLE;
|
||||||
|
}
|
||||||
|
|
||||||
long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd,
|
long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
@@ -531,6 +547,11 @@ long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
(struct nvgpu_dbg_gpu_timeout_args *)buf);
|
(struct nvgpu_dbg_gpu_timeout_args *)buf);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NVGPU_DBG_GPU_IOCTL_GET_TIMEOUT:
|
||||||
|
nvgpu_dbg_gpu_ioctl_get_timeout(dbg_s,
|
||||||
|
(struct nvgpu_dbg_gpu_timeout_args *)buf);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
gk20a_err(dev_from_gk20a(g),
|
gk20a_err(dev_from_gk20a(g),
|
||||||
"unrecognized dbg gpu ioctl cmd: 0x%x",
|
"unrecognized dbg gpu ioctl cmd: 0x%x",
|
||||||
|
|||||||
@@ -596,6 +596,9 @@ struct nvgpu_dbg_gpu_timeout_args {
|
|||||||
#define NVGPU_DBG_GPU_IOCTL_TIMEOUT \
|
#define NVGPU_DBG_GPU_IOCTL_TIMEOUT \
|
||||||
_IOW(NVGPU_DBG_GPU_IOCTL_MAGIC, 10, struct nvgpu_dbg_gpu_timeout_args)
|
_IOW(NVGPU_DBG_GPU_IOCTL_MAGIC, 10, struct nvgpu_dbg_gpu_timeout_args)
|
||||||
|
|
||||||
|
#define NVGPU_DBG_GPU_IOCTL_GET_TIMEOUT \
|
||||||
|
_IOR(NVGPU_DBG_GPU_IOCTL_MAGIC, 11, struct nvgpu_dbg_gpu_timeout_args)
|
||||||
|
|
||||||
#define NVGPU_DBG_GPU_IOCTL_LAST \
|
#define NVGPU_DBG_GPU_IOCTL_LAST \
|
||||||
_IOC_NR(NVGPU_DBG_GPU_IOCTL_TIMEOUT)
|
_IOC_NR(NVGPU_DBG_GPU_IOCTL_TIMEOUT)
|
||||||
#define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \
|
#define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \
|
||||||
|
|||||||
Reference in New Issue
Block a user