Commit graph

272 commits

Author SHA1 Message Date
Trishansh Bhardwaj
cb2e8943da msm: camera: tfe: Add support to TFE driver
TFE is thin front end hardware that capture and process the
real time image. Support is added to enable the TFE
hardware.

CRs-Fixed: 2594541
Change-Id: I0ab2eff7924e9e01f6a0fcec772d3a7dda229b37
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:42 +05:30
Abhilash Kumar
4fddce3d69 msm: camera: cdm: Correct bitvalue for burst enable
The bit corrresponding to enabling burst is 4th bit.
This change fixes its value by assigning the same.

CRs-Fixed: 2594541
Change-Id: Ibeec3fd4460f9040255fa77f60fd565aed824c1c
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:42 +05:30
Trishansh Bhardwaj
d907c2c7cb msm: camera: cdm: Add support for different CDM hardware
Different CDM hardware have different capability and registers.
With old register space, handling new features and operations
would have been a complex task. This change takes care of old
version of CDM and also changes the regspace to provide every
register's access to CDM.
This change further adds support for "arbitration" in case of
multi-context CDMs.
Exports reset functionality to clients, detection of CDM hang.
Flushing the CDM requests and dumping the FIFO content for all
contexts.
It also adds submitting "debug_gen_irq" as BL_done IRQ is only
an indication for availability of FIFO's. The AHB operations
are completed can only be known if the added "debug_gen_irqs"
gets executed and are received by the CDM.

CRs-Fixed: 2594541
Change-Id: I9846b1c5320ba652c5d3b7d83d616d2dabc843e1
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:41 +05:30
Trishansh Bhardwaj
4aad75a2f9 msm: camera: ope: Support 32 bit arch
Update datatypes to work with 32 bit kernel.

CRs-Fixed: 2594541
Change-Id: I72d628152134770d7e09c3684443e25c47d9d1dc
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:41 +05:30
Trishansh Bhardwaj
3bbd97274f msm: camera: cpas: Add support for Bengal camnoc
Bengal has different version of camnoc which requires
separate register space and camnoc interface changes.
This change adds the same.

CRs-Fixed: 2594541
Change-Id: I2a8e6cb8894444cb669ab1c4da5fa706dc6543ad
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:22 +05:30
Trishansh Bhardwaj
2c76e695e3 msm: camera: isp: Move the ife hw manager resource to isp hw manager
Hardware manager resource is generic. Move the resource definition
to isp hw manager so that it can be used by other hw manager.
Remove the parent and child graph in the hardware manager resource
as it is not used. Use the common isp resource type everywhere.

CRs-Fixed: 2594541
Change-Id: I41d49af0855f3bd3768450d850b1284ff1e3fea9
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 15:01:40 +05:30
Trishansh Bhardwaj
41533c5eb2 msm: camera: ope: Corrected batch mode and stripe for ope
Corrected the striping creation for non real time device.
Disabled the ope stripe base bus. Corrected the batch mode
creation for ope bus read.

CRs-Fixed: 2594541
Change-Id: I87adbab25b84d74162a6a8ce2db1412a6d9058d0
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-15 14:38:50 -08:00
Trishansh Bhardwaj
a46b9bff7a msm: camera: ope: Add dynamic clock support
Dynamic clock and bandwidth support is added to
OPE.

CRs-Fixed: 2594541
Change-Id: Ib53ec47c7074f01f1bb55e17c97e5dacc550a129
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-15 14:38:25 -08:00
Trishansh Bhardwaj
12d9311463 msm: camera: ope: Add support to OPE driver
OPE is camera offline engine, support is added
to enable camera OPE hardware.

CRs-Fixed: 2594541
Change-Id: I65c69f5763d05abf265b645b09c95c55fb290182
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-15 14:37:54 -08:00
Camera Software Integration
b7cfa8b7b0 Merge "msm: camera: config: Fix lahaina configuration" into camera-kernel.lnx.4.0 2020-01-13 20:42:35 -08:00
Camera Software Integration
0d6ddf1963 Merge "msm: camera: isp: Add hw version checks and dt match string" into camera-kernel.lnx.4.0 2020-01-13 20:38:30 -08:00
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
Camera Software Integration
4fe0b90fd0 Merge "msm: camera: ife: Sync master and slave IFE" into camera-kernel.lnx.4.0 2020-01-13 20:36:59 -08:00
Camera Software Integration
879fdfcb47 Merge "msm: camera: reqmgr: Change subdev register logic in camera req manager" into camera-kernel.lnx.4.0 2020-01-13 20:36:05 -08:00
Karthik Jayakumar
7b1dc04866 msm: camera: config: Fix lahaina configuration
Top-level Makefile doesn't export techpack configs.
As such, we must revert to generating our own conf.h file instead of
relying on autoconf.h. This has the side-effect of not allowing
IS_REACHABLE/IS_ENABLED macro's from working on configs enabled within
a techpack.

