Commit Graph

2670 Commits

Author SHA1 Message Date
Anand Ravi
5b778de409 msm: camera: isp: Add lazy clear register sanitization
In some hardware, it is possible that global clear command on an
independent controller can clear relevant status bits of a dependent
controller due to the clear register being dirty. This commit
introduces lazy clear register sanitization.

In case of a dirty clear register in a dependent controller, the IRQ
controller waits till the next interrupt and checks if that clear
register is going to get updated. If not, that clear register is
sanitized (set to zero).

CRs-Fixed: 3152588
Change-Id: Ie94252fb378676481410759c8bc87088d27024dd
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2022-05-02 20:06:21 -07:00
Anand Ravi
340e043307 msm: camera: isp: Skip writes to clean IRQ clear registers
If an IRQ status register has not caused the interrupt to be triggered,
we can skip writing to the corresponding clear register as long as no
previous writes have been made to it that will cause bits of interest to
be cleared (i.e. clear register is dirty). For this, we maintain a dirty
flag for each clear register.

The dirty flag will never cause false negatives (i.e. valid writes to be
missed) since hardware cannot set any bits in the clear register to 1
and will only clear the entire register upon resetting the hardware.

CRs-Fixed: 3152588
Change-Id: I4f97bae0e3cd983ca66d5b89ffb2c16da7c25200
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2022-05-02 20:06:09 -07:00
Gaurav Jindal
96b3f625f0 msm: camera: isp: Skip notification to user space
Due to delays, frame count may not be increamented. Sending such
notifications increase the number of invalid notifications in User
space. If the frame count is same, skip sending the timestamp
to userspace. This provides more time to recover from the delays.

CRs-Fixed: 3164368
Change-Id: I09a96bbafb80233e962304d9a82fde45233a5f89
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2022-05-02 19:36:14 -07:00
Savita Patted
1713b6110a Snap for drop 04/29/2022 mainline 767 LA.VENDOR.13.2.0.AU191
camera-kernel:
4159a53 Merge "msm: camera: isp: Use CSID Interrrupts for non SFE use cases" into camera-kernel.lnx.dev
1597f65 Merge "msm: camera: uapi: Add link properties support" into camera-kernel.lnx.dev
897e395 Merge "msm: camera: csiphy: Update csiphy2.1.2 bringup sequence" into camera-kernel.lnx.dev

Change-Id: Ice29814d26ae4e7d1075b39126d438d5991d0fc4
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-29 20:06:08 -07:00
Depeng Shao
686ef6b041 msm: camera: uapi: Add link properties support
This change adds a link properties opcode to get
the property level configuration, we can define
different properties and do some special process
per link in CRM.
Also add a new error code to indicate the error
of streaming off.

CRs-Fixed: 3163906
Change-Id: I7ebb54e5148fb10f74a710a95aeb7ca10d83be71
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2022-04-29 18:36:41 -07:00
Gaurav Jindal
daf5edeedf msm: camera: isp: Use CSID Interrrupts for non SFE use cases
In Non-SFE use cases, camif interrupts from CSID are sufficient to
run the state machine. In SFE cases, interrupts from VFE can be
used to drive the state machine.
This commit adds changes to subscribe the IRQs based on the
use case.

Change-Id: I75c2bc4f6e0754ef1e80a2d4f291b18f16900475
CRs-Fixed: 3153295
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2022-04-29 18:36:29 -07:00
Jigar Agrawal
2109492fb1 msm: camera: csiphy: Update csiphy2.1.2 bringup sequence
Update csiphy bringup sequence for csiphy2.1.2 with
revision 12 settings.

