Commit Graph

2085 Commits

Author SHA1 Message Date
Jigar Agrawal
890c319fc8 msm: camera: common: Fix kernel code and add checks
Fix Kernel code and add security checks to avoid
possible out of bound array access variables.

CRs-fixed: 3038735
Change-Id: Idaf0889026dbf138d0cb94a0f88e5b6941ff21e2
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-14 11:11:42 -07:00
Camera Software Integration
21d78e35c1 Merge "msm: camera: common: Add wrapper for presil locking" into camera-kernel.lnx.5.0 2021-10-12 19:30:53 -07:00
Camera Software Integration
79879d890a Merge "msm: camera: common: fix map check failure for presil buffer send" into camera-kernel.lnx.5.0 2021-10-12 19:30:44 -07:00
Haritha Chintalapati
8451fc8e8c Merge "msm: camera: cdm: Fix cdm driver for bufffer excursion" into camera-kernel.lnx.5.0 2021-10-11 21:10:23 -07:00
Haritha Chintalapati
cc34998f9a Merge "msm: camera: isp: Handle RUP for enabled CSID CAMIF IRQs" into camera-kernel.lnx.5.0 2021-10-11 21:10:13 -07:00
Haritha Chintalapati
0af295b8f6 Merge "msm: camera: reqmgr: Fix the crm driver" into camera-kernel.lnx.5.0 2021-10-11 21:10:03 -07:00
Haritha Chintalapati
ace7a6a26e Merge "msm: camera: isp: Fix BW voting corruption in top layer" into camera-kernel.lnx.5.0 2021-10-11 21:09:52 -07:00
Suraj Dongre
1d86110d7b msm: camera: common: Add wrapper for presil locking
Presil IRQ handling requires running in a workqueue, with
wait for acknowledgement in io operations. This busy wait
should be done while holding a mutex lock as opposed to
spinlock in usual irq context. Add wrapper to switch from
spinlock to mutex for presil mode in irq controller and
cdm. Add the hw lock wrapper in hw interface header.

CRs-Fixed: 2932495
Change-Id: I7600eb1e6ae8746a39e76f6cb3a2652b255f2ddd
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-10-11 10:34:34 -07:00
Savita Patted
c38139d8da Merge "msm: camera: cpas: Add support for Diwali Camera" into camera-kernel.lnx.5.0 2021-10-08 17:20:40 -07:00
Savita Patted
3c4809d109 Merge "msm: camera: req_mgr: Rearrange state change sequence" into camera-kernel.lnx.5.0 2021-10-08 17:20:07 -07:00
Mukund Madhusudan Atre
5c479c94dd msm: camera: isp: Fix BW voting corruption in top layer
Currently, the structure used to aggregate incoming votes
from ife hw manager is declared as static. This is an issue
in case of multi-context camera. Add the aggregated incoming
vote entry in VFE/SFE top so that it is accessed per HW core only.

CRs-Fixed: 3008062
Change-Id: Ib174925cba3aeb86b8704fc68d6f444f476f01e6
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-10-07 09:38:11 -07:00
Gaurav Jindal
931927867f msm: camera: isp: Handle RUP for enabled CSID CAMIF IRQs
CAMIF interrupts in CSID are enabled based on use case requirements.
In additionto this, inside hw manager propagation to isp context is
again dependent on the same checks. Since the enabling is based
on use-case, the checks in the handler functions are redundant.
With upgrades in hardware, the checks are increasing while handling
in hw manager.
This commit removes the checks in handler function in hw manager.

CRs-Fixed: 3052221
Change-Id: I44f59b782dba0f7e7eb20c2ace56f3094527932b
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-10-07 14:33:55 +05:30
Jigar Agrawal
41d8370e72 msm: camera: reqmgr: Fix the crm driver
Add a check in the request manager code
to prevent the possible out of bound
array access.

