Commit Graph

49 Commits

Author SHA1 Message Date
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
Jigarkumar Zala
a89607a875 Camera: sensor: Power off the sensor if no gpios
Power off the sensor if no gpios at the time of power on, since
some regulator and clk need to be released.

Change-Id: Ie200459276b5327a1627e8839ec404c3c26f4205
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:51 -07:00
Jigarkumar Zala
326d40f7f1 msm: camera: eeprom: Increase memory map count
For write operation while read memory memptr should not need to increase as
it leads to crash. This change removes that increase opertion. Also,
increasing map count to support more data reading for eeprom.

Change-Id: Ie71deb225c2513e7c18229d174a9a0e129fdd1f7
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-09 10:34:20 -07:00
Jigarkumar Zala
146826aa41 msm: camera: eeprom: Fix OOB condition for memory map count
Fix OOB check for memory map count to access correct memory map.

Change-Id: Ifa3d323103725e4df57e86295bb7567835654b71
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-09 10:34:15 -07:00
Jigarkumar Zala
391b3fa3d6 msm: camera: Update csiphy settings for lito
Update the register settings for CPHY 3phase.

Change-Id: I5cdc5cd348f9f861215206c59e674efdcdc7159c
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2019-07-09 10:33:45 -07:00
Jigarkumar Zala
f8b0159a3e msm: camera: Update dynamic clock voting for csiphy
Update the clock voting, datarate settings for
csiphy version 1.2.2.

Change-Id: I7b08819c1918d2eeec530733d42828e092bf2aa9
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2019-07-09 10:33:41 -07:00
Jigarkumar Zala
40047f58df msm: camera: core : Validate the dev name during the node ioctl handler
Validate the context device name with node name. If device name is
not matching return the error.

Change-Id: I8dee4e6f64e17b0d1e486077a2c8b0df562a702e
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2019-07-09 10:33:30 -07:00
Jigarkumar Zala
05349feaa2 Camera: Bring over camera driver changes
Bring over camera driver changes as of msm-4.19
commit  5a5551a7 (Merge "msm: camera: reqmgr: Fix CRM
shift one req issue").

Change-Id: Ic0c2b2d74d1b3470c1c51d98228e312fb13c501a
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-08 10:24:55 -07:00