Commit Graph

320 Commits

Author SHA1 Message Date
Jigarkumar Zala
218814c4de msm: camera: sensor: Remove NULL set for regulator phandle
Regulator_get is being moved with probe time for opertional
performance improvement. With this change regualtor phandle can
only be derive at power cycle. In case of power_on/down failure case
currently regulator phandle is set with NULL which can cause
failure in power related operation in all future sessions. This change
removes NULL setting to regulator phandle in failure case.

CRs-Fixed: 3052638
Change-Id: I4abec311416e852bbe1922024b05755e2b3a3d25
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-22 19:14:09 -07:00
Jigarkumar Zala
51cd1a4e0c msm: camera: csiphy: Add proper check for combo mode
Currently in combo mode csiphy preamable enable is determined with
premalbe flag set previously and current sensor configuration setting.
In case of non combo mode usecase if config packet is coming back to
back current condition check misinterpret it as combo mode and fails
with incorrect operation. This change adds the combo_mode condition
check along with other to correctly detemine combo mode and non combo
mode usecase and behaves accordingly.

CRs-Fixed: 3054225
Change-Id: I59532405230ab23dfd42425f20bd1a108cc8ce14
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-19 15:49:43 -07:00
Camera Software Integration
7908b9520e Merge "msm: camera: csiphy: Update the csiphy bringup sequence" into camera-kernel.lnx.5.0 2021-10-18 16:43:25 -07:00
Camera Software Integration
ad7e6fe867 Merge "msm: camera: csiphy: Enable PN9 infinite loop for test" into camera-kernel.lnx.5.0 2021-10-14 16:56:12 -07:00
Camera Software Integration
c469b0db2d Merge "msm: camera: common: Make msg_cb for cam_subdev generic" into camera-kernel.lnx.5.0 2021-10-14 16:55:23 -07:00
Jigar Agrawal
f75337c991 msm: camera: csiphy: Update the csiphy bringup sequence
Update 1.2Gsps datarate specific sequence to improve the
csiphy response and add margin for the boards with larger
insertion loss. New setting adds robustness to the csiphy
operation.

CRs-Fixed: 3042875
Change-Id: I6e93d35a6a026613eb6879f07759acef05e31794
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-13 17:03:09 -07:00
Jigarkumar Zala
daead670e6 msm: camera: csiphy: Enable PN9 infinite loop for test
Enable PN9 infinite loop for test. Also move the PN9 status
check from polling to one time read at streamoff.

CRs-Fixed: 3054225
Change-Id: Ia4d8ff17e3c78f37adb68ad9a4afb076fe2bda45
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-13 12:13:33 -07:00
Camera Software Integration
be297775bc Merge "msm: camera: csiphy: Extend CSIPHY hw block support" into camera-kernel.lnx.5.0 2021-10-06 17:41:14 -07:00
Camera Software Integration
1f9de29a6d Merge "msm: camera: cci: Increase HW block support for CCI" into camera-kernel.lnx.5.0 2021-10-06 17:40:35 -07:00
Shardul Bankar
dc53926c40 msm: camera: common: Make msg_cb for cam_subdev generic
The current implementation allows to pass uint_32 as
argument in the message callback. Changing it to (void *)
type so that any type of data can be passed in the future
implementations.

CRs-Fixed: 2847155
Change-Id: Ic52a5ccfe13efdba37bbcfdb7154ed789b1943fd
Signed-off-by: Shardul Bankar <sharbank@codeaurora.org>
2021-10-04 15:05:10 +05:30
Jigarkumar Zala
1c29fe16b5 msm: camera: csiphy: Extend CSIPHY hw block support
Increase CSIPHY hw block support 8 for v780 and future
platforms.

CRs-Fixed: 3042539
Change-Id: Ib8c3c2bdde583ff5dc5ddb0a7b818dc8723b270f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-01 14:34:03 -07:00
Jigar Agrawal
4c0e3a89ac msm: camera: csiphy: Update AFE settings for cphy sensors
Update 4Gsps data specific AFE tuning paramenters for CPHY
sensors. Also remove the CPHY specific only common parameter
from common configuration.

CRs-Fixed: 3042875
Change-Id: Icf8c0d49fdbb7da247dadb5c95cff6c984ce6850
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-30 14:29:02 -07:00
Jigarkumar Zala
1d400147b7 msm: camera: cci: Increase HW block support for CCI
Increase hw block support for CCI to 3 for v780 and
onwards.

