summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.c
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2016-11-15 14:03:14 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-26 03:03:59 -0500
commit425f99335bfa13fa2af4e0865f61a4eb29fad6be (patch)
treead5141bb2300c419a66290c92b3781d11b3016aa /drivers/gpu/nvgpu/vgpu/vgpu.c
parent98e349ab7eb01ac27e1e18477674294ca80d2093 (diff)
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 <skiminki@nvidia.com> Reviewed-on: http://git-master/r/1253716 (cherry picked from commit 22314619b28f52610cb8769cd4c3f9eb01904eab) Reviewed-on: http://git-master/r/1266652 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index bd332583..213f6bbb 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -191,6 +191,9 @@ static void vgpu_remove_support(struct device *dev)
191 struct tegra_vgpu_intr_msg msg; 191 struct tegra_vgpu_intr_msg msg;
192 int err; 192 int err;
193 193
194 if (g->dbg_regops_tmp_buf)
195 kfree(g->dbg_regops_tmp_buf);
196
194 if (g->pmu.remove_support) 197 if (g->pmu.remove_support)
195 g->pmu.remove_support(&g->pmu); 198 g->pmu.remove_support(&g->pmu);
196 199
@@ -242,6 +245,14 @@ static int vgpu_init_support(struct platform_device *pdev)
242 mutex_init(&g->client_lock); 245 mutex_init(&g->client_lock);
243 mutex_init(&g->ch_wdt_lock); 246 mutex_init(&g->ch_wdt_lock);
244 247
248 g->dbg_regops_tmp_buf = kzalloc(SZ_4K, GFP_KERNEL);
249 if (!g->dbg_regops_tmp_buf) {
250 dev_err(g->dev, "couldn't allocate regops tmp buf");
251 return -ENOMEM;
252 }
253 g->dbg_regops_tmp_buf_ops =
254 SZ_4K / sizeof(g->dbg_regops_tmp_buf[0]);
255
245 g->remove_support = vgpu_remove_support; 256 g->remove_support = vgpu_remove_support;
246 return 0; 257 return 0;
247 258