Commit Graph

291 Commits

Author SHA1 Message Date
Chris Dragan
51d4ae99d9 misc: mods: update from Perforce to 4.22
Bug 4119327

Change-Id: I7704293f7fce103e9fba6b088da8081987da36c5
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993627
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-10-10 19:47:13 -07:00
Viswanath L
d5138e1c58 nvadsp: Fix build issues and enable
Fix build issues for nvadsp in OOT kernel and enable the build.

 - Below files copied from kernel/nvidia/include/linux/
    - tegra_nvadsp.h (72af3e78a6aff0fa250e9fd36b8414264d0e4c9a)
    - tegra-firmwares.h (700223e52f49f300664dd91335fa11111af733aa)
    - tegra-hsp.h (988be8f05033e1d728e046e918b506d829106082)
 - Below file copied from kernel/nvidia/include/uapi/misc/
    - adsp_console_ioctl.h (72af3e78a6aff0fa250e9fd36b8414264d0e4c9a)
 - Functions that needs additional AGIC APIs not supported in upstream
    are pushed under macro CONFIG_AGIC_EXT_APIS
 - T210 chip_data and references removed

Bug 4164138
Bug 3682950

Change-Id: I5dfb570e578ca3631896de7350cea66698612568
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971924
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-26 12:09:57 -07:00
Sumit Gupta
c10e9dee5c drivers: nv-p2p: Move Nvidia Tegra P2P Driver to OOT
Make Nvidia Tegra P2P driver for RDMA as an OOT module.
The driver was earlier merged in Kernel-5.10 in the below cl.
 https://git-master.nvidia.com/r/c/linux-nvgpu/+/1821407

Bug 4142533

Change-Id: I6b24b44832d45fa5abedcd04c94d5d1e2576a6a3
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978103
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-21 21:24:05 -07:00
Akhil R
3006e5b42f mfd: max77851: Enter SLEEP on suspend based on DT
Add option to disable entry to SLEEP when system is suspended.
There are systems where SW_SLP is not necessary on system suspend
as it could be managed differently. Provide an option not to enter
SLEEP state during suspend for such systems.

Bug 3643699

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I1600d0d053a15e18c7419a377962b76845bb92b5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2712396
(cherry picked from commit a83d4b50fdef4af7a9360224cad0357672bbd380)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2717492
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938654
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:17 -07:00
Shubhi Garg
1ab8a495fc mfd: add max77851 pmic MFD driver
Adding MAX77851 MFD driver provided by Maxim.
 - fix android warning/error for uninitialized variable return

Bug 200749982

Change-Id: I6ef82a6c06fe7bbd4df2c71991ec6c5c15e28474
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2591158
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938653
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:12 -07:00
Chris Dragan
97835cded8 misc: mods: update copyright header
Bug 4165184

Change-Id: Id5d570cc4e5c3364d696271b1333e47e02e17b9e
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976924
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-11 14:06:17 -07:00
Chris Dragan
a7810cdbac misc: mods: update from Perforce to 4.21
Bug 4165184

Change-Id: I6b548008b21024d8e322c5a1ca1f98fbc5b389a2
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2975467
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-07 18:56:15 -07:00
Mallikarjun Kasoju
c9dae14cce scsi: ufs: Fix CBB errors for K6.1
Made below changes to hba structure to make it
symmetric as core hba structure for K6.1.

1. Remove unused members in hbs structure.
2. Added write booster mutex.

Bug 4161857

Change-Id: I1fdb5e7da11e51edb9f072f8fde25795b38bdc30
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2973021
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-04 08:25:48 -07:00
Praveen AC
35335a44b6 nv_hakw_owl: Add 4xHawk and 4xOwl support.
Following changes are made to add support 4xHawk & 4xOwl
on P3762 / P3783 GMSL board.
1) Driver changes to add i2c address translation.
2) Fix simultaneous streaming of Owl & Hawk.
3) Update ar0234 EEPROM Calibration.
4) Add support for 4xHawks.
5) Add internal Fsync support.
6) Add multiple link combinations for Hawk & Owl.
7) Enable EEPROM support for 4xHawk.

Bug 3620984
Bug 3562348
Bug 3866131
Bug 3817827
Bug 3932004
Bug 4071347
Bug 4095571
Bug 4096788

Change-Id: Ic6289f60258d446f259277fdd1d6d52e687dc74e
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971143
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 12:51:51 -07:00
Aniket Bahadarpurkar
fa20ae0dd6 soc: tegra: Reduce number of mem areas
Reduce number of memory areas for camrtc dbg tests
for DRAM optimization

Bug 3995285

Change-Id: Icc2250915ada202aee962c691d97f14ca861f31d
Signed-off-by: Aniket Bahadarpurkar <aniketb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2902767
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-08-28 15:12:02 -07:00
pshaw
01ecacf7b4 fsicom: add fsicom multi core support
- smmu and hsp support added for fsicom multi core
  feature in fsicom kernel driver
