Commit Graph

650 Commits

Author SHA1 Message Date
Gaurav Jindal
5f7b7386cf msm: camera: isp: Added CSID recovery mechanism
CSID is not able to recover from the fatal errors like lane
overflows, continuous unbound frames or ESD errors. To recover
from such errors, it is necessary to restart the sensor as
just starting the ISP hw do not make any change as the sensor
can still be in bad state.
This commit implements tasklet based CSID recovery mechanism.
On detecting an error in CSID interrupt, tasklet is scheduled
which in turn will call the ISP hw manager to notify the ISP
context, from here a notification is sent to CRM to send a
message to trigger full recovery. This full recovery includes
the sensor release and start.
This feature is debugfs based. Based on need this can be turned
on.

CRs-Fixed: 2642216
Change-Id: Iecf9916d3672d71a1367886cc934b5a2b148f918
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-07-20 18:02:12 -07:00
Camera Software Integration
9b8cae4b7c Merge "msm: camera: sensor: Fix misleading indentation issue" into camera-kernel.lnx.4.0 2020-07-20 13:18:48 -07:00
Camera Software Integration
431878cfc8 Merge "msm: camera: csiphy: Add support for CPHY dynamic lane configuration" into camera-kernel.lnx.4.0 2020-07-17 18:26:32 -07:00
Camera Software Integration
c8f19704d3 Merge "msm: camera: reqmgr: Update the dma_buf api usage" into camera-kernel.lnx.4.0 2020-07-16 13:26:41 -07:00
Depeng Shao
61575d2c08 msm: camera: sensor: Fix misleading indentation issue
Fix misleading indentation issue.

CRs-Fixed: 2732403
Change-Id: I1f04f0de14ef7c18d669f17842c712f340d093ed
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-16 08:41:09 +08:00
Camera Software Integration
c83f67df47 Merge "msm: camera: reqmgr: Add notify frame skip interface" into camera-kernel.lnx.4.0 2020-07-15 15:05:01 -07:00
Camera Software Integration
9d1494c482 Merge "msm: camera: cdm: Fix out of bounds issue" into camera-kernel.lnx.4.0 2020-07-15 15:04:52 -07:00
Jigarkumar Zala
af762bc692 msm: camera: csiphy: Add support for CPHY dynamic lane configuration
Add logic to dynamically lane configuration for the CPHY combo
mode, where individual sensor can configure with different datarate
by configuring the respective lanes at the time of configuration.

CRs-Fixed: 2729624
Change-Id: Ie3714f9fd5d24c6cea8824f3a9dd9dc7f6f6d976
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-07-15 14:38:40 -07:00
Camera Software Integration
f0380a0ab6 Merge "msm: camera: icp: Poll HFI init response using readl variant" into camera-kernel.lnx.4.0 2020-07-14 16:04:41 -07:00
Camera Software Integration
1ba919a8d1 Merge "msm: camera: isp: Add handle function for RUP in bubble" into camera-kernel.lnx.4.0 2020-07-14 16:04:35 -07:00
Jigarkumar Zala
093fcb7ceb msm: camera: reqmgr: Update the dma_buf api usage
dma_buf_kmap/kunmap is replaced with dma_buf_vmap/vunmap api, to
accommodate upstream driver.

CRs-Fixed: 2732008
Change-Id: Id6551d84ea09d91a18c64fbbca3a796f4eab0bb1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-07-14 11:23:00 -07:00
Depeng Shao
c782e8c3ab msm: camera: reqmgr: Add notify frame skip interface
This change adds support to notify frame skip when CRM
not ready to apply a normal setting. Sensor and custom
device also want to update the HW settings in some
conditions even if a frame is skipped.

CRs-Fixed: 2691642
Change-Id: Ibd2b22655d0f6b6c90663df75a0f5fad8565e918
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-14 18:45:30 +08:00
Camera Software Integration
cbac6f37f9 Merge "msm: camera: csiphy: Add support for CSIPHY 2.1.0" into camera-kernel.lnx.4.0 2020-07-13 14:53:42 -07:00
Depeng Shao
41ffa1f4f9 msm: camera: cdm: Fix out of bounds issue
The dt match table needs end up with null.

