Commit Graph

205 Commits

Author SHA1 Message Date
Alok Chauhan
ec6515da0e msm: camera: tfe: Add epd support
This change add support for EPD mode high data
rate sensors which send EPD instead of EOT. This
change is only for CPHY EPD sensors and not applicable
to DPHY EPD sensors. For CPHY EPD sensor, EOT error masked.

CRs-Fixed: 3736696
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: I5ef0dac8e590daa1c4f3bc217f7da81a7a193dfe
2024-02-29 09:46:12 +05:30
Ayush Kumar
490d086f78 msm: camera: isp: Drop initial few frames in TFE CSID
Add support to discard initial number of frames for all paths
at CSID input. The number of frames to discard is obtained
from userland in blob config.

CRs-Fixed: 3603614
Change-Id: Ifff5f6013ae37ab54154c092571f2b40d51fa849
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2024-01-12 00:56:10 -08:00
Ayush Kumar
c5dae62d39 msm: camera: isp: Support TFE WM configuration update
This chages is to support blob to update TFE WM dimensions.
This is required as 3A lib allocates max buffer for pdaf ports
but per request dimension can differ from buffer dimension.

CRs-Fixed: 3546181
Change-Id: I98bffa9ef00a7fa2bb543cb0c89f7920ed6780c5
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-12-19 01:52:58 -08:00
Ayush Kumar
bfbfc5d3d4 msm: camera: isp: Buffer alignment support for TFE WM
This change is added to support buffer alignment for TFE
WM in x and y axis. This change is required in SHDR usecase to
align short exposure frame with long exposure frame.

CRs-Fixed: 3538642
Change-Id: I9a3d35d0884bfbd6f62034b207e5784fdf2f7430
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-12-19 01:52:40 -08:00
Ayush Kumar
1b91ba1b2f msm: camera: tfe: Add support for epoch blob in TFE HW
In overlap SHDR, epoch irq from TFE need to configure in such
a way that request should be apply at epoch of shorter exposure frame
before start of the next frame of long exposure to make sure that
new settings should apply properly in time.

CRs-Fixed: 3396382
Change-Id: I1ddc3ce95c6d404a3f76a27cc58083e11b03bace
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-12-18 03:59:56 -08:00
Ayush Kumar
6e2c1b9671 msm: camera: tfe: Add support for auto SHDR
This change add support for activate and deactivate ISP device in the
link when dual trigger mode in the link is set.

CRs-Fixed: 3374385
Change-Id: Ib6d25ab295d613fa5cd3edf1780362476920d74d
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-12-18 17:08:13 +05:30
Ayush Kumar
ed703b3236 msm: camera: tfe: Multiple fixes for TFE Lite
Increase count of maximum number of TFE HW supported and
corrected WM composite group number.

CRs-Fixed: 3426117
Change-Id: I4cf91bb92772c5be5a56783228c694fedf6c5ec7
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
2023-11-20 15:57:39 +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
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
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
Haochen Yang
69f7756ed0 msm: camera: uapi: Add support for FCG configuration
This change adds structs in uapi to carry update values
for SFE/IFE/MC_TFE FCG configurations.

CRs-Fixed: 3487116
Change-Id: Ia3202ccf9649375725b8ee1b8f721347d1399a88
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
(cherry picked from commit 989c22e0b775faaaa72479cab3bbac629203381b)
2023-09-06 00:17:38 +05:30
Depeng Shao
6aa27c964f msm: camera: isp: Update acquired HW id for SFE2
This change adds sfe hw id 2 as valid hw id, then
sfe 2 info can be returned to userspace correctly.

CRs-Fixed: 3587713
Change-Id: I01825040837be4e1df204d7fe1c27887af3900e5
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit 9668c0f7a7963d6a6a43a6bb2352aa5b76201a83)
2023-08-23 02:40:11 -07:00
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
Atiya Kailany
2bb45ffd4c msm: camera: common: Fixing memory leak issues
This change removes some dead code and fixes memory leak
issues and mismatched labels.

CRs-Fixed: 3394193
Change-Id: Ieb6f0d56cddc58be4caea6f0aece63a793a08c07
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
2023-07-13 17:36:44 -07:00
Yash Upadhyay
c98bea4b04 msm: camera: tfe: Add support for TFE BW limiter
Add blob to allow userland to configure BW limter for TFE WMs.

