From 425f99335bfa13fa2af4e0865f61a4eb29fad6be Mon Sep 17 00:00:00 2001 From: Sami Kiminki Date: Tue, 15 Nov 2016 21:03:14 +0200 Subject: gpu: nvgpu: gk20a: Allow regops lists longer than 128 Process long regops lists in 4-kB fragments, overcoming the overly low limit of 128 reg ops per IOCTL call. Bump the list limit to 1024 and report the limit in GPU characteristics. Bug 200248726 Change-Id: I3ad49139409f32aea8b1226d6562e88edccc8053 Signed-off-by: Sami Kiminki Reviewed-on: http://git-master/r/1253716 (cherry picked from commit 22314619b28f52610cb8769cd4c3f9eb01904eab) Reviewed-on: http://git-master/r/1266652 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/nvgpu_common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/nvgpu_common.c') diff --git a/drivers/gpu/nvgpu/nvgpu_common.c b/drivers/gpu/nvgpu/nvgpu_common.c index 179464d8..a1f4832b 100644 --- a/drivers/gpu/nvgpu/nvgpu_common.c +++ b/drivers/gpu/nvgpu/nvgpu_common.c @@ -155,6 +155,14 @@ int nvgpu_probe(struct gk20a *g, gk20a_create_sysfs(g->dev); gk20a_debug_init(g->dev, debugfs_symlink); + g->dbg_regops_tmp_buf = kzalloc(SZ_4K, GFP_KERNEL); + if (!g->dbg_regops_tmp_buf) { + dev_err(g->dev, "couldn't allocate regops tmp buf"); + return -ENOMEM; + } + g->dbg_regops_tmp_buf_ops = + SZ_4K / sizeof(g->dbg_regops_tmp_buf[0]); + g->remove_support = gk20a_remove_support; return 0; -- cgit v1.2.2