Graf commitů

33 Commity

Autor SHA1 Zpráva Datum
Vijay Kumar Tumati
262502722c 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: Ie8f54d07767b1c12b36f381c0f951b15953d9e7c
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
(cherry picked from commit 8f51e330a824ec89b32d60ae501ac3edaba7ed2c)
2023-09-21 12:05:11 -07:00
Vijay Kumar Tumati
db988fcff4 msm: camera: csiphy: Refine MINK API usage for secure camera
Use MINK API for all the targets that support domain ID and
use legacy API for all other targets. In addition, use a
target based macro to not compile the MINK API for the
older targets where those APIs are not defined.

Change-Id: I0d8f05df6ca8126db1e3ad8456fe78aa77a33ebf
CRs-Fixed: 3529425
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
2023-07-07 16:06:10 -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
Vijay Kumar Tumati
16be1306ef msm: camera: csiphy: Handle process shutdown during secure camera
Use SCM 7 call during the process shutdown. This is to
workaround a race condition between the close of camera FD
and the invoke driver FD that leads to a device crash.
Additionally, keep the Domain ID clocks on only during
protect or unprotect operations.

CRs-Fixed: 3509086
Change-Id: Ic091aa737df10bb2b41190c2f850c31fd17af9b2
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
2023-05-31 17:06:31 -07:00
Vijay Kumar Tumati
6dc4887fd9 msm: camera: smmu: Add support for Camera Security Framework 2.5
Query the CSF version in use from SMMU proxy driver and
use noncontiguous system heap in case of  CSF 2.5
instead of the contiguous secure display heap.
In addition, do not lend the buffer in CSF 2.5.

CRs-Fixed: 3424427
Change-Id: I3d5f2402034dd455c304d5726eb9aa8ee2080dcc
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
2023-04-04 17:06:19 -07:00
Vijay Kumar Tumati
059b3006ac msm: camera: isp: Move IFE FD out port to non-secure
Currently, the IFE FD port is configured to be secure by TZ and the
camera software allocates secure buffers to be consumed by EFA FD
module. However, as we are moving to the software based DLFD, this
port needs to be configured as non secure by TZ and camera should
treat so and allocate non secure buffers.

CRs-Fixed: 3443139
Change-Id: I2fcc89d4d61bd944969bfe854584960c10648f6c
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
2023-03-29 20:36:08 -07:00
Vijay Kumar Tumati
bae0381f76 msm: camera: csiphy: Fix misc seccam integration issues
The current secure camera implementation suffers with a few
issues in terms of typecasting, error handling and in
populating the information in the right data structures when
the new SCM API is used on the targets without domain ID support.
In addition, we needed to be explicit in failing to acquire
if dual IFE is required in secure camera use cases as it is
not a supported feature as of now.

CRs-Fixed: 3317248
Change-Id: Idb762158b0ff0e0a0d6d51de4770fc3d9d9072c8
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
2023-02-01 20:06:12 -08:00
Li Sha Lim
d0db8bb415 msm: camera: csiphy: Integrate mink call for secure camera
Adds support for new mink call to configure secure
camera sessions. This new mink call takes in additional
parameters to support the new domain-id based
security scheme. The additional parameters are in the
form of csid_hw_idx_mask, cdm_hw_idx_mask and
vc_mask. These are in addition to the existing PHY idx
and CPHY/DPHY lanes info.
The introduction of this new mink call deprecates the
existing SCM call used to service secure camera sessions.
What this means is that on all subsequent versions of this
driver, all secure camera sessions will be serviced by this
mink call, which is able to accommodate older and newer targets,
and their programming of different register sets.
This design enables the cam_csiphy_notify_secure_mode
wrapper to remain the same, with the underlying mink call
made in the cam_compat layer, depending on camera driver
version.

CRs-Fixed: 3317248
Change-Id: I05511f4380ce5467b104675c07c9c8faa5318af8
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2023-01-30 15:06:09 -08:00
Li Sha Lim
aabbfaffeb Revert "msm: camera: csiphy: Integrate mink call for secure camera"
External dependency has been reverted, change not ready.
This reverts commit b76d66be06cb035886ddebbf7671e02c93fdd1af.

CRs-Fixed: 3317248
Change-Id: If82504f1eb22b1c908d08d256f3b4c4cbad60bc9
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2022-12-28 10:39:24 +05:30
Soumen Ghosh
57ba3a5181 msm: camera: sensor: i2c driver remove call return value change
Due to i2c driver remove call return value changed from int to void
from 6.1 kernel version.

