Commit Graph

1259 次程式碼提交

作者 SHA1 備註 提交日期
Gaurav Jindal
4bc8794bf2 msm: camera: isp: Correct the violation module ID in 780 header
This commit corrects the violation module ID in vfe 780 header file.

CRs-Fixed: 3092119
Change-Id: I97c6a1c4b331d8bf4f37efd05660b1f3694f1a59
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2021-12-17 10:05:07 +05:30
Camera Software Integration
e211e831e4 Merge "msm: camera: isp: Improve CSID debug infrastructure" into camera-kernel.lnx.6.0 2021-12-16 15:12:36 -08:00
Camera Software Integration
6aac2e2b64 Merge "msm: camera: isp: Add fuse support for QCFA binning" into camera-kernel.lnx.6.0 2021-12-16 15:12:21 -08:00
Camera Software Integration
cc53cdbd4a Merge "msm: camera: isp: Add MID for parrot" into camera-kernel.lnx.6.0 2021-12-16 15:11:43 -08:00
Depeng Shao
271a07b9ce msm: camera: isp: Update last applied scratch configuration for sfe
In case of sHDR dynamic switch, for a frame on which we are
configuring scratch buffer, use num of exposure from the
last applied valid request as opposed to global reference of
num of exposure held by global scratch configuration. The
global reference could have been updated by a future request,
it would be incorrect to use that when that request has not
even been applied.

CRs-Fixed: 3084946
Change-Id: I2a70d0de57e2dd780aa2eecc71a6398dc1800b6c
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2021-12-16 11:48:47 +08:00
Camera Software Integration
8d2fe2dc4a Merge "msm: camera: isp: Add pointer check" into camera-kernel.lnx.6.0 2021-12-15 19:17:55 -08:00
Camera Software Integration
78a85091cb Merge "msm: camera: isp: Add support for bus info dump on PF" into camera-kernel.lnx.6.0 2021-12-15 19:15:44 -08:00
Camera Software Integration
db45e9dfc3 Merge "msm: camera: isp: Use UAPI resource ID for SFE bus RD" into camera-kernel.lnx.6.0 2021-12-15 19:15:23 -08:00
Gaurav Jindal
39a7d96dec msm: camera: isp: Add v780 configs for BW limit and packer alignment
Add configurations for BW limiter in IFE and packer alignment in
SFE headers for v780.

CRs-Fixed: 3090212
Change-Id: I24dbd540d97b721f93af82f94b43cce92fa8f0fa
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2021-12-15 21:43:04 +05:30
Tejas Prajapati
d53bfe24ff msm: camera: isp: handle buf_done at apply failure from deferred list
For RDI only context where the buf_done is handled from wait list,
if the buf_done is moved to deferred list then the bubble
recovery might fail. To make sure the bubble is processed the request
needs to be moved pending list. This change helps moving the request
from active list to pending list.

CRs-Fixed: 3079621
Change-Id: Ibb271e68ca2312cbd3d71bd64e2ed7963bf60b55
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2021-12-15 02:23:07 -08:00
Wyes Karny
f9c1142df1 msm: camera: isp: Add MID for parrot
Add MID values in parrot header files. This MID values will help to know
which port got page fault in issue time.

Depends-on: 3882570
CRs-Fixed: 3081144
Change-Id: Ic59bc58b80d172128d26f8845649825a4cb53837
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-12-14 08:37:26 -08:00
Wyes Karny
99805a9e51 msm: camera: isp: Add fuse support for QCFA binning
- Add fuse support for QCFA binning. If fuse bit is set then QCFA is
  enabled then we should proceed for acquire otherwise we should fail.
- Add dt-bindings entry for CAM_CPAS_IPE_VID_OUT_8BPP_LIMIT_ENABLE
  feature.