CRs-Fixed: 3172874
Change-Id: I7a50e716f509f9660762d405e619a850df775499
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-04-29 18:36:14 -07:00
Savita Patted
5572f2fdab Snap for drop 04/26/2022 mainline 766 LA.VENDOR.13.2.0.AU191
3f1e110 Merge "msm: camera: common: Optimize the name of some functions" into camera-kernel.lnx.dev
1ac8e87 Merge "msm: camera: isp: Extend internal recovery scheme" into camera-kernel.lnx.dev
a6f23fc Merge "msm: camera: isp: Add HW register header for SFE v880" into camera-kernel.lnx.dev
adfef67 Merge "msm: camera: isp: Add new WM port for SFE880" into camera-kernel.lnx.dev
e24a298 Merge "msm: camera: icp: Reorganize ICP V2 driver" into camera-kernel.lnx.dev

Change-Id: I8d9bd96ba2e31028d435caee8ca0400c464343db
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-26 20:06:12 -07:00
Sokchetra Eung
29a3af04f8 msm: camera: isp: Add HW register header for SFE v880
Add register header file for SFE 880 target. Modify
data structures, Macros in SFE top and SFE bus write/read files
accordingly. Update compatible dt match to include sfe 880.

CRs-Fixed: 3175256
Change-Id: I4205578ce473b69f01b3ce79b4f29547d957bb44
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
2022-04-26 17:37:32 -07:00
sokchetra eung
323d00e1c1 msm: camera: isp: Add new WM port for SFE880
Add output port - HDR_STATS for SFE880 and update all mappings
associated with the port.

CRs-Fixed: 3175256
Change-Id: I1a856f3c705d651a486e0aba5a77ca73f0deb5a5
Signed-off-by: sokchetra eung <quic_eung@quicinc.com>
2022-04-26 17:37:18 -07:00
Karthik Anantha Ram
b7af81340a msm: camera: isp: Extend internal recovery scheme
In case of bubble recovery stalling try internal recovery,
halt, reset and resume IFE pipeline. If internal recovery
succeeds skip notifying userland for pipeline recovery.
If the same slot [same request] is stalled again, it will
flag for userspace recovery.

CRs-Fixed: 3098892
Change-Id: I6fff844fecd653897451ab920ddf6c4d8ca2f49e
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-26 17:37:06 -07:00
Karthik Anantha Ram
04926cb42a msm: camera: icp: Reorganize ICP V2 driver
Add support to handle a variation of ICP V2 for lanai.
IRQ registers have been moved to a different reg space.
Some registers that are currently used for debug  will
not be accessible by HLOS on lanai, remove usage of them.
The change also removes dependency on the reg base order
populated in the DTSI, irrespective of the order the driver
will parse and find the respective base indexes.
The change also adds register specific info per chipset.

CRs-Fixed: 3175809
Change-Id: I70d768a9c196c23f798f4f98a4be53ce12c7175b
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-26 17:36:55 -07:00
mingpan
00c0a92dea msm: camera: common: Optimize the name of some functions
Optimize the names of some functions and add declaration
for them in head file.

CRs-Fixed: 3164829
Change-Id: Ia10ab83e0b6164a82fdd21b351477294bf4bbe4b
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
2022-04-26 17:36:18 -07:00
Savita Patted
14c3d963a5 Snap for drop 04/22/2022 mainline 765 LA.VENDOR.13.2.0.AU191
a4a4378 Merge "msm: camera: isp: Remove max sfe out res macro from UAPI" into camera-kernel.lnx.dev
437c3c2 Merge "msm: camera: isp: Add separate IRQ controller for each CSID register" into camera-kernel.lnx.dev
65c0346 Merge "msm: camera: uapi: Change uapi header for SAT switch latency optimization" into camera-kernel.lnx.dev
12ee746 Merge "msm: camera: isp: Extend SOF timestamp recovery to first frame" into camera-kernel.lnx.dev
4d0243d Merge "msm: camera: isp: Add hardware header files for VFE and VFE-Lite 880" into camera-kernel.lnx.dev
7184613 Merge "msm: camera: isp: Add new WM port for VFE880" into camera-kernel.lnx.dev
db64859 Merge "msm: camera: icp: Update BPS register SWI for lanai" into camera-kernel.lnx.dev

