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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>