Commit Graph

219 次程式碼提交

作者 SHA1 備註 提交日期
Joshua Florez
d644749f16 msm: camera: isp: LDAR Dump ISP Extension
Extension of Lets do a reset (LDAR) to include more information
in dump with more dump output enhancements.

CRs-Fixed: 3068971
Change-Id: I6b61bcf546e32c096e45c511faf64514ff391e62
Signed-off-by: Joshua Florez <quic_jflorez@quicinc.com>
2022-01-20 21:06:58 -08:00
Depeng Shao
6e9ae02655 msm: camera: common: Fix few incorrect log
Fix few incorrect log and add ctx id for
irq handling log.

CRs-Fixed: 3101894
Change-Id: Ibd2783124ed6354a379b9804e6e6bc01f2ab6fb3
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2022-01-20 21:06:25 -08:00
Haritha Chintalapati
f1e5f33d90 Merge "msm: camera: isp: Moving req to active list first" into camera-kernel.lnx.6.0 2022-01-05 18:05:01 -08:00
Depeng Shao
30c59c7aa6 msm: camera: isp: Moving req to active list first
Sometimes, all the buf dones of bubble req have been
received, but they are deferred buf done. If we handle
the deferred buf done before moving the req to active
list, the req will be moved to pending list first during
processing the buf done of bubble req, then moved to
active req list in the processing of epoch_in_applied.
This change moves the bubble req to active list first,
then handle the deferred buffer done.

CRs-Fixed: 3096361
Change-Id: I1e9b1ba5a46509b1c08ec92bbca0c2d7fbde679c
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2021-12-30 21:20:26 -08:00
Anand Ravi
cbe499e9eb msm: camera: common: create a common root folder for debugfs
Create common root folder under debugfs root named camera at probe. Add
utility functions to create subdirectories under the common camera root.

CRs-Fixed: 3093049
Change-Id: Ia4cefb5d2263ecabf1b9d70deefa1ee624b04f07
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2021-12-22 16:43:42 -08:00
Haritha Chintalapati
a97ccf4ee0 Merge "msm: camera: isp: handle buf_done at apply failure from deferred list" into camera-kernel.lnx.6.0 2021-12-20 19:15:27 -08:00
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
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
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
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
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
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
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
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
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
Karthik Anantha Ram
b1bb4920d5 msm: camera: isp: Update internal recovery scheme
When internal recovery is in progress skip notifying
SOF trigger to CRM. Also for AEB add a threshold check when
slave RDIs SOF is seen post IFE epoch, flag as fatal error
only on hitting this scenario on threshold number of
consecutive occasions.

CRs-Fixed: 3064736
Change-Id: Ibda10d3c42cff6ce128197221da298d2e88cb286
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-11-02 12:57:39 -07:00
Depeng Shao
54d25bfc22 msm: camera: isp: Only realtime context can pause CRM timer
Only realtime context can pause the CRM timer, since offline
context doesn't have ctx_crm_intf.

CRs-Fixed: 3067871
Change-Id: Ib70c2b48c95eaaf38a001a9ce39663abc5f30a83
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2021-11-02 18:51:39 +08:00
Vikram Sharma
87fc9be067 msm: camera: isp: Add handling for flush in flushed state
This change handles race condition in which flush is handled in
flushed state.

CRs-Fixed: 3038297
Change-Id: I8be1f8c70431c77366f8846d8ccab3414f3ede3e
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-11-01 23:23:23 +05:30
Savita Patted
3634a75a4e Merge "msm: camera: isp: Additional fixes for KMD internal recovery" into camera-kernel.lnx.5.0 2021-10-28 18:13:25 -07:00
Karthik Anantha Ram
fa319fa819 msm: camera: isp: Additional fixes for KMD internal recovery
Avoid programming RUP/AUP at CSID start for internal recovery.
The request being recovered will configure this appropriately via CDM.
Also avoid resetting epoch factor for IFE PIX resource at stream off
that is triggered internally, the UMD configured epoch factor is
needed to stream on again post recovery.