CRs-Fixed: 3042539
Change-Id: I4a6b594a22373047e243bfefa22d304eab969e71
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-09-30 12:39:02 -07:00
Camera Software Integration
84a665ef5c Merge "msm: camera: common: Fix kernel code and add checks" into camera-kernel.lnx.5.0 2021-09-27 15:37:10 -07:00
Camera Software Integration
9d778cd0cc Merge "msm: camera: csiphy: Add version check for secure mask" into camera-kernel.lnx.5.0 2021-09-27 15:36:52 -07:00
Jigar Agrawal
efff3f9490 msm: camera: csiphy: Update csiphy settings
Update the csiphy2.1.0 AFE settings.

CRs-Fixed: 3044363
Change-Id: I80ea12dcfe554e58599ce39348851a4279c4c53a
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-24 11:51:31 -07:00
Jigar Agrawal
35a9822e03 msm: camera: common: Fix kernel code and add checks
Fix Kernel code and add security checks to avoid
possible null pointer dereference, out of bound
array access and accessing the uninitialized
variables. This change resolves following static
analysis issues:
568, 576, 577, 578, 4828, 4829, 4830, 4831, 4832,
4833, 4834, 4835, 4836, 4839, 4841, 4842, 5849,
9352, 9454, 9455.

CRs-fixed: 3038735
Change-Id: I16e437edbb444223ce9d275ed55089bd25a1294c
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-21 10:42:19 -07:00
Jigarkumar Zala
45bae36861 msm: camera: csiphy: Add version check for secure mask
CSIPHY version 2_1_0, secure phy mask is different for csiphy
hw 0/1/2/3  and hw 4/5. This needs to be configure before enabling
secure lanes. This change adds the appropriate version check to
perform this operation.

CRs-Fixed: 3039500
Change-Id: I8e856757886e880a6bf57ed4083ddf99cd325a7a
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-09-20 11:25:54 -07:00
Depeng Shao
c8ac17dee6 msm: camera: reqmgr: Fix request sync issues
Fix several request sync issues.

CRs-Fixed: 3029196
Change-Id: I92b4048b392fa19e2c9748a5ee0efd9ef0b4e680
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-20 13:04:31 +08:00
Camera Software Integration
624ee237ea Merge "msm: camera: sensor: Handle tpg shutdown properly" into camera-kernel.lnx.5.0 2021-09-16 16:37:54 -07:00
Haritha Chintalapati
4606441bc4 Merge "msm: camera: csiphy: Update the datarate settings for csiphy" into camera-kernel.lnx.5.0 2021-09-14 17:44:48 -07:00
Tony Lijo Jose
1ac3215b14 msm: camera: sensor: Handle tpg shutdown properly
CPAS stops during shutdown needs to be done only for the TPGs which has
done the cpas start. This change add the state checks while tpg reset.

CRs-Fixed: 2998830
Change-Id: I4cdd9ec74daa65999ed5094a3c4a4c165b9a1569
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2021-09-13 15:21:26 +05:30
Jigar Agrawal
bb09d36188 msm: camera: csiphy: Update the datarate settings for csiphy
Update the csiphy datarate setting for 2.35gsps slab.

CRs-Fixed: 3022770
Change-Id: I61316aa83debbcc49fae95ef1ebac092a794236f
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-07 10:29:34 -07:00
Jigar Agrawal
0225f24ddd msm: camera: csiphy: Update the datarate settings for csiphy
Update the csiphy datarate setting for 2.6gsps slab.

CRs-Fixed: 3022770
Change-Id: I10357104d9c0342a942568753ca12bc2b6ff0d60
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-03 08:43:20 -07:00
Jigar Agrawal
6c439c1a5a msm: camera: csiphy: Add more datarate setting ranges
Add more datarate specific setting ranges to cover the
finer gsps ranges. Dump all the common status registers
on the error rather than just the irq status registers.

CRs-Fixed: 3022770
Change-Id: I6dc5e8d695a40c1633c054e5420084f1ec771485
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-01 21:38:37 -07:00
Jigar Agrawal
7eff3cb4b6 msm: camera: csiphy: update the csiphy driver for v2 device
Move the flag which decides whether to program the common
registers for csiphy for all the phy devices to dtsi file.
Common registers sequence should not be programmed for all
the Csiphys during stream on for SM8450 v2 device.