CRs-Fixed: 3505174
Change-Id: I5c671cbcfa5557082c4ae5302471a2ece45294ab
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
2023-06-26 14:04:03 -07:00
Karthik Dillibabu
f910aa0b4f msm: camera: common: Partial Camera Support
This change creates a sysfs entry(subparts_info) which
has info about number of IFEs, IFE-LITEs, SFEs & CUSTOM,
whose values are populated in their respective drivers.
Also, validates whether a particular IFE, SFE and CUSTOM
is supported or not. Based on this, probe of IFE, SFE and
CUSTOM drivers will happen accordingly.

CRs-Fixed: 3482745
Change-Id: Iff6e79a7793b14b1f368f215020617f10dbd4bb5
Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
2023-06-26 14:00:13 -07:00
Li Sha Lim
b99cba37d3 msm: camera: uapi: Add support for composite config in CSID v980
New register IPP_IRQ_COMP_CFG0 needs information regarding active
contexts in CSID CAMIF, and TFE from userspace. This change
provides the support for it.

CRs-Fixed: 3321317
Change-Id: I9cd85a4392f4f5602c3865526acc3bc13cbf8472
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2023-06-16 13:28:00 -07:00
Gaurav Jindal
ebfc6ff874 msm: camera: isp: Add UAPI to get RCS flag
Few ports with UBWC needs RCS enablement. This commit adds
hint from userland to indicate if RCS can be enabled. This
information is passed as a part of acquire.

CRs-Fixed: 3321317
Change-Id: Ic7375de0091ab3aebec70cc521be85585362555d
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2023-06-16 13:28:00 -07:00
Karthik Dillibabu
f1adead069 msm: camera: core: validation of session/device/link handle
This change is to validate session, device and link handle.
Also, checks whether the device handle belongs to
correct session handle or not.

CRs-Fixed: 3496553
Change-Id: I6b86bf7d0908a280e90e085a3b3e1727facdf8c6
Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
2023-05-25 22:06:10 -07:00
Li Sha Lim
e824226a1f msm: camera: uapi: Add new WM output formats
For v980, new formats are added. This change also
fixes mismatch of plain16_10_lsb format between
kmd and userspace.

CRs-Fixed: 3321317
Change-Id: I1d951d3e55b37b11ebe6dad67bea220d47998d59
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2023-05-20 10:06:22 -07:00
Stark Lin
c23a3f448c msm: camera: isp: Add support for HWPD debugging
HWPD is associated with several modules, but only image size violation
displayed in the kernel when an error occur. Now we will pass the error
code of HWPD violation to UMD to help UMD to take necessary action and
dump relevant info.

CRs-Fixed: 3440015
Change-Id: I6483b228a8eeaac3bf54f5f83f8f8deab3da6250
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
2023-05-20 10:06:07 -07:00
Wang Kan
5bf8e19f67 msm: camera: uapi: Add a flag for different channel settings
Add a flag for different channel settings
including short and standard channel.

CRs-Fixed: 3440178
Change-Id: I3f9ea83483a1706e660a8c5ddf225f5d9eb3abcb
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
2023-05-12 19:06:34 -07:00
Karthik Anantha Ram
9bf7e70f2d msm: camera: icp: Add support for synx testing
Add support to receive synx test cmds, and forward it to ICP FW.
Synx on ICP will process that cmd, and send a response. This
response is returned to the caller. The objective of this
infrastructure is to allow synx test app to validate synx
functionality on ICP without running any actual use-case.

CRs-Fixed: 3448052
Change-Id: I3785264f74c5c698146f4de1a82d25fe141cfc2a
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2023-05-09 21:06:32 -07:00
Rishab Garg
3be797a964 msm: camera: sensor: Add dynamic Switch support in TPG
- Add support for Dynamic mode switch.
- Request store and apply from waiting queue.
- Add support for reapply request from active queue.
- Handling TPG interrupt.

CRs-Fixed: 3403974
Change-Id: I5dfe146b30631a94059f72d482610e04ba8e4e2c
Signed-off-by: Rishab Garg <quic_rishabg@quicinc.com>
2023-04-27 18:06:15 -07:00
Gaurav Jindal
1f8ebc0f6b msm: camera: isp: Add support for V2 Out Configs
This commit adds support for the new fields need to be passed by
Userland. To support new fields, new version for out port config
structure is added.
During acquire, hint from user space is used to use packing
at Write master side.

CRs-Fixed: 3321317
Change-Id: Ide2640b96d8c3b2cd2cce77aa0279a69499f20c8
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
2023-04-06 17:36:09 -07:00
Depeng Shao
305683fb02 msm: camera: sensor: Configuring sensor pd to 1 for hfr usecase
Configuring sensor pd to 1 for hfr usecase, then the setting
of sensor can reflect on next batch.

