Commit Graph

57 Commits

Author SHA1 Message Date
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
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
Trishansh Bhardwaj
35bead08c3 msm: camera: common: Fix compilation issues for 32-bit arch
Fix improper use of divide and modulo operator on 64 bit numbers.
Fix variable type to work with both 32/64 bit arch.

CRs-Fixed: 2543730
Change-Id: Ifa52d46dece3434d41308d284982a0cd8e17cd1b
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-21 15:46:03 -07:00
Shravan Nevatia
3205f18e3c msm: camera: csiphy: Enable multi-datarate support for csiphy v1.2
Enable support for multiple data rates (2.5/3.5/4.5 Gsps)
for csiphy v1.2 driver.

CRs-Fixed: 2542855
Change-Id: Idbe299aca210e30d732304e77e2a8191c8809f09
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-10-21 15:44:13 -07:00
Shravan Nevatia
83aa86fe79 msm: camera: csiphy: Sensor: Update cphy 3-phase registers for lito
Update register settings for CPHY mode as per
the latest HPG (revision H).

CRs-Fixed: 2534885
Change-Id: I4caade811792467ef7f3eeba85c4a4f5b9050b11
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-10-02 13:09:18 -07:00
Jigarkumar Zala
3aac10c09f msm: camera: sensor: Update the flash init structure
Currently there is mismatch of the cmd type byte position for the
flash init structure, which casue the cmd type parsing failure
for early PCR. This change move to cmd type to sixth byte to
support the unificaiton with other flash uapi structures. Also,
update respective header change with respect to uapi change.

CRs-Fixed: 2432102
Change-Id: Ic4899b483b35013c5ad77a8894eb3bb4831de811
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-09-21 22:16:15 -07:00
Shravan Nevatia
36765c90e8 msm: camera: csiphy: Update combo-mode dphy registers for csiphy 1.2
Update register settings for combo-mode dphy
to fix UNBOUNDED_FRAME csid error observed on
combo-mode sensor.

CRs-Fixed: 2521347
Change-Id: I363ad48fc534aa95cc810bf03a0e4704aff6d07b
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-09-19 13:28:28 -07:00
Karthik Anantha Ram
b8e35c3397 msm: camera: common: Update AHB vote for camera drivers
As part of cpas start, all drivers will now request for
LOW_SVS as opposed to SVS. The drivers also scale the AHB
vote based on the corresponding HW's src clk voltage.

CRs-Fixed: 2507919
Change-Id: I7fd35e9dd298deb1603812f39d50e4e9390b3aac
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-09-16 15:11:42 -07:00
Shravan Nevatia
9653879d63 msm: camera: csiphy: Update dphy 2-phase registers for lito
Update register settings for 2-phase and 2-phase combo mode dphy
as per hpg.

CRs-Fixed: 2505587
Change-Id: I348c1ee3b5618e1439ab87cc33f366eda89f0f82
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-09-06 13:41:23 -07:00
Shravan Nevatia
6d4c852953 msm: camera: csiphy: Update cphy 3-phase registers for lito
Update register settings for 3-phase cphy operation as per hpg.

CRs-Fixed: 2505587
Change-Id: Ib9392f8055f7b74044edb9634d705b9c92b0ec0d
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-09-06 13:39:49 -07:00
Karthik Anantha Ram
7c65c0fa21 msm: camera: common: Clean shutdown and page fault sequence
Avoid unnecessary logging during shutdown and pagefault
in camera drivers.

CRs-Fixed: 2500721
Change-Id: I2519d45da134306f906186dc25705fc1f84b1972
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-22 10:02:16 -07:00
Depeng Shao
3b1e74e59b msm: camera: eeprom: Release the mutex even though got error
Release the mutex even though got error.

Change-Id: Iaeec418ce7db4623cede6c922869c6f8c69ab595
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-11 02:10:03 -07:00
Jigarkumar Zala
5b016ad220 Camera: Correct makefiles for correct header inclusion
Correct some Makefiles and drivers header inclusion.

Change-Id: Iec3e6e0333ae55e8f1cff9780723e0dad954ff83
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-09 16:27:18 -07:00
Trishansh Bhardwaj
45125cf020 msm: camera: Fuse base secure camera enablement
Query secure camera capability from fuse, and enable only
if supported.

Change-Id: I4ff3c5afbf7c924368c95af5517a047149124c3e
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:59 -07:00