Commit Graph

114 Commits

Author SHA1 Message Date
dbadgaiyan
3067ceeb00 nvscic2c-pcie: add support for error handling
Enable AER reporting for ednpoint.

Provide error handler for AER reception and
update error code to be read by user space process.
Change PCIe link to down.

Implement error reporting for runtime eDMA xfer errors.

Bug 4088959
Jira NVIPC-334

Change-Id: I74871e5226eab1b708c72aa71216cd160c6ebf68
Signed-off-by: dbadgaiyan <dbadgaiyan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2915753
(cherry picked from commit 7b24941fb486ada70229c42ae1deec12f75028c2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921480
Reviewed-by: Arihant Jejani <ajejani@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-19 12:29:40 -07:00
Ketan Patil
01db38f08e video: tegra: nvmap: Add support for Serial Id feature
Add support for Serial Id feature which will be used by Nsight for
buffer tracking purpose. This feature expects a unique serial id per
buffer even if it is shared across multiple client processes.
Add following code:
- Create a new global counter field for serial id in nvmap device.
Initialize it to 0 when nvmap device is initialized.
- Introduce a new field for serial_id in nvmap_handle struct.
- When nvmap_handle is created, assign it's serial_id field with global
counter's value, and increment global counter.
- During NvRmMemQueryHandleParameters return this serial_id associated
with the handle.
- Do not decrement counter for serial_id even after freeing the handle.

Bug 4138373

Change-Id: Ic1fe22b082eefb352986f8fa44d4c38d186a366f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2918510
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-06-10 19:46:37 -07:00
omar
cde5ffd7c5 drivers: pva: add stream and prog ID
Add stream_id and prog_id to the task submit struct.
This information can then be passed to profilers to
track which events belong to which tasks and processes.
This can be either via eventlib or ftrace.

Bug 4080222

Change-Id: I6e5d80868022b0beffd2b11330b93ab302c96ee5
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911560
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 12:18:40 -07:00
brucex
ced8d91df7 tegra_hv_vcpu_yield_ioctl: Fix header #ifdef
Incorrect header protection led to build error with clang (used to build
android common kernel)

Bug 3974840

Signed-off-by: Bruce Xu <brucex@nvidia.com>
Change-Id: I3a6ba014fbad24561ef5f46b313596876c227a49
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895935
(cherry picked from commit 49dc6cf08e312d1bb0900ea890e22cd931c25f39)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2859501
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shardar Mohammed <smohammed@nvidia.com>
2023-05-29 03:55:41 -07:00
Dipesh Gandhi
95e971616e cdi-dev: Add TPS2H160B support
Add TPS2H160B device PoC support for p3898 platform

Bug 4066218

Change-Id: I9b237d233614e1a23b08b91101db9be9db8e4958
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2885804
(cherry picked from commit ab43d7eab8918cad5afccc1b7cb66b3ee65bf08f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889935
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Aniket Bahadarpurkar <aniketb@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:25:24 -07:00
Laxman Dewangan
769831d84d cam_fsync: Drop license paragraphs
The cam_fsync files are having the SPDX license forma. Hence,
it is not required to have the license paragraphs.

Remove the non-required license paragraphs details.

Bug 4038415

Change-Id: Ifccc4d12111d076eb4f98c414bc35158da1cc694
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903865
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:58 -07:00
Laxman Dewangan
67d0b7dd96 pva: Drop license paragraphs
The pva files are having the SPDX license forma. Hence,
it is not required to have the license paragraphs.

Remove the non-required license paragraphs details.

Bug 4038415

Change-Id: I4d039b7d8d9ef6eea5ba53ead8c5d1e3bda223b9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903864
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:53 -07:00
Ketan Patil
30ebc1a639 video: tegra: nvmap: Add support for querying granule size
Add support for querying the granule size using NvRmMemQueryHeapParams.
In case of compression carveout it returns granule size in which memory
is allocated while in case of IOVMM heap, it returns PAGE_SIZE.

Bug 3956637

Change-Id: I3ec4f5388caecbca0a728e1878007f6b3d4320ef
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899867
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: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:18:06 -07:00
omar
76961fd57b drivers: add pva driver to nvidia-oot
- copy nvpva driver and headers to nvidia-oot directory.
- remove the file copy operation as part of the build process.

Bug 4097111

Change-Id: If040773833405f3941505cb8a2ec3440e0a84c92
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903052
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
2023-05-13 02:04:09 -07:00
Vincent Chung
c7f12c1ae6 media: tegra: cdi-mgr: fault code for tmr eq fail
Add the CDI_MGR_GPIO_INTR_FAULT code, and emit it when interrupt timer
enqueue fails.

Jira CAMERASW-11945

Bug 3902416

Change-Id: I7459c2bd7160cf8552007a0e299ad1f2a1f47b1f
Signed-off-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2901738
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-12 04:58:08 -07:00
Mohit Ingale
8df7cfbf9f tegra: cam fsync driver with start time support
Camera fsync signal Driver provides following features.
 - Configures and runs TSC generator to provide fsync signal to the
   camera module
 - FSYNC signal is programmed as specified in DT for freq and offset
 - Start time of fsync signal can be specified or default
   value can be used
 - Default value used will be 10ms in future
 - If start time is provided, value must be provided in TSC ticks unit
 - Read DT, if tsc-gen-groups are specified, init &  expose node for
   each group
 - Each generator in group is configured
 - IOCTL interface is exposed to accept start time and start the generator
 - Sanity check is done to ensure, no generator is part of multiple groups
 - Backward compatibility is maintained

JIRA CAMERASW-11902
Bug 3799488

Change-Id: I4f278eb95b8f85edb2d5e7664c9f2dd694437263
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898373
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-09 22:29:35 -07:00
Vincent Chung
be01df015d media: tegra: cdi-mgr: support interrupt timeouts
Add support for configurable interrupt timers and event notification
queues to SIPL Device Block to mirror the CDAC (QNX) pulse channel
interface.

The CDI_MGR_IOCTL_INTR_CONFIG IOCTL is added to set the timeout
duration at initialization, and existing GPIO interrupt code is
refactored.

Also removes the GPIO index limitation to the range of [0,31] by
returning the complete indices one at a time instead of a bit flag.

Jira CAMERASW-11100
Jira CAMERASW-11385
Jira CAMERASW-9366

Bug 3902416
Bug 3792904

Signed-off-by: Vincent Chung <vincentc@nvidia.com>
Change-Id: I62b6c0bd8be18922ab1fe5d40485a69274f2a18e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2893327
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 16:37:36 -07:00
Chris Dragan
5dcd80a533 misc: mods: update from Perforce
Change-Id: I65dc43cae65946cce09fdd060627a5817127cfcf
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895269
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 08:11:58 -07:00
Chris Dragan
0ae09fcdd1 misc: mods: clean-up copyrights
It is unnecessary to spell out license text when we are using
SPDX license identifiers.

Change-Id: I902e18a413126f4dddb0cbb1fb5c0e0de385d2a1
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892356
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 02:51:21 -07:00
Kuan Luo
ec7162fc4d misc: mods: cleanup tegra prod module
Bug 4051795

Change-Id: Ia545cdb456bb6876aa1f48b4efcd111387999167
Signed-off-by: Kuan Luo <kluo@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891512
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-24 05:40:42 -07:00
Laxman Dewangan
e8b7a5ca26 nvmap: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I4db6577ddb806690f6ec04f5eaf1364578102d14
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890635
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-22 09:59:20 -07:00
Laxman Dewangan
5535897d3d include: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I73edd8699dc7298ecb6efc991bc74c1b1e089d0d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891236
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:42:53 -07:00
Laxman Dewangan
cafcc24336 include: nvhost: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I0baf1b4d579ac7414e0936c99ba0861abee241e6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891215
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:42:48 -07:00
Laxman Dewangan
c526d32af3 nvdla: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: Ie5d525f06dde5b3e3d332caff3d135198059d325
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890634
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:40:49 -07:00
Laxman Dewangan
5469e6aaf3 nvsciipc: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I422a02eb30ba96dc63b96ee901023d8f90ff201b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891211
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-21 11:40:34 -07:00
Dong Qiang
6fe239203b drivers: mods: Add MODS_FFA_CMD_MISC Cmd for MODS SP
Added new cmd to clear PCIE XTL RC error counters

Bug 4053219

Signed-off-by: Dong Qiang <carld@nvidia.com>
Change-Id: I73ee69edb2b26cd381c5b2a42f8d7e19fd7bf67e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889256
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-20 06:47:59 -07:00
Chris Dragan
c46d90ef1a misc: mods: update from Perforce to 4.16
Change-Id: Ib0126f696879706d7834b1676bc17f6cbfd8194b
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887660
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-20 06:46:56 -07:00
Ketan Patil
594e39e498 video: tegra: nvmap: Add NUMA support in nvmap
In NUMA system, user can request nvmap to allocate from any particular
node using NvRmMem APIs. Add code to request allocation from such
requested node. While allocating pages from page pool, check if those
pages belong to requested NUMA node. In some cases, we may not need to
use NUMA support e.g. in color pages allocation code, we don't need to
use NUMA, as page coloring is needed only for t19x chips.

JIRA TMM-5287
Bug 4043165

Change-Id: If8043278122068773a802d83723d287d32914e14
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889707
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-19 10:44:34 -07:00
Laxman Dewangan
6449938f8d include: uapi: Add nvhost_ioctl.h from kernel/nvidia
Copy header file uapi/linux/nvhost_ioctl.h from kernel/nvidia
to avoid the build time copy of this header and get rid of
dependency of kernel/nvidia.

Bug 4038415

Change-Id: Ie6c01cd040b9918ba17f23c4050c2f9fe42c69ef
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888617
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-15 08:52:55 -07:00
Akshata Bhat
5641042df8 nvdla: kmd: Update max output status count
+ Update needed to enable NvSciSync based task
status support for NvMediaDla
+ Updated all macro definitions of
MAX_NVDLA_OUT_STATUS_PER_TASK for consistency

JIRA DLA-6305

Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Change-Id: Ieacba82905e7ad19729856be32f022a13a1c37de
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2813577
Reviewed-by: Maxim Grigoriev (SW-GPU) <maximg@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Tested-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
3349513ab1 nvdla: kmd: set DMA direction based on access type
Based on access permission requested through pin, DMA direction
is set. This allows setting a reduced access permission for DLA
firmware and/or hardware.

Jira DLA-5775

Change-Id: Ie28e9da87325f36de12269eab1487407f6272053
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2682040
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Amit Sharma
9de4a4df0a nvdla: Use import_id for creating dma buf memory
[1]: Add import_id field in `nvdla_mem_share_handle`.
[2]: Use import_id for creating the dma buf.
[3]: Use share_id/handle as key for search/insert the vm tree.
[4]: Optimize code and avoid un-necessary dma_buf_get/put which
     become possible with [3]

Bug 3470815

Change-Id: Idb1df6ef04301e1ade4e39d3489502759e7d8462
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2645563
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Anup Mahindre
911977d5dd nvdla: kmd: Expose full set of limits for task parameters
- Certain task parameter limits were not exposed to UMD / Users
- Expose these limits and rename to provide consistent KMD interface
across linux / qnx

Jira DLA-4467

Change-Id: Ibcf1de5f4d442d9b1f3fefaf71195bc6e58fff5c
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2546453
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2558254
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Arvind M
9bf2e99b45 nvdla: kmd: add bypass exec support with submit
[1] NVDLA_SUBMIT_FLAGS_BYPASS_EXEC flag allows its clients
    (UMD or nvdla_kmd_sanity) to bypass execution for a
    submission. This flag is a property of submission and
    shall directly apply on all tasks within that submit.
[2] With above flag set, it propagates information to firmware
    through task descriptor and firmware shall be responsible
    for bypassing the execution.

Jira DLA-4443

Change-Id: I70000ef486905c812fec65f265a378a99844c10a
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2544802
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:46:41 +00:00
Anup Mahindre
ae34c03649 video: tegra: host: nvdla: Align max buffers per task limit
- Max buffers per task limit was reduced to 384 recently as
  per all usecases from UMD
- Rename the macro to MAX_NVDLA_BUFFERS_PER_TASK to avoid
  conflict with another macro defined in nvdla_inf.h
- Reflect this change in uapi

Jira DLA-4376

Change-Id: I7d2f19901db5273ae2ae2ba7be504223c2f59e4e
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2517621
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Anup Mahindre
6242fdd281 video: tegra: host: nvdla: Add support for internal buffers
- Add buffer type field to nvdla_mem_handle
- For internal buffers, skip pin and unpin operations and pass the
offset as final adress
- Also update error handling in nvdla_map_task_memory to match with
  convention

Jira DLA-4376

Change-Id: I662da30cb9c606d2f67b792f09e026af391c89d1
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2503708
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:46:41 +00:00
Arvind M
9eec5aea15 nvdla: kmd: handle {RELEASE,ALLOC}_QUEUE ioctls
[1] This commit separates the allocation and deallocation
    of mission critical resources away from open() and close()
[2] It is achieved through introduction of NVDLA_IOCTL_{ALLOC,RELEASE}
    IOCTLs.
[3] nvdla_buffer_* APIs introduced to facilitate easier split.

Bug 200628173

Change-Id: I3fb07ecaff69c62ec5eb9e5bea39b07ae1624240
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2403689
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:46:41 +00:00
Ankit Patel
f88862a040 include: uapi: correct the include path for headers
Modified the commit e4163dbef1719b52b2d04782778767d313f37cdc

After installing the user space headers using make headers_install,
We do not have an uapi as a top level directory. Hence we must
include from the regular path linux|media|misc|video within the user
space header files.

Bug 2806057

Change-Id: I2f32a32814ac5347769177428717da7e7098147d
Signed-off-by: Ankit Patel <anpatel@nvidia.com>
(cherry picked from commit f8c05a422c4f14114c762906e24f4221a7343469)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2294559
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:46:41 +00:00
Arvind M
31a4285b17 video: tegra: host: pin with specific permission
[1] Facilitate pinning of buffer with user requested access
    permission
[2] This feature allows to restrict access to buffers shared
    with the device.

Jira DLA-2502

Change-Id: I175ad10922480689de57eb832040a7d59b29b9bd
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2209415
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Arvind M
c6ec7bcb20 video: tegra: host: restores sof/eof, TS feature
This commit restores the following,
[1] 890be46 video: tegra: host: dla: refactor and cleanup code
[2] 109f8e8 video: tegra: host: add prefence signal support
[3] 6f683c8 video: tegra: host: add sof/eof taskstatus support
[4] a9cb0c9 video: tegra: host: add sof/eof timestamp support
[5] dcdb0d6 video: tegra: host: increase fw minor version

Jira DLA-1992
Jira DLA-1993

Change-Id: I9844b141b72fc553ba7d886e706e340160586129
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2135092
Tested-by: Mitch Harwell <mharwell@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Sachin Jadhav
f9f2c6598d Revert "video: tegra: host: add prefence signal support"
This reverts commit 109f8e8c53e5296ea8c782086500c2e78d99cfbd.

Change-Id: I4fd6f37e271c52f4a1c1b6870c0b1355118a301d
Signed-off-by: Sachin Jadhav <sachinj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2133502
2023-04-14 11:46:41 +00:00
Sachin Jadhav
ef831a5207 Revert "video: tegra: host: add sof/eof taskstatus support"
This reverts commit 6f683c8a174b0a937ea6324e017c46df81398f25.

Change-Id: Ic7527e007b608c43245250343101ceee2aeaf742
Signed-off-by: Sachin Jadhav <sachinj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2133504
2023-04-14 11:46:41 +00:00
Sachin Jadhav
1d37583a5f Revert "video: tegra: host: add sof/eof timestamp support"
This reverts commit a9cb0c9ef7710387683f0449f9054a4409a789bc.

Change-Id: Iff17331654a9055527ab2074fee4a6ae67acb80f
Signed-off-by: Sachin Jadhav <sachinj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2133505
2023-04-14 11:46:41 +00:00
Arvind M
6e76995152 video: tegra: host: add sof/eof timestamp support
[1] Fills SOF/EOF timestamp buffer action before SOF/EOF
    signal actions.
[2] Adds action opcode ACTION_WRITE_TIMESTAMP to inform
    firmware for scribbling timestamp buffer.
[3] Decrement MAX_TASKS_PER_SUBMIT from 24 to 16, since existing
    results in stack size > 2048 byts (overflow).

Jira DLA-1992
Jira DLA-1993
Jira DLA-251

Change-Id: Ie16292a963a97fbea68ad6860dcfc39b85c4b55b
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2121532
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Arvind M
971fe01893 video: tegra: host: add sof/eof taskstatus support
[1] Adds sof_task_status field which is written before
    start of task execution. (i.e before SOF signals)
[2] eof_task_status feature already exists in form of
    output_task_status (field renamed for clarity)

Jira DLA-1992
Jira DLA-1993

Change-Id: Icc26a7a40f18bb2af1caaff054641c45b9772945
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2121531
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Arvind M
ccfa8a0b47 video: tegra: host: add prefence signal support
[1] Adds support for prefence signal support
[2] Facilitates handling of SOF feature request from higher
    levels
[3] Update ioctl structure for emu_submit to allow prefence
    with signal action

Jira DLA-1992
Jira DLA-1993

Change-Id: Id0fe8a7a3ff46227121ec5342197b1da2a3f346d
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2121530
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Bharat Nihalani
369d9398da Restore "include: uapi: move nvhost user-interface headers"
This reverts commit c49670d23c368245670556b54ff83cc6b4edb96b.
The original commit was reverted because it exposed DLA UMD driver to
include kernel headers directly.

Since then, DLA UMD driver has been fixed to use headers from
user-space code. And hence restore this commit.

Bug 200471393

Change-Id: I221f56c5d12bd3db79568398a95baa61ffcd8101
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1980599
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Sharif Inamdar
f8e64ca57a Revert "include: uapi: move nvhost user-interface headers"
This is causing Android builds to fail

This reverts commit 965ceca35c92eba011163f4c637b3b9e0f073f1a.

Change-Id: I84a98d129d25e33d1828033ab48a60102252b516
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1959908
2023-04-14 11:46:41 +00:00
Anuj Gangwar
da392cec33 include: uapi: move nvhost user-interface headers
Move the linux user-interface headers from include/linux/
to include/uapi/linux/

Change the path for above headers in the dependent files

Bug 2062672

Change-Id: I2e116dc8f6c33f53c03fb56b923931b6e600b534
Signed-off-by: Anuj Gangwar <anujg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1953709
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +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
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
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
Joshua Cha
efcc11fc9c misc: nvsciipc: add get vmid cmd
Bug 3813532

Change-Id: I4caa286d4aff5f9d4361b1b34da9bf3257275add
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2787605
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
Reviewed-by: Kurt Yi <kyi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-07 05:31:26 +00:00
Joshua Cha
9766afdf51 misc: nvsciipc: support Inter-VM in auth APIs
1) nvsciipc KMD
* use IVC KMD to query peer VMID (ivc_cdev_get_peer_vmid).
* Support Inter-VM in NvSciIpcEndpointMapVuid().
* Added debugging ioctl cmds to debug in userspace level
- validate auth token
- map vuid
* Add peer_vmid to config entry and endpoint DB.
* Add IOCTL_GET_DB_SIZE cmd to return DB entry count

2) IVC KMD (ivc-cdev)
* Add ivc_cdev_get_peer_vmid() to return peer_vmid of qid.
* Add IOCTL_GET_VMID to return guest VM ID

JIRA NVIPC-390
JIRA NVIPC-394

Change-Id: I14634fd2d17c4a28b09b9a3f9f2d42c9169e0dfb
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2766220
Reviewed-by: Simon Je <sje@nvidia.com>
Reviewed-by: Kurt Yi <kyi@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-07 05:31:26 +00:00
joshuac
ef59a0da4d misc: nvsciipc: update to support x86 build
Added missing fs.h to fix build error.
Added debug info for root user only.
Added alternative header path for x86 build.
Fixed NvSciIpcEndpointMapVuid() API.
remove mutex except for SET_DB IOCTL (lockless for read operation).
Added more ioctl commands.
 - NVSCIIPC_IOCTL_GET_DB_BY_NAME
 - NVSCIIPC_IOCTL_GET_DB_BY_VUID

JIRA NVIPC-227

Change-Id: I95fc6f9fff36c9c1df999b11109236b1b3481d62
Signed-off-by: joshuac <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2755193
Reviewed-by: Kurt Yi <kyi@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-07 05:31:26 +00:00