Commit Graph

3141 Commits

Author SHA1 Message Date
Karthik Anantha Ram
594b59a2df msm: camera: memmgr: Add provision for heap selection
Currently, userland can only choose whether to allocate memory as
cached/uncached if it's a protected buffer, ubwc_p buffer, etc.
This change provides some more granularity in terms of heap selection.
One could now force an allocation from the system heap or
try a dedicated heap. The change also provides heap capability info
to userland as part of the query caps call.

CRs-Fixed: 3584481
Change-Id: Id4c92fd64d975f761e7dd4cecca8453dd09b039f
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2023-08-14 13:33:05 -07:00
Haritha Chintalapati
1dd093a770 Snap for drop 08/10/2023 mainline 1037 LA.VENDOR.14.3.0.AU343
camera-kernel:
abdf5f94 Merge 'msm: camera: utils: Add address validation for io operation' into camera-kernel.lnx.dev
67648784 Merge 'msm: camera: sensor: Remove delay in camera sensor driver' into camera-kernel.lnx.dev
dbd5b124 Merge 'msm: camera: isp: Update SOF timestamps in top-half' into camera-kernel.lnx.dev.

Change-Id: I3b44b89cd979cb1e9bf10aaca138fc48aa7e3cd5
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
2023-08-10 17:13:36 -07:00
Li Sha Lim
11bda3b669 msm: camera: isp: Update SOF timestamps in top-half
Currently, SOF timestamps are collected in bottom-half
routines. This may lead to a problem if bottom-half
execution is delayed, as it will then print frame N+1's
SOF timestamp instead of frame N; this will lead to two
duplicate SOF timestamps.

To fix this, SOF timestamps are read in top-half.

Some refactoring is done to enable SOF timestamps
to be read from vfe top half routine, as SOF timestamp
register values belong to CSID register space.

CRs-Fixed: 3485788
Change-Id: Ie13cf97072ab3f0688b835a4973e2ff27969e7ad
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2023-08-10 17:13:34 -07:00
Stark Lin
56429494cb msm: camera: utils: Add address validation for io operation
Kernel panic might be caused by improper register offset which
is not memory aligned during write or read operation, this change
adds a validation for the offset to avoid accessing invalid address.

CRs-Fixed: 3542219
Change-Id: I8761c8d416890bd4571be8a64118036c0173d303
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
2023-08-10 17:13:32 -07:00
Ridhi Mukesh shah
277c1f983b msm: camera: sensor: Remove delay in camera sensor driver
Removed the 20ms delay in the camera sensor driver during sensor probe.

Change-Id: I9a51c3d0b15d6c77196d00b9bfbf6a8dc76d63be
CRs-Fixed: 3244380
Signed-off-by: ridhshah <quic_ridhshah@quicinc.com>
2023-08-10 17:13:26 -07:00
Stark Lin
8ac893d982 msm: camera: isp: Fix some kw issues
This change fixes kw issues such as possible memory leak
and value is never used after assignment.

CRs-Fixed: 3574742
Change-Id: I757e055dbeeb308e4c115727774f183f8aae41be
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
2023-08-10 17:13:21 -07:00
Yash Upadhyay
42466f8068 msm: camera: isp: Number of valid vc dt check
Added num_valid_vc_dt check before first cid get call.

CRs-Fixed: 3248380
Change-Id: I02605adead5e2fd98db952e7c41ea2d56af38591
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
2023-08-10 17:13:21 -07:00
Chandan Jha
f1cb553de2 msm: camera: tfe: Add support to Recover missed SOF timestamp
In case SOF interrupt is not received by the camera driver, we can
recover the missing SOF timestamp for the frame at epoch using the
previous and current SOF timestamp from CSID.

CRs-Fixed: 3232845
Change-Id: Id41860e125c26f2175c5180713c9b3c41741491b
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
2023-08-10 17:13:21 -07:00
Alok Chauhan
b3c95f32d6 msm: camera: tfe: Print HBI and VBI info
Add format measure info to print HBI and VBI from csid.

CRs-Fixed: 3235284
Change-Id: I55148143624c492d2e220cf2e34012ba03f80630
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-08-10 17:13:21 -07:00
Ayush Kumar
c64744b09d msm: camera: isp: Update clock value during init based on blob
Take the clock blob value into consideration during tfe init phase.
Set default clock in absence of clock blob from UMD.

CRs-Fixed: 3247771
Change-Id: I6d5b17b69066fa42293bcb8192c833cb57be0206
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-08-10 17:13:21 -07:00
Alok Chauhan
1b002763fa msm: camera: isp: Add multiple MIDs support for per port
Add multiple MIDs support for TFE. This will help to parse
request dump during PF issue.

