Commit Graph

289 Commits

Author SHA1 Message Date
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
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
Jigarkumar Zala
4492cfd331 msm: camera: csiphy: Add missing base address assignment
Adding base address assignement while reading the status registers
in case of PN9 pattern recieve incorrectly. Without this assignment
there will be null pointer dereferncing issue.

CRs-Fixed: 2991847
Change-Id: I36b21f52e437807efab26a00c961ebbf11f8ded7
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-07-14 17:35:52 -07:00
Savita Patted
ffa01440ef Merge "msm: camera: sensor: Optimize OIS qtimer values" into camera-kernel.lnx.5.0 2021-07-08 18:57:19 -07:00
Savita Patted
b7ff0db8c6 Merge "msm: camera: csiphy: Add support for runtime update of csiphy register" into camera-kernel.lnx.5.0 2021-07-07 09:55:19 -07:00
Savita Patted
dba6c5e0f0 Merge "msm: camera: common: Change shutdown sequence for subdevices" into camera-kernel.lnx.5.0 2021-07-07 09:54:21 -07:00
Savita Patted
2946eb9c57 Merge "msm: camera: common: Detach pinctrl state operation" into camera-kernel.lnx.5.0 2021-07-07 09:54:00 -07:00
Savita Patted
75dd79a2dc Merge "msm: camera: sensor: Move cci master index to dt-bindings" into camera-kernel.lnx.5.0 2021-07-07 09:53:40 -07:00
Jigarkumar Zala
f9512d306a msm: camera: csiphy: Handle the aon/non_aon configuration
Combo mode with AON/Main camera operation is corrupted if AON
image sensor probe later than non AON operation sensor mode. This
sequence will put csiphy access to AON FW, and at the time of
Non AON image sensor can not able to stream. To address this issue
add csiphy hw an knowledge of AON capability to acquire the resources
in such usecase. This can assure any of the combo mode sensor will
have access of csiphy hw before start streaming.

CRs-Fixed: 2926885
Change-Id: Id9e0fad6b7f305ca9b3688629bf7692340f73d8e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-07-06 14:16:08 -07:00
gqiaorui
2ed447d4db msm: camera: sensor: Optimize OIS qtimer values
Update Qtimer read logic to read qtimer before
CCI read operation to accomodate CCI delays.

CRs-Fixed: 2976423
Change-Id: I33cc84011a3aed89ee0e95386db3d7604edb16fa
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
Signed-off-by: Qiaorui Ge <gqiaorui@codeaurora.org>
2021-07-05 10:54:51 +08:00
Savita Patted
9e5e021304 Merge "msm: camera: sensor: Add tpg driver support" into camera-kernel.lnx.5.0 2021-07-01 15:29:06 -07:00
Karthik Anantha Ram
d785949196 msm: camera: common: Change shutdown sequence for subdevices
In subdev close call if CRM is still active wait for shutdown
from CRM [media device]. Remove subdevice check for active
handles, shutdown to happen irrespective of any active context.

If CRM is not active, subdevice shutdown should ensure there is
no access to kernel allocated buffers since at this point
memmgr is de-initialized.

As part of ICP close, remove usage of HFI queues, trigger PIL
to transfer FW memory ownership back to HLOS and power off ICP.

CRs-Fixed: 2976107
Change-Id: Ib05b3fbdcc33f4072da7ef77cf0118a807860e8c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-06-30 17:04:11 -07:00
Jigarkumar Zala
78f6e5bd2d msm: camera: common: Detach pinctrl state operation
Currently pinctrl state update operation is integrated
with platform resource operation. This can create unwanted
transition of pinctrl which can stay in suspend state.
This change detach and separate out the pinctrl entries
with index passed from devicetree. Pinctrl select
state operation is detach from platform enable/disable
operation to operate from device directly only for better
control with respect to operation.

CRs-Fixed: 2907475, 2954556
Change-Id: I918568f96e8888df6882f165458f5c4ab32d6348
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-30 11:37:46 -07:00
Jigarkumar Zala
849491a0f2 msm: camera: sensor: Move cci master index to dt-bindings
Master specific index is moved to dt bindings to share across
dtsi and driver for the same referencing. This will help
to align indexing and controlling of pinctrl with master specific
slaves.

CRs-Fixed: 2907475, 2954556
Change-Id: Ic5b5537b44af583cb7623ef38a19e67ffe95e95d
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-30 11:36:58 -07:00
Tony Lijo Jose
caa6b2a1a4 msm: camera: sensor: Add tpg driver support
Add new tpg subdev driver. This change exposes the tpg hw as a new
subdev similar to that of a sensor driver.

CRs-Fixed: 2973850
Change-Id: I6fdb4457d8cc829546896f26bdde8765a4258e7c
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2021-06-29 00:44:14 -07:00
Jigar Agrawal
a20b1d303e msm: camera: csiphy: Add support for runtime update of csiphy register
Add support to program upto 50 csiphy registers on the fly. The registers
get programmed on the csiphy stream on. Delay in micro seconds can also be
provided for each register write. Use the following commands to use
this functionality:
adb shell "echo Offset0,Val0,usdelay0,..>
  /sys/module/camera/parameters/csiphy_onthego_regs".

