Commit Graph

3386 Commits

Author SHA1 Message Date
Abhilash Mahapatra
2d9d2bc7ec msm: camera: tpg: Handling Null Pointer Dereference
Proper handling of null pointer dereference in tpg
kernel code.
Fix for cust CID: 121781 119491

CRs-Fixed: 3714844
Change-Id: I653a6e3721223f705a4f1579ab54c2a145bf2d3c
Signed-off-by: Abhilash Mahapatra <quic_abhmah@quicinc.com>
2024-01-24 00:58:10 -08:00
Camera Software Integration
1d217d4df2 Merge "msm: camera: cpas: Enabling ICP clk for qchannel" into camera-kernel.lnx.7.0 2024-01-22 02:34:59 -08:00
Camera Software Integration
ad71795ee2 Merge "msm: camera: reqmgr: Increase total link capacity" into camera-kernel.lnx.7.0 2024-01-22 02:34:51 -08:00
Camera Software Integration
42eec23c01 Merge "msm: camera: isp: Clean up pending request list" into camera-kernel.lnx.7.0 2024-01-22 02:34:44 -08:00
Camera Software Integration
ded3482130 Merge "msm: camera: sensor: add missing call for put buf" into camera-kernel.lnx.7.0 2024-01-22 02:32:09 -08:00
Camera Software Integration
38003d61e9 Merge "msm: camera: isp: Change notification type" into camera-kernel.lnx.7.0 2024-01-22 02:32:02 -08:00
Camera Software Integration
d52050dc72 Merge "msm: camera: isp: Update WM mode dynamically for RDI resources" into camera-kernel.lnx.7.0 2024-01-22 02:31:55 -08:00
Camera Software Integration
ad2991a8b3 Merge "cam: isp: tfe: add query cap for comp grp in legacy acquire" into camera-kernel.lnx.7.0 2024-01-22 02:31:33 -08:00
Camera Software Integration
176e3a5d63 Merge "msm: camera: tfe: Fix null pointer deference during acquire failure" into camera-kernel.lnx.7.0 2024-01-22 02:31:09 -08:00
Camera Software Integration
921b7720cf Merge "msm: camera: isp: Move the CSID subdev Notify to bottom half" into camera-kernel.lnx.7.0 2024-01-22 02:30:58 -08:00
Camera Software Integration
277627e5e8 Merge "msm: camera: tfe: Refactor TFE hw_mgr error handling" into camera-kernel.lnx.7.0 2024-01-22 02:30:21 -08:00
Camera Software Integration
3adae3be7c Merge "msm: camera: isp: Iterate for out resources based on bus_priv" into camera-kernel.lnx.7.0 2024-01-22 02:30:04 -08:00
Camera Software Integration
5ba7db9d90 Merge "msm: camera: isp: Fix KW issue for out_rsrc_data" into camera-kernel.lnx.7.0 2024-01-22 02:29:55 -08:00
Camera Software Integration
a4d3649de5 Merge "imsm: camera: isp: Reset TFE WM data related to buffer alignment" into camera-kernel.lnx.7.0 2024-01-22 02:29:33 -08:00
Camera Software Integration
f718db2d53 Merge "msm: camera: isp: Acquire correct IFE & SFE" into camera-kernel.lnx.7.0 2024-01-18 07:30:14 -08:00
Camera Software Integration
c3b3bd221e Merge "msm: camera: isp: Write Reg update cmd for slave in SDHR" into camera-kernel.lnx.7.0 2024-01-18 07:29:58 -08:00
Camera Software Integration
ceb80be070 Merge "msm: camera: isp: Enable format measure for PPP path with debugfs" into camera-kernel.lnx.7.0 2024-01-18 07:29:41 -08:00
Camera Software Integration
9359fc9f49 Merge "msm: camera: isp: Enable format measure in TFE HW" into camera-kernel.lnx.7.0 2024-01-18 07:29:26 -08:00
Camera Software Integration
7948fbd861 Merge "msm: camera: isp: Drop initial few frames in TFE CSID" into camera-kernel.lnx.7.0 2024-01-18 07:29:13 -08:00
Camera Software Integration
ae835473e7 Merge "msm: camera: isp: Correct BL type CDM BL cmd for TFE" into camera-kernel.lnx.7.0 2024-01-18 07:28:58 -08:00
Camera Software Integration
2800b07e59 Merge "msm: camera: isp: Stop handling error IRQs after HW stop" into camera-kernel.lnx.7.0 2024-01-18 07:28:46 -08:00
Camera Software Integration
d1632454e5 Merge "msm: camera: isp: Handling IRQ delay from CDM in tfe" into camera-kernel.lnx.7.0 2024-01-18 07:28:29 -08:00
Camera Software Integration
c86312a4c5 Merge "msm: camera: icp: Dumping icp clocks in error case" into camera-kernel.lnx.7.0 2024-01-18 07:28:15 -08:00
Camera Software Integration
716373a57d Merge "msm: camera: tfe: Fix errors found in KW static code analysis tool" into camera-kernel.lnx.7.0 2024-01-18 07:27:59 -08:00
Chandan Kumar Jha
12fcadb429 msm: camera: isp: Update WM mode dynamically for RDI resources
Program WM mode based on mode flag for RDI resources..