CRs-Fixed: 2730795
Change-Id: I75bdf20d74d9a83d9a0de28a2ad4d95412a51f0c
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-13 22:00:25 +08:00
Fernando Pacheco
dcb4ee83be msm: camera: icp: Poll HFI init response using readl variant
The extra read seems to have been added due to an incorrect use
of readw_poll_timeout. The readw_poll_timeout was effectively acting
as a long delay before attempting the second read. Replacing the readw
with a readl results in correctly polling the register. We can safely
remove the extra read and simplify the polling logic.

CRs-Fixed: 2722486
Change-Id: I07269d601e64059ce7654563c379b5dc956895b3
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-07-10 14:35:53 -07:00
Vishalsingh Hajeri
3adf5ea68e msm: camera: isp: Add handle function for RUP in bubble
When we wait on Bufdone for Bubble Request in Bubble state,
We don't know whether the CDM is hung or Bufdone is delayed.
This change prints more information for bubble request to
ascertain CDM is in good state.

CRs-Fixed: 2705745
Change-Id: I98215904b5665281808e775c97c6747a38eb1081
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-07-10 14:08:39 -07:00
Jigarkumar Zala
402c0a500b msm: camera: req_mgr: Remove unwanted v4l2 operation
CCI hardware is no longer register as device node with v4l2 layer.
At time of notify message, there is missing check to read subdev
name, which cause the null pointer issue. This change removes
the sudbev node reading operation with devnode pointer as it is
not being use anywhere in functionality.

CRs-Fixed: 2702760, 2727771
Change-Id: Id362bd2edf4eea35f05115ae3a5b6c1d761bb437
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-07-09 09:37:47 -07:00
Jigar Agrawal
cd675940d7 msm: camera: csiphy: Add support for CSIPHY 2.1.0
Add support for new CSIPHY version 2.1.0. Add hw
register file for CSIPHY 2.1.0.

CRs-Fixed: 2724449
Change-Id: Id3f21b4f60e807ca6fef762f0c6da193ae78e099
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-07-08 17:52:41 -07:00
Camera Software Integration
f4fbab5083 Merge "msm: camera: common: Return appropriate error code for cancelled requests" into camera-kernel.lnx.4.0 2020-07-08 12:20:07 -07:00
Camera Software Integration
12c93f36e4 Merge "msm: camera: isp: Only RDI path can access RDI resource" into camera-kernel.lnx.4.0 2020-07-08 12:19:56 -07:00
Camera Software Integration
e3e118457a Merge "msm: camera: csiphy: Update logic for lane enablement" into camera-kernel.lnx.4.0 2020-07-07 17:56:13 -07:00
Camera Software Integration
c29fcea3e2 Merge "msm: camera: ife: Improve IFE logs for better debugging" into camera-kernel.lnx.4.0 2020-07-07 17:56:02 -07:00
Camera Software Integration
37eb5e1921 Merge "msm: camera: utils: Add final BW vote logs as perf logs" into camera-kernel.lnx.4.0 2020-07-07 17:55:55 -07:00
Camera Software Integration
117275870d Merge "msm: camera: cci: Fix incorrect use of cci config ioctl" into camera-kernel.lnx.4.0 2020-07-07 17:55:49 -07:00
Camera Software Integration
fb8c7dbeb3 Merge "msm: camera: common: Enable debugfs compile check" into camera-kernel.lnx.4.0 2020-07-07 17:55:41 -07:00
Camera Software Integration
071907ecf0 Merge "msm: camera: common: Add hw version checks for shima camera" into camera-kernel.lnx.4.0 2020-07-02 17:46:36 -07:00
Camera Software Integration
840bfd5e6c Merge "msm: camera: cpas: Add support for shima camnoc" into camera-kernel.lnx.4.0 2020-07-02 17:46:25 -07:00
Camera Software Integration
cbd7f1bc3e Merge "msm: camera: core: Handle request abort and signal fence CANCEL" into camera-kernel.lnx.4.0 2020-07-02 17:46:10 -07:00
Camera Software Integration
772039c6d8 Merge "msm: camera: cci: Correct the condition check" into camera-kernel.lnx.4.0 2020-07-02 17:45:37 -07:00
Camera Software Integration
0a20494ef7 Merge "msm: camera: custom: Enable driver compilation & minor fixes" into camera-kernel.lnx.4.0 2020-07-02 17:44:44 -07:00
Camera Software Integration
ac0deb5b99 Merge "msm: camera: reqmgr: Skip wd timer update if there is no valid request" into camera-kernel.lnx.4.0 2020-07-02 17:44:32 -07:00
Karthik Anantha Ram
cb24ba9b79 msm: camera: common: Return appropriate error code for cancelled requests
If a request is submitted post flush and the request ID of that
request is <= last flush req ID return an appropriate error code
to indicate the same.