CRs-Fixed: 3206699
Change-Id: I0f6f82a1c217fde9a4f5628913bf8f5b43e4c2ee
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-08-10 17:13:21 -07:00
Alok Chauhan
4ffc32da32 msm: camera: isp: Correct packer format for RS stats
Correct the packet format for RS stats configuration
during acquire time.

CRs-Fixed: 3206699
Change-Id: Ibcc615416603d427da0c41e8a2c2d519664367c8
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-08-10 17:13:21 -07:00
Alok Chauhan
741818ee75 msm: camera: tfe: Take ceiling value while calculating width for wm
Take ceiling value while calculating width for PD10 format.

CRs-Fixed: 3201748
Change-Id: Ib2b722a5e7637b9eb247fba14b512f5338a79836
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2023-08-10 17:13:21 -07:00
Wasim Khan
aaf897c89b Merge "Snap for drop 08/03/2023 mainline 1033 LA.VENDOR.14.3.0.AU330" into camera-kernel.lnx.7.0 2023-08-10 17:06:53 -07:00
Wasim Khan
43f3a20a94 Merge "msm: camera: common: Enable secure camera on Bazel build" into camera-kernel.lnx.7.0 2023-08-10 17:06:52 -07:00
Wasim Khan
c47495677b Merge "msm: camera: common: enabling DDK bazel build for camera" into camera-kernel.lnx.7.0 2023-08-10 17:06:49 -07:00
Wasim Khan
cc411dc671 Merge "msm: camera: common: changes to handle err in bazel build" into camera-kernel.lnx.7.0 2023-08-10 17:06:48 -07:00
Wasim Khan
ba313f4ee7 Merge "msm: camera: common: removing spectra custom config" into camera-kernel.lnx.7.0 2023-08-10 17:06:46 -07:00
Abhijit Trivedi
2a9dc04e61 Merge "Snap for drop 07/18/2023 mainline 1022 LA.VENDOR.14.3.0.AU306" into camera-kernel.lnx.7.0 2023-08-09 15:03:02 -07:00
Abhijit Trivedi
00d121a3ad Merge "msm: camera: csiphy: Add support for SM8750" into camera-kernel.lnx.7.0 2023-08-09 15:02:47 -07:00
Haritha Chintalapati
48b58adc04 Snap for drop 08/03/2023 mainline 1033 LA.VENDOR.14.3.0.AU330
camera-kernel:
f5a5caa6 msm: camera: common: Enable secure camera on Bazel build
6a3a6fe3 msm: camera: common: enabling DDK bazel build for camera
31642616 msm: camera: common: changes to handle err in bazel build
d001b07f msm: camera: common: removing spectra custom config.

Change-Id: I7a683f12cd546d6576f8e6ab77dc761f1d816c8b
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
2023-08-03 16:50:05 -07:00
Vijay Kumar Tumati
aae436e4a1 msm: camera: common: Enable secure camera on Bazel build
Add the required Kconfig option for secure camera to work
on the targets with Domain ID support.

CRs-Fixed: 3535645
Change-Id: I74d3fc6b2b6f1d4d5fdf9d8f2d32f369d2f0467b
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
2023-08-03 16:50:04 -07:00
Soumen Ghosh
8d62831c1b msm: camera: common: enabling DDK bazel build for camera
This change will help to enable DDK bazel build frameworks.

CRs-Fixed: 3535645
Change-Id: I2ac421b0b25474d20d856e1508d0f85a07396159
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
2023-08-03 16:50:02 -07:00
Soumen Ghosh
24a496388f msm: camera: common: changes to handle err in bazel build
Currently, the 'mm/slab.h' header is used to access a private kernel
structure. With Bazel, private headers are not available.
Refactor the code to avoid the use of the private header.

CRs-Fixed: 3535645
Change-Id: I3b442f0a7b2b70fbf638d3f505c47de88b14c5e6
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
2023-08-03 16:50:00 -07:00
Soumen Ghosh
9e0b27fa09 msm: camera: common: removing spectra custom config
Removing CONFIG_SPECTRA_CUSTOM config. Which is not
required for mainline build.

