Gráfico de commits

75 Commits

Autor SHA1 Mensaje Fecha
Savita Patted
b06c540564 Merge "msm: camera: cdm: Fix incorrect condition in cdm code" into camera-kernel.lnx.5.0 2021-11-01 19:58:39 -07:00
Savita Patted
16474f0533 Merge "msm: camera: cdm: handle dead lock scenario" into camera-kernel.lnx.5.0 2021-11-01 19:21:14 -07:00
Jigar Agrawal
6c9d86d45f msm: camera: cdm: Fix incorrect condition in cdm code
Fix the incorrect condition in the cdm code and also
remove cdm debug register dump from ife_hw_mgr_config
function to avoid the duplication of the dump with the
one being printed from cdm workqueue.

CRs-fixed: 3064926
Change-Id: Idd5938030d4f9737e5ab3301d08dd221b25a54ea
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-27 23:51:24 -07:00
Vikram Sharma
0f54afd904 msm: camera: cdm: handle dead lock scenario
This change handles a race condition in which cdm workqueue is
scheduled on one of the cores and cdm flush is executing on
another core. We come across a dead lock between fifo_lock and
hw_mutex lock.

CRs-Fixed: 3049531
Change-Id: Ie0b8982a7e55218fc5655f8e3d08a952fd852ed7
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-10-24 21:40:04 -07:00
Jigar Agrawal
fa53fa410e msm: camera: cdm: Fix cdm bl submit function
Fix the possibility of uninitialized variable
getting returned by the cdm_bl_submit function.

CRs-fixed: 3038735
Change-Id: Ib40d83ac2e8c7826197aa73de64f5dbf4996f0a5
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-22 10:00:48 -07:00
Camera Software Integration
21d78e35c1 Merge "msm: camera: common: Add wrapper for presil locking" into camera-kernel.lnx.5.0 2021-10-12 19:30:53 -07:00
Haritha Chintalapati
8451fc8e8c Merge "msm: camera: cdm: Fix cdm driver for bufffer excursion" into camera-kernel.lnx.5.0 2021-10-11 21:10:23 -07:00
Suraj Dongre
1d86110d7b msm: camera: common: Add wrapper for presil locking
Presil IRQ handling requires running in a workqueue, with
wait for acknowledgement in io operations. This busy wait
should be done while holding a mutex lock as opposed to
spinlock in usual irq context. Add wrapper to switch from
spinlock to mutex for presil mode in irq controller and
cdm. Add the hw lock wrapper in hw interface header.

CRs-Fixed: 2932495
Change-Id: I7600eb1e6ae8746a39e76f6cb3a2652b255f2ddd
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-10-11 10:34:34 -07:00
Jigar Agrawal
6c91eb5bf0 msm: camera: cdm: Fix cdm driver for bufffer excursion
Update the cdm submit bl function to use allocated
genirq memory for genirq command instead of appending
the command to the last BL entry to prevent possibly
using the memory not mapped. Also, add some more logs
to make the debugging easier.

CRs-fixed: 3029732
Change-Id: I2fc679bef4c0f72031798a03b26f840b6b4ef746
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-06 12:27:35 -07:00
Jigar Agrawal
42d92dea61 msm: camera: cdm: Correct the CDM iommu handle
Correct the CDM iommu handler by changing the
false pid and mid values written in the cdm
header file. Also, adding a support to read the
pid and mid from the dtsi file, since there is
already support for the PID values available in the
dtsi.

CRs-fixed: 2982542
Change-Id: I319a32fdcba44a6a96b79e4e67b0a2cc0e01bc4c
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-29 12:55:45 -07:00
Mukund Madhusudan Atre
5dba22d1fc msm: camera: common: Add buffer send and receive mechanism
Add packet based buffer send and retrieve mechanism for
presil testing.