CRs-Fixed: 3081144
Change-Id: Iaf6f1c9d9fd442ff24c36d90758aa8ee146d461f
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-12-14 08:35:05 -08:00
Gaurav Jindal
de28f106fb msm: camera: isp: Add util functions in acquire flow
In current implementation of acquire logic, there are few
goto statements and nested if-else conditions.
This commit moves such code into small util functions to make
the code cleaner.

CRs-Fixed: 3092119
Change-Id: I5fcdaa3caa7b5e516419c255b1d103757ac71177
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2021-12-14 14:39:27 +05:30
Karthik Anantha Ram
7bf952210f msm: camera: isp: Add support for bus info dump on PF
On PF based on the faulting client [IFE WR/SFE WR/SFE RD], invoke
the appropriate resource to dump it's info.

CRs-Fixed: 3079337
Change-Id: I0160fa9b29fca3991952370eb1fb37b667136bc4
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2021-12-08 19:32:23 -08:00
Karthik Anantha Ram
2b7a0094b9 msm: camera: isp: Use UAPI resource ID for SFE bus RD
As opposed to using internally defined enums for SFE fetch engines,
use UAPI defined ids for consistency with WM resources.

CRs-Fixed: 3079337
Change-Id: I569bae8b512e38de20112d0713b1c21cf4613a86
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2021-12-08 19:31:39 -08:00
Karthik Anantha Ram
935c458f46 msm: camera: isp: Add pointer check
Update pointer check to ensure there is no invalid access.

CRs-Fixed: 3079337
Change-Id: Ia569c5ccb077e0fb6385217a92b380e51b04d6f1
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2021-12-08 19:20:00 -08:00
Karthik Anantha Ram
7685a64f5a msm: camera: isp: Improve CSID debug infrastructure
Add provision to allow user to set vc-dt for rx pkt capture.
Allow user to decide if pkt strobes need to be reset to allow
for next packet capture. Change rx top half processing to only allow
set bits to be processed. Change rate limit log to info, if
user has enabled specific CSID IRQs, allow them to be logged
per frame.

[0:3]   = rst strobes
[4:11]  = vc for capture
[12:19] = dt for capture

echo <debug_val> > /sys/kernel/debug/camera_ife/ife_csid_rx_capture_debug.

CRs-Fixed: 3068993
Change-Id: I45d1db4fceba736fb03201786a8ae1e4af5b691f
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-12-08 15:25:12 -08:00
Jigar Agrawal
4abc4bf7f1 msm: camera: isp: Fix csid bottom half code
Fix the ipp, ppp and rdi bottom half handlers to safely
release the event payload when possible and add sanity
checks to prevent possible out of bound array index
access.

CRs-Fixed: 3067387
Change-Id: I93f73ae7239901eee19e2e5694a2c656390abc53
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2021-12-08 12:45:05 -08:00
Camera Software Integration
2cf8f68b8f Merge "msm: camera: isp: Handle IRQ delays for offline streams" into camera-kernel.lnx.5.0 2021-12-03 03:28:34 -08:00
Camera Software Integration
6096eb1146 Merge "msm: camera: isp: Enable error recovery block for PPP" into camera-kernel.lnx.5.0 2021-12-03 03:26:29 -08:00
Camera Software Integration
cf209cad87 Merge "msm: camera: isp: Fix PPI index based on the phy selection" into camera-kernel.lnx.5.0 2021-11-30 21:58:17 -08:00
Camera Software Integration
617d12548f Merge "msm: camera: isp: Update 780 LITE header" into camera-kernel.lnx.5.0 2021-11-30 21:57:51 -08:00
Camera Software Integration
d504633de3 Merge "msm: camera: isp: Handle deferred buf done for bubble case" into camera-kernel.lnx.5.0 2021-11-30 21:56:45 -08:00
Camera Software Integration
2be5d43313 Merge "msm: camera: isp: Add more deferred buf done support" into camera-kernel.lnx.5.0 2021-11-30 21:56:27 -08:00
Vikram Sharma
afac5c5a18 msm: camera: isp: Fix PPI index based on the phy selection
1) There is one to one mapping for ppi index with phy index
but phy select is not always equal to phy number,for some
targets "phy_sel = phy_idx + 1", and for some targets it is
"phy_sel = phy_idx", ppi_index should be updated accordingly.
2) Updated to configure ppi cfg register as.
 for cphy, disable dphy in config register.
 for dphy, do nothing (both cphy and dphy will be selected).
 then enable all lanes.