Change-Id: Ic97d8bed4a18508ccb70420704d63dfda9c21d22
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-22 22:36:16 -07:00
sokchetra eung
1f26cdf7c8 msm: camera: isp: Remove max sfe out res macro from UAPI
Remove max sfe out resource macro from uapi. Remove all usages
of the macro in ife hw mgr and sfe bus write files. Instead, use
max_out_res from sfe header files and Ife hw mgr calls to queries
max sfe out res from sfe bus wr.

CRs-Fixed: 3176997
Change-Id: Ie3fc36f3003305eeebcc60ec9539ff2c6630e337
Signed-off-by: sokchetra eung <quic_eung@quicinc.com>
2022-04-22 22:07:42 -07:00
Karthik Anantha Ram
564ff107fd msm: camera: icp: Update BPS register SWI for lanai
Update register offsets for BPS 880.

CRs-Fixed: 3175809
Change-Id: Idd7583a624126b3aea3ca704904002147f59966e
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-22 22:07:31 -07:00
Depeng Shao
1c4c766ffc msm: camera: uapi: Change uapi header for SAT switch latency optimization
Change uapi header for SAT switch latency optimization.

CRs-Fixed: 3094388
Change-Id: Iddfb1a300c522411115dcdb74e9890dd56b62778
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2022-04-22 22:07:19 -07:00
Anand Ravi
b0c2b3eda4 msm: camera: isp: Add hardware header files for VFE and VFE-Lite 880
This commit adds new hardware header files for VFE 880 and VFE Lite 880.
It also adds support for loading the hardware structs defined in these
files during probe time.

CRs-Fixed: 3168484
Change-Id: I617cbc0fa6f1fa45b3ff4ba503a65d6eb2e265c0
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2022-04-22 22:07:06 -07:00
Anand Ravi
2dc1ecbc90 msm: camera: isp: Add new WM port for VFE880
Add output port for STATS_ALSC for VFE880 and update all mappings
associated with the port.

CRs-Fixed: 3168484
Change-Id: I0a674e7d2d6fe5fa5a51ff31e22f066fa222e5b7
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2022-04-22 22:06:46 -07:00
Anand Ravi
4b474624a1 msm: camera: isp: Add separate IRQ controller for each CSID register
In CSID v2, the top status register indicates which other status
registers have values of interest. Adding a separate IRQ controller for
each such register, and registering them as dependents of the top irq
controller allows optimization of register reads and writes.

CRs-Fixed: 3152588
Change-Id: I930f9b9c58da0f45fffabb2929062d721bb9bbda
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2022-04-22 22:06:34 -07:00
Anand Ravi
6f216cdb87 msm: camera: isp: Extend SOF timestamp recovery to first frame
Tweak SOF timestamp recovery logic to handle sending timestamp for
first frame. This is needed when due priority inversion, ISP context
notifies timestamp before SOF.

CRs-Fixed: 3085335
Change-Id: I9baea8d906bb8f820c7aeb2d7d4ae1c1c6f348b2
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2022-04-22 22:06:17 -07:00
Savita Patted
74801b50a3 Snap for drop 04/19/2022 mainline 763 LA.VENDOR.13.2.0.AU185
camera-kernel:
7a7c5c1 Merge "msm: camera: isp: Update acquired HW id and path for SFE use-cases" into camera-kernel.lnx.dev
b449fa6 Merge "msm: camera: uapi: Add new macro for RDI4" into camera-kernel.lnx.dev
7fdb106 Merge "msm: camera: isp: Add comp done shift values for each group" into camera-kernel.lnx.dev
4a5034c Merge "msm: camera: reqmgr: Fix frame drop issue" into camera-kernel.lnx.dev