CRs-Fixed: 3627088
Change-Id: Ie2918462fdfa8fe486983e63fcf66f9ec568c75f
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
2024-01-16 21:51:05 -08:00
Karthik Anantha Ram
dacad856a2 msm: camera: isp: Change notification type
Distinguish error notification to CRM for actual bubble &
other errors. This avoids conflict in internal recovery scheme.
Currently back to back bubble triggers an internal recovery, if
an error is notified for AEB back to back it will lead to two
different callflows for internal recovery. Distinguishing the
notifications will avoid different callflows.

CRs-Fixed: 3692264
Change-Id: Id4d928569fded732cef1782863ee494c66158c44
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
(cherry picked from commit a0a0290f13ddb1adb25eee5e55ee4f438524fbd9)
2024-01-15 23:41:28 -08:00
jinguiw
7390bf08c9 msm: camera: sensor: add missing call for put buf
adding missing call for put buf in flash to avoid leak.

CRs-Fixed: 3666659
Change-Id: I2e08331654e63b77950bb83ee6d95c4f5a716a86
Signed-off-by: jinguiw <quic_jinguiw@quicinc.com>
(cherry picked from commit 92e992dfae3cd269fbba0b51f0b456bebbb5f797)
2024-01-15 23:41:22 -08:00
Karthik Anantha Ram
c3f62bf34a msm: camera: isp: Clean up pending request list
Detecting for internal recovery and flush execute in two
different thread contexts, and the critical section protecting
the lists is small to avoid locking overhead. It is possible that flush
was triggered, but bh in ISP detected an error condition and triggers
a internal recovery moving the request in question to pending list.
At this point it is possible, that the flush context has cleared
the pending list, and internal recovery's addition to the pending list
is agnostic to the flushing thread. When there is a flush all, a reset
is issued to the HW and all the bh's are flushed as well. Post this
clearing the pending request list ensures no stale request entity is
left behind as opposed to cleaning up the pending list prior to the
HW stop sequence.

CRs-Fixed: 3669530
Change-Id: I58f024ec51cbc9c391d8aab1199098f314317b8a
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
(cherry picked from commit 0d58af6cf25db3b3412bc6effc437474751bf700)
2024-01-15 23:40:43 -08:00
Karthik Anantha Ram
4787284bd1 msm: camera: reqmgr: Increase total link capacity
Increase total link capacity, but cap session capacity at 4 links.

