Commit Graph

99 Commits

Author SHA1 Message Date
Venkat Chinta
7e0fea6d1c msm: camera: ife: Add dentry to enable req dump
This change adds a dentry to enable req dump in the case of
hardware errors.

CRs-Fixed: 2513939
Change-Id: I0ae5d6c658964bf33d0e4c1775413aaa9201f7a1
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-08-30 13:47:55 -07:00
Depeng Shao
598dfb05af msm: camera: isp: Correct the active req cnt assignment order
We need to reset the active req cnt before assigning
new value. Also move the log behind the active req cnt
assignment.

CRs-Fixed: 2517421
Change-Id: I38f418f79f5f1adcb8b29bc870f904cd1f925bfc
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-08-29 11:17:32 +08:00
Depeng Shao
95460b8f2e msm: camera: isp: Fix RDI only early PCR issue
RDI only context also need to get req from
wait_req_list afte received RUP event in early
PCR case.

CRs-Fixed: 2511798
Change-Id: If2e8da36cf83dee1c348dd0d6c6ea916061a376e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-08-27 14:46:30 -07:00
Jong-Guk Im
85dac39a9e Merge "Camera: Snap for drop 08/26/2019 Mainline 148" into camera-kernel.lnx.1.0 2019-08-26 14:20:27 -07:00
Jong-Guk Im
b5fa77e991 Merge "msm: camera: isp: Dump previous acq ctx info on acq failure" into camera-kernel.lnx.1.0 2019-08-26 14:20:16 -07:00
Mukund Madhusudan Atre
f86cd9899d Camera: Snap for drop 08/26/2019 Mainline 148
Change-Id: I386b0e3158e27b975adae77146c6b6fafbf933c9
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-26 13:39:17 -07:00
Jong-Guk Im
cc15da4bad Merge "Camera: Snap for drop 08/23/2019 Mainline 147" into camera-kernel.lnx.1.0 2019-08-23 16:03:38 -07:00
Jong-Guk Im
1c31309845 Merge "msm: camera: common: Clean shutdown and page fault sequence" into camera-kernel.lnx.1.0 2019-08-23 16:03:15 -07:00
Jong-Guk Im
39c31455c3 Merge "msm: camera: icp: log cleanup and header update" into camera-kernel.lnx.1.0 2019-08-23 16:03:11 -07:00
Jong-Guk Im
3ed16425dc Merge "msm: camera: smmu: Dump ctx bank info in case of mapping failure" into camera-kernel.lnx.1.0 2019-08-23 16:03:06 -07:00
Jong-Guk Im
2b3bb5abc8 Merge "Camera: Snap for drop 08/22/2019 Mainline 146" into camera-kernel.lnx.1.0 2019-08-23 15:59:04 -07:00
Mukund Madhusudan Atre
0a5b5c4961 Camera: Snap for drop 08/23/2019 Mainline 147
Change-Id: Ieac77fd6ce6f42d10e55b7154e1fb1056f70b0f8
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-23 15:58:55 -07:00
Mukund Madhusudan Atre
dd89a305c1 Camera: Snap for drop 08/22/2019 Mainline 146
Change-Id: Ib81b69adb65dbbfc69798e06945e939a1ecf56ef
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-23 15:55:47 -07:00
Karthik Anantha Ram
03e52e70d6 msm: camera: isp: Dump previous acq ctx info on acq failure
In case acquire hw fails, dump the previously acquired
streams to infer the reason for the failure.

CRs-Fixed: 2512474
Change-Id: I3ee2b85e0843ab4a605625950dc60366c0b50713
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-23 12:50:39 -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
Mukund Madhusudan Atre
b582eeddce msm: camera: isp: Add atomic flag instead of wait in handle error
Errors in isp are handled in soft irq context, putting a wait for
cdm done is not allowed. Add atomic flag for checking status of
cdm and check it before reg dump to determine the request for
which register values can be dumped in command buffer.This is
only applicable to reg dump on error.

CRs-Fixed: 2510557
Change-Id: If4bfedd1a62078392721c2ea0958da82087f5b26
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-21 13:05:48 -07:00
Karthik Anantha Ram
65a6c306f9 msm: camera: smmu: Dump ctx bank info in case of mapping failure
When mapping fails for a given context bank, dump all the existing
mappings for that context bank to understand the memory usage
for that bank.

CRs-Fixed: 2513106
Change-Id: Ia17b086dd76378da55cae509255309610820f53f
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-21 12:21:08 -07:00
Karthik Anantha Ram
6ceb84f1b7 msm: camera: icp: log cleanup and header update
This change cleans up a few logs and updates the HFI headers
in line with the current FW.

