Commit Graph

560 Commits

Author SHA1 Message Date
Vishal Verma
1435a8a68b msm: camera: sensor: Dump phy registers on error
Dump csiphy registers on following fatal errors:
1. lane overflow error
2. unbounded frame error
3. SOT ans EOT reception error
4. stream underflow error
These errors irqs are set at csid end, Currently there is no
interface to send message from one subdevice to other if the subdev is
not a real time device. This change adds an interface to notify the
no real time subdev.

CRs-Fixed: 2696744
Change-Id: I522167d1639ac298bc739a8a5a380a01356f0776
Signed-off-by: Vishal Verma <vishverm@codeaurora.org>
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-06-12 12:24:12 -07:00
Camera Software Integration
1b7fd53958 Merge "msm: camera: custom: Add support for SW sync & snapshot" into camera-kernel.lnx.4.0 2020-06-10 12:24:54 -07:00
Camera Software Integration
c53970bcb2 Merge "msm: camera: config: Enable camera as dlkm for lahaina" into camera-kernel.lnx.4.0 2020-06-10 12:24:46 -07:00
Camera Software Integration
e421fea518 Merge "msm: camera: common: Fixes the exit module code flow" into camera-kernel.lnx.4.0 2020-06-10 12:24:30 -07:00
Camera Software Integration
eb02dbe318 Merge "msm: camera: custom: Add dt matching string for spectra580 csid" into camera-kernel.lnx.4.0 2020-06-10 12:24:21 -07:00
Camera Software Integration
842380c465 Merge "msm: camera: cpas: Add support for custom QoS selection" into camera-kernel.lnx.4.0 2020-06-10 12:24:12 -07:00
Camera Software Integration
c651d58e4f Merge "msm: camera: ife: Add support to provide IFE count in Query caps" into camera-kernel.lnx.4.0 2020-06-09 16:04:46 -07:00
Pavan Kumar Chilamkurthi
54f5035aa7 msm: camera: custom: Add dt matching string for spectra580 csid
Add dt matching string to probe spectra580 custom csid device.

CRs-Fixed: 2687917
Change-Id: Ibf220dd88dfad76742b71e7550f6b50ff6b2f57e
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-06-09 14:16:01 -07:00
Pavan Kumar Chilamkurthi
5cb16c01ed msm: camera: cpas: Add support for custom QoS selection
Add cpas interface to allow clients or usecase to select
different QoS settings based on requirement. Selection
API must be called before camera hw powers up.

CRs-Fixed: 2687917
Change-Id: Ie524fcd6131d7c42288d0d734a7cdf6b9fcb92b7
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-06-09 14:13:57 -07:00
Jigarkumar Zala
279dfebf8c msm: camera: common: Fixes the exit module code flow
Fixes exit call flow as a part of rmmod.

CRs-Fixed: 2675526
Change-Id: I47111a737cb06d9bb3d0a417a471c5c9fb545999
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-06-09 12:08:22 -07:00
Jigarkumar Zala
ebb82d948c msm: camera: config: Enable camera as dlkm for lahaina
Enable camera as dlkm for all flavor of compilation.

CRs-Fixed: 2701988
Change-Id: Ic1bdd64cd612636613d3b1419c7bebc136023948
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-06-09 00:26:34 -07:00
Jigar Agrawal
6de4fa2ed8 msm: camera: ife: Add support to provide IFE count in Query caps
IFE Query cap currently gives only IFE Full Information. Update the
code to return IFE Full, IFE lite, full IFE-CSID and IFE-CSID lite
information in return of the IFE Query cap command.

CRs-Fixed: 2647995
Change-Id: I84cf5b766ce191aacad4a1de478c6eebafe917b3
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-06-08 14:15:40 -07:00
Karthik Jayakumar
083b98cdb3 msm: camera: ife: check for constraint violation
Add support for debugging constraint violations within
the VFE Bus.

