Commit Graph

69 Commits

Author SHA1 Message Date
Jigarkumar Zala
438fc6a877 msm: camera: common: Enabling EOF support for flash
New usecase for flash driver requires to be trigger at EOF.
This change adds the new operation code support in flash
driver along with EOF enable support in crm and across
other drivers. Also to improve the performance, this change
adds the logic to dynamically update the subscribe event to
CRM, so that CRM can enqueue EOF events when Flash or any other
device add the request for EOF.

CRs-Fixed: 2633194
Change-Id: I2f68ac7fc6a4699debd39b64319728cdf17bbcfa
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-03-20 11:02:03 -07:00
Camera Software Integration
57345c972a Merge "msm: camera: cci: Add hardware index in dumps" into camera-kernel.lnx.4.0 2020-03-19 15:30:51 -07:00
Camera Software Integration
64c7aa1d84 Merge "msm: camera: eeprom: Correct EEPROM Read return" into camera-kernel.lnx.4.0 2020-03-16 16:38:39 -07:00
Shankar Ravi
624a05a102 msm: camera: eeprom: Correct EEPROM Read return
EEPROM Read using QUP I2C returns the number of bytes
read from the EEPROM, While CCI/SPI returns zero value.
Return Error only when if the value is less than zero.

CRs-Fixed: 2617882
External Impact: No
Change-Id: I9a9674366c10de4efce779f75dd36b293838c47b
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2020-03-12 11:10:15 -07:00
Depeng Shao
d500bda747 msm: camera: sensor: Turn off the flash while flushing
Turn off the flash while flushing if the flushed request
turns off the flash.

CRs-Fixed: 2576732
Change-Id: I546fc6b6ee79f492af905d163515eb19eed78f41
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-03-12 11:07:59 -07:00
Haritha Chintalapati
3d02c7f405 Merge "msm: camera: sensor: Update maximum supported camera id" into camera-kernel.lnx.4.0 2020-03-03 14:20:43 -08:00
Haritha Chintalapati
bcc4402eed Merge "msm: camera: sensor: Update I2C read/write size" into camera-kernel.lnx.4.0 2020-03-03 14:20:31 -08:00
Camera Software Integration
695e073072 Merge "msm: camera: common: Fix failures in v4l2 unregister during error" into camera-kernel.lnx.4.0 2020-03-02 15:05:39 -08:00
Karthik Jayakumar
a6a80b5c2b msm: camera: sensor: Update I2C read/write size
Update I2C read and write capability to 10kb.

CRs-Fixed: 2584631
Change-Id: Iffffb18ad79a5492df2ca0aa0f1411ae67cb92cc
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-02-28 17:06:52 -08:00
Mukund Madhusudan Atre
0a649b3063 msm: camera: common: Fix failures in v4l2 unregister during error
Missing video unregister was causing list delete corruption.
Also, there were double free errors in Sync and CRM driver. Fix
v4l2 issues by adding the missing unregister calls and changing
release callback to empty, because we are freeing it during
cleanup. Improve logging during bind/unbind to better reflect what
is happening.

CRs-Fixed: 2584631
Change-Id: Idc5db655d22df54e8bdb470d29896e10f6987796
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-28 16:02:56 -08:00
Karthik Jayakumar
3ba88cc32f msm: camera: sensor: Update maximum supported camera id
Updates maximum number of supported camera id to 9

CRs-Fixed: 2584631
Change-Id: I00a595d784b38030a7996a8da930ecdeaf05835c
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-02-28 16:00:52 -08:00
Venkat Chinta
fce521db94 msm: camera: cci: Add hardware index in dumps
This change adds hardware index to register dump.

CRs-Fixed: 2632034
Change-Id: Ibdd96d4f9f7a99c71118950fc0ee0b8aec9a7340
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-28 11:28:11 -08:00
Mukund Madhusudan Atre
ac6f8eeb6d msm: camera: flash: Add qti flash support in camera
Add support for qti flash along with updated max current DT
property. Remove support for enable/disable regulator as it
is no-op since a long time.