CRs-Fixed: 3051099
Change-Id: I4b4ec5778d83aa8993225cae0cd599a02f526082
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-06 21:57:30 -07:00
Camera Software Integration
e15c969d3b Merge "msm: camera: uapi: Add new event causes" into camera-kernel.lnx.5.0 2021-10-06 17:45:45 -07:00
Camera Software Integration
af97f4555c Merge "msm: camera: isp: Add header file VFE and CSID for Diwali" into camera-kernel.lnx.5.0 2021-10-06 17:45:17 -07:00
Camera Software Integration
fc8becbc86 Merge "msm: camera: reqmgr: Only do self correction after initial sync" into camera-kernel.lnx.5.0 2021-10-06 17:42:05 -07:00
Camera Software Integration
515058f728 Merge "msm: camera: icp: add mechanism to send/receive buffer for presil" into camera-kernel.lnx.5.0 2021-10-06 17:41:27 -07:00
Camera Software Integration
be297775bc Merge "msm: camera: csiphy: Extend CSIPHY hw block support" into camera-kernel.lnx.5.0 2021-10-06 17:41:14 -07:00
Camera Software Integration
f37941cead Merge "msm: camera: isp: shdr enable pdaf occur overflow" into camera-kernel.lnx.5.0 2021-10-06 17:41:00 -07:00
Camera Software Integration
cec3be6ab1 Merge "msm: camera: common: Add presil compilation and probe support" into camera-kernel.lnx.5.0 2021-10-06 17:40:50 -07:00
Camera Software Integration
1f9de29a6d Merge "msm: camera: cci: Increase HW block support for CCI" into camera-kernel.lnx.5.0 2021-10-06 17:40:35 -07:00
Camera Software Integration
ce1580456e Merge "msm: camera: isp: Update last applied MUP for scratch" into camera-kernel.lnx.5.0 2021-10-06 17:40:24 -07:00
Camera Software Integration
7506e430e7 Merge "msm: camera: isp: Add bw info dump on clk/bw update error" into camera-kernel.lnx.5.0 2021-10-06 17:36:40 -07:00
Camera Software Integration
ee8903886b Merge "msm: camera: cdm: Correct the CDM iommu handle" into camera-kernel.lnx.5.0 2021-10-06 17:36:07 -07:00
Jigar Agrawal
6c91eb5bf0 msm: camera: cdm: Fix cdm driver for bufffer excursion
Update the cdm submit bl function to use allocated
genirq memory for genirq command instead of appending
the command to the last BL entry to prevent possibly
using the memory not mapped. Also, add some more logs
to make the debugging easier.

CRs-fixed: 3029732
Change-Id: I2fc679bef4c0f72031798a03b26f840b6b4ef746
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-06 12:27:35 -07:00
Suraj Dongre
0fe49d5aa7 msm: camera: common: fix map check failure for presil buffer send
Add correct way to check if buffer can be sent to hw in below cases.
1. buffer handle mapped twice, resulting into two entries in buf_q.
   One entry without smmu mapping and one with smmu mapping.
   fixed by checking if another entry with smmu map exists for i_no.
2. blob cmd buffer, packet buffer are shared only between umd and kmd.
   send_buffer_to_presil expected to be called and return success.

CRs-Fixed: 2932495
Change-Id: I2dd884b7dd16c5c45d3dfc25380d039b92199319
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
2021-10-06 11:49:41 -07:00
Ayush Kumar
da55dd5e51 msm: camera: cpas: Add support for Diwali Camera
Diwali has different version of CPAS version which
requires camnoc interface changes and CPAS version
change. This change adds the same.

CRs-Fixed: 3043114
Change-Id: I698b251c43d34225053ab3a0e9c581201d6be638
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-10-05 23:34:39 +05:30
Camera Software Integration
40300a2a04 Merge "msm: camera: csiphy: Update AFE settings for cphy sensors" into camera-kernel.lnx.5.0 2021-10-04 17:32:58 -07:00
Camera Software Integration
4c38664b95 Merge "msm: camera: isp: Reduce traffic for shutter notification" into camera-kernel.lnx.5.0 2021-10-04 17:32:47 -07:00
sokchetra eung
56e4765c6a msm: camera: uapi: Add new event causes
Add new sync event causes for ICP, ISP, JPEG.
Add new ICP V4L2 error events.

CRs-Fixed: 3035452
Change-Id: Ie3a12281e7e6eeadc8361ba050ff51bdf80c4e65
Signed-off-by: sokchetra eung <eung@codeaurora.org>
2021-10-04 10:25:36 -07:00
Mukund Madhusudan Atre
2f9b9f590b msm: camera: isp: Add bw info dump on clk/bw update error
Add blob info dump on finish clock/bw update error to provide
insight into what userspace has sent in packet. Also, print the
history of bw votes to check values coming from HW manager.

CRs-Fixed: 3039737
Change-Id: Ifc4df6bb7d4a3cf03715300e9edd1d3987df4a4c
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-10-04 10:24:21 -07:00
Jigarkumar Zala
33cf758851 msm: camera: req_mgr: Rearrange state change sequence
Component bind is responsible for platform bus. QUP i2c bus slaves
can come at probe anytime. This operation is corrupting the slave
list for CRM. This change makes sure that CRM is available after
subdev list is initiate first and then only allows the subdev to be
add in the list.

CRs-Fixed: 3034933
Change-Id: Ia08702a8b38f2f2f590021b997c729131e919d2d
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-03 22:26:05 -07:00
Ayush Kumar
31d8b11c65 msm: camera: isp: Add header file VFE and CSID for Diwali
This commit adds VFE/CSID header file changes for titan
version 570 hardware.

CRs-Fixed: 3043114
Change-Id: Ibddb9b69a17d6a7bed8b8ea802a3fce0199966e9
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-10-03 21:19:11 -07:00
Camera Software Integration
13d3e00200 Merge "msm: camera: reqmgr: Handle fatal error notification" into camera-kernel.lnx.5.0 2021-10-01 19:50:18 -07:00
Camera Software Integration
81e99709c3 Merge "msm: camera: isp: Add support of PDAF parsed outport" into camera-kernel.lnx.5.0 2021-10-01 19:50:07 -07:00
Jigarkumar Zala
1c29fe16b5 msm: camera: csiphy: Extend CSIPHY hw block support
Increase CSIPHY hw block support 8 for v780 and future
platforms.