CRs-Fixed: 3366233
Change-Id: I81713fdd65a53af37b0b9c573407587755bc1bae
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
2022-12-21 17:24:09 -08:00
Li Sha Lim
f2360705b1 msm: camera: csiphy: Integrate mink call for secure camera
Adds support for new mink call to configure secure
camera sessions. This new mink call takes in additional
parameters to support the new domain-id based
security scheme. The additional parameters are in the
form of csid_hw_idx_mask, cdm_hw_idx_mask and
vc_mask. These are in addition to the existing PHY idx
and CPHY/DPHY lanes info.

The introduction of this new mink call deprecates the
existing SCM call used to service secure camera sessions.
What this means is that on all subsequent versions of this
driver, all secure camera sessions will be serviced by this
mink call, which is able to accommodate older and newer targets,
and their programming of different register sets.

This design enables the cam_csiphy_notify_secure_mode
wrapper to remain the same, with the underlying mink call
made in the cam_compat layer, depending on camera driver
version.

CRs-Fixed: 3317248
Change-Id: I575f4b85097c81f047f398216d0190b249e6b200
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2022-12-16 18:07:20 -08:00
zhuo
ab10a69b93 msm: camera: common: Change get irq resources method
Get irq resources method changed between kernel verion
5.15 and 5.18.

CRs-Fixed: 3258913
Change-Id: Ica0ed0feac55e99f6f88b0b6e56540fb98ed0311
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
2022-09-19 18:36:36 -07:00
zhuo
3e05e54587 msm: camera: common: Change spi driver remove function signature
Spi driver remove function signature changed between kernel version
5.15 and 5.18.

CRs-Fixed: 3245727
Change-Id: I0352e8b9b5f5990a89b082df9f9ca4000bcd5da0
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
2022-09-19 18:36:29 -07:00
zhuo
345cf9f62c msm: camera: common: Import dma-buf heap name space
Due to dma-buf symbols into the dma_buf module namespace,
when use them, need to import dma-buf name space.

CRs-Fixed: 3245719
Change-Id: I57bb808c675105bf567f7a628fb88c3259512721
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
2022-09-15 16:36:14 -07:00
Mukund Madhusudan Atre
65878f05bb msm: camera: common: Add support for DRV config
Add DRV config blob handling for programming required
registers per request. Also, add debugfs entry for
disabling DRV feature from ife hw manager. Update
existing BW voting logs to reflect DRV vote level info.
Add support for communicating with rsc device upon update
in MNOC BW. Also, update BW voting logic in cpas to accommodate
DRV voting to interconnect framework.

CRs-Fixed: 3065551
Change-Id: I8ac4820b7af824f5ff46614ae6804001deca9b01
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
2022-06-09 12:07:29 -07:00
Jigar Agrawal
57c67da8f3 msm: camera: common: Add I3C Driver support
Add I3C driver Support for eeprom, actuator
and OIS modules.

CRs-Fixed: 3204977
Change-Id: Ic96d1edc787efcf3069935fc53fc799e786a95a7
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-06-09 12:06:41 -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
Jigar Agrawal
609d228234 msm: camera: sensor: Add i3c bus support
Add i3c bus support for qup i3c based
I3C target.

CRs-Fixed: 3169593
Change-Id: I0209f799d800daf9afe7a846310a3d4f4f2ee420
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-05-17 15:36:30 -07:00
wasikhan
ba5572d0c7 msm: camera: common: Reinstate API to check memory types
Add back in check for ddr memory type to distinguish between DDR4/5
memory types.

CRs-fixed: 3136181
Change-Id: Ia152cde2786bf6e3da172d2b7046f9871d4f8e3c
Signed-off-by: Karthik Jayakumar <quic_kjayakum@quicinc.com>
Signed-off-by: Wasim Khan <quic_wasikhan@quicinc.com>
2022-02-25 14:33:38 -08:00
zhuo
cc2c7724f5 msm: camera: mem_mgr: Add dma_buf_vunmap to cam_compat
dma_buf_vunmap function signature changed between kernel version
5.10 and 5.15.

CRs-Fixed: 3088126
Change-Id: If6ef72aa7839e358bc6d7a384e628b760ecaf265
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
2021-12-09 18:40:40 +08:00
Karthik Jayakumar
6a67d57032 msm: camera: smmu: Moves custom smmu API's to cam_compat
Moves custom smmu API's to cam_compat as some of them are legacy and
will not be supported in newer kernel versions.