CRs-Fixed: 2545323
Change-Id: Ib8805b6b61284ac869218cab4d6689ded23bf98a
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-06-08 10:28:17 -07:00
Camera Software Integration
f65f27de96 Merge "msm: camera: reqmgr: Invoke custom device at every frame" into camera-kernel.lnx.4.0 2020-06-05 19:10:14 -07:00
Camera Software Integration
57370f9f42 Merge "msm: camera: isp: Wait for cdm submit incase of custom HW" into camera-kernel.lnx.4.0 2020-06-05 19:10:02 -07:00
Camera Software Integration
d923b858c9 Merge "msm: camera: cdm: Add support for CDM 2.1" into camera-kernel.lnx.4.0 2020-06-05 19:09:49 -07:00
Camera Software Integration
9d3794440c Merge "msm: camera: isp: Check for epoch before applying" into camera-kernel.lnx.4.0 2020-06-05 19:09:40 -07:00
Camera Software Integration
f480c039c7 Merge "msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0" into camera-kernel.lnx.4.0 2020-06-04 15:22:48 -07:00
Trishansh Bhardwaj
159ea8087f msm: camera: cdm: Add support for CDM 2.1
This change adds CDM 2.1 support.

CRs-Fixed: 2682747
Change-Id: I9e0782a5e7d8e22706048469669772c21d883d89
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-06-04 22:51:21 +05:30
Karthik Anantha Ram
02af3487fa msm: camera: custom: Add support for SW sync & snapshot
Add support to handle SW sync & ZSLSnapshot. Add substate machine
and mechanism to handle the lifecycle of requests based on irqs
accordingly.

CRs-Fixed: 2524308
Change-Id: Ie5ba97d4ae1b38f4b44c2d3935d2882df59fcac6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-06-04 10:17:55 -07:00
Karthik Anantha Ram
f81a46003b msm: camera: reqmgr: Invoke custom device at every frame
If there is a valid request CRM will apply that request to the
custom device, in scenerios during which there is no setting to
be applied to a custom device at a given epoch CRM needs to invoke
the custom device to program default settings for the next frame.