CRs-Fixed: 3042539
Change-Id: Ib8c3c2bdde583ff5dc5ddb0a7b818dc8723b270f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-01 14:34:03 -07:00
Camera Software Integration
87d033316b Merge "msm: camera: isp: Don't clear lists when disabling all events" into camera-kernel.lnx.5.0 2021-09-30 17:54:16 -07:00
Camera Software Integration
ad1e732da4 Merge "msm: camera: jpeg: Ensure in/out map entries are within allowed range" into camera-kernel.lnx.5.0 2021-09-30 17:54:02 -07:00
Camera Software Integration
9cbace3d87 Merge "msm: camera: isp: Correct the wrong res id" into camera-kernel.lnx.5.0 2021-09-30 17:53:36 -07:00
Jigar Agrawal
4c0e3a89ac msm: camera: csiphy: Update AFE settings for cphy sensors
Update 4Gsps data specific AFE tuning paramenters for CPHY
sensors. Also remove the CPHY specific only common parameter
from common configuration.

CRs-Fixed: 3042875
Change-Id: Icf8c0d49fdbb7da247dadb5c95cff6c984ce6850
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-30 14:29:02 -07:00
Jigarkumar Zala
1d400147b7 msm: camera: cci: Increase HW block support for CCI
Increase hw block support for CCI to 3 for v780 and
onwards.

CRs-Fixed: 3042539
Change-Id: I4a6b594a22373047e243bfefa22d304eab969e71
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-09-30 12:39:02 -07:00
Pranav Sanwal
0ddfe2d482 msm: camera: isp: Reduce traffic for shutter notification
To reduce traffic for shutter notification, sof and boot
sof timestamps are sent in a unified v4l2 event.
Thereby, reducing the event notification traffic by 50%.

CRs-Fixed: 3040374
Change-Id: Ib4580e0a4df7c3d1cb892fdf3254272d3134d4cb
Signed-off-by: Pranav Sanwal <psanwal@codeaurora.org>
2021-09-30 18:05:29 +05:30
chengxue
10b575f21e msm: camera: isp: shdr enable pdaf occur overflow
If we config stream in order like IMAGE/IMAGE_SHORT/
PDAF, while PDAF stream reserve, it will override
sfe_inline_shdr flag to false on csid_hw, and we
can not configure the master/slave register correctly,
so we move the common sfe_inline_shdr flag to path cfg.

CRs-Fixed: 3047943
Change-Id: Ie4a863e9aa24a142c5c4b3c90553e4a2bd92d7f3
Signed-off-by: chengxue <chengxue@codeaurora.org>
2021-09-30 10:49:17 +08:00
Camera Software Integration
a6d54a3219 Merge "msm: camera: req_mgr: Allow request cancellation if not applied to IFE" into camera-kernel.lnx.5.0 2021-09-29 15:57:59 -07:00
Camera Software Integration
cc960c0388 Merge "msm: camera: smmu: Unmap secure buffers in secure camera use case" into camera-kernel.lnx.5.0 2021-09-29 15:57:48 -07:00
Camera Software Integration
ae8ace5996 Merge "msm: camera: isp: Increase max dependents of IRQ controller" into camera-kernel.lnx.5.0 2021-09-29 15:57:38 -07:00
Jigar Agrawal
42d92dea61 msm: camera: cdm: Correct the CDM iommu handle
Correct the CDM iommu handler by changing the
false pid and mid values written in the cdm
header file. Also, adding a support to read the
pid and mid from the dtsi file, since there is
already support for the PID values available in the
dtsi.

CRs-fixed: 2982542
Change-Id: I319a32fdcba44a6a96b79e4e67b0a2cc0e01bc4c
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-29 12:55:45 -07:00
Karthik Anantha Ram
54f158a4fe msm: camera: isp: Update last applied MUP for scratch
In case of sHDR dynamic switch, for a frame on which we are
configuring scratch buffer, use MUP from the last applied
valid request as opposed to global reference of MUP held
by the CSID driver. The global reference could have been
updated by a future request, it would be incorrect to use
that when that request has not even been applied.

CRs-Fixed: 3038703
Change-Id: I9369dba80fa258925ab4ae573b33931352318334
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-09-28 20:21:04 -07:00
Depeng Shao
83001935a7 msm: camera: reqmgr: Only do self correction after initial sync
Only do self correction after initial sync.

CRs-Fixed: 3047181
Change-Id: I29d5a633984322d2383d48ba0956fc4e2e57f87f
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-29 10:36:00 +08:00
Camera Software Integration
02f11b69c4 Merge "msm: camera: common: Update bytes written variable" into camera-kernel.lnx.5.0 2021-09-28 16:43:55 -07:00