Revīziju grafs

43 Revīzijas

Autors SHA1 Ziņojums Datums
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
Camera Software Integration
0894c95dda Merge "msm: camera: isp: Get packet opcode from hw manager" into camera-kernel.lnx.4.0 2020-02-07 15:14:33 -08:00
Ravikishore Pampana
4f1ba0f292 msm: camera: isp: Get packet opcode from hw manager
While processing the user space submitted isp packet,
isp context need to know the packet opcode.
Get the opcode from the hw manager than the direct accessing the
opcode from packet.
Ife umd sends different opcodes then tfe umd. Both ife and tfe kernel
packet opcodes are same. So hw manager can consume this differences.

CRs-Fixed: 2585713
Change-Id: I54813af233cd8bfa640f2688c1334510a5b85f1c
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-02-06 15:13:05 -08:00
Ravikishore Pampana
05378eff25 msm: camera: isp: Register dump for first request id
First request id not getting dump if early pcr is on.
If early pcr is on need to store the parsed register dump descriptor
for first request id which comes as init packet.

CRs-Fixed: 2595702
Change-Id: Icbf94d65b5c35cdf47044d770c7db7093001d506
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-06 13:01:12 -08:00
Camera Software Integration
d9c3665f6b Merge "msm: camera: reqmgr: Reduce delay by one frame during bubble recovery" into camera-kernel.lnx.4.0 2020-02-03 14:10:09 -08:00
Karthik Anantha Ram
fbfa512811 msm: camera: reqmgr: Reduce delay by one frame during bubble recovery
The EPOCH at which bubble is detected no setting is applied
to any device. This change will trigger applying the bubbled
setting to the device with highest pipeline delay.

CRs-Fixed: 2564669
Change-Id: I180b4a1d2d29267f330546b8860a099baf1688e9
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:53:46 -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
Chandan Kumar Jha
fc8ddd752d msm: camera: isp: Notify CRM to pause SOF timer after flush
Adding CRM interface to stop SOF timer from isp during flush.
During flush hardware is getting stop and will not send SOF
notification to CRM so need to pause SOF timer. Whenever SOF
timer will get expire,do not need to send error to UMD during
pause time.

CRs-Fixed: 2564389
Change-Id: I6d85f2c658c30dbe211f0ec9d83bca323a5c265b
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2019-11-14 08:06:56 -08:00
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
Venkat Chinta
c23b668890 msm: camera: isp: Limit sof_in_epoch log to first frame
This change limits SOF in early PCR log to the first
frame for that context. This log is needed to catch
unexpected reg updates on first frame after stream on.

CRs-Fixed: 2553728
Change-Id: Icad85aeab2b095a6b95889c933a2de34acebed80
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-10-28 11:39:27 -07:00
Venkat Chinta
04cf1dd4ae msm: camera: isp: Change state immediately in flush
This commit changes the isp context state to flushed state
immediately in order to ignore any further IRQs from the HW.

CRs-Fixed: 2546941
Change-Id: I47f4999a3f51b581697e8dbfd07ef1539b478766
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-23 15:50:23 -07:00
Vishalsingh Hajeri
efffa6d11a msm: camera: isp: Dump isp req for cdm timeout
Print out CDM command buffers to check for invalid
command entry.

CRs-Fixed: 2549972
Change-Id: I5998e62e4ba72fa67394ddf92a4680bc1c909597
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-10-23 15:48:50 -07:00
Venkat Chinta
80560aa938 msm: camera: isp: Add log for first SOF in EPCR
This change adds a log for first SOF in early PCR.

CRs-Fixed: 2546941
Change-Id: Iaca8695f0886fecba84e40b06798818b3f864c35
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-21 16:34:38 -07:00
Trishansh Bhardwaj
35bead08c3 msm: camera: common: Fix compilation issues for 32-bit arch
Fix improper use of divide and modulo operator on 64 bit numbers.
Fix variable type to work with both 32/64 bit arch.

