Commit Graph

82 Commits

Author SHA1 Message Date
Karthik Anantha Ram
7642380776 msm: camera: isp: Add support for custom CSID
This change adds support for custom csid HW and
programming of user defined interfaces (UDI) in
custom csid block.

CRs-Fixed: 2515662
Change-Id: I4b226b3a3787fbc3e56eb285e9a4dbd6d62edefa
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-30 13:49:11 -07:00
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
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
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
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
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
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
Pavan Kumar Chilamkurthi
04580c9bd0 Merge "msm: camera: lrme : Fix for lrme_hw null dereference" into camera-kernel.lnx.1.0 2019-08-06 15:12:21 -07:00
Pavan Kumar Chilamkurthi
93a2d068ae Merge "msm: camera: icp: lock before updating clock status" into camera-kernel.lnx.1.0 2019-08-06 15:12:06 -07:00
Pavan Kumar Chilamkurthi
41fdede6bd Merge "msm: camera: isp: Move bw voting functions to common file for vfe" into camera-kernel.lnx.1.0 2019-08-06 15:11:51 -07:00
Pavan Kumar Chilamkurthi
b22ce9bb65 Merge "msm: camera: icp: Add support for semi real time device types" into camera-kernel.lnx.1.0 2019-08-06 15:11:37 -07:00
Alok Pandey
82ee45360e Revert "msm: camera: icp: lock before updating clock status"
This reverts commit 6094f6654bd6ddc7f6df54b19cb8e6697bf3111c.
The change introduces a lock around a code that can cause sleep.
It results in abnormal operation of camera functionality. Reverting
this change will lead to original problem of stability. That need
to be addressed.

Change-Id: I3899d6992350bc466e89ee1ca1834a8a7fbd0269
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2019-08-06 12:22:13 -07:00
Jigarkumar Zala
306cc41267 msm: camera: Dynamic update of scalable clock
This change updates the scalable clock based on
hw src clock. Also, removed cam_soc_util_get_vote_level()
as it is duplicating the functionality with
cam_soc_util_get_clk_level() api.

Change-Id: I001264d150849770ef664ecc206a66f8a4f54412
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:22:09 -07:00
Venkat Chinta
a6efb05c3f msm: camera: isp: Move req out of pending list before start
This change moves init request out of pending list before
starting hardware. Currently if we receive the first SOF and
RUP IRQs before start_dev routine has completed, we miss
pushing out the init request to free list on the first RUP as
wait list will be empty.

Change-Id: Icd53e0ebe0d12e264172058d836e6ccfcb7df0c2
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:22:04 -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
f458d1d231 msm: camera: isp: Add support for QCFA CSID binning
Add support to configure CSID binning for QCFA.

Change-Id: I9e2673d89f521a4b4fddc41ad1217ffe229d8b01
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:54 -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
Mangalaram ARCHANA
aa0f96d02c msm: camera: crm: Handle link setup based on version
With the increase in the device handles, the corresponding
link info structure is changed. Handle setting up link
based on the right structure version.

Change-Id: I0d21866ba0bc4abfe78941e191688773441ce03f
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:46 -07:00