Commit graph

1,167 commits

Author SHA1 Message Date
Alok Chauhan
8564c26920 msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence
when provider crash occurred, there was a CSID lane overflow
observed due to shutdown sequence from CRM(sensor, csid, csiphy).
To fix the issue need to change the shutdown sequence
(csid, sensor, csiphy).

This change will update the devices sequence in order while registering
and close the sequence accordingly.

CRs-Fixed: 2852076
Change-Id: Ia6d8022e995823bf031400c33528eb8544dc2e29
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-04-07 19:57:06 +05:30
Camera Software Integration
4bebb220df Merge "msm: camera: req_mgr: Sending event_cause for frame error for shima" into camera-kernel.lnx.4.0 2021-04-05 11:11:51 -07:00
Camera Software Integration
11383cfb3e Merge "msm: camera: reqmgr: Reset the status for next req if bubble" into camera-kernel.lnx.4.0 2021-04-03 12:35:34 -07:00
Camera Software Integration
c2963ede8b Merge "msm: camera: isp: Get the first active req during bubble" into camera-kernel.lnx.4.0 2021-04-03 12:34:42 -07:00
Alok Pandey
a4a349c82f msm: camera: req_mgr: Sending event_cause for frame error for shima
When camnoc fill level for RDI port goes beyond 25%, notify UMD
with BAD frames to take corrective actions.

CRs-Fixed: 2913934
Change-Id: I5427ce94cdd2a48d8647ff4593cb1605a2f90a37
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2021-04-03 00:45:16 -07:00
Camera Software Integration
eefcfe50ce Merge "msm: camera: cdm: Fix of_match table null entry" into camera-kernel.lnx.4.0 2021-04-01 12:06:44 -07:00
Camera Software Integration
1ba8783d5d Merge "msm: camera: sensor: Change regulator get,put to devres entry" into camera-kernel.lnx.4.0 2021-04-01 04:40:07 -07:00
Karthik Jayakumar
1283cb07a1 msm: camera: cdm: Fix of_match table null entry
KASAN identified 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-24 21:45:39 -07:00
Ravikishore Pampana
29e9e04820 Revert "msm: camera: core: Allocate memory for flush req array dynamically"
This reverts commit 018d8dae94.

CRs-Fixed: 2901141
Change-Id: Ida945ea1b83fdf1f60d19b072f667a133ac9b9dc
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2021-03-24 11:22:17 +05:30
Camera Software Integration
dc597bcd9b Merge "msm: camera: cdm: Add cdm debug status register" into camera-kernel.lnx.4.0 2021-03-23 11:57:42 -07:00
shiwgupt
21fea54664 msm: camera: sensor: Change regulator get,put to devres entry
This change modifies regulator_get, regulator_put to devres entry.
Devres is linked list of arbitrarily sized memory areas associated
with a struct device.  Each devres entry is associated with a release
function. All devres entries are released on driver detach. This
avoids potential leaking of resources on driver detach or having half
broken failure path implementation in probe call which would leak
resources when failure occurs.

CRs-Fixed: 2890861
Change-Id: Ibd46bc37bd6e31aeb2a5ea90ed75a1f596b57bf9
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2021-03-23 10:33:44 +05:30
Depeng Shao
0b798d0f8c msm: camera: reqmgr: Reset the status for next req if bubble
If req#N in slot idx, and this req meets bubble issue,
then the req#(N+1) in slot (idx+1) may also be applied,
and its status is APPLIED. If req#(N+1) applies failed
after finishing bubble recovery due to some reasons,
but we still can move to next slot since the status of
slot (idx+1) is already APPLIED. This change resets
the status of slot (idx+1) to ADDED if it is APPLIED
during processing error.

