diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_dbg.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_dbg.h | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index 02dedc9f..83282b87 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <nvgpu/linux/vidmem.h> | 33 | #include <nvgpu/linux/vidmem.h> |
34 | 34 | ||
35 | #include "ioctl_ctrl.h" | 35 | #include "ioctl_ctrl.h" |
36 | #include "ioctl_dbg.h" | ||
36 | #ifdef CONFIG_TEGRA_19x_GPU | 37 | #ifdef CONFIG_TEGRA_19x_GPU |
37 | #include "common/linux/ioctl_ctrl_t19x.h" | 38 | #include "common/linux/ioctl_ctrl_t19x.h" |
38 | #endif | 39 | #endif |
@@ -207,6 +208,7 @@ gk20a_ctrl_ioctl_gpu_characteristics( | |||
207 | pgpu->arch = g->params.gpu_arch; | 208 | pgpu->arch = g->params.gpu_arch; |
208 | pgpu->impl = g->params.gpu_impl; | 209 | pgpu->impl = g->params.gpu_impl; |
209 | pgpu->rev = g->params.gpu_rev; | 210 | pgpu->rev = g->params.gpu_rev; |
211 | pgpu->reg_ops_limit = NVGPU_IOCTL_DBG_REG_OPS_LIMIT; | ||
210 | 212 | ||
211 | pgpu->vbios_version = g->bios.vbios_version; | 213 | pgpu->vbios_version = g->bios.vbios_version; |
212 | pgpu->vbios_oem_version = g->bios.vbios_oem_version; | 214 | pgpu->vbios_oem_version = g->bios.vbios_oem_version; |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c index c8d7468e..304fd71f 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c | |||
@@ -607,7 +607,7 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, | |||
607 | 607 | ||
608 | gk20a_dbg_fn("%d ops, max fragment %d", args->num_ops, g->dbg_regops_tmp_buf_ops); | 608 | gk20a_dbg_fn("%d ops, max fragment %d", args->num_ops, g->dbg_regops_tmp_buf_ops); |
609 | 609 | ||
610 | if (args->num_ops > g->gpu_characteristics.reg_ops_limit) { | 610 | if (args->num_ops > NVGPU_IOCTL_DBG_REG_OPS_LIMIT) { |
611 | nvgpu_err(g, "regops limit exceeded"); | 611 | nvgpu_err(g, "regops limit exceeded"); |
612 | return -EINVAL; | 612 | return -EINVAL; |
613 | } | 613 | } |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_dbg.h b/drivers/gpu/nvgpu/common/linux/ioctl_dbg.h index 810555a8..bd76045b 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_dbg.h +++ b/drivers/gpu/nvgpu/common/linux/ioctl_dbg.h | |||
@@ -21,6 +21,10 @@ | |||
21 | 21 | ||
22 | #include "gk20a/dbg_gpu_gk20a.h" | 22 | #include "gk20a/dbg_gpu_gk20a.h" |
23 | 23 | ||
24 | /* NVGPU_DBG_GPU_IOCTL_REG_OPS: the upper limit for the number | ||
25 | * of regops */ | ||
26 | #define NVGPU_IOCTL_DBG_REG_OPS_LIMIT 1024 | ||
27 | |||
24 | struct dbg_session_gk20a_linux { | 28 | struct dbg_session_gk20a_linux { |
25 | struct device *dev; | 29 | struct device *dev; |
26 | struct dbg_session_gk20a dbg_s; | 30 | struct dbg_session_gk20a dbg_s; |