CRs-Fixed: 2584631
Change-Id: I3305e7b6e4d6ef34d90d38f5f25cfa5b8b817f8b
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-27 14:17:13 -08:00
Mukund Madhusudan Atre
4e5ffd3ce0 msm: camera: cci: Add device managed alloc to balance free in remove
The devm_kfree call in remove is unbalanced without a devm_kzalloc.
Add required kzalloc and free during probe to balance it.

CRs-Fixed: 2584631
Change-Id: I14164405e62036f7918b858d978afe454e4feb4a
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-16 23:16:11 -08:00
Tony Lijo Jose
37b7384396 msm: camera: csiphy: Update phy sequence for bengal
Toggle reset register  in common and reset programming sequence.

CRs-Fixed: 2615460
Change-Id: Iba17fa3b2014be0bc27236169cf8456a7f8ededd
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-02-12 12:24:00 -08:00
Camera Software Integration
fe0a027a67 Merge "msm: camera: csiphy: Add combo phy settings for csiphy v1.2.2.2" into camera-kernel.lnx.4.0 2020-02-11 13:37:16 -08:00
Camera Software Integration
ba20c111ed Merge "msm: camera: common: Add component helper support in camera" into camera-kernel.lnx.4.0 2020-02-07 15:13:17 -08:00
Mukund Madhusudan Atre
5cb000ee7f msm: camera: common: Add component helper support in camera
Due to the asynchronous nature of platform probes, inter
dependency between drivers needs to be taken care during
kernel boot up. Component helper provides the facility of
adding matching drivers in a list ordered in the way we want
to bind those drivers. The CRM driver acts as component master
to make sure all slave drivers are bound before it returns
from its own bind call. Add support for serializing platform
probes through component framework.

CRs-Fixed: 2584631
Change-Id: I345da1d2b9cccf6021ac6fc899143013b7714ec4
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-05 22:58:13 -08:00
Jigarkumar Zala
fdb9ade9a8 msm: camera: sensor: Notify completion in error case
There is no need to wait till timeout in case of NACK or
underflow error irq is raised, so notify thread for rd_done
completion. Also, correct the error mask to catch the NACK
error for Master 1.

CRs-Fixed: 2598605
Change-Id: Ib8a16ee119dd81f1384283ac7e9f82d3ac2588bb
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-02-05 14:06:00 -08:00
Shravan Nevatia
b68a69b788 msm: camera: csiphy: Add combo phy settings for csiphy v1.2.2.2
As per HPG revision L, there's a difference in the DPHY combo-mode
sequence settings between lito v1 and v2. This change adds a
separate sequence for lito v2, csiphy version 1.2.2.2.

CRs-Fixed: 2591712
Change-Id: Ic535bd2c98f47c33aa689d0e1bfe07d7dac8d9a2
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-02-05 10:50:30 -08:00
Camera Software Integration
d8b3b0fb80 Merge "msm: camera: sensor: Add Init setting retry in case cci is resetting" into camera-kernel.lnx.4.0 2020-02-04 15:18:05 -08:00
Camera Software Integration
139893ac96 Merge "msm: camera: sensor: Fix an operator error" into camera-kernel.lnx.4.0 2020-02-04 15:09:59 -08:00
Camera Software Integration
56a3afaca6 Merge "msm: camera: csiphy: Update common sequence for csiphy v1.2" into camera-kernel.lnx.4.0 2020-02-03 14:08:33 -08:00
Jigarkumar Zala
043c37f2b4 msm: camera: sensor: Add Init setting retry in case cci is resetting
If any subdev is reporting Nack, cci hardware gets into resetting.
During resetting if sensor tries to apply Init setting, it fails.
This change adds retry for INIT setting to reapply after sometime.

CRs-Fixed: 2598605
Change-Id: Iff13014d74abe6aebaec6cd428811de9d865f090
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-01-30 13:43:23 -08:00
Depeng Shao
9303d3ae02 msm: camera: sensor: Fix an operator error
- Fix an operator error in cam_sensor_flush_request