CRs-Fixed: 2543730
Change-Id: Ifa52d46dece3434d41308d284982a0cd8e17cd1b
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-21 15:46:03 -07:00
Venkat Chinta
064d662a3c msm: camera: isp: Update last applied request ID
This change updates last applied request ID when init packets
are applied and when stop ioctls are invoked.

CRs-Fixed: 2539888
Change-Id: I113b7897740d6577a4757ce41f9fcb1fff8c56e9
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-17 14:52:41 -07:00
Venkat Chinta
11e7f21754 msm: camera: isp: Set error type to fatal
This change sets error type to fatal by default when hardware
errors occur.

CRs-Fixed: 2545140
Change-Id: Ic530fe460e67b6d5ec26a6d9d5735f4c8b34affc
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-16 14:38:06 -07:00
Venkat Chinta
f8c6095719 msm: camera: isp: Add log in flush
This change adds a log in flush to indicate stop/restart HW complete.

CRs-Fixed: 2545140
Change-Id: I0068f239c5efeb536d60a9de27577d46bdc66edd
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-16 14:32:49 -07:00
Vishalsingh Hajeri
1aadfe80e8 msm: camera: isp: Remove redundant use of spin lock
Interrupts in activated state machine are already
protected with spin_lock for context. No need to
reuse the spin_lock in interrupt handling routine.

CRs-Fixed: 2538876
Change-Id: Id86e7dc3419861cb8bce143c56923126a3dc3d3e
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-10-14 17:40:28 -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
Venkat Chinta
8c91109b74 msm: camera: core: Change return type
Return different error number when new requests and update
packets are rejected due to bad request ID. This allows
userspace to differentiate this specific reason for failure.

CRs-Fixed: 2518451
Change-Id: I0400c6f2b2e0baf99bee4b4a3736bb1eab646627
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-04 11:55:34 -07:00
Venkat Chinta
aaab1ef87e msm: camera: isp: Stop HW immediately in flush
When the userspace issues flush, ISP driver needs to ensure that
wait and active list requests are flushed and corresponding
buffer fences are signaled with error. For active and wait lists
IFE hardware is stopped immediately. Therefore IFE must also be
reset to ensure that VFE BUS FIFOs are cleared. Start IFE HW
after receiving init packet again.

CRs-Fixed: 2513939
Change-Id: I9a35ce05c24d6b63016e264a870d376eabb2b56f
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-01 13:45:42 -07:00
Venkat Chinta
00abd8feda msm: camera: isp: Add check for last flush request ID
This change adds a check for last flush request ID before adding
bubbled request to pending list. This prevents the request from
sitting in pending list indefinitely.

CRs-Fixed: 2533433
Change-Id: I82d641d42fe507e8eabf0bee0e9a2f0b98d9a802
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-09-25 14:30:49 -07:00
Depeng Shao
68b3051037 msm: camera: reqmgr: Add initial sync support
Do the initial sync by SOF timestamp, if the gap
between the initial SOF of link and the last SOF
of sync link is less than half of frame druation,
CRM should abandon this frame since this frame
should sync with next frame of sync link.

CRs-Fixed: 2492019
Change-Id: I204e3ed49bcf4ac7424aaf5109ad5ce3bc3a2789
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-09-23 16:06:50 +08: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
Prakasha Nayak
2d76f42380 msm: camera: isp: Fix page fault dump for first request
In case of page fault for first request, page fault
information is not dumped since we are not initializing
member variable in case of init request.

CRs-Fixed: 2498880
Change-Id: Ie9ecda7434028e396392f3ac905ae80ae6ad6376
Signed-off-by: Prakasha Nayak <pnayak@codeaurora.org>
2019-09-17 16:19:27 -07:00
Depeng Shao
99709eacd2 msm: camera: isp: Reset rdi only context flag
Reset rdi only context flag during releasing device,
otherwise it will affect non-rdi context at next time.

CRs-Fixed: 2519406
Change-Id: I904f0cae664a7530b2b85342c9a6daba579cbccc
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-09-04 13:54:50 -07:00
Venkat Chinta
19d814458b msm: camera: isp: Send notification to userspace
ISP driver must notify the userspace when any hardware error occurs
so that the userspace knows when to use the register dump.

