Commit Graph

264 Commits

Author SHA1 Message Date
Johnny Liu
2527826ca1 platform: tegra: camera: add operation callback
The Nvhost-related APIs have been deprecated and are no longer
supported since our migration from K510 to K515. Therefore, the camera
platform driver should refrain from using "nvhost_*" functions to set
the clock rate.

Integrate the common operation callback interface into the
tegra_camera_dev_info structure. This modification allows individual
drivers to achieve clock set rate operations by registering the
callback and completing the implementation.

Bug 4374126

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iebed7cc974f5dbdabddded3c84d0925de3a6c4f9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020535
(cherry picked from commit 57a82628aa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3023111
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-28 04:45:42 -08:00
Mika Liljeberg
d0c6a44fdb firmware-api: document ISP capture messages
Updated documentation for ISP capture channel messages and
associated structures and definitions.

Other documentation fixes:
* Added structures and documentation for VI and ISP engine status.
* Added documentation for a few global defines.
* Added a clarification to CAPTURE_REQUEST_REQ documentation.
* Removed unused isp5_downscaler_configbuf struct
* Fixed usage of @deprecated tag.
* White space changes.

Jira CAMERASW-14053

Change-Id: I2096a37da2ddd5cb73d842cdc2014fd1b98c268a
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/3003301
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007982
(cherry picked from commit b0c61ffd308d26f7870d61dfe921afe159a2cc3d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008828
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-05 03:17:12 -08:00
Shashank Kumar
c56189df5d drivers: media: add alternating exposure support
- update ar0234 driver to support ar0234 sensor
  hardware provided support for capturing frames
  using alternating exposure time and analog gain
  settings through automatic context switching
- added new v4l2 control having control id
  TEGRA_CAMERA_CID_ALTERNATING_EXPOSURE for
  configuring alternating exposure settings
- other changes to support aforementioned changes

Bug 4064517
Jira L4T-4501

Change-Id: Id1d3d745345836436b16da1fd00cc97f2e3b5553
Signed-off-by: Shashank Kumar <shaskumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2881141
(cherry picked from commit e973475525c9a7a99552282316e06126b8fff625)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2987067
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Anubhav Rai <arai@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-04 09:59:43 -07:00
Joshua Cha
236a2f09ee nvidia-oot: add IPA type info of IVC channel
Bug 4293372

Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Change-Id: I5c0cf142afdac9a6a1108a38513af6861272a8e9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2995973
(cherry picked from commit ebedbb2492ea13211b53a48655e9312ba6b255dd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3004066
Reviewed-by: Kurt Yi <kyi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-02 18:13:33 -07:00
Laxman Dewangan
08a1772814 media: Replacing v4l2_async_subdev to v4l2_async_connection for Linux6.6
The API v4l2_async_subdev is replaced by v4l2_async_connection in Linux 6.6
with below kernel change:
----
commit adb2dcd5f2d49d3ba3171160fabd4be0d4b2a86c
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Thu Feb 16 14:54:53 2023 +0100

    media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection
----

Using the new API.

Bug 4346767

Change-Id: I73c39fd499a0a5cbeb8d3f24de08c52a5ea8dda5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008085
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-01 20:24:53 -07:00
Kirill Artamonov
fe6d0617eb soc: tegra: fix camrtc isp naming
Use ISP_UNIT_ISP1 to refer to second ISP.

Jira CT26X-440

Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
Change-Id: Icdaf81702c00f0a9223bb843ce82937f06fc3e0d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3002368
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-27 22:35:54 -07:00
Kirill Artamonov
8b7212a186 soc: tegra: add ISP1 support to camrtc debug protocol
Add support for ISP1 memory buffers allocated by Guest OS.

Jira CT26X-427

Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
Change-Id: Ibbcd8a1b720305b36bb62e64baa797eef1d5a889
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3002367
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-27 22:35:43 -07:00
Mika Liljeberg
410ff5011a firmware-api: documentation for CSI control messages
Update documentation for CSI control messages and
associated structures and definitions.

Jira CAMERASW-14050

Change-Id: Ifb3caba5e6baf11fed061ca140681167ae4268ef
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/2996915
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3000437
(cherry picked from commit 39b92ef64169d84967a848f4d558ac0f32239669)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3002146
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Harri Kaimio <hkaimio@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-24 23:53:41 -07:00
Mika Liljeberg
1d58216b05 firmware-api: capture message documentation
Updated documentation for VI capture channel messages and
associated structures and definitions.

Added preconditions to all control channel response messages
and clarified the descriptions a bit.

Added @brief tag to message descriptions.

Jira CAMERASW-14052

Change-Id: I40ae468b3317eee22ac08d577460e263fecc3c92
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/2984899
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993569
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3000506
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-20 17:09:34 -07:00
Mika Liljeberg
71fe53031f firmware-api: fix kernel patch validation issues
Fix some warnings and errors raised by kernel patch validation
and correct some divergence from firmware-api.

Jira CAMERASW-16411

Change-Id: If3ce65b5996d73620d0a730e91a24a4114b7ffd5
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993559
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3000505
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-20 17:09:29 -07:00
abhinayaa
40bb8da496 drivers: pva: Update HW SEQ config and ADB size
- Update HW SEQ configuration for next generation of PVA.
- Add additional HW SEQ validation checks required for next
  generation of PVA.
- Update ADB size for T264

Jira PVAAS-12709

Change-Id: I8dd362f2f517bc20899d51a4bb95b8077f4c636b
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2891026
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2999160
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-20 01:26:11 -07:00
abhinayaa
97f5252632 drivers: pva: Update channel and descriptor limit
Update code to account for t26x channel and descriptor limits.

Also, the reserved descriptors for all generations of PVA HW are
at indices 60-63. Update KMD checks to ensure the reserved descriptors
are never patched, and are not linked to either during SW sequencing
or HW sequencing.

Jira PVAAS-13055

Change-Id: I276490d51d65648a406fabed06c47e45d9e6978a
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2908053
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2999158
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-20 01:26:00 -07:00
Krish Agarwal
6c013840f0 drivers: pva: add support for exe_id2
- update submission path to accept exe_id2
 - submit additional bin info to FW

JIRA PVAAS-12334

Change-Id: Ie7b314c4cf76ecfdabd40de05a9b9f1e3d3cc049
Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2860864
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2999153
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-20 01:25:35 -07:00
Krish Agarwal
e4fc743b3b drivers: pva: rename exe_id to exe_id1
- rename exe_id in pva_submit_task to exe_id1
 - rename exe_id in nvpva_ioctl_task to exe_id1
JIRA PVAAS-12334

Change-Id: Ieba0b6b8ac3e8af8ab3340dadabdfe64df4831ea
Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2874243
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2999152
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-20 01:25:30 -07:00
Laxman Dewangan
869fff1af3 include: Organise OOT prod headers
There is two implementation of the prod setting, legacy
where driver directly get the register offset/mask/value
and upstreamable where configuration come as property of the
respective field.

The legacy is supported till K5.15 and afterwards, the upstreamable
solution is supported.

Add the dummy header incase the core kernel have not implemented
the prods and organise the oot prod accordingly.

Bug 4097475

Change-Id: Idd0e8759342c1c4ffd88df046785595aa4fab52d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996588
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-13 15:48:15 -07:00
Jon Hunter
7f53d7ba3e nvidia-oot: Add options to disable drivers
In Linux v6.2, the Tegra IVC driver was updated to support iosys-map and
this breaks building some of the out-of-tree drivers for Linux v6.2+
kernels. In Linux v6.3, the GPIO OF APIs were removed and this breaks
building some of the out-of-tree drivers that use these legacy APIs. For
now the broken drivers are not built for these corresponding kernels.

Instead of checking the kernel version in the Makefile for the
corresponding broken driver, move the kernel version checking to the
top-level Makefile and add CONFIG definitions that can be used the
various Makefiles.

This is also needed for working with 3rd party Linux kernels that may
have upstream backports and need to set these CONFIG variables for their
Linux kernel.

Bug 4221847

Change-Id: I35ee59bccdcdb1be56e4680c453279b421692c6a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996215
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-13 15:46:10 -07:00
Jon Hunter
4e8ed5f7b7 firmware: tegra: Add support iosys-map support for IVC
Linux v6.2 update the Tegra IVC driver to use iosys-map and this broke
support for the IVC EXT driver. Update the IVC EXT driver to support
iosys-map if the kernel supports this version of the Tegra IVC driver.

Bug 4221847

Change-Id: I1f1ddb1cc4312cb2359373b53287c110831b473c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996208
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-13 15:45:59 -07:00
Mika Liljeberg
635466f751 firmware-api: capture ISP control MSG documentation
Update documentation for ISP capture channel control messages and
associated structures and definitions.

Jira CAMERASW-14051

Change-Id: I0f10470132b727520e278aaa3b2573f93d4053f1
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/2982815
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988970
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994202
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Viktor Horsmanheimo <viktorh@nvidia.com>
2023-10-12 17:17:24 -07:00
Mika Liljeberg
1eb3b03e5f firmware-api: capture control MSG documentation
Update documentation for capture channel control messages and
associated structures and definitions.

Jira CAMERASW-14048

Change-Id: I525eca545eef64eb8fceac14480348b2dd173d1c
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/2980882
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988969
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994201
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Viktor Horsmanheimo <viktorh@nvidia.com>
2023-10-12 17:17:19 -07:00
Mika Liljeberg
4e0255fbae include: soc: tegra: fix divergence to firmware-api
Fix minor differences to firmware-api that can cause conflicts
when propagating changes to kernel headers.

Jira CAMERASW-15815

Change-Id: I23239a246cdae69a8818a6ed0e2e8d23ee337f10
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988968
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994200
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Viktor Horsmanheimo <viktorh@nvidia.com>
2023-10-12 17:17:14 -07:00
pripatel
f7c66766b7 firmware-api:changed macro definition
Change is done to resolve
AUTOSAR C++14 M5-0-10 violations

Rule: AUTOSAR C++14 M5-0-10
Rule description : If the bitwise operators ~ and << are
applied to an operand with an underlying type of unsigned
char or unsigned short, the result shall be immediately cast
to the underlying type of the operand.

JIRA CAMERASW-12899

Change-Id: Ide1491e00094299d3785dbb1cd3366a043b3de0e
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/2933961
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988965
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988977
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Viktor Horsmanheimo <viktorh@nvidia.com>
2023-10-12 17:17:09 -07:00
Mika Liljeberg
4e8871bdef include: soc: tegra: define tag for trace console
Define a new TLV tag for combined trace and console support.
Deprecate unused CAMRTC_TAG_NV_CAM_TRACE tag.

Bug 3898176

Change-Id: I0d6d586dd1a82d6f95a12b22b6e9bd96000efe7e
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2845583
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988964
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988976
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Viktor Horsmanheimo <viktorh@nvidia.com>
2023-10-12 17:17:04 -07:00
Mika Liljeberg
e69d77ec71 firmware-api: add commands for I2C over HSP
Add command specifications for RCE I2C HSP protocol.

Jira CAMERASW-1404

Change-Id: I17cbe234371140934b04e3a9683aa1cbc7d5ef91
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/2701487
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988962
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988975
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Viktor Horsmanheimo <viktorh@nvidia.com>
2023-10-12 17:16:59 -07:00
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