Commit Graph

2043 Commits

Author SHA1 Message Date
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
Karthik Jayakumar
7c5ecb6f34 msm: camera: isp: Expanded address support for v780
Expands image address read/write support for SFE v780 HW.

CRs-Fixed: 2985358
Change-Id: I1ac9969460bae56e60fc8bc511dc9aa7d29aec57
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-07-27 14:42:40 -07:00
Depeng Shao
86c23361e6 msm: camera: cci: Enhance burst read timing
In burst read flow, we need to wait CCI irq
once one set data is read, but the fifo may has
new data what can be read immediately and don't
need to wait the irq. This change also optimize
the irq processing, we can reset irq mask first,
then process the irq status, it can avoids some
timing issue, e.g. the read context runs too
quickly, then read context enable the read
threshold bit in irq mask1, but irq context runs
late, then irq context clear the read threshold,
then we can't receive read threshold again.

CRs-Fixed: 2995920
Change-Id: I8acfadf07b95782725bf4bf8b05b88789874c1da
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-07-27 11:56:04 +08:00
Sokchetra Eung
56706b93b3 msm: camera: sync: Append sync obj's name in log
Append sync obj's name to logs to help debugging.

CRs-Fixed: 2998236
Change-Id: I461865b72e49b11267c2dc20176985b4545a42e8
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-07-26 19:56:28 -07:00
Karthik Anantha Ram
1736e27905 msm: camera: isp: Improve isp context debug capability
Update SFE output ports in buf done failure dumps.
Currently reg dump on error is triggered only on HW
error. Extending this to scenarios where the pipeline
is stalled possibly due to congestion.

CRs-Fixed: 2841729
Change-Id: I423bbac19efd5dd57d998b7017d9bfcff23392d0
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-26 18:22:51 -07:00
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
Camera Software Integration
13670c580a Merge "msm: camera: reqmgr: Correct condition check" into camera-kernel.lnx.5.0 2021-07-26 17:33:06 -07:00
Camera Software Integration
c836ea502b Merge "msm: camera: jpeg: Update jpeg traces" into camera-kernel.lnx.5.0 2021-07-26 17:32:55 -07:00
Karthik Anantha Ram
5d69bcd644 msm: camera: icp: Add WD clear logic for lx7
AHB WD modules only support async reset. In order to clear
WD without complete camera reset disable and clear
WD interrupt. Kernel driver subscribes only for WD0, this
change adds this sequence only for WD0.

CRs-Fixed: 2841729
Change-Id: I0913d20fc3bd4bf911484efa42fb5889e539fea0
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-26 13:17:27 -07:00
Karthik Anantha Ram
4ebcff0692 msm: camera: reqmgr: Notify devices on link stall
Notify all the connected devices, when the link is stalled.

CRs-Fixed: 2841729
Change-Id: I08cbb587071f4bfd6e1cdefddffb66a83ba8c187
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-26 09:35:25 -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
Tejas Prajapati
29e76ca7d2 msm: camera: reqmgr: check link state before taking mutex
In case if the destroy session is processed first it will
as a part of unlink try to drain the work queue. This will
schedule all the enqueued wq. Workqueue when scheduled
try to acquire same mutex destroy session has already acquried
this will lead to dead-lock. To avoid that, check the link
state first if it is in idle state then return from the
workqueue without trying to acquire mutex.

CRs-Fixed: 2976325
Change-Id: I57a53455c69e5f4f38c92413f9d1b7f2d06c9960
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2021-07-24 07:55:00 -07:00
Anil Kumar Kanakanti
d584013b1c msm: camera: cci: Fix CCI Timeout during burst_read concurrency
During burst read concurrency, is_burst_read variable not updated
properly leading to missing th_complete signal. is_burst_read variable
updated per master to avoid concurrency issue.

CRs-Fixed: 2962232
Change-Id: Id741d48e0b9a6987b4aa7bc7361daf555d9bc587
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2021-07-24 07:47:55 -07:00
Alok Chauhan
437e99f4b4 msm: camera: icp: allow icp debug clock for debug purpose
Max support clock frequency varies from target to target.
Do not restrict the debug icp clock with max supported clock
and allow it to set with any value.

CRs-Fixed: 2878329
Change-Id: Ia157d38c4aa4b1183650bf6ff47f3181fb8012cd
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-07-24 07:47:16 -07:00
Savita Patted
57ba0757b7 Merge "msm: camera: isp: Add support of SFE HW for v780" into camera-kernel.lnx.5.0 2021-07-23 19:19:20 -07:00
Jigar Agrawal
9824e39f67 msm: camera: csiphy: Enhance the csiphy reg dump
Enhance csiphy reg dump to make them more readable
and allow them to be parsed by creating a parser.

