提交線圖

29 次程式碼提交

作者 SHA1 備註 日期
Karthik Anantha Ram
9f4f8e114c msm: camera: common: Use the appropriate header for spinlock
With the allow list tightened, use the right header for spinlock
usage. Change replaces usage of linux/spinlock.h to
linux/spinlock_types.h.

CRs-Fixed: 2841729
Change-Id: I0247501b765436099f75c9725e9f614f0873c888
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-04-12 14:42:58 -07:00
Alok Chauhan
4d4afb2793 msm: camera: isp: increase number of hw entries
increase number of hw entries to allocate sufficient memory
for cdm bl commands.

CRs-Fixed: 2837487
Change-Id: Id890ab07cc66ef704a1317d545540f36dfc7f3c2
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-02-24 22:38:05 -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
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
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
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
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
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
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
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
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
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
Jigar Agrawal
3f8fc789d9 msm: camera: ife: Optimize the IFE CDM Acquire
Optimize IFE configuration process by making
IFE hw update entries independent of the hw type
(IFE or SFE). Use CPAS-CDM for dualIFE configuration.

CRs-Fixed: 2704472
Change-Id: I1ecba0312c83f0ab1b88c158430650bb9e28666c
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-07-21 17:02:06 -07:00
Trishansh Bhardwaj
172d34b6f7 msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
msm: camera: tfe: Fix variable initialization issues
msm: camera: isp: Dual tfe event check with proper hw idx
msm: camera: smmu: Add support for non-contiguous mermory region
msm: camera: smmu: Use iommu best match algo for camera
msm: camera: ope: Optimize allocation of IO configuration
msm: camera: ope: Fix for KW Issues
msm: camera: ope: Add support for stripe level height configuration
msm: camera: tfe: Enable the delay line clc
msm: camera: ope: Fix false alarm for OPE HW timeout
msm: camera: tfe: Support register dump per request
msm: camera: ope: Increase max number of stripes
msm: camera: ope: Change packer and unpacker format in case NV12
msm: camera: tfe: Add packet code get command for tfe
msm: camera: ope: Trigger recovery in case of violation on write bus
msm: camera: ope: Protect ope hw reset with mutex
msm: camera: ope: Add a check for valid request in cdm callback
msm: camera: ope: Remove the BW & clock vote in release context
msm: camera: ope: Reduce OPE BUS memory
msm: camera: ope: Fix return value for ope acquire
msm: camera: ope: Fix false alarm for OPE request timeout
msm: camera: ope: Avoid deadlock during recovery after HW hang
msm: camera: tfe: tfe debug enhancement
msm: camera: cdm: Fix irq_data value in case of inline irq
msm: camera: flash: Switch off flash on provider crash
msm: camera: ope: Initialize ope hw mutex structure
msm: camera: cdm: Flush all available FIFOs during reset
msm: camera: cpas: Add mandatory bw option for axi ports clocks
msm: camera: ope: Use vzalloc to allocate the write bus ctx structure
msm: camera: ope: Fix handling of init hw failure
msm: camera: tfe: Enable per frame register dump for rdi only context
msm: camera: cdm: Protect cdm core status bits with mutex
msm: camera: cdm: correct the error check in cmd submit irq
msm: camera: ope: Fix unclock access during HW reset
msm: camera: ope: Program frame level settings after idle event
msm: camera: ope: Delay releasing of resources for last context
msm: camera: isp: Increase default SOF freeze timeout
msm: camera: smmu: Add map and unmap monitor
msm: camera: isp: Add trace events across ISP
msm: camera: smmu: Profile time taken for map, unmap
msm: camera: ope: Start context timer on receiving new request
msm: camera: tfe: Reduce stack size during set axi bw
msm: camera: cdm: Check for HW state before dumping registers
msm: camera: ope: Reduce stack footprint during acquire
msm: camera: tfe: Disable clock if tfe2 is not supported
msm: camera: cdm: Avoid cdm pause incase of BL submit
msm: camera: tfe: Optimize CSID IRQ logging
msm: camera: ope: Move request id validity check outside of lock
msm: camera: tfe: Correct the tfe hw manager dump logic
msm: camera: ope: Synchronize flush and submit BLs
msm: camera: cdm: Protect cdm reset status
msm: camera: cdm: Handle cdm deinit sequence properly
msm: camera: tfe: Reduce reset timeout to 100ms
msm: camera: ope: Fix hang detection
msm: camera: ope: Make non-fatal logs as debug and info logs
msm: camera: tfe: set overflow pending bit to zero after HW reset
msm: camera: ope: Do not disable CDM during error handling
msm: camera: ope: Add support for OPE Replay
msm: camera: ope: Stop OPE in case of init failure
msm: camera: ope: Synchronize process cmd and flush request
msm: camera: cdm: Fix CDM IRQ handling
msm: camera: tfe: LDAR dump for TFE
msm: camera: ope: Fix the length check for debug buffer
msm: camera: cdm: Fix CDM reset logic
msm: camera: ope: Dump debug registers in case of HW hang
msm: camera: tfe: Support the RDI bus port for line based mode
msm: camera: cdm: Handle out of order reset done events
msm: camera: ope: Consider other contexts during timeout
msm: camera: ope: Put GenIRQ in last stripe BL
msm: camera: tfe: Process the rdi interrupts for rdi only resource
msm: camera: jpeg: Check the HW state before accessing register
msm: camera: csiphy: Update csiphy power-up sequence for lito v2
msm: camera: cdm: Secure freeing of request lists using locks
msm: camera: cpas: Add support for Scuba camnoc
msm: camera: csiphy: Clear secure phy flags on release
msm: camera: tfe: validate the tfe bw num paths
msm: camera: ope: Reorder the reset order in ope acquire
msm: camera: ope: Dump debug registers in case of reset failure
msm: camera: ope: Add logic to detect hang in CDM
msm: camera: isp: Increase max count of cfg to support more init packets
msm: camera: core: Fix cpas axi clk rate overflow.

