Граф коммитов

142 Коммитов

Автор SHA1 Сообщение Дата
Camera Software Integration
18e3dd6a8e Merge "msm: camera: reqmgr: Propagate hw failures to user" into camera-kernel.lnx.5.0 2021-04-28 21:22:50 -07:00
Camera Software Integration
5cf3a57890 Merge "msm: camera: reqmgr: add trace log for separating multi camera" into camera-kernel.lnx.5.0 2021-04-28 21:19:52 -07:00
Camera Software Integration
f857a1140c Merge "msm: camera: isp: Reapply bubble request in RDI path" into camera-kernel.lnx.5.0 2021-04-28 21:19:47 -07:00
Jigar Agrawal
76857940be msm: camera: reqmgr: Propagate hw failures to user
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>
2021-04-19 19:07:15 -07:00
Haibin Liu
693c6dfdae msm: camera: reqmgr: add trace log for separating multi camera
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>
2021-04-19 21:51:51 +08:00
Haritha Chintalapati
729397c303 Merge "msm: camera: isp: Pause the CRM timer in case of hardware errors" into camera-kernel.lnx.5.0 2021-04-12 19:07:25 -07:00
Tejas Prajapati
7ccb837201 msm: camera: isp: Reapply bubble request in RDI path
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>
2021-04-09 09:57:55 -07:00
Haritha Chintalapati
1a11831377 Merge "msm: camera: isp: Fix config of vfe out ports" into camera-kernel.lnx.5.0 2021-04-07 16:29:07 -07:00
Mukund Madhusudan Atre
9d9c632144 msm: camera: isp: Fix config of vfe out ports
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>
2021-04-05 11:43:22 -07:00
Chandan Kumar Jha
90cd14c1de msm: camera: isp: Pause the CRM timer in case of hardware errors
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>
2021-04-05 14:48:52 +05:30
Depeng Shao
3042ddc21c 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 count is 2.

CRs-Fixed: 2885087
Change-Id: I67d1ecfe9c88123e6d0887383961bfc676455a0d
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-04-05 13:13:53 +08:00
Savita Patted
49f6c24ee9 Merge "msm: camera: isp: Add new ports for TFE" into camera-kernel.lnx.5.0 2021-03-29 18:42:59 -07:00
Savita Patted
aeef497955 Merge "msm: camera: isp: Change warn logs to rate limited" into camera-kernel.lnx.5.0 2021-03-29 18:41:51 -07:00
Savita Patted
6c2a837117 Merge "msm: camera: isp: Check whether flush list is empty" into camera-kernel.lnx.5.0 2021-03-24 19:52:10 -07:00
Wyes Karny
dc1bf6d21b msm: camera: isp: Add new ports for TFE
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>
2021-03-23 04:22:42 -07:00
Depeng Shao
73ee140ad0 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-22 21:41:58 -07:00
Karthik Anantha Ram
1f9c10f9c8 msm: camera: isp: Assign max hw update entries based on stream type
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>
2021-03-20 11:54:01 -07:00
Depeng Shao
a8fce31f3f 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-18 15:30:48 +08:00
Savita Patted
0626095cbc Merge "msm: camera: isp: Re-assign WMs for UAPI port names" into camera-kernel.lnx.5.0 2021-03-16 17:42:58 -07:00
Depeng Shao
1edfd82801 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-12 23:42:05 -08:00
Karthik Anantha Ram
5ce6aebaad msm: camera: isp: Re-assign WMs for UAPI port names
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>
2021-03-11 15:52:10 -08:00
Savita Patted
90fb1ebc6c Merge "msm: camera: isp: Allocate max map entries based on the stream type" into camera-kernel.lnx.5.0 2021-03-10 16:10:01 -08:00
Savita Patted
1ee4bca76c Merge "msm: camera: ope: Handle OPE smmu fault with pid info" into camera-kernel.lnx.5.0 2021-03-09 20:18:26 -08:00
Ayush Kumar
92a753d37d 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-03-08 10:10:50 -08:00
Karthik Anantha Ram
b15d7e1415 msm: camera: isp: Allocate max map entries based on the stream type
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>
2021-03-05 16:12:07 -08:00
Wyes Karny
1e3a1316ed msm: camera: isp: Reset num_deferred_acks when re-applying bubble req
When re-applying bubble request after 2 frames reset num_deferred_acks
also.