Change-Id: If6b513e1dfce87497f7a0cf0fe756c7ee523db83
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-19 17:06:13 -07:00
Karthik Anantha Ram
e1b7c89465 msm: camera: isp: Update acquired HW id and path for SFE use-cases
For SFE use-cases, update the hw_idx and paths acquired
for userspace to consume. Currently even in SFE use-cases,
only IFE info is returned which may not be right always.

CRs-Fixed: 3175210
Change-Id: Ice0816993a208965032a71a924cd53f7ebc02e89
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-19 13:37:00 -07:00
Karthik Anantha Ram
5e9a1d2c9a msm: camera: uapi: Add new macro for RDI4
Add new macro for RDI4 to append in acquired path output.

CRs-Fixed: 3175210
Change-Id: Ic3999d0e84e938bacc62134c96126c689d6bb893
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-19 13:36:48 -07:00
Karthik Anantha Ram
b3a1a6f104 msm: camera: isp: Add comp done shift values for each group
Currently the assumption is the order of the comp groups
and buf done status bits are the same for SFE write clients.
This may not be true for different targets. Add per group
shift value in header, removes dependency on comp group type
and buf done mask.

CRs-Fixed: 3175210
Change-Id: I802fb2676c20847148c02c9a46766115511a2450
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-19 13:36:37 -07:00
Depeng Shao
92f47b510a msm: camera: reqmgr: Fix frame drop issue
When the req id of a slot is -1, we don't update the
last applied idx for this slot, if a bubble issue is
reported on previous slot, then we won't reset its
status to ADDED, then we will force reset it during
moving to new slot, then this slot will be reset, its
status will be NO_REQ after reset, then wr idx will be
increased even though the wr idx isn't equal to rd idx.
This change updates the wr idx only when wr idx is equal
to rd idx, and always update last applied idx.

CRs-Fixed: 3157732
Change-Id: I9e6cae019f93c7c12e81708a84e1ac28bf64bbc8
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2022-04-19 13:36:19 -07:00
Savita Patted
be308d6b3e CAMX: Snap for drop 04/15/2022 mainline 762 & 761 LA.VENDOR.13.2.0.AU185
camera-kernel:
5fc9ddb Merge "msm: camera: icp: Rename A5 and LX7" into camera-kernel.lnx.dev
6c0f2e9 Merge "msm: camera: isp: Get correct sfe out resource" into camera-kernel.lnx.dev
c42dba6 Merge "msm: camera: cdm: Remove redundant CDM Register Write" into camera-kernel.lnx.dev
2e5bc5b Merge "msm: camera: isp: Add CDM Debug register dump during bubble" into camera-kernel.lnx.dev
8abdc74 Merge "msm: camera: smmu: Use get_file api to increase ref count" into camera-kernel.lnx.dev

Change-Id: Ib5f8413bb5d4bf6edba5d88418ec55abcf8fcf1b
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-15 17:06:09 -07:00
sokchetra eung
9c730e3b84 msm: camera: icp: Rename A5 and LX7
Rename all instances of a5 and lx7 to icp_v1 and icp_v2
respectively. Remove all mentions of lx7 or a5 in icp_hw_mgr.
Relocate lx7_hw and a5_hw directories to a new directory -
icp_proc which contains a new file to provide related a5 or lx7
interfaces to icp_hw_mgr. Thus, icp_hw_mgr is agnostic to icp proc.
Place common functions and common global constant into icp_proc_common
file. Remove a5/lx7 soc files and create a common soc file for both.
Modify kbuild file to account for directory or file changes.

CRs-Fixed: 3162183
Change-Id: I7e0cfd2a2917f129097a517af3bd39578f85293d
Signed-off-by: sokchetra eung <quic_eung@quicinc.com>
2022-04-15 16:06:57 -07:00
Depeng Shao
b2d3d9c6ac msm: camera: isp: Get correct sfe out resource
The index of sfe out res in bus_priv is based on
the sfe out type, rather than the out index, So
we need to get the sfe out type by the out index
first, then get the sfe out res by sfe out type.