CRs-fixed: 2992807
Change-Id: Idc5cfa6aa14c90adfeeaf398fa89ded51aeea350
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-07-23 16:23:27 -07:00
Jigar Agrawal
57b1d69e64 msm: camera: csiphy: Rearrange csiphy debugfs
Currently all the csiphy debugfs entries are
populated in the same camera-csiphy folder.
This has make searching for a desired debugfs
for desired csiphy a little difficult. Move
all those debugfs entries to the respective
csiphy index directory for easy access.

CRs-fixed: 2992807
Change-Id: Ia48df672669c88a0dd72f051a7be3d8e043c7e7c
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-07-23 11:52:50 -07:00
Gaurav Jindal
76048e2a97 msm: camera: isp: Enable IFE Bus violation IRQ
This commit corrects the bit mask for enabling the Bus violation
IRQ. Bus side errors were not caught early as the bit mask was not
correct.
As a part of this commit, we cause the hw to stop when bus side
violation errors are reported. This prevents the false reporting
of CSID back pressure overflows.

Change-Id: I1770ff14e186f252da9b871e0c29fe5f4c9fab0a
CRs-Fixed: 2997739
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-07-23 08:13:16 -07:00
Savita Patted
b9abb71726 Merge "msm: camera: cpas: Add support for SmartQoS feature" into camera-kernel.lnx.5.0 2021-07-22 22:15:33 -07:00
Karthik Anantha Ram
5f13fe864f msm: camera: reqmgr: Correct condition check
Flag warning only if the wait call returns 0.

CRs-Fixed: 2841729
Change-Id: I456da8a66ea69bcf671f55bd5f0459aab74476f5
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-22 19:24:05 -07:00
Chandan Kumar Jha
1c1d221ff7 msm: camera: isp: Add support of SFE HW for v780
Add support for SFE 780. Register header files are updated.

This change also includes  new IRQ and port for SFE 780 along
with some debug enhancement.

CRs-Fixed: 2948116
Change-Id: I3e83ad275212fd73e1ce9dce0dc18970ff036351
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2021-07-22 13:56:58 +05:30
Savita Patted
017b2667e9 Merge "msm: camera: csiphy: Continue in case of unavailibility of CSIPHY hw" into camera-kernel.lnx.5.0 2021-07-21 22:29:40 -07:00
Savita Patted
5acb10a298 Merge "msm: camera: csiphy: Add missing base address assignment" into camera-kernel.lnx.5.0 2021-07-21 22:29:24 -07:00
Savita Patted
3dd2620d85 Merge "msm: camera: isp: Add support for flush in offline IFE" into camera-kernel.lnx.5.0 2021-07-21 22:29:05 -07:00
Savita Patted
b1f464eec7 Merge "msm: camera: utils: Reduce performance impact of printing logs" into camera-kernel.lnx.5.0 2021-07-21 22:28:47 -07:00
Savita Patted
8c17ac8865 Merge "msm: camera: isp: IFE and CSID probe based on fuse" into camera-kernel.lnx.5.0 2021-07-21 22:28:26 -07:00
Savita Patted
5adfe2913e Merge "msm: camera: icp: Add safety checks for IPE/BPS" into camera-kernel.lnx.5.0 2021-07-21 22:28:05 -07:00
Karthik Anantha Ram
5de7b3b61c msm: camera: isp: Handle processing RUP_DONE prior to SOF
For RDI state machine add provision to post shutter for requests
that receive RUP_DONE prior to SOF. If the RUP_DONE is serviced
and acknowledged before SOF by the state machine, we need to
handle posting the shutter for that request at SOF otherwise
we would result in completely missing that shutter.

CRs-Fixed: 2971285
Change-Id: I6303520166c445fa7872dcffbd23a0a75d497387
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-21 19:14:30 -07:00
Camera Software Integration
a770a6af1e Merge "msm: camera: isp: Reset CSID top wrapper config" into camera-kernel.lnx.5.0 2021-07-20 17:33:18 -07:00
Camera Software Integration
3c8aa5c0e1 Merge "msm: camera: cpas: Change to set OT value to 8 for RT block" into camera-kernel.lnx.5.0 2021-07-20 17:32:55 -07:00
Camera Software Integration
0087db80cc Merge "msm: camera: cre: Updated FE/WE configuration" into camera-kernel.lnx.5.0 2021-07-20 17:32:44 -07:00
Camera Software Integration
b7992805e3 Merge "msm: camera: jpeg: Handle JPEG smmu fault with pid info" into camera-kernel.lnx.5.0 2021-07-20 17:32:21 -07: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
Camera Software Integration
5daf7da643 Merge "msm: camera: mem_mgr: Fix expanded memory allocations" into camera-kernel.lnx.5.0 2021-07-19 17:27:02 -07:00
Anand Ravi
ff11552d04 msm: camera: isp: Logging improvements to ISP context
Reduce number of logs printed by ISP and custom contexts for each
packet. Also move sync related error logs to debug logs.

