Commit Graph

313 Commits

Author SHA1 Message Date
Gaurav Jindal
d95d140d40 msm: camera: req_mgr: LDAR Debug framework implementation
When user space detects an error or does not receive
response for a request, Lets do a reset(LDAR) is triggered.
Before LDAR, user space sends flush command to the
kernel space.
To debug the cause for this situation and to dump
the information, user space sends a dump command to the
kernel space before sending flush.
As a part of this command, it passes the culprit request id
and the buffer into which the information can be dumped.
Kernel space traverses across the drivers and find the culprit hw
and dumps the relevant information in the buffer.
This data is written to a file for offline processing.
This commit implements the framework for traversal
across the RT and NRT devices.

CRs-Fixed: 2602180
Change-Id: I7e24006c20c23bfab163a2ad13b4ac6e2913bb9e
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2020-02-05 10:50:23 -08:00
Gaurav Jindal
14b75bff2d msm: camera: isp: Add support for IFE2
Add support for IFE2 hardware in ife hw manager, bus files.

CRs-Fixed: 2571273
Change-Id: I6193b70707b15282b8d819e8dda5eb2e5fc4c345
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2020-02-05 10:49:16 -08:00
Camera Software Integration
324fe08fbf Merge "msm: camera: sync: correcting atomic read operation" into camera-kernel.lnx.4.0 2020-02-04 15:21:32 -08:00
Camera Software Integration
0da9c03755 Merge "msm: camera: ife: Remove reset type override" into camera-kernel.lnx.4.0 2020-02-04 15:19:15 -08:00
Camera Software Integration
3fc621826d Merge "msm: camera: isp: Add check for cid acquire" into camera-kernel.lnx.4.0 2020-02-04 15:19:06 -08:00
Camera Software Integration
bd60f847ef Merge "msm: camera: isp: Mask unused rdi interrupts" into camera-kernel.lnx.4.0 2020-02-04 15:18:31 -08:00
Camera Software Integration
e0063de3c3 Merge "msm: camera: ife: Reduce config done timeout during stop" into camera-kernel.lnx.4.0 2020-02-04 15:18:23 -08:00
Camera Software Integration
933a941f33 Merge "msm: camera: cdm: Clear IRQ before reading userdata" into camera-kernel.lnx.4.0 2020-02-04 15:18:14 -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
77b739919d Merge "msm: camera: isp: Change data type for error handling" into camera-kernel.lnx.4.0 2020-02-04 15:17:06 -08:00
Camera Software Integration
5f52e784c4 Merge "msm: camera: isp: Update unlink handling to avoid race" into camera-kernel.lnx.4.0 2020-02-04 15:14:58 -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
7212c1deb0 Merge "msm: camera: custom: Disable overflow recovery" into camera-kernel.lnx.4.0 2020-02-04 15:09:43 -08:00
Camera Software Integration
8d141684b8 Merge "msm: camera: ife: Stop hardware in error" into camera-kernel.lnx.4.0 2020-02-04 15:09:03 -08:00
Camera Software Integration
db3bae58bc Merge "msm: camera: req_mgr: Reduce maximum attempts to apply request" into camera-kernel.lnx.4.0 2020-02-04 15:08:50 -08:00
Camera Software Integration
4690565ab4 Merge "msm: camera: req_mgr: Increase watchdog timeout" into camera-kernel.lnx.4.0 2020-02-04 15:08:32 -08:00
Camera Software Integration
c80a4ac519 Merge "msm: camera: cpas: Add cpas support for camera v170_200 platform" into camera-kernel.lnx.4.0 2020-02-04 15:08:11 -08:00
Camera Software Integration
1598b6d0e8 Merge "msm: camera: icp: Dump patching info in case of page faults" into camera-kernel.lnx.4.0 2020-02-04 15:07:59 -08:00
Camera Software Integration
d96c25f265 Merge "msm: camera: icp: Enable hang dump on failure" into camera-kernel.lnx.4.0 2020-02-04 15:07:49 -08:00
Camera Software Integration
8b7546e512 Merge "msm: camera: custom: Add support for immediate stop" into camera-kernel.lnx.4.0 2020-02-04 15:07:26 -08:00
Camera Software Integration
d9c3665f6b Merge "msm: camera: reqmgr: Reduce delay by one frame during bubble recovery" into camera-kernel.lnx.4.0 2020-02-03 14:10:09 -08:00
Camera Software Integration
bcb623611e Merge "msm: camera: ife: Disable clock gating at top" into camera-kernel.lnx.4.0 2020-02-03 14:09:53 -08:00
Camera Software Integration
2eb43777e9 Merge "msm: camera: icp: Mapping fw error numbers with error names" into camera-kernel.lnx.4.0 2020-02-03 14:09:36 -08:00
Camera Software Integration
01c08edcd4 Merge "msm: camera: icp: Enqueue the abort cmd in workq" into camera-kernel.lnx.4.0 2020-02-03 14:09:20 -08:00
Camera Software Integration
346b97be0d Merge "msm: camera: icp: Increase the wait time for abort ACK" into camera-kernel.lnx.4.0 2020-02-03 14:09:06 -08:00
Camera Software Integration
6218118e61 Merge "msm: camera: reqmgr: reset the slot on buf_done" into camera-kernel.lnx.4.0 2020-02-03 14:08:56 -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
Camera Software Integration
4bc14156bb Merge "msm: camera: req_mgr: Link state check before process trigger workq" into camera-kernel.lnx.4.0 2020-02-03 14:07:52 -08:00
Camera Software Integration
b7d2028ac7 Merge "msm: camera: isp: prioritize RUP over EPOCH in bottom half" into camera-kernel.lnx.4.0 2020-02-03 14:04:40 -08:00
Camera Software Integration
cb3b398b2b Merge "msm: camera: cpas: Reorder sequence of cleanup in cpas probe failure" into camera-kernel.lnx.4.0 2020-02-03 14:03:50 -08:00
Camera Software Integration
6d220294b9 Merge "msm: camera: jpeg: Increase number of jpeg contexts" into camera-kernel.lnx.4.0 2020-02-03 14:03:23 -08:00
Karthik Anantha Ram
d7c20bce67 msm: camera: isp: Add check for cid acquire
This change adds a check to validate the cid being acquired,
when custom HW is in the pipeline.