CRs-Fixed: 2591694
Change-Id: I39a8b29f83db55d2a930dd5ccd2b765517e2c1d6
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-01-30 13:32:10 -08:00
Shravan Nevatia
9fdce6ca87 msm: camera: sensor: Add null check for read buffer
Add proper null checks for function arguments,
including read buffer, before dereferencing them.

CRs-Fixed: 2581538
Change-Id: I8c49bbc419e2ac5579341c7dc789da0ed1c4d123
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-01-30 04:57:29 -08:00
Shravan Nevatia
bf16c8a8e5 msm: camera: csiphy: Update common sequence for csiphy v1.2
Add a high-to-low transition in the CTRL0 register
during the common power-up sequence.

CRs-Fixed: 2580437
Change-Id: I66541d3d787fa2f161e5d8e647fb11c8075a1947
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-01-30 03:32:39 -08:00
Tony Lijo Jose
832ac63b18 msm: camera: cci: Correct the queue size for cci version 1.2
Correct the queue size for cci version 1.2 as below,

1. Queue 0 size = 64.
2. Queue 1 size = 16.

CRs-Fixed: 2594541
Change-Id: Ifc9407427fe2bf0996c77dc00c5dfe7e5ba22140
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-01-16 17:45:47 +05:30
Camera Software Integration
c78ecfbf11 Merge "msm: camera: sensor: Add support fo multiple regulator sources" into camera-kernel.lnx.4.0 2020-01-13 20:37:42 -08:00
Jigarkumar Zala
737f25e611 msm: camera: sensor: Add CPHY and DPHY bringup sequence
Add 3phase and 2phase_mission/combo mode sequence for
lahaina target.

CRs-Fixed: 2584631
Change-Id: Id2e207e46544e3f7d361803814eec725d28c3702
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-01-09 16:21:59 -08:00
Jigarkumar Zala
b8d55f649d msm: camera: sensor: Add support fo multiple regulator sources
Currently image sensor need single source of the regulator per
category. Some sensor needs extra analog voltage for the functionality,
which require to draw power from multiple voltage regulator sources.
This change extends supports to add multiple voltage sources for
analog voltage.

CRs-Fixed: 2584631
Change-Id: I2d76cfb0fb971758c0d596ffd543aa3926a8886d
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-01-08 09:38:48 -08:00
Elliot Berman
10891f6916 msm: camera: utils: Migrate SCM calls
Migrate secure world calls to qcom scm driver.

CRs-Fixed: 2564857
Change-Id: I8eb7498e4f80ff7ac1e22b7dcd364048e5338746
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 19:53:56 -08:00
Jigarkumar Zala
03b6c2140f msm: camera: common: Make platform register centralized
Currently camera modules platform registration/remove function
is being called as a part of module_init function individually.
Building camera as module, current infrastructure cannot support
it, as DLKM only support single module_init/exit function.
This change enables that support by combining all platform
entry/remove functions centrally. Also, remove all submodule
makefiles and combined into one root makefile in order to generate
single kernel object file to dynamically loading the kernel module
in case of DLKM compilation.

CRs-Fixed: 2569808
Change-Id: I59db3ed6cef60123e474db2f222c39836056bd6e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 12:33:01 -08:00
Jigarkumar Zala
6283836b38 msm: camera: sensor: Replace cma_alloc with vmalloc
Replace cma_alloc() api with vmalloc() in order to accommodate
kernel upgrade and DLKM/Builtin support.

