summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2014-10-24 13:40:57 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:07 -0400
commitd11fbfe7b1b68b3aab93f7703896d95d40b79a58 (patch)
treea4b8574c9181284523efa5105878c2e3ef2e05fa /drivers/gpu/nvgpu/gk20a/gk20a.c
parent2c5fdd1c8a76ef9ca21abcf894f2c9525d57fd49 (diff)
gpu: nvgpu: GPU characteristics additions
Add the following info into GPU characteristics: available big page sizes, support indicators for sync fence fds and cycle stats, gpc mask, SM version, SM SPA version and warp count, and IOCTL interface levels. Also, add new IOCTL to fetch TPC masks. Bug 1551769 Bug 1558186 Change-Id: I8a47d882645f29c7bf0c8f74334ebf47240e41de Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: http://git-master/r/562904 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index ef0f6a8c..1bd1c898 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1774,13 +1774,33 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
1774 gpu->compression_page_size = g->mm.pmu.vm.compression_page_size; 1774 gpu->compression_page_size = g->mm.pmu.vm.compression_page_size;
1775 gpu->pde_coverage_bit_count = g->mm.pmu.vm.pde_stride_shift; 1775 gpu->pde_coverage_bit_count = g->mm.pmu.vm.pde_stride_shift;
1776 1776
1777 gpu->available_big_page_sizes = gpu->big_page_size;
1778 if (g->ops.mm.get_big_page_sizes)
1779 gpu->available_big_page_sizes |= g->ops.mm.get_big_page_sizes();
1780
1777 gpu->flags = NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS 1781 gpu->flags = NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS
1778 | NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS; 1782 | NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS
1783 | NVGPU_GPU_FLAGS_SUPPORT_SYNC_FENCE_FDS;
1779 1784
1780 if (IS_ENABLED(CONFIG_TEGRA_GK20A) && 1785 if (IS_ENABLED(CONFIG_TEGRA_GK20A) &&
1781 gk20a_platform_has_syncpoints(g->dev)) 1786 gk20a_platform_has_syncpoints(g->dev))
1782 gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS; 1787 gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS;
1783 1788
1789 if (IS_ENABLED(CONFIG_GK20A_CYCLE_STATS))
1790 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS;
1791
1792 gpu->gpc_mask = 1;
1793
1794 g->ops.gr.detect_sm_arch(g);
1795
1796 gpu->gpu_ioctl_nr_last = NVGPU_GPU_IOCTL_LAST;
1797 gpu->tsg_ioctl_nr_last = NVGPU_TSG_IOCTL_LAST;
1798 gpu->dbg_gpu_ioctl_nr_last = NVGPU_DBG_GPU_IOCTL_LAST;
1799 gpu->ioctl_channel_nr_last = NVGPU_IOCTL_CHANNEL_LAST;
1800 gpu->as_ioctl_nr_last = NVGPU_AS_IOCTL_LAST;
1801
1802 gpu->gpu_va_bit_count = 40;
1803
1784 gpu->reserved = 0; 1804 gpu->reserved = 0;
1785 1805
1786 return 0; 1806 return 0;