CRs-Fixed: 3376953
Change-Id: I4a78e087aec0e46f78f40ae8c37f1086125558de
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2023-02-07 11:36:08 -08:00
Sokchetra Eung
fbe7efd896 msm: camera: uapi: Add OFE AXI Paths
Add OFE AXI paths UAPI to support OFE AXI BW voting in Kernel.

CRs-Fixed: 3361880
Change-Id: I45bb5177bbb68823e57824af3f464610a6db9029
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
2023-01-24 18:06:43 -08:00
Karthik Anantha Ram
cac38ca1aa msm: camera: uapi: Add support for ICP query cap v2
The change updates new query cap v2 structure for ICP
to relay new HW related info to userland. The new query
cap structure provides detailed info on the HW cores being
supported and handled for each instance of the ICP driver.
The change also adds provision to obtain hw fence info as part
of query caps.

CRs-Fixed: 3374291
Change-Id: Iebd80bd87a495887b09296a09bea36c3690b9f92
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2023-01-20 15:06:19 -08:00
Shivi Mangal
953b2ced40 msm: camera: sensor: Add register settings in TPG
This change allows the tpg hw register configurations to be directly
programmed from the tpg xml file. The regsettings array can be configured
with the right configurations for the required mode, if regsettings are
not provided in regsettings array. The settings are derived from the
stream configurations and global configurations.

CRs-Fixed: 3289930.

Change-Id: If44678475986efc0f26c334f5db4f9c59cd6873b
Signed-off-by: Shivi Mangal <quic_smangal@quicinc.com>
2023-01-13 15:36:05 -08:00
Yulei Yao
84c92a55f5 msm: camera: sensor: BIG endian write for QTime
DW9784 needs Big endian type when QTime is written
into registers.

CRs-Fixed: 3359195
External Impact: No.

Change-Id: I6c141de255dbedb933ca5529f5ce4562d93a7c3a
Signed-off-by: Yulei Yao <quic_yuleiy@quicinc.com>
2023-01-04 16:36:11 -08:00
Ashish Bhimanpalliwar
fb89fa6125 msm: camera: isp: Add new outports for Spectra v980
Add new outports for Spectra v980.

CRs-Fixed: 3321317
Change-Id: I8303a04b5d15216744e017359f4a814c19d1a139
Signed-off-by: Ashish Bhimanpalliwar <quic_abhiman@quicinc.com>
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
2023-01-04 16:36:04 -08:00
Sokchetra Eung
92e98c0713 msm: camera: icp: UAPI update for v980
Add OFE stream type(rt/nrt/semi-rt) to be used for hw acquire,
add ofe setting/update opcode for preparing hw update, add
ICP/OFE dev type for query cap v2 usage, and a new macro
to define the max number of device types supported by ICP instance.

Remove usages of deprecated max macros - CAM_ICP_RES_TYPE_MAX
and CAM_ICP_DEV_TYPE_MAX in the driver.

CRs-Fixed: 3336554
Change-Id: Icf27958571f6e31896539d0cd692e0e7a67c5cd8
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
2022-12-19 17:06:24 -08:00
Gaurav Jindal
95c24d7806 msm: camera: isp: UAPI changes for Spectra v980
UAPI Changes for Spectra v980.

CRs-Fixed: 3321317
Change-Id: I93c5436db5e6e955759aac8e151472f24c051944
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
2022-12-12 18:36:06 -08:00
Depeng Shao
4d1434445f msm: camera: sensor: Add bubble update packet support
This change adds bubble update packet support, when the
sensor mode or feature mask of bubble req is different
with last applied, we can use bubble update packet to
recovery the sensor mode and feature, then the bubble
req can get frame from correct sensor mode and feature.

CRs-Fixed: 3317352
Change-Id: Ia80b578044e74cc5062f9f6c12c5ae8edd2049ac
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-12-08 18:06:08 -08:00
Yulei Yao
8202146af3 msm: camera: sensor: Infrastructure to support OIS FW download V2
Add 16 bit data read/write. Add new FW information
cmd parser. Add new FW download v2. Force CCI burst/
sequential write to be queued into Q0.

CRs-Fixed: 3322287
External Impact: No.

Change-Id: I8a1ea42b01a3748f466a9bc6083a799b939e6d02
Signed-off-by: Yulei Yao <quic_yuleiy@quicinc.com>
2022-11-29 17:36:22 -08:00
Abhijit Trivedi
7f3c540b78 Catch up diff
Change-Id: Ie11e070d33e9dc83e96f7ae783fcc2e5e0273a40
Signed-off-by: Abhijit Trivedi <quic_abhijitt@quicinc.com>
2022-11-16 14:14:20 -08:00
Petar Nedev
a9b45021cc msm: camera: uapi: Add support for using synx objects
This change adds synx object support for all fence ops.

