Commit Graph

112 Commits

Author SHA1 Message Date
Suraj Dongre
d7b6770119 msm: camera: common: Add condition for presil read poll
Add presil read poll call in common poll timeout function
when presil mode is enabled.

CRs-Fixed: 2932495
Change-Id: Ib3cdf0e3963bd50fe6e0bd6e32cff7ff350f6125
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
2021-09-21 13:39:51 -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
Karthik Anantha Ram
1b34b6460d msm: camera: common: Send 0 rate to MMRM for src clocks
Send clock rate as 0 for src clocks to MMRM, when disabling
the clock. This will help MMRM in peak overshoot computation.

CRs-Fixed: 2841729
Change-Id: I048b530fb620f0e47e1596f31e2ca12ff43bb471
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-08-31 12:10:24 -07:00
Gaurav Jindal
d266ac8813 msm: camera: common: Add camera minidump changes
Based on targets, in case of device crash, in place
of complete memory dump, mini dump can be extracted.
This commit adds changes for basic framework
to interact with base kernel for mini dump.
This commit also adds changes for ISP, CRM, SMMU and
Memory Manager.

CRs-Fixed: 2993116
Change-Id: I02620bd79ee2f84847381509a5eb030ffb1ca9d4
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-08-22 12:00:40 -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
Savita Patted
9631f05e75 Merge "msm: camera: common: presil change for soc util" into camera-kernel.lnx.5.0 2021-08-04 22:51:37 -07:00
Camera Software Integration
bbf79daec2 Merge "msm: camera: isp: Improvements to logging in VFE and CSID" into camera-kernel.lnx.5.0 2021-07-30 17:35:12 -07:00
Suraj Dongre
d6e8c46024 msm: camera: common: presil change for soc util
Add code to call presil apis related to IRQ and
reg base remap.

CRs-Fixed: 2932495
Change-Id: Ibe3c4da806bfe84c306bc71bfe2150e2caac55b1
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-07-28 11:07:31 -07:00
Anand Ravi
4f0c968cf1 msm: camera: isp: Improvements to logging in VFE and CSID
This commit fixes minor issues in logging in VFE and CSID drivers along
with major fixes and improvements -- issue CSID global reset after
fatal error, extending debug register parsing for IFE Lite, fix clipping
of text due to limited buffer size in RX error log printing.

CRs-Fixed: 2977145
Change-Id: I4eacfc60264911b0597ece7693877fc1fb6976eb
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-07-27 17:05:23 -07:00
zhuo
909d1d2bb2 msm: camera: common: Change judgement condition
Icc_get return value is IS_ERR type, so the commit change the
judgement condition.

CRs-Fixed: 2988670
Change-Id: I2c3375922bc42b598aa8872c756a47e881ccb80c
Signed-off-by: zhuo <zhuo@codeaurora.org>
2021-07-26 13:39:56 +08:00
Anand Ravi
0f4ad175a0 msm: camera: utils: Reduce performance impact of printing logs
When debug module is disabled for printing, check it at the site of the
print call instead of inside the print function to increase performance.
Also use a custom print function instead of pr_info to redirect the
same variadic arguments to trace logs to avoid calling two different
variadic functions.

CRs-Fixed: 2989605
Change-Id: Iad9f77ec9fd072bcd371de014e8a976a4e798d90
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-07-19 18:55:45 -07:00
Sokchetra Eung
5a11ba0725 msm: camera: common: Append timestamp in INFO LOGS
Use Kernel time to obtain the current time when IFE is acquired
/released and when sensor is streamed on/off. Convert the Ktime
to a timestamp format and log it in existing info prints. This
will help to co-relate timestamp between user-space and kernel
logs. The change also replaces the current usage of direct calls
to ktime_get_real_ts64 with macro across all drivers.

CRs-Fixed: 2987320
Change-Id: I87c4790164d222fc1ed6ff41ad00eeb1ed8c8867
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-07-15 11:56:33 -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
2946eb9c57 Merge "msm: camera: common: Detach pinctrl state operation" into camera-kernel.lnx.5.0 2021-07-07 09:54:00 -07:00
Jigarkumar Zala
78f6e5bd2d msm: camera: common: Detach pinctrl state operation
Currently pinctrl state update operation is integrated
with platform resource operation. This can create unwanted
transition of pinctrl which can stay in suspend state.
This change detach and separate out the pinctrl entries
with index passed from devicetree. Pinctrl select
state operation is detach from platform enable/disable
operation to operate from device directly only for better
control with respect to operation.

