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>
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>
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>
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>
Fixes for the issues found in Unit testing of CRE.
CRs-Fixed: 2893978
Change-Id: I7b8061cf2fd4693bde084a003bc101be1cbde1d1
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
Enable using mmrm APIs for camera clk set rates.
CRs-Fixed: 2901925
Change-Id: Id80f2d46b62aef9ebcbb238a342925c74aac053a
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Kernel 5.10 and up have renamed kzfree to kfree_secure. As such,
we have added a cam_free_clear function to redirect all uses of kzfree
uses to the appropriate function depending on the kernel version the
driver is built against.
CRs-Fixed: 2835738
Change-Id: I72d191c9fb0454a4dbb1392894a909e81fe07caa
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Adds support for camera kernel driver source being moved to Vendor SI.
CRs-Fixed: 2835738
Change-Id: Ibb876edb1284bc77c366c3ef9e1ee9a39981c960
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
camera io function call needs to use directly
from upstream api's.
CRs-Fixed: 2835738
Change-Id: I54c00bf784721984d060c34e472c6eea4e5ca012
Signed-off-by: Jeyaprakash Soundrapandian <jsoundra@codeaurora.org>
Clients like cpas scale some clocks like slow_ahb, fast_ahb
through vote level based on other hw's src clk freq while
the actual src clock (camnoc) is calculated and set directly
through set_src_clk API. This will overwrite freq of camnoc_axi
with the same level as AHB when ahb clocks are set. Do not
set src clk rate while setting rate for other clocks using level.
CRs-Fixed: 2793673
Change-Id: I5538a5cebf4e47c407a2bf9778136500b1162b4a
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
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>
Add initial code drop for SFE HW.
CRs-Fixed: 2733230
Change-Id: I44437bbe05d8c60d219c31cb626a4c9845a469e0
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Currently, if dsp clock source is not found in device tree, still
we are trying to enable/disable clock source. Check for availability
of that optional clock before toggling it.
CRs-Fixed: 2762106
Change-Id: I2a4467f5383343bdf1e6607712270f574c76e51e
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Add debugfs setting to route camera logs : ERR,
WARN, INFO, DBG to ftrace.
Add CAM_TRACE macro for adding any new traces in drivers.
Usage:
CAM_TRACE : By default printed in ftrace
CAM_ERR, CAM_WARN, CAM_INFO, CAM_DBG : enable using
debugfs debug_type = 1 or 2
For CAM_DBG : In addition to above enable debug_mdl with
required mask.
adb shell "echo <value> > /sys/module/camera/parameters/debug_type"
All CAM_xx (except CAM_TRACE) logs are routed as below :
0 (default) - only logcat
1 - only ftrace
2 - both logcat and ftrace.
CRs-Fixed: 2762931
Change-Id: I5254a7fef346c7ba21a3ea1eed21e5353f42fd03
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Enhance cpas state dump to get more information about
bandwidth and clock status. This additional state dump
can be enabled using debugfs.
adb shell "echo 1 > /sys/kernel/debug/camera_cpas/full_state_dump"
Traverse through all bw tree nodes and print info in each node.
Print current clk frequencies of all clocks that cpas enables.
Read rpmh bcm status registers to understand mmnoc clk freq.
Add cpas monitor to save important info whenever clients
notify with an event. This monitor info is printed in cpas
state dump.
CRs-Fixed: 2754299
Change-Id: Ib9007091f7e34127f1ca92498e2537b2a06887cb
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Currently, CAM_UTIL debug logs when enabled, flood the logcat
with io read/write access logs, which are not necessary when
debugging clocks, interrupts and other parameters. Add separate
entry for IO access in debug util.
CRs-Fixed: 2743063
Change-Id: Id13393211bcc6fdc620aaffe8f8ab27a6b7c6986
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
This change adds support to notify frame skip when CRM
not ready to apply a normal setting. Sensor and custom
device also want to update the HW settings in some
conditions even if a frame is skipped.
CRs-Fixed: 2691642
Change-Id: Ibd2b22655d0f6b6c90663df75a0f5fad8565e918
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Guards debugfs features in camera driver to only be compiled when
CONFIG_DEBUG_FS is enabled.
CRs-Fixed: 2717236
Change-Id: I0de77741301d259cbec64e8a2e27830981b2b69d
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
AHB and AXI BW voting path requires all key logs to be perf.
Change BW voting logs in utils to perf for easier debugging.
CRs-Fixed: 2584631
Change-Id: I41ef094f6633101bb7b636ea310aca81de0101c7
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Currently lane enablement is happening as a part of lanemask
field, which is send by UMD. Lane enablement should be purely
depends on laneCnt and laneAssign attributes. Also, combo mode
sensors needs to come with combo mode flag set from the UMD.
This change updates the logic for lane enablement with respect
to laneAssign and laneCnt, and also covers all combomode selection
as per the request. This change also enables the sensors to acquire
and streamon/streamoff at anytime in session.
CRs-Fixed: 2677450
Change-Id: I4f0d3ffd7245a931c273611c9c4b7e503c038664
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>