CRs-Fixed: 2513939
Change-Id: I0d9ba9a22c6f2494ba3cc837513b8989c6cc1119
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-09-03 13:48:30 -07:00
Karthik Anantha Ram
72eeacf17a msm: camera: common: Change log type to WARN
When a request setting could not be applied by any device
on the link, it does not indicate a fatal error. It only
leads to a frame drop. Changing the apply failure logs to
warn as opposed to error.

CRs-Fixed: 2514752
Change-Id: Idbca2dbb06b0bbb4c380264cf31b665188306396
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-09-03 13:47:12 -07:00
Depeng Shao
598dfb05af msm: camera: isp: Correct the active req cnt assignment order
We need to reset the active req cnt before assigning
new value. Also move the log behind the active req cnt
assignment.

CRs-Fixed: 2517421
Change-Id: I38f418f79f5f1adcb8b29bc870f904cd1f925bfc
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-08-29 11:17:32 +08:00
Depeng Shao
95460b8f2e msm: camera: isp: Fix RDI only early PCR issue
RDI only context also need to get req from
wait_req_list afte received RUP event in early
PCR case.

CRs-Fixed: 2511798
Change-Id: If2e8da36cf83dee1c348dd0d6c6ea916061a376e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-08-27 14:46:30 -07:00
Karthik Anantha Ram
03e52e70d6 msm: camera: isp: Dump previous acq ctx info on acq failure
In case acquire hw fails, dump the previously acquired
streams to infer the reason for the failure.

CRs-Fixed: 2512474
Change-Id: I3ee2b85e0843ab4a605625950dc60366c0b50713
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-23 12:50:39 -07:00
Pavan Kumar Chilamkurthi
6bf14f8fd4 msm: camera: isp: Look at next request for BUF_DONE event
If the resource for which BUF_DONE event has come is already
signalled in the oldest request, this BUF_DONE could be for
the next request in the list. This can happen if the IRQ
handling for BUF_DONE is delayed and by the time it is handled
if the resources for the next request are already signalled
along with other pending resources for the oldest request,
we might handle resources which corresponds to next request
first. If we do not look into next request and thus if we
ignore these BUF_DONEs, we will never be done with the next
request.

Change-Id: I1b20aff0a68172bc8794d2c37f088ba2539d173d
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:58 -07:00
Venkat Chinta
e8ceba2d02 msm: camera: isp: Send shutter notification
Shutter notification must be sent when moving request
to free list if it was not sent out earlier due to
missed EPOCH IRQ or delayed EPOCH IRQ handling.

Change-Id: I9b3b039827bea24814fbea34e61abfc938f6bf2d
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:06 -07:00
Mukund Madhusudan Atre
827791eafa msm: camera: Add support for reg dump to command buffers
Certain register values are required by user space during flush
to apply settings accordingly. Also, support for dumping registers
at the time of error is needed for debugging. Add support for
dumping register values in a range of offsets to given cmd buffer.

Change-Id: I5912118809f7a7dd701a555639d1057ffe665ce1
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-08 20:18:36 -07:00
Vishalsingh Hajeri
b2bd543adf msm: camera: isp: Dump page fault info for pending request
If bubble report is set from usersapce we move the active
request back to pending request list while handling error.
We need to iterate through pending request list as well
when dumping page fault info for erroneous request.

Change-Id: I2458313affbae6cb161f077eef7bdd0263c43ae2
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-08 15:37:57 -07:00
Venkat Chinta
a6efb05c3f msm: camera: isp: Move req out of pending list before start
This change moves init request out of pending list before
starting hardware. Currently if we receive the first SOF and
RUP IRQs before start_dev routine has completed, we miss
pushing out the init request to free list on the first RUP as
wait list will be empty.

Change-Id: Icd53e0ebe0d12e264172058d836e6ccfcb7df0c2
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-06 12:22:04 -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
40047f58df msm: camera: core : Validate the dev name during the node ioctl handler
Validate the context device name with node name. If device name is
not matching return the error.

Change-Id: I8dee4e6f64e17b0d1e486077a2c8b0df562a702e
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2019-07-09 10:33:30 -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