Commit Graph

40 Commits

Author SHA1 Message Date
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
Jigarkumar Zala
87c82dcf6a msm: camera: smmu: Set the segment size for the context banks
Set the right segment size in the driver for dma_map_sg to
allow for partial cache maintanence.

Change-Id: I6c439f23e957eb667bf959c830b120c0390e41b1
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:29 -07:00
Jigarkumar Zala
44abb0120d msm: camera: cpas: Enable camnoc ubwc irqs for kona
A notification is needed for camnoc ubwc encoder and decoder
errors in kona which were previously disabled. Update camnoc
irq register offsets and enable camnoc irq for ubwc.

Change-Id: I74b7264c537122a7bda618e8be03c4ac97c23000
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:25 -07:00
Jigarkumar Zala
55c3fecc4b msm: camera: lrme : Fix for lrme_hw null dereference
Fixes lrme_hw pointer when lrme_hw becomes null
returns with -ENODEV.

Change-Id: Ic2c15ebad868b056be4ce4ac28196960a1889292
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:20 -07:00
Jigarkumar Zala
692d184a62 msm: camera: icp: lock before updating clock status
Clock status can be updated in two ways, either through
timer or through the recovery. In case the clock is not
available during the recovery then it would try to access
registers which are unclocked. To prevent this before
updating the clock status spinlock should be acquired.

Change-Id: I16aea5e7dafacfe6b520699af195194d5d171c7c
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:15 -07:00
Jigarkumar Zala
d707886ae1 msm: camera: isp: Move bw voting functions to common file for vfe
Currently, vfe top has different files for different targets. Some of
the APIs are unchanged between these files. In order to avoid duplication
of code and make sure no change is missed between different versions of
vfe top, a common file is added to vfe top for unchanged APIs. With the
common top, number of input resources are moved to architecture specific
header files to ensure special conditions need not be created for a
particular architecture in common code. Move bw voting related APIs to
this common file.

Change-Id: Ibcb9519a206c25d42c9e7f0336f8d588a8240717
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:21:10 -07:00
Jigarkumar Zala
b630768467 msm: camera: icp: Add support for semi real time device types
Add support for IPE/BPS semi real time device types.

Change-Id: I1d9974eb796ce1723205072651d53ecb84023e88
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-30 10:20:52 -07:00
Depeng Shao
2f6c89b46f msm: camera: csid: add csiphy4 and csiphy5 support
Add csiphy4 and csiphy5 support.

Change-Id: I8523523556671ed6ffd7f880af2d18043c30d4eb
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-07-09 15:40:38 -07:00
Mukund Madhusudan Atre
4f13d6fe1f msm: camera: cpas: Update SafeLut values in CAMNOC QoS settings for Kona
Update SafeLut values for ife paths in CAMNOC QoS settings according to
recommended settings in CAMNOC HPG.

Change-Id: I12fa796757f4fe000e47ab2074c7ee88165864ab
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-07-09 10:34:38 -07:00
Jigarkumar Zala
f1135e91b9 msm: camara: sync: Add callback registration logic for synx
Synx driver is dependent on camera driver for registering callback
functions of sync driver. This change invert the logic, and camera
driver will register the callback functions for synx driver at the
time of sync driver probe.

Change-Id: I2dbee15ba4c7a9dde336a4bb1f2a4dddcd90348b
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-09 10:34:33 -07:00
Alok Pandey
a0129f5975 msm: camera: icp: setting QoS for a5 firmware
It sets the bus access priority for A5 core.

Change-Id: Ic110bc10d14ea512f79dfff361e61db4e9db6fe7
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2019-07-09 10:34:29 -07:00
Vishalsingh Hajeri
c952930533 msm: camera: isp: Add CSID binning
Add support to configure CSID binning

Change-Id: I09b76b287c243149c89cba958a786f7476c8addb
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-07-09 10:34:25 -07:00
Jigarkumar Zala
326d40f7f1 msm: camera: eeprom: Increase memory map count
For write operation while read memory memptr should not need to increase as
it leads to crash. This change removes that increase opertion. Also,
increasing map count to support more data reading for eeprom.

Change-Id: Ie71deb225c2513e7c18229d174a9a0e129fdd1f7
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-09 10:34:20 -07:00
Jigarkumar Zala
146826aa41 msm: camera: eeprom: Fix OOB condition for memory map count
Fix OOB check for memory map count to access correct memory map.

Change-Id: Ifa3d323103725e4df57e86295bb7567835654b71
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-09 10:34:15 -07:00
Abhilash Kumar
a52b95db19 msm: camera: cpas: QoS setting for IFE1
It corrects QoS value for IFE1.