CRs-Fixed: 2513094
Change-Id: I8853ac3711ad3bf36ce59f6860082fa29dca0bf6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-21 11:52:58 -07:00
Karthik Anantha Ram
9712baaea9 msm: camera: reqmgr: Update log for shutdown
Add warn log to indicate shutdown has occurred.
Also decrement the open req count after successfully applying
a request.

Change-Id: I1b420dff52e016f52e19c5572824e4ed6f53744b
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 19:03:15 -07:00
Suresh Vankadara
c4acb6a025 msm: camera: isp: schedule tasklet with priority
To handle tasklet delays in hadling ISP inetrrupts
use priority tasklet scheduling.

Change-Id: I11961f51092c3f6876d2375595d9e5004f64c656
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:42:13 -07:00
Pavan Kumar Chilamkurthi
6bf14f8fd4 msm: camera: isp: Look at next request for BUF_DONE event
If the resource for which BUF_DONE event has come is already
signalled in the oldest request, this BUF_DONE could be for
the next request in the list. This can happen if the IRQ
handling for BUF_DONE is delayed and by the time it is handled
if the resources for the next request are already signalled
along with other pending resources for the oldest request,
we might handle resources which corresponds to next request
first. If we do not look into next request and thus if we
ignore these BUF_DONEs, we will never be done with the next
request.

Change-Id: I1b20aff0a68172bc8794d2c37f088ba2539d173d
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:58 -07:00
Pavan Kumar Chilamkurthi
d7a8426091 msm: camera: utils: Use pr_info for camera logs
Use pr_info for camera warning and error logs to avoid sending
to console (assuming info logs are disabled to console).
All camera warning and error logs are anyway tagged with
CAM_WARN and CAM_ERR, so using pr_info doesn't cause any
information loss.

Change-Id: Ib23fbad47c1dce4c45e3413d775303d681a1ff86
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:39 -07:00
Venkat Chinta
e8ceba2d02 msm: camera: isp: Send shutter notification
Shutter notification must be sent when moving request
to free list if it was not sent out earlier due to
missed EPOCH IRQ or delayed EPOCH IRQ handling.

Change-Id: I9b3b039827bea24814fbea34e61abfc938f6bf2d
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:06 -07:00
Venkat Chinta
54070a35f2 msm: camera: ife: Add new controller for RUP IRQ
Currently EPOCH IRQ handling is at a higher priority
compared to RUP IRQ as RUP is fired at bus level. If
RUP IRQ is not scheduled for handling by the time we
receive EPOCH IRQ, EPOCH IRQ will be processed first
and this will lead to missed SOF notification as the
active request list might be empty. This change sets
priority of both IRQs to the same by utilizing a new
IRQ controller that is tasked with handling RUP from
BUS. BUF_DONE is also subscribed to the same VFE top
level BUS_WR IRQ but with a lower priority. IRQs for
CAMIF Lite and RDI are subscribed to only if the ctx
is RDI only.

Change-Id: Id844ffe291e21ecfc7f7ed6fc53baf7e79dd2184
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:40:46 -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
Pavan Kumar Chilamkurthi
3df2ab3939 Merge "Camera: Correct makefiles for correct header inclusion" into camera-kernel.lnx.1.0 2019-08-09 16:28:15 -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
Karthik Anantha Ram
f2a0cc111f msm: camera: reqmgr: Dump device name as part of frame skip log
Currently we can infer only the pd of the device whose request
was not available on time leading to a frame skip. This change
identifies and logs the device name to ease debugging.

Change-Id: I49a3cd84611b21626c68395b11f0ef52bffb62db
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-09 13:28:30 -07:00
Karthik Anantha Ram
360454feef msm: camera: icp: Avoid accessing frame process data in the kernel
IPE/BPS frame process data keeps changing one needs to update the
kernel hfi header accordingly everytime. This change avoids
accessing those structs in the kernel. Userspace will ensure
resetting the struct to a default value.

Change-Id: If224befa89643f44997bb6e826f8dfcfac5d08d1
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-09 13:26:44 -07:00
Karthik Anantha Ram
519d453d0d msm: camera: icp: Update A5 clock per frame
A5 (ICP) clock corners IPE clock source. This change
updates ICP clock based on the rate updated for IPE.

Change-Id: I2c0b711d34ea8ab8ccf458ecb77402ecf6bf967e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-08 20:18:58 -07:00
Mukund Madhusudan Atre
827791eafa msm: camera: Add support for reg dump to command buffers
Certain register values are required by user space during flush
to apply settings accordingly. Also, support for dumping registers
at the time of error is needed for debugging. Add support for
dumping register values in a range of offsets to given cmd buffer.