CRs-Fixed: 2932495
Change-Id: Ifd1e0fdb8b12feabb884e02a07a3813db01a3899
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-09-09 12:41:00 -07:00
Shravya Samala
e647fae22b msm: camera: cdm: Acquire mutex lock before accessing client data
There is a chance of use after release of client data in
cdm internal operation calls. Hence acquire mutex lock whenever
accessing client data to avoid use after release scenario.

CRs-Fixed: 3010261
Change-Id: Iaf7f41d56301299a6f63a5dc1090334063019881
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2021-09-06 04:52:07 -07:00
Ayush Kumar
8554f46816 msm: camera: core: Add delay detection support
This changes is to detect workqueue and tasklet
scheduling and execution delay.

CRs-Fixed: 2977775
Change-Id: Ia4b4845a067c22bd1f24bd63a971d103fcfc049c
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-08-11 22:18:10 +05:30
Sokchetra Eung
ba664cddff msm: camera: common: Append workq name in log
Append workq name in workq delay detect API to identify
which workq is scheduled late. Create workq name macros for
cci and cpas to pass to workq delay detect API.

CRs-Fixed: 2994927
Change-Id: Iebc14520b918272e92b59c900de5fe17f38a2406
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-07-26 17:43:37 -07:00
Savita Patted
a1e328751b Merge "msm: camera: core: v780 enhanced memory addresses" into camera-kernel.lnx.5.0 2021-07-08 13:23:13 -07:00
Savita Patted
5602b6385c Merge "msm: camera: common: add support to override cdm version in presil" into camera-kernel.lnx.5.0 2021-06-29 18:16:58 -07:00
Karthik Jayakumar
0d00f4feee msm: camera: core: v780 enhanced memory addresses
Added support for v780 enhanced memory address handling

CRs-Fixed: 2948659
Change-Id: I46ed16ad70103553a18cc69d762c6d93fc9fd8d9
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-06-29 11:08:03 -07:00
Camera Software Integration
c6903209f2 Merge "msm: camera: common: Fix dma_attr_t types" into camera-kernel.lnx.5.0 2021-06-28 17:27:09 -07:00
Ridhi Shah
dd286cfcec msm: camera: common: add support to override cdm version in presil
Read version and family from device tree if presil enabled.

CRs-Fixed: 2932495
Change-Id: I6a2518c033ee42202ab7ad2beb839aad20679311
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: ridhshah <ridhshah@codeaurora.org>
2021-06-23 23:24:06 -07:00
Camera Software Integration
aa7b29f27e Merge "msm: camera: cdm: Add cdm debug status register" into camera-kernel.lnx.5.0 2021-06-23 16:22:12 -07:00
Karthik Jayakumar
9e5bc7a1f4 msm: camera: common: Fix dma_attr_t types
Fixes typecasts from dma_attr_t types to uint32_t types for memory
management.

CRs-Fixed: 2948659
Change-Id: Ie3898176195ac508f1a922a5e499e6e33ac8e490
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-06-23 10:09:24 -07:00
Mukund Madhusudan Atre
98d31d3a7c msm: camera: common: Remove Hw access during probe
Remove HW access code during probe to avoid presil crash.

CRs-Fixed: 2932495
Change-Id: I9bcf357a6f5beb5f3c1c4a181a6db980909eddd5
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-06-02 11:12:27 -07:00
Jigar Agrawal
b5c4f91b83 msm: camera: common: Add a check for 0 reg-val pairs in cdm command
Add a check for reg-val count=0 in reg_random command. Count=0 in
reg_random cdm command will throw an invalid command HW error.

CRs-Fixed: 2916477
Change-Id: Idb8654c3752963cf5a52147d350e291208b917d0
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-20 12:17:50 -07:00
Chandan Kumar Jha
33e2e42d3d msm: camera: cdm: Add cdm debug status register
This change adds missing cdm debug status register
offsets for cdm version 1.0 that are read during cdm hang.

