Propagate error code to user in order to let the
user know more about the failure.
CRs-Fixed: 2860306
Change-Id: Icf030aa9df32eac97371059c2d282cfb53257401
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Based on link_hdl/sensor id, that can separate multi camera event
on reqmgr, apply request, bufdone, isp_active_irq.
Add log of link_hdl/sensor id in above trace event,
that systrace can show independent camera trace event.
CRs-Fixed: 2924042
Change-Id: I7088a8a489a05dae4e62dc131d1c0c45c72038e2
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
For recovery of the bubble the request from active list
should be added back to pending request list.
CRs-Fixed: 2887188
Change-Id: I9bd14db82f96d2fda99bb542bd0df4c9c4a06745
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
Add support for programming Sparse PD output port in
vfe bus. Fix config of PDAF Data port.
CRs-Fixed: 2841729
Change-Id: I30f2adc8f2f4ef94b62ec0cbfc768d5f5b88e505
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
In the Case of CSID RX fetal errors, We disable rx path. Whenever
we get sof freeze after some time, we enable the path SOF
to do a health check of the sensor.
But we don’t get the SOFs and it gives the wrong impression that
the sensor is not streaming.
Notify crm driver to pause the timer in case of fatal hardware error
to not missled sof freez issue.
CRs-Fixed: 2890861
Change-Id: I73e750cad0193ea5537a25c8440a9863343c4ef7
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
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 count is 2.
CRs-Fixed: 2885087
Change-Id: I67d1ecfe9c88123e6d0887383961bfc676455a0d
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Add support for new TFE ports.
New ports: DS4, DS16, AI, STATS RS, and independent PDAF.
Add new HW file. Remove older HW specific hard coding.
Depends-on: 3563428
CRs-Fixed: 2887030
Change-Id: I8ad7b0037652db39fe5a2e86af28028a3740f1f4
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
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>
In case of SFE/CSID cmd buffer update, more number of hw update entries
is needed. Assign and allocate this memory dynamically based
on stream type. Also the change makes cdm cmd memory allocation
based on the stream.
CRs-Fixed: 2841729
Change-Id: Iaaa3ce7152a103ace25b24d84776f5a665603994
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
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>
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>
Switch WMs for current 2PD and 2PD_STATS ports. Rename
2PD_STATS to PREPROCESS_2PD inline with UMD notion.
CRs-Fixed: 2841729
Change-Id: I735ef397cfd6328aa2fef73970def0b64044fe2e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
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>
Allocate context map entries based on the chipset and also
the underlying HW acquired for the given context.
CRs-Fixed: 2841729
Change-Id: Ieeb442c74bd3b6c9c32fbe47b59f40a8485963b3
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Kernel apis provide information fault caused pid and mid data.
Handle the OPE smmu fault using pid and mid data. Based on the
mid data, dump only corresponding port info which caused the
fault. Pid and mid values are target dependent, these values
will be updated on the ope node dt entries.
CRs-Fixed: 2857868
Change-Id: I909f1787e71e67e5ed1d3464dfeb506418d151e4
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
If CRM skips applying settings on a given frame, in case of sHDR
program scratch buffers along with RUP/AUP to ensure
continuity with respect to sensor frames.
CRs-Fixed: 2841729
Change-Id: I296dbc713f49db54681043415b6ad1499dc13de4
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Kernel 5.5+ changed debugfs API's for creating simple dentry variables.
There is now no return value for those API's.
CRs-Fixed: 2835738
Change-Id: Ic5eea63f2e94451e5dfb211cb2b4aa80ce47073a
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
In Waipio, the sequence of the RUP and SOF interrupts is reversed as
compared to previous generations. RUP is observed before SOF.
This requires handling of RUP in applied state, which is missing in the
RDI only state machine leading to the state machine looping to the
bubble state repeatedly.
By adding the transition from applied to epoch state on RUP, looping
over the bubble state is no longer observed.
CRs-Fixed: 2846451
Change-Id: Ib298695ae2aad248b76a6e05c6a9b4d84793717b
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
In current implementation, cam_ctx_req has a array of
hw_update_entries, in_map_entries and out_map_entries. Each
context has array of N requests. Memory for all contexts is
allocated during probe. This causes a huge memory remaining
unutilized.
This commit moves the memory allocation to context acquire time
and freeing this memory during context release. In place
of using array, now dynamic allocation is used.
A top level calculation shows a memory reduction of around 2M-
2.5M with this change including all the camera drivers.
CRs-Fixed: 2830502
Change-Id: Id63cf2a52272e2a419704dc95100694e384330c3
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
If there is a use-case where lite can be used to support PIX resources,
as a part of acquire, a hint will be sent to indicate that lite can
be acquired. This hint is used to acquire the lite csid based on the
use-case.
CRs-Fixed: 2830502
Change-Id: Ib0a005ed64cd7ffec579195948f0fcb8b24ea837
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
This change prevents excessive logging. WARN_ON() prints
call stack which cause excessive logging in tasklet.
Removes WARN_ON() in error case where buf done irq for
a request exceeds actual number of out port.
CRs-Fixed: 2828453
Change-Id: I020cc74b73841e9599c4d1570829c6b086e768ec
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
In case of any error IRQs encountered during stop, there is
no need to notify them to UMD since the entire pipeline
would be reset prior to next session start. With this change
we transition to HALT state and then issue stop.
CRs-Fixed: 2825121
Change-Id: I9535439d1a29e3b6f8da968b60e5b2b5bc32c1bf
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
If buf done error come for same applied request id then log
only once. Change the bufdone deferred logs to debug logs.
CRs-Fixed: 2824276
Change-Id: I870708bfb0c4f0ad0a1fade3a7e334551d055c73
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
In cases where we see a buf done without request being in
active_list, there could be a possibility that the request
is applied just before SOF, RUP but the context state is
not moved to Applied state, at this time the request is in
wait_list. In such cases RUP event doesn't move the request
into active_list. Also if the BUF_DONE on a port is happening
before EPOCH, we simply drop that BUF_DONE and then the request
will eventually be tagged as BUBBLE at the time of EPOCH. But
since BUF_DONE is dropped, the request will never come out of
BUBBLE. To handle such cases and to come out of BUBBLE,
check if BUF_DONE matches with the request in wait_list by
checking last_consumed address and if so, mark it as deferred
buf_done and handle once the request is moved to active_list.
CRs-Fixed: 2814346
Change-Id: I778a6a684076d5327d536f319a23206ccc0c25b6
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Re-apply bubble request if buf done has not come for 2 bubble frames.
Also before re-submitting the request to CDM check if CDM callback for that
request has come or not, if CDM callback is received then wait for buf
done else reset CDM and re-submit the request to CDM.
CRs-Fixed: 2807378
Change-Id: I1fd209482e14d58aa48d12194084d0a2ab943e31
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
When we do flash operation in SHDR usecase, the
trigger count will mismatch if we don't pass
trigger id to CRM.
CRs-Fixed: 2813321
Change-Id: Ic557f1122f8698f987d249fe1d15e35b90326e1d
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
1. Add more triggers to save cpas state info. IFE EOF, ReqBufDone
2. Save camnoc fill levels in each cpas log state
3. Print camnoc QoS settings in cpas state dump for debug
purpose. Though these are static settings, printing will
help in making sure correct settings are applied.
CRs-Fixed: 2814346
Change-Id: Ic3018c5f7fdeaac3a123c6d046eb5e6a34a675e7
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
This change adds support for Waipio bus hardware. It also
changes the bus private structure to be pointer based so
that most of the information is filled from hardware
specific headers.
CRs-Fixed: 2794540
Change-Id: Ie9d30442246a896f372512b62bd54be32c4921ad
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
In order to reduce the traffic on the v4l2 queue, avoid
posting qtimer shutter for bubbled frames.
CRs-Fixed: 2799794
Change-Id: Id752605e7aff89246edfeec9337612bb7c9b4790
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
msm: camera: cdm: Fix dangling pointer issue
msm: camera: cdm: change work record to atomic variable
msm: camera: utils: Adding device type to track device handles
msm: camera: tfe: Reduce stack footprint during bw vote
msm: camera: req_mgr: Thread switch delay detection mechanisms
msm: camera: cdm: Avoid submitting BL if FIFO is full
msm: camera: tfe: check cdm hang in the tfe config timeout
msm: camera: req_mgr: Delay detection mechanism
msm: camera: cdm: Debug info in case of cdm page fault
msm: camera: isp: Max context reduction for TFE in isp driver
msm: camera: ope: Maintain current clock value during acquire
msm: camera: req_mgr: Limit CAM_ERR log in case of no empty task
msm: camera: cdm: Decrement write-count only after Bl commit
msm: camera: isp: Added CSID recovery mechanism.
CRs-Fixed: 2792394
Change-Id: I1c7a903ae15b572acf3f6318cda7394cb6549c8d
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>