diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index d1eff233..c3cb0f4c 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -1911,10 +1911,15 @@ static int gk20a_perfbuf_map(struct dbg_session_gk20a *dbg_s, | |||
1911 | struct mm_gk20a *mm = &g->mm; | 1911 | struct mm_gk20a *mm = &g->mm; |
1912 | int err; | 1912 | int err; |
1913 | u32 virt_size; | 1913 | u32 virt_size; |
1914 | u32 big_page_size = g->ops.mm.get_default_big_page_size(); | 1914 | u32 big_page_size; |
1915 | |||
1916 | if (!g->ops.dbg_session_ops.perfbuffer_enable) | ||
1917 | return -ENOSYS; | ||
1915 | 1918 | ||
1916 | nvgpu_mutex_acquire(&g->dbg_sessions_lock); | 1919 | nvgpu_mutex_acquire(&g->dbg_sessions_lock); |
1917 | 1920 | ||
1921 | big_page_size = g->ops.mm.get_default_big_page_size(); | ||
1922 | |||
1918 | if (g->perfbuf.owner) { | 1923 | if (g->perfbuf.owner) { |
1919 | nvgpu_mutex_release(&g->dbg_sessions_lock); | 1924 | nvgpu_mutex_release(&g->dbg_sessions_lock); |
1920 | return -EBUSY; | 1925 | return -EBUSY; |
@@ -2015,6 +2020,9 @@ static int gk20a_perfbuf_unmap(struct dbg_session_gk20a *dbg_s, | |||
2015 | struct gk20a *g = dbg_s->g; | 2020 | struct gk20a *g = dbg_s->g; |
2016 | int err; | 2021 | int err; |
2017 | 2022 | ||
2023 | if (!g->ops.dbg_session_ops.perfbuffer_disable) | ||
2024 | return -ENOSYS; | ||
2025 | |||
2018 | nvgpu_mutex_acquire(&g->dbg_sessions_lock); | 2026 | nvgpu_mutex_acquire(&g->dbg_sessions_lock); |
2019 | if ((g->perfbuf.owner != dbg_s) || | 2027 | if ((g->perfbuf.owner != dbg_s) || |
2020 | (g->perfbuf.offset != args->offset)) { | 2028 | (g->perfbuf.offset != args->offset)) { |