Gráfico de commits

120 Commits

Autor SHA1 Mensaje Fecha
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
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
Anand Ravi
8f5a2cd427 msm: camera: isp: Print context on release HW error
Print the context id in the error statement when release_hw is
called in top state with no hw resources acquired.

CRs-Fixed: 2709537
Change-Id: Ic153cc7f92cfc15a56e7989b0337a4e051af4c43
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2020-10-06 22:58:01 -07:00
Camera Software Integration
74dece5952 Merge "msm: camera: core: Change the error logs to rate limited" into camera-kernel.lnx.4.0 2020-10-06 12:27:53 -07:00
Jigar Agrawal
d74902f0cf msm: camera: cdm: Add CDM hang detect and debug registers dump support
Add support to dump the cdm core debug registers and CDM hang detect
support for better debugging purpose in case of cdm timeout at config
ife. Add a debugfs for CDM command buffer dump for cdm hang events.
Fix the possible NULL derefernce while dumping the cdm registers.
Turn on debugfs using following command in adb shell:
echo 1 >> /sys/kernel/debug/camera_isp_ctx/enable_cdm_cmd_buffer_dump.

CRs-Fixed: 2748715, 2782720, 2770565
Change-Id: Ibb9aa1d232d742ca1b6e64c16e9718bfc0bc8624
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-10-01 12:41:57 -07:00
Ravikishore Pampana
f5f9d74e97 msm: camera: core: Change the error logs to rate limited
In bubble cases and if not recovered, error logs causing
excessive logging issues. Change the error and warn logs to
rate limited in error bubble and apply failure cases.

CRs-Fixed: 2785070
Change-Id: Ia7268cfc7b672c24f3161cd65c53df5ee357e7ee
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-10-01 19:04:43 +05:30
Ravikishore Pampana
02f65e4927 msm: camera: tfe: Add support last consumed address for tfe
Tfe hardware support the last consumed buf address.
Request port buf done verified with last consumed buffer
Address. Buf done irq delays can be handled through
last consumed address verification.

CRs-Fixed: 2784348
Change-Id: I4d629da44cf6f1b7755c7785eac11f72384c78c7
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-09-24 12:51:01 +05:30
Shravya Samala
8b38e86abd msm: camera: isp: Max requests per context reduction in isp driver
Reduced maximum no of requests per context from 20 to 8
in isp driver.

CRs-Fixed: 2720238
Change-Id: If557b190fe94af72cc6fb28f36c3e1f6189218a5
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-09-21 07:12:45 -07:00
Karthik Anantha Ram
d9a20488d8 msm: camera: common: Handle epoch if bubble recovery is disabled
If bubble recovery is disabled, IFE driver should continue
to notify that epoch to CRM as opposed to dropping that frame
in IFE. In case of sHDR if bubble recovery is disabled and IFE
does not notify the epoch at which bubble was detected it will lead
to a trigger count mismatch in CRM.

CRs-Fixed: 2768309
Change-Id: I311ce80857a905496c633708a5f4ee2391679037
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-09-15 13:43:04 -07:00
Fernando Pacheco
46812a7030 msm: camera: ife: Always send stop immediately when stopping hw
As the name implies, we stop the HW sooner, so prefer it over
"stop at frame boundary".

CRs-Fixed: 2724889
Change-Id: I7fa353c09dbe733e57f099893edc0e7f7fa18e7a
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-08-27 10:50:06 -07:00
Haritha Chintalapati
eedefac65c Merge "msm: camera: sync: Rearrange sync reason events" into camera-kernel.lnx.4.0 2020-08-25 16:43:57 -07:00
Haritha Chintalapati
38ba051707 Merge "msm: camera: isp: Update ife substate before apply setting" into camera-kernel.lnx.4.0 2020-08-25 16:43:14 -07:00
Alok Chauhan
baf2d520ed msm: camera: sync: Rearrange sync reason events
Rearrange sync error reason code for better code
readability.