CRs-Fixed: 3020245
Change-Id: I91e6bb786868c1aae165c97751663593e46b8c5b
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-01 21:29:36 -07:00
Wang Kan
e935575398 msm: camera: cci: CCI logging improvement
CCI logging improvement to print the runnning
master and queue.

CRs-Fixed: 3014893
Change-Id: I65a0e2797956a66fe50660290a4f2ccb74c60cbe
Signed-off-by: Wang Kan <wkan@codeaurora.org>
2021-08-24 13:25:15 +08:00
Savita Patted
4250340b1a Merge "msm: camera: csiphy: Rearrange the CSIPHY bring up sequence" into camera-kernel.lnx.5.0 2021-08-18 21:49:36 -07:00
Savita Patted
fa9c1dd507 Merge "msm: camera: flash: Make warning non fatal for early PCR" into camera-kernel.lnx.5.0 2021-08-18 21:49:19 -07:00
Jigar Agrawal
c774a38d5a msm: camera: csiphy: Rearrange the CSIPHY bring up sequence
Rearrange the CSIPHY sequence to move the on the go registers
right before csiphy release. Improve the logic for update lane
to spend lesser time in the routine. Change the AFE Settings and
move them to datarate specific field.

CRs-Fixed: 3015111
Change-Id: I6a355035b226d575b2fff33c885e9a3ea30a1256
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-08-16 10:50:10 -07:00
Jigarkumar Zala
159e8902b5 msm: camera: flash: Make warning non fatal for early PCR
Currently early init pcr with torch mode is returning fatal error
with warning message. The operation still can be perform from the
flash hw prospective. This change removes the code break with
warning message and perform the on/off operation. Also, convert
streamon/streamoff specific ioctl call from debug to info log
for better operation trace.

CRs-Fixed: 2939386
Change-Id: Ib0b049231e9fba3956668a0aaca92b58599e358f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-08-11 10:42:13 -07:00
Ayush Kumar
8554f46816 msm: camera: core: Add delay detection support
This changes is to detect workqueue and tasklet
scheduling and execution delay.

CRs-Fixed: 2977775
Change-Id: Ia4b4845a067c22bd1f24bd63a971d103fcfc049c
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-08-11 22:18:10 +05:30
Savita Patted
bfa1600ccc Merge "msm: camera: cci: Fix CCI Timeout during burst_read concurrency" into camera-kernel.lnx.5.0 2021-08-04 22:51:15 -07:00
Camera Software Integration
e3c9d6d1e6 Merge "msm: camera: csiphy: Fix presil crash due to readl in tpg" into camera-kernel.lnx.5.0 2021-07-30 17:36:31 -07:00
Camera Software Integration
d53c3ae878 Merge "msm: camera: cci: Enhance burst read timing" into camera-kernel.lnx.5.0 2021-07-30 17:34:32 -07:00
Mukund Madhusudan Atre
9133c767b4 msm: camera: csiphy: Fix presil crash due to readl in tpg
Register read writes are expected to go through wrapper
functions in presil so that they can be overridden by presil
code. Change register read during tpg start to use this wrapper.

CRs-Fixed: 2932495
Change-Id: Ib72f2de381e096bde146e4fb1ff8f5187eaa5717
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-07-29 16:11:18 -07:00
Haritha Chintalapati
854ef5bbec Merge "msm: camera: common: Append workq name in log" into camera-kernel.lnx.5.0 2021-07-27 22:12:54 -07:00
Depeng Shao
86c23361e6 msm: camera: cci: Enhance burst read timing
In burst read flow, we need to wait CCI irq
once one set data is read, but the fifo may has
new data what can be read immediately and don't
need to wait the irq. This change also optimize
the irq processing, we can reset irq mask first,
then process the irq status, it can avoids some
timing issue, e.g. the read context runs too
quickly, then read context enable the read
threshold bit in irq mask1, but irq context runs
late, then irq context clear the read threshold,
then we can't receive read threshold again.

CRs-Fixed: 2995920
Change-Id: I8acfadf07b95782725bf4bf8b05b88789874c1da
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-07-27 11:56:04 +08:00
Sokchetra Eung
ba664cddff msm: camera: common: Append workq name in log
Append workq name in workq delay detect API to identify
which workq is scheduled late. Create workq name macros for
cci and cpas to pass to workq delay detect API.