Change-Id: Iab70f9262cb275be575704206f09c820327564ab
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
2019-07-09 10:34:11 -07:00
Venkat Chinta
e7e5e70f17 msm: camera: ife: Enable sample drop on CSID RDI paths
This change enables CSID sample drop on RDI paths by default. The
sample drop pattern, as always, is set to 0 at init. This allows
the userspace driver to simply program sample drop pattern on
desired RDI paths to obtain sample dropped output without having
to also overwrite config register to enable drop. This change
also takes care of programming max value to sample drop period on
version 480 hardware due to hardware limitations. It also adds a
separate header file for CSID Lite version 480 hardware.

Change-Id: I6e8ace1df3241b7ab4e34d9a13b382f5dde8b4f3
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-07-09 10:34:07 -07:00
Mukund Madhusudan Atre
af6455ddfd msm: camera: cpas: Add updated QoS settings for kona
Adding updated values for registers in camnoc address space
which determine QoS for different axi bw paths.

Change-Id: I6a24b7650f542938fd9720ae86a0330b5d4fd048
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-07-09 10:34:03 -07:00
Jigarkumar Zala
eedac0e21c msm: camera: Correct the return logic for error case
Currently for the flush request error case, mutex unlock is
executed without mutex lock which result in instability of
system. This change returns with appropriate error code
if error occurs.

Change-Id: I2ff0056002c7d96a7100295f2ed6ba5cc0da2254
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-09 10:34:00 -07:00
Jigarkumar Zala
657d77d87d msm: camera: icp: Protect icp context access at time of pagefault
Take mutex before acessing icp context to prevent improper free.

Change-Id: If2fd2c66dd9a00f1ab5c9ec1710573c2921dce6a
Signed-off-by: Prakasha Nayak <pnayak@codeaurora.org>
2019-07-09 10:33:56 -07:00
Jigarkumar Zala
2c55550c19 msm: camera: isp: Add debugfs parameter for state monitor dump
This change adds a debugfs parameter to enable isp context state
monitor dump rather than always print by default. This change
also changes isp context substate to HALT only after stop hw
is complete.

Change-Id: I1025a46e9be63b4ee5808c2eb44672687d901c2e
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-07-09 10:33:52 -07:00
Jigarkumar Zala
7fd239ba24 msm: camera: Enable top debug status cfg register
In case of VFE Overflow print additional debug
information based on whether the overflow is
on bus side or in the IFE modules.

Change-Id: I292bab0e75824bd1f151a4824f25220784c81172
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-07-09 10:33:49 -07:00
Jigarkumar Zala
391b3fa3d6 msm: camera: Update csiphy settings for lito
Update the register settings for CPHY 3phase.

Change-Id: I5cdc5cd348f9f861215206c59e674efdcdc7159c
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2019-07-09 10:33:45 -07:00
Jigarkumar Zala
f8b0159a3e msm: camera: Update dynamic clock voting for csiphy
Update the clock voting, datarate settings for
csiphy version 1.2.2.

Change-Id: I7b08819c1918d2eeec530733d42828e092bf2aa9
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2019-07-09 10:33:41 -07:00
Jigarkumar Zala
aeffc3147d msm: camera: Adds state variable in mem manager
Add state variable for camera mem manager to show initialization status.
Ensure that all operations are rejected before initialization.

Change-Id: I1ddbaaf6fbed59e4804476562c97f6895d99e916
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-07-09 10:33:35 -07:00
Jigarkumar Zala
40047f58df msm: camera: core : Validate the dev name during the node ioctl handler
Validate the context device name with node name. If device name is
not matching return the error.

Change-Id: I8dee4e6f64e17b0d1e486077a2c8b0df562a702e
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2019-07-09 10:33:30 -07:00
Mukund Madhusudan Atre
396a4cc576 msm: camera: Add LCR in axi bw vote and checks for memory free
Adding LCR resource id in isp bw voting for axi bw voting v1 path
and v2 path. Also, adding checks for unwanted memory free during
cpas probe.

Change-Id: Ib3dca34727b640326893fb227b160a42dab457fc
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-07-09 10:33:26 -07:00
Mukund Madhusudan Atre
c28468e278 msm: camera: Add custom ratelimit logs and use for old blob type
Adding custom ratelimited log types and use it in generic blob
handler for isp and icp.

Change-Id: Iec6c94f41506839055c5e0036d2e343849dc12b5
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-07-09 10:33:21 -07:00
Jigarkumar Zala
05349feaa2 Camera: Bring over camera driver changes
Bring over camera driver changes as of msm-4.19
commit  5a5551a7 (Merge "msm: camera: reqmgr: Fix CRM
shift one req issue").

Change-Id: Ic0c2b2d74d1b3470c1c51d98228e312fb13c501a
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-08 10:24:55 -07:00
Jigarkumar Zala
9be583aa80 Camera: Add makefile support for camera drivers
This change adds dummy Makefile support to compile camera
driver project along with base kernel.

Change-Id: I237ba87442c17869b7cc264371c5c3996f43eb95
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-06-12 10:39:18 -07:00
Git User
fe50fa1d50 Initial empty repository 2019-05-24 11:16:06 -07:00