CRs-Fixed: 3663731
Change-Id: I53e545cb52a89fb15a254426653648a1b7b6226f
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
(cherry picked from commit cc952af03fbad9a749f861dbb14738e9fbc34a56)
2024-01-15 23:40:38 -08:00
Camera Software Integration
8ca826a179 Merge "msm: camera: tfe: No Camera and Limited Camera Support" into camera-kernel.lnx.7.0 2024-01-15 04:54:39 -08:00
Camera Software Integration
dfd03dab0c Merge "msm: camera: memmgr: fix null-ptr-deref in mem_mgr_deinit" into camera-kernel.lnx.7.0 2024-01-15 04:54:29 -08:00
Alok Chauhan
b94a4a15d0 cam: isp: tfe: add query cap for comp grp in legacy acquire
Query the context bus comp group information in legacy acquire
call.

CRs-Fixed: 3696470
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: Ib80858e6b81e1c7fce2e00597f58f0a98e12ff87
2024-01-12 00:57:59 -08:00
Alok Chauhan
56dcfa4e56 msm: camera: tfe: Fix null pointer deference during acquire failure
Fix null pointer deference during acquire failure for tfe bus
composite group pointer.

CRs-Fixed: 3696470
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: I20745c805dd29c65f179b27d388a60752c420d2d
2024-01-12 00:57:48 -08:00
Sourabh Soni
dcc6cd0479 msm: camera: isp: Move the CSID subdev Notify to bottom half
Removed the camera subdev notify message at top half and
send subdev notification in the bottom half.

CRs-Fixed: 3645184
Change-Id: Iee60b243c9ca1241533dfe85749198b3f187618f
Signed-off-by: Sourabh Soni <quic_soursoni@quicinc.com>
2024-01-12 00:57:37 -08:00
Pranav Sanwal
6483025c4a msm: camera: tfe: Refactor TFE hw_mgr error handling
Refactor TFE hw_mgr error handler to handle errors based on hw_type.

CRs-Fixed: 3599859
Change-Id: I91a6871eba97d9b99e276d84c2d960b7ed62d965
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
2024-01-12 00:57:25 -08:00
Pranav Sanwal
fe3ee735ec msm: camera: isp: Iterate for out resources based on bus_priv
For tfe Out resource data, iterate over num_out count instead of
TFE_OUT_MAX.

CRs-Fixed: 3604707
Change-Id: I63ea618da041bbf618c8bdc373daa13820f68c73
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
(cherry picked from commit d4fb18dc1347ff1e49136cdab1f0557dd86fb657)
2024-01-12 00:57:15 -08:00
Pranav Sanwal
13ff1db7af msm: camera: isp: Fix KW issue for out_rsrc_data
Check out_rsrc_data for NULL before dreferencing.

CRs-Fixed: 3604707
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
Change-Id: I0345859c999b43c24844d9c9a4b6869097711d07
2024-01-12 00:57:01 -08:00
Ayush Kumar
5d86ec473b imsm: camera: isp: Reset TFE WM data related to buffer alignment
Stale entry in TFE WM Clients data adds some offset in image address,
due to this TFE page fault observed. This commit adds change to reset
flags and entries of TFE WM Clients related to buffer alignment.

CRs-Fixed: 3569926
Change-Id: I5ac48cc2b0855f008b05c23a8c4645aeae348c6b
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:56:51 -08:00
Ayush Kumar
9589fe933e msm: camera: isp: Write Reg update cmd for slave in SDHR
This commit add support to write reg update command for slave TFE
RDIs in SHDR use case. HW sync is not applicable for RDIs. Slave and
Master TFEs should program reg update command for separately for RDIs.

CRs-Fixed: 3564213
Change-Id: I2775139acad8e95ae21d479a14392d4a13a03595
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:56:41 -08:00
Ayush Kumar
a3fbf12cee msm: camera: isp: Enable format measure for PPP path with debugfs
This commit enable format measure for PPP path in TFE CSID with
debugfs.