CRs-Fixed: 2907475, 2954556
Change-Id: I918568f96e8888df6882f165458f5c4ab32d6348
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-06-30 11:37:46 -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
Tony Lijo Jose
caa6b2a1a4 msm: camera: sensor: Add tpg driver support
Add new tpg subdev driver. This change exposes the tpg hw as a new
subdev similar to that of a sensor driver.

CRs-Fixed: 2973850
Change-Id: I6fdb4457d8cc829546896f26bdde8765a4258e7c
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2021-06-29 00:44:14 -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
Suraj Dongre
f460877a7c msm: camera: common: presil hw access headers
Added declarations and stubs for presil hw access apis.

CRs-Fixed: 2932495
Change-Id: Icbb38ca08ded2d8ba6be495ddf64bc1ae6a30245
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
2021-06-23 10:42:15 -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
Savita Patted
23f6977ce5 Merge "msm: camera: util: Fix printing of tag in trace logs" into camera-kernel.lnx.5.0 2021-06-07 18:50:34 -07:00
Anand Ravi
db09e75c0e msm: camera: util: Fix printing of tag in trace logs
This commit fixes regression in printing trace logs caused by
'commit 27ad84d827 ("msm: camera: utils: Add support for multiline
printing to log buffers")'.

CRs-Fixed: 2960607
Change-Id: If136339286647ce21adbcb1425c905b045dac7ef
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-06-02 16:17:03 -07:00
Mukund Madhusudan Atre
c31cb00512 msm: camera: common: Add common function to modify timer
Add common function to modify system timer, with timeout
multiplier as a debug capability.

CRs-Fixed: 2932495
Change-Id: I73282aa30b938b7efce97a2e8fd757b04096ccad
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-06-02 11:10:53 -07:00
Suraj Dongre
3266ccca59 msm: camera: utils: debug mask for presil framework
Add a new debug mask for presil framework core logic.
Update debug module to support more than 32 bit values.

CRs-Fixed: 2932495
Change-Id: Ia13a606c339d487fee7669ddccb9511c0c0567ca
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-05-28 19:05:03 -07:00
Vikram Sharma
5ca9544430 msm: camera: cre: update image address correctly for 36bit iova
This change upadates the image address programming for 36bit
iova, both on read and write engine.

CRs-Fixed: 2893978
Change-Id: I37f556191b840ba794e7373d9aea5831dc90ab1b
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-05-25 21:50:21 -07:00
Vikram Sharma
455abec717 msm: camera: cre: unit test fixes
Fixes for the issues found in Unit testing of CRE.

CRs-Fixed: 2893978
Change-Id: I7b8061cf2fd4693bde084a003bc101be1cbde1d1
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-05-17 01:13:41 -07:00
Haritha Chintalapati
0542af5b27 Merge "msm: camera: utils: Enable using mmrm API in camera" into camera-kernel.lnx.5.0 2021-05-13 12:04:28 -07:00
Haritha Chintalapati
2e994b2c81 Merge "msm: camera: utils: Add using mmrm in camera" into camera-kernel.lnx.5.0 2021-05-13 12:03:54 -07:00
Haritha Chintalapati
f144ee8473 Merge "msm: camera: utils: Add camera clk wrapper infrastructure" into camera-kernel.lnx.5.0 2021-05-05 22:06:15 -07:00
Pavan Kumar Chilamkurthi
ba7a561d66 msm: camera: utils: Enable using mmrm API in camera
Enable using mmrm APIs for camera clk set rates.

CRs-Fixed: 2901925
Change-Id: Id80f2d46b62aef9ebcbb238a342925c74aac053a
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-05-02 00:00:03 -07:00
Pavan Kumar Chilamkurthi
028d6ec734 msm: camera: utils: Add using mmrm in camera
Use mmrm interface to set clock rate on all
camera clks.

CRs-Fixed: 2901925
Change-Id: I2e4c31a11e0e068693ac15356e3b3dafcfa0b078
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-05-01 23:59:09 -07:00
Haritha Chintalapati
020e9a7d77 Merge "msm: camera: utils: Add support for multiline printing to log buffers" into camera-kernel.lnx.5.0 2021-04-30 19:17:36 -07:00
Camera Software Integration
5341e5810f Merge "msm: camera: utils: Modify pointer check for clk debugfs" into camera-kernel.lnx.5.0 2021-04-28 21:22:55 -07:00
Pavan Kumar Chilamkurthi
cd745eb39a msm: camera: utils: Add camera clk wrapper infrastructure
Source clocks that are shared with multiple devices need
to be consolidated before setting clock rate on them.
If not, a set call with lower freq from one device
overwrites the frequency that previously set by another
device, causing issues. Clk wrapper helps to consolidate
the frequency among multiple devices and set the max
frequency required by all of them. A shared clock notation
is defined in DT and go through clk wrapper based on that.