CRs-Fixed: 3165425
Change-Id: Ic35f6b5b23a0997c2f05f8950d0a82f488185d39
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2022-04-15 16:06:44 -07:00
Chandan Kumar Jha
e542dd7c3e msm: camera: smmu: Use get_file api to increase ref count
In rare scenarios, FD is getting released by userspace
before incrementing the ref count. We see failure in
dma_buf_get API as FD is released but we are still
tying to decrement ref count in case of dma
buf get failure.

We are seeing use-after-free as the buffer is released.

This fix includes get_file API to increment ref count
before dma_buf_fd.

CRs-Fixed: 3156174
Change-Id: Ie9588ec10e65cbb8fa155badda4f3e5fb81c0525
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
2022-04-15 16:06:33 -07:00
Jigar Agrawal
08a8d45a52 msm: camera: cdm: Remove redundant CDM Register Write
Remove the redundant CDM Register Write to IRQ mask
register just before the CDM Reset command. Intention
behind this register right is to ensure that the cdm
IRQ for Reset Done is enabled before we issue a reset
command. However, the reset value of the IRQ Mask
register always enables the reset done IRQ. Therefore
we can remove this redundant Register Write.

CRs-Fixed: 3163466
Change-Id: Ibcf55d17bb42de6ff1ad15fb542d8f682158b609
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-04-15 16:06:25 -07:00
Jigar Agrawal
b570795312 msm: camera: isp: Add CDM Debug register dump during bubble
Add CDM Debug register dump when the Bubble is detected due
to cdm callback not received.

CRs-Fixed: 3163463
Change-Id: I028ac9216704d14cc51648b0a5a78b0a2a366f12
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-04-15 16:06:14 -07:00
Savita Patted
2bfa88814a Snap for drop 04/13/2022 mainline 760 LA.VENDOR.13.2.0.AU185
camera-kernel:
71047ad Merge "msm: camera: isp: Handle error check correctly" into camera-kernel.lnx.dev
021e9d4 Merge "msm: camera: cdm: Add support for CDM 2.2" into camera-kernel.lnx.dev
4837ff7 Merge "msm: camera: isp: HW reset and recovery for bus overflow" into camera-kernel.lnx.dev
51db8c4 Merge "msm: camera: eeprom: Add OOB read check for eeprom memory map" into camera-kernel.lnx.dev
b6a36d0 Merge "msm: camera: reqmgr: reader writer locks to avoid memory faults" into camera-kernel.lnx.dev
ba9e089 Merge "msm: camera: cdm: Fix some issues in irq line test" into camera-kernel.lnx.dev

Change-Id: Ie4787a78571c2423df19a220b3addf25ce2f483b
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-13 18:06:13 -07:00
chengxue
ffe5621b5e msm: camera: isp: HW reset and recovery for bus overflow
This change does hw recovery and reapply all alive requests
for bus overflow issues.

When we face bus overflow KMD fatal errors, instead of
sending error to UMD, we will try internal recovery and
send a warn message to UMD once internal recovery happens,
if we fail to do recovery, then sending error to UMD.

CRs-Fixed: 3098892
Change-Id: Idee3679ff06227f985e106470bc1f5a14c9cb404
Signed-off-by: chengxue <quic_chengxue@quicinc.com>
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2022-04-13 17:07:08 -07:00
zhuo
5246b7ef75 msm: camera: cdm: Fix some issues in irq line test
This change fix unused error in cpas during compile when enable
CONFIG_CAM_TEST_IRQ_LINE and CONFIG_CAM_TEST_IRQ_LINE_AT_PROBE
issue, also fix can not find cdm irq line test interface when only
enable CONFIG_CAM_TEST_IRQ_LINE issue.