CRs-Fixed: 2902809
Change-Id: I32f318569ad8f24fdf0f324603f4ea0036867e98
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-22 13:17:13 +08:00
Depeng Shao
647861d344 msm: camera: isp: Get the first active req during bubble
Sometimes, UMD reports nonincrementing shutter request id
issue during monkey test on sHDR usecase, isp reports last
one req in active req list during bubble, so if the active
req count is 2, we will meet this issue.
This change gets the first active req during bubble in case
the active req cnt is 2.

CRs-Fixed: 2885087
Change-Id: I67d1ecfe9c88123e6d0887383961bfc676455a0d
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-19 10:53:01 +08:00
Camera Software Integration
3649ffdcd5 Merge "msm: camera: isp: Add horizontal binning with qcfa binning" into camera-kernel.lnx.4.0 2021-03-18 11:04:42 -07:00
Chandan Kumar Jha
ae6cf7f331 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-03-17 15:14:47 +05:30
Ayush Kumar
65a86de979 msm: camera: req_mgr: Re-design CRM to support multi links in sync mode
This change is to support multi links in sync mode. Supports dynmanic
switching to select master link in rtb and sat use case in sync mode.
Supports sync logic for rtb and sat use case in sync mode. Apply
requests for all links is triggered only on master epoch.
Supports bubble recovery and sync logic for different pd links in
sync mode.

CRs-Fixed: 2783209
Change-Id: I81d1d0d37aa0d6e18c19ca87eac51ef3f160abfb
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-03-16 10:38:33 +05:30
Ayush Kumar
661a419131 msm: camera: isp: Add horizontal binning with qcfa binning
This change is to add horizontal and vertical binning if qcfa binning
is enabled. In qcfa binning, horizontal and vertical binning should
be enable along with qcfa binning, whereas for only horizontal and
vertical binning is required for bayer binning.

CRs-Fixed: 2890967
Change-Id: I096d170cfb7a4a725deaffe5dc3996b23070040f
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-03-16 09:31:08 +05:30
Depeng Shao
3476bc16fd msm: camera: reqmgr: Handle flash properly
Apply the flash at EOF and apply the other devices
at the EPOCH of next frame, then the flash can
cover all the exposure zone of current request.
Add the inject delay for SOF and EOF separate, then
we can use inject delay for more flexible frame
skip control.

CRs-Fixed: 2820683
Change-Id: Ic6a58327a0ae44c54190884ba42ea7926ec7c90e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-16 10:56:27 +08:00
Camera Software Integration
0a3354e6eb Merge "msm: camera: csiphy: Dump CSIPHY Status Reg at SOF freeze" into camera-kernel.lnx.4.0 2021-03-15 09:49:36 -07:00
Camera Software Integration
71a0fad87f Merge "msm: camera: cpas: fix for Shima-CAMNOC RDI latency buffer corruption" into camera-kernel.lnx.4.0 2021-03-11 01:55:11 -08:00
Camera Software Integration
62e9a9d214 Merge "msm: camera: csiphy: add logic for csiphy shutdown" into camera-kernel.lnx.4.0 2021-03-11 01:55:00 -08:00
Camera Software Integration
e11928ef6d Merge "msm: camera: isp: Check whether flush list is empty" into camera-kernel.lnx.4.0 2021-03-11 01:54:25 -08:00
Camera Software Integration
1be56029ed Merge "msm: camera: reqmgr: Mask re-apply for SHDR usecase" into camera-kernel.lnx.4.0 2021-03-11 01:53:58 -08:00
Camera Software Integration
c465936e72 Merge "msm: camera: reqmgr: Reset the trigger cnt when trigger cnt mismatch" into camera-kernel.lnx.4.0 2021-03-11 01:53:40 -08:00
Camera Software Integration
9d45ad849b Merge "msm: camera: core: Allocate memory for flush req array dynamically" into camera-kernel.lnx.4.0 2021-03-11 01:53:20 -08:00
Shankar Ravi
511809e56c msm: camera: csiphy: Dump CSIPHY Status Reg at SOF freeze
PHY status dump analysis need to be done to check issue
with transmitter when SOF freeze occurs as recommended by
PHY HW team.