CRs-Fixed: 2898496
Change-Id: I3a83d13f6b18231561973054845cb87b1ffc4b2d
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2021-04-09 09:53:28 -07:00
Alok Chauhan
8e6883ec80 msm: camera: cdm: Update hang detect logic
Currently cdm driver is updating work records
in case of all the interrupts received, but
decrementing only when it schedule workq for
inline irq interrupt. This causes the mismatch
in work records and return incorrect work records
count when cdm client check the cdm hang detect.

Updated hang detect logic in cdm driver.

CRs-Fixed: 2878695
Change-Id: I7039422bf573a7105c16ac2f752eb235c377bfee
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-04-07 19:42:07 +05:30
Alok Chauhan
a78cf863fd msm: camera: ope: Dump stripe info at the time of hang
Add logic to dump stripe info and wait event status at the
time of cdm hang.

CRs-Fixed: 2878214
Change-Id: Ib9892b0273e4436988c5f1384d18d60d29529c94
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-04-06 21:48:51 +05:30
Karthik Jayakumar
8abb54dcb1 msm: camera: cdm: Fix of_match table null entry
global-out-of-bounds issue on:
msm_cam_hw_cdm_dt_match
Due to no null-terminating struct in the array.

CRs-Fixed: 2883523
Change-Id: I36e4811f239993e1e6de158df959157217c28bfe
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-03-22 16:53:25 -07:00
Savita Patted
c3ecd6ea84 Merge "msm: camera: cdm: check reset status for error" into camera-kernel.lnx.5.0 2021-03-09 20:19:26 -08:00
Savita Patted
1ee4bca76c Merge "msm: camera: ope: Handle OPE smmu fault with pid info" into camera-kernel.lnx.5.0 2021-03-09 20:18:26 -08:00
Savita Patted
32a20d55b8 Merge "msm: camera: cdm: Added cdm power state check" into camera-kernel.lnx.5.0 2021-03-09 20:15:55 -08:00
Savita Patted
cfd72a176a Merge "msm: camera: cdm: corrected submit bl logic" into camera-kernel.lnx.5.0 2021-03-09 20:15:35 -08:00
Savita Patted
af5d84791b Merge "msm: camera: cdm: Fix cdm driver for single BL FIFO" into camera-kernel.lnx.5.0 2021-03-09 20:14:30 -08:00
Tejas Prajapati
2918136eb0 msm: camera: cdm: check reset status for error
If there are any reset errors for the CDM, CDM should
send error to UMD upon reset failure. Updated the
error status with relevant error code.

CRs-Fixed: 2882732
Change-Id: I12e746f71b1a294aa4e7ef540f39aec91fb44648
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2021-03-08 10:08:57 -08:00
Jigar Agrawal
dce790a1e7 msm: camera: cdm: Fix cdm driver for single BL FIFO
Avoid iterating for masked BL fifos for single BL
fifo usecase. Also, Fix an if condition in cdm
workque function to check for fifo index correctly
for single BL FIFO usecase.

CRs-Fixed: 2893426
Change-Id: Id3c740a9d311863c0f08c331f9e5de992a721e30
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-03-05 12:20:03 -08:00
Gaurav Jindal
bc400e47fa msm: camera: common: Add common wait and poll interface
In current implementation, each driver call wait_for_completion_timeout
and readl_poll_timeout with own timeout values.
In case of slow environments like presil, lot of hacks are needed to
change the timeouts for each driver. It needs multiple code changes
and compilations, thus consuming time.
This commit implements a common interface to call
wait_for_completion_timeout and readl_poll_timeout.
Debug variable is also introduced to
change the timeout value. This will help to change the timeout
without compilations and changes at multiple places.

Change-Id: Iba51e0805a49ed325147a12688c2fe6619bb68e6
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-03-02 14:17:09 +05:30
Vikram Sharma
57bff5aede msm: camera: ope: Handle OPE smmu fault with pid info
Kernel apis provide information fault caused pid and mid data.
Handle the OPE smmu fault using pid and mid data. Based on the
mid data, dump only corresponding port info which caused the
fault. Pid and mid values are target dependent, these values
will be updated on the ope node dt entries.