CRs-Fixed: 3317280
Change-Id: Id370a9fdb3155378c61a84dde2fa849a993ec6a2
Signed-off-by: Petar Nedev <quic_pnedev@quicinc.com>
2022-10-27 17:06:24 -07:00
Rishab Garg
9cbc7cd024 msm: camera: sensor: Add changes for XCFA in TPG
Add generic changes to support RGBIR, 3x3 and 4x4
XCFA from TPG XML.

CRs-Fixed: 3175994
External Impact: No
Change-Id: I129e20eb5db2bf2f168202f4854de62926eb613b
Signed-off-by: Rishab Garg <quic_rishabg@quicinc.com>
2022-10-27 17:06:07 -07:00
Suraj Dongre
a97e0b887a msm: camera: common: Remove shell commands from android makefiles
Remove direct shell commands from Android makefiles to better make use
of android function definitions.
Also changes mmrm dependency to be based on whether or not the driver
is detected in the build before setting it as a dependency.

CRs-Fixed: 3298147
Change-Id: I0d5f2c9eb34ac635604c515638c9f00e29ae0b2a
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
2022-09-29 15:06:25 -07:00
Li Sha Lim
5cc52ef416 msm: camera: uapi: Add UAPI for new sensor cmd buffers
Adding generic blob type of cmd buffers to support
receiving debugging information from userspace.
This generic blob type can be extended to receive
additional debugging information in the future.

This change starts with support for sensor resolution
info setting changes.

CRs-Fixed: 3256097
Change-Id: I1c1416cedf238402338e0d236d18e3c4a4efcb13
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2022-08-10 01:36:19 -07:00
Pavan Kumar Chilamkurthi
dce48d5ae2 msm: camera: memmgr: Add support to allocate from ubwcp heap
Add memmgr interface and support to allocate buffers from
ubwcp heap.

CRs-Fixed: 3197463
Change-Id: Ic3368e5ff81710dba795c9625f9a461833f915e3
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
2022-06-16 16:48:25 -07:00
Pavan Kumar Chilamkurthi
5af17aad2a msm: camera: memmgr: Add interface to support cpu access operation
Add ioctl interfaces to support dma begin and end cpu access
operations for camera buffers.

CRs-Fixed: 3197463
Change-Id: Ibeb31e8f425489abfdd47df6f92271ac40ace407
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
2022-06-16 16:48:25 -07:00
Chandan Kumar Jha
eddb106bb8 msm: camera: isp: Add UAPI changes to support NFI based Switching
Add UAPI changes to support NFI based dynamic Switching.

CRs-Fixed: 3168727
Change-Id: I3246c9496bea778cac11352d9c90672ce763a59b
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
2022-06-16 16:44:25 -07:00
Mukund Madhusudan Atre
9dcca711f8 msm: camera: uapi: Add interface for DRV config
Add interface to configure DRV settings and vote levels.

CRs-Fixed: 3065551
Change-Id: I07ff6f25bffcfb11671436d64f917fc49cb73cc2
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
2022-06-08 13:07:25 -07:00
Fengjie Chen
cf223fa7b3 msm: camera: memmgr: Set name for dma buffer to help profiling
For dma buffer profiling,we don't konw the owner of one dma
buffer. So we add it's name to show it's owner.
If you use v1 struct to alloc/map dma buffer it will use
default buffer name "UNKNOWN". For v2 struct you can set dma
buffer name at UMD side.

CRs-Fixed: 3131442
Change-Id: I24ce6aa1d97cd9fc26d9bd8796ab2367607008f6
Signed-off-by: Fengjie Chen <quic_fengjiec@quicinc.com>
2022-06-08 13:06:24 -07:00
Karthik Anantha Ram
d3d9f214b6 msm: camera: uapi: Add UAPI for new CPHY cmd buffers
Add new cmd buffer types to support CDR sweep
and auxiliary settings update.

CRs-Fixed: 3186732
Change-Id: I46924d188521617d6b179cf6f89311d9f4179bf2
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-06-01 18:40:49 -07:00
Karthik Anantha Ram
6f3469956d msm: camera: uapi: Add support for using dma fences
The change adds infrastructure to perform different operations
such as create/import/release etc. on different types of
fences [sync/dma/synx]. The change also adds provision to
process fences in a batch.

CRs-Fixed: 3179072
Change-Id: Icbddb0ac8cd879f81ff58accdae6d51c35a316b7
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-05-09 20:06:12 -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
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
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