CRs-Fixed: 2890861
Change-Id: Ibaabe1c7e5968aa384313619e8a21f589f1d880e
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2021-03-11 12:45:10 +05:30
chengxue
d2b3015ac5 msm: camera: csiphy: add logic for csiphy shutdown
While csiphy is shutdown abnormally, we also need to
program off csiphy hw common register, to avoid the
residual of active csiphy hw cnt during monkey test.

CRs-Fixed: 2861912
Change-Id: I1767c729b205a96e5f298265e65b37150dac03b6
Signed-off-by: chengxue <chengxue@codeaurora.org>
2021-03-06 09:35:36 +08:00
Alok Pandey
f86171a1b8 msm: camera: cpas: fix for Shima-CAMNOC RDI latency buffer corruption
This is a fix to handle line corruption on RDI stream by giving more
priority to IFE traffic. This is specific to SHIMA CAMNOC.

- Set Priority for IFE (RT) stream to P6.
- OT = 55 for IPE RD.
- IPE clk to be capped to SVS.

CRs-Fixed: 2887253
Change-Id: Ica574742052f018e94072240a0fd1d08be223727
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2021-03-05 20:35:41 +05:30
Sridhar Gujje
bfecc47f10 Merge "msm: camera: csiphy: Add support for CSIPHY fuse" into camera-kernel.lnx.4.0 2021-03-05 04:06:37 -08:00
Sridhar Gujje
850a9353cb Merge "msm: camera: isp: Fix for wrong CPAS version selection in WM start" into camera-kernel.lnx.4.0 2021-03-05 04:06:11 -08:00
Sridhar Gujje
a3a5039ba0 Merge "msm: camera: common: Print error irq count in csid irq" into camera-kernel.lnx.4.0 2021-03-05 04:05:52 -08:00
Camera Software Integration
06dcb3ab51 Merge "msm: camera: isp: Change state of all CID resource to RESERVE on deinit" into camera-kernel.lnx.4.0 2021-03-04 05:43:00 -08:00
Camera Software Integration
77468014df Merge "msm: camera: isp: Fix for UBWC comp en HW bit" into camera-kernel.lnx.4.0 2021-03-04 05:39:10 -08:00
Camera Software Integration
f115f8bac8 Merge "msm: camera: isp: Add per frame register support" into camera-kernel.lnx.4.0 2021-03-04 05:38:58 -08:00
Depeng Shao
018d8dae94 msm: camera: core: Allocate memory for flush req array dynamically
Allocate memory for flush req array dynamically based
on the list count, in case the req count bigger than
the size of req list.

CRs-Fixed: 2835525
Change-Id: I7e48fb9dc7815cb991c84195e761a3c3f1c26b48
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-04 10:28:58 +08:00
Wyes Karny
b26fbc393e msm: camera: isp: Fix for wrong CPAS version selection in WM start
Add fix for wrong CPAS version selection in WM start.

CRs-Fixed: 2889723
Change-Id: Ic11f4ced601f3bb5f0f557714a1d2bd1f2143b78
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-03-03 21:22:26 +05:30
Anil Kumar Kanakanti
43ecbe5c9b msm: camera: csiphy: Add support for CSIPHY fuse
Add support for CSIPHY fuse using software fuse info from CPAS.

CRs-Fixed: 2876091
Change-Id: I7010a321e61561dff269c954dc8f83ca0b08956d
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2021-03-03 07:49:30 -08:00
Camera Software Integration
85d260ec72 Merge "msm: camera: jpeg: Handle JPEG smmu fault with pid info" into camera-kernel.lnx.4.0 2021-03-03 05:38:24 -08:00
Camera Software Integration
c5d4ba427f Merge "msm: camera: isp: Add MID information for IFE" into camera-kernel.lnx.4.0 2021-03-03 05:37:45 -08:00
Depeng Shao
5fcdbf95f3 msm: camera: reqmgr: Mask re-apply for SHDR usecase
SHDR case has two ISP instances, if one of them
apply req failed sometimes, but the other one is
good and the buf done has been handled successfully,
then we don't need to apply the req again for the
successful ISP.