CRs-Fixed: 2584631
Change-Id: I9c35b305b81c5a6a6892ca87ace9f69192fcca5b
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-01-10 14:48:45 -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
Mukund Madhusudan Atre
17bedd020e msm: camera: utils: Fix bus client register for icc
The common data containing src and dst bus IDs necessary
for bw voting is fed incorrectly. Fix passing of bus IDs
for registering bus clients to be valid values.

CRs-Fixed: 2584631
Change-Id: Ifee3a5ac345cf8df5cb775f5af633d8e146842d9
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-01-09 15:56:10 -08:00
Mukund Madhusudan Atre
80ccf69ac9 msm: camera: reqmgr: Change subdev register logic in camera req manager
Due to deferred probes being dpendent on request manager to register
v4l2 subdev, failures are seen if probes are delayed. Change logic
for subdev registration to avoid failures due to delay.

CRs-Fixed: 2584631
Change-Id: Ia01d5d27ff6a6e6dbbb8e3b25b9aa53ac2fa9e38
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-01-09 12:05:56 -08:00
Vishalsingh Hajeri
4a019e7828 msm: camera: uapi: Add flags for additional IFE HW
As part of acquire HW, kernel passes the IFE hw_idx to
userspace. This change will enable the capability to pass
the hw_idx of additional IFE HW enabled.

CRs-Fixed: 2582959
Change-Id: I689b99d021c8d0f3440e46d09a5dcda3daaefcfc
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-01-08 16:50:53 -08:00
Vishalsingh Hajeri
423e6d195c msm: camera: ife: Sync master and slave IFE
Program hw_sync_sel field in core_cfg register
in case of dual ife.

CRs-Fixed: 2582959
Change-Id: I8a60cb06991738872c4caf0120ea21e5954d208a
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-01-08 16:47:03 -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
Mukund Madhusudan Atre
eef5866053 msm: camera: isp: Add hw version checks and dt match string
The platform register requires dt match string for csid to probe
and correct cpas hw version is required for vfe to function. Add
dt match strings and hw version checks in csid and vfe.

CRs-Fixed: 2584631
Change-Id: Ieb2766fa6243bf4133b43f657a18aed7f04447be
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-01-07 15:26:28 -08:00
Gaurav Jindal
7d7ed34560 msm: camera: isp: Change master slave combination for dual IFE
For some targets, there is a requirement to have the lower IFE
as master. Current implementation selects the higher IFE as
the master.
This commit changes the acquire logic to reserve the lower IFE
first and then the higher IFE as slave. This logic is for dual
ife use cases. For single IFE use case, acquire logic is not
changed.
Also, removes the hard coded check for master hw index
during the irq  handling. Stores the master hw index
in ife hardware manager context and check against it.

Change-Id: Ifd3a28e80a0a4d16e3d9278b7ed61290c620ec79
CRs-Fixed: 2582959
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-01-02 17:37:20 -08:00
Camera Software Integration
76e75c6067 Merge "msm: camera: memmgr: Add support to disable DelayedUnmap" into camera-kernel.lnx.4.0 2019-12-23 23:04:39 -08:00
Jeyaprakash Soundrapandian
f7cf3781c0 Merge "msm: camera: common: Enable additional IFE hw" into camera-kernel.lnx.4.0 2019-12-23 21:27:38 -08:00
Pavan Kumar Chilamkurthi
74bb0d5750 msm: camera: memmgr: Add support to disable DelayedUnmap
Add interface to umd to give an option whether to
disable Delayed Unamp feature for a given buffer
mapping. DelayedUnmap is enabled by default if
umd doesn't explicitly asks for disable.

CRs-Fixed: 2580128
Change-Id: I66f87a9dbdfc4d9cecdc02eb24c1c670c9985cae
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-23 09:26:54 -08:00
Mukund Madhusudan Atre
42021c8b76 msm: camera: common: Add device caps for full devices during probe
The v4l2 registration requires all devices that are not subdevs
to have device caps field to be non zero. Add device caps for
CRM and SYNC devices during probe.

CRs-Fixed: 2582994
Change-Id: I804e7bc00d597debc39d1f71259cf607c60ed069
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-12-20 17:44:51 -08:00
Vishalsingh Hajeri
4265f73698 msm: camera: common: Enable additional IFE hw
Add IFE2 in UAPI header to return acquired IFE's
hw index to userspace.

CRs-Fixed: 2582959
Change-Id: I42de76453753245376f9a857d5a7de979da78333
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-12-19 17:48:24 -08:00
Venkat Chinta
75f72b30a7 msm: camera: isp: Add header file changes
This commit adds header file changes for version 580 hardware.

CRs-Fixed: 2582959
Change-Id: I14497249db4a09c170215839a788c7477932ff35
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-12-18 20:35:35 -08:00
Mukund Madhusudan Atre
ebbfb4d5db msm: camera: cpas: Fix parsing of static bw values for ICC
The static values for AHB bw do not exceed u32, and using u64
parsing function to read it requires unnecessary device tree
changes. Changing parsing function for bw values from 64-bit
to 32-bit version.

