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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>