Commit Graph

2438 Commits

Author SHA1 Message Date
Xia Yang
6432b7db50 misc: tegra_cec: add DT matching entry
Auxdata still have to be provided in of_platform_populate()
during early boot device detection to get the device correctly
named as "tegra_cec".  Failing to do so will result in device
probe failure as of_device_make_bus_id() will name the device
as "[phys_base].tegra_cec" and cause clock assignment failure.

Bug 200013561

Change-Id: Ib0f898f89146cba7f02cffb768c6a2eb558400ce
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/433871
Reviewed-on: http://git-master/r/1164144
(cherry picked from commit 43402b18ee6def21d7d55420f5acd22403e86f1d)
2024-12-20 03:54:00 +00:00
Xia Yang
4026c9868c tegra: cec: Driver rework
Change write() to work per frame.
Change write() to return -1 on error and set up errno

write() API:
-Userspace is responsible for re-transmission.
-Read from user-space byte by byte, each byte representing
 a block, up to 16 bytes as specified by HDMI standard.
-Return 0 on success transmission, -1 otherwise, with errno
 setup as follows:
  EIO - TX_REGISTER_UNDERRUN, should not happen, otherwise
      driver is have serious timing issue.
  ECOMM - BUS arbitration failure or anomaly BUS activity.
      Transmission is abandoned.
  ECONNRESET - For broadcast message only, someone on the BUS
      asserted NAK during transmission.
  EHOSTUNREACH - For direct message only, message was not ACK'd.
      (Required by logical address allocation)
  EMSGSIZE - Message size > 16 bit.
  EFAULT - Page fault accessing message buffer.
  EINTR - call interrupted by singal.

read() API is unchanged, works per packet with no error report.

Change-Id: Iabdd92b5658dd63c7b500a7ec88d79a64c8c0a43
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/304664
(cherry picked from commit 6ab7a446c4a3e8e4970ceec5a3c715453a24e4a5)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/347779
Reviewed-on: http://git-master/r/1164143
(cherry picked from commit 67a6c2d3cfbeeca5cb5ed57aae53f34d07decd4f)
2024-12-20 03:54:00 +00:00
Ankita Garg
5025d29c00 misc: cec: Add sysfs node to set logical addr
Sysfs node takes string of decimal representation of logical address
Logical address must be in bit-map form, e.g., "0x10" for address 4

Bug 1395893

Change-Id: I899fe80e1ebcc9957ac6efe3c4f6d07873b2a8db
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/303968
(cherry picked from commit ff2b08c0dc1d6ff3c1d7cac012cdccfa17c6399c)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346043
Reviewed-on: http://git-master/r/1164142
(cherry picked from commit 706ba72c2cb9f05450a10110d70f2462b52046d2)
2024-12-20 03:54:00 +00:00
Xia Yang
ab709208e8 misc: cec: Fix bug potentially cause system hang
Remove wait_event_interruptible() from interrupt context
Change init_done to be atomic_t and reset as early as possible

Bug 1395893

Change-Id: Ib0cf423a3405293000b0c0d9aa105da5bba22e53
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/304631
(cherry picked from commit ef034436a3c8aaf7a9ce5dd9ebaf8dc90dbcce4b)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346042
Reviewed-on: http://git-master/r/1164141
(cherry picked from commit 76e681f957b27323227c9990679631636084b6ae)
2024-12-20 03:54:00 +00:00
Deepak Nibade
b38ef51b1a misc: cec: cancel workqueue in suspend
cancel the workqueue in suspend method before turning
  off the clock

Bug 1360341

Change-Id: I126da686a6ba0c5eec55b67df1e9f962ce16fc48
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/280159
(cherry picked from commit 7cc6da6e41c7889f7ed8da7833d293b3b884bc0e)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346041
Reviewed-on: http://git-master/r/1164140
(cherry picked from commit e57647e7daacd5a3c22016cbe3f01ddb800d702c)
2024-12-20 03:54:00 +00:00
Shridhar Rasal
353c499996 misc: cec: add wait_event for CEC ops
Add wait_event to make sure that CEC functions
do not execute until CEC init completes