Change-Id: I5912118809f7a7dd701a555639d1057ffe665ce1
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-08 20:18:36 -07:00
Mukund Madhusudan Atre
632d56473b msm: camera: Add uapi definitions for camera reg dump
For debugging, there are a set of register values that user
space needs. Based on the offset and range given, values can
be dumped into an out buffer to be further processed. Add
uapi support for this reg dump.

Change-Id: I6e6f89625a505158a6bf8932ebb9d0ae78bf0129
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-08 20:17:57 -07:00
Vishalsingh Hajeri
b2bd543adf msm: camera: isp: Dump page fault info for pending request
If bubble report is set from usersapce we move the active
request back to pending request list while handling error.
We need to iterate through pending request list as well
when dumping page fault info for erroneous request.

Change-Id: I2458313affbae6cb161f077eef7bdd0263c43ae2
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-08 15:37:57 -07:00
Jigarkumar Zala
05b312bca9 Camera: Add support for LITO target
This change add config support for LITO target.

Change-Id: Ia4a191c862f9886bb35fbd792ae786d027d5cc7e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 15:36:31 -07:00
Pavan Kumar Chilamkurthi
485b7d2faa Merge "msm: camera: Update uapi structure for OIS" into camera-kernel.lnx.1.0 2019-08-06 15:24:42 -07:00
Pavan Kumar Chilamkurthi
65f72aac0d Merge "Camera: uapi: Add uapi support for QCFA CSID binning" into camera-kernel.lnx.1.0 2019-08-06 15:24:31 -07:00
Pavan Kumar Chilamkurthi
994f1255bf Merge "camera: uapi: Add uapi support for semi real time device types" into camera-kernel.lnx.1.0 2019-08-06 15:24:21 -07:00
Pavan Kumar Chilamkurthi
618517421c Merge "Camera: uapi: add uapi csiphy4 and csiphy5 support" into camera-kernel.lnx.1.0 2019-08-06 15:24:10 -07:00
Pavan Kumar Chilamkurthi
82b131a732 Merge "Revert "msm: camera: icp: lock before updating clock status"" into camera-kernel.lnx.1.0 2019-08-06 15:16:54 -07:00
Pavan Kumar Chilamkurthi
0728ab4d0e Merge "msm: camera: Dynamic update of scalable clock" into camera-kernel.lnx.1.0 2019-08-06 15:16:21 -07:00
Pavan Kumar Chilamkurthi
5279c05b4e Merge "msm: camera: isp: Move req out of pending list before start" into camera-kernel.lnx.1.0 2019-08-06 15:16:02 -07:00
Pavan Kumar Chilamkurthi
cf696e038c Merge "msm: camera: Fuse base secure camera enablement" into camera-kernel.lnx.1.0 2019-08-06 15:14:39 -07:00
Pavan Kumar Chilamkurthi
80923d1302 Merge "msm: camera: isp: Add support for QCFA CSID binning" into camera-kernel.lnx.1.0 2019-08-06 15:14:21 -07:00
Pavan Kumar Chilamkurthi
0d7133d630 Merge "Camera: sensor: Power off the sensor if no gpios" into camera-kernel.lnx.1.0 2019-08-06 15:14:03 -07:00
Pavan Kumar Chilamkurthi
57bc692472 Merge "msm: camera: crm: Handle link setup based on version" into camera-kernel.lnx.1.0 2019-08-06 15:13:50 -07:00
Pavan Kumar Chilamkurthi
eb6763f590 Merge "msm: camera: crm: Increase the device handles to 128" into camera-kernel.lnx.1.0 2019-08-06 15:13:34 -07:00
Pavan Kumar Chilamkurthi
1e97ea0b88 Merge "msm: camera: Fix usage of invalid array index" into camera-kernel.lnx.1.0 2019-08-06 15:13:19 -07:00
Pavan Kumar Chilamkurthi
298bd7cde5 Merge "msm: camera: isp: Fix rdi only usecase" into camera-kernel.lnx.1.0 2019-08-06 15:13:04 -07:00
Pavan Kumar Chilamkurthi
cd39c3a705 Merge "msm: camera: smmu: Set the segment size for the context banks" into camera-kernel.lnx.1.0 2019-08-06 15:12:44 -07:00
Pavan Kumar Chilamkurthi
40df290598 Merge "msm: camera: cpas: Enable camnoc ubwc irqs for kona" into camera-kernel.lnx.1.0 2019-08-06 15:12:34 -07:00