CRs-Fixed: 2524308
Change-Id: I4701c602ab68b9f64266f03a9b200d15a808165e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-06-03 16:44:50 -07:00
Camera Software Integration
c4d16b525c Merge "msm: camera: cci: Correct logging for better debug" into camera-kernel.lnx.4.0 2020-06-03 12:39:24 -07:00
Trishansh Bhardwaj
172d34b6f7 msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
msm: camera: tfe: Fix variable initialization issues
msm: camera: isp: Dual tfe event check with proper hw idx
msm: camera: smmu: Add support for non-contiguous mermory region
msm: camera: smmu: Use iommu best match algo for camera
msm: camera: ope: Optimize allocation of IO configuration
msm: camera: ope: Fix for KW Issues
msm: camera: ope: Add support for stripe level height configuration
msm: camera: tfe: Enable the delay line clc
msm: camera: ope: Fix false alarm for OPE HW timeout
msm: camera: tfe: Support register dump per request
msm: camera: ope: Increase max number of stripes
msm: camera: ope: Change packer and unpacker format in case NV12
msm: camera: tfe: Add packet code get command for tfe
msm: camera: ope: Trigger recovery in case of violation on write bus
msm: camera: ope: Protect ope hw reset with mutex
msm: camera: ope: Add a check for valid request in cdm callback
msm: camera: ope: Remove the BW & clock vote in release context
msm: camera: ope: Reduce OPE BUS memory
msm: camera: ope: Fix return value for ope acquire
msm: camera: ope: Fix false alarm for OPE request timeout
msm: camera: ope: Avoid deadlock during recovery after HW hang
msm: camera: tfe: tfe debug enhancement
msm: camera: cdm: Fix irq_data value in case of inline irq
msm: camera: flash: Switch off flash on provider crash
msm: camera: ope: Initialize ope hw mutex structure
msm: camera: cdm: Flush all available FIFOs during reset
msm: camera: cpas: Add mandatory bw option for axi ports clocks
msm: camera: ope: Use vzalloc to allocate the write bus ctx structure
msm: camera: ope: Fix handling of init hw failure
msm: camera: tfe: Enable per frame register dump for rdi only context
msm: camera: cdm: Protect cdm core status bits with mutex
msm: camera: cdm: correct the error check in cmd submit irq
msm: camera: ope: Fix unclock access during HW reset
msm: camera: ope: Program frame level settings after idle event
msm: camera: ope: Delay releasing of resources for last context
msm: camera: isp: Increase default SOF freeze timeout
msm: camera: smmu: Add map and unmap monitor
msm: camera: isp: Add trace events across ISP
msm: camera: smmu: Profile time taken for map, unmap
msm: camera: ope: Start context timer on receiving new request
msm: camera: tfe: Reduce stack size during set axi bw
msm: camera: cdm: Check for HW state before dumping registers
msm: camera: ope: Reduce stack footprint during acquire
msm: camera: tfe: Disable clock if tfe2 is not supported
msm: camera: cdm: Avoid cdm pause incase of BL submit
msm: camera: tfe: Optimize CSID IRQ logging
msm: camera: ope: Move request id validity check outside of lock
msm: camera: tfe: Correct the tfe hw manager dump logic
msm: camera: ope: Synchronize flush and submit BLs
msm: camera: cdm: Protect cdm reset status
msm: camera: cdm: Handle cdm deinit sequence properly
msm: camera: tfe: Reduce reset timeout to 100ms
msm: camera: ope: Fix hang detection
msm: camera: ope: Make non-fatal logs as debug and info logs
msm: camera: tfe: set overflow pending bit to zero after HW reset
msm: camera: ope: Do not disable CDM during error handling
msm: camera: ope: Add support for OPE Replay
msm: camera: ope: Stop OPE in case of init failure
msm: camera: ope: Synchronize process cmd and flush request
msm: camera: cdm: Fix CDM IRQ handling
msm: camera: tfe: LDAR dump for TFE
msm: camera: ope: Fix the length check for debug buffer
msm: camera: cdm: Fix CDM reset logic
msm: camera: ope: Dump debug registers in case of HW hang
msm: camera: tfe: Support the RDI bus port for line based mode
msm: camera: cdm: Handle out of order reset done events
msm: camera: ope: Consider other contexts during timeout
msm: camera: ope: Put GenIRQ in last stripe BL
msm: camera: tfe: Process the rdi interrupts for rdi only resource
msm: camera: jpeg: Check the HW state before accessing register
msm: camera: csiphy: Update csiphy power-up sequence for lito v2
msm: camera: cdm: Secure freeing of request lists using locks
msm: camera: cpas: Add support for Scuba camnoc
msm: camera: csiphy: Clear secure phy flags on release
msm: camera: tfe: validate the tfe bw num paths
msm: camera: ope: Reorder the reset order in ope acquire
msm: camera: ope: Dump debug registers in case of reset failure
msm: camera: ope: Add logic to detect hang in CDM
msm: camera: isp: Increase max count of cfg to support more init packets
msm: camera: core: Fix cpas axi clk rate overflow.

CRs-Fixed: 2668666
Change-Id: I882ca4bd117bebc7d1c62bc82299d69d7b5c9388
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-06-03 11:48:47 +05:30
Camera Software Integration
76586bbff2 Merge "msm: camera: isp: Fix num_entries value assigned to variable" into camera-kernel.lnx.4.0 2020-06-02 17:00:40 -07:00
Camera Software Integration
ca0de99342 Merge "msm: camera: common: Correct compilation flag for TFE hw" into camera-kernel.lnx.4.0 2020-06-02 17:00:33 -07:00
Venkat Chinta
4544e11ed9 msm: camera: isp: Check for epoch before applying
When there is a delay in offline ife workqueue scheduling
it is possible that two requests are applied back to back.
This could lead to requests lost. Therefore we must check
for epoch flag before applying any request.