- probe, suspend and resume will be called for smmu_inst
  0 only as it will have single dev node for comm.
- mailbox 2,5 and 1,4 is used for TX and RX comm. respectively
  with FSI

Jira SS-5744

Change-Id: I859d5945853195ba76996a8c36ca19efd9c4409f
Signed-off-by: pshaw <pshaw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952268
Reviewed-by: Praveen James <pjames@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-27 21:50:21 -07:00
Chris Dragan
1a3e4521c8 misc: mods: update from Perforce to 4.20
Change-Id: I7ea45fb5aa393372299648e326e81ecf62913b40
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2955034
Reviewed-by: Lael Jones <lajones@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 09:03:53 -07:00
Ankur Pawar
804feada07 media: add imx477 sensor driver
Add imx477 camera sensor driver code,
mode tables and makefile changes.

Bug 3583587

Change-Id: Ib218e7d67f60f381a0e75edad71e9e5b35288dd3
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2864577
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-08-20 07:04:10 -07:00
Ankur Pawar
ff01ad1318 media: add imx219 sensor driver
Add imx219 camera sensor driver code,
mode tables and makefile changes.

Bug 3583587

Change-Id: Ic7693de3cbdeeaecd7d9118a1e7819eaab5fdb3a
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2862964
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-08-19 12:38:50 -07:00
Anubhav Rai
d6bcba5193 vi5: fix v4l2 VI driver channel open
unmap chan_id from DT with capture channel id.
Capture channel id is shared between isp capture
and v4l2. Find a free capture channel that does not
conflict with other clients

bug 3691031

Change-Id: If3cd887db6feb2a1817a7451249185de47d6e9ad
Signed-off-by: Anubhav Rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2768753
(cherry picked from commit cf54cc587eba0854236c634b8ec0c1c2c98a3a5d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866951
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 20:05:09 -07:00
Anubhav Rai
33f74c0dd8 csi5: add lane polarity config
parse the lane polarity config from the DTB and
program the nvcsi brick config accordingly.

bug 3865161

Change-Id: I70f746a40033bafa7d9286790b9c01ae5986a9f8
Signed-off-by: Anubhav Rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2855412
(cherry picked from commit bee21e4c839b8c55ac6314fd55f2e36edd547c97)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2953780
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 05:11:26 -07:00
Ketan Patil
1c2599bcba video: tegra: nvmap: Update carveout name
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>
2023-08-16 18:47:35 -07:00
omar nemri
8e837b02d4 drivers: pva: add buffer serial id for fences
in order to support unique identification of semaphores
while tracing across VMs, a unique identifier is added
during buffer pin and is emitted in traces.

Bug 4149342

Change-Id: I88e53be197f5354834795aab197e8de39535ac5c
Signed-off-by: omar nemri <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938555
Reviewed-by: Nikita Chumakov <nchumakov@nvidia.com>
Reviewed-by: Oleg Sikorskiy <osikorskiy@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-21 12:09:54 -07:00
Manish Bhardwaj
7e764afb5f storage: Update VSC driver for handling erase
1. If vs_blk_dev_config.req_ops_supported has only DISCARD
   support enabled, then REQ_OP_DISCARD should be mapped to
   DISCARD for UFS.

2. If vs_blk_dev_config.req_ops_supported has only SECURE_ERASE
   support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE
   both should be mapped to SECURE_ERASE for UFS.

3. If vs_blk_dev_config.req_ops_supported has only ERASE
   support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE
   both should be mapped to ERASE for UFS.

Bug 4176555

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I01599df9ab93525120106dfabf2d345ab8b64770
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920433
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-14 08:37:46 -07:00
Jon Hunter
deffbf24ab virt: tegra: Ensure functions stubs are defined
When building the out-of-tree drivers with virtualization support
disabled, symbols for some of the virtualization functions are not found
...

 nvgpu: Unknown symbol tegra_hv_mempool_unreserve (err -2)
 nvgpu: Unknown symbol is_tegra_hypervisor_mode (err -2)
 nvgpu: Unknown symbol tegra_hv_mempool_reserve (err -2)
 nvhost_pva: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)

Update the hv-ivc.h header to ensure that these function stubs are
defined when virtualization support is disabled and only build the
hv-ivc driver if virtualization is enabled.

Finally, move populating the ccflags to the top-level Makefile and use
the subdir-ccflags directive to ensure the ccflags are passed to all
sub-directories.

Bug 4159372
Bug 4170085

Change-Id: I35edb91007524c3143dff7564f9ad545bd34e969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921199
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-05 14:34:15 -07:00
Jon Hunter
ad2857ccaa soc/tegra: Clean-up fuse-helper
The option CONFIG_TEGRA_FUSE_UPSTREAM is not needed any longer because
we always want to enable this for Linux v5.15. Therefore, remove this
option completely.

