Commit Graph

826 Commits

Author SHA1 Message Date
Camera Software Integration
698123ee2c Merge "msm: camera: isp: Add uapi for IFE/SFE HW blocks" into camera-kernel.lnx.4.0 2020-09-03 15:05:09 -07:00
zhuo
334028442c msm: camera: memmgr: fix lack of condition lead to memory leak
When multi map fails, the first mapping does not unmap
due to lack of condition.

CRs-Fixed: 2768768
Change-Id: Ib61ce8f5a73e5c27b1b19bbd23d6649c62feb0da
Signed-off-by: zhuo <zhuo@codeaurora.org>
2020-09-03 16:01:24 +08:00
Karthik Anantha Ram
c14978cb20 msm: camera: icp: Increase request queue depth and frame cmd bitmap
Increase the queue depth to support EIS3 use-cases.

CRs-Fixed: 2768737
Change-Id: I02ef9da1a0d37208d2b3fd27092e9e03d38e4346
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-09-02 18:17:51 -07:00
Karthik Anantha Ram
f1e30d210a msm: camera: isp: Add go_cmd after rup_cmd for offline use-cases
Add go_cmd after rup_cmd in cdm packet so that bus_rd is triggered
after rup has been configured for IFE.

CRs-Fixed: 2767783
Change-Id: I8978d582825bc0e4edc9f26a1d3f8f988bc11b81
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-09-01 17:38:26 -07:00
Jigarkumar Zala
5bd4d81525 msm: camera: csiphy: Remove config counter
Currently config counter is being maintained at improper places
as it is increment at configuration parser and decrease at release
dev IOCTL. There are usecase where configuration can come multiple
times without release dev IOCTL being called, in this case config
counter will be out of sync with operation. Also, config counter
is not being use anywhere in any decision making. This change removes
config counter attributes to reduce the future maintenance and better
code readabiltiy. Also, acquire count is correct check to make decision
whether all device are release or not and with that reason update
correct check in release dev IOCTL.

CRs-Fixed: 2759031
Change-Id: Id0f36bc661ef1ae8070cc8d4fc148409c13e30bc
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-09-01 17:15:20 -07:00
Camera Software Integration
2712471048 Merge "msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0" into camera-kernel.lnx.4.0 2020-09-01 14:35:40 -07:00
Karthik Anantha Ram
f44caab866 msm: camera: isp: Add uapi for IFE/SFE HW blocks
Add support for IFE/SFE UAPI changes in ISP driver for
Waipio SoC.

CRs-Fixed: 2733230
Change-Id: I5320d2cf02afe1a2d203da65604c83d7b38cad38
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-09-01 12:51:22 -07:00
Tejas Prajapati
1406c9f45b msm: camera: ife: dump bandwidth and clock for cpas and ife
At the time of overflow dump bandwidth and axi clock
information from cpas along with the ife clock and csid clock.
In RDI only use case add a check for rdi_irq_status
mask; if it is not present skip checking which port has
resulted in overflow.

CRs-Fixed: 2764286
Change-Id: I8080d140c34f2ab64f7e56b080a0dab57488336e
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-09-01 12:56:21 +05:30
Camera Software Integration
3f1cf31dee Merge "msm: camera: common: Fix enable/disable for dsp clock source" into camera-kernel.lnx.4.0 2020-08-31 13:23:31 -07:00
Camera Software Integration
8fb208f634 Merge "msm: camera: ife: Always send stop immediately when stopping hw" into camera-kernel.lnx.4.0 2020-08-31 13:23:16 -07:00
Camera Software Integration
39cf709931 Merge "msm: camera: csiphy: Add logic to program userspace settle count" into camera-kernel.lnx.4.0 2020-08-31 13:23:04 -07:00
Camera Software Integration
263c743a1a Merge "msm: camera: sensor: Correct delete request logic" into camera-kernel.lnx.4.0 2020-08-31 13:22:42 -07:00
Camera Software Integration
64d45ce53f Merge "msm: camera: ife: Configure epoch to exactly half of the frame" into camera-kernel.lnx.4.0 2020-08-31 13:22:35 -07:00
Camera Software Integration
5d4311899a Merge "msm: camera: sensor: Correct the datatype for request id" into camera-kernel.lnx.4.0 2020-08-31 13:22:21 -07:00
Camera Software Integration
e92da9e9d2 Merge "msm: camera: smmu: Fixes label_is_string warning in camera dtsi files" into camera-kernel.lnx.4.0 2020-08-31 13:22:02 -07:00
Trishansh Bhardwaj
7aa0932eeb msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
msm: camera: ope: Fix OPE hang dump
msm: camera: cdm: Add a check for fifo list in cdm workqueue
msm: camera: ope: Add a check to validate dmi cmd address
msm: camera: ope: Add check for number of stripe
msm: camera: tfe: Support tfe pdaf port
msm: camera: ope: Handle reset IRQ delay
msm: camera: ope: enable pp modules hw status dump
msm: camera: ope: Fix OPE clock issue
msm: camera: ope: Add LDAR dump support
msm: camera: ope: Add context state check in process cmd
msm: camera: ope: Change parameters to find time difference
msm: camera: ope: Add debug fs for dumping frame setting logs
msm: camera: ope: Add debugfs support to dump ope hang dump
msm: camera: tfe: Handle unsupported outport format
msm: camera: ope: add page fault handlers in ope driver
msm: camera: ope: Reduce OPE BUS memory
msm: camera: ope: Change turbo clock limit.