Bug 1283088

Change-Id: I1d26360326338f549a14cbf109a24c2935ebe472
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/232566
(cherry picked from commit 6e94e976c1e2121d81d19018b79a97d353b11d70)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346039
Reviewed-on: http://git-master/r/1164139
(cherry picked from commit 794145e9f8c16c7e36119f3652dd185cf12eb5dc)
2024-12-20 03:54:00 +00:00
Shridhar Rasal
a8422afe1a misc: cec: add worker handler for resume
HDMI CEC needs 1 sec delay for reset hardware in resume
Adding work handler for CEC init

Bug 1283088

Change-Id: I4498584ec93c1a5eefddfad9966cb5a1e7776e6e
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/228332
(cherry picked from commit 596245cee4b2c239843c2f920d83c21721af2ffb)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346038
Reviewed-on: http://git-master/r/1164138
(cherry picked from commit f62afdb0cb72a087442db6ed450b52925d20f9b6)
2024-12-20 03:54:00 +00:00
Ankita Garg
b268d2ef29 misc: tegra-cec: Updates for T124
In T124, the RX_REGISTER_FULL interrupt is cleared
by reading the RX_REGISTER instead of writing to the
INT_STAT register as before.

Bug 1364229

Change-Id: Ib080a48910304553b0752a3ede55ab0d7653dd77
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/275982
Reviewed-on: http://git-master/r/1164137
(cherry picked from commit b890e7f50d3d032fc3ede4c4935fdf2c4501f063)
2024-12-20 03:54:00 +00:00
Benjamin Lu
9723602a96 misc: cec: fix warnings
tegra_cec.c: fix warnings as compilation fails after enabling warning as
errors flag

Bug 1258710

Change-Id: Iecd3051d482f5a7488c9f95f6124ad39371f0bd9
Signed-off-by: Benjamin Lu <benjaminl@nvidia.com>
Reviewed-on: http://git-master/r/1164136
(cherry picked from commit 8112e3cd46d11eca51e95cc2fed66d2f7946553a)
2024-12-20 03:54:00 +00:00
Ankit Pashiney
9f3804e6cd misc: tegra-cec: Initial CEC Driver for T3x platform
READ API:
	read API ignores count and will always return 16 bit data.
	read API expects user to supply it with min of 16 bits data
	it returns CEC packet in following format
	bit 0-7: data
	bit 8: EOM
	bit 9: ACK

WRITE API:
	write API ignores count and will always accept 32 bit data.
	write API expects user to supply it with min of 32 bits data
	it accepts CEC packet supllied in following format
	bit 0-7: data
	bit 8: EOM
	bit 12: Address mode, 0 = Direct, 1 = Broadcast
	bit 16: Generate Start bit, 0 = Disable, 1 = Enable
	bit 17: Retry frame, 0 = Disable, 1 = Enable

	Logical address is set to 4, as of now there is no mechanism to change this
	address from userspace.

Driver is disabled by default in Kconfig

Bug 200198493

Change-Id: Ia3835cec0bb717e63dabca5c5fcb1236847bf492
Reviewed-on: http://git-master/r/1164135
(cherry picked from commit 955ec819872e66c4732b38cd74c7ff3a302d95f2)
Signed-off-by: Chun XU <chunx@nvidia.com>
2024-12-20 03:54:00 +00:00
Mahesh Kumar
472d0dfdf3 platform: dce: fix ipc_client_unregister race cond
This patch fixes a race condition between
tegra_dce_unregister_ipc_client and dce_client_ipc_wakeup.

If dce_client_ipc_wakeup is called just after unregistering
it'll result in accessing already freed data structures and
kernel crash. This patch adds a check to validate if the client_ipc
struct is valid before accessing its members.

Bug 4913921