CRs-Fixed: 2750553
Change-Id: Ia64694155921c074946167763815a87beb856b35
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-24 13:48:40 +05:30
Camera Software Integration
73fd4e6bef Merge "msm: camera: core: Send event on smmu page fault" into camera-kernel.lnx.4.0 2020-08-21 14:07:01 -07:00
Ravikishore Pampana
b746c4f527 msm: camera: core: Send event on smmu page fault
Currently when page fault happen, iommu driver callers camera
handler with CB details and iova address which caused the page
fault. With iommu iova address cam smmu driver finds the
closest mapping address for that cb and call the
corresponding driver to find the which port caused page fault.
This has limitation has page fault address always not mapped.
New approach is get the page fault ids from iommu driver.
Based on the Pid and Mid values, get the HW id and port ids,
go through all context which has this hw id and port id and log
the data. Once context id is identified, log the acquire data and
last consumed client address details. Dump the hw register data
in the given buffer. Send the smmu page fault event through
v4l2 queue to user.

CRs-Fixed: 2750690
Change-Id: I87c809b3229992c7c95655a4f3c6c70ebc035ae8
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-08-19 14:16:38 +05:30
Alok Chauhan
1d1edb7030 msm: camera: sync: Add SYNC_V4L_EVENT_V2 support in sync driver
Add SYNC_V4L_EVENT_V2 support in sync driver. As part of this
change, added the reason code field as part of sync event header.
This failure reason code is filled by camera kernel driver and
propagate to userspace.

CRs-Fixed: 2750553
Change-Id: I206d0d51c38cfe4214814b89d241f51c1f50605b
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-16 11:14:20 +05:30
Haritha Chintalapati
06a9ad0ba4 Merge "msm: camera: ife: Get consumed address info during hw_mgr init" into camera-kernel.lnx.4.0 2020-08-11 19:04:00 -07:00
Depeng Shao
494ace8da7 msm: camera: ife: Get consumed address info during hw_mgr init
This change checks whether the context supports last consumed
address during hw_mgr init.

CRs-Fixed: 2749254
Change-Id: I238893eb2d661014a2a51758bcf71c3e4d00f2d5
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-08-08 12:35:35 +08:00
Fernando Pacheco
0d784286a9 msm: camera: common: Avoid uninitialized accesses
Improve the error-handling code paths to prevent accesses to
uninitialized variables. This is done by either picking a sane
default for the variable or skipping accesses altogether after
an unsuccessful attempt to initialize.

CRs-Fixed: 2748220
Change-Id: Ibe383e56ec4e3f45f76f619c7d6b62c3d7dfcadb
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-08-06 13:41:05 -07:00
Depeng Shao
86f144a267 msm: camera: isp: Handling IRQ delays
Checking the BUS write client last consumed
address, if it matches with next request port
io buffer address, then irq delay detected.
We can signal port fence for both active request.

CRs-Fixed: 2684890
Change-Id: I8265c06a2284897d43e9a24511ad2c13c9690186
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-08-04 12:00:00 +08:00
Depeng Shao
7ccae419d3 msm: camera: isp: Update ife substate before apply setting
Offline mode may receive the SOF and REG_UPD irq event
earlier than CMD processing return back, then the event
will be dropped. This change updates ife substate to
APPLIED state before apply setting and move the req
to wait list.

CRs-Fixed: 2736862
Change-Id: I052c618ef64aae0e30232609a209a0dc43b53f8c
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-30 19:24:37 -07:00
Camera Software Integration
ed39aa54a0 Merge "msm: camera: isp: Remove bubble re-apply recovery mechanism" into camera-kernel.lnx.4.0 2020-07-28 16:12:42 -07:00
Haritha Chintalapati
82c16fb39a Merge "msm: camera: ife: Optimize the IFE CDM Acquire" into camera-kernel.lnx.4.0 2020-07-27 13:37:12 -07:00
Karthik Anantha Ram
986223aab6 msm: camera: isp: Remove bubble re-apply recovery mechanism
If a request has been applied the buffer addresses have been
configured, and if a frame bubbles buf done is expected on
the same frame or in the worse case on the next frame.
SW should not try adding a bubbled request back to pending
list without a buf done for that request.

CRs-Fixed: 2729789
Change-Id: I9a2f45c58d39b659cd7a12747dc738c43cf5e0ad
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-07-24 14:01:12 -07:00