Commit Graph

235 Commits

Author SHA1 Message Date
Karthik Anantha Ram
17ea11cdec msm: camera: reqmgr: Add provision to obtain exposure time
Currently CRM watchdog timer expiry is fixed at 1 second.
This will not hold good if the sensor exposure time is increased
beyond 1 second. In such situations obtain the time from userspace,
and modify the CRM watchdog timer accordingly.

CRs-Fixed: 2530691
Change-Id: I6251bcb2b915a9e317caffd350220e249214c8b2
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-11-05 13:16:54 -08:00
Mangalaram ARCHANA
e2085ffb7f msm: camera: cpas: Fix TCSR Register programming
Fix TCSR Register programming to enable SAT.

CRs-Fixed: 2553475
Change-Id: Iaeae7cd06dcbccaa8bf1f98657efff734d048b9f
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
2019-11-05 13:15:00 -08:00
Karthik Jayakumar
b46dcb39c4 msm: camera: cci: Fix cam_cci_get_subdev for conditional compilation
Fixes cci_get_subdev to return NULL or computed value depending on
camera driver configuration.

CRs-Fixed: 2554484
Change-Id: I79933ddf28e2c0d23739308b57b5b40d3b56d78e
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-05 12:18:13 -08:00
Karthik Jayakumar
c1054611fd msm: camera: utils: Remove deprecated clk_set_flag functions
Removed unused functions that called clk_set_flag, which has been
deprecated in linux kernel 5.x.

CRs-Fixed: 2554484
Change-Id: I0062383b0b059e6b359229f4b33470713289abb4
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-05 12:09:24 -08:00
Jigarkumar Zala
335b376e21 msm: camera: csiphy: Update DPHY combo mode sequence
DPHY combo mode bring up sequence is missing with some
important register settings. Correct and update required
register setting to bringup DPHY combo mode.

CRs-Fixed: 2545921
Change-Id: I1dfb71f1775aa6d6b1173a7de7f14ce74eac08e1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-11-01 16:22:07 -07:00
Jigarkumar Zala
93a5aef818 msm: camera: csiphy: Correct Dphy mission mode sequence
DPHY mission mode sequence is not full functional for
mission mode. Correct and add mandate register settings
for the bringup of DPHY mission mode.

CRs-Fixed: 2545921
Change-Id: Ia1bbf496c5aa993cf0e404c81f7b69b7b889c6f1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-11-01 16:20:15 -07:00
Karthik Jayakumar
15feb22bdd msm: camera: core: Fix extraneous variable declaration
Remove an extra variable declaration within a for loop.

CRs-Fixed: 2554484
Change-Id: I89885eeb8f89893ad7054d54a694a040e4c0bfbb
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-01 14:59:59 -07:00
Karthik Jayakumar
8d6ec3bf3c msm: camera: uapi: Add camera subfolder
Added a camera subfolder for the UAPI headers to be located in.
This prevents the camera UAPI headers from overwriting upstream kernel
headers.

CRs-Fixed: 2554484
Change-Id: Ie1edbfe585bbd428a6e5d1a40b438d22bd7c06c0
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-01 14:03:03 -07:00
Karthik Jayakumar
632c43cf64 msm: camera: icp: Remove qcom soc dependency
Remove soc_info from icp driver as it was unused.

CRs-Fixed: 2557184
Change-Id: I7b85768502f825753ea4b9650b5c3f9df67643fb
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-10-31 14:53:45 -07:00
Karthik Jayakumar
2a7ffe9697 msm: camera: sync: Dump fence info in case of fence exhaust
Add error message in case of fence exhaust.
Add support to dump fence table in case of fence exhaust.

CRs-Fixed: 2556458
Change-Id: I9910a04c69b54fe99541524b6581fa9994fd523f
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-10-31 14:19:17 -07:00
Pavan Kumar Chilamkurthi
a293b9bfe6 msm: camera: icp: Use CAM_PERF for clock, bw related logs
Use CAM_PERF logging group while printing logs related
to clock, bandwidth updates.

CRs-Fixed: 2523062
Change-Id: Icaa912ae308c307d55e318c0861850093d0ee456
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-10-31 13:35:48 -07:00
Trishansh Bhardwaj
bef4415dc8 msm: camera: common: va_end should follow va_start
Each  invocation  of  va_start() must be matched by a corresponding
invocation of va_end() in the same function.

CRs-Fixed: 2549155
Change-Id: I6a3214ce863c4af0425d061184cfa44682f89545
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-31 01:29:19 -07:00
Trishansh Bhardwaj
30b9eed071 msm: camera: common: Fix integer overflow in shift
Various drivers are using right shift  by 32 to check if dma address is
32 bit addressable. This will result in shift count overflow in 32 bit
arch.

CRs-Fixed: 2543730
Change-Id: I57e30bc9c0a8179c8d74f3bd3b6567bdfff60741
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-31 10:45:40 +05:30
Trishansh Bhardwaj
4e9f21ee27 msm: camera: reqmgr: Remove division on uint64_t
Arm arch does not support dividing 64 bit integer, replacing it with
do_div call.