CRs-Fixed: 3169889
Change-Id: I673b150508d38bcf71ad33a5a9b38c6dff9a9578
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
2022-04-13 17:06:59 -07:00
Tejas Prajapati
2827395809 msm: camera: reqmgr: reader writer locks to avoid memory faults
Shared memory is initialized by CRM and used by
other drivers; with CRM not active other drivers
would fail to access the shared memory if
memory manager is deinit. Reader Writer locks can
prevent the open/close/ioctl calls from other drivers
if CRM open/close is already being processed.

Issue observed with the below sequence if drivers
are opened from UMD directly without this change.
CRM Open successful,ICP open successful,
CRM close in progress, ICP open successful,
mem mgr deinit and CRM close successful,
ICP tries to access HFI memory and result in crash.

This change helps to serialze the calls and prevents
issue.

CRs-Fixed: 3019488
Change-Id: I84d50918713686a067c0e3deb64c9c6ae9edfcb5
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-04-13 17:06:43 -07:00
Li Sha Lim
e63d6d6cb3 msm: camera: cdm: Add support for CDM 2.2
Added support for new cdm status register for SM8650.

CRs-Fixed: 3147223
Change-Id: I35392cfb35613a777664e1fae2c24b0150c5b8ef
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2022-04-13 17:06:34 -07:00
Shravan Nevatia
7672d56ed8 msm: camera: eeprom: Add OOB read check for eeprom memory map
Add check to prevent OOB read of eeprom memory map.

Change-Id: Ifeeeffdc2a50536edbde5b5d755a052ace86d596
CRs-Fixed: 3003049
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
2022-04-13 17:06:21 -07:00
Karthik Anantha Ram
c270a673d8 msm: camera: isp: Handle error check correctly
When validating input/output formats in CSID, if there
is an error, it is being dropped and returned as success.
Handle this to ensure error is propagated from CSID to
HW manager.

CRs-Fixed: 3163468
Change-Id: Ic822feb4ca7418a68ed10ab9a17f72c2408d4759
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-13 17:06:11 -07:00
Savita Patted
9558c2519e CAMX: Snap for drop 04/08/2022 mainline 757 LA.VENDOR.13.2.0.AU173
camera-kernel:
8f105a5 Merge "msm: camera: isp: Print msg in rate limit  on v4l2 error event" into camera-kernel.lnx.dev
d5fd0ee Merge "msm: camera: isp: Validate input formats for FE use-cases" into camera-kernel.lnx.dev

Change-Id: I006a767798b505a5fc2de5391a95f6ff1c44fefd
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-08 23:06:17 -07:00
Karthik Anantha Ram
b9c94c3452 msm: camera: isp: Validate input formats for FE use-cases
In case of multi vc-dt fetch engine use-cases, validate
the input format for each VC, they are expected to be the same.
Different input formats for each VC for SFE FE use-cases, is
not supported.

CRs-Fixed: 3163468
Change-Id: I73aab062bc316f01af4fdbf3eb0155c7e1b2719e
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-08 21:06:34 -07:00
Ayush Kumar
e8bff0c479 msm: camera: isp: Print msg in rate limit on v4l2 error event
This change is to print log in rate limit on unified SOF v4l2
error.

CRs-Fixed: 3099416
Change-Id: I2fed0c05a8180527cf5870406c43c952505956c6
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2022-04-08 21:06:15 -07:00
Savita Patted
7cb0e140a1 Snap for drop 04/08/2022 mainline 756.1 LA.VENDOR.13.2.0.AU173
camera-kernel:
0f85f24 Merge "msm: camera: isp: Address align the frame increment" into camera-kernel.lnx.dev
bd0fab5 Merge "msm: camera: cpas: Add cpas support for camera v880 platform" into camera-kernel.lnx.dev
4862d75 Merge "msm: camera: common: Page Fault notification to userspace" into camera-kernel.lnx.dev
5c86c98 Merge "msm: camera: ope: Update request timeout for NRT/RT context" into camera-kernel.lnx.dev

