]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: add nvmap config fd options
authorKrishna Reddy <vdumpa@nvidia.com>
Thu, 27 Mar 2014 18:08:33 +0000 (11:08 -0700)
committerKrishna Reddy <vdumpa@nvidia.com>
Fri, 28 Mar 2014 16:23:28 +0000 (09:23 -0700)
Add config options for start fd, deferred fd recycle
and deferred fd recycle max.
Bug 1468931

Change-Id: Iad7b81d00c05bcb9d7f1c0687779a474720bddce
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/387862

drivers/video/tegra/Kconfig

index b6dd1e5a20d854e194eecc5a3e67fdca0af236ca..9b1fc4aefb60e019a550881bd33082fd2e297338 100644 (file)
@@ -276,6 +276,37 @@ config NVMAP_CPA
          results due to speculative memory loads/stores. If unsure,
          say N.
 
+config NVMAP_FD_START
+       hex "FD number to start allocation from"
+       depends on TEGRA_NVMAP
+       default 0x400
+       help
+         NvMap handles are represented with FD's in the user processes.
+         To avoid Linux FD usage limitations, NvMap allocates FD starting
+         from this number.
+
+config NVMAP_DEFER_FD_RECYCLE
+       bool "Defer FD recycle"
+       depends on TEGRA_NVMAP
+       help
+         Say Y here to enable deferred FD recycle.
+         A released nvmap handle would release memory and FD. This FD
+         can be reused immediately for subsequent nvmap allocation req in
+         the same process. Any buggy code in client process that continues to
+         use FD of released allocation would continue to use new allocation
+         and can lead to undesired consequences, which can be hard to debug.
+         Enabling this option would defer recycling FD for longer time and
+         allows debugging incorrect FD references by clients by returning errors
+         for the accesses that occur after handle/FD release.
+
+config NVMAP_DEFER_FD_RECYCLE_MAX_FD
+       hex "FD number to start free FD recycle"
+       depends on NVMAP_DEFER_FD_RECYCLE
+       default 0x8000
+       help
+         Once last allocated FD reaches this number, allocation of subsequent
+         FD's start from NVMAP_START_FD.
+
 config TEGRA_DSI
        bool "Enable DSI panel."
        help