CRs-Fixed: 3057665
Change-Id: I1d5d66034a5563b5adcb8163acf9a668d10d4a19
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-11-23 16:00:57 +05:30
Karthik Anantha Ram
ec9c3c2d48 msm: camera: isp: Enable error recovery block for PPP
In CSID enable error recovery block for PPP. Configure error
recovery to freeze mode.

CRs-Fixed: 3077774
Change-Id: I8c107396521a7a6475c648362157acdba44bf1d4
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2021-11-18 13:37:11 -08:00
Karthik Anantha Ram
40fc62f499 msm: camera: isp: Handle IRQ delays for offline streams
Update ISP offline state machine, to ensure any IRQ scheduling
issues would not lead to complete stalling of the stream.

CRs-Fixed: 3068998
Change-Id: I116019e4963f93c28bcfb1f09c5278f478961a5d
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-11-18 19:06:08 +08:00
Depeng Shao
997395bd54 msm: camera: isp: Handle deferred buf done for bubble case
Sometimes we already get all the buf done before the bubble
is detected, so we also need to handle the deferred buf done
when the bubble is detected, otherwise, the bubble request
can't be finished.

CRs-Fixed: 3066543
Change-Id: Ied46ad0a5efe3a7d8132bc9560ae3f35d69fee89
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-11-16 17:01:17 +08:00
Karthik Anantha Ram
105075926c msm: camera: tfe: Update arguments to addIO util
Update scratch buf arguments in TFE HW manager for addIO util.

CRs-Fixed: 3045706
Change-Id: Iaa7f47c1c67045d0427fddda64fa1414dd55ca9b
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-11-15 12:32:28 -08:00
Savita Patted
0ad4a3a10e Merge "msm: camera: isp: Report frame timing events in correct sequence" into camera-kernel.lnx.5.0 2021-11-12 17:37:00 -08:00
Savita Patted
4eb6436d98 Merge "msm: camera: isp: Recover missed SOF timestamp" into camera-kernel.lnx.5.0 2021-11-11 18:22:48 -08:00
Savita Patted
f2f3189463 Merge "msm: camera: isp: Update internal recovery scheme" into camera-kernel.lnx.5.0 2021-11-11 18:22:38 -08:00
Savita Patted
e8253ce8cd Merge "msm: camera: isp: Add support for IFE scratch buffer" into camera-kernel.lnx.5.0 2021-11-11 18:22:26 -08:00
Savita Patted
37b92699e1 Merge "msm: camera: isp: Only realtime context can pause CRM timer" into camera-kernel.lnx.5.0 2021-11-11 18:22:12 -08:00
Savita Patted
ba6a884318 Merge "msm: camera: isp: Reset rdi only flag" into camera-kernel.lnx.5.0 2021-11-11 18:22:01 -08:00
Savita Patted
fed17f2312 Merge "msm: camera: isp: Add handling for flush in flushed state" into camera-kernel.lnx.5.0 2021-11-11 18:21:50 -08:00
Anand Ravi
a3632ffe16 msm: camera: isp: Report frame timing events in correct sequence
Due to interrupt delays, when VFE top processes the interrupt registers
it might see EPOCH and EOF of frame n along with SOF of frame n+1. The
current logic is based on IRQ controller priority and hence will report
SOF of frame n+1 before EPOCH of frame n. This can result in ISP context
reporting SOF timestamp of frame n+1 for both frame n and frame n+1.

In order to report the events in the order that they occurred, we
maintain a state machine in VFE top to keep track of the last seen
event. This helps detect any missing IRQs and also warn when such
interrupt delays are observed.