CRs-Fixed: 3535645
Change-Id: I6952370f223ac628eef8e35fe3992e81e48e9fdd
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
2023-08-03 16:49:59 -07:00
Camera Software Integration
9c0b4e1ae6 Merge "Snap for drop 07/28/2023 mainline 1029 LA.VENDOR.14.3.0.AU330" into camera-kernel.lnx.7.0 2023-08-02 16:40:37 -07:00
Camera Software Integration
1361bffa3d Merge "msm: camera: icp: Add support for fw pas id" into camera-kernel.lnx.7.0 2023-08-02 16:40:36 -07:00
Camera Software Integration
926e348031 Merge "msm: camera: tfe: Read last consumed address in top half" into camera-kernel.lnx.7.0 2023-08-02 16:40:35 -07:00
Camera Software Integration
07c2e923bd Merge "msm: camera: isp: removing dead code" into camera-kernel.lnx.7.0 2023-08-02 16:40:34 -07:00
Camera Software Integration
eb74ee07ee Merge "msm: camera: isp: Don't add buffer tracker ref count for input buffer" into camera-kernel.lnx.7.0 2023-08-02 16:40:33 -07:00
Camera Software Integration
b05761ede6 Merge "Snap for drop 07/27/2023 mainline 1028 LA.VENDOR.14.3.0.AU306" into camera-kernel.lnx.7.0 2023-08-02 16:40:33 -07:00
Camera Software Integration
13a574cab0 Merge "msm: camera: isp: Fix crash issue for sfe bus error case" into camera-kernel.lnx.7.0 2023-08-02 16:40:31 -07:00
Haritha Chintalapati
ac55dc9c9f Snap for drop 07/26/2023 mainline 1027 LA.VENDOR.14.3.0.AU306
camera-kernel:
7c6cd3b5 Merge 'msm: camera: isp: config hw modification for presil' into camera-kernel.lnx.dev.

Change-Id: I12ed8791f4548dc280ccaa16a1a6e534a6161311
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
2023-08-01 14:53:27 -07:00
Haritha Chintalapati
e3de0d7237 Snap for drop 07/28/2023 mainline 1029 LA.VENDOR.14.3.0.AU330
camera-kernel:
11f7a941 Merge 'msm: camera: isp: removing dead code' into camera-kernel.lnx.dev
acd5b96a Merge 'msm: camera: icp: Add support for fw pas id' into camera-kernel.lnx.dev
a695f867 Merge 'msm: camera: isp: Don't add buffer tracker ref count for input buffer' into camera-kernel.lnx.dev
eb85bedc Merge 'msm: camera: tfe: Read last consumed address in top half' into camera-kernel.lnx.dev.

Change-Id: I629686e7b646af0bfb99a91eb89e4380a0b9ba6e
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
2023-07-31 18:01:09 -07:00
Haochen Yang
84f44ecf86 msm: camera: icp: Add support for fw pas id
This change retrieves CAM_FW_PAS_ID from ICP node in
DTSI instead of hardcoding by macros when loading firmware.
It provides forward compatibility for 2 ICP instances
with their own fw pas id.

CRs-Fixed: 3550697
Change-Id: I0bff4d01edebcf028e48dba25d65378adbd42ad6
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
2023-07-31 18:01:08 -07:00
Pranav Sanwal
ef6d34e2a6 msm: camera: tfe: Read last consumed address in top half
Move the read of consumed addr to bus top half, as the tasklet
may delay and cannot readout the consumed addr in time.

CRs-Fixed: 3543220
Change-Id: I89a00ce0596747b79f3b5e0f66c72e760711829b
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
2023-07-31 18:01:06 -07:00
Atiya Kailany
44f7e67c65 msm: camera: isp: removing dead code
This change removes an unused variable and its declaration.

CRs-Fixed: 3394193
Change-Id: I45561570fd501ba0314e5b43dfe4a6f138fe641f
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
2023-07-31 18:01:04 -07:00
Chengxue Shen
f4216475b9 msm: camera: isp: Don't add buffer tracker ref count for input buffer
While release sHDR RDI buffer, the ref count of buffer tracker still
larger than 1 lead to page fault, we needn't add buffer tracker ref
count for RDI input io config, only add buffer tracker ref count for
output buffer.

CRs-Fixed: 3561743
Change-Id: I3f1f9f7827c340b688be6aa58fba9340dd0876ad
Signed-off-by: chengxue <quic_chengxue@quicinc.com>
2023-07-31 18:01:02 -07:00
Haritha Chintalapati
523f6777bc Snap for drop 07/27/2023 mainline 1028 LA.VENDOR.14.3.0.AU306
camera-kernel:
7ab58d6c Merge 'msm: camera: isp: Fix crash issue for sfe bus error case' into camera-kernel.lnx.dev.

Change-Id: I23701e660da56232a8e25a2055c939bcadd935c8
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
2023-07-28 10:48:58 -07:00
Stark Lin
b1ec7821ce msm: camera: isp: Fix crash issue for sfe bus error case
There is a fairly high probability of crashing the device when
encountering SFE BUS error, this change fixes the issue.

CRs-Fixed: 3566948
Change-Id: I0049000766de4923632447c8aecfd15b20627c16
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
2023-07-28 10:48:53 -07:00
Suraj Dongre
54407407dd msm: camera: isp: config hw modification for presil
Added code to avoid clk bw update and wait for config done for every
request when cam_presil_mode is enabled.