CRs-Fixed: 2572607
Change-Id: If8caaefe5ac333998bd8c4868f16e586ee749e8a
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-12-03 12:19:37 -08:00
Abhijit Trivedi
a15be98002 UPSTREAM: 11/22/19: Merge 'quic/camera-kernel.lnx.1.0' into 'quic/camera-kernel.lnx.4.0'
* quic/camera-kernel.lnx.1.0::
  msm: camera: sensor: Support for read operation
  msm: camera: req_mgr: Fix kmem_cache definition
  msm: camera: custom: Add support for acquire_hw_v1
  msm: camera: core: Prevent crash on kref_put
  msm: camera: isp: csid hw register reset with IRQ
  msm: camera: isp: Reset overflow pending flag in start hw
  msm: camera: icp: Increase MAX_PKT_SIZE_MSGQ for ICP
  msm: camera: icp: icp debug improvement
  msm: camera: reqmgr: Improve master slave sync
  msm: camera: isp: Notify CRM to pause SOF timer after flush
  msm: camera: csiphy: Fix csiphy v1.2 skew calibration settings
  msm: camera: csiphy: Update reset sequence for csiphy v1.2
  msm: camera: csiphy: Update registers for CSIPHY v1.2
  msm: camera: reqmgr: Change v4l2 notify error log type
  msm: camera: isp: Set device enable flag after enable csid hardware

Change-Id: I52c682b36583436425d157c8927e6fbcf5bf32eb
Signed-off-by: Abhijit Trivedi <abhijitt@codeaurora.org>
2019-11-22 17:42:17 -08:00
Sureshnaidu Laveti
50e83233ad msm: camera: sensor: Support for read operation
Supporting read operation for sensor and
sub modules OIS and actuator.

CRs-Fixed: 2538801
Change-Id: I83ad154dd577d5a664c4d68792a90489e725fbfd
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
2019-11-20 14:53:14 -08:00
Shravan Nevatia
313a84b808 msm: camera: csiphy: Fix csiphy v1.2 skew calibration settings
Correct the skew calibration register settings
in the DPHY sequence for csiphy v1.2.

CRs-Fixed: 2563037
Change-Id: Idd97600b66dd00ff67db902dbd9d649aa005b4ec
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-11-14 03:39:07 -08:00
Camera Software Integration
f123cac5fc Merge "msm: camera: csiphy: Update reset sequence for csiphy v1.2" into camera-kernel.lnx.1.0 2019-11-13 05:45:32 -08:00
Camera Software Integration
09d233978c Merge "msm: camera: csiphy: Update registers for CSIPHY v1.2" into camera-kernel.lnx.1.0 2019-11-13 05:45:23 -08:00
Abhijit Trivedi
9b6110b579 UPSTREAM: 11/12/19: Merge 'quic/camera-kernel.lnx.1.0' into 'quic/camera-kernel.lnx.4.0'
* quic/camera-kernel.lnx.1.0:
  msm: camera: common: Update uapi to support custom hw features
  msm: camera: ife: calculate accurate boot timestamp at CSID SOF
  msm: camera: cpas: Update ife_rd safe lut value
  msm: camera: sensor: Remove true/false redefinitions
  msm: camera: reqmgr: Add support to modify timer for long exposure
  msm: camera: reqmgr: Add provision to obtain exposure time
  msm: camera: cpas: Fix TCSR Register programming
  msm: camera: cci: Fix cam_cci_get_subdev for conditional compilation
  msm: camera: utils: Remove deprecated clk_set_flag functions
  msm: camera: csiphy: Update DPHY combo mode sequence
  msm: camera: csiphy: Correct Dphy mission mode sequence
  msm: camera: core: Fix extraneous variable declaration
  msm: camera: icp: Remove qcom soc dependency
  msm: camera: sync: Dump fence info in case of fence exhaust
  msm: camera: icp: Use CAM_PERF for clock, bw related logs
  msm: camera: common: va_end should follow va_start
  msm: camera: common: Fix integer overflow in shift
  msm: camera: reqmgr: Remove division on uint64_t
  msm: camera: isp: Improve isp substate logging
  msm: camera: isp: Limit sof_in_epoch log to first frame
  msm: camera: jpeg: Add plane stride & slice height debug info
  msm: camera: isp: Change state immediately in flush
  msm: camera: isp: Dump isp req for cdm timeout
  msm: camera: ife: Add packing format support
  msm: camera: icp: Fix AHB, AXI voting in icp
  msm: camera: ife: Remove duplicate add to port counters
  msm: camera: csiphy: Update CPHY 3-phase registers for CSIPHY v1.2