CRs-Fixed: 2543730
Change-Id: I86f8c706d20978b4c7bfd78c499dacb482c4d37a
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-30 13:42:25 -07:00
Ravikishore Pampana
d1469c8f6a msm: camera: isp: Set device enable flag after enable csid hardware
Device enable flag is getting set after configuring the CSID csi rx
and csid path configuration. If irq comes after configuring the csi rx
hardware then irq handler is not handling as it is checking the device
enable flag. So set device enable flag after enabling the hardware.

CRs-Fixed: 2541840
Change-Id: I022b6dccef4153c34bc8cf99e7a18e2978f92d3f
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2019-10-30 14:44:10 +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
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
Karthik Jayakumar
cb1341b56b msm: camera: jpeg: Add plane stride & slice height debug info
Add plane stride and slice height to debug info for verifying
JPEG buffer configuration.

CRs-Fixed: 2542420
Change-Id: I67fbb0a0da9104b4f9c412a558b62149abb8aec9
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-10-25 13:07:58 -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
Trishansh Bhardwaj
1fdbf849b9 msm: camera: ife: Add packing format support
This change adds packing format field for CSID in IFE Lite for
version 17x hardware.

CRs-Fixed: 2547147
Change-Id: Ib6b8331af6a425314a507e18486c1fffd819007a
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-23 15:47:52 -07:00
Pavan Kumar Chilamkurthi
69fc708d01 msm: camera: icp: Fix AHB, AXI voting in icp
Due to a mismatched internal structure num_paths for
AXI voting is always set to 0 for ipe, bps which is
causing not to vote any AXI bandwidth for these hws.
After all contexts associated with a device go to
inactive state, reduce the AHB vote to minimum value
to make sure previously voted high AHB vote doesn't
remain for the rest of camera session.

CRs-Fixed: 2546088
Change-Id: I7621bb85280b2541ed37a87c9e486dd6be62ea24
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-10-23 15:47:04 -07:00
Venkat Chinta
ec8b26eda2 msm: camera: ife: Remove duplicate add to port counters
This change removes duplicate add to port counters during
IFE acquire.

CRs-Fixed: 2546941
Change-Id: Ie42838a2e66200a5a52cc27600bd25e430c0e3f0
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-23 15:46:13 -07:00
Shravan Nevatia
faf5312211 msm: camera: csiphy: Update CPHY 3-phase registers for CSIPHY v1.2
Fix CSI_EXTRA_CTRL12 CPHY 3phase registers as per
the latest HPG (rev. H).

CRs-Fixed: 2542855
Change-Id: I6c2fbc66df52db71c454c86ee894c05d12e0dead
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-10-23 15:45:37 -07:00
Abhijit Trivedi
4435861788 Merge upto camera-kernel.lnx.1.0-191021 'quic/camera-kernel.lnx.1.0' into camera-kernel.lnx.4.0
* quic/camera-kernel.lnx.1.0:
  msm: camera: isp: Add log for first SOF in EPCR
  msm: camera: ife: Remove line start addition
  msm: camera: common: Fix compilation issues for 32-bit arch
  msm: camera: ife: Dump ife camnoc debug registers
  msm: camera: csiphy: Enable multi-datarate support for csiphy v1.2
  msm: camera: cpas: Fix TCSR register programming
  msm: camera: isp: Update last applied request ID
  msm: camera: ife: Deinit input mux resources
  msm: camera: reqmgr: Reset the pd tables as part of flush
  msm: camera: ife: Disable early eof strobe
  msm: camera: isp: Set error type to fatal
  msm: camera: isp: Add tasklet index to logs
  msm: camera: isp: Add log in flush
  msm: camera: reqmgr: Logs v4l2 event queue failure
  msm: camera: isp: Correct acquire dump log
  msm: camera: isp: Remove redundant use of spin lock
  msm: camera: req_mgr: Increase device handles in hdl_tbl

Change-Id: I4b60c033f81a767a61c383f2dc3ef1608005b491
Signed-off-by: Abhijit Trivedi <abhijitt@codeaurora.org>
2019-10-22 17:47:55 -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
Venkat Chinta
898869cd11 msm: camera: ife: Remove line start addition
This change removes line start addition to epoch line config.
After CSID crop is applied, the first line that CAMIF
receives is already at the required line and therefore number
of lines for epoch should just be half of the frame width.

CRs-Fixed: 2546941
Change-Id: Ib12b1fc96cedf140672af03862aaf4be65ab38d8
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-21 16:33:04 -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
Vishalsingh Hajeri
037967bc88 msm: camera: ife: Dump ife camnoc debug registers
ife camnoc debug registers need to dumped only
when bus overflow status is set.

CRs-Fixed: 2538876
Change-Id: I6f886f6e084380de62c0b4acaa48fa02fce01136
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-10-21 15:45:12 -07:00
Shravan Nevatia
3205f18e3c msm: camera: csiphy: Enable multi-datarate support for csiphy v1.2
Enable support for multiple data rates (2.5/3.5/4.5 Gsps)
for csiphy v1.2 driver.

