Commit Graph

254 Commits

Author SHA1 Message Date
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
Haritha Chintalapati
2e994b2c81 Merge "msm: camera: utils: Add using mmrm in camera" into camera-kernel.lnx.5.0 2021-05-13 12:03:54 -07:00
Jigar Agrawal
91b2c7464c msm: camera: csiphy: Update the bringup sequence
Add Support to program the output_bus_select register
at the end of programming all the lanes.

CRs-Fixed: 2942604
Change-Id: I0279aa6bc824b75e3df1c62c3f69d146ec80b356
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-05-11 15:38:27 -07:00
Jigar Agrawal
b0a2135f5f msm: camera: csiphy: Cleanup unused variables in csiphy
Clean up unused variables from the csiphy code. Also,
update the code for better readability.

CRs-Fixed: 2942364
Change-Id: I601e06fd8a61607a69390c10124a70f2c7e60dd8
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-05-11 10:58:48 -07:00
Haritha Chintalapati
212ab43481 Merge "msm: camera: cci: Add report id in report command for CCI I2C queue" into camera-kernel.lnx.5.0 2021-05-06 20:32:01 -07:00
Haritha Chintalapati
f144ee8473 Merge "msm: camera: utils: Add camera clk wrapper infrastructure" into camera-kernel.lnx.5.0 2021-05-05 22:06:15 -07:00
Jigarkumar Zala
7fd36a94d8 msm: camera: sensor: Initialize list head
OIS hw  i2c_time_data list head need to be initialize for
proper data operation. This change adds that link list
head initialization.

CRs-Fixed: 2913072
Change-Id: I43041f58055c6eca135dc3c3a0bad50bacb59fe8
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-05-05 14:36:04 -07:00
Jigar Agrawal
2aee6a3692 msm: camera: csiphy: Update the csiphy programming sequence
Update CSIPHY 2.1.0 bringup sequence.

CRs-Fixed: 2929063
Change-Id: I1e7b3560094f82e572b6543a336c5926bd9c5220
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-05-03 10:23:26 -07:00
Pavan Kumar Chilamkurthi
028d6ec734 msm: camera: utils: Add using mmrm in camera
Use mmrm interface to set clock rate on all
camera clks.

CRs-Fixed: 2901925
Change-Id: I2e4c31a11e0e068693ac15356e3b3dafcfa0b078
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-05-01 23:59:09 -07:00
Haritha Chintalapati
9d1cb39b8f Merge "msm: camera: csiphy: Move AON Camera select control" into camera-kernel.lnx.5.0 2021-04-30 19:17:20 -07:00
Haritha Chintalapati
53f079a679 Merge "msm: camera: csiphy: Update the csiphy programming sequence" into camera-kernel.lnx.5.0 2021-04-30 19:17:16 -07:00
Haritha Chintalapati
c796ffd58f Merge "msm: camera: sensor: Extend I2C read/write size" into camera-kernel.lnx.5.0 2021-04-30 17:32:02 -07:00
Haritha Chintalapati
f55270528c Merge "msm: camera: sensor: Change regulator get,put to devres entry" into camera-kernel.lnx.5.0 2021-04-30 17:31:27 -07:00
Haritha Chintalapati
47e8ab4258 Merge "msm: camera: sensor: Correct condition check for BURST/SEQ write" into camera-kernel.lnx.5.0 2021-04-30 17:31:14 -07:00
Alok Chauhan
777919597e msm: camera: req_mgr: Fix deadlock in ICP driver in close
ICP driver is not releasing mutex in error scenario
in close sequence and causing deadlock further in open.

Fix the deadlock and avoid prints in other driver
while close in provider crash.

CRs-Fixed: 2938073
Change-Id: I226c9a8e9b2d0c30e90282b11fbd15ea0b085f87
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-04-30 21:45:18 +05:30
Camera Software Integration
1ef8803d10 Merge "msm: camera: flash: Get the flash on wait time from userspace" into camera-kernel.lnx.5.0 2021-04-28 21:23:12 -07:00
Camera Software Integration
625981cd2e Merge "msm: camera: common: Fix NULL pointer dereference" into camera-kernel.lnx.5.0 2021-04-28 21:20:01 -07:00
Camera Software Integration
5cf3a57890 Merge "msm: camera: reqmgr: add trace log for separating multi camera" into camera-kernel.lnx.5.0 2021-04-28 21:19:52 -07:00
Jigar Agrawal
ef4c673686 msm: camera: csiphy: Update the csiphy programming sequence
Update the csiphy1.2.3 programming sequence for the update
on 01/08/2021.

CRs-Fixed: 2856350
Change-Id: I06b164fbb0a589f22f973476709008d0c7ac32ca
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-27 18:19:36 -07:00
Jigar Agrawal
81c9a0473f msm: camera: csiphy: Move AON Camera select control
Move AON camera select control to the csiphy header.

CRs-Fixed: 2915332
Change-Id: I246d5ee93e9f494b36856fad33fc23e81fa37af2
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-27 18:14:18 -07:00
Sureshnaidu Laveti
938d8aa41d msm: camera: sensor: Extend I2C read/write size
Extend I2C read/write capability to 20kb.

CRs-Fixed: 2927189
Change-Id: Ia5465342fd1d434f90e472c3dd5a5275c3fab8cd
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
2021-04-27 17:59:09 -07:00
Jigarkumar Zala
7263fb5529 msm: camera: sensor: Correct condition check for BURST/SEQ write
Sensor IO framework decides based on slave write request to perform
desire opertion at CCI hw. Currently this framework uses wrong
condition to pass on the correct information to CCI hw. This change
fixes this condition to pass on the correct operation to perform
at CCI hw. Also update hard code value to appropriate enums to align
the opertion with slaves.

CRs-Fixed: 2913072
Change-Id: I3067314e6bccb513f343e3bcbc3f1b72355f2291
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-04-26 15:11:56 -07:00
Pavan Kumar Chilamkurthi
cd745eb39a msm: camera: utils: Add camera clk wrapper infrastructure
Source clocks that are shared with multiple devices need
to be consolidated before setting clock rate on them.
If not, a set call with lower freq from one device
overwrites the frequency that previously set by another
device, causing issues. Clk wrapper helps to consolidate
the frequency among multiple devices and set the max
frequency required by all of them. A shared clock notation
is defined in DT and go through clk wrapper based on that.

CRs-Fixed: 2901925
Change-Id: Ia5b2b5fd3c0619c994e27d96fad6e11d126de182
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-04-23 16:09:53 -07:00
Depeng Shao
0118523efd msm: camera: flash: Get the flash on wait time from userspace
This change gets the flash on wait time from userspace to
control the precise flash.

CRs-Fixed: 2929276
Change-Id: Ieac18f6e049b446c5a7b20dcfdff013aa9838575
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-04-23 13:00:39 +08:00
Haritha Chintalapati
4a2fa25c90 Merge "msm: camera: sensor: Improve Logging" into camera-kernel.lnx.5.0 2021-04-21 17:23:14 -07:00
Jigar Agrawal
5992dd4885 msm: camera: common: Fix NULL pointer dereference
Set the debugfs root entry pointer to null after
recursive remove at unbinding to prevent null pointer
dereference by kernel followed by kernel panic. Also,
add checks to avoid null pointer dereference.

CRs-Fixed: 2920490
Change-Id: I5a4f44f3d8f533f3a51e108472d5ccf93c261a98
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-19 11:25:07 -07:00
Haibin Liu
693c6dfdae msm: camera: reqmgr: add trace log for separating multi camera
Based on link_hdl/sensor id, that can separate multi camera event
on reqmgr, apply request, bufdone, isp_active_irq.
Add log of link_hdl/sensor id in above trace event,
that systrace can show independent camera trace event.

CRs-Fixed: 2924042
Change-Id: I7088a8a489a05dae4e62dc131d1c0c45c72038e2
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
2021-04-19 21:51:51 +08:00
Jigar Agrawal
e3505ad43f msm: camera: sensor: Improve Logging
Improve Sensor logging for better debugging.

CRs-Fixed: 2924774
Change-Id: I386ce0fc634250003c05dea034ad60ea52f99678
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-16 15:07:12 -07:00
shiwgupt
75265788a9 msm: camera: sensor: Change regulator get,put to devres entry
This change modifies regulator_get, regulator_put to devres entry.
Devres is linked list of arbitrarily sized memory areas associated
with a struct device.  Each devres entry is associated with a release
function. All devres entries are released on driver detach. This
avoids potential leaking of resources on driver detach or having half
broken failure path implementation in probe call which would leak
resources when failure occurs.

CRs-Fixed: 2890861
Change-Id: Ibd46bc37bd6e31aeb2a5ea90ed75a1f596b57bf9
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2021-04-16 11:41:45 +05:30
Jigar Agrawal
74135ec470 msm: camera: csiphy: Add support for delay in IRQ confiq
Add support to add a delay while programming the IRQ
settings. Also, correct the irq mask bring up sequence
for csiphy2.1.0.

CRs-Fixed: 2923706
Change-Id: I1ef5b078bd91e915b9e53305edc0034d62132831
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-15 18:29:18 -07:00
Alok Chauhan
2ebae4fabe msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence
when provider crash occurred, there was a CSID lane overflow
observed due to shutdown sequence from CRM(sensor, csid, csiphy).
To fix the issue need to change the shutdown sequence
(csid, sensor, csiphy).

This change will update the devices sequence in order while registering
and close the sequence accordingly.

CRs-Fixed: 2852076
Change-Id: Ia6d8022e995823bf031400c33528eb8544dc2e29
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-04-14 05:20:37 -07:00
Savita Patted
4aa9286fd7 Merge "msm: camera: csiphy: Update the csiphy programming sequence" into camera-kernel.lnx.5.0 2021-03-30 21:23:30 -07:00
Jigar Agrawal
742e1a78fa msm: camera: csiphy: Update the csiphy programming sequence
Update the bring up sequence for csiphy2.1.0 with the
revision U.

CRs-Fixed: 2895820
Change-Id: I59b52d0bb52b82b23d83fd138e93302792dc6203
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-03-26 13:18:12 -07:00
Savita Patted
17ab2b21c6 Merge "msm: camera: common: Add AON support" into camera-kernel.lnx.5.0 2021-03-23 18:44:50 -07:00
Haritha Chintalapati
536d5a9599 Merge "msm: camera: reqmgr: Handle flash properly" into camera-kernel.lnx.5.0 2021-03-19 17:41:32 -07:00
Jigarkumar Zala
26cfdeb27c msm: camera: common: Add AON support
Add Main/Aon camera switch support for image sensor
and it's submodule. This change detects the AON support
from image sensor hw information from it's respective
device tree support. Also sensor needs to call csiphy
to do the cpas top level operation in order to program
the register for Main/AON mux operation, so add API
export from csiphy hw for sensor domain to perform
the operation.

CRs-Fixed: 2899541
Change-Id: Ibde3ce86c15cfd7e7f445f6461565f78a668b812
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-03-19 09:49:13 -07:00