CRs-Fixed: 3048249
Change-Id: Ic9db5d9d295eb02e8bd2d593721b65e30d605f72
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-11-01 13:15:33 -07:00
Karthik Jayakumar
ee84a3df79 msm: camera: mem_mgr: Add dma_buf_vmap to cam_compat
dma_buf_vmap function signature changed between kernel version
5.10 and 5.15.

CRs-Fixed: 3048249
Change-Id: I4c8dc951cc383c3dc888fca1d0b1becf92f4662c
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-11-01 13:15:33 -07:00
Karthik Jayakumar
523de2982c msm: camera: req_mgr: Update list_head to const
Starting with kernel 5.14+ callbacks using list_head structs need to
be const qualified.

CRs-Fixed: 3048249
Change-Id: I80611317b5a69fee8bb0901697d8a6df1bd4aab8
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-11-01 13:15:33 -07:00
Karthik Jayakumar
ed82a7cc9c msm: camera: common: DDR type selection deprecation
Deprecates legacy api of_fdt_get_ddrtype() as new targets only have
LPDDR5 for platforms that support linux kernel 5.15 and newer.

CRs-Fixed: 3048249
Change-Id: I8e7f3274eadc597870118956b964fb87d69549ee
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-11-01 13:15:33 -07:00
Karthik Jayakumar
4d74da7de3 msm: camera: smmu: Update header include for SMMU API's
Due to restructuring of memory API's new header files contain old
DMA_ATTR macro's.

CRs-Fixed: 2835738
Change-Id: If2b13866c41dcf7b19b47e40fc2d3801c2161816
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-03-30 16:05:37 -07:00
Haritha Chintalapati
779d4efce0 Merge "msm: camera: smmu: IOMMU fault id's API update" into camera-kernel.lnx.5.0 2021-01-25 14:48:24 -08:00
Karthik Jayakumar
bc04b3a8ef msm: camera: smmu: IOMMU fault id's API update
Need to update API's provided by memory team for retreiving fault id's when an
SMMU translation fault occurs for the new kernel version.

CRs-Fixed: 2835738
Change-Id: I061914ce01196fd1271c8a466f6a4ef8e6dce28f
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-25 12:18:36 -08:00
Karthik Jayakumar
8615106476 msm: camera: req_mgr: Update V4L2 enum names for Waipio
V4L2 driver macro VFL_TYPE_GRABBER has been renamed to VFL_TYPE_VIDEO
in linux kernel 5.8+.

CRs-Fixed: 2835738
Change-Id: Iaddec45b3532094a110e386c6462f08c36a5fd21
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Signed-off-by: Jeyaprakash Soundrapandian <jsoundra@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-22 10:22:38 -08:00
Karthik Jayakumar
2c67e897da msm: camera: common: Add cam_free_clear to cam_compat
Kernel 5.10 and up have renamed kzfree to kfree_secure. As such,
we have added a cam_free_clear function to redirect all uses of kzfree
uses to the appropriate function depending on the kernel version the
driver is built against.

