Commit Graph

3212 Commits

Author SHA1 Message Date
Pranav Sanwal
c2ad5cd913 msm: camera: tfe: Add out of sync error handling
problem:
Need to handle continuous out_of_sync_frame error that
may come due to mup/VC mismatch.

solution:
Handle the scenario by counting error occurences for a fixed
threshold since HW dosent generate SOF when this error comes
and triggering recovery.
Reset the count after the subsequent SOF is received.

CRs-Fixed: 3419224
Change-Id: Ifd44dc753385ae8cb8ce4b4cb283cd07aa8b2a44
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
2023-11-14 19:54:36 +05:30
Alok Chauhan
37ff9bad4d msm: camera: tfe: Add PDAF support in tfe 770 header
Add pdaf support in tfe header file for 770 target.

CRs-Fixed: 3387396
Change-Id: Ieb6f1245bd9ec7037fc6399bd3a8c081c96375a9
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-11-14 19:51:55 +05:30
Alok Chauhan
c269eb35cf msm: camera: common: update msm-mmrm dependency to camera-kernel
Updates board list of supported msm-mmrm boards to include crow.

CRs-Fixed: 3387396
Change-Id: I16d53737b8bf981d86dddd13deadde01987c44d5
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-11-14 19:50:04 +05:30
Ayush Kumar
ff740eb678 msm: camera: tfe: Add TFE and TFE LITE header file for 770 HW
This commit adds TFE and TFE LITE header file for titan
version 770 hardware.

CRs-Fixed: 3374385
Change-Id: I34c5227bc51e7911f584e219f5608af3dfcab9f8
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-11-14 19:47:49 +05:30
Alok Chauhan
b5d8386049 msm: camera: isp: Add support for PDAF HW
This change add support for:
 - PDAF HW support handling in CSID and TFE driver
 - CSID PPP halt mode handling
 - Add support for new TFE PD ports (LCR, PD_PREPROCESSED
   PD_PARSED).

CRs-Fixed: 3387396
Change-Id: I56dc109138607fe7b342760a5c977e4126fe1676
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-11-14 19:45:24 +05:30
Stuti Saxena
28aee302b2 msm: camera: tfe: Remove hardcoding of shift values
Problem Description:
Hardcoded shift values may vary with targets.

Solution:
Add support for reading shift values from target specific
header file to avoid hardcoding in tfe_bus and tfe_core files .

CRs-Fixed: 3390902
Change-Id: I7960e72f6b15c13c07cacc28a83fc27e7f452d8d
Signed-off-by: Stuti Saxena <quic_stutsaxe@quicinc.com>
2023-11-14 19:43:54 +05:30
Alok Chauhan
877008e9d6 msm: camera: isp: Add support for CSID 770
This change add support for
 - new CSID 770 HW
 - PDAF resource structure addition in header file.

CRs-Fixed: 3387396
Change-Id: I85ce8a05039657bb7da251e9141e94c9d5d6843f
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-11-14 19:41:56 +05:30
Ayush Kumar
1d652f18cd msm: camera: tfe: Add support for TFE LITE HW
This commit adds support for TFE LITE HW.

CRs-Fixed: 3374385
Change-Id: I4a7eb792243fba07467060cb242f98638658d0ad
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-11-14 19:37:21 +05:30
Ayush Kumar
7a9cd0d210 msm: camera: tfe: Add MUP support for TFE HW
This change add support for MUP in TFE HW. Also enable
interrupt if case of mup mismatch and add error bit in
header file to remove hardcoded values.

CRs-Fixed: 3350436
Change-Id: I5556fa3f8ab47fea16fe92007303eb68a5b80943
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-11-14 19:33:17 +05:30
Depeng Shao
56bb12e64b msm: camera: isp: Read last consumed addr again if no matching res
Bus layer just read the consumed address from one port per group,
sometimes, this port isn't requested by userland, so it can't
match with any requested resources. This change reads consumed
address from other port which in same composite group if the buf
done event can't match any requested resources.

CRs-Fixed: 3590441
Change-Id: I1590e9a53ef7eff1df65682ae4ca77b011d1af39
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit 3ec040334581d347916871429de9374555656e4d)
2023-11-07 23:56:23 +05:30
Ayush Kumar
e01a63cc4f msm: camera: isp: Add TPG mux select logic in CPAS
Add TPG mux select logic in CPAS. To select form which TPG CSID should
get the data, TPG_MUX_SEL register has to be programmed. This change
adds the logic to write this register on CPAS driver.