The function tegra_fuse_control_read() is not used anywhere and so we
can also remove this too.

Bug 3777983

Change-Id: I37888bc1f615f72b245c027e5c1a9251aca08af4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925233
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-03 15:08:36 -07:00
Laxman Dewangan
43c941e0f7 prod: Add OOT prod header
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>
2023-06-25 08:06:09 -07:00
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
Matti Ryttylainen
f19d5372b4 camera: Switch VI/ISP events to ftrace
* Switch VI frame_begin and frame_end events to produce ftrace traces
instead of eventlib events.
* Switch ISP task_begin and task_end events to produce ftrace traces
instead of eventlib events.
* Add class IDs for VI/ISP
* Switch VI/ISP task_submit events to ftrace

Bug 4080214

Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Change-Id: I7776005bb89eaed168c65c62d8aa19c553559fdb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911804
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Oleg Sikorskiy <osikorskiy@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-19 12:28:58 -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 nemri
4cff480dc1 drivers: pva: combine trace definitions
Currently there is an ftrace definition for pva
that is called nvhost_pva.  combine into tegra_pva
ftrace dfinition with include file nvpva_ftrace.h.

Bug 3829397

Change-Id: I0bffdfedad9d5010ef47ffe3f2639c1e162286b1
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2914938
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-06 02:09:29 -07:00
Ketan Patil
a56b9fc61c mc-utils: Update driver so as to support multiple SOCs
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>
2023-06-02 11:03:17 -07:00
omar
3fda4da5d8 drivers: pva: use ftrace instead of eventlib
deprecate use of eventlib and use ftrace instead
for reporting task statistics.

pass prog and stream ID to ftrace events.

Bug 4080222

Change-Id: Id304baba109cde5392f3f297a745c8084b07613a
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911268
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Nikita Chumakov <nchumakov@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 12:18:45 -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
Manish Bhardwaj
3a6ae071af nvidia: add no_sanitize_address attribute
add no_sanitize_address attribute if KASAN is enabled

Bug 4121072

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I2bb4b60f0e95e7b93d792010474d6503b97ac392
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2908208
Tested-by: Tonny Liang <tonnyl@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-24 08:59:12 -07:00
Jon Hunter
9a3174280f platform: tegra: Remove CVNAS driver
The CVNAS driver is not needed for Tegra234 and future devices. Remove
the CVNAS driver and support for CVNAS from DLA, NVMAP and PVA dirvers.

Bug 4037930

Change-Id: I5d1ae3c195485cb094f9b9b480f91d81fd04687c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903848
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-23 20:56:08 -07:00
Akshata
2e59846460 nvdla: kmd: Add ftrace support
+ Replace eventlib with ftrace for Linux-OOT kernel
+ Added event logging for:
 * job_submit
 * job_prefence
 * job_postfence
 * job_timestamps

JIRA DLA-6820

Change-Id: I4d1ad1b535b2422257e9e1dce8d94ee317c65feb
Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2906273
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:31:01 -07:00
Laxman Dewangan
a4136b7e63 platform: tegra: Remove firmware class and inventory drivers
Remove firmware class and firmware inventory modules drivers
as these are not used anymore.

Bug 4090910

Change-Id: Ibef41b6ba026a6d6f24ec79b4b7aaa47bc62632a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905556
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:29:16 -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
6476bb40a4 cvnas: Drop license paragraphs
The cvnas 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: I8f6212255cb9ce2cff3af5492599cf4f3946f04d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904300
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>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-16 06:33:13 -07:00
Gerrit Code Review
5f8a0b1583 Merge "cvnas: Integrate drivers from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-05-16 06:33:08 -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
Laxman Dewangan
9ae82f62c3 pva: Replace srctree.nvidia with srctree.nvidia-oot
Replace srctree.nvidia with srctree.nvidia-oot for
PVA makefile as the build system pass only srctree.nvidia-oot.

Bug 4087103

Change-Id: I6b17c2d80957e2c82ebe33ef74f9cad9e6ebb50e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903852
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:49 -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
Ketan Patil
faa6040875 video: tegra: nvmap: Switch to configurable granule size
In compression carveout, granule size should be configurable via device
tree. Earlier code was written by considering granule size of 2MB,
update the code to use configurable granule size read from DT.

Bug 3956637

Change-Id: Ib1e966117b2bd9511cbcde37a6011c17f38f22e2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899865
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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:01 -07:00
Bharat Nihalani
eda8327741 include: Fix cvnas build errors
Fix cvnas build errors when CONFIG_TEGRA_CVNAS is disabled.

The following build errors are fixed:

nvhost_buffer.c:134: undefined reference to `nvcvnas_get_cvsram_base'
nvhost_buffer.c:135: undefined reference to `nvcvnas_get_cvsram_size'

Bug 3633940

Change-Id: I3f42bb9a0f5d833a70fd05c494fdbbcaab60be1e
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2706940
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:53 +00:00
Ketan Patil
242600283f video: tegra: nvmap: Do not export cvnas_dev
By exporting cvnas_dev all the internal data of the driver is getting
exposed to any driver that uses it. This could allow drivers to corrupt
this driver data. Hence do not export cvnas_dev, use helper functions to
get it's required member elements from nvmap.

Bug 200722684
Bug 3528414

Change-Id: I17f6fa1e98c777a7ec9118dbc6f0c6359e949f22
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2704698
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:41 +00:00
Ketan Patil
3a87281353 video: tegra: nvmap: Remove dependency of cvnas
Handle dependencies between nvmap and cvnas driver:
- nvmap_register_cvsram_carveout function is called by cvnas driver
(builtin driver for 5.10) and it's definition is present in nvmap driver
(builtin driver for 5.10, but we are trying to make LKM). This is
resulting into build issues while making nvmap as LKM for 5.10
- One option to resolve this is by making cvnas driver as LKM for 5.10
But nvhost, nvdla, cbb are not LKM for 5.10 and are calling functions
defined in cvnas driver e.g. nvcvnas_get_cvsram_base, hence we can't
make cvnas as LKM for 5.10
- Second option is to get rid of the call nvmap_register_cvsram_carveout
from cvnas driver. This approach is implemented in this patch.
- Export cvnas_dev from cvnas driver, do not call the above function
from cvnas driver. During nvmap probe, nvmap itself would call the above
function, as cvnas_dev is exported , it's being used in nvmap driver to
get base, size etc. information, which is needed as argument to above
function, which will register the cvnas carveout in case of 5.10

Bug 200722684

Change-Id: I32e5694386de4a7fef65c3f67ffb9b5066f62ab3
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2678685
2023-05-15 06:12:33 +00:00
Jon Hunter
c920508259 platform: tegra: cvnas: Fix function declarations
Sparse generates the following warnings for the CVNAS driver ...

 drivers/platform/tegra/cvnas/cvnas.c:126:5: warning: symbol
 	'nvcvnas_busy' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:138:5: warning: symbol
 	'nvcvnas_idle' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:444:13: warning: symbol
 	'nvcvnas_get_cvsram_base' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:456:8: warning: symbol
 	'nvcvnas_get_cvsram_size' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:468:5: warning: symbol
 	'is_nvcvnas_probed' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:476:5: warning: symbol
 	'is_nvcvnas_clk_enabled' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:779:5: warning: symbol
 	'nvcvnas_busy_no_rpm' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:793:5: warning: symbol
 	'nvcvnas_idle_no_rpm' was not declared. Should it be static?

There are a few problems here which are:
1. The CVNAS driver does not include the 'cvnas.h' header file and so
   some of the declarations are not found.
2. Some of the CVNAS functions are not declared in the 'cvnas.h' header
   file and need to be added.
3. The Tegra19x CBB driver is a user of these CVNAS functions, but
   instead of including the 'cvnas.h' file it defines prototypes for
   these functions. This is not necessary and so we can remove these
   prototypes and simply include the 'cvnas.h' header file.
4. The function definition nvcvnas_idle_no_rpm() in the CVNAS driver is
   incorrect and this function should not have any arguments passed to
   it and currently does not match the prototype.

Bug 3528414

Change-Id: I7945f8c66ceb5ca5b158b7ed1b81a50f19c52bb7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2670149
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:09 +00:00
Damian Halas
04479abd45 t19x: cvnas: expose cvsram base and size to kernel
Add nvcvnas_get_cvsram_base and nvcvnas_get_cvsram_size,
Use them in pva_queue.c and nvhost_buffer.c
instead of hardcoded values.

JIRA EVLR-2273

Change-Id: I3fbec50a2c57220034b25b3a91569ba4aec319f6
Signed-off-by: Damian Halas <dhalas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1651414
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Nirav Patel <nipatel@nvidia.com>
2023-05-15 06:11:13 +00: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
Matti Ryttylainen
0310b3b8e9 include: soc: tegra: add watermark support
Add fields for watermark surfaces to VI/ISP capture descriptor meminfo.
Add fields for watermark buffer offsets to VI/ISP capture descriptors.
Add fields for input/output buffer IDs to VI/ISP capture descriptors.
Add fields for ISP program and stats buffer IDs to ISP program descriptors.

Change-Id: I00ab4122fa7731b978aa2e1246e1fbd9d6014d33
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895037
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
Reviewed-by: Aki Niemi <aniemi@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-10 13:49:15 -07:00