CRs-Fixed: 2524308
Change-Id: I32913e74bc946a4333f77f5e10757c4bd51eab67
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-02-03 13:54:48 -08:00
Venkat Chinta
3f5125ebb1 msm: camera: ife: Remove reset type override
This change removes the VFE reset type override that
was introduced to a hardware limitation that has since
been rectified.

CRs-Fixed: 2590331
Change-Id: I2232ab69a9c66e9e14dd849755d8b4eba63fe136
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-03 13:38:33 -08:00
Chandan Kumar Jha
e03b67bb2f msm: camera: cpas: Add cpas support for camera v170_200 platform
Add register information. Initial QoS settings info to program
camera static settings for chipsets having camera v170_200.
Also change the logic to get the camera and cpas versions.
Added the map table corresponding to camera and cpas versions.
For any new CPAS version support, just need to add the entries to
the map. This removes the complexity of if-else cases while
fetching the cpas hw information.

CRs-Fixed: 2571273
Change-Id: I7d54b8bc038aa90ecb39f5048e7809ac10c4476f
Signed-off-by: Gaurav Jindal <gjindal@codeeaurora.org>
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-02 21:24:40 -08:00
Venkat Chinta
89c75af320 msm: camera: ife: Reduce config done timeout during stop
This change reduces the duration of wait for config done during
stop and flush. We perform wait for completion once for reg
dump during flush so there is no need for a long wait during
stop.

CRs-Fixed: 2606911
Change-Id: Ib1c2d7655d8a213495618a140acea2391b262082
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-31 16:11:24 -08:00
Abhilash Kumar
4e30068212 msm: camera: cdm: Clear IRQ before reading userdata
CDM driver read the user_data reg to inform CDM's clients
about the request status being served. If before clearing
the IRQ, the value of userdata register gets updated, then
CDM will not receive another INLINE_IRQ for the updated
userdata.
This change will make sure that another interrupt is fired
by clearing the IRQ first and reading the userdata later.

CRs-Fixed: 2581559
Change-Id: I74edf1b8439ae2f88f30b6c2fdbf9ac9f3742503
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-31 16:07:04 -08:00
Venkat Chinta
0f1162d099 msm: camera: ife: Stop hardware in error
This change adds logic to stop IFE hardware in case of
hardware errors.