CRs-Fixed: 2668666
Change-Id: I882ca4bd117bebc7d1c62bc82299d69d7b5c9388
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-06-03 11:48:47 +05:30
Vishalsingh Hajeri
ca48923671 msm: camera: cdm: Enable internal CDM
Add support to acquire IFE CDM instead of CPAS
CDM.

CRs-Fixed: 2571273
Change-Id: Iea3bcf236d00d39bf19e0997e6d21efcd5406a61
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-03-23 07:16:15 -07:00
Karthik Anantha Ram
b7a494a130 msm: camera: reqmgr: Add support for dual trigger
Currently CRM waits for a single trigger to apply settings
for all the devices on a given link. This change provides
provision for CRM to wait on two triggers prior to applying
a given setting.

CRs-Fixed: 2627065
Change-Id: If6e4c9281cfd1bf1a8ffa369daee060d79f3c39e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-03-11 15:47:07 -07:00
Venkat Chinta
32eade687a msm: camera: isp: Config hardware in work queue
Currently requests for offline IFE are applied from tasklet
context or from an ioctl thread within a critical section
protected by a spinlock. In both of these cases, preemtion is
disabled but CDM requires mutex locks during this operation.
Therefore a work queue is added in this change to handle
apply request for offline IFE.

CRs-Fixed: 2606911
Change-Id: Ie893a626bc274d026fb878f1f19830e990be6dc6
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-19 17:56:44 -08:00
Venkat Chinta
8e79606ada msm: camera: isp: Add support for offline IFE
This change adds new IRQ state machine and updates the acquire
logic to enable offline IFE. This change also adds the fixes
necessary to enable bus read for various buffer formats and
append go command at the end of each packet for offline
context.

CRs-Fixed: 2513939
Change-Id: Ie068670ed11aa6713e8f0cb817e4b5d4c209e696
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-10 15:50:56 -08:00
Karthik Anantha Ram
381bb12c68 msm: camera: isp: Obtain timestamp as part of frame header
In use-cases that involve custom HW retrieve the timestamp
for shutter from frame header as opposed to csid registers.

CRs-Fixed: 2524308
Change-Id: I5de789cf939546affbfe6d537d8090982f39189d
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-02-10 14:56:25 -08:00
Gaurav Jindal
e3f5738e43 msm: camera: isp: LDAR Dump ISP information
When user space detects an error or does not receive
response for a request, Lets do a reset(LDAR) is triggered.
Before LDAR, user space sends flush command to the
kernel space.
In order to debug the cause for this situation and to dump
the information, user space sends a dump command to
kernel space before sending flush.
As a part of this command, it passes the culprit request id
and the buffer into which the information can be dumped.
Kernel space traverses across the drivers and find the culprit hw
and dumps the relevant information in the buffer.
This data is written to a file for offline processing.
This commit dumps the IFE, CSID registers, LUT tables and context
information, cmd buffers, timestamps information for
submit, apply, RUP, epoch and buffdones of the last 20
requests.

