Commit Graph

3149 Commits

Author SHA1 Message Date
Surbhi Singh
07f3c29dbb video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow  when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I65bc1f62c40575becc64b6ec8d8b6f4718edba52
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232159
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
34af0526fd video: tegra: nvmap: Fix INT30-C overflow defect
Add check for addition overflow using BUG_ON.

JIRA: TMM-5724
Bug 4479044

Change-Id: I6f611aa2f45945ad66c3f9565f50fea97eb17611
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263949
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Illia Ragozin
1d7553347f tegra: Add v4l2loopback module
Build v4l2loopback that provides a virtual camera device.
Virtual cameras will be used to enable AI effects for use cases as
video conferencing or game streaming.

JIRA SHLD2-370

Change-Id: I822ab2c127960ec343daa7b9799d5698434f4b75
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3266248
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Illia Ragozin <iragozin@nvidia.com>
Tested-by: Illia Ragozin <iragozin@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1697f4acfb video: tegra: nvmap: Fix INT30-C overflow defect
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I25f2f304038cd197c91c66f1f82de90bf9dfbe73
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3266601
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Jerry Chang
dd4270216a kernel: camera: add DOL support formats
add 10-bit and 12-bit DOL support formats

Bug 4962075

Change-Id: Ie631d6a079754aab6321eb485a5168e7fb3eb9a0
Signed-off-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251864
(cherry picked from commit 51f89ad89e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264243
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
8a948abd7b video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I8c66af46a68b64502fbfe754aa973bf068342003
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263286
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
amitabhd
d1d3b883df host1x_emu: Fix NvHost Interface and IOCTL
1. The nvhost interface like syncpoint offset/aperture were
taking "pdev" of Host1x device, but emulated syncpoint driver
implementd the interface with "pdev" of clinet device. This was
done to align all other interface input parameter.

This patch revert the above alignment of intput parameter change.

2. This patch modify SyncpointWait IOCTL handler to return timestamp
of signal observed by KMD to UMD

Bug 4895937

Change-Id: I61ba02992963ba272e5c2514ffe8c24fff510c3a
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226744
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:11 +00:00
Santosh BS
d32b4667a5 drm/tegra: move legacy chip support under config option
- Update Makefile to build the legacy chip related
  files only when any of the below configs are set.
  CONFIG_ARCH_TEGRA_2x_SOC
  CONFIG_ARCH_TEGRA_3x_SOC
  CONFIG_ARCH_TEGRA_114_SOC
  CONFIG_ARCH_TEGRA_124_SOC
  CONFIG_ARCH_TEGRA_132_SOC
  CONFIG_ARCH_TEGRA_210_SOC
  CONFIG_ARCH_TEGRA_186_SOC
  CONFIG_ARCH_TEGRA_194_SOC

- Update drm.c/.h to build legacy chip specific
  code portions for the respective configs accordingly.

Jira HOSTX-5727

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: I3d2235923011073d82dcfe6b1fd6618ae70d37bb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253132
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Khushi
9aae5199d7 vse: allocate buffer during init 2
TSEC CMAC SV
RNG
HMAC SV
CMAC SV HW verify
GCM Enc/Dec HW verify
GMAC SV HW verify

JIRA ESSS-1495

Change-Id: I9cabee686d99d3c94d46e2a72d51151ae62e7630
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227547
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
Santosh BS
7a904d2b62 gpu: host1x: move legacy chip support under config option
- Update Makefile to build the legacy chip specific
  files according to the below configs.
  CONFIG_ARCH_TEGRA_2x_SOC
  CONFIG_ARCH_TEGRA_3x_SOC
  CONFIG_ARCH_TEGRA_114_SOC
  CONFIG_ARCH_TEGRA_124_SOC
  CONFIG_ARCH_TEGRA_132_SOC
  CONFIG_ARCH_TEGRA_210_SOC
  CONFIG_ARCH_TEGRA_186_SOC
  CONFIG_ARCH_TEGRA_194_SOC

- Update dev.c/.h to build legacy chip specific
  code portions for the respective configs.

Jira HOSTX-5727

Change-Id: I7dbd23ab1c91c859941c4965123bb60e518063fc
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263215
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
Sanath Kumar Gampa
c5aa651596 kernel:nvidia-oot:Support for multiple MACSec SCs
Add support to accept multiple supplicant launch on same VF so that DUT
can have multiple MACSEC links with different ethernet peers

Pass Peer MACID to OSI such that the same is added to SCI LUT

Bug 4754899

Change-Id: Iaf56eb4d7ebc3266a0d3ceb3dbc76a1547ed608c
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237500
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
omar
fe18381161 drivers: pva: dump FW logs on error
add dump of FW logs on error to pva_abort() and
task completion/task errors.

pva_abort handles most error cases since it is
invoked to recover. task completion and error
are handled by scheduling work to dump out
the buffers.

Jira PVAAS-17237

Change-Id: Ib5f07d81b16357310ab19b11a087003b455daa66
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264720
Reviewed-by: Reshma Prabhu <rprabhu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1f2a35edf4 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow in nvmap_pp.c and nvmap_ioctl.c when two unsigned integers are added and return error in case of overflow condition

JIRA: TMM-5724
Bug 4479044

Change-Id: Icecbb45498672d5e55a66c60f2be59c3970bf75d
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256309
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Ketan Patil
2727334720 video: tegra: nvmap: Do not expose sysfs nodes in embedded
NvMap page pool expose some sysfs nodes to enable/disable page pool,
change the size of page pool, shrink the page pool. There is no
need/usecase of dynamic changes in page pool size for DriveOS. Hence
disable resizing code for embedded builds. If we want to keep the sysfs
nodes then we need to have proper uid/gid support to satisfy security
analysis for DriveOS, as there are no usecases of these nodes, disable
them only for embedded builds.

JIRA TMM-5864

Change-Id: Ia7fec558402ed3aa64ee1e0d49acdc844a66c82a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3265223
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
738812f585 tegra: nvmap: Fix CERT addition overflow defects
Add calls to check_add_overflow from overflow.h to fix CERT INT 08-C and
CERT INT 30-C defects in nvmap_handle.h.

Total Defects Fixed: 2 CERT INT 08-C and 2CERT INT 30-C

Bug 4479044

Change-Id: If41c1aefb26bae478c549be5d00245ba3cd559d2
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264713
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
83038b634b misc: mods: Fix MODULE_IMPORT_NS for Linux v6.13
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Update the mods_dmabuf driver as
necessary to fix this.

Bug 4991705

Change-Id: I9326e360fe8daae4c43941812301818d8b35c825
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263799
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
chandra
20c4af34ac nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 13 violations of rule CERT-C EXP34-C and EXP39-C

JIRA NVIPC-3120

Change-Id: Ie96f1a93964a019645ecf38a338efa5768ca24fc
Signed-off-by: chandra <cyeddu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261129
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
chandra
e946c2cbcc nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 20 violations of rule CERT-C EXP34-C

JIRA NVIPC-3120

Change-Id: I1e8940269a2859a0483215cf44170dd669f637ea
Signed-off-by: chandra <cyeddu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260920
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:11 +00:00
amitabhd
d5573ecc31 host1x_emu: Fix fence object memory leak
Set release callback function for dma_fence
object to release struct host1x_syncpt_fence.

Jira HOSTX-5546
Bug 4919054

Change-Id: I0f06fc6e4b1d1b38f56c779898fb09990364cc87
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260748
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Sanif Veeras <sveeras@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Nagarjuna Kristam
276faff8d4 pci: tegra264: turn off controller when no link
When Link up fails during driver probe, controller is kept powered
on, even when controller is not configured as hot plug capable.
This results in more power consumption. Turn off controller when
no link detected during driver probe, only when controller does not
have hot-plug capability.
Ignore resume and remove AI's when no link during probe for no
hot-pluggable controllers.
Ignore Link state check for VDK, on which it cannot be detected.

Bug 4688706

Change-Id: I80a2b5845d48b07f25f65dc7cf5509aeb5778399
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246221
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
5f650ef93c video: tegra: nvmap: Fix INT30-C overflow defect
Add check for addition overflow using BUG_ON.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ie22c37d163b37dc4f12d3e6eb092188263b1ab46
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263945
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
9568aaa35d tegra: nvmap: Fix SAST defects in nvmap_ioctl
Add call to check_add_overflow to fix CERT INT 30-C and INT 8-C defects.

Add boundary check for offset value to fix default coverity
TAINTED_SCALAR and MISRA 4.14 defects. Offset value is being passed on
and eventually used as a loop boundary. So, a check at the beginning is
required.

Total Defects Fixed: 4 Defects

Bug 4479044

Change-Id: Ie687c5d7d84cd3f7897d5e6e04ab90d0ed2e1619
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263923
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
9e1909d9e1 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I5799097a3d63d0df62a9d17f022120f8051297b8
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263482
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
63d23bed16 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I908e4cfc2f401b3e4dea7f4ddf67308b91251c22
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263469
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
16d2204183 tegra: nvmap: Fix overflow CERT C SAST defects
Fix subtraction CERT-C overflow defects using check_sub_overflow and
addition CERT-C overflow defects using check_add_overflow, in
nvmap_heap.c and nvmap_init.c files.

Fix count:
- CERT-C INT08-C: 3
- CERT-C INT32-C: 3

Bug 4479044

Change-Id: I337a4cf11f3f94e05243070e08c0b1fc2448d276
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263324
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
281c0247df video: tegra: nvmap: Fix INT30-C overflow defect
Add check for addition overflow using BUG_ON.

JIRA: TMM-5724
Bug 4479044

Change-Id: I59b5e8bd7c69069e507e58d69086c0b84301d35f
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262721
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Tested-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
caaae6b1d9 tegra: nvmap: Decrement variable with correct value to avoid wrap around
Decrement hrange->offs_start with hs[i]->size instead of tot_sz. tot_sz
holds the cumulitive sum of hs[0...i]->size and decrementing this from
hrange->offs_start will decrement values from 0..(i-1) multiple times,
which is incorrect and can cause a wrap around.

Bug 4479044

Change-Id: If6afe9f05fc0d246d42a95fa6d9708361efcc9f8
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263927
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
9ab979381c video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow when two unsigned integers are added and return
error in case of overflow condition.

JIRA : TMM-5857
Bug 4479044

Change-Id: Iae3f401df65baa6bd08ffceed8dd8c1222cd75bc
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260308
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Rakibul Hassan
652c032bb5 nvidia-oot: camera: isp: track syncpt threshold
This change does the following:
 - Keep the capture progress syncpt threshold up to date by
   incrementing it when a capture request is made
 - Fast forward the syncpoints via host1x api on reset

Bug 4882047

Change-Id: If971bf4f248bd7a0be6a79ccb0e124f2768c0af4
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248427
(cherry picked from commit cbac4a12165c2d19f9f5889cbeffffb3b63e54d0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253387
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Rakibul Hassan
d4f85d7379 nvidia-oot: camera: vi: track syncpt threshold
This change does the following:
 - Keep the capture progress syncpt threshold up to date by
   incrementing it when a capture request is made
 - Fast forward the syncpoints via host1x api on reset

Bug 4882047

Change-Id: Ic2a677575d9ade45ae6b69de5fd49d40029f7053
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248336
(cherry picked from commit 6343864b8b7f70f1bc87f8503f28b07a3bb024bc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3240448
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Vishwaroop A
8c6e34801c drivers: virt_mtd: incorporate review comments
Incorporate review comments received on
adding sysfs nodes for exposing requested
variables.

JIRA SSV-12115
Bug 4791020

Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: I840338c4d051b42175757272a504ecdd05db6e2f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3190000
(cherry picked from commit dbbfdb0c48ee7609802e316402fd4b1776c36c2b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3265306
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
Vishwaroop A
ba503dd9aa mtd: virt_mtd: add sysfs nodes
Add mechanism to read manufacture_id,
device_id size and ecc_info through guest vm
add the sysfs nodes to achieve this.

JIRA SSV-12115

Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: Ib9311c2da8c4f5ccf1efcc7aeb16026bc5159c0c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183733
(cherry picked from commit 402b93d8537cc51b56288de1dee729b30b663368)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198295
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
976ca5efb1 tegra: nvmap: Fix overflow CERT defects in nvmap_alloc.c
Fix addition overflow defects in nvmap_alloc.c by using overflow.h APIs.
Fix 4 CERT INT 08-C and 3 CERT INT 30-C defects.

Bug 4479044

Change-Id: Id4f9d8a5fd15e3ded38d31b58c8ab3693ab1707e
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262969
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
ff48ee63b1 drivers: Fix MODULE_IMPORT_NS for Linux v6.13
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Use conftest to detect if
MODULE_IMPORT_NS takes a string literal as an argument and update the
various drivers accordingly.

Bug 4991705

Change-Id: I8f34860648965dc2334e2916d5404522510778ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
66ddf2ba6f virt: hvc_sysfs: Fix build for Linux v6.13
In Linux v6.13, commit 94a20fb9af16 ("sysfs: treewide: constify
attribute callback of bin_attribute::mmap()") changed the type of the
'struct bin_attribute' argument of the bin_attribute:mmap function
pointer to const. Use conftest to detect if this argument is const or
not in the kernel the driver is being compiled against to fix the build.

Bug 4991705

Change-Id: I791d6c9dde50f1444d0339ebd8a18434045f9026
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261699
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
ef57537991 spi: Fix build for Linux v6.13
Commit 0809a9ccac4a ("spi: remove {devm_}spi_alloc_master/slave()")
removed devm_spi_alloc_master() and this breaks building the Tegra124
and Tegra210 SPI drivers for Linux v6.13. Commit b8d3b056a78d ("spi:
introduce new helpers with using modern naming") previously added new
helpers in Linux v6.2 which should be instead. Add a test for conftest
to detect if the kernel supports the function devm_spi_alloc_host()
and if so use this function.

Bug 4991705

Change-Id: I1d639297ef7adfdcde50927360607639b45a4a60
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261698
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
a8777837dd drm/tegra: Fix aperture support for Linux v6.13
In Linux v6.13, commit 689274a56c0c ("drm: Remove DRM aperture helpers")
removed the DRM aperture helper functions and drivers should simply use
the existing video helpers. Update the Tegra DRM driver to use
aperture_remove_all_conflicting_devices() if available to align with
upstream.

Bug 4991705

Change-Id: Ie4b78a4ea519ffcaaf972417ec2cbe7c436eb808
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261694
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
23ce6a67ae video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: Iacf625ea2425acfc10e27820c12219f1bb898a5d
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232480
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
snchen
14f79046eb kernel: camera: add bayer raw14 format.
Add raw14 bayer format driver support

bug 4335141

Change-Id: I45c4fb2f692a98cf33d81415104e815c14340a68
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176545
(cherry picked from commit b2db309d50)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226512
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
390f3cb907 tegra: nvmap: Add union for dma_coherent_mem types to fix SAST defects
When struct dma_coherent_mem* is typecasted to struct
dma_coherent_mem_replica* coverity complains with CERT EXP 39-C defect.
This defect says that we can not access a variable through a pointer of
an incompatible type.

Coverity is not able to detect that both the types essentially contain
the same members and also, we can not use struct dma_coherent_mem*
directly.

Add an union datatype to have both struct dma_coherent_mem* and struct
dma_coherent_mem_replica*. Union makes the coverity tool accept the
usage of both the types together.

Fix 4 CERT EXP39-C defects.

Bug 4479044

Change-Id: Ia29ede9b47b3e1e110450f365e125cc2b77d2ee7
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262832
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
36e3d424b8 Revert "nvsciipc: Include change for nvsciipc_ioctl.h"
This reverts commit ee72e995da1ee31177a06053b4c89f3ba6a1060a.

Reason for revert: This breaks building the OOT modules standalone without the GPU sources which are not public. Futhermore, this header
appears to be internal and so should not be included in sources that
are distributed publicly.

Jira: NVIPC-2817

Change-Id: I9a98056b004b7b6454473957f488020718eabfd4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263605
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Shobek Attupurath
ca13555cc5 rtl8852ce: Disable driver logging
Default logging is set to INFO, move this to NONE to reduce the
logs shown in kernel logs

Bug 4995363

Change-Id: Ib386a0bc8ba82d45dd0ba333733e4b14e9970b8d
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262102
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
ed9db43d54 drivers: gpu: Fix IOMMU support for Linux v6.13
In Linux v6.13, commit f6440fcc9c7b ("iommu: Remove
iommu_domain_alloc()") removed iommu_domain_alloc() and was replaced by
iommu_paging_domain_alloc(). Use conftest to detect if the function
iommu_paging_domain_alloc() is supported by the kernel and update the
Tegra DRM and Host1x drivers accordingly.

Bug 4991705

Change-Id: I86221d96232396fdb6bdccf40c412e029881c513
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261695
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
eb7a615b59 drm/tegra: Fix genpd support for Linux v6.13
In Linux v6.13, commit d6caca30a548 ("OPP: Drop redundant
*_opp_attach|detach_genpd()") removed devm_pm_opp_attach_genpd(). This
has been replaced by devm_pm_domain_attach_list(). Use conftest to
detect the presence of devm_pm_domain_attach_list() and update the Tegra
DRM driver accordingly.

Bug 4991705

Change-Id: I5a3bd258d3fce5b09fd4ba84adad166e4cf47cfb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261693
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
329cbf5ff0 tegra: nvmap: Fix overflow defects in nvmap_dev.c
Fix subtraction and addition overflow defects in nvmap_dev.c using
overflow.h APIs. Add fix for 1 INT 08-C and 1 INT 30-C defect.

Bug 4479044

Change-Id: I5dbd4d66b661c61967847c155f4e03fd9140087c
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262873
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
df3b6e37ff video: tegra: nvmap: Replace IS_ERR with IS_ERR_OR_NULL
-  Replace IS_ERR with IS_ERR_OR_NULL as the pointer is getting
derefrenced. Derefrencing a null pointer can lead to errors.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ia432dc4bd4b7b5db89548c99b9873c3f34471ae4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261658
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
f666d39d4d nvidia: timed out wait for userspace response
Using this patch we are waiting for 5secs for
response from userspace else we are returning
error.

Bug 3712829

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I43ee139d4c2f737851ec1cf375e463d7c7c7d6f7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2760068
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261630
Tested-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-bootloader-acv <svc-bootloader-acv@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
cdefe42278 video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow in nvmap_debug.c when two unsigned integers are
 added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I4f051ed6db7bfee6eb49e4f818f46f15961037ea
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235335
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Suneel Kumar Pemmineti
936e6687ef nvsciipc: Include change for nvsciipc_ioctl.h
- KMD to refer nvsciipc_ioctl.h from
$TEGRA_TOP/gpu/drv/drivers/nvsci/nvsciipc/inc-linux

Jira: NVIPC-2817
Change-Id: Ic8d86c1320759bf9260d5bb9b4ee82441b0bbb71
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252263
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
Ketan Patil
6af855f1d0 video: tegra: nvmap: Don't expose non-embedded code in embedded builds
The following functions are exported from nvmap code and being used by
nvgpu in non-DriveOS code like L4T. Hence we should not include these
functions in embedded builds.
- nvmap_get_vpr_dev
- nvmap_get_vpr1_dev

The following functions get used in DriveOS as well by nvmap, but no
need to export to nvgpu, as they are not supposed to be used on DrivOS
by other modules. Hence do not export this in embedded builds.
- nvmap_dma_alloc_attrs
- nvmap_dma_free_attrs

In order to achieve this, define a new config file for embedded-linux
and define config and ccflag which can be used in any OOT driver to
differentiate between embedded-linux and non embedded-linux builds.

JIRA TMM-5842

Change-Id: Ic52106709723910e03362977472fb3597dc255f0
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258866
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00