CRs-Fixed: 2835738
Change-Id: I72d191c9fb0454a4dbb1392894a909e81fe07caa
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-01-15 08:55:04 -08:00
Trishansh Bhardwaj
172d34b6f7 msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
msm: camera: tfe: Fix variable initialization issues
msm: camera: isp: Dual tfe event check with proper hw idx
msm: camera: smmu: Add support for non-contiguous mermory region
msm: camera: smmu: Use iommu best match algo for camera
msm: camera: ope: Optimize allocation of IO configuration
msm: camera: ope: Fix for KW Issues
msm: camera: ope: Add support for stripe level height configuration
msm: camera: tfe: Enable the delay line clc
msm: camera: ope: Fix false alarm for OPE HW timeout
msm: camera: tfe: Support register dump per request
msm: camera: ope: Increase max number of stripes
msm: camera: ope: Change packer and unpacker format in case NV12
msm: camera: tfe: Add packet code get command for tfe
msm: camera: ope: Trigger recovery in case of violation on write bus
msm: camera: ope: Protect ope hw reset with mutex
msm: camera: ope: Add a check for valid request in cdm callback
msm: camera: ope: Remove the BW & clock vote in release context
msm: camera: ope: Reduce OPE BUS memory
msm: camera: ope: Fix return value for ope acquire
msm: camera: ope: Fix false alarm for OPE request timeout
msm: camera: ope: Avoid deadlock during recovery after HW hang
msm: camera: tfe: tfe debug enhancement
msm: camera: cdm: Fix irq_data value in case of inline irq
msm: camera: flash: Switch off flash on provider crash
msm: camera: ope: Initialize ope hw mutex structure
msm: camera: cdm: Flush all available FIFOs during reset
msm: camera: cpas: Add mandatory bw option for axi ports clocks
msm: camera: ope: Use vzalloc to allocate the write bus ctx structure
msm: camera: ope: Fix handling of init hw failure
msm: camera: tfe: Enable per frame register dump for rdi only context
msm: camera: cdm: Protect cdm core status bits with mutex
msm: camera: cdm: correct the error check in cmd submit irq
msm: camera: ope: Fix unclock access during HW reset
msm: camera: ope: Program frame level settings after idle event
msm: camera: ope: Delay releasing of resources for last context
msm: camera: isp: Increase default SOF freeze timeout
msm: camera: smmu: Add map and unmap monitor
msm: camera: isp: Add trace events across ISP
msm: camera: smmu: Profile time taken for map, unmap
msm: camera: ope: Start context timer on receiving new request
msm: camera: tfe: Reduce stack size during set axi bw
msm: camera: cdm: Check for HW state before dumping registers
msm: camera: ope: Reduce stack footprint during acquire
msm: camera: tfe: Disable clock if tfe2 is not supported
msm: camera: cdm: Avoid cdm pause incase of BL submit
msm: camera: tfe: Optimize CSID IRQ logging
msm: camera: ope: Move request id validity check outside of lock
msm: camera: tfe: Correct the tfe hw manager dump logic
msm: camera: ope: Synchronize flush and submit BLs
msm: camera: cdm: Protect cdm reset status
msm: camera: cdm: Handle cdm deinit sequence properly
msm: camera: tfe: Reduce reset timeout to 100ms
msm: camera: ope: Fix hang detection
msm: camera: ope: Make non-fatal logs as debug and info logs
msm: camera: tfe: set overflow pending bit to zero after HW reset
msm: camera: ope: Do not disable CDM during error handling
msm: camera: ope: Add support for OPE Replay
msm: camera: ope: Stop OPE in case of init failure
msm: camera: ope: Synchronize process cmd and flush request
msm: camera: cdm: Fix CDM IRQ handling
msm: camera: tfe: LDAR dump for TFE
msm: camera: ope: Fix the length check for debug buffer
msm: camera: cdm: Fix CDM reset logic
msm: camera: ope: Dump debug registers in case of HW hang
msm: camera: tfe: Support the RDI bus port for line based mode
msm: camera: cdm: Handle out of order reset done events
msm: camera: ope: Consider other contexts during timeout
msm: camera: ope: Put GenIRQ in last stripe BL
msm: camera: tfe: Process the rdi interrupts for rdi only resource
msm: camera: jpeg: Check the HW state before accessing register
msm: camera: csiphy: Update csiphy power-up sequence for lito v2
msm: camera: cdm: Secure freeing of request lists using locks
msm: camera: cpas: Add support for Scuba camnoc
msm: camera: csiphy: Clear secure phy flags on release
msm: camera: tfe: validate the tfe bw num paths
msm: camera: ope: Reorder the reset order in ope acquire
msm: camera: ope: Dump debug registers in case of reset failure
msm: camera: ope: Add logic to detect hang in CDM
msm: camera: isp: Increase max count of cfg to support more init packets
msm: camera: core: Fix cpas axi clk rate overflow.

CRs-Fixed: 2668666
Change-Id: I882ca4bd117bebc7d1c62bc82299d69d7b5c9388
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-06-03 11:48:47 +05:30
Karthik Jayakumar
75740a1ced msm: camera: common: Fix types for comparison function
Creates a function to match expectant types for platform device
comparisons during component registration.

CRs-Fixed: 2584631
Change-Id: Ib07160b8d8f1a370ba535ffdbbc6adbe391c68d5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-03-10 12:57:20 -07:00
Elliot Berman
10891f6916 msm: camera: utils: Migrate SCM calls
Migrate secure world calls to qcom scm driver.

CRs-Fixed: 2564857
Change-Id: I8eb7498e4f80ff7ac1e22b7dcd364048e5338746
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 19:53:56 -08:00
Karthik Jayakumar
50c8c09ead msm: camera: smmu: Move to ioremap APIs for using FW memory
When loading the camera FW, use the appropriate APIs
depending on the kernel version to map the FW region.

CRs-Fixed: 2564857
Change-Id: I2104b63b54bce799c8e44f36c49042de86f78c7e
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 18:13:10 -08:00