CRs-Fixed: 2612116
Change-Id: If83db59458c1e5ad778f3fa90cbc730122491c54
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2020-02-10 14:39:46 -08:00
Karthik Anantha Ram
5ddf0a5cfb msm: camera: isp: Add support to obtain frame index
This change captures the frame index as part of the IFE top
register space at every epoch event. The index is then notified
to userspace as part of shutter notification.

CRs-Fixed: 2524308
Change-Id: Iac510c452f9ceda86e9f7d69528f22f81e614974
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-02-08 00:15:28 -08:00
Tejas Prajapati
96390653c5 msm: camera: reqmgr: reset the slot on buf_done
Reset the slot with the valid request on receiving
the buf_done which is reported on next EPOCH.
In case of back to back irqs slot is marked as skip idx
it will apply the request and try to reset a slot based
on MAX_PD + 1 calculation which might have the request
for which we have got a bubble. To make sure this does not
happen, reset a slot only on the buf_done for valid request.

If STOP ioctl is called from UMD for ISP, it will flush all
the lists. But this is not notified to CRM which might have
a stale entry of the half applied request, so on STOP ioctl
clear all the slots.

In case of SAT mode if one of the link has generated bubble,
while the sync_link has the sync_request slot reset sync_link
will not let the link recover of the bubble. To make sure the
recovery sync_mode is set to 0 for two consecutive slots of
the link.

CRs-Fixed: 2551701
Change-Id: If4b6f8a4a831ffddcef2cae6292d066778c18b04
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-01-30 03:34:07 -08:00
Trishansh Bhardwaj
cb2e8943da msm: camera: tfe: Add support to TFE driver
TFE is thin front end hardware that capture and process the
real time image. Support is added to enable the TFE
hardware.

CRs-Fixed: 2594541
Change-Id: I0ab2eff7924e9e01f6a0fcec772d3a7dda229b37
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:42 +05:30
Pavan Kumar Chilamkurthi
09e2bdc6bf msm: camera: isp: Improve isp substate logging
Improve sp substate logging to print state string
instead of value. Add handler for reg_update in
bubble state to print a warning log indicate the
event.

CRs-Fixed: 2523062
Change-Id: I95c6f16733a177cbf33099775d8ef7eb049a62b4
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-10-28 13:31:25 -07:00
Vishalsingh Hajeri
5c2bb43241 msm: camera: isp: Re-apply Bubble request
In certain scenario Buf_done failures are observed
for the request which is in bubble state. Since we
never get bufdone we inadvertently are stuck
in Bubble state. This change will wait for a period
of two frames to receive bufdone and recover from bubble
state. If any bufdone IRQ is never generated within this
time period, we remove the request from active list and
add it back to pending request list.

CRs-Fixed: 2506159
Change-Id: Ibcce21a1a87d0a64e49c6454391ca139fc7d1fa7
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-10-04 11:58:16 -07:00
Trishansh Bhardwaj
921bdca4b0 msm: camera: isp: Skip reapply of DMI config on bubble recovery
Updating same DMI bank, which is consumed by HW, can result in
violations so during bubble recvery skip  updating DMI config.

CRs-Fixed: 2511286
Change-Id: I1af2dbf2f1b49afcd4276d3f5759e5ba6d8da637
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-09-21 22:48:29 -07:00
Jigarkumar Zala
5b016ad220 Camera: Correct makefiles for correct header inclusion
Correct some Makefiles and drivers header inclusion.

Change-Id: Iec3e6e0333ae55e8f1cff9780723e0dad954ff83
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-09 16:27:18 -07:00
Jigarkumar Zala
2c55550c19 msm: camera: isp: Add debugfs parameter for state monitor dump
This change adds a debugfs parameter to enable isp context state
monitor dump rather than always print by default. This change
also changes isp context substate to HALT only after stop hw
is complete.

Change-Id: I1025a46e9be63b4ee5808c2eb44672687d901c2e
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-07-09 10:33:52 -07:00
Jigarkumar Zala
05349feaa2 Camera: Bring over camera driver changes
Bring over camera driver changes as of msm-4.19
commit  5a5551a7 (Merge "msm: camera: reqmgr: Fix CRM
shift one req issue").

Change-Id: Ic0c2b2d74d1b3470c1c51d98228e312fb13c501a
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-08 10:24:55 -07:00