CRs-Fixed: 2542855
Change-Id: Idbe299aca210e30d732304e77e2a8191c8809f09
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-10-21 15:44:13 -07:00
Trishansh Bhardwaj
a62a432522 msm: camera: cpas: Fix TCSR register programming
Program TCSR_CAMERA_HF_SF_ARES_GLITCH_MASK to ignore
erroneous signals.

CRs-Fixed: 2545751
Change-Id: Ie638136d364372b7a8309af1d9656a8c8b7772fc
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-21 15:41:45 -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
422de0bbf4 msm: camera: ife: Deinit input mux resources
We must deinit IFE input mux resources before the check for open
count. Without this change the last bus resource is the last to
enter this function when open count reaches zero. So input mux
resources are never deinitialized.

CRs-Fixed: 2545140
Change-Id: I355afce7d631cdb00e3f6da0ba0be40c2e2b63a2
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-17 14:52:03 -07:00
Karthik Anantha Ram
388c4f7280 msm: camera: reqmgr: Reset the pd tables as part of flush
As part of flush only the request slots were reset, we need
to reset the slots in each of the pd tables.

CRs-Fixed: 2545130
Change-Id: I34054dea2e5849739df9dd0a77d908a9af9fe3be
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-10-17 14:49:13 -07:00
Venkat Chinta
1dfd3efd17 msm: camera: ife: Disable early eof strobe
This change disables early eof strobe for version 480 hardware
due to hardware limitation.

CRs-Fixed: 2545140
Change-Id: I727ba5950911caac76cd2046e9e7c1e6d7ca6d96
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-16 14:38: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
49d6a1b3c6 msm: camera: isp: Add tasklet index to logs
This change adds tasklet index to logs which shares a one-one
mapping with ife hardware manager context ID.

CRs-Fixed: 2545140
Change-Id: I879662c9d90e98c604d20d975b4973369ac7a41e
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-16 14:37:36 -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
Trishansh Bhardwaj
3619ae634b msm: camera: reqmgr: Logs v4l2 event queue failure
Kernel uses v4l2 events to communicate with userspace.
If userspace is not dequeuing events and kernel is pushing more events
then v4l2_event_queue fails silently.
This change uses v4l2 callbacks to log v4l2_event_queue failure.

CRs-Fixed: 2541894
Change-Id: I98f8f609f615104ec6dde569bf1f39de1eb368fc
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-15 17:46:51 -07:00
Karthik Anantha Ram
af27416f68 msm: camera: isp: Correct acquire dump log
Print the split id correctly as part of the acquire
failure dump.

CRs-Fixed: 2541667
Change-Id: Ie7156e35458027e24cea1993e487bfe38fcc2324
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-10-14 17:42:14 -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
Mangalaram ARCHANA
259e6f55d0 msm: camera: req_mgr: Increase device handles in hdl_tbl
Increasing device handles to 128 in handle table.

CRs-Fixed: 2532741
Change-Id: I58278026d08865cd7935bf4f0dd04f6a594c6dbc
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
2019-10-10 13:33:58 -07:00
Abhilash Kumar
f3af79222b msm: camera: icp: Dump IOCONFIG during io config failure
This change dumps IOCONFIG command for IPE and BPS in case
of io config failure.

CRs-Fixed: 2430046
Change-Id: Iae730f46e4b3f2e327ac10587896a4e755f96a38
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
2019-10-07 14:40:14 -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
aa2e549641 msm: camera: ife: Program RDI clients in line based mode
Gralloc allocated buffers are aligned before calculating
stride, which can lead to corruption in frame based mode.
This change programs RDI clients in line based mode when
the output format is PLAIN_16 to prevent this. RDI clients
support only PLAIN128 packing format and this change also
enforces that.

CRs-Fixed: 2513939
Change-Id: Ic079e4cfd34cb4a9a0edc1152ff40565cdab2a81
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-02 13:11:02 -07:00
Shravan Nevatia
83aa86fe79 msm: camera: csiphy: Sensor: Update cphy 3-phase registers for lito
Update register settings for CPHY mode as per
the latest HPG (revision H).

CRs-Fixed: 2534885
Change-Id: I4caade811792467ef7f3eeba85c4a4f5b9050b11
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-10-02 13:09:18 -07:00
Mukund Madhusudan Atre
102db1e4e5 msm: camera: isp: Fix no reg dump when EPCR is enabled
During second init request of EPCR, number of reg dump
buffers was set to zero causing no reg dump. Add fix to
ensure value is updated to ife ctx when it is non zero.

CRs-Fixed: 2532096, 2532101
Change-Id: Ic16001314522cc5b227fc3c33d899c719fbaeacd
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-10-01 13:46:46 -07:00
Haritha Chintalapati
ac8704ffd3 Merge "msm: camera: isp: Stop HW immediately in flush" into camera-kernel.lnx.1.0 2019-10-01 13:46:38 -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