Commit Graph

81 Commits

Author SHA1 Message Date
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
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
Jigarkumar Zala
ce61a07996 msm: camera: Update uapi structure for OIS
Userspace is sending slave address as 32bit, and in order to parse
the correct data kernel space needs to match this bit pattern.
This change updates the structure to accommodate it.

Change-Id: Ib136bbd1656dba9da75d3b07c494caeebf03dfcb
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:22:32 -07:00
Tejas Prajapati
d31033b31f Camera: uapi: Add uapi support for QCFA CSID binning
Add uapi support to configure CSID binning for QCFA.

Change-Id: Ic992c11d04319b6e8329963c032501b07002b484
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:22:28 -07:00
Karthik Anantha Ram
47f89a6efa camera: uapi: Add uapi support for semi real time device types
Add uapi support for IPE/BPS semi real time device types.

Change-Id: I12c733f51afdd70159f22f23be5967fc852549ca
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:22:24 -07:00
Jigarkumar Zala
21c100461f Camera: uapi: add uapi csiphy4 and csiphy5 support
Add Uapi csiphy4 and csiphy5 support.

Change-Id: Ie5d78a389f0cbc454fa261182a3d04030d13d307
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:22:18 -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
Jigarkumar Zala
6761503d24 msm: camera: crm: Increase the device handles to 128
Increasing the device handles to 128 to support more
pipelines.

Change-Id: Id0322cba095091e6168d8541d432628d8422a641
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:41 -07:00
Jigarkumar Zala
4767766efb msm: camera: Fix usage of invalid array index
Fix array index validation number of axi ports while
setup/cleanup axi related settings. Also validate the
array index for slot index for CRM and updates operation
accordingly.

Change-Id: Ic42939b7c59a5602b82a19f558030552bf3c0b72
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:37 -07:00
Jigarkumar Zala
4a8af1ed19 msm: camera: isp: Fix rdi only usecase
Initialize common_reg data for rdi.
Adds acquire handling for RDI usecase.

Change-Id: I06cc9bf86af834ceeb145e9b49586c97b6f1a461
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:33 -07:00