The state machine logic is only able to handle delays less than 1 frame.
For example, EPOCH of frame n+1 occurs before VFE top has read EPOCH of
frame n, there is no way to tell that this is the case from the
interrupt registers.

CRs-Fixed: 3067696
Change-Id: I061732c20ff23ca9394ae9844d50729476ad07b5
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-11-10 17:24:13 -08:00
Depeng Shao
9bde405759 msm: camera: isp: Add more deferred buf done support
The reg upd and buf done irq may be got earlier
than the request is applied and before req is
added to wait req list, then these irq will
be dropped in current logic, then the req can't
be finished. This change stores the buf done as
deferred buf done in case of missing the buf done.

CRs-Fixed: 3063894
Change-Id: If0e2dbbc1ac033c13386ef06fda51736e4dbbf3b
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-11-10 12:56:30 +08:00
Depeng Shao
b50cedbfd7 msm: camera: isp: Reset rdi only flag
We will get wrong rdi only flag if we don't reset the flag.
So this change resets the rdi only flag during stopping resource.

CRs-Fixed: 3069713
Change-Id: If06ea32c3f9b5dbfa2f71da1496577c31b67b8c8
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2021-11-06 20:38:07 +08:00
Savita Patted
b2f122bb8b Merge "msm: camera: isp: Enable line done config for SFE RDI0-2" into camera-kernel.lnx.5.0 2021-11-05 19:01:20 -07:00
Savita Patted
6d69d3250b Merge "msm: camera: isp: Update RM stride correctly at stream on" into camera-kernel.lnx.5.0 2021-11-05 19:01:10 -07:00
Savita Patted
869991d193 Merge "msm: camera: common: Remove return from debugfs_create_bool" into camera-kernel.lnx.5.0 2021-11-05 18:38:15 -07:00
Savita Patted
27f0bb1140 Merge "msm: camera: common: DDR type selection deprecation" into camera-kernel.lnx.5.0 2021-11-05 18:21:06 -07:00
Anand Ravi
4a5c74e70f msm: camera: isp: Recover missed SOF timestamp
In case SOF interrupt is not received by the camera driver, we can
recover the missing SOF timestamp for the frame at epoch using the
previous and current SOF timestamps from CSID.

CRs-Fixed: 3067696
Change-Id: I25c8596132b99829d04ea38dbd3d904fc2a302c2
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-11-04 09:22:19 -07:00
Savita Patted
8eb28b180d Merge "msm: camera: csid: correction for printing long and short packet info" into camera-kernel.lnx.5.0 2021-11-03 18:03:29 -07:00
Savita Patted
c43ac5bd74 Merge "msm: camera: isp: Add header file VFE and CSID for Cape" into camera-kernel.lnx.5.0 2021-11-03 18:02:43 -07:00
Savita Patted
ccf76ce85e Merge "msm: camera: isp: Print additional debug info in case of csid errors" into camera-kernel.lnx.5.0 2021-11-03 17:26:21 -07:00
Savita Patted
85d33924b1 Merge "msm: camera: isp: Refactor csid get rdi format function" into camera-kernel.lnx.5.0 2021-11-03 17:26:01 -07:00
Karthik Anantha Ram
01195ef856 msm: camera: isp: Update 780 LITE header
Update MIPI packed property in all RDIs for 780 LITE.

CRs-Fixed: 3032597
Change-Id: Ia3b3c2675bb9e7528faba293416d36e611fbde50
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-11-03 12:33:06 -07:00
Karthik Anantha Ram
78bc40c73a msm: camera: isp: Enable line done config for SFE RDI0-2
RDI0-2 clients are used in conjunction with fetch engine for
sHDR/FS enable line done for these clients. As opposed to
using WM index to enable this, update header to indicate
that this has to enabled for select clients.

CRs-Fixed: 3068277
Change-Id: I7ce4cbbddc9eb11174a39c4df93bc82e5413317f
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-11-02 18:03:42 -07:00