Change-Id: Ie7f25379d7254d1f1ad4fb17baafee353f6d9eca
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239873
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
(cherry picked from commit 91a3402525e79bc59c7367743740c17a91e8752e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256954
(cherry picked from commit 6bce903d9e8c8de4c2017abc33191a983343a0c2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261855
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-12-18 16:53:59 -08:00
Jon Hunter
322d0bafa1 drm/tegra: Remove 'unaligned.h' header
In Linux v6.12, commit 5f60d5f6bbc1 ("move asm/unaligned.h to
linux/unaligned.h") moved the 'unaligned.h' header file. The
'unaligned.h' is not needed by the Tegra DRM RISC-V driver and so remove
this header.

Bug 4876974

Change-Id: If5993d6ea8291557de6fd41e4f55552bae45505b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252432
(cherry picked from commit 39a93d3dddc622247cec3571bd7124f04cdb95eb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270385
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-12-18 10:09:43 -08:00
Jon Hunter
39da18ef67 drm/tegra: Fix build for Linux v6.12
In Linux v6.12, commit 446d0f4849b1 ("drm: Remove struct
drm_mode_config_funcs.output_poll_changed") removes
'output_poll_changed' function pointer from 'drm_mode_config_funcs'
structure and commit b5757a5be2fa ("drm: Remove struct
drm_driver.lastclose") removes 'lastclose' from the 'drm_driver'
structure. This is breaking build the Tegra DRM out-of-tree driver for
Linux v6.12.

Fix this by partially back-porting commit 71ec16f45ef8 ("drm/tegra:
Implement fbdev emulation as in-kernel client") from Linux v6.4 which
removed the use of the 'output_poll_changed' and 'lastclose' function
pointers from the Tegra DRM driver. Note that it is safe to partially
back-port this for now because we don't use the frame-buffer support in
the Tegra DRM driver for Tegra234+ devices.

To keep the Tegra DRM out-of-tree driver aligned with upstream, the
remaining parts of commit '71ec16f45ef8' will be back-ported in another
change that will be part of a bigger change to align the frame-buffer
support with the upstream driver. For now just fix the build for Linux
v6.12.

Bug 4876974

Change-Id: Idc9b1c198c067ccb59f1337866154c9a8f0a5623
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267797
(cherry picked from commit a4ea0faa3a68ceb99dcaa596608099b3dffa667c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270384
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-12-18 10:09:39 -08:00
Jon Hunter
8a10ebd740 drivers: Fix build for Linux v6.12
In Linux v6.12 the definition 'no_llseek' was finally removed. Since
Linux v6.0 it had been redefined as NULL. Add a test to conftest to
determine if 'no_llseek' is present and if not then it is no longer
necessary to populate this and we can leave as NULL.

Bug 4876974

Change-Id: I051fdb285b32260b5913dad89cabe0be04253f67
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3222106
(cherry picked from commit 7bf81a5b445b01a2adc8b947a29e9ca7db325c6f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270383
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-12-18 10:09:34 -08:00
Jon Hunter
aef3f30099 bt: realtek: Fix build for Linux v6.12
In Linux v6.12, commit 5f60d5f6bbc1 ("move asm/unaligned.h to
linux/unaligned.h") moved the 'unaligned.h' header file. The 'rtk_bt.c'
source file does not need this header and so it can be removed. It is
needed in the 'rtk_misc.c' header and so fix this accordingly.

Bug 4876974

Change-Id: Iabeb6d8a95e131a8b6bc2d1e2b97e8539babf19f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252433
(cherry picked from commit 1f8df590e6a8f881fb7025d85095e812d4a98dfa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270382
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-12-18 10:09:30 -08:00
Jerry Chang
51f89ad89e 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
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shan Neng Chen <snchen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
2024-12-06 04:09:03 -08:00
Mikko Perttunen
03dd3ecc10 gpu: host1x-fence: Fix fence leak in fence_extract
The fence_extract IOCTL handler was only putting the fence object
on the error path. Add a put to the success path as well.

Bug 4799184

Change-Id: Ib9fa3280320f16e1cf5588bd7b58900644601649
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261313
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-12-05 22:24:05 -08:00
Praveen AC
57dc20f5a8 virtual_i2c_mux:Add virtual i2c mux support for other Hawks.
Add virtual i2c bus support for 2nd,3rd & 4th Hawks
to read/write EEPROM data while streaming.

Bug 4807682

Change-Id: I3cd05718a38ed11dd23fd67fee1efb8c7054af71
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3210317
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2024-11-28 15:24:29 -08:00
robelin
18c864a0ad net: wireless: Enable WOW for rtl8822ce driver
Enable the support for wake on wifi on rtl8822ce device

Bug 4878693

Change-Id: I6f863fdd466e458073693ba3f91695c5f8e6df25
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3244351
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Robert Lin <robelin@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Robert Lin <robelin@nvidia.com>
2024-11-22 05:24:29 -08:00
Akhil R
f6c3d49e92 crypto: tegra: Use separate buffer for each host1x command
Allocate separate buffer for each host1x command. The single buffer used
for host1x commands can get corrupted when independent crypto operations
overlap.

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I43029364c8e65e5014a5b7068cb45225c039aaf8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248913
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-11-20 21:09:00 -08:00
Shobek Attupurath
7791d0db52 rtk_btusb: Add support for RTL8852CE Azurewave modules
1. Add support for RTL8852CE modules with PID 1675 and 3586
2. Move RTK_DBG to KERN_DEBUG

Bug 4915378

Change-Id: I194a67878f306931db058e4b113ddf279f655d9a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242459
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
2024-11-15 12:02:49 -08:00
Shobek Attupurath
9c30467627 rtk_btusb: Fix potential buffer overflow in cfg_list_item struct
The `cfg_list_item` struct previously defined the `data` array with a zero-length,
which can lead to buffer overflow issues detected by the `fortify_memcpy_chk` function.
So change the zero-length array to a flexible array length.

Bug 4915378

Change-Id: I3420406e73a9eec892665380bb15d680df12e751
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237079
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-11-15 12:02:45 -08:00
Shobek Attupurath
3d15bb40b5 rtk_btusb: Update driver version to 3.1.65ab490.20240531-141726
- Update driver to 3.1.65ab490.20240531-141726
- Add support for 8852CE

Bug 4915378

Change-Id: Ib3f695047ee306fd07db424239c985195619aad1
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237077
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-11-15 12:02:41 -08:00
Mikko Perttunen
7ea5704ca3 gpu: host1x: When out of memory contexts, wait for free context
Instead of immediately returning an error when trying to allocate
a context device and none are free, log a warning and stall the
submit until a usable context becomes available.

Bug 4712458

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I964c906e94a8624ded04a5f3851f8c3dbbe76d8b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227750
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Dane Liu <danel@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-11-13 20:55:13 -08:00
Mikko Perttunen
276418c013 gpu: host1x: Memory context stealing
Currently, each process holding an open TegraDRM channel reserves
for itself one of the limited number of hardware memory contexts.
Attempting to allocate a channel when all contexts are in use
results in failure.

While we cannot have more contexts than the hardware supports in
active use, idle channels don't necessarily need to have a backing
memory context. As such, in this patch, we add another layer
to allow hardware memory contexts to be "stolen away" by channels
that are in active use, from idle processes.

The way this is implemented, is by keeping track of memory
mappings on each abstracted memory context. If we need to
steal that memory context's backing hardware context, we unmap
everything from it and give it away. When that abstracted
memory context is needed again (re-activated), we attempt
to allocate or steal another hardware context and re-map
the previously unmapped buffers.

Unfortunately, this means additional overhead and unpredictability
at submit time. Submit can fail if we cannot re-allocate a
backing memory context. Future work includes a provision for
un-stealable backing hardware memory contexts for processes
requiring more determinism, as well as optimization and cosmetic
improvements.

Bug 4403250
Bug 4399310

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I3d13e3476f1bff3c4757152254496cddaaafd76a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3058905
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227749
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Dane Liu <danel@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-11-13 20:55:08 -08:00
N V S Abhishek
c28e187068 tegra: nvmap: Reduce reported freemem from QueryHeapParams
Reduce free memory reported by QueryHeapParams by 0.1% to avoid
OOM issues for Iovmm_heap. For the overall free memory reported
by the query heap params api, page align it to the previous page
to avoid any failures in allocattr due to page align of requested
size, when requested size is equal to reported free size. Update
allocattr api as well so that it checks the available free memory
before allocating.

Bug 4719292

Change-Id: I7ecd69216d58c36ee5d0750107546601400e722d
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165599
(cherry picked from commit 3fdb84d2c8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3230712
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-11-12 09:54:49 -08:00
Paritosh Dixit
696fd39c49 nvidia-oot: Add .gitignore
Add .gitignore so that git status does not show build artifacts.

Bug 4814000

Change-Id: Iae3ef2be2107db92350038131628903c12b1f1c7
Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3240531
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-10-31 06:08:59 -07:00
Revanth Kumar Uppala
b595c01b8f Revert "r8168: Enable CONFIG_SOC_LAN"
This reverts commit 2a23a19bb4.

Reason for revert: Throughput reduced with this change

Change-Id: I37098400ba1d5ec2d8e52d3feed1c6e18402527b
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232363
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-10-23 08:55:40 -07:00
Akhil R
3415677f0f crypto: tegra: Fix size of buffer allocated
Allocate the buffer based on the request instead of a fixed buffer
length. In operations which may require larger buffer size, a fixed
buffer may fail. Similar patch was added for AES algorithms. Fix the
same for HASH algorithms as well.

Bug 4908156

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: Idd2c1ceae1a85434a5a51154a17dce8c927bb66c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234055
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-10-22 10:08:57 -07:00
Jon Hunter
91416b264c media: camera: Fix build for Linux v6.8+
In Linux v6.8, the 'g_frame_interval' and 's_frame_interval' function
pointers were removed from the 'v4l2_subdev_video_ops' structure and
replaced by 'get_frame_interval' and 'set_frame_interval' that were
added to the 'v4l2_subdev_pad_ops' structure.

This change was previously fixed for the Tegra CSI driver by adding the
necessary conftest changes. A new update to the Tegra Cam V4L2 causes
the build to fail for Linux v6.8+ kernels because of the same issue. Fix
up the Tegra Cam V4L2 driver in the same way as the Tegra CSI driver,
but update the name of the conftest test to indicate that this is
applicable for both the 'get_frame_interval' and 'set_frame_interval'
function pointers.

Bug 4448428
Bug 4807063

Change-Id: Ica47f3aaece0bf81e2adc3c431056ea51b64a893
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231775
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-10-18 13:10:39 -07:00
Jon Hunter
f00b8b2cd4 net: rtl8852ce: Add option to skip driver build
The RealTek drivers do not build against all Linux distributions because
some Linux distributions have back-ported upstream changes and so the
KERNEL_VERSION checks in the driver do not work for these distributions.

Add a compilation flag for the rtl8852ce driver so that we can skip
building of this driver for certain Linux distributions.

Bug 4667769

Change-Id: Ie4ec2308b458e4d5e6a3fa29d5e247c5a709172d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231107
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-10-18 06:23:56 -07:00
Praveen AC
c3b8c1cd3e [t23x][camera]: Fix VIDIOC_G/S_PARM v4l2-compliance test fail.
Implemented VIDIOC_G/S_PARM ioctl calls to fix
v4l2-compliance test fail.

Bug 4807063

Change-Id: Ia03b161b5659c710976084f277064a44d10aec15
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221436
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Tested-by: Praveen AC <pac@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-10-16 12:07:46 -07:00
Jon Hunter
5be6f3693d video: tegra: nvmap: Fix build for Linux v6.12
In Linux v6.12, commit ("4ffca5a96678 mm: support only one page_type per
page") removed the definition PAGE_MAPCOUNT_RESERVE and this breaks the
build for NVMAP. The function 'page_has_type()' was added in Linux v5.0
and performs the necessary check and so use this instead to fix the
build.

Bug 4593750

Change-Id: Iaa7393ae11de9730b4ec876a971223e62a7f3f7d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217428
(cherry picked from commit eb1d2c65ecfcaef3d184300b3987fb82cfe8c0e6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226683
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-10-10 09:54:52 -07:00
Jon Hunter
43f2b77b06 misc: nvsciipc: Fix build for Linux v6.12
In Linux v6.12, commit 88a2f6468d01 ("struct fd: representation change")
removed the 'struct file' pointer from 'struct fd'. This breaks building
the NVSCIIPC driver that tries to directly access the 'file' pointer
from the 'fd' structure. Fix this by using the helper macros 'fd_empty'
and 'fd_file' as necessary to fix the build.

Bug 4593750

Change-Id: I0f84736b408f533a732476175a8745091bc8542f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217429
(cherry picked from commit 0f21c4134eb08dfcafad832d97308f2d98601f1d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226681
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-10-10 09:54:44 -07:00
Jon Hunter
7cdcfd844e video: tegra: dc: Correct GPIO definitions
In Linux v6.12, commit 8c045ca534d0 ("gpiolib: legacy: Kill GPIOF_DIR_*
definitions") removed the GPIOF_DIR_* definitions and updated drivers to
use the equivalent GPIOF_* definitions instead. The GPIOF_* definitions
were added in Linux v3.0 and so update the appropriate drivers to use
these definitions.

Note that when calling devm_gpio_request_one() with GPIOF_DIR_OUT for
the flags, then because no explicit output level is specified, the GPIO
driver core defaults to low. Hence, in this case we replace
GPIOF_DIR_OUT with GPIOF_OUT_INIT_LOW.

Bug 4593750

Change-Id: I05664fd4e0abf5755c9514dffe64b239266c92fa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217397
(cherry picked from commit 0c4fc214d92f2a3c91e9c3b9d1245b4c1ee968f4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226680
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-10-10 09:54:40 -07:00
Jon Hunter
d60febb08a pwm: tegra-tachometer: Fix build for Linux v6.12
In Linux v6.12, commit f9ecc2febf6f ("pwm: Don't export pwm_capture()")
made pwm_capture an internal function and this broke the build for the
Tegra Tachometer driver. The pwm_capture() function simply calls the
drivers '.capture' callback and so fix this by directly calling the
function pwm_tegra_tacho_capture() instead. Note that the rpm_show()
function is also moved to after the declaration of the
pwm_tegra_tacho_capture() function.

Bug 4876974

Change-Id: Idf7fbc16382a9077c651755d9907ded7652610cc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217391
(cherry picked from commit 1f752196cab197f708d75bf7a319e23716a685e0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226679
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-10-10 09:54:36 -07:00
Jon Hunter
d8c5cf13b7 net: rtl8852ce: Don't build driver for Linux v6.6+
Building the rtl8852ce driver with various different Linux v6.x kernels
fail for various reasons.

For Linux v6.6 the build fails with errors such as ...

 drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c: In function
  'phl_cmd_set_seciv_hdl':
 drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c:4907:16: error:
   implicit conversion from 'enum rtw_hal_status' to
   'enum rtw_phl_status' [-Werror=enum-conversion]
 4907 |         return rtw_hal_set_dctrl_tbl_seciv((void*)phl_info->hal,
      |                                             sta, sta->sec_iv);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For Linux v6.8 the build fails with the above and the following ...

 drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c:301:5: error:
  no previous declaration for '_phl_get_macid'
  [-Werror=missing-declarations]
  301 | u16 _phl_get_macid(struct phl_info_t *phl_info,
      |     ^~~~~~~~~~~~~~

For Linux v6.10 the build fails with the above and the following ...

 drivers/net/wireless/realtek/rtl8852ce/core/rtw_ap.c:6265:9: error:
  suggest braces around empty body in an 'else' statement
  [-Werror=empty-body]
 6265 |         ;
      |         ^

 drivers/net/wireless/realtek/rtl8852ce/core/rtw_sta_mgt.c:742:1: error:
  'static' is not at beginning of declaration
   [-Werror=old-style-declaration]
 742 | u32 static _rtw_free_core_stainfo(_adapter *padapter , struct
     |                                   sta_info *psta, u8 aid,
     |                                    const u8 *hwaddr)
     | ^~~

For Linux v6.12, the driver build is completely broken because of the
following build error ...

 drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/wifi_regd.c:1007:17:
  error: too few arguments to function 'cfg80211_cac_event'
 1007 |                 cfg80211_cac_event(evt->netdev, &evt->chandef,
      |                                    evt->event, GFP_KERNEL);
      |                 ^~~~~~~~~~~~~~~~~~

For Linux v6.6+ mark the driver as broken and do not build this for
Linux v6.6+ kernels until these issues are addressed.

Bug 4667769

Change-Id: Id6b060f6b39ba4ef64d6388e06ef1e038c19206f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226276
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-10-09 15:53:58 -07:00
ruppala
2a23a19bb4 r8168: Enable CONFIG_SOC_LAN
Enable CONFIG_SOC_LAN for ethernet to support pcie_bus_perf
kernel command line option.

Bug 4607316

Change-Id: I724364a5804d796c13f837f73254e686f59dc0b4
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163034
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-10-06 22:54:04 -07:00
Shobek Attupurath
ffedd6a1c6 rtl8852ce: Add Nvidia changes to v1.19.16.1-0-g1fe335ba1.20240815_PC
1. Update makefiles to add Nvidia source path
2. Change file permissions to 0644
3. Delete files with .orig extensions

Bug 4667769
Bug 4667981

Change-Id: I0df6f3073780daf6879c4165cd97fd62fd0a4b65
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195548
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2024-10-04 15:54:29 -07:00
Shobek Attupurath
90e380eaf4 rtl8852ce: Add base driver v1.19.16.1-0-g1fe335ba1.20240815_PC
- support Android-14
- support Linux kernel 6.9
- support 6G regulation
- support Thermal protection
- support TX shortcut to reduce CPU loading
- fix some coverity issues
- Use RTW regulatory version rtk_8852CE_M.2_2230-67-52
- default enable con-current and MCC

Bug 4667769
Bug 4667981

Change-Id: Iee069ecdd1f00a0b78285d0a4ef5778ed9ace478
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195535
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
2024-10-04 15:54:24 -07:00
Yi-Wei Wang
3741667390 i2c: nvvrs11: Report power in milliWatts
The unit of the voltage is in milliVolts and the current is in Amperes
for VRS11. So, the power can be reported in milliWatts which provides
higher resolution for better profiling.

Bug 200718059

Change-Id: I0ae52dafa4c7dcc751d9c65b410205163a4fbc45
Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223011
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2024-10-03 05:24:14 -07:00
Johnny Liu
c580fd0d06 devfreq: use conftest for conditional module build
Some distros might use old kernel source but with some latest upstream
kernel patches backported to their kernel source tree. To deal with this
scenario and avoid kernel compilation failure, use conftest to check the
existence of features against the kernel source tree which the OOT
modules are built upon and do the conditional build based on the test
result generated with the conftest tool.

Use NV_DEVFREQ_HAS_FREQ_TABLE to determine whether freq_table field is
there in struct devfreq data strcuture, and choose the correct path for
building the module.

Use tegra_wmark-specific devfreq_get_freq_range always to avoid kernel
version check and conftest check. Since devfreq_get_freq_range exists in
the devfreq-specific governor.h (e.g. drivers/devfreq/governor.h) file
instead of globabl linux kernel include header files
(e.g. include/linux/devfreq.h), conftest cannot be used to the existence
of devfreq_get_freq_range kernel function.

Bug 4884092

Change-Id: I5bde4c712f59f38de74c1d8d95135c9b25d621b1
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220896
Tested-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-10-01 02:08:56 -07:00
snchen
b2db309d50 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
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-09-30 06:12:52 -07:00
Jon Hunter
93ba193a32 pci: endpoint: Update drivers for Linux v6.11
For Linux v6.11, the 'pci_epc_event_ops' structure 'core_init' callback
was renamed to 'epc_init' and a new 'epc_deinit' callback was added.

Update the PCI endpoint drivers for Linux v6.11 by:

 1. Adding tests to conftest to detect the presence of 'epc_init' and
    'epc_deinit'.
 2. Update the drivers as necessary to use the appropriate callback
    depending upon what is present in the kernel.

Bug 4749580

Change-Id: Ife7e2d5d18332bf84f22142c9727dc1ece913c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186686
(cherry picked from commit b0ff4f1358)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219305
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-09-26 06:11:21 -07:00
Jon Hunter
15ca4ff659 drivers: Fix platform_driver remove for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
(cherry picked from commit 951b2423a8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3210788
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-09-11 04:39:43 -07:00
Ketan Patil
cc74d1fe1b video: tegra: nvmap: Fix data race between create and destroy client
nvmap uses pid of group_leader task to indicate a client process. During
create_client operation, whenever any client with the same group_leader
pid already exists in clients list of nvmap_device, then nvmap
increments the count field of nvmap_client struct. Otherwise, create a
new nvmap_client. Both of the operations i.e. checking the list for
client and incrementing the counter happen inside lock. On the other
hand, during nvmap_release, first the counter is decremented and checked
if it's zero or not. If it's zero then the lock is taken and client is
removed from client list of nvmap_device. As both the operations i.e.
decrementing the counter value and removing client from list (if the
counter becomes 0) are not happening inside a lock, it's resulting into
the following data race scenario.
1) nvmap_release on existing client process 1
   - decrement client's counter
   - counter value has become zero
   - client is yet to be removed from the dev->clients list
   - context switch happen to __nvmap_create_client as another
namespace/thread with same with same group_leader pid is created.
2) __nvmap_create_client
   - as the client with same pid exists in dev->client list, it
increments counter value to 1, instead of creating a new client struct.
   - context switch happen to nvmap_release from step 1
3) nvmap_release
   - It calls destroy_client and remove the client from dev->client
list.
   - Completes rest of the operations in destroy_client and returns.
   - Context switch to remaining operations from step 2
4) nvmap_release
   - Now, when the nvmap_release will be called for the thread/namespace
which was created in step 2, then list_del operation would fail as the
client struct was already removed from dev->client list.

Fix the above issue by doing both operations i.e. decrementing the
counter value and removing the client struct from dev->client list in a
single lock.

Bug 4829958

Change-Id: I87ebbcb45b18114d0ec75520443bee010f88d59e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3209794
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-09-10 07:08:58 -07:00
Vishwaroop A
8b2781df07 drivers: spi: update misc register programming.
Update misc register programming.

Bug 4752858

Change-Id: If328518f4a2d31ed83aa94e6ed40e99bc08bf6b1
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202398
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Kevin Fu <chunhuaif@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-09-05 05:24:01 -07:00
Shobek Attupurath
34b2a9887a rtl8822ce: Disable debug prints
Issue - Driver debug prints are enabled causing spew in dmesg

Fix - Reduce log level to 0

Bug 4829658

Change-Id: If6aef4d7b17a44e2fa6901e60604828ed5a8c065
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202802
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-09-03 21:39:10 -07:00
Bitan Biswas
f3b12ead83 crypto: fix crypto_engine_ctx build error
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Change-Id: Iaf565c4ef74fdd87ea0020b369bc3d882d32326e
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176823
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit cba663d0db)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196067
2024-08-26 04:08:59 -07:00
Akhil R
f73208daa3 crypto: tegra: Fix size of buffer allocated
Allocate the buffer based on the request instead of a fixed buffer
length. In operations which may require larger buffer size, a fixed
buffer may fail.

Bug 4798264

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I0eac3e04aed89b07f5674cf69828d3ac0801a6c7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3194058
(cherry picked from commit 01bdbd8a6679a5e31d0a06e5f21cd20cf0600ba6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199308
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-08-24 15:24:02 -07:00