Change-Id: I93948d5cfcf2c8dea921d34696456490abd6f1e5
Signed-off-by: Abhijit Trivedi <abhijitt@codeaurora.org>
2019-11-12 12:51:34 -08:00
Camera Software Integration
59f2100a95 Merge "msm: camera: cci: Fix cam_cci_get_subdev for conditional compilation" into camera-kernel.lnx.1.0 2019-11-12 05:43:21 -08:00
Camera Software Integration
79ba868415 Merge "msm: camera: sensor: Remove true/false redefinitions" into camera-kernel.lnx.1.0 2019-11-12 05:42:59 -08:00
Shravan Nevatia
97c65b5ff3 msm: camera: csiphy: Update reset sequence for csiphy v1.2
Add a transition of 1 to 0 in the PHY reset register
during the PHY reset sequence to fix UNBOUNDED_FRAME
errors for CPHY sensor.

CRs-Fixed: 2563019
Change-Id: I019e4cfdfa2042416e62b306dca0448d6a05c3b8
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-11-11 22:42:19 +05:30
Shravan Nevatia
8acdfccd85 msm: camera: csiphy: Update registers for CSIPHY v1.2
Update register settings for CPHY/DPHY/combo DPHY
modes as per the latest HPG (revision J).

CRs-Fixed: 2563037
Change-Id: I137141a490bedce4632991e5eb12887d0c9fa30e
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-11-11 07:03:47 -08:00
Karthik Jayakumar
fd1db0292d msm: camera: sensor: Remove true/false redefinitions
Remove defines in header files that redefine true and false.

CRs-Fixed: 2556282
Change-Id: Ibf87f35efd403faa05e72b070dcfca59e0196a29
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-06 15:59:34 -08:00
Karthik Jayakumar
524b1ab1d4 msm: camera: config: Makefile fixes to support legacy kernel build system
Adds fixes to makefile in order to support legacy kernel build systems.

CRs-Fixed: 2560543
Change-Id: Iab571871e5171aab501c41496cc09e3c5d942985
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-06 13:26:57 -08:00
Karthik Jayakumar
b46dcb39c4 msm: camera: cci: Fix cam_cci_get_subdev for conditional compilation
Fixes cci_get_subdev to return NULL or computed value depending on
camera driver configuration.

CRs-Fixed: 2554484
Change-Id: I79933ddf28e2c0d23739308b57b5b40d3b56d78e
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-05 12:18:13 -08:00
Jigarkumar Zala
335b376e21 msm: camera: csiphy: Update DPHY combo mode sequence
DPHY combo mode bring up sequence is missing with some
important register settings. Correct and update required
register setting to bringup DPHY combo mode.

CRs-Fixed: 2545921
Change-Id: I1dfb71f1775aa6d6b1173a7de7f14ce74eac08e1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-11-01 16:22:07 -07:00
Jigarkumar Zala
93a5aef818 msm: camera: csiphy: Correct Dphy mission mode sequence
DPHY mission mode sequence is not full functional for
mission mode. Correct and add mandate register settings
for the bringup of DPHY mission mode.

CRs-Fixed: 2545921
Change-Id: Ia1bbf496c5aa993cf0e404c81f7b69b7b889c6f1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-11-01 16:20:15 -07:00
Shravan Nevatia
faf5312211 msm: camera: csiphy: Update CPHY 3-phase registers for CSIPHY v1.2
Fix CSI_EXTRA_CTRL12 CPHY 3phase registers as per
the latest HPG (rev. H).

CRs-Fixed: 2542855
Change-Id: I6c2fbc66df52db71c454c86ee894c05d12e0dead
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-10-23 15:45:37 -07:00