CRs-Fixed: 2901925
Change-Id: Ia5b2b5fd3c0619c994e27d96fad6e11d126de182
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-04-23 16:09:53 -07:00
Anand Ravi
27ad84d827 msm: camera: utils: Add support for multiline printing to log buffers
Introduce new macros to print into log buffers that prefix the
appropriate tags. This allows the usual search filters to pick up all
the lines of the log.

CRs-Fixed: 2928828
Change-Id: I3d27490b324e884eb9cce2bfd184e82418099484
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-04-23 15:20:31 -07:00
Haibin Liu
693c6dfdae msm: camera: reqmgr: add trace log for separating multi camera
Based on link_hdl/sensor id, that can separate multi camera event
on reqmgr, apply request, bufdone, isp_active_irq.
Add log of link_hdl/sensor id in above trace event,
that systrace can show independent camera trace event.

CRs-Fixed: 2924042
Change-Id: I7088a8a489a05dae4e62dc131d1c0c45c72038e2
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
2021-04-19 21:51:51 +08:00
Karthik Anantha Ram
fdc5430f3e msm: camera: utils: Modify pointer check for clk debugfs
Modify pointer check when creating clk debugfs in soc utils.

CRs-Fixed: 2841729
Change-Id: I4d23c94cc5424809e445ba7e6321a568e14bfe5f
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-04-16 09:46:17 -07:00
Savita Patted
3ee126894b Merge "msm: camera: smmu: Update header include for SMMU API's" into camera-kernel.lnx.5.0 2021-04-02 18:03:48 -07:00
Vikram Sharma
23762a67ed msm: camera: cre: Add CRE driver changes
Add new camera driver Camera Reformat Engine (CRE).

CRs-Fixed: 2893978
Change-Id: Ia39b222493393bf7bb72525c86f0060ca0dc77c2
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-03-31 02:49:52 -07:00
Karthik Jayakumar
4d74da7de3 msm: camera: smmu: Update header include for SMMU API's
Due to restructuring of memory API's new header files contain old
DMA_ATTR macro's.

CRs-Fixed: 2835738
Change-Id: If2b13866c41dcf7b19b47e40fc2d3801c2161816
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-03-30 16:05:37 -07:00
Savita Patted
520829f658 Merge "msm: camera: cdm: Fix of_match table null entry" into camera-kernel.lnx.5.0 2021-03-24 19:53:05 -07:00
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
Anand Ravi
d7e5ba94ce msm: camera: utils: Add priority to debug logs
Priority of debug logs allows for better control of which debug logs are
printed. Debug logs default to lowest priority.

CRs-Fixed: 2899680
Change-Id: I59de2d60aac80052b8c7219f866e242d9b475b4d
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-03-18 11:52:30 -07:00
Karthik Anantha Ram
7409042572 msm: camera: common: Change the max base type for reg dump
With the newly added register base types for reg dump, the
validation needs to be changed to account for the new max.

CRs-Fixed: 2841729
Change-Id: I6babe7a1e4d6def51b8e433be4431f04a0a417e8
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-03-11 16:09:43 -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
Jigar Agrawal
28a19c52e1 msm: camera: common: Improve the CSID logging
Improve CSID irq logging for better debugging.
Add support to dump the hw source clock.

CRs-Fixed: 2808577
Change-Id: I06608588ef7a6e0ebc174a1ba138f6e16a9094f2
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-01-26 20:40:06 -08:00
Haritha Chintalapati
779d4efce0 Merge "msm: camera: smmu: IOMMU fault id's API update" into camera-kernel.lnx.5.0 2021-01-25 14:48:24 -08:00
Karthik Jayakumar
bc04b3a8ef msm: camera: smmu: IOMMU fault id's API update
Need to update API's provided by memory team for retreiving fault id's when an
SMMU translation fault occurs for the new kernel version.

CRs-Fixed: 2835738
Change-Id: I061914ce01196fd1271c8a466f6a4ef8e6dce28f
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-25 12:18:36 -08:00
Karthik Jayakumar
8615106476 msm: camera: req_mgr: Update V4L2 enum names for Waipio
V4L2 driver macro VFL_TYPE_GRABBER has been renamed to VFL_TYPE_VIDEO
in linux kernel 5.8+.

CRs-Fixed: 2835738
Change-Id: Iaddec45b3532094a110e386c6462f08c36a5fd21
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Signed-off-by: Jeyaprakash Soundrapandian <jsoundra@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-22 10:22:38 -08:00
Camera Software Integration
43c1caa9f5 Merge "msm: camera: config: Makefile update to support GKI 2.0" into camera-kernel.lnx.5.0 2021-01-20 16:22:50 -08:00