CRs-Fixed: 3599715
Change-Id: Icb13d0b7451dda5bc2af18d65270e77b2b35a90b
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:56:30 -08:00
Ayush Kumar
c330429f97 msm: camera: isp: Enable format measure in TFE HW
This commit enables format measure block in ipp, ppp and
all RDIs path.

CRs-Fixed: 3593650
Change-Id: I133849ae0e6fdef3b96e04061437f3fdb5e0ce2a
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:56:20 -08:00
Ayush Kumar
490d086f78 msm: camera: isp: Drop initial few frames in TFE CSID
Add support to discard initial number of frames for all paths
at CSID input. The number of frames to discard is obtained
from userland in blob config.

CRs-Fixed: 3603614
Change-Id: Ifff5f6013ae37ab54154c092571f2b40d51fa849
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:56:10 -08:00
Ayush Kumar
0596afdca5 msm: camera: isp: Correct BL type CDM BL cmd for TFE
This commit adds BL type for the BL Command to be enqueued to CDM.

CRs-Fixed: 3622248
Change-Id: I1aa4ae7cb24a373a32990f2bb7cd4f7da2134093
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:56:00 -08:00
Ayush Kumar
1351783c95 msm: camera: isp: Stop handling error IRQs after HW stop
This commit adds logic to stop handling any error IRQs from
TFE core just before stopping TFE HW.

CRs-Fixed: 3602162
Change-Id: Ibbdc08ace20cc3e426d2a614020fdf2ee5b13cd2
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:55:20 -08:00
Yash Upadhyay
591ceb5d38 msm: camera: isp: Handling IRQ delay from CDM in tfe
In scheduling delays or race conditions, it has been observed that
cookie value and the request id in userdata returned from CDM
do not match. This can happen due to CDM worker threads getting
delayed. Userdata attached with the CDM is the pointer in the
request. By the time, the cdm callback is received there is a
possibility that the request data has been reset and that request
node being re-used for another request. This can cause issues
particularly in race conditions.
To handle the condition, this commit associates the userdata and
with the context. Also, while submitting the request, the request
id is saved with context, which can be compared during the cdm
callback.

CRs-Fixed: 3287574
Change-Id: I836f536f4bf1040de3c4bf7168e3ef96dc3000bf
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
2024-01-12 00:55:07 -08:00
Yash Upadhyay
419797f633 msm: camera: icp: Dumping icp clocks in error case
Dumping both ipe and bps clocks in case of frame process
failure. Added generic utility function to dump any hw's
clocks.

CRs-Fixed: 3297488
Change-Id: Ia952696b0288361bffaeadfd53041c72fd21f96d
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2024-01-11 23:01:27 -08:00
Abhilash Kumar
1770bf062d msm: camera: tfe: Fix errors found in KW static code analysis tool
This change fixes errors in TFE identified while running the KW static
static code analysis tool.
- The in_port member in struct cam_tfe_top_hw_info if filled incorrectly
  may lead to out of bounds access in cam_tfe_top_init.
- The reg_val_pair variable may be used uninitialized in function
  cam_tfe_top_get_reg_update.

CRs-Fixed: 3522596
Change-Id: I48c9caccaeebea3a8c6c2a12b48e5a21ba8030d5
Signed-off-by: Abhilash Kumar <quic_krabhi@quicinc.com>
2024-01-11 11:17:08 +05:30
Camera Software Integration
82d5f92463 Merge "msm: camera: tfe: Update csid init hw failure call flow" into camera-kernel.lnx.7.0 2024-01-10 07:35:47 -08:00
Camera Software Integration
d37cd292ea Merge "msm: camera: req_mgr: Correct slot status on mode update" into camera-kernel.lnx.7.0 2024-01-10 07:35:30 -08:00
Camera Software Integration
4e36d515e7 Merge "msm: camera: tfe: Fix several issues involving access violation in TFE" into camera-kernel.lnx.7.0 2024-01-10 07:35:14 -08:00