CRs-Fixed: 3045706
Change-Id: I865ad0c2c08330a29eacfea63b4e15892a84bd69
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-10-25 23:04:34 -07:00
Jigar Agrawal
840b32b393 msm: camera: common: Update the ctx memory request logic
Make the context memory request for hw update entries,
in_map entries and the out_map entries per request, instead
of requesting the memory for all the requests at once in a
large blob. This will prevent the memory requests getting
denied in the situations like memory fragmentation.

CRs-Fixed: 3059124
Change-Id: I829407a6053ddddfe4bc9a07d3ae5724a57eb602
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-19 17:08:53 -07:00
Camera Software Integration
272bbd9200 Merge "msm: camera: common: Fix kernel code and add checks" into camera-kernel.lnx.5.0 2021-10-18 16:43:42 -07:00
Jigar Agrawal
890c319fc8 msm: camera: common: Fix kernel code and add checks
Fix Kernel code and add security checks to avoid
possible out of bound array access variables.

CRs-fixed: 3038735
Change-Id: Idaf0889026dbf138d0cb94a0f88e5b6941ff21e2
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-14 11:11:42 -07:00
Karthik Anantha Ram
1da4fb571f msm: camera: isp: Add recovery support for custom AEB use-case
Add support to detect error scenarios, propagate the error
appropriately, halt IFE and recover on such error scenarios.
The change is to only handle such cases for custom AEB
use-case.

CRs-Fixed: 3045706
Change-Id: Iba4744e524523d131555e4a44f6ce7acc97633b5
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-10-14 09:23:54 -07:00
Karthik Anantha Ram
66b3f46f58 msm: camera: isp: Update reapply field in config args
Currently reapply field in config args signifies applying
only IO buffers. Update that field as an enum providing
the provision to reapply IQ or IO accordingly.

CRs-Fixed: 3045706
Change-Id: Id10ee846a6de093e5a79858689802e421628ce56
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-10-13 11:42:21 -07:00
Karthik Anantha Ram
b48f4da577 msm: camera: isp: Add common utility functions
Add common utility functions to be used across isp
context. Util functions added to notify trigger points,
notify errors, pause CRM SOF timer and trigger register dumps.
The change also modifies certain pointer validations to
accomplish this.

CRs-Fixed: 3045706
Change-Id: I3cb19e9a24ffb82ff25e7c278b31a8bf0e854eed
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-10-13 11:42:08 -07:00
Karthik Anantha Ram
498012e556 msm: camera: isp: Apply scratch only on SOF trigger
It's possible that CRM triggers frame skip call at SOF
and EOF. For IFE ignore the call on EOF. Only use
SOF trigger to apply default settings [scratch buffers],
for fetch engine use-cases.

CRs-Fixed: 3055035
Change-Id: Ic0b59e5beb6dff70bb1b515117f0b641d8e09308
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-10-13 11:40:17 -07:00
Camera Software Integration
ce1580456e Merge "msm: camera: isp: Update last applied MUP for scratch" into camera-kernel.lnx.5.0 2021-10-06 17:40:24 -07:00
Camera Software Integration
4c38664b95 Merge "msm: camera: isp: Reduce traffic for shutter notification" into camera-kernel.lnx.5.0 2021-10-04 17:32:47 -07:00
Camera Software Integration
81e99709c3 Merge "msm: camera: isp: Add support of PDAF parsed outport" into camera-kernel.lnx.5.0 2021-10-01 19:50:07 -07:00
Pranav Sanwal
0ddfe2d482 msm: camera: isp: Reduce traffic for shutter notification
To reduce traffic for shutter notification, sof and boot
sof timestamps are sent in a unified v4l2 event.
Thereby, reducing the event notification traffic by 50%.