CRs-Fixed: 2686281
Change-Id: I323710a61301d79e78db22dc1f66a6a0f141389a
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-06-01 10:19:08 -07:00
Vishalsingh Hajeri
68846d2555 msm: camera: isp: Fix num_entries value assigned to variable
num_cfg_new temp variable should be assigned the value of
num_hw_entries from new isp request instead of old isp request.

CRs-Fixed: 2673657
Change-Id: Ie4d29949e2c992560b6635f7e0b5db88c2dafd48
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-05-29 14:47:55 -07:00
Jigar Agrawal
cb7abacaf6 msm: camera: cci: Correct logging for better debug
Correct and Update logs for better debugging purpose.

CRs-Fixed: 2686717
Change-Id: I2f7720e32aaf44764e6341813bb35c1717125a67
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-05-29 11:38:09 -07:00
Jigarkumar Zala
5c24b7d2d6 msm: camera: common: Correct compilation flag for TFE hw
TFE hardware compilation needs to be enable with correct flag.
Correct tfe compilation flag along with necessary base Makefile
change. Also, remove unnecessary makefiles from tfe hw module.

CRs-Fixed: 2675526
Change-Id: Ibd8b8f5acc4f843bf373e14a9c8e3bc41cb58839
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-05-28 18:31:43 -07:00
Karthik Anantha Ram
8f54a50732 msm: camera: isp: Wait for cdm submit incase of custom HW
If IFE is connected to custom HW in the pipeline, make the cdm
submit a blocking call to ensure settings are programmed to IFE
on time.

CRs-Fixed: 2687917
Change-Id: Ib7a3c44f3f99a30805c1cbf49669dabc27d20431
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-05-28 18:19:30 -07:00
Jigarkumar Zala
a4f5f1e512 msm: camera: flash: Add flash off operation in shutdown
There is high chances, when camera server crash flash may not have
flash off request scheduled with CRM. In case of torch on, followed
by shutdown sequence, if flash off request is not scheduled, flash
remains turned on. This change adds flash off operation, in case
of shutdown.

CRs-Fixed: 2691916
Change-Id: I472f2b204b93d0cdc3d8a1f14fff29ab479e4588
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-05-28 16:47:41 -07:00
Camera Software Integration
f458d8e16a Merge "msm: camera: sync: Increase number of fences in sync" into camera-kernel.lnx.4.0 2020-05-26 13:14:29 -07:00
Camera Software Integration
07a53e7a01 Merge "msm: camera: cci: Correct the check and return code" into camera-kernel.lnx.4.0 2020-05-26 13:14:11 -07:00
Camera Software Integration
f947043b90 Merge "msm: camera: reqmgr: Add subdev node at the time of register" into camera-kernel.lnx.4.0 2020-05-26 13:14:02 -07:00
Camera Software Integration
efaf7facfb Merge "msm: camera: sync: Add SYNC_CANCEL support in sync driver" into camera-kernel.lnx.4.0 2020-05-26 13:13:46 -07:00
Camera Software Integration
6990de7ea5 Merge "msm: camera: ife: Change log level" into camera-kernel.lnx.4.0 2020-05-22 13:09:57 -07:00
Camera Software Integration
7cc1ee3b13 Merge "msm: camera: uapi: Support for UAPI_HEADER_TEST config" into camera-kernel.lnx.4.0 2020-05-22 13:09:48 -07:00
Camera Software Integration
c1c4a0651a Merge "msm: camera: cpas: Add mandatory bw option for axi ports clocks" into camera-kernel.lnx.4.0 2020-05-22 13:09:33 -07:00
Camera Software Integration
46c7b6bf79 Merge "msm: camera: util: Correct the return code" into camera-kernel.lnx.4.0 2020-05-22 13:09:22 -07:00
Karthik Jayakumar
c6096c4e35 msm: camera: uapi: Support for UAPI_HEADER_TEST config
Aligns the uapi header types and includes to be in-line with upstream
kernel formatting. The errors are given by enabling the UAPI_HEADER_TEST
config, which is now enabled in GKI builds.