CRs-Fixed: 3081144
Change-Id: I86560f802a04e88ceca4efa276e853029d8417d3
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
(cherry picked from commit 323f7225a0e814b2be33cd89109ae6b3ac8c3490)
2023-11-07 23:54:46 +05:30
Stark Lin
314f7dce36 msm: camera: utils: Restructure register address validation
On current scheme, we put validation inside IO function, it's hard
to block subsequent accessing when facing invalid address and may
increase the number of cycles to do the register accessing as well.
This change limits the validation to only for the reg dump, we can
take following up operations when accessing wrong address for read
rather than printing uncertain logs.

CRs-Fixed: 3589725
Change-Id: I7d38a3ddb6c3f8e2915070f3c24629754abf76d7
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
(cherry picked from commit 159f8889a51178a92186e66e24e39bfdb01e87ee)
2023-11-07 23:53:36 +05:30
Camera Software Integration
832696032c Merge "msm: camera: isp: Update event record for shutter notification" into camera-kernel.lnx.7.0 2023-11-05 06:43:07 -08:00
Camera Software Integration
42107a1433 Merge "msm: camera: isp: Update the resource reserve logic" into camera-kernel.lnx.7.0 2023-11-05 06:42:25 -08:00
Depeng Shao
83c35b72f0 msm: camera: isp: Update the resource reserve logic
Based on HW team's recommendation, we should restrict to 1:1
mapping in between IFE and SFE hw index. This change makes
sure IFE acquire resource from the hw idx what SFE has
acquired.

CRs-Fixed: 3618217
Change-Id: I493f3519887a3a214e23cf8e70d2a1550213ee84
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2023-10-30 16:14:28 +05:30
Vikram Sharma
cec32ac0ce msm: camera: isp: Update event record for shutter notification
This change adds shutter notification event in event record too
which can be dumped at the time of recovery.

CRs-Fixed: 3616617
Change-Id: I4eb57da6faf7ed3dc0a0a4a407fb669078db2a25
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
2023-10-30 11:23:44 +05:30
Dharmender Sharma
d6f2cc2a00 msm: camera: cpas: Fix cpas dump state monitor array info
Even if smart Qos is enabled disabled smart_qos_info is accessed which
causes the kernel panic. This change add few check before accessing the
smart_qos_info.

CRs-Fixed: 3650729
Change-Id: Idb8cd892f47aec60290ab3d6c7853a60558840a0
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
2023-10-29 00:28:37 -07:00
Dharmender Sharma
ac33a9b0cf msm: camera: cre: calling cpas stop during release
CRE is not calling cpas stop during release causing
cpas handle to not release. it leads to next time acquire
failure.
Handling release properly with this fix.

CRs-Fixed: 3081144
Change-Id: I40cc22ac86934bc53171f19652a0fee381ee5d67
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
2023-10-18 12:27:39 -07:00
Camera Software Integration
765156f4f3 Merge "msm: camera: common: Added missing NULL Checks" into camera-kernel.lnx.7.0 2023-10-18 02:45:49 -07:00
Sourabh Soni
eeb2706049 msm: camera: common: Added missing NULL Checks
This change is returning error for the cases
when platform device misses some data for
device or sub device. Adding Null pointer
checks resolves this issue.

CRs-Fixed: 3608850
Change-Id: If8fc3fc7c93bb2b95087674165dca8c1c13d54f6
Signed-off-by: Sourabh Soni <quic_soursoni@quicinc.com>
2023-10-14 17:54:09 +05:30
Pranav Sanwal
c565be83b1 Camera: Bring over TFE specific changes
Following gerrits combined:

msm: camera: tfe: update debug data for overflow
msm: camera: isp: Handling IRQ delay from CDM in tfe
msm: camera: isp: Handling excessive logging in cdm callback
msm: camera: tfe: Fix compilation issue
msm: camera: uapi: Add new HW ports definition for TFE
msm: camera: tfe: Add LDAR dump utility in TFE.

CRs-Fixed: 3623803
Change-Id: I31e7b8d7cff654fd292ce431b790e0e287d6845e
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
2023-10-14 17:42:59 +05:30
Gaurav Jindal
050d6d7a8a msm: camera: isp: Maintain clock rate relation between CSIPHY, CSID and TFE
Adds checks to confirm CSID frequency greater than
CSIPHY frequency, TFE frequency greater than CSID
frequency. Also TFE frequency should be such that
it can accommodate PHY data rate .