CRs-Fixed: 2729996
Change-Id: I683ed07082b455599f89dbc18f353b6a1e48b129
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-08-30 14:22:47 +05:30
Camera Software Integration
992378c626 Merge "msm: camera: reqmgr: Workqueue congestion handling" into camera-kernel.lnx.4.0 2020-08-28 13:08:39 -07:00
Camera Software Integration
682befb851 Merge "msm: camera: utils: Route camera logs to ftrace" into camera-kernel.lnx.4.0 2020-08-28 13:08:32 -07:00
Camera Software Integration
a2c86345c2 Merge "msm: camera: cpas: Add qosgen shaping config" into camera-kernel.lnx.4.0 2020-08-28 13:08:20 -07:00
Camera Software Integration
3af2f6333f Merge "msm: camera: common: Enable dlkm for holi" into camera-kernel.lnx.4.0 2020-08-28 13:07:38 -07:00
Camera Software Integration
640f077f09 Merge "msm: camera: csiphy: Update secure PHY HW version checks" into camera-kernel.lnx.4.0 2020-08-28 13:07:27 -07:00
Camera Software Integration
e475f14229 Merge "msm: camera: memmgr: reduce mutex lock duration" into camera-kernel.lnx.4.0 2020-08-28 13:07:20 -07:00
Camera Software Integration
8379b95000 Merge "msm: camera: icp: Teach A5 to power resume/collapse via its hw_ops" into camera-kernel.lnx.4.0 2020-08-28 13:07:13 -07:00
Camera Software Integration
6c0556bd8a Merge "msm: camera: smmu: Remove extra shared mem map" into camera-kernel.lnx.4.0 2020-08-28 13:06:59 -07:00
Jigarkumar Zala
3d671618a4 msm: camera: sensor: Correct the datatype for request id
Request id is having uint64 type from request manager, but sensor
driver is handling it with int64. This may cause the out of bound
access while accessing the data. This change corrects the data
type to handle data correctly.

CRs-Fixed: 2759031
Change-Id: I607ea3c123a7b050403e18f7f1bac2a23e1e585f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-08-28 12:05:29 -07:00
Mukund Madhusudan Atre
4f8f47ab0f msm: camera: common: Fix enable/disable for dsp clock source
Currently, if dsp clock source is not found in device tree, still
we are trying to enable/disable clock source. Check for availability
of that optional clock before toggling it.

CRs-Fixed: 2762106
Change-Id: I2a4467f5383343bdf1e6607712270f574c76e51e
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-08-27 18:14:39 -07:00
Jigarkumar Zala
11a5797354 msm: camera: sensor: Correct delete request logic
Currently per frame array is not getting filled up with NOP packet
settings and as a part of that delete request is picking up wrong
request to get delete. This change fill the request id to the
correct per frame array index for NOP and Update packet.

CRs-Fixed: 2759031
Change-Id: I5ff96851adccc81a8a527d2a5f5b3f8763ebd80f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-08-27 17:58:17 -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
Anand Ravi
e45fa615bf msm: camera: smmu: Fixes label_is_string warning in camera dtsi files
Property 'label' is a reserved property of type string. At present,
device trees use the property as list of strings.

Rename the property to 'cam-smmu-label' to resolve conflict.

CRs-Fixed: 2729703
Change-Id: I8bfb3af4daeaad4cc9dfc633a0256186ba1416c9
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2020-08-27 09:30:29 -07:00
Jigarkumar Zala
55a25c185b msm: camera: csiphy: Add logic to program userspace settle count
Currently settle count is programmed from hardware register data value
metioned in bring up sequence. It is more reliable and suitable to
program the value coming from userspace as that value is more accurate
with respect to sensor specific datarate. This change add logic to
accomplish that operation.

CRs-Fixed: 2759031
Change-Id: I87215b206632d15e2d51d6383345d2ffa16b6b9f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-08-27 09:13:06 -07:00
Shravya Samala
762751a88c msm: camera: ife: Configure epoch to exactly half of the frame
Some customers have sensor mode with more blanking width.
Due to this, time is not sufficient for applying
setting thus resulted in frame drops.
To avoid this situation, epoch is calculated on complete
frame and configured at half the frame.

CRs-Fixed: 2757095
Change-Id: I92927c23762f717d6ddca67a7e641422e8fb6d8f
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-08-26 23:17:51 -07:00
Fernando Pacheco
ecd191e638 msm: camera: icp: Teach A5 to power resume/collapse via its hw_ops
The LX7 processor will require a new mechanism to resume/collapse.
Make the current mechanism transparent to the ICP HW manager in
preparation for the new proc. By going through the hw_ops we let
the device interface decide which mechanism to use.