CRs-Fixed: 2857868
Change-Id: I909f1787e71e67e5ed1d3464dfeb506418d151e4
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-02-24 23:40:40 -08:00
Alok Chauhan
eb8a5f569c msm: camera: cdm: corrected submit bl logic
CDM driver check for available bl fifo slots before
submitting to HW. If no free slots available then
it wait for CDM HW to process all the BLs and return
available slots.

CDM driver was incorrectly calculating the available bl
slots and causing bl fifo overflow.

Corrected the sequence in wait for bl fifo logic.

CRs-Fixed: 2837583
Change-Id: I2861f8c66822e0739f0546eaf153d8e2af0caefe
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-02-24 23:32:17 -08:00
Alok Chauhan
1a1bce2765 msm: camera: cdm: Added cdm power state check
There is chance that handle error info get scheduled
after cdm deinit. As clock and regulator gets disabled
as part of deinit so this can cause issue for cdm hw
interaction as part of handle error.

Added cdm power state check before dumping CDM HW
status at the time of error.

CRs-Fixed: 2833653
Change-Id: I4bf01ce3900196909cf66ffdb24607c50ab03295
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-02-24 10:58:10 -08:00
Jigar Agrawal
bfab1a634a msm: camera: cdm: Improve cdm debug registers dump
Improve the cdm debug register dump to dump more
registers and more information.

CRs-Fixed: 2874806
Change-Id: Ica9a5b63bbb30c59463c6b2c0115a452def0fcf8
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-09 17:49:28 -08:00
Jigar Agrawal
75ce23ee72 msm: camera: cdm: Improve cdm logging
Improve the CDM logging for better debugging purpose.

CRs-Fixed: 2836601
Change-Id: I75213e17edf2fb42204a6e3d983a76892362b1d4
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-01-12 14:57:52 -08:00
Alok Chauhan
63bca8c33d msm: camera: cdm: Improve error handling during cdm hang
Reduce logging as part of error handling to avoid
flooding kernel log with excessive log. Apart from
that send feedback to client irrespective of cdm
reset status.

CRs-Fixed: 2826285
Change-Id: I9b0d8c6f64ced4972bb20e26774508573c815e4f
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-12-02 10:38:53 +05:30
Jigar Agrawal
adfc0a0da2 msm: camera: cdm: Add more registers in cdm dump
Add more CDM registers in cdm dump function for better
debugging.

CRs-fixed: 2816605
Change-Id: I3925a094ee89e7f8f3d6ed6eead45c099ca4ac09
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-11-11 10:14:40 -08:00
Tejas Prajapati
4574450a12 msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
msm: camera: cdm: Fix dangling pointer issue
msm: camera: cdm: change work record to atomic variable
msm: camera: utils: Adding device type to track device handles
msm: camera: tfe: Reduce stack footprint during bw vote
msm: camera: req_mgr: Thread switch delay detection mechanisms
msm: camera: cdm: Avoid submitting BL if FIFO is full
msm: camera: tfe: check cdm hang in the tfe config timeout
msm: camera: req_mgr: Delay detection mechanism
msm: camera: cdm: Debug info in case of cdm page fault
msm: camera: isp: Max context reduction for TFE in isp driver
msm: camera: ope: Maintain current clock value during acquire
msm: camera: req_mgr: Limit CAM_ERR log in case of no empty task
msm: camera: cdm: Decrement write-count only after Bl commit
msm: camera: isp: Added CSID recovery mechanism.

