Commit Graph

206 Commits

Author SHA1 Message Date
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
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
Camera Software Integration
70042378e6 Merge "msm: camera: csiphy: Update the csiphy programming sequence" into camera-kernel.lnx.5.0 2021-02-04 16:17:13 -08:00
Camera Software Integration
623fd1e471 Merge "msm: camera: common: Improve the CSID logging" into camera-kernel.lnx.5.0 2021-02-02 13:46:10 -08:00
Jigar Agrawal
dd28f05a0f msm: camera: csiphy: Update the csiphy programming sequence
Update the csiphy2.1.0 programming sequence for the update
on 01/13/2021 in revision 6.

CRs-Fixed: 2856350
Change-Id: Ib1d9f8ea48bdcb333773bb0fbc3a2c14b10105af
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-01 10:21:35 -08:00
Jigar Agrawal
18e1773e75 msm: camera: csiphy: Add debugfs support for csiphy
Add debugfs support for csiphy and create a new debugfs
for enable/disable csiphy irqs. Following command can be
used to enable the csiphy0 irqs:
adb shell "echo 0x1 >>
/sys/kernel/debug/camera_csiphy/csiphy0_en_irq_dump".

CRs-Fixed: 2829969
Change-Id: I769c84f0cd0bf048652cf2d186d900e470973b0a
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-01-27 16:09:36 -08:00
Jigar Agrawal
28a19c52e1 msm: camera: common: Improve the CSID logging
Improve CSID irq logging for better debugging.
Add support to dump the hw source clock.

CRs-Fixed: 2808577
Change-Id: I06608588ef7a6e0ebc174a1ba138f6e16a9094f2
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-01-26 20:40:06 -08:00
Camera Software Integration
3d82bb320f Merge "msm: camera: common: Migrate dt-bindings to techpack" into camera-kernel.lnx.5.0 2021-01-20 16:23:04 -08:00
Savita Patted
056e8dd8bd Merge "msm: camera: sensor: Add support to hold sensor name" into camera-kernel.lnx.5.0 2021-01-20 15:36:40 -08:00
Savita Patted
7c5578eed1 Merge "msm: camera: cci: Increase queue size for burst write mode" into camera-kernel.lnx.5.0 2021-01-20 15:36:15 -08:00
Savita Patted
4984d6a339 Merge "msm: camera: csiphy: Add logic to program common register" into camera-kernel.lnx.5.0 2021-01-20 15:35:46 -08:00
Savita Patted
c1bb25bf74 Merge "msm: camera: common: Add cam_free_clear to cam_compat" into camera-kernel.lnx.5.0 2021-01-20 15:34:08 -08:00
Haritha Chintalapati
c80432f5b3 Merge "msm: camera: flash: Fix if statement indentation" into camera-kernel.lnx.5.0 2021-01-19 15:07:06 -08:00
Haritha Chintalapati
597806fe2b Merge "msm: camera: sensor: support for OIS FW init settings" into camera-kernel.lnx.5.0 2021-01-19 15:06:53 -08:00
Jigarkumar Zala
da9abb515c msm: camera: csiphy: Add logic to program common register
All csiphy hw common register need to program on first streamon
from any of csiphy hw in order to reduce the noise interferance
for other csiphy hw.

CRs-Fixed: 2839793
Change-Id: I256307b8b909da4a940be25a3aab60e8a301b6f8
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-01-15 18:58:52 -08:00
Jigar Agrawal
7adee41eee msm: camera: sensor: Add support to hold sensor name
Add support for the new version a sensor probe
structure to hold the sensor name information
along with the existing informations.

CRs-Fixed: 2856300
Change-Id: Ib195455fbfe02b8d4035105bc6958d11c2a0faf6
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-01-15 18:25:13 -08:00
Jigarkumar Zala
d82b260384 msm: camera: cci: Increase queue size for burst write mode
Currently for i2c burst write half the depth of the queue
is utilized which can cause delay in the overall operation
when data size is large that needs to be operated.
Also currently execute command is being programmed after
every 4 bytes/1 word. CCI hw can execute 12 bytes/3 words
together, so align the execute word with 12bytes/3 words
to reduce the processing for CCI hw and better performance.