CRs-Fixed: 2842495
Change-Id: I3dfbb455244daa0d155858dd59f4a661fd3b87cd
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-02 18:12:23 -08:00
Depeng Shao
ee418bbd88 msm: camera: reqmgr: Reset the trigger cnt when trigger cnt mismatch
In sHDR case, the trigger cnt may be different when one of the IFE
meet bubble or irq delay issue, then reset the trigger cnt when
we find the trigger cnt is different.

CRs-Fixed: 2857614
Change-Id: Ie02fd7204bebd16d32d7a277ac1f2e45f8357dd9
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-03 09:55:40 +08:00
Camera Software Integration
1cfb76902b Merge "msm: camera: isp: Update UAPI to remove tpg pattern ID" into camera-kernel.lnx.4.0 2021-03-02 10:51:13 -08:00
Camera Software Integration
a571335dea Merge "msm: camera: isp: Change warn logs to rate limited" into camera-kernel.lnx.4.0 2021-03-02 10:05:19 -08:00
Wyes Karny
ffa96f1fc7 msm: camera: isp: Fix for UBWC comp en HW bit
Add UBWC compression enable bit in HW file for yupik.

CRs-Fixed: 2889723
Change-Id: I7cc3994099c51be3305269721f091ee3461da6d9
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-03-02 14:29:00 +05:30
Depeng Shao
b7e6988ef4 msm: camera: isp: Check whether flush list is empty
We will get invalid req from flush_list if the
flush list is empty when we get each req by
list API list_for_each_entry_safe. This change
checks whether flush list is empty before
accessing this list.

CRs-Fixed: 2885145
Change-Id: I9b2828b03706a0f7412828905cc0a9e28d15fd76
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-02 15:27:52 +08:00
Jigar Agrawal
f8f1def0f1 msm: camera: common: Print error irq count in csid irq
Make STREAM_UNDERFLOW, ERROR_ECC and ERROR_CPHY_PH_CRC
fatal errors. Print IRQ error counts for non fatal
errors.

CRs-Fixed: 2882318
Change-Id: Id98bfd166071b2fe58fb9c129259c747f746b259
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-26 10:28:18 -08:00
Wyes Karny
a165c58fef msm: camera: isp: Add per frame register support
Adding per frame register dump for camera version 2 targets.

CRs-Fixed: 2778464
Change-Id: I0f45e021959d1b812807f9e7500645f2d8365f54
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-02-26 05:10:48 -08:00
Tejas Prajapati
2ea3cac9d4 msm: camera: isp: Change state of all CID resource to RESERVE on deinit
This change is to update state of all acquired CID resources state to
Reserve on disable CSI2. It will allow, proper release of all CID
resources even in case multiple CID for single CSID.

CRs-Fixed: 2883120
Change-Id: I0630c08a269bfebc6867dd039e752693ffe97ba9
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2021-02-26 12:34:42 +05:30
Karthik Anantha Ram
dc8a8bf623 msm: camera: isp: Update UAPI to remove tpg pattern ID
Update UAPI on lahaina kernel to remove tpg pattern ID.

CRs-Fixed: 2886651
Change-Id: I2d2f451ce80f965a656952791e55467f4ffd2f6e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-02-25 09:51:40 -08:00
Ayush Kumar
a379fd5e5d msm: camera: isp: Change warn logs to rate limited
In apply failure due to congestion and if not recovered, warn logs
causing excessive logging issues. Change the warn logs to rate
limit in apply failure due to congestion.

CRs-Fixed: 2884313
Change-Id: Id46a0cbe6a248a9186a6267577374f4fbadcf64f
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-02-24 20:21:24 +05:30