CRs-Fixed: 2722486
Change-Id: I719314b3f505270a33892cb247082e43dad2e92d
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-08-26 16:50:43 -07:00
Camera Software Integration
8fe045c35a Merge "msm: camera: cpas: Add more debug information in cpas dump" into camera-kernel.lnx.4.0 2020-08-26 13:48:14 -07:00
Depeng Shao
3de038d4a6 msm: camera: reqmgr: Workqueue congestion handling
When workqueue is congested, CRM may apply same
request to device which will trigger recovery
due to apply fails. This change prevent CRM
triggering recovery if the current idx is same
with last applied idx.

CRs-Fixed: 2761601
Change-Id: I6ccf44f050a18e8a2a35916f61513ad852e7bdee
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-08-26 23:07:26 +08:00
Pavan Kumar Chilamkurthi
86c892ec3a msm: camera: cpas: Add qosgen shaping config
Add qosgen shaping configuration setup. These parameters
will be tuned for every chipset along with other QoS
settings.

CRs-Fixed: 2755917
Change-Id: Ia75e7afc9148ebe94c7cf184de1158b91bee7028
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-08-26 01:39:15 -07:00
Pavan Kumar Chilamkurthi
ca73e251f0 msm: camera: utils: Route camera logs to ftrace
Add debugfs setting to route camera logs : ERR,
WARN, INFO, DBG to ftrace.
Add CAM_TRACE macro for adding any new traces in drivers.

Usage:
CAM_TRACE : By default printed in ftrace
CAM_ERR, CAM_WARN, CAM_INFO, CAM_DBG : enable using
debugfs debug_type = 1 or 2
For CAM_DBG : In addition to above enable debug_mdl with
required mask.

adb shell "echo <value> > /sys/module/camera/parameters/debug_type"
All CAM_xx (except CAM_TRACE) logs are routed as below :
0 (default) - only logcat
1 - only ftrace
2 - both logcat and ftrace.

CRs-Fixed: 2762931
Change-Id: I5254a7fef346c7ba21a3ea1eed21e5353f42fd03
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-08-26 01:36:30 -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
ac6f96999d Merge "msm: camera: cpas: Update QoS settings for custom usecase" into camera-kernel.lnx.4.0 2020-08-25 16:43:23 -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
Haritha Chintalapati
28c2e8b5ef Merge "msm: camera: common: Define debugflag to allocate usecase info" into camera-kernel.lnx.4.0 2020-08-25 16:42:58 -07:00
Pavan Kumar Chilamkurthi
f4ec43b748 msm: camera: cpas: Add more debug information in cpas dump
Enhance cpas state dump to get more information about
bandwidth and clock status. This additional state dump
can be enabled using debugfs.

adb shell "echo 1 > /sys/kernel/debug/camera_cpas/full_state_dump"

Traverse through all bw tree nodes and print info in each node.
Print current clk frequencies of all clocks that cpas enables.
Read rpmh bcm status registers to understand mmnoc clk freq.
Add cpas monitor to save important info whenever clients
notify with an event. This monitor info is printed in cpas
state dump.

CRs-Fixed: 2754299
Change-Id: Ib9007091f7e34127f1ca92498e2537b2a06887cb
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-08-25 02:29:26 -07:00
Camera Software Integration
bf8c7d2856 Merge "msm: camera: sensor: Add logic to call the res_mgr api if needed" into camera-kernel.lnx.4.0 2020-08-24 12:46:10 -07:00
Camera Software Integration
858f2b2249 Merge "msm: camera: isp: Fix boot ts when custom is enabled" into camera-kernel.lnx.4.0 2020-08-24 12:46:01 -07:00
Trishansh Bhardwaj
3bcfbc3de7 msm: camera: common: Enable dlkm for holi
Compile camera as dynamic loadable kernel module for holi.

CRs-Fixed: 2761499
Change-Id: Id7a4578bfc91ff5036c10aa8c59c07e358683795
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-08-24 23:42:08 +05:30
Shravan Nevatia
64cd69547a msm: camera: csiphy: Update secure PHY HW version checks
Add HW version checks for CSIPHY 1.2.3/1.2.4 in the
secure CP register bitmask logic.

CRs-Fixed: 2761303
Change-Id: Ib831b71115f46839e691f58ab3128529efb2270c
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-08-24 17:12:45 +05:30
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
642825a2eb Merge "msm: camera: isp: Fix frame header alignment issue" into camera-kernel.lnx.4.0 2020-08-21 14:07:09 -07:00
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
Camera Software Integration
80e8ff8cff Merge "msm: camera: tfe: Adds support PHY3 input source" into camera-kernel.lnx.4.0 2020-08-20 15:03:31 -07:00
Camera Software Integration
8ff7db91ee Merge "msm: camera: csiphy: Protect phy lanes for holi target" into camera-kernel.lnx.4.0 2020-08-20 15:03:20 -07:00