CRs-Fixed: 2792394
Change-Id: I1c7a903ae15b572acf3f6318cda7394cb6549c8d
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-10-13 12:08:01 +05:30
Jigar Agrawal
d74902f0cf msm: camera: cdm: Add CDM hang detect and debug registers dump support
Add support to dump the cdm core debug registers and CDM hang detect
support for better debugging purpose in case of cdm timeout at config
ife. Add a debugfs for CDM command buffer dump for cdm hang events.
Fix the possible NULL derefernce while dumping the cdm registers.
Turn on debugfs using following command in adb shell:
echo 1 >> /sys/kernel/debug/camera_isp_ctx/enable_cdm_cmd_buffer_dump.

CRs-Fixed: 2748715, 2782720, 2770565
Change-Id: Ibb9aa1d232d742ca1b6e64c16e9718bfc0bc8624
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-10-01 12:41:57 -07:00
Jigar Agrawal
5298a2471e msm: camera: cdm: Support CDM2.1 for new Chipset
Add support single-context CDM for CDM2.1.

CRs-fixed: 2770438
Change-Id: I894ebc9fc770fe25c7cd1c18099d3c06af319245
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-09-10 10:01:01 -07:00
Jigar Agrawal
eadc13255c msm: camera: cdm: Fix parsing of supported cdm clients
cdm client check for loading number of clients is
not correct. It does not take error codes into account.
The variable that holds the value is of incorrect
data type.

CRs-fixed: 2768636
Change-Id: Ie5b752aa6bc7a70fe777c16a70a5bdb2e5a663a4
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-09-04 15:26:28 -07:00
Trishansh Bhardwaj
7aa0932eeb msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
msm: camera: ope: Fix OPE hang dump
msm: camera: cdm: Add a check for fifo list in cdm workqueue
msm: camera: ope: Add a check to validate dmi cmd address
msm: camera: ope: Add check for number of stripe
msm: camera: tfe: Support tfe pdaf port
msm: camera: ope: Handle reset IRQ delay
msm: camera: ope: enable pp modules hw status dump
msm: camera: ope: Fix OPE clock issue
msm: camera: ope: Add LDAR dump support
msm: camera: ope: Add context state check in process cmd
msm: camera: ope: Change parameters to find time difference
msm: camera: ope: Add debug fs for dumping frame setting logs
msm: camera: ope: Add debugfs support to dump ope hang dump
msm: camera: tfe: Handle unsupported outport format
msm: camera: ope: add page fault handlers in ope driver
msm: camera: ope: Reduce OPE BUS memory
msm: camera: ope: Change turbo clock limit.

CRs-Fixed: 2729996
Change-Id: I683ed07082b455599f89dbc18f353b6a1e48b129
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-08-30 14:22:47 +05:30
Ravikishore Pampana
b746c4f527 msm: camera: core: Send event on smmu page fault
Currently when page fault happen, iommu driver callers camera
handler with CB details and iova address which caused the page
fault. With iommu iova address cam smmu driver finds the
closest mapping address for that cb and call the
corresponding driver to find the which port caused page fault.
This has limitation has page fault address always not mapped.
New approach is get the page fault ids from iommu driver.
Based on the Pid and Mid values, get the HW id and port ids,
go through all context which has this hw id and port id and log
the data. Once context id is identified, log the acquire data and
last consumed client address details. Dump the hw register data
in the given buffer. Send the smmu page fault event through
v4l2 queue to user.

CRs-Fixed: 2750690
Change-Id: I87c809b3229992c7c95655a4f3c6c70ebc035ae8
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-08-19 14:16:38 +05:30
Trishansh Bhardwaj
97eeefea15 msm: camera: tfe: Enable TFE and OPE for bengal
Enable TFE and OPE compilation for bengal target.

CRs-Fixed: 2729996
Change-Id: I648cae32f39a5bf7225c8be545f1c310e24db8e6
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-07-23 05:42:11 -07:00
Depeng Shao
41ffa1f4f9 msm: camera: cdm: Fix out of bounds issue
The dt match table needs end up with null.

CRs-Fixed: 2730795
Change-Id: I75bdf20d74d9a83d9a0de28a2ad4d95412a51f0c
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-13 22:00:25 +08:00