CRs-Fixed: 3321317
Change-Id: I64b06a081d4c80757aef4903459d58dba85bfb5f
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
2023-07-28 10:48:45 -07:00
Shravya Samala
011cc16eb5 msm: camera: sync: Restructure sync device structure
Currently sync_device structure size allocated is nearly 424kb
which is leading to more than accepted page size order.
Sync table row which is array of 2048 is accounting
nearly 90% of total size of sync_device. To fix this
sync_table_row is made pointer based and allocated memory.

CRs-Fixed: 3558545
Change-Id: I0c8093c91ac7fec9f52613012b139192b827b8d9
Signed-off-by: Shravya Samala <quic_shravyas@quicinc.com>
2023-07-28 10:48:45 -07:00
hchintal
8a88a07cd0 Snap for drop 07/24/2023 mainline 1025 & 1024 LA.VENDOR.14.3.0.AU306
camera-kernel:
6db21196 Merge "msm: camera: common: Fix double-free scenario" into camera-kernel.lnx.dev
d7afb6e0 Merge "msm: camera: sync: Update synx handle state" into camera-kernel.lnx.dev
9354b5f2 Merge "msm: camera: reqmgr: Reset apply map for all pd tables on bubble" into camera-kernel.lnx.dev
24f4d690 Merge "msm: camera: tfe: Fix compilation for TFE" into camera-kernel.lnx.dev
2f552111 Merge "msm: camera: isp: Remove needless member of struct event_info" into camera-kernel.lnx.dev
b8c5808e Merge "msm: camera: cdm: Fixing memory leak in cdm driver" into camera-kernel.lnx.dev
f8ad0ac1 Merge "msm: camera: isp: Update WM config in case of dual ife" into camera-kernel.lnx.dev
14f4c091 Merge "msm: camera: isp: Update the value of macro CAM_ISP_BW_CONFIG_V3" into camera-kernel.lnx.dev.

Change-Id: I882480513ed7f1c23f10b428675bf0df5620eeda
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
2023-07-26 16:01:10 -07:00
Karthik Anantha Ram
669bd35816 msm: camera: reqmgr: Reset apply map for all pd tables on bubble
Reset apply map for all devices for the bubbled request for it
to be re-applied correctly.

CRs-Fixed: 3560153
Change-Id: I48e40b6edbfaa6ea60b8d8fb4155e8a612ab3c76
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2023-07-26 15:59:45 -07:00
Karthik Anantha Ram
fadf0e5db2 msm: camera: sync: Update synx handle state
On signaling the synx handle, mark the row as signaled.

CRs-Fixed: 3565287
Change-Id: I88f0d6a8455eecf62ffb084c0a540179d41fa64c
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2023-07-26 15:59:21 -07:00
Li Sha Lim
0fc752119d msm: camera: common: Fix double-free scenario
In situations where there are multiple flush requests,
a double-free of buffer tracker occurs when the sync
callback which operates in a workqueue contexts interrupts
an ongoing flush request operation. This change provides
the fix to prevent it from happening.

CRs-Fixed: 3554278
Change-Id: I675b22b76c0f10fcf1808dc3fe0bc48ebd19a2e4
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2023-07-26 15:58:55 -07:00
Pranav Sanwal
eff9517e23 msm: camera: tfe: Fix compilation for TFE
Fix TFE related compilation failiures in lnx.dev branch.

CRs-Fixed: 3543205
Change-Id: Ie9582f52a5e0960d419d4e791c58e16ae4c7209e
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
2023-07-26 15:58:28 -07:00
Chandan Jha
4252b1f555 msm: camera: cdm: Fixing memory leak in cdm driver
Free allocated memory in case of error scenario during
cdm interrupt handling.

CRs-Fixed: 3555034
Change-Id: Id0bcdd3a0ce4b78ffb13aa1655f886f808a8b4a0
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
2023-07-26 15:57:15 -07:00
Chandan Jha
113320bfd5 msm: camera: isp: Update WM config in case of dual ife
Update properly WM config in case of dual ife usecase.

CRs-Fixed: 3545754
Change-Id: I730fb01408ea1281898b38c3e4897b84e884e366
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
2023-07-26 15:56:30 -07:00
Ming Pan
032cd5a542 msm: camera: isp: Update the value of macro CAM_ISP_BW_CONFIG_V3
The value of macro CAM_ISP_BW_CONFIG_V3 should be 3,
but the current value is 2, we need to update it.

CRs-Fixed: 3558398
Change-Id: Iab07cc08434e31c22890f5f1311e9010ecd460d6
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
2023-07-26 15:54:57 -07:00