diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-02-20 21:15:04 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:56:54 -0400 |
commit | 325e0587d9180b05d59869679fc06b0ba979d973 (patch) | |
tree | dc7e743440c5e86d72c1a2850b8b93a0cc9d0296 /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |
parent | 1b6372ec6b8704d6bacc6b8abf7e599f1cbc15ca (diff) |
gpu: nvgpu: Allow enabling PC sampling
Allow enabling of PC sampling hardware workaround. It is only
applicable to gm20b.
Bug 1517458
Bug 1573150
Change-Id: Iad6a3ae556489fb7ab9628637d291849d2cd98ea
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/710421
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index ffb52549..7cda9949 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -377,6 +377,17 @@ static int gk20a_perfbuf_map(struct dbg_session_gk20a *dbg_s, | |||
377 | static int gk20a_perfbuf_unmap(struct dbg_session_gk20a *dbg_s, | 377 | static int gk20a_perfbuf_unmap(struct dbg_session_gk20a *dbg_s, |
378 | struct nvgpu_dbg_gpu_perfbuf_unmap_args *args); | 378 | struct nvgpu_dbg_gpu_perfbuf_unmap_args *args); |
379 | 379 | ||
380 | static int gk20a_dbg_pc_sampling(struct dbg_session_gk20a *dbg_s, | ||
381 | struct nvgpu_dbg_gpu_pc_sampling_args *args) | ||
382 | { | ||
383 | struct channel_gk20a *ch = dbg_s->ch; | ||
384 | struct gk20a *g = ch->g; | ||
385 | |||
386 | gk20a_dbg_fn(""); | ||
387 | |||
388 | return g->ops.gr.update_pc_sampling ? | ||
389 | g->ops.gr.update_pc_sampling(ch, args->enable) : -EINVAL; | ||
390 | } | ||
380 | long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd, | 391 | long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd, |
381 | unsigned long arg) | 392 | unsigned long arg) |
382 | { | 393 | { |
@@ -449,6 +460,11 @@ long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd, | |||
449 | (struct nvgpu_dbg_gpu_perfbuf_unmap_args *)buf); | 460 | (struct nvgpu_dbg_gpu_perfbuf_unmap_args *)buf); |
450 | break; | 461 | break; |
451 | 462 | ||
463 | case NVGPU_DBG_GPU_IOCTL_PC_SAMPLING: | ||
464 | err = gk20a_dbg_pc_sampling(dbg_s, | ||
465 | (struct nvgpu_dbg_gpu_pc_sampling_args *)buf); | ||
466 | break; | ||
467 | |||
452 | default: | 468 | default: |
453 | gk20a_err(dev_from_gk20a(g), | 469 | gk20a_err(dev_from_gk20a(g), |
454 | "unrecognized dbg gpu ioctl cmd: 0x%x", | 470 | "unrecognized dbg gpu ioctl cmd: 0x%x", |