CRs-Fixed: 2590331
Change-Id: I86773cc44ce890cea47f19f0482761e686b0cd00
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-30 13:54:38 -08:00
Venkat Chinta
0fb8f447c1 msm: camera: req_mgr: Reduce maximum attempts to apply request
This change reduces the maximum attempts to apply a particular
request from three to two. After two failed attempts to apply
to ISP device, IRQs for ISP device will be overlapped from
two requests. Thereafter apply request at every alternate
frame will fail without a chance of recovery. Therefore we
must notify userspace to trigger recover on the link.

CRs-Fixed: 2606911
Change-Id: I526bb837a496fe1e67786b854c5afb062dddb918
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-30 13:52:07 -08:00
Venkat Chinta
5fec859ec6 msm: camera: ife: Disable clock gating at top
Clock gating must be disabled at top level initialize
hardware routine as VFE is reset after resource level
initialize hardware routine.

CRs-Fixed: 2590331
Change-Id: I5c51c402a3a6076f056368493b774daa199228aa
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-30 13:50:18 -08:00
Venkat Chinta
f010528566 msm: camera: req_mgr: Increase watchdog timeout
This change increases the watchdog timeout value from one second
to five.

CRs-Fixed: 2606911
Change-Id: I353f78369c31a513dfd94dd1988bc42c2f75b167
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-30 13:48:41 -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
Alok Pandey
cc79abb0a5 msm: camera: sync: correcting atomic read operation
This change rectifies the reading of atomic variable.

CRs-Fixed: 2591537
Change-Id: I13c289bc00a07d5c2289e2e3f13245bbc521d4ee
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2020-01-30 13:18:30 -08:00
Vikram Sharma
7d3a0f3abb msm: camera: isp: Update unlink handling to avoid race
Expire timer after destroying workqueues so that we
do not refer to watchdog timer while the link is
getting unlinked from session handle.

CRs-Fixed: 2585098
Change-Id: Ife2450ae66bd52ec704ac7d593b2daaeb20ba54d
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2020-01-30 13:16:02 -08:00
Tejas Prajapati
10d42b7f6c msm: camera: isp: Mask unused rdi interrupts
Enable rdi interrupts from the required sources only,
other unused interrupts from rdi sources should be masked.
Also in the case where multiple rdi has been acquired in
same context interrupts from only one of them should be
enabled.

CRs-Fixed: 2590476
Change-Id: Icd074d1566db0b758d25c7b127402b424e48efd9
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-01-30 13:14:46 -08:00
Karthik Anantha Ram
fbfa512811 msm: camera: reqmgr: Reduce delay by one frame during bubble recovery
The EPOCH at which bubble is detected no setting is applied
to any device. This change will trigger applying the bubbled
setting to the device with highest pipeline delay.

CRs-Fixed: 2564669
Change-Id: I180b4a1d2d29267f330546b8860a099baf1688e9
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:53:46 -08:00
Karthik Anantha Ram
118b93f5dd msm: camera: custom: Add support for immediate stop
Add support for immediate stop and reset during flush
for custom HW.

CRs-Fixed: 2585745
Change-Id: I542ac02f8d99c194efa498bc07dffae7879a6c8a
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:53:31 -08:00
Karthik Anantha Ram
287b7b22d7 msm: camera: isp: Change data type for error handling
Use unsigned long to capture the return value of
wait_for_completion APIs as part of CSID path reset.

CRs-Fixed: 2600604
Change-Id: Ic21ddf283180a177b2c2d9e9a33fec4ec68bdd98
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:53:18 -08:00
Karthik Anantha Ram
42e7f5c6d8 msm: camera: custom: Disable overflow recovery
This change disables overflow recovery/detection for
custom CSID. Currently for QCOM CSID we enable overflow
detection and freeze on overflow. But for custom HW the
CSID needs to be free running, custom HW will take care
of handling any backpressure from IFE pipeline/DDR.
There is no need to backpressure to CSID in case of custom
HW.

CRs-Fixed: 2524308
Change-Id: I5de62eea0e87674d7ac24bb5ad2f11ff2a5a6b7c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:51:57 -08:00
Karthik Anantha Ram
b2e69c4df0 msm: camera: icp: Dump patching info in case of page faults
Currently as part of the page fault handler we only dump the
io_bufs. This change dumps all the patched addresses for
this request as well.

CRs-Fixed: 2579908
Change-Id: If5deec0ad3a8aec82824ef55366084c31a037515
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:49:50 -08:00