Change-Id: I07e59c839ca71a645d524d5263fae2c97ac3176a
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-08 20:36:16 -07:00
Karthik Anantha Ram
af27367e33 msm: camera: isp: Address align the frame increment
In case of HFR, align the frame increment to 256 to support
36 bit addresssing scheme on Kailua.

CRs-Fixed: 3150471
Change-Id: Ib71132a73a0d07a012ca960718be69a8456a07b8
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-07 20:37:44 -07:00
Li Sha Lim
2893f25f15 msm: camera: cpas: Add cpas support for camera v880 platform
Add register and qos header for v880.

CRs-Fixed: 3149361
Change-Id: Iff3f5343b950113b8456dfd43dd4218cd5a4f18b
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2022-04-07 20:37:22 -07:00
sokchetra eung
c52c83e7ce msm: camera: common: Page Fault notification to userspace
Upon Page Fault, smmu driver invokes faulted client's callback
which looks for faulted buffer and context. The client driver
can be ISP, ICP, JPEG, IFE CDM and CPAS CDM. The driver then
fills PF msg struct, logs related info, and notify PF msg to
userspace. Userspace is expected to abort and calls to shut
down kernel drivers. When Titan powers on next session, CAMSS
undergoes async reset.
This change also ensures the page fault related changes added
to TFE, OPE, CRE do not break the drivers compilation.

CRs-Fixed: 3156671
Change-Id: Icd6c8c9a38cac206fe8260d374d03964fb280879
Signed-off-by: sokchetra eung <quic_eung@quicinc.com>
2022-04-07 20:36:52 -07:00
Alok Chauhan
d43146eb4f msm: camera: ope: Update request timeout for NRT/RT context
Currently the ope request timeout value for RT and NRT context
are same. In some usecases, NRT request processing takes more time.

Hence, initialize the RT and NRT request timeout value separately.

CRs-Fixed: 3082993
Change-Id: I17e86d26403fb21cdff518a81dee7a19c865144e
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2022-04-07 20:36:21 -07:00
Savita Patted
23d6bd81e3 Snap for drop 04/05/2022 mainline 753 & 754 LA.VENDOR.13.2.0.AU173
camera-kernel:
61206d2 msm: camera: isp: Increase number of configs per request
69abb22 msm: camera: isp: Add check to prevent duplicate ack increment
3dd16f6 msm: camera: sensor: Dynamically vote for tpg src clock
329be7e msm: camera: isp: Add eof notification for rdi only context

Change-Id: Idfbadc27357f28fca43e04d6de9e100d42dd3c6c
Signed-off-by: Savita Patted <quic_spatted@quicinc.com>
2022-04-06 00:06:24 -07:00
Karthik Anantha Ram
561dbfc61d msm: camera: isp: Increase number of configs per request
For IFE only use-cases bump up the max number of configs
from 25 to 30, to support dual IFE requirements on Kailua.

CRs-Fixed: 3163468
Change-Id: Iffa5735fba3f8271b47ad368437b9174244ef889
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-04-05 21:37:22 -07:00
Chandan Kumar Jha
fcc220e1c2 msm: camera: isp: Add check to prevent duplicate ack increment
Due to the scheduling delay, We are seeing back to back
two top half for buff done for 2 different requests
but we were expecting the bottom half after 1st top half.

We update the last consumed address in the bottom half so
we have 2nd req buffer address in last consumed reg as
we received 2nd req top half before 1st req bottom half.

We increment num_ack variable of 2nd request in case
of 1st req buff-done as it had 2nd buffer address in
last consumed address.

Ack is going beyond during the 2nd req buff-done.

This check will prevent duplicate acknowledgment increment.

CRs-Fixed: 3165255
Change-Id: I9ea3bca2a782bae6017565f30162484adf2fc789
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
2022-04-05 21:37:01 -07:00