CRs-fixed: 2968273
Change-Id: Id15906aa9ab59159d356a76e280408e9a35e0449
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-06-28 13:00:38 -07:00
Jigarkumar Zala
484fab1671 msm: camera: csiphy: Enable dynamic clock voting level
CSIPHY hardware is having multiple clock voting level per datarate.
Enabling to calculate the correct function to calculate and apply
to clock vote level per datarate provided by sensor.

CRs-Fixed: 2968149
Change-Id: Ifb1be2d3bce7fff5ff34ea5d62960d40d55c2071
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-25 18:29:58 -07:00
Jigar Agrawal
33b42a170c msm: camera: csiphy: Add Support for datarate specific settings
Add support for data rate specific bringup register settings
for csiphy for csiphy2.1.0.

CRs-fixed: 2968227
Change-Id: Ide484fe2e94e0e44c75396de719bd2a8010c0eea
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-06-22 15:36:50 -07:00
Savita Patted
b215805307 Merge "msm: camera: req_mgr: Fix deadlock in ICP driver in close" into camera-kernel.lnx.5.0 2021-06-21 18:39:25 -07:00
Savita Patted
68de607556 Merge "msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence" into camera-kernel.lnx.5.0 2021-06-21 18:38:47 -07:00
Camera Software Integration
bc895d1ad5 Merge "msm: camera: req_mgr: Re-design CRM to support multi links in sync mode" into camera-kernel.lnx.5.0 2021-06-09 19:15:05 -07:00
Jigarkumar Zala
3d281d2a45 msm: camera: csiphy: Add work queue to trigger the status register
Bist register status needs to be poll after sensor streaming. Start dev
ioctl is blocking call, so create a work queue which gets schedule
without blocking sensor streamon, and still can able to poll the status
register.

CRs-Fixed: 2943640
Change-Id: I1559188a86d76ed7e896429b001862e8753e492e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-04 17:15:31 -07:00
Ayush Kumar
0259331da4 msm: camera: req_mgr: Re-design CRM to support multi links in sync mode
This change is to support multi links in sync mode. Supports dynmanic
switching to select master link in rtb and sat use case in sync mode.
Supports sync logic for rtb and sat use case in sync mode. Apply
requests for all links is triggered only on master epoch. Supports
bubble recovery and sync logic for different pd links in sync mode.

CRs-Fixed: 2783209
Change-Id: I81d1d0d37aa0d6e18c19ca87eac51ef3f160abfb
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-06-04 20:23:00 +05:30
Jigarkumar Zala
58819faeca msm: camera: csiphy: Add debug enhancement for the pattern test
Add support for prbs9 pattern debug and verification support for
3phase and 2phase sensor. This change prints the more information
in case of status error from any of the data lane.

CRs-Fixed: 2943640
Change-Id: I629703d066d119ad8670cbb91f92eba79ea43028
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-01 09:30:12 -07:00
Jigarkumar Zala
fc6644bcf5 msm: camera: csiphy: Add support for enable/disable CSIRX for PRBS9
CSI Rx needs to be enable/disable recieving prbs9 pattern based on
sensor mode settings. This change configure lane programming
based on the enable flag and make CSI hw in ready state to listen
PRBS9 pattern.

CRs-Fixed: 2943640
Change-Id: Idff5ed8f0bf0314932ff6dd0c91b5c8772997f05
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-01 09:29:37 -07:00
Jigarkumar Zala
2dbc434daa msm: camera: uapi: Enable preamble control notification
Enable preamble control notificaion for disable preprogrammed
CDR setting for certain resolution sensor mode.

CRs-Fixed: 2943640
Change-Id: I31705cd14239d5610c4f12c2d9e9417eead3c886
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-01 09:24:42 -07:00
Haritha Chintalapati
3d252948c1 Merge "msm: camera: csiphy: Correct tag for programming lane enable" into camera-kernel.lnx.5.0 2021-05-19 18:18:35 -07:00
Haritha Chintalapati
1617f08acf Merge "msm: camera: csiphy: Dump PHY Status Registers" into camera-kernel.lnx.5.0 2021-05-19 18:18:25 -07:00
Haritha Chintalapati
14beba2b6a Merge "msm: camera: csiphy: Update the bringup sequence" into camera-kernel.lnx.5.0 2021-05-19 18:18:13 -07:00
Haritha Chintalapati
dfa3a31d87 Merge "msm: camera: csiphy: Cleanup unused variables in csiphy" into camera-kernel.lnx.5.0 2021-05-19 18:17:59 -07:00
Haritha Chintalapati
de04aae87b Merge "msm: camera: sensor: Initialize list head" into camera-kernel.lnx.5.0 2021-05-19 18:17:47 -07:00
Jigarkumar Zala
ddb022b1fa msm: camera: csiphy: Correct tag for programming lane enable
Lane enable needs to be program with header tag LANE_ENABLE. This
change adds the tag associated with the correct register offset.

CRs-Fixed: 2929063
Change-Id: Ibbb8e4e0fc2d2de8e9c9f193b3d31ba5492b22f4
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-05-14 16:53:51 -07:00
Jigar Agrawal
bbb5baee0a msm: camera: csiphy: Dump PHY Status Registers
Add support to dump the 3ph and 2ph specific
status registers. Following debugfs command can
be used to enable status register dump for csiphy0:
adb shell
  "echo 1>/sys/kernel/debug/camera_csiphy/csiphy0_en_status_reg_dump"

CRs-Fixed: 2942364
Change-Id: If8d57a9e54c9e509de35f6a57d7baa1895be7779
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-05-14 16:46:18 -07:00