CRs-Fixed: 2856297
Change-Id: I77e3ae8f6454037a7a100ae6b911ac37e19aa8b7
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-01-15 13:50:01 -08:00
Karthik Jayakumar
2c67e897da msm: camera: common: Add cam_free_clear to cam_compat
Kernel 5.10 and up have renamed kzfree to kfree_secure. As such,
we have added a cam_free_clear function to redirect all uses of kzfree
uses to the appropriate function depending on the kernel version the
driver is built against.

CRs-Fixed: 2835738
Change-Id: I72d191c9fb0454a4dbb1392894a909e81fe07caa
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-15 08:55:04 -08:00
Karthik Jayakumar
e59f8a5375 msm: camera: flash: Fix if statement indentation
If statement was incorrectly indented one level too deep.
This causes clang warning to be triggered during compilation.

CRs-Fixed: 2835738
Change-Id: I242b68b134eb5665a5b189d2cc430ecc385f0df3
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-12 11:06:27 -08:00
Sureshnaidu Laveti
7e79ba1cd7 msm: camera: sensor: support for OIS FW init settings
Add support for writing OIS firmware init settings
before loading OIS firmware.

CRs-Fixed: 2805891
Change-Id: I5aada8fba0d97866e13925dcadff9edca03d77c3
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
2021-01-12 04:41:33 -08:00
Karthik Jayakumar
c69ede622c msm: camera: common: Migrate dt-bindings to techpack
To support external module compilation on Waipio, camera dt-bindings header
files need to be moved out of kernel SI and into the camera-kernel vendor SI.
This is to maintain seperation between the two SI's.

CRs-Fixed: 2835738
Change-Id: I8d63b48b6d406ed7b4a07f3bd4f1721ecd2dd0b0
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-11 10:11:37 -08:00
Jigar Agrawal
c8ff7a3c9f msm: camera: csiphy: Update the csiphy programming sequence
Update the csiphy2.1.0 programming sequence for the update
on 11/19/2020.

CRs-Fixed: 2833124
Change-Id: Ie5c00423bc9dea42996108eeb6722ec975ca065f
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-12-22 11:05:57 -08:00
Anil Kumar Kanakanti
d87d172bde msm: camera: cci: Fix logic to update cci clk freq
When multiple frequency slaves running on a same I2C bus,
then there is a chance of overriding I2C bus frequency
even if another I2C operation is running. This could lead
to CCI timeout at driver level. Updated synchronization logic,
to properly update I2C clock frequency, only when no other
I2C operation running.

CRs-Fixed: 2815310
Change-Id: Ia341d7cda118497bf1acea8ea59f7f03124f31c3
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2020-12-01 17:55:35 +05:30
Haritha Chintalapati
9efbca83e5 Merge "msm: camera: sensor: Reset actuator flush requestId" into camera-kernel.lnx.4.0 2020-11-23 16:54:35 -08:00
Sureshnaidu Laveti
6bbdcb3f6d msm: camera: sensor: Reset actuator flush requestId
When camera module shut down happens reset the
last flush request ID for the new session to
continue as fresh start.

CRs-Fixed: 2822543
Change-Id: Ic5b43d7acaeb7e7b6999c02cbb4654598469638b
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
2020-11-20 12:00:36 -08:00
shiwgupt
60a0d836da msm: camera: csiphy: CSIPHY DPHY DeSkew Calibration
- Disable skew calibration by default for CSIPHY.

- When last bits of data are 0, Sensor flips data to static 1 in HS-Trail.
This creates a false calibration header in HS-Trail period depending on
last bits of data.

CRs-Fixed: 2777521
Change-Id: I285f74652cc3c8b74e280e7edfb92eb4661d2692
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2020-11-16 18:38:10 +05:30
Chandan Kumar Jha
50e3fc5c42 msm: camera: isp: Fixing KW errors
Fixes KW errors for ISP.

CRs-Fixed: 2813979
Change-Id: I5b09b1c5a678352c2f2d467c6e8bbf587c1f8e35
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2020-11-06 15:43:00 +05:30
Haritha Chintalapati
4afd2d107d Merge "msm: camera: cci: Add back mutex on cci" into camera-kernel.lnx.4.0 2020-11-02 15:28:50 -08:00
Camera Software Integration
bd56b374d0 Merge "msm: camera: sensor: Rename the dtsi entry to avoid the predefined string" into camera-kernel.lnx.4.0 2020-10-28 13:28:52 -07:00
Camera Software Integration
02d480f026 Merge "msm: camera: utils: Add option to not set src clk rate" into camera-kernel.lnx.4.0 2020-10-28 13:27:46 -07:00