CRs-Fixed: 2584631
Change-Id: Ie7c685fd40a0ee390f997fbe6cf3610c2209e3f1
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-12-16 11:49:59 -08:00
Jigarkumar Zala
60da65a262 msm: camera: config: Add target config to enable compilation
Add lahaina configuration file to enable lahaina targets
compilation.

CRs-Fixed: 2569808
Change-Id: Idc85fd1d19acb4df4f09403d0e8171124489d68d
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-12-04 23:20:01 -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
Karthik Jayakumar
50c8c09ead msm: camera: smmu: Move to ioremap APIs for using FW memory
When loading the camera FW, use the appropriate APIs
depending on the kernel version to map the FW region.

CRs-Fixed: 2564857
Change-Id: I2104b63b54bce799c8e44f36c49042de86f78c7e
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 18:13:10 -08:00
Jigarkumar Zala
8a40a542fd msm: camera: common: Add support for icc and switching bus scaling
Add support for disabling bus scaling by moving bus driver
references from cpas to cam utils. The references can be
switched based on compile time flags in defconfig. Also, add
interconnect support which has bw voting based on source and
destination bus IDs.

CRs-Fixed: 2525881
Change-Id: I2a78523c0cad41503fe32aeb7bf4c794a26b16b6
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-12-04 13:31:29 -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
Jeyaprakash Soundrapandian
2478b5c0f7 Merge "msm: camera: sensor: Replace cma_alloc with vmalloc" into camera-kernel.lnx.4.0 2019-12-03 18:55:23 -08:00
Jigarkumar Zala
6131f8a58e msm: camera: config: Enable module based compilation
Currently all the modules are compiled based on single config flag.
This change adds the capability for module based compilation
with module based config flag for various targets.

CRs-Fixed: 2569808
Change-Id: I054a555db04d1643b9da2d3f409d009c1fb2da9c
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-12-03 13:03:27 -08:00
Jigarkumar Zala
02ac7654b8 msm: camera: utils: Add stub function for cx_ipeak
Add mandate check in order to compile and use the cx_ipeak
related functionality. Also, update header with stub function.

CRs-Fixed: 2572607
Change-Id: I2e07101f88b6a47ca1733d04b3aa126fdeae176b
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-12-03 13:03:27 -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
Jong-Guk Im
9d1a4364ae Merge "msm: camera: tfe: Add uapi support to TFE driver" into camera-kernel.lnx.4.0 2019-12-02 18:04:38 -08:00
Jong-Guk Im
541ad78d4b Merge "msm: camera: ope: Add dynamic clock support for OPE" into camera-kernel.lnx.4.0 2019-12-02 18:04:35 -08:00
Jong-Guk Im
a5c8e960c4 Merge "msm: camera: ope: Add uapi support to OPE driver" into camera-kernel.lnx.4.0 2019-12-02 18:04:28 -08:00
Jeyaprakash Soundrapandian
d642611210 Merge "msm: camera: cpas: Add cpas support for camera v580 platform" into camera-kernel.lnx.4.0 2019-12-02 15:52:25 -08:00
Pavan Kumar Chilamkurthi
6b265f1750 msm: camera: tfe: Add uapi support to TFE driver
TFE is thin front end hardware that capture and process the
real time image. Support is added to enable the TFE
hardware.

CRs-Fixed: 2545590
Change-Id: Ie8efef77fabeeea28d70380c398089e6351e35e3
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-02 15:49:19 -08:00
Suresh Vankadara
02279f7bf6 msm: camera: ope: Add dynamic clock support for OPE
Dynamic clock and bandwidth support is added to
OPE.

CRs-Fixed: 2520602
Change-Id: I4ba4bb3b24e4ef47dea35810564cae69912ef72e
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-02 15:49:19 -08:00
Pavan Kumar Chilamkurthi
f5203c1106 msm: camera: ope: Add uapi support to OPE driver
OPE is camera offline engine, support is added
to enable camera OPE hardware.

CRs-Fixed: 2520602
Change-Id: I8b08ecb34323ee927f2be88707ad65ad2444447d
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-02 15:49:10 -08:00
Jong-Guk Im
59b5e03e98 Merge "msm: camera: isp: Update camera timestamps to ktime API" into camera-kernel.lnx.4.0 2019-11-27 14:08:52 -08:00
Mukund Madhusudan Atre
9a9e1a93e5 msm: camera: cpas: Add cpas support for camera v580 platform
Add register info. initial QoS settings info to program
camera static settings for chipsets having camera v580.

CRs-Fixed: 2528069
Change-Id: I6361140959ef64f35539612cf66604344adaea52
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-11-27 13:53:23 -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
Karthik Jayakumar
8481d870a0 msm: camera: isp: Update camera timestamps to ktime API
Old API's returning struct timeval and struct timespec will be
deprecated in future kernel versions as their tv_sec members
will overflow in the year 2038 on 32-bit arhitectures.

CRs-Fixed: 2564616
Change-Id: I6e3e37cf957daca992b66cad1134f49dd78961f5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-22 15:51:37 -08:00