CRs-Fixed: 2977145
Change-Id: Icf22eefdf0ae1d6ef006272f95352ae65cbf3b34
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-07-19 11:38:22 -07:00
Karthik Anantha Ram
97719779bc msm: camera: isp: Reset CSID top wrapper config
CSID wrapper config can be reset only by ares from
camera subsystem power up or ares assert BIT in
CSID clk branch both of which are not gauranteed at
the end of a given CSID stream. This change explicitly
resets the wrapper config via AHB. This is to avoid
any 2 CSID wrapper path config registers ending up with the
same config at a given instance.

CRs-Fixed: 2991630
Change-Id: I7b623841b33cad4e3921d0128f323dcd36e485c8
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-19 09:48:19 -07:00
Anand Ravi
25ee65107a msm: camera: isp: Add support for flush in offline IFE
Add flush device ioctl handler in ISP top state machine to translate
the flush command into equivalent CRM flush request command. Also add
support for flushing offline IFE workqueue.

CRs-Fixed: 2939523
Change-Id: I79a6b6bca241b954e06f78e8a05e55907f46aa59
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-07-19 09:02:49 -07:00
Wyes Karny
5f7956594d msm: camera: isp: IFE and CSID probe based on fuse
Some ISP hardware id instances are disabled on some target skus.
Cpas driver has fuse information based on the dtsi entries.
ISP hw driver queries the cpas driver whether hw instance is
supported or not. If ISP hardware is supported on the target then
continue the isp hardware probe.

Fix for get HW feature:
When feature is enable or disable type and HW mask is not indicating the
HW index, do not update the supported. By default it is supported.

CRs-Fixed: 2825675
Change-Id: I777e5790060388458562e7a53fea8a7324ffa9d3
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-07-18 22:05:40 -07:00
Vikram Sharma
ffc9bf8758 msm: camera: cre: Updated FE/WE configuration
Changed from static to dynamic allocation for hw_mgr_intf.
Updated de-init handling during driver remove.
Updated Idle irq handling to not clear request data at idle irq.
Multiple request handling at buff done.
Offset fix.

CRs-Fixed: 2982472
Change-Id: I37fb690f9f4c1460ecf322a259e2e1001574339b
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-07-18 21:30:56 -07:00
Ayush Kumar
51f4e0b008 msm: camera: cpas: Change to set OT value to 8 for RT block
This change is set the OT values for RT client of Camonc
to 8 for Yiupik camera. This is sw workaround for Yupik camera.

CRs-Fixed: 2924987
Change-Id: Icb7f30c23f5899558a41308fe313d46fd8d992a3
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-07-18 06:35:30 -07:00
Camera Software Integration
16710c7458 Merge "msm: camera: isp: Add support for AEB use-case" into camera-kernel.lnx.5.0 2021-07-16 19:49:16 -07:00
Camera Software Integration
400bbd856d Merge "msm: camera: csiphy: Update csiphy2.1.0 bringup sequence" into camera-kernel.lnx.5.0 2021-07-16 19:49:05 -07:00
Camera Software Integration
3ec4a1fd7e Merge "msm: camera: common: Append timestamp in INFO LOGS" into camera-kernel.lnx.5.0 2021-07-16 19:48:48 -07:00
Camera Software Integration
16520dd02f Merge "msm: camera: req_mgr: Fix request mismatch on slave bubble" into camera-kernel.lnx.5.0 2021-07-16 19:48:38 -07:00
Camera Software Integration
399abd9ccd Merge "msm: camera: csiphy: Handle the aon/non_aon configuration" into camera-kernel.lnx.5.0 2021-07-16 19:48:25 -07:00
Camera Software Integration
aec4d21661 Merge "msm: camera: cpas: Program safe_lut for ife pdaf port" into camera-kernel.lnx.5.0 2021-07-16 19:47:31 -07:00
Camera Software Integration
99af90b2e5 Merge "msm: camera: isp: Change log from warn to DBG" into camera-kernel.lnx.5.0 2021-07-16 19:47:20 -07:00
Pavan Kumar Chilamkurthi
458f4844b4 msm: camera: jpeg: Update jpeg traces
Add trace log at DMA bufdone IRQ.  Update jpeg ENC traces
with more info.

CRs-Fixed: 2993654
Change-Id: I85e0ea312188780c6756a3d8d71dc35995791541
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-07-16 10:56:34 -07:00
Karthik Jayakumar
9122c82fe1 msm: camera: mem_mgr: Fix expanded memory allocations
Fixes expanded memory allocations to only happen for ICP context banks.
Re-maps the command buffers to shared region of ICP context bank.

CRs-Fixed: 2985358
Change-Id: I3c2d5866b0041489577f6c5c0ec113c886437107
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-07-15 13:14:59 -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