CRs-Fixed: 2679250
Change-Id: I195fb2aab9251043fc63d79dd31f2db53b1228f5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-05-21 21:35:50 -07:00
Mukund Madhusudan Atre
f54a60cc9e msm: camera: reqmgr: Add subdev node at the time of register
Some driver probes do not have a real dependency on other
driver probes. Still, they are blocked from creating subdev
nodes if that driver's probe comes after all nodes were created
in master component bind. Add subdev node at the time of subdev
register itself, to lift this requirement.

CRs-Fixed: 2686729
Change-Id: I3505071a79296dd7d5665b13d533a9a022aa1a85
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-05-21 18:52:56 -07:00
Jigarkumar Zala
a1f635192b msm: camera: cci: Correct the check and return code
Update the master status data type, as it expects the negative value
and do the operation accordingly. Also, correct the return code and
update the validation check.

CRs-Fixed: 2686717
Change-Id: I8ecae74de2995a08e532a7f0ef078d48d45a928e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-05-21 13:35:04 -07:00
Pavan Kumar Chilamkurthi
74410fea6b msm: camera: sync: Add SYNC_CANCEL support in sync driver
Add SYNC_CANCEL definition and signal CANCEL instead of
ERROR in flush cases.

CRs-Fixed: 2673810
Change-Id: I1bd83e382f9b38f5f020a5af3b883083e211e3d2
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-05-20 12:48:36 -07:00
Alok Chauhan
0ec65e7c74 msm: camera: cpas: Add mandatory bw option for axi ports clocks
Bw voting is mandatory to enable rt_axi and nrt_axi
clocks. Adding support for the same.

CRs-Fixed: 2585073, 2685467
Change-Id: I236b3940faea3925e668e0e5ddbf61e8e569b2f7
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-05-15 20:30:22 -07:00
Karthik Anantha Ram
26ef750076 msm: camera: isp: Update last reported request ID correctly
The last reported request ID indicates the request ID for which
the shutter was sent last. Only update this field for requests
that have not bubbled in a given IFE ctx.

CRs-Fixed: 2680502
Change-Id: I9ee4b479fe95800efa40ea1ff8d840fc79ef6528
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-05-15 12:50:29 -07:00
Jigarkumar Zala
0bede4b524 msm: camera: util: Correct the return code
For secure mode, csiphy driver ask for secure stream. Currently
this call always return success. This change return the appropriate
result of failure/success.

CRs-Fixed: 2673418
Change-Id: Ib425ad77e6481888acefdaf843256602aa759cf3
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-05-12 17:30:41 -07:00
Mukund Madhusudan Atre
bfdaaba4eb msm: camera: sync: Increase number of fences in sync
Some mfhdr usecases require more than 1024 fences because of
delayed request processing and bypass. Increase maximum number
of fences or sync objects to 2048.

CRs-Fixed: 2598592
Change-Id: If11fa2986fce0cd97c14370d29a117230134d6f5
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-05-11 14:26:17 -07:00
Camera Software Integration
beb3ea37bb Merge "msm: camera: common: Remove extra CAM_INFO logs" into camera-kernel.lnx.4.0 2020-05-07 20:31:15 -07:00
Camera Software Integration
1d8c2c33ae Merge "msm: camera: isp: Fix checking for valid bw vote" into camera-kernel.lnx.4.0 2020-05-07 20:30:59 -07:00
Camera Software Integration
15f0a07e50 Merge "msm: camera: sync: Fix kbuild config checks for synx driver" into camera-kernel.lnx.4.0 2020-05-07 20:30:46 -07:00