CONFIG_TEGRA_BWMGR is a downstream solution in the kernel before
K5.15, and the implementation now is completed moved to BPMP side.
Since it is not supported anymore, remove the legacy code for
maintainability.
Bug 4955427
Change-Id: I688c44288bfb8522ddfebd8abe294b0410ca8dc1
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248363
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
No client need the dram_clk_to_mc_clk, tegra_dram_types functions from
mc-utils. Hence remove these functions.
get_dram_num_channels is needed by resman team, hence update it to
return number of channels for t264.
Bug 4090660
Change-Id: I3e7571be73cfd94b3e2feebb6320a57b46b5fd48
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3047611
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
mc-utils driver support is needed on T264, and it should be present in
nvidia-t264 repo, so as to avoid leaking any information. Also, we need
to make sure once T264 is public the existing mc-utils driver can be
updated easily for T264 support.
Hence first copy the existing mc-utils driver from nvidia-oot into
nvidia-t264, then make changes for T264 and finally when T264 is public,
just cherry-pick the addional changes in nvidia-oot and clean up driver
from nvidia-t264. This change is doing the first step i.e. copying
existing mc-utils driver code from nvidia-oot into nvidia-t264.
Bug 4090660
Change-Id: I95eff8d3f7fef267a5c0f0e2137c4343a615d4aa
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2911970
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Remove some of the files which were added as optional for
non-existing of T264 patches. As T264 OOT drivers are
collapsing into the core tree, remove such optional files.
Change-Id: I83116585369f4893d14b527356752fbf2a9a80c8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
- Add nvmap_dev.h file which include declaration for functions and data
structs which are exposed by nvmap_dev unit to other units.
- Also, add nvmap_dev_int.h file which include declaration for
functions which are internal to nvmap_dev unit that can be called by
files within nvmap_dev unit.
- Move definition of nvmap_handle_get_from_id, nvmap_install_fd,
find_range_of_handles to nvmap_handle.c as they belong to nvmap_handle
unit.
- Cleanup nvmap_priv.h by moving all relevant items for nvmap_dev unit
to nvmap_dev unit.
- Remove nvmap_mm.c file as nvmap_zap_handle is the only function
present; move it to nvmap_cache.c where it's being called.
- Remove function declarations whose definition are not present.
JIRA TMM-5694
JIRA TMM-5730
Change-Id: Ifd45235076da2ef0c628f3179d828c0ccadf6df2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223994
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
As part of the nvmap_refactoring, add nvmap_alloc.h file which include
declaration for functions which are exposed by nvmap_alloc unit to other
units. Also, add nvmap_alloc_int.h file which include declaration for
functions which are internal to nvmap_alloc unit that can be called by
files within nvmap_alloc unit.
JIRA TMM-5621
Change-Id: Ie30e5e8a4f87591eb9c49a0a349f837a22726fa5
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198546
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
For bigger buffer allocation (e.g. 4GB, 5GB etc) from IOMMU heap, 70% of
the total time is consumed in cache cleaning. CUDA team confirmed that,
it is not always necessary to clean the CPU cache during allocation
flow. Hence provide an option to users of libnvrm_mem to skip cache
cleaning whenever required.
Bug 4628529
Change-Id: I9f4cdc930fcc673b69344f0167c8bc1378ec8d61
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192376
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Create and register set and get operating point sysfs functions.
The operating point notification will contain the requested
operating point.
The nvcap resource manager will extract the operating point
from the notfication and send it to rce via the hsp command
interface.
In turn, rce will apply the operating point by adjusting the
functional clock frequencies for the following camera ip:
- rce hardware
- vi hardware
- isp hardware
- nvcsi
Jira CAMERASW-26378
Signed-off-by: Robert Kelly <rkelly@nvidia.com>
Change-Id: Ia814b2716d3738efb3cbc37307a267140b555f42
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3179593
(cherry picked from commit d259727a57ecf4b9463030b3418715891b3b1209)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3189078
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
ADSP host driver is enhanced to be multi-instance
capable and reentrant:
- Trailing unique identifier string in compatible DT property, like
"adsp", "adsp1" or "aon", is used to identify the driver instances
- Each probed driver instance is inserted into a global list, from
which the handle can be fetched using 'nvadsp_get_handle' API
(passing the above unique identifier as argument)
- Above unique identifier is also used as name for the DBFS
directory (containing files like adsp_console, adsp_logger, etc.)
- 'nvadsp_get_handle' is the only exported API; all other APIs are
accessible via function pointers within 'struct nvadsp_handle'
- APIs above maintain one-is-to-one correspondence with all
legacy APIs, with the addition of a new argument
'struct nvadsp_handle *' at the beginning
- Legacy APIs continue to be supported, but they are hardwired to
work only if the kernel probes just one driver instance
- All driver files are cleaned up to not use any global state
variables (necessary for reentrancy)
Bug 3682950
Change-Id: Id5db49e861b2f81716ae8352b36b406654da2bbd
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3092701
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
The functions nvhost_debug_dump_device() and
nvhost_module_remove_client() are a no-op and were initially
added to ensure that the PVA driver worked with both the legacy nvhost
driver and upstream host1x driver. Now the legacy nvhost driver is
deprecated remove these functions.
Bug 4475969
Change-Id: I1c1444b7b6578117f42200259174e2f60a464db3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3092468
Reviewed-by: Pekka Jylha Ollila <pjylhaollila@nvidia.com>
Tested-by: Pekka Jylha Ollila <pjylhaollila@nvidia.com>
The functions nvhost_job_put() and nvhost_syncpt_set_minval() are no
longer used so remove these functions.
The flag CONFIG_TEGRA_HOST1X is always true for out-of-tree drivers and
so remove the legacy code for when this flag is not defined.
Bug 4475969
Change-Id: I88c89d30bfc9be4b8628f115ea96835cb5f6f295
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091653
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Remove the legacy NVHOST support from the nvhost.h file that is no
longer needed. Eventually we will remove this file completely, but it is
currently still needed as it provides a shim layer for working with the
upstream host1x driver.
Bug 4475969
Change-Id: Id4d97b41de2590800e321e4eeb9c03b434e00dc5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065976
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The legacy tegra IVC driver is used only in AON driver.
Rest of client are already moved to the IVC drier from
core kernel.
Move the driver to AON folder and limit the usage of
driver to AON driver only.
Bug 4430467
Change-Id: Id0e9aeaf3415d33812556b82bfb0adc4941b2f41
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039674
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The Tegra124 SPI slave driver declares a prototype for the function
tegra_spi_slave_register_callback() that does not exist. The correct
function name is tegra124_spi_slave_register_callback() and so fix the
prototype accordingly. Move the prototype to an actual header because
this is the correct place for defining prototypes for other drivers to
reference. This was caught by enabling the compiler flag
-Wmissing-prototype.
Bug 4404965
Change-Id: I765723d0a5ed6369784e5f6c480a6f03500659f3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027487
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Add support for numa aware nvmap heaps:
- Add carveout node for gpu1 which is gpu carveout on numa node 1.
- Add numa_node_id property in nvmap_heap and nvmap platform carveout
structures to hold numa id info i.e. numa node on which this heap is
created.
- gpu0 and gpu1 would have same heap bit but different numa node ids.
- Update buffer allocation function: If user specify the allocate from
a particular numa node instance of the heap, then allocate from that
particular instance. By default input to numa node id is NUMA_NO_NODE,
so in this case, iterate over heaps on all numa nodes to satisfy the
allocation request e.g. if user specify to allocate from gpu carveout
without specifying any particular numa node, then iterate over all gpu
carveouts on all numa nodes, whichever has sufficient free memory,
allocate from thatheap instance.
- Update debugfs functions to pass heap type and numa id, so that
debugfs info is fetched from correct heap instance.
Bug 4231517
Change-Id: I77ba4b626546003ea3c40d09351d832100596d9a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3003219
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Instead of using the Linux kernel version, use the
configs coming from core kernel to find out whether
legacy or next-gen prod configuration method is used.
This will help on porting changes on any kernel and
configuring via core kernel configs.
Bug 3389584
Change-Id: I19c242c573dd63c7dbecbf87d4ba807857dcf4fb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013911
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
There is two implementation of the prod setting, legacy
where driver directly get the register offset/mask/value
and upstreamable where configuration come as property of the
respective field.
The legacy is supported till K5.15 and afterwards, the upstreamable
solution is supported.
Add the dummy header incase the core kernel have not implemented
the prods and organise the oot prod accordingly.
Bug 4097475
Change-Id: Idd0e8759342c1c4ffd88df046785595aa4fab52d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996588
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
In Linux v6.2, the Tegra IVC driver was updated to support iosys-map and
this breaks building some of the out-of-tree drivers for Linux v6.2+
kernels. In Linux v6.3, the GPIO OF APIs were removed and this breaks
building some of the out-of-tree drivers that use these legacy APIs. For
now the broken drivers are not built for these corresponding kernels.
Instead of checking the kernel version in the Makefile for the
corresponding broken driver, move the kernel version checking to the
top-level Makefile and add CONFIG definitions that can be used the
various Makefiles.
This is also needed for working with 3rd party Linux kernels that may
have upstream backports and need to set these CONFIG variables for their
Linux kernel.
Bug 4221847
Change-Id: I35ee59bccdcdb1be56e4680c453279b421692c6a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996215
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Compression carveout is not correct carveout name as it will be used
by gpu even for non-compression usecases. Hence rename it to gpu
carveout.
Bug 3956637
Change-Id: I802b91d58d9ca120e34655c21f56c0da8c8cf677
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2955536
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
OOT drivers build against multiple kernel. All kernel
does not support the prod configurations. Add wrapper
header for prod header as oot-prod which can be used
by all OOT drivers for prod configurations.
This new header implement the prod APIs as success if
core kernel does not support the prod functionality.
This will help to avoid any build and run time error.
Bug 4165866
Change-Id: I1c313aad38a0b1b08f9acda0fa98d08cd0390baa
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924919
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925582
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Current mc-utils driver is specific to T234 without any support for
extending it to future SOCs. Add such support so that it can be easily
extended for future chips.
- Create a struct of function pointers of all present operations
- Set these function pointers as per SOCs
Bug 4090660
Change-Id: I93e9da987bce1e563eb03aeeb0ac8bcb9da48023
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911894
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>