CRs-Fixed: 2994927
Change-Id: Iebc14520b918272e92b59c900de5fe17f38a2406
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-07-26 17:43:37 -07:00
Anil Kumar Kanakanti
d584013b1c msm: camera: cci: Fix CCI Timeout during burst_read concurrency
During burst read concurrency, is_burst_read variable not updated
properly leading to missing th_complete signal. is_burst_read variable
updated per master to avoid concurrency issue.

CRs-Fixed: 2962232
Change-Id: Id741d48e0b9a6987b4aa7bc7361daf555d9bc587
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2021-07-24 07:47:55 -07:00
Jigar Agrawal
9824e39f67 msm: camera: csiphy: Enhance the csiphy reg dump
Enhance csiphy reg dump to make them more readable
and allow them to be parsed by creating a parser.

CRs-fixed: 2992807
Change-Id: Idc5cfa6aa14c90adfeeaf398fa89ded51aeea350
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-07-23 16:23:27 -07:00
Jigar Agrawal
57b1d69e64 msm: camera: csiphy: Rearrange csiphy debugfs
Currently all the csiphy debugfs entries are
populated in the same camera-csiphy folder.
This has make searching for a desired debugfs
for desired csiphy a little difficult. Move
all those debugfs entries to the respective
csiphy index directory for easy access.

CRs-fixed: 2992807
Change-Id: Ia48df672669c88a0dd72f051a7be3d8e043c7e7c
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-07-23 11:52:50 -07:00
Savita Patted
017b2667e9 Merge "msm: camera: csiphy: Continue in case of unavailibility of CSIPHY hw" into camera-kernel.lnx.5.0 2021-07-21 22:29:40 -07:00
Savita Patted
5acb10a298 Merge "msm: camera: csiphy: Add missing base address assignment" into camera-kernel.lnx.5.0 2021-07-21 22:29:24 -07:00
Camera Software Integration
400bbd856d Merge "msm: camera: csiphy: Update csiphy2.1.0 bringup sequence" into camera-kernel.lnx.5.0 2021-07-16 19:49:05 -07:00
Camera Software Integration
3ec4a1fd7e Merge "msm: camera: common: Append timestamp in INFO LOGS" into camera-kernel.lnx.5.0 2021-07-16 19:48:48 -07:00
Camera Software Integration
399abd9ccd Merge "msm: camera: csiphy: Handle the aon/non_aon configuration" into camera-kernel.lnx.5.0 2021-07-16 19:48:25 -07:00
Sokchetra Eung
5a11ba0725 msm: camera: common: Append timestamp in INFO LOGS
Use Kernel time to obtain the current time when IFE is acquired
/released and when sensor is streamed on/off. Convert the Ktime
to a timestamp format and log it in existing info prints. This
will help to co-relate timestamp between user-space and kernel
logs. The change also replaces the current usage of direct calls
to ktime_get_real_ts64 with macro across all drivers.

CRs-Fixed: 2987320
Change-Id: I87c4790164d222fc1ed6ff41ad00eeb1ed8c8867
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-07-15 11:56:33 -07:00
Jigar Agrawal
e1205760ac msm: camera: csiphy: Update csiphy2.1.0 bringup sequence
Update csiphy2.1.0 reset sequence to not relese the reset
during the reset sequence. Add support to read cphy lane
status register after programming the csiphy. Program
datarate specific settings before programming the lane
registers. Add a delay of 100us before and 1ms after
releasing the csiphy reset respectively for cphy.

CRs-fixed: 2947752
Change-Id: I4befa03bab85779749efd33908ab5a02c96c0cb4
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-07-15 10:49:41 -07:00
Jigarkumar Zala
470bd6c419 msm: camera: csiphy: Continue in case of unavailibility of CSIPHY hw
During the common control register programming across csiphy hws,
there can be chance that number of CSIPHY hw supported is differnt
than max csiphy hw supported among various targets. This change
make sure to continue to next available hardware index in case of
unavailibility of csiphy hw soc index.

CRs-Fixed: 2991847
Change-Id: I1572974226701dcd3aadeb3d9cf95924e05520a9
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-07-14 17:40:12 -07:00