CRs-Fixed: 2847155
Change-Id: I5d3dcc53a6f27129f4b82cba1254445f58f6d0cf
Signed-off-by: Shravya Samala <quic_shravyas@quicinc.com>
Signed-off-by: Shardul Bankar <quic_sharbank@quicinc.com>
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-10-14 17:41:52 +05:30
Pranav Sanwal
e9530314ea msm: camera: tfe: dump csid clock and path data at overflow
On overflow dump the AB and IB votes, tfe clock,
CSID clock and respective bus path data for acquire
time and addr_status registers.

CRs-Fixed: 3118430
Change-Id: Ia38eb4350e8e38562b6d22769b38637480da0b9d
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
2023-10-14 17:38:24 +05:30
Camera Software Integration
4299de278a Merge "msm: camera: isp: validation of cmd_buf support" into camera-kernel.lnx.7.0 2023-10-09 21:59:54 -07:00
Camera Software Integration
82b35d0b31 Merge "msm: camera: csiphy: Remove the references to a unused header" into camera-kernel.lnx.7.0 2023-10-09 21:58:34 -07:00
Camera Software Integration
7c764ef6eb Merge "msm: camera: common: Fix possible OOB reads and writes operation" into camera-kernel.lnx.7.0 2023-10-06 02:58:24 -07:00
mingpan
0c04a30b66 msm: camera: common: Fix possible OOB reads and writes operation
We need to check if the packet is valid before using it.

CRs-Fixed: 3605421
Change-Id: Ide4e005ba46690c1cac02cb77a2d9aaa497b15df
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
(cherry picked from commit 0156c0475a4c6c042eb84fcfbc14b3e837e0cb4c)
2023-10-06 15:26:34 +05:30
Camera Software Integration
527bd7e7bd Merge "msm: camera: isp: Fix to map correct bus port to MID" into camera-kernel.lnx.7.0 2023-10-06 02:56:32 -07:00
Camera Software Integration
6c0e1c6d17 Merge "msm: camera: isp: Fix logic to get correct bus port on page fault" into camera-kernel.lnx.7.0 2023-10-06 02:56:18 -07:00
Shravan Nevatia
6bbdc6d2ec msm: camera: sensor: Add subdev data ptr NULL checks
Add NULL checks for the private device data ptr
returned by v4l2_get_subdevdata for sensor/CCI/PHY/flash
subdevs.

CRs-Fixed: 3605325
Change-Id: I146857a944988655f75327046bebd9b87154939b
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
(cherry picked from commit 8eaa13f96deb4d940c25cb6043a06f0b7235966a)
2023-10-06 15:25:29 +05:30
Vijay Kumar Tumati
887026f2b5 msm: camera: csiphy: Remove the references to a unused header
The file is supposed to be included only from the userspace
drivers and not from the kernel space drivers. The other
files included in the camera drivers are sufficient for
referencing the necessary symbols.

CRs-Fixed: 3562596
Change-Id: I7261e4b9af2984fd78d5dc43bfbec6c090ad647b
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
(cherry picked from commit b0009248708dfe13cb0fea22b43c542520db446f)
2023-10-04 14:30:40 -07:00
Camera Software Integration
794e78060d Merge "msm: camera: isp: Add fuse support for SHDR" into camera-kernel.lnx.7.0 2023-10-04 03:08:06 -07:00
Camera Software Integration
19ca7a73f9 Merge "msm: camera: memmgr: Add missing calls of put buf to avoid leak" into camera-kernel.lnx.7.0 2023-10-04 03:06:41 -07:00
Camera Software Integration
195a33bc2e Merge "msm: camera: cre: Enable CRE module" into camera-kernel.lnx.7.0 2023-10-04 00:56:58 -07:00
Camera Software Integration
9e992f8c38 Merge "msm: camera: cpas: Add support for Cliffs Camera" into camera-kernel.lnx.7.0 2023-10-04 00:56:38 -07:00
Atiya Kailany
589a14ed9a msm: camera: utils: Add support for cesta hw client voting through mmrm
Currently, CESTA hw clients vote directly in util layer using clk crm
api, this change will enable CESTA hw clients to vote using mmrm api when
appropriate. This change affects setting the clk rate as well as
registering and unregistering a hw client with mmrm interface.

CRs-Fixed: 3385745
Change-Id: I5a9ad0e515e153dbbb937cab3a951d05677c817b
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
(cherry picked from commit 61b72dfada00da024e0bfe7449a4c6d845b492d2)
2023-10-04 13:25:01 +05:30
Camera Software Integration
2dcc195072 Merge "msm: camera: csiphy: Remove the references to a unused header" into camera-kernel.lnx.7.0 2023-10-04 00:51:38 -07:00
Camera Software Integration
754860d132 Merge "msm: camera: isp: Logging improvement" into camera-kernel.lnx.7.0 2023-10-04 00:50:48 -07:00
Camera Software Integration
083ac0c2f4 Merge "msm: camera: sensor: Add PHY support for cliffs" into camera-kernel.lnx.7.0 2023-10-04 00:50:06 -07:00
Camera Software Integration
862a5636b3 Merge "msm: camera: cpas: Add support for dynamic FD port config" into camera-kernel.lnx.7.0 2023-10-04 00:49:58 -07:00
Karthik Dillibabu
97c4721bae msm: camera: isp: validation of cmd_buf support
This change validates cmd_buf in IFE/TFE before submitting
BL to CDM when debugfs(enable_invalid_cmd_check) is enabled.

