diff options
author | Leonid Moiseichuk <lmoiseichuk@nvidia.com> | 2015-07-07 06:54:06 -0400 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2015-07-10 03:31:03 -0400 |
commit | 1e7b5ea793946c6b959f7eef0be88dfd9aabac30 (patch) | |
tree | eccde0f35f7c80be07b5faf52fd666841ba5e282 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | 51c784d9a12d6c9f98991bab647aa22febb93de9 (diff) |
gpu: nvgpu: cyclestats snapshots are only for t210
The cyclestats mode-e feature supported by userspace only
for t210 devices, so kernel should advertize it only for t210.
Also small check added to prevent BUG in dma-buf.c:826
if device has lack of memory.
Bug 1662506
Change-Id: I8417a8cdd9092e64126382f379d171932e4592a1
Signed-off-by: Leonid Moiseichuk <lmoiseichuk@nvidia.com>
Reviewed-on: http://git-master/r/767073
(cherry picked from commit 06f86b6e78bae5e26e32466716c18e7918efb1b1)
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/767148
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b1747987..badb7717 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -2008,7 +2008,12 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
2008 | 2008 | ||
2009 | if (IS_ENABLED(CONFIG_GK20A_CYCLE_STATS)) { | 2009 | if (IS_ENABLED(CONFIG_GK20A_CYCLE_STATS)) { |
2010 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS; | 2010 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS; |
2011 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS_SNAPSHOT; | 2011 | /* the snapshots must be supported only for t210 */ |
2012 | if (NVGPU_GPU_ARCH_GM200 == gpu->arch && | ||
2013 | NVGPU_GPU_IMPL_GM20B == gpu->impl) { | ||
2014 | gpu->flags |= | ||
2015 | NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS_SNAPSHOT; | ||
2016 | } | ||
2012 | } | 2017 | } |
2013 | 2018 | ||
2014 | gpu->gpc_mask = 1; | 2019 | gpu->gpc_mask = 1; |