CRs-Fixed: 3040374
Change-Id: Ib4580e0a4df7c3d1cb892fdf3254272d3134d4cb
Signed-off-by: Pranav Sanwal <psanwal@codeaurora.org>
2021-09-30 18:05:29 +05:30
Camera Software Integration
a6d54a3219 Merge "msm: camera: req_mgr: Allow request cancellation if not applied to IFE" into camera-kernel.lnx.5.0 2021-09-29 15:57:59 -07:00
Karthik Anantha Ram
54f158a4fe msm: camera: isp: Update last applied MUP for scratch
In case of sHDR dynamic switch, for a frame on which we are
configuring scratch buffer, use MUP from the last applied
valid request as opposed to global reference of MUP held
by the CSID driver. 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: 3038703
Change-Id: I9369dba80fa258925ab4ae573b33931352318334
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-09-28 20:21:04 -07:00
Camera Software Integration
fbced33fa6 Merge "msm: camera: isp: Add fixes for buf done in presil" into camera-kernel.lnx.5.0 2021-09-27 15:36:42 -07:00
Anand Ravi
0417e88967 msm: camera: req_mgr: Allow request cancellation if not applied to IFE
Since we don't wait for requests to be ready on lower pd devices before
applying request on higher pd devices, add provision to cancel request
if it has not been applied on IFE.

CRs-Fixed: 3014942
Change-Id: I8850b0dfe3f88e04b86f7bb6b597657ad7e0a4f9
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-09-27 14:41:03 -07:00
Chandan Kumar Jha
738df632cc msm: camera: isp: Add support of PDAF parsed outport
Add support of new PDAF Parsed data outport for VFE 780.

CRs-Fixed: 2948116
Change-Id: Icd88e3947f6c1461c49ef6912985836931a1c62b
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2021-09-24 15:52:49 +05:30
Anand Ravi
d7eb296004 msm: camera: isp: Reset fence after signalling success
If fence is signalled successfully, reset it to -1 to prevent it from
getting signalled again incorrectly.

CRs-Fixed: 3042511
Change-Id: I87f465508e9e626ad700f592478f253f179e9fe9
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-09-22 15:05:54 -07:00
Depeng Shao
c8ac17dee6 msm: camera: reqmgr: Fix request sync issues
Fix several request sync issues.

CRs-Fixed: 3029196
Change-Id: I92b4048b392fa19e2c9748a5ee0efd9ef0b4e680
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-20 13:04:31 +08:00
Mukund Madhusudan Atre
ead982b872 msm: camera: isp: Add fixes for buf done in presil
Currently, during verification of consumed address, we are not
taking into account the exapanded memory address that newer
targets have. Also, we are using wrong index for fence map
table, leading to supplying same resource handle for copying
buffer of different fence map entry, leading to empty frame.
Add correct comparision for consumed address and supply correct
index for fence map entry.

CRs-Fixed: 2932495
Change-Id: I1743d894ce47a51f2d93dc185865bb47b7655c05
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-09-16 20:02:34 -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
Savita Patted
09f1d471b3 Merge "msm: camera: common: Add camera minidump changes" into camera-kernel.lnx.5.0 2021-08-24 20:01:45 -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
f428aed04a msm: camera: req_mgr: Handle apply failure
Handle apply failure in workqueue. Add recovery mechanism
to recovery in req_mgr to handle frame out of sync issue.

CRs-Fixed: 2997164
Change-Id: I0e04571b3a31d7a879a7aa579c1f0be51c233277
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-08-19 07:54:50 -07:00
Savita Patted
605c8a002d Merge "msm: camera: isp: Protect recovery callback from stop ioctl using mutex" into camera-kernel.lnx.5.0 2021-08-13 18:20:13 -07:00
Sokchetra Eung
2a1deb94b0 msm: camera: isp: Check for NULL ptr
Validate the pointer for NULL prior to
dereferencing it in ISP driver.

CRs-Fixed: 2995152
Change-Id: I838ab1685ff7d270c9c28b0ec12177a25f33c144
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-08-11 10:35:30 -07:00
Anand Ravi
b811f12335 msm: camera: isp: Protect recovery callback from stop ioctl using mutex
Since recovery callback happens in workqueue context, it can run in
parallel with stop dev ioctl. This leads to many possible race
conditions. Instead, protect the recovery callback with the same context
mutex as ioctls to prevent parallel execution.

CRs-Fixed: 3003703
Change-Id: I92a635cfaeee4cf09047672a5cb925cf262cd816
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-08-09 11:49:02 -07:00
Camera Software Integration
7d06d880aa Merge "msm: camera: isp: Handle processing RUP_DONE prior to SOF" into camera-kernel.lnx.5.0 2021-07-30 17:36:10 -07:00