CRs-Fixed: 3616889
Change-Id: I5418661ff092fb15d04ab7dda6f3b59742a232a8
Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
(cherry picked from commit 7528980860a33e0d800915c64005965862b80982)
2023-10-03 01:17:11 -07:00
Dharmender Sharma
4ae0511777 msm: camera: isp: Fix to map correct bus port to MID
Bus port to MID mapping is wrong so updating correct MID mapping to the
respective bus ports.

CRs-Fixed: 3609762
Change-Id: I1d369319d3d5688e21ffb4873643d3cb5ac1467c
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
2023-09-28 03:31:10 -07:00
Dharmender Sharma
f927893bdb msm: camera: isp: Fix logic to get correct bus port on page fault
This commit add change to get correct resource outport
for page fault if mid value is same for two or more ports.

CRs-Fixed: 3609762
Change-Id: Ic48e71d1d3956b04240c136507c868f971ec1ad6
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
2023-09-27 11:46:24 +05:30
Depeng Shao
c0c785043e msm: camera: cci: Remove some dead code
This change removes some dead checking code for
lock function.

CRs-Fixed: 3612969
Change-Id: I8f43ab6021ed6122d37d14b06f4dac1f7e48e6c8
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit eea20d5fb340d847ec8ec50554b4334cd964ce47)
2023-09-26 23:54:57 +05:30
Shravan Nevatia
0101ba0568 msm: camera: sensor: Always stream-off at flush in standby mode
Issue:
- In standby mode, aux sensor is streamed-off at flush only if
stream-off command has already been received.
- If flush happens before stream-off command, the sensor is never
streamed off. This causes the next config command to fail.

Fix:
In standby mode, stream off sensor at flush regardless of the
stream-off status.

CRs-Fixed: 3537642
Change-Id: I15956d51dae4a30cdcabbe9d0ed59857c028218e
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
(cherry picked from commit d5c922710cea5c19a9bcabda946842ba47d920a5)
2023-09-26 23:54:25 +05:30
Vikram Sharma
ec8012559c msm: camera: memmgr: Add missing calls of put buf to avoid leak
This change add missing calls to put cpu buf in few scenarios.

CRs-Fixed: 3578162
Change-Id: Iab6aa0324b5072390b38df296c7acee00f5102a1
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
2023-09-26 05:49:27 -07:00
Dharmender Sharma
6637d416d1 msm: camera: isp: Add fuse support for SHDR
Add dt-bindings entry for CAM_CPAS_SHDR_FUSE feature.
Read fuse value and store it.

CRs-Fixed: 3609762
Change-Id: I9fdd9e8ba2cf4648cca3dedba567853764344241
Signed-off-by: Dharmender Sharma <dharshar@qti.qualcomm.com>
2023-09-26 01:56:27 -07:00
Vijay Kumar Tumati
0c0096b72e msm: camera: cpas: Add support for dynamic FD port config
Configure IFE FD OUT port to secure or non-secure
based on whether the user space wants to use
hardware FD or software FD for secure camera
use cases.

CRs-Fixed: 3572316
Change-Id: I8f5f1506a01ba2aaf9c533edbdc64c5c6250cb2f
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
(cherry picked from commit db520c5c3fb5e585eceb1d4bc4d58a0b799b2c08)
2023-09-22 09:34:43 -07:00
Dharmender Sharma
d5e504c12c msm: camera: cre: Enable CRE module
This change is to enable CRE driver and fix compilation issues due to
undefined variables. Also added bazzal support for cre.

CRs-Fixed: 3609762
Change-Id: Ife0910d27535f97d792991ad192f896dc1927c71
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
2023-09-22 15:59:25 +05:30
Shravan Nevatia
855f371ebb msm: camera: sensor: Add PHY support for cliffs
Add PHY driver support for cliffs (PHY version 2.2.1).

CRs-Fixed: 3618770
Change-Id: I0cec1b62e827a6c0413ec9f79612507eaaa62724
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
2023-09-22 01:42:51 -07:00