CRs-Fixed: 2824276
Change-Id: I57e7ac89da69a2d65546c6f9a7f1d3c9f2c7e58f
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-03-03 20:37:54 -08:00
Vikram Sharma
57bff5aede msm: camera: ope: Handle OPE smmu fault with pid info
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>
2021-02-24 23:40:40 -08:00
Haritha Chintalapati
893431ebc3 Merge "msm: camera: req_mgr: Debugfs API update" into camera-kernel.lnx.5.0 2021-01-25 14:14:09 -08:00
Karthik Anantha Ram
fa9a698aa1 msm: camera: isp: Add per frame support for scratch buffers
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>
2021-01-21 09:01:34 -08:00
Karthik Jayakumar
e34f0768f2 msm: camera: req_mgr: Debugfs API update
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>
2021-01-20 11:32:25 -08:00
Anand Ravi
e89f634307 msm: camera: isp: Modify RDI only state machine for Waipio
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>
2021-01-11 15:07:47 -08:00
Camera Software Integration
0499b96da4 Merge "msm: camera: common: Optimize cam context memory" into camera-kernel.lnx.5.0 2021-01-08 14:29:46 -08:00
Gaurav Jindal
1a5797c6a8 msm: camera: common: Optimize cam context memory
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>
2021-01-06 06:53:08 -08:00
Gaurav Jindal
a3c040b4d0 msm: camera: isp: Add support to handle pix for lite
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>
2021-01-05 06:01:02 -08:00
Karthik Anantha Ram
57bf238016 msm: camera: isp: HW mgr changes for SFE HW
HW mgr and packet parser changes for new SFE HW block,
introduced on Waipio chipset.

CRs-Fixed: 2841729
Change-Id: Ia8dbeb128448cd399fcce6c4fb74252793664574
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-12-20 15:35:57 -08:00
Chandan Kumar Jha
ebe8cb5e87 msm: camera: isp: Remove WARN_ON() from error case in buf done
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>
2020-12-08 11:34:48 +05:30
Haritha Chintalapati
99dff46326 Merge "msm: camera: isp: reduce bufdone error logs" into camera-kernel.lnx.4.0 2020-12-02 19:10:41 -08:00
Karthik Anantha Ram
b3f31ae726 msm: camera: isp: Transition to HALT state prior to HW stop
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>
2020-11-30 18:27:00 -08:00
Ravikishore Pampana
1f9cc4f48c msm: camera: isp: reduce bufdone error logs
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>
2020-11-25 23:14:20 +05:30
Camera Software Integration
33c2430714 Merge "msm: camera: cpas: Enhance cpas dump with more info" into camera-kernel.lnx.4.0 2020-11-19 14:21:12 -08:00
Pavan Kumar Chilamkurthi
4c4ed69a5c msm: camera: isp: Handle buf_done without request in active_list
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>
2020-11-14 00:56:16 -08:00
Haritha Chintalapati
2dc8859361 Merge "msm: camera: isp: Bubble re-apply with CDM callback detect" into camera-kernel.lnx.4.0 2020-11-13 13:32:03 -08:00
Camera Software Integration
46d760366f Merge "msm: camera: isp: Add trigger id for EOF event" into camera-kernel.lnx.4.0 2020-11-11 13:57:44 -08:00
Wyes Karny
9075af0870 msm: camera: isp: Bubble re-apply with CDM callback detect
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>
2020-11-11 10:49:23 +05:30
Haritha Chintalapati
692dd76c99 Merge "msm: camera: isp: Skip qtimer shutter for invalid req_id" into camera-kernel.lnx.4.0 2020-11-09 13:35:29 -08:00
Depeng Shao
6103984425 msm: camera: isp: Add trigger id for EOF event
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>
2020-11-09 17:43:06 +08:00
Pavan Kumar Chilamkurthi
38b660d92f msm: camera: cpas: Enhance cpas dump with more info
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>
2020-11-07 17:55:24 -08:00
Mukund Madhusudan Atre
1332b49e26 msm: camera: ife: Add support for camera v680 bus
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>
2020-10-27 20:56:23 -07:00
Karthik Anantha Ram
fde5d66e83 msm: camera: isp: Skip qtimer shutter for invalid req_id
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>
2020-10-23 17:13:35 -07:00
Tejas Prajapati
4574450a12 msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
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>
2020-10-13 12:08:01 +05:30