Commit Graph

3498 Commits

Author SHA1 Message Date
Wasim Khan
0fc142d2fa Merge "msm: camera: csiphy: Trigger ISP callback on phy clock change" into camera-kernel.lnx.7.0 2024-02-05 03:24:15 -08:00
Chandan Kumar Jha
6dca977b60 msm: camera: isp: Release mutex in case of error
Mutex unlock was missing in isp driver during hw manager init
This change adds the missing mutex unlock.

CRs-Fixed: 3711067
Change-Id: Ic12671fdb81c80b6b426c840b6a6887fb38a8b36
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
2024-02-05 15:56:59 +05:30
Dharmender Sharma
c7e96a7e98 msm: camera: jpeg: Use spin lock irqsave to avoid preemption
Use spin_lock_irqsave utility to avoid preemtpion of process_cmd thread
in jpeg. This can come in rare conditions when IRQ is received on same
CPU which is handling the thread.
Such cases will result in deadlock conditions.

CRs-Fixed: 3712176
Change-Id: Ib0d9997495272ab49a75b0419eb1e0fd84b1962c
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
2024-02-01 21:58:42 -08:00
Abhilash Mahapatra
23bc30fee2 msm: camera: sensor: Proper handling of NULL Dereference
- Change to dereference s_ctrl only after proper
  NULL Dereference Check.
- Proper Handling in case of invalid pinctrl
  index.
CIDs Fixed: 50869, 41493

CRs-Fixed: 3715664
Change-Id: If55f7d0854eb4709bd9e93f10bf67318a348a035
Signed-off-by: Abhilash Mahapatra <quic_abhmah@quicinc.com>
2024-02-01 01:02:54 -08:00
Karthik Anantha Ram
6d725cc619 msm: camera: sensor: Use bubble packet for request reapply
Use bubble packet for request reapply for all scenarios
irrespective of mode switch. Bubble packet carries exposure
updates as well.

CRs-Fixed: 3689201
Change-Id: If2170fd77ea7fe88155ed7101fc053d13bd592a8
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
(cherry picked from commit c0b8a1bad215c6ba71851897ad642611f085dfb3)
2024-01-31 23:12:59 -08:00
Alok Chauhan
04943eec61 msm: camera: isp: Fix buf done handling in tfe bus
Fix buf done handling in tfe bus driver due to missing
handling for multiple out resource.

CRs-Fixed: 3696470
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: Ie5597b83d21368f921d232d242c82be671ab8080
2024-01-29 22:13:22 -08:00
Alok Chauhan
80ac4f8b52 cam: isp: tfe: Fix null pointer crash for out map
Output port map structure is not defined for TFE.
This is causing null pointer dereference in add io
buffer api.

Add support for outport map structure in TFE driver.

CRs-Fixed: 3696470
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: I35fa1f36a65bb0ba3dfd896567b47549b6bebf9d
2024-01-24 07:20:08 -08:00
Ayush Kumar
cffdf3f9b5 msm: camera: cre: Fix null pointer dereference in CRE driver
Flush all cmd release all request from CRE request list, once release
these request should not be access by other threads. This commit
add proper mutex lock and conditions to prevent use of released request
from CRE request list. Also change SW reset to HW reset in case of
flush all.

CRs-Fixed: 3583508
Change-Id: I35b38bf5b1771a26bb5a37d3404f6e577abcb66b
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-24 06:05:13 -08:00
Gaurav Jindal
629c599958 msm: camera: isp: Release mutex in case of error
Mutex unlock was missing in CSID driver in case the drv clk rate
call fails. This can result in recursive locking situations.
This commit handles the error scenario.

Change-Id: Ie1e60006713f0a96831ec1174bec1b40ab460a1f
CRs-Fixed: 3712878
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2024-01-24 01:31:45 -08:00
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
Shadul Shaikh
57f19ae659 msm: camera: sensor: Duplicate TPG changes for Crow
Add support to skip TPG hardware operations with
"hw-no-ops" property.

CRs-Fixed: 3562223

Change-Id: I2ce3cc3d46d90567dba23e8952bb41e7b5936be4
Signed-off-by: Shadul Shaikh <quic_shaduls@quicinc.com>
(cherry picked from commit a117f9910be023824aea1ad598bf59359730e1f4)
2024-01-23 16:00:15 +05:30
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
Shadul Shaikh
fe2796ca01 msm: camera: csiphy: Trigger ISP callback on phy clock change
Trigger callback to ISP each time when there is a change
in phy clock so that csid and tfe clock rate can be
updated accordingly. The argument passed in callback api is
the final phy clock rate that is applied.

CRs-Fixed: 2854066

Change-Id: Ia74465e4082e08b4c50338e0eb779f996afa2795
Signed-off-by: shiwgupt <quic_shiwgupt@quicinc.com>
Signed-off-by: shaduls <quic_shaduls@quicinc.com>
(cherry picked from commit 1fd5054f530a16a5bf90901ba4c8bf2025e136dc)
2024-01-17 04:08:22 -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
Alok Chauhan
b1cd816a48 msm: camera: icp: Enhance support for HW capability
Enhance support for HW capability for other targets.

CRs-Fixed: 3696470
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: I53d20dda4cad7cb653808d7e93911297979dce25
2024-01-16 16:37:09 +05:30
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