CRs-Fixed: 2720555
Change-Id: Ic26c4fc5f0ba490ed277b3bb301cc02d1fa027d6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-07-02 10:54:15 -07:00
Depeng Shao
006e454f56 msm: camera: isp: Only RDI path can access RDI resource
Only RDI path can access RDI resource.

CRs-Fixed: 2721399
Change-Id: Iad15b72a12cf825f150605f110bee04880a65852
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-02 19:53:42 +08:00
Jigar Agrawal
f3435b0efd msm: camera: ife: Improve IFE logs for better debugging
Add HW index in Release, Acquire, Flush and confiqure
IFE Logs to Improve the debugging.

CRs-Fixed: 2709537
Change-Id: Ia540f1498d889f1e744e6ab20e07d17e27b07731
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-07-01 14:08:10 -07:00
Karthik Jayakumar
7c8204a42d msm: camera: common: Enable debugfs compile check
Guards debugfs features in camera driver to only be compiled when
CONFIG_DEBUG_FS is enabled.

CRs-Fixed: 2717236
Change-Id: I0de77741301d259cbec64e8a2e27830981b2b69d
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-07-01 10:59:24 -07:00
Camera Software Integration
cd3fb3812a Merge "msm: camera: csiphy: Enable CSIPHY v1.2.4 in PHY driver" into camera-kernel.lnx.4.0 2020-06-30 13:39:28 -07:00
Mukund Madhusudan Atre
d543187b79 msm: camera: utils: Add final BW vote logs as perf logs
AHB and AXI BW voting path requires all key logs to be perf.
Change BW voting logs in utils to perf for easier debugging.

CRs-Fixed: 2584631
Change-Id: I41ef094f6633101bb7b636ea310aca81de0101c7
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-06-30 10:10:52 -07:00
Jigarkumar Zala
fa08068801 msm: camera: csiphy: Update logic for lane enablement
Currently lane enablement is happening as a part of lanemask
field, which is send by UMD. Lane enablement should be purely
depends on laneCnt and laneAssign attributes. Also, combo mode
sensors needs to come with combo mode flag set from the UMD.
This change updates the logic for lane enablement with respect
to laneAssign and laneCnt, and also covers all combomode selection
as per the request. This change also enables the sensors to acquire
and streamon/streamoff at anytime in session.

CRs-Fixed: 2677450
Change-Id: I4f0d3ffd7245a931c273611c9c4b7e503c038664
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-06-29 15:56:53 -07:00
Jigarkumar Zala
c8ac83dc3e msm: camera: cci: Correct the condition check
Submodules per master uninitialize check needs to be set to false
when all submodules are released for that master. Correct the
refcount check for the appropriate operation.

CRs-Fixed: 2686487
Change-Id: Iaea94e4d1ad83bef99d40cec4e96de3993783ec1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-06-29 11:10:02 -07:00
Chandan Kumar Jha
25e54e279c msm: camera: common: Add hw version checks for shima camera
Add hw version checks in csid, vfe and ICP driver.

CRs-Fixed: 2707213
Change-Id: I9a698479b5a86b279a4a58cceb908ed7a7e93f11
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2020-06-29 19:44:04 +05:30
Chandan Kumar Jha
899a6b0d50 msm: camera: cpas: Add support for shima camnoc
Add register information. Initial QoS settings info to program
camera static settings for chipsets having camera V570_200.

CRs-Fixed: 2707213
Change-Id: Ic9af3c4ff1cc69c6b70e1489e4634afe7b71390a
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2020-06-29 19:43:09 +05:30
Pavan Kumar Chilamkurthi
e618f72d9f msm: camera: core: Handle request abort and signal fence CANCEL
Handle request abort cases from underlying hw mgr, hw layers.
This will handle in differentiating ERROR vs ABORT returned
from firmware in case of ICP and signal the fence accordingly.
By the time flush is issued to firmware, if a request is not
yet processed, firmware signals with Abort, which needs to be
propogated as CANCEL instead of ERROR to core context layer
so that context layer signals the fence accordingly as
ERROR or CANCEL.

CRs-Fixed: 2702771
Change-Id: I8fe6bd1c8f5cf09b99196a1caac1283032418f8c
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-06-29 02:38:06 -07:00
Fernando Pacheco
aaf3059502 msm: camera: cci: Fix incorrect use of cci config ioctl
The cci configuration will be transitioned to a new API that does not
require routing through the v4l layer. This is work-in-progrss so in
the mean time prevent the device from being exposed as configurable
from userspace.

The ioctl will still be exposed to kernel users so fix the arg size
as well. We want size of struct not pointer.

CRs-Fixed: 2702760
Change-Id: I9c7bd8f76980603dbf27e1c5bc9b19f8a3b8a39a
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-06-26 14:21:20 -07:00
Karthik Anantha Ram
7a99d64ebf msm: camera: reqmgr: Skip wd timer update if there is no valid request
At a given point if there is no request to apply, carry forward
the same timeout value for the wd timer. Modify timer only in
cases where we apply a valid request.

CRs-Fixed: 2698225
Change-Id: I92a1f1c6d0154349e19fdc1582d9d8836a7db1f4
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-06-26 10:23:22 -07:00
Camera Software Integration
b4f16aace6 Merge "msm: camera: isp: Reset offline context flag" into camera-kernel.lnx.4.0 2020-06-24 20:06:58 -07:00
Camera Software Integration
fd253633e1 Merge "msm: camera: common: Update holi camera workq wrapper" into camera-kernel.lnx.4.0 2020-06-24 18:03:53 -07:00
Shravan Nevatia
14ed8a149e msm: camera: csiphy: Enable CSIPHY v1.2.4 in PHY driver
Add support for CSIPHY v1.2.4 in the PHY driver.

CRs-Fixed: 2709344
Change-Id: Ic0eeabe2e978e6f2513e61a063e8b354c8466954
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-06-24 19:53:38 +05:30
zhuo
124ac14bf9 msm: camera: isp: Reset offline context flag
This change resets the offline context flag,
otherwise the packet may be applied to HW immediately
if this context is offline context last time.

CRs-Fixed: 2696977
Change-Id: I2fc836f7ba2889ec62273c3b12cc4050736f587b
Signed-off-by: zhuo <zhuo@codeaurora.org>
2020-06-23 12:04:49 -07:00
Suresh Vankadara
c92348064f msm: camera: common: Update holi camera workq wrapper
Update OPE and TFE drivers to use new camera workq
wrapper functions.

CRs-Fixed: 2716498
Change-Id: I05ecefb191a544c2953ac7e71a7c9a95d1f1fb10
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
2020-06-23 10:51:59 +05:30
Karthik Anantha Ram
139ced0c94 msm: camera: custom: Enable driver compilation & minor fixes
Enable custom driver compilation on lahaina and few minor fixes
in custom HW driver.

CRs-Fixed: 2716300
Change-Id: I6f9ead5d2d67d91c14daf200ba12e95a1afec61d
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-06-22 16:17:12 -07:00