Commit Graph

234 Commits

Author SHA1 Message Date
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
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
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
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
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
Depeng Shao
a8fce31f3f msm: camera: reqmgr: Handle flash properly
Apply the flash at EOF and apply the other devices
at the EPOCH of next frame, then the flash can
cover all the exposure zone of current request.
Add the inject delay for SOF and EOF separate,
then we can use inject delay for more flexible
frame skip control.

CRs-Fixed: 2820683
Change-Id: Ic6a58327a0ae44c54190884ba42ea7926ec7c90e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-18 15:30:48 +08:00
chengxue
a0e5135248 msm: camera: csiphy: add logic for csiphy shutdown
While csiphy is shutdown abnormally, we also need to
program off csiphy hw common register, to avoid the
residual of active csiphy hw cnt during monkey test.

CRs-Fixed: 2861912
Change-Id: I1767c729b205a96e5f298265e65b37150dac03b6
Signed-off-by: chengxue <chengxue@codeaurora.org>
2021-03-16 19:43:11 -07:00
Jigar Agrawal
2bd4bd4aea msm: camera: sensor: Make some of the sensor enums uapi
Move sensor enums that are used by user mode
to uapi file for a synchronus operation. Currently,
user mode and kernel maintains two separate
copies of the same structure, so making a
change in these structure is error prone, since
there is no synchronization.

CRs-Fixed: 2894834
Change-Id: I3f413d03d7981ed3c886e684b11421cae7a39fca
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-03-09 11:03:08 -08:00
Savita Patted
72d6f26c7a Merge "msm: camera: common: Add common wait and poll interface" into camera-kernel.lnx.5.0 2021-03-09 01:29:50 -08:00
Gaurav Jindal
bc400e47fa msm: camera: common: Add common wait and poll interface
In current implementation, each driver call wait_for_completion_timeout
and readl_poll_timeout with own timeout values.
In case of slow environments like presil, lot of hacks are needed to
change the timeouts for each driver. It needs multiple code changes
and compilations, thus consuming time.
This commit implements a common interface to call
wait_for_completion_timeout and readl_poll_timeout.
Debug variable is also introduced to
change the timeout value. This will help to change the timeout
without compilations and changes at multiple places.

Change-Id: Iba51e0805a49ed325147a12688c2fe6619bb68e6
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-03-02 14:17:09 +05:30
Haritha Chintalapati
8740356c94 Merge "msm: camera: csiphy: Update the csiphy logging" into camera-kernel.lnx.5.0 2021-03-01 15:56:08 -08:00
Haritha Chintalapati
7d89f3c290 Merge "msm: camera: sensor: Fix the return code" into camera-kernel.lnx.5.0 2021-03-01 15:55:13 -08:00
Haritha Chintalapati
8159e65fec Merge "msm: camera: csiphy: Update the csiphy programming sequence" into camera-kernel.lnx.5.0 2021-03-01 15:54:49 -08:00
Jigar Agrawal
645fb9745f msm: camera: sensor: Fix the return code
Fix the return code in sensor power up
function for failure case.

CRs-Fixed: 2887698
Change-Id: Ib4df3230d83d02fcd239d872a5bcfa2994d519a3
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-26 11:42:47 -08:00
Jigarkumar Zala
3763d3856c msm: camera: csiphy: Update the csiphy programming sequence
Update the 3phase bring up sequence for csiphy2.1.0. Also
add support for the irq status dump.

CRs-Fixed: 2835738
Change-Id: Id2e59ebb902f7cdc843cdfaf23c5b717807cf78b
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-02-25 11:18:27 -08:00
shiwgupt
5f3d4a34ac msm: camera: cci: Add report id in report command for CCI I2C queue
-Report id is a unique 4-bit value associated with the report command.
 Interrupt is generated on each report command execution. This change
 helps to know whether interrupt is received for a corresponding report
 id. Report id can be checked in REPORT_STATUS register. This change
 adds report id in report command of CCI I2C queue as per HPG.

CRs-Fixed: 2857533
Change-Id: I0c3066962e21c7c024e67ae81ecb762ba331e329
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2021-02-24 23:40:29 -08:00
Jigar Agrawal
b2dcdb6fa1 msm: camera: csiphy: Update the csiphy logging
Update the csiphy logging for better debugging purpose.

CRs-Fixed: 2839060
Change-Id: I8af110ae895ee09cdf9404d0e6d6165188a6db55
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-24 10:58:58 -08:00
Depeng Shao
4591949a37 msm: camera: reqmgr: Pause the timer before sensor stream on
Sometimes, the cpu load is very high, then the devcies
stream on will be delayed, but the CRM watchdog is already
enabled before streaming on, then we will have a chance to
notify SOF freeze issue.
This change pauses the CRM watchdog timer before streaming
on sensor and after stopping ife, when we can detect the
stream on and stream off delay, but don't notify error,
also can detect the real SOF freeze issue.

CRs-Fixed: 2804587
Change-Id: Iccaee837930ea22290b109eff45b05300d844312
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-02-23 11:01:43 -08:00
Haritha Chintalapati
15025a5cd0 Merge "msm: camera: csiphy: Update 2phase sequence." into camera-kernel.lnx.5.0 2021-02-19 14:05:18 -08:00
Haritha Chintalapati
a0cf064b96 Merge "msm: camera: cci: Correct logging level" into camera-kernel.lnx.5.0 2021-02-18 13:31:16 -08:00
Jigarkumar Zala
2d5b15b75c msm: camera: csiphy: Update 2phase sequence.
Update the 2Phase bring up sequence to accomodate different
platforms.

CRs-Fixed: 2835738
Change-Id: I3a58876590f8f6e0ea3d8b651723498494bdf50d
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-02-17 19:03:19 -08:00
Jigar Agrawal
223fee3ea6 msm: camera: sensor: Add sensor name for better debugging
Add sensor name in the sensor drivers for better debugging.

CRs-Fixed: 2856300
Change-Id: I97995e2b731dcf05b5cf85d7b023be77d8a21327
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-16 20:54:59 -08:00
Jigarkumar Zala
b1bad9ec9e msm: camera: cci: Correct logging level
Interrupt context is printing info logs by default which needs
to be print as dbg log. Correcting logging level to achieve this.

CRs-Fixed: 2835738
Change-Id: Ia21a7a4f62c973b173274b363c9a971370d20c36
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-02-16 11:20:51 -08:00
Jigar Agrawal
85c3935cd3 msm: camera: sensor: Increase slot ids in sensor
Increase the max supported slot ids to 16 in sensor.

CRs-Fixed: 2871214
Change-Id: I08910f2c34f70333bf25dbb31de5994c3beb7a8f
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-12 10:11:51 -08:00
Jigarkumar Zala
2da14a4dcd msm: camera: csiphy: Correct return code
Currently for CPHY sensor driver expectes data rate specific
configuration. It can be possible that CPHY driver has the same
configuration among differnt data rates. This change accept this
possibility and return success in case of data specific configutaion
is not found.

CRs-Fixed: 2872304
Change-Id: I358d7f4d82028794ab233311bb1d256f1f0cac5e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-02-05 17:02:50 -08:00