Ashish Mhetre
ae282d2c22
video: tegra: nvmap: Fix error pointer dereference
...
In nvmap_try_duplicate_by_ivmid(), the return pointer from
nvmap_duplicate_handle() is getting dereferenced without checking
whether the pointer is error or valid. This is causing kernel panic.
Fix this by checking if the return pointer is invalid then return error.
Bug 3766497
Change-Id: I010893c9ebda60e313c4f776044a123073399ef2
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2846180
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
afb7cce70c
video: tegra: nvmap: Fix kmemleak issues
...
While unloading the nvmap module, the memory allocated by following
functions should be freed, otherwise it results into kmemleak:
- nvmap_dma_init_coherent_memory
- dev_set_name
Bug 3860404
Change-Id: I7cd187c259ad2ceca0262154c0fb7fe8aedcfac8
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2844474
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-11 05:54:22 +00:00
Hans-Christian Noren Egtvedt
76d402ab77
tegra:nvmap: do not export symbol for init functions
...
We can not EXPORT_SYMBOL() on functions marked __init, since they will
not be available once the kernel has done running through init level.
Hence remove the EXPORT_SYMBOL() calls.
Bug 3806590
Change-Id: Ie9fd26fa7220a287b8467aaf6efe03af4427d052
Signed-off-by: Ken Chang <kenc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2782502
(cherry picked from commit ad100e16945b064086d44211adae522208ad5664)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2840504
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
a588f61b8e
video: tegra: nvmap: Remove use of bitmap_allocate_region
...
NvMap is using bitmap_allocate_region while doing allocation from IVM
carveout. It expects size to be always power of 2, this is resulting
into memory shortage. Better way to handle this is to use the function
bitmap_find_next_zero_area which expects bitmap size rather than order.
Then use bitmap_set to set the allocated bits from the bitmap.
Similarly, while freeing the buffer, use bitmap_clear instead of
bitmap_release_region.
Bug 3923812
Change-Id: I91005d16f678405f341c4fc620509f56af538e1c
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2839848
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
e3a44ab6e8
video: tegra: nvmap: Fix kmemleak issue
...
get_task_struct increment the ref count over task struct, and it will be
decremented as part of put_task_struct. task_struct won't be freed
unless it's refcount becomes 0. Hence the missing put_task_struct in
nvmap code was resulting into kmemleak. Fix it by add this missing call.
Also, mutex_unlock was missing in one of the return path, add it.
Bug 3901618
Change-Id: I630eac19e628a549179a8ddaad86ad4d2c9b9a53
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2837383
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
85f7def3a6
nvmap: Don't free pages while freeing subhandle
...
This patch fixes the following issues:
- When the handle associated with the sub-buffer is freed, the call to
the nvmap_page_pool_fill_lots is made, which would free the pages when
the refcount on the pages is > 1, even though the main handle is not
freed, hence add a check for sub-handle.
- In cpu unmap code, list_for_each_entry is used for iterating over the
vma list and in the same loop list_del is aldo being called, this can
lead to undefined behavior, instead use list_for_each_entry_safe which
is safe against removal of list entry.
- Mutex of sub-handle is not initialized, fix it by initializing it.
- Set error value when handle creation failed.
Bug 3494980
Change-Id: I0659d7f70b44814e87e3081702352e891d9191f7
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2824668
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
abb244025f
nvmap: Fix coherency issues while creating subhandle
...
Make sure that all handles, from which sub-buffer handle needs to be
created, have same cache coherency, are of type RW, not created from VA.
Set the cache coherency of the sub-buffer handle same as the cache
coherency of the main handles, so that explicit cache flush is not
needed during vma fault.
Bug 3494980
Change-Id: I878568e4cdc4529fb3d1a6682e38798769dad9c0
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2819129
Reviewed-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
ec9ee786c4
nvmap: Add traces for big pages in page pool
...
There are no traces present for allocating big pages from page pool,
this is limiting the debug ability for some of the memory leak bugs.
Hence add traces for such operations.
Change-Id: I6cece3fd796c5c3e37f87647a1635274a654d727
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2820607
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
ad02c6afa5
nvmap: Use same nvmap client for namespaces in a process
...
Some of the libraries may be linked into different namespaces, but they
belong to same process. So each namespace can open the /dev/nvmap node
and call nvmap ioctls, instead of reusing the already opened /dev/nvmap
FD. Because of this, memory handles created by one namespace can't be
used by other namespaces, even though they belong to same process.
Fix this issue by following:
- When /dev/nvmap node is opened, check if there is already any nvmap
client with same pid, if yes use that client; otherwise, create new
nvmap client.
- Track the number of namespaces via count field.
- When /dev/nvmap node is closed, destroy the nvmap client only when
count reaches to 0.
Bug 3689604
Change-Id: I4c91db36b88e78b7526dd63b006e562c8f66c7ae
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2819915
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com >
Reviewed-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ashish Mhetre
ac3205e61e
video: tegra: nvmap: Make NvMap load based on DT
...
Add MODULE_DEVICE_TABLE() for NvMap match table so that depmod
automatically loads the driver based upon the NvMap compatible
string.
Bug 3851361
Change-Id: I04fabae9787f5cc0f85239ae40f42cd5a5fec88e
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2809441
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
d5be3dd31c
nvmap: Fix type casting issue
...
CERT-C is reporting following issue:
- Casting entry->sci_ipc_id from unsigned long long to unsigned int
without checking its value may result in lost or misinterpreted data.
Fix this by changing the data type of sid to u64.
CID 587909
Bug 3745813
Change-Id: I899db1feff8b6f9b175f4a93cab068a3d7a0c88f
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2816557
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
4c2cec49e9
nvmap: Fix type casting issue
...
CERT-C is reporting following issue:
- Casting nvmap_dev->pool.count + nvmap_dev->pool.to_zero from unsigned
int to int without checking its value may result in lost or
misinterpreted data.
Fix this by changing the data type of total to unsigned long.
CID 456842
Bug 3745813
Change-Id: Idf949ae4cb8691b8ec701a35d478bcb7b517582c
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2816556
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
eeae4f63b9
nvmap: Fix type casting issue
...
CERT-C is reporting following issue:
- Casting dev->nr_carveouts from int to unsigned int without checking
its value may result in lost or misinterpreted data.
Fix this by changing data type of i to int.
CID 490652
Bug 3745813
Change-Id: I35a6837e7356c6b4f3dcd369bed2eac061f44e2e
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2816554
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-11 05:54:22 +00:00
Puneet Saxena
c4a88d6515
tegra: nvmap: dmabuf fd for range from list of handles
...
It returns dmabuf fd from list of nvmap handles
for a range between offset and size.
The range should fall under total size of all of the handles.
Range may lie between sub set of handles.
Bug 3494980
Change-Id: I5c688f832a7a3bb0b6e3713ec6462224bb6fbfc5
Signed-off-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2789431
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-11 05:54:22 +00:00
Jon Hunter
f1e2cd8dea
video: tegra: nvmap: Remove unused code
...
The function __nvmap_kmap() is only supported for Linux kernels prior to
v5.4 and so we can remove the code in the function for kernel greater or
equal to Linux v6.0.
Bug 3767126
Change-Id: Ice2384ce28f268ce453236db36fc82d6781eb716
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2809529
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
9045984efb
nvmap: Remove use of __dma_flush_area
...
__dma_flush_area is defined in downstream, we need maintenance effort
when kernel version is upgraded. Instead, use arch_invalidate_pmem
function provided by the upstream.
Bug 3855165
Change-Id: Ie62935aba7f3c31e6e233816b3bff507197d3f86
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2804844
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
596156cc4b
nvmap: Register nvmap device towards end of probe
...
On TOT, in nvmap probe function, platform_set_drvdata is called after
misc register. So nvmap node is created and clients can open it even
before platform driver data is set. Because of which, the call to
dev_get_drvdata returns NULL and BUG_ON condition is hit. Move misc
register call towards end of the nvmap probe, so that /dev/nvmap is
exposed once all initilization is completed.
As misc register being moved to end of probe, the functions which are
called before misc register and which make use of dev_user field from
nvmap_device for calling dev_err/dev_info function will see the dev
field as NULL. Hence replace such calls with pr_err/pr_info.
Bug 3853486
Change-Id: Ifdd8443812a621aceada7739cf9b02fcf00568b4
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2803672
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
92f34279ba
nvmap: Keep cache flush at allocation time only
...
On TOT, in case of carveouts, nvmap performs cache flush operation
during carveout creation, buffer allocation and buffer release. Due to
cache flush for entire carveout at creation time, nvmap takes ~430 ms
for probe. This is affecting boot KPIs.
Fix this by performing cache flush only at buffer allocation time,
instead of carveout creation and buffer release. This is reducing nvmap
probe time to ~0.69 ms.
Bug 3821631
Change-Id: I54da7dd179f8d30b8b038daf3eceafb355b2e789
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2802353
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Puneet Saxena
d1c06c1dce
tegra: nvmap: make sciipc_id as 64 bit
...
Make SciIpc_Id as 64 bit.
Bug 3715617
Change-Id: If0f6db9d42b527554b77c4768d0f42d276c6a97c
Signed-off-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2783704
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Puneet Saxena
a3201ec3fe
tegra: nvmap: add _dma_*area prototype
...
__dma_flush_area and __dma_map_area
function's protype is removed from "cacheflush.h"
header file. Since these functions are defined locally
in NvMap, define prototype in nvmap_priv.h, private header.
Bug 3767126
Change-Id: Ibf21712fe9738e4b3d7c286ac6acfea550d9d8d7
Signed-off-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2779048
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-11 05:54:22 +00:00
Puneet Saxena
a28927a2c2
tegra: nvmap: fix build for kernel 6.0
...
Fix build for kernel 6.0 onwards.
"register_shrinker" expects shrinker name,
hence pass the name string.
PAGE_KERNEL's Page Protection value needs to be set.
Bug 3767126
Change-Id: I71a54891999d0554eaccac6f37d0f1d9c2a65ace
Signed-off-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2776872
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Ketan Patil
a2338fa761
video: tegra: nvmap: Fix type casting issue
...
CERT-C is reporting following issue:
- Casting (size + 4095UL & 0xfffffffffffff000UL) >> 12 from unsigned
long to unsigned int without checking its value may result in lost or
misinterpreted data.
Fix this by adding overflow condition.
CID 490676
Bug 3745813
Change-Id: I39b741b6150c12dcdd3de7c70bbcf89f8e692a23
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2778588
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Puneet Saxena
8ceb954814
tegra: nvmap: replace _dma_* and __iomap
...
__dma_flush_area, __dma_map_area and __iomap
functions are no more supported from kernel version
6.0 onwards.
Replace them by equivalent exported function in K-6.0 and
onwards.
Bug 3767126
Change-Id: I2b8d81271ed3696ae3d9306a311fe74622c2b611
Signed-off-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2770928
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Ketan Patil <ketanp@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-11 05:54:22 +00:00
Laxman Dewangan
4cf8c80669
nvmap: Copy drivers and headers from kernel/nvidia
...
Copy the driver and header sources of the nvmap to
kernel/nvidia-oot from kernel/nvidia as part of
removing the dependency of kernel/nvidia for OOT drivers.
The latest (few) git history of the files copied are
b7a355916 video: tegra: nvmap: Fix type casting issue
2128c5433 video: tegra: nvmap: Fix type casting issues
0cd082559 video: tegra: nvmap: Change peer vm id data type
4bd7ece67 tegra: nvmap: mark ivm carveout pages occupied
e86f3630a video: tegra: nvmap: Fix type casting issue
c43a23e58 video: tegra: nvmap: Fix type casting issue
ca1dda22e video: tegra: nvmap: Fix type casting issue
1f567abfe video: tegra: nvmap: Fix wrap up condition
29db4d31c video: tegra: nvmap: Remove unnecessary debugfs
fe72f1413 video: tegra: nvmap: Remove get_drv_data() call
3b0fc79e7 video: tegra: nvmap: Fix coverity defect
3cc0ce41b video: tegra: nvmap: Fix coverity defect
6da39e966 video: tegra: nvmap: Fix WARN_ON condition
a16351ff1 video: tegra: nvmap: Remove dead code
9993f2d2d video: tegra: nvmap: Update print level
6066a2077 video: tegra: nvmap: Remove nvmap_debug_lru_allocations_show
3cdf2b7ba video: tegra: nvmap: Add kernel version check
716ded4fc video: tegra: nvmap: Initialize the return value
9b6c1b4ab video: tegra: nvmap: Correct debugfs code
33e70118b video: tegra: nvmap: Fix Cert-C error handling bug
7b960ed79 video: tegra: nvmap: Fix Cert-C error handling bug
945dc1471 video: tegra: nvmap: Fix Cert-C error handling bug
31e572de2 video: tegra: nvmap: Fix Cert-C error handling bug
1f25cbf68 video: tegra: nvmap: Fix Cert-C error handling bug
fa5428107 video: tegra: nvmap: Remove nvmap_handle_get_from_fd
df73f2208 video: tegra: nvmap: Protect kmap/kunmap code
9842e7c6a video: tegra: nvmap: Remove t19x dma_buf map/unmap
06dff1a8d video: tegra: nvmap: Remove unnecessary export symbols
6f097f86b video: tegra: nvmap: Fix Cert-C error handling bug
f14171608 video: tegra: nvmap: load nvmap for T23x compatible platforms
266812814 video: tegra: nvmap: Get rid of NVMAP_CONFIG_KSTABLE_KERNEL
1b38c0887 nvmap: Don't use NV_BUILD_KERNEL_OPTIONS
0ab8dc032 video: tegra: nvmap: Reintroduce NVMAP_CONFIG_VPR_RESIZE
cc8db9797 driver: platform: tegra: Separate out vpr code
28955d95c video/tegra: nvmap: Enable build as OOT module
876d1fbb8 video: tegra: nvmap: Remove IS_ENABLED check
5ea30867a nvmap: Add support to build as module from OOT kernel
a71ad020e video: tegra: nvmap: Protect tegra_vpr args under config
e70061cc1 video: tegra: nvmap: Do not export cvnas_dev
d2a26ff36 video: tegra: nvmap: Include missing header
692e4f682 video: tegra: nvmap: Update page coloring algo
2b9dbb911 video: tegra: nvmap: Check for return value
de8de12b6 video: tegra: nvmap: Enable legacy init support
65d478158 video: tegra: nvmap: Remove dependency of cvnas
38bdd6f05 video: tegra: nvmap: Make nvmap as loadable module
9668e410b video: tegra: nvmap: Enable handle as ID
11c6cbd23 tegra: nvmap: Fix build for Linux v5.18
fbd95c3ab linux: nvmap: change ivm_handle to u32
eb1e2c302 video: tegra: nvmap: Fix NVSCIIPC support
022689b29 tegra: nvmap: return error if handle as ID enabled but id is fd
19e5106ed video: tegra: nvmap: Don't treat ivm as reserved mem carveouts
Bug 4038415
Change-Id: I7108aec3b8532fe79c9423c2835744b1213719e8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
2023-04-11 05:47:21 +00:00
Gerrit Code Review
96d1f511c7
Merge "tsec: Merge the tsec driver from kernel/nvidia to kernel/nvidia-oot" into dev-main
2023-04-06 00:43:21 -07:00
Mayuresh Kulkarni
6e2882db16
tsec: use correct struct in tsec_of_match
...
bug 3817626
Change-Id: I98d1e5b63a68abc25dee1fcff49c4b090d58b0d1
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2874293
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Sahil Mukund Patki
6df40510f9
video: tegra: tsec: fix static analysis issues
...
Remove address space errors by casting properly. Also make variables
static if used within the same translation unit.
Bug 3528414
Change-Id: Id9d566f5b5c9594c69a1483d2945712e6c9f665c
Signed-off-by: Sahil Mukund Patki <spatki@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2835170
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-04 05:28:43 +00:00
Bharat Nihalani
78db0d7c41
tsec: Conditionally turn off clock in suspend
...
Problem:
=======
In current implementation of tsec_poweroff, tsec clock is getting
turned off unconditionally.
During suspend-resume operation, there is an issue in MB1 as
explained in bug 3796711 (comment 16). Due to this, when
tsec_poweroff function is called for second suspend operation,
tsec clock is turned off even when the power state variable
"pdata->power_on" is not set to true or 1.
This causes the following warning from clock driver highlighting
that tsec clock is already disabled.
<snip>
[ 631.507596] tsec already disabled
[ 631.507632] WARNING: CPU: 2 PID: 10535 at drivers/clk/clk.c:1216 clk_core_disable+0x2b4/0x340
[ 631.507634] Modules linked in: ... <skipped these prints>
[ 631.507714] CPU: 2 PID: 10535 Comm: systemd-sleep Tainted: G OE 5.10.120-tegra #1
[ 631.507716] Hardware name: Unknown t234-Orin-SLT-e2421-1099-e2425-1099/t234-Orin-SLT-e2421-1099-e2425-1099, BIOS buildbrain-gcid-32270834 01/05/2023
[ 631.507718] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=--)
[ 631.507720] pc : clk_core_disable+0x2b4/0x340
[ 631.507722] lr : clk_core_disable+0x2b4/0x340
[ 631.507723] sp : ffff80001770b8e0
[ 631.507724] x29: ffff80001770b8e0 x28: ffff000081f0d140
[ 631.507727] x27: ffff000082345930 x26: ffff8000126b1ee0
[ 631.507729] x25: ffff8000126b1f70 x24: ffff800010b75630
[ 631.507731] x23: 0000000000000000 x22: ffff8000125f23f8
[ 631.507734] x21: ffff8000125f2638 x20: ffff0000869aca00
[ 631.507736] x19: ffff0000869aca00 x18: 0000000000000000
[ 631.507738] x17: 0000000000000000 x16: ffff800011008460
[ 631.507740] x15: 0000000000000000 x14: ffff000080990000
[ 631.507742] x13: ffff80079c8dc000 x12: 0000000000000028
[ 631.507745] x11: 0000000000000003 x10: 0101010101010101
[ 631.507747] x9 : 00000000fffffffe x8 : ffff8000128c2dd8
[ 631.507749] x7 : 0000000000000004 x6 : ffff8000128d1e4d
[ 631.507751] x5 : ffff0007ae6d8a28 x4 : 0000000100011117
[ 631.507754] x3 : 0000000000000001 x2 : ffff0007ae6d8a30
[ 631.507756] x1 : 0000000000000000 x0 : 0000000000000000
[ 631.507758] Call trace:
[ 631.507760] clk_core_disable+0x2b4/0x340
[ 631.507763] clk_core_disable_lock+0x2c/0x50
[ 631.507765] clk_disable+0x30/0x50
[ 631.507769] tsec_disable_clk+0x4c/0x80
[ 631.507771] tsec_poweroff+0x3c/0x80
[ 631.507772] tsec_module_suspend+0x24/0x40
[ 631.507776] platform_pm_suspend+0x40/0xb0
[ 631.507780] dpm_run_callback+0x60/0x260
[ 631.507783] __device_suspend+0x130/0x560
[ 631.507785] dpm_suspend+0x158/0x390
[ 631.507787] dpm_suspend_start+0xc0/0xf0
[ 631.507794] suspend_devices_and_enter+0x100/0x9f0
[ 631.507796] pm_suspend+0x21c/0x4a0
[ 631.507798] state_store+0xa0/0xd0
[ 631.507802] kobj_attr_store+0x14/0x50
[ 631.507806] sysfs_kf_write+0x60/0x90
[ 631.507808] kernfs_fop_write_iter+0x134/0x1e0
[ 631.507811] new_sync_write+0xfc/0x1d0
[ 631.507813] vfs_write+0x26c/0x3b0
[ 631.507815] ksys_write+0x7c/0x110
[ 631.507817] __arm64_sys_write+0x28/0x40
</snip>
Solution:
========
There is a check present in tsec_poweroff function to conditionally
call tsec_prepare_poweroff only if TSEC is powered on. Use the
same check to conditionally call tsec_disable_clk
Bug 3930482
Bug 3893914
Change-Id: Id1f6a8e42f43db4dd91ef4f6ae39166c13f1ba8f
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2838694
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Nikesh Oswal <noswal@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Sahil Mukund Patki
e15295fcea
video: tegra: tsec: Coverity fix
...
Fix Coverity issue CID 10164610
Initialize values to NULL to avoid uninitialized pointer error.
Bug 3461002
Change-Id: Ia1205b09f418c3aa3b9b4e457b944cb71d8c927a
Signed-off-by: Sahil Mukund Patki <spatki@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2836048
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-04 05:28:43 +00:00
Nikesh Oswal
f76b77ab85
video: tsec: Add support to alloc GSC memory
...
For larger commands that do not fit into the
CMD Queue we pass additional parameters and
buffer by using the GSC. DisplayRM uses the
GSC allocation APIs to reserve memory for
such large command parameters.
Bug 3920791
Change-Id: I7a2a9821d32e1a89726cf3fb53cd5647eccbadd7
Signed-off-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2834319
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Nikesh Oswal
83576bbd5d
video: tegra: tsec: Launch threaded handler only for SWGEN0
...
Launch threaded handler to drain TSEC messages only for
SWGEN0 interrupt.
If SWGEN1 interrupt is received to pull out print buffer
then ignore it and mask it out so that it is not received
in future
Bug 3897473
Change-Id: I16e2d442ba77141286171f69114ecf309d411ec7
Signed-off-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2822539
Tested-by: Sahil Patki <spatki@nvidia.com >
Reviewed-by: Sahil Patki <spatki@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Nikesh Oswal
be91d1bd18
video: tegra: tsec: Remove TSEC_RM_ON_DCE
...
TSEC IPC GSC-CO Permissions have been modified to allow
access to CCPLEX as well, so we no longer need the flag
TSEC_RM_ON_DCE and now CCPLEX and DCE both can access
the GSC-CO memory for IPC with TSEC
Bug 3817626
Change-Id: Ifb60d508327a5939efb64b27e200933cd15e680e
Signed-off-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2818915
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-04 05:28:43 +00:00
Nikesh Oswal
096b94b3db
video: tegra: tsec: add api to clear init callback
...
DisplayRm when it unloads will call an API on the tsec
driver to clear the previously registered init message
callback
Bug 3817626
Change-Id: I7d5bd16b3d1040f11d1a85bc2439176002c5a57b
Signed-off-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2818914
Reviewed-by: Sahil Patki <spatki@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Nikesh Oswal
5889401827
drivers: tsec: use already exported cache API
...
Earlier we modified the kernel to expose a low level
cache API namely dcache_clean_inval_poc, instead we
can use the already exported arch_invalidate_pmem API
and for ARM invlidating the cache is same as clean
and invalidate
Bug 3817626
Change-Id: Ideb29f2818aece98753aaa40242eaf1246c928cb
Signed-off-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801851
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Sahil Mukund Patki
4de7c8f6d0
video: tegra: Add T239 support in new TSEC driver
...
This patch adds T239 support in new TSEC driver and removes the
support from the old driver.
Bug 3817626
Change-Id: I705e0bac25e6a905588145aef4a4cc98d0a81651
Signed-off-by: Sahil Mukund Patki <spatki@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2800494
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Jon Hunter
7f6f9f5ff5
video: tegra: tsec: Fix build for Linux v5.14
...
When building the OOT driver for Linux v5.14 the build fails because the
TSEC driver is looking for the downstream tegra_mc.h header file. Fix
this by ensuring we use the upstream header starting with Linux v5.14.
Bug 3817626
Change-Id: Ifecad497349d357eafc6356beb1dee1e0f923ae1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2798773
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Nikesh Oswal
31d2e5fff7
video: tegra: tsec: changes to compile for k5.15
...
This patch does changes needed in cache flush and
carevout related memory apis which are different
between k5.10 and k5.15.
Also Makefile is changed so that driver gets built
as module on k5.15 and as part of kernel image for
the older k5.10 kernel
Bug 3817626
Change-Id: I4050d41efc61353c34d32d347917e813473ba113
Signed-off-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2793274
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Nikesh Oswal
d1dc679881
video: tegra: add tsec driver
...
This driver is inspired from the existing tsec driver
under host1x but its highly simplified to use only
the stuff that is needed and is completely decoupled
from the host1x driver
Bug: 3817626
Change-Id: I8fff7ab539cd5393ea13896c3b056472ca0e0a72
Signed-off-by: Nikesh Oswal <noswal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2785908
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 05:28:43 +00:00
Laxman Dewangan
02dd70d7b0
tsec: Remove makefile to prepare driver to integrate from kernel/nvidia
...
Remove Makefile from drivers/video/tegra/tsec to integrate
the drivers from kernel/nvidia. This will avoid conflict.
Bug 4038415
Change-Id: I43352ffe7e677c4388e9ec6799920d0c31fe247a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
2023-04-04 05:27:11 +00:00
Richard Zhao
7a0ea85184
video: tegra: virt: enable gr_comm for oot kernel
...
- enable config for oot
- add GPL license
- include different tegra hv header for oot
Jira GVSCI-16046
Change-Id: I8358b15cec33fbd5fd98265adc9152d8e335511d
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2866154
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Aparna Das <aparnad@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 17:41:13 +00:00
Manish Bhardwaj
4636d2781e
kernel: nvidia: fix cert warnings
...
Using this patch we are fixing below cert warnings :-
1. cert_err33_c_violation: The error status of function
call snprintf(name, 20UL, "ivc-queue%d", i) is not checked.
2. cert_err33_c_violation: The error status of function call
snprintf(name, 30UL, "gr-virt-comm-%d", i) is not checked.
3. cert_err33_c_violation: The error status of function call
snprintf(name, 20UL, "mempool%d", i) is not checked.
Below changes has been done to fix above cert warnings:-
1. check the return value to snprintf function and handle
return error gracefully.
Bug 3512545
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: Ia41ab89e3759387b36489dca5f57652f7389f328
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2676650
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 17:41:13 +00:00
Manish Bhardwaj
15ef43911c
tegra: virt: fix sparse warnings in nvidia repo
...
1. kernel/nvidia/drivers/video/tegra/virt/tegra_gr_comm.c:604:14:
warning: incorrect type in assignment (different address spaces)
2. kernel/nvidia/drivers/virt/tegra/hvc_sysfs.c:154:17:
warning: cast removes address space '__iomem' of expression
3. kernel/nvidia/drivers/virt/tegra/hvc_sysfs.c:189:17:
warning: incorrect type in argument 1 (different address spaces)
4. kernel/nvidia/drivers/virt/tegra/ivc-cdev.c:330:27:
warning: incorrect type in initializer (different base types)
5. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:378:42:
warning: incorrect type in argument 1 (different address spaces)
6. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:386:26:
warning: incorrect type in argument 1 (different address spaces)
7. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:444:22:
warning: cast removes address space '__iomem' of expression
8. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:543:58:
warning: incorrect type in assignment (different base types)
9. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:544:62:
warning: incorrect type in assignment (different base types)
10. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:547:62:
warning: incorrect type in assignment (different base types)
11. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:823:10:
warning: symbol 'tegra_hv_ivc_tx_frames_available' was not declared. Should it be static?
12. kernel/nvidia/drivers/virt/tegra/tegra_hv_pm_ctl.c:330:57:
warning: incorrect type in initializer (different base types)
13. kernel/nvidia/drivers/virt/tegra/tegra_hv_pm_ctl.c:389:27:
warning: incorrect type in initializer (different base types)
To fix above sparse warnings we are making below changes :-
1. use the __poll_t data type when we are using polling framework.
2. pass __iomem type pointer to io framework.
Bug 3528414
Jira ESLC-6572
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: I371e0bdc435d60623bc1405a9383bf45b6274f90
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2673587
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 17:41:13 +00:00
Antony Clince Alex
d9d3a5e42c
virt: tegra_gr_comm: increase waittime to 40 secs
...
At present, the timeouts are not handled gracefully and it results
in system crash, therefore increase the timetout to 40 as a WAR.
Bug 200775880
Change-Id: I6ea999d0ae59df5f2c995dd0669149e598bb6e9d
Signed-off-by: Antony Clince Alex <aalex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2604011
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Haley Teng <hteng@nvidia.com >
Reviewed-by: Aparna Das <aparnad@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 17:41:13 +00:00
kdendukuri
33c3cfdf1f
virt: tegra_gr_comm: increase waittime to 20 seconds
...
as we are receiving "tegra_gr_comm_recv: timeout for response!",
increase the waittime to 20 ticks as a WAR.
Bug 2983318
Change-Id: If4e26027e6aba737f6dc3f063eb699b2620f4e62
Signed-off-by: kdendukuri <kdendukuri@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2346682
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
Reviewed-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-by: Haley Teng <hteng@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 17:41:13 +00:00
Haley Teng
85c3986920
tegra_gr_comm: retry if tegra_gr_comm_send timeout
...
Bug 2779333
Change-Id: I337ed034258d298f1c46673be6c2ca4006967e6b
Signed-off-by: Haley Teng <hteng@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2268246
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 17:41:13 +00:00
Ketan Patil
7fa087bc72
virt: tegra_gr_comm: fix pointer type
...
Change the type of ptr to void __iomem * from void *
as ioremap_cache expects the return type to be __iomem *
This fixes the following sparse warning:
tegra_gr_comm.c:243:34:
warning: incorrect type in assignment (different address spaces)
Bug 200434802
Change-Id: I296cc8048da649e84961239cb37bcd99ffe153a7
Signed-off-by: Ketan Patil <ketanp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1848879
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 17:41:13 +00:00
Richard Zhao
bc2c2bcde6
virt: tegra_hv: remove parameter dn from tegra_hv_mempool_reserve()
...
Device tree node was not used by the function, so remove it to make the
function more common.
Jira EVLR-2364
Change-Id: I0888773fa584eac2c2133c73d9385b700899fdf7
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1647029
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dennis Kou <dkou@nvidia.com >
Reviewed-by: Nirav Patel <nipatel@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 17:41:13 +00:00
Richard Zhao
94f2fb429f
video: tegra: virt: remove virt_ctx from tegra_gr_comm
...
queue index can already index the queues. It also help make the api more
common.
Jira EVLR-2364
Change-Id: I5ba8f03bf8ae9cc8d1a51a6d5c48eef969276ed0
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1646195
Reviewed-by: Damian Halas <dhalas@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nirav Patel <nipatel@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 17:41:13 +00:00
Aniruddha Banerjee
98755f63ca
video: tegra: increase wait_event_timout to 500ms
...
This patch increases the timeout for the wait_event from 250ms to 500ms.
Bug 1653184
Bug 1653182
Change-Id: I339f9d2eef20dcec8cd0a240900ab8af5c710c59
Signed-off-by: Aniruddha Banerjee <aniruddhab@nvidia.com >
Reviewed-on: http://git-master/r/1462093
Reviewed-by: Nitin Sehgal <nsehgal@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com >
2023-04-03 17:41:13 +00:00
Terje Bergstrom
a9442ce5b8
video: tegra: virt: Export functions used by nvgpu
...
Export functions used by nvgpu so that nvgpu could be built as a
module.
Change-Id: I7cf9162a17c3aaf736d20af8eb0ce623d168ff1d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com >
Reviewed-on: http://git-master/r/1028350
Reviewed-on: http://git-master/r/1198258
Reviewed-on: http://git-master/r/1314837
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com >
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com >
Reviewed-by: Timo Alho <talho@nvidia.com >
2023-04-03 17:41:13 +00:00