Commit Graph

26 Commits

Author SHA1 Message Date
zhuo
1eab8d1ac7 msm: camera: common: Change dma_buf_map to iosys_map
Struct dma_buf_map change between kernel version
5.15 and 5.18.

CRs-Fixed: 3245697
Change-Id: I697d87b4b97f37b411c904212f4db9c85b2cefcf
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
2022-09-19 18:36:42 -07: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
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
Abhijit Trivedi
e1dbbcb3fe m: camera: sensor: Fix the sensor code for missing symbol
Fix the sensor code failure for i3cdev_to_dev API
which is missing the symbol in the kernel allow list.
CRs-Fixed: 3200508
Change-Id: I99f1ae98e322ae4116cccb9cc7ba42fcc7b8a89a
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
Signed-off-by: Abhijit Trivedi <quic_abhijitt@quicinc.com>
2022-05-24 17:17:25 -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
Jigar Agrawal
e88df2b339 msm: camera: csiphy: Fix the version check for CP mask
To configure CP mask correct version check needs to be
used against CPAS hw version. Currently csiphy driver
is checking platform version to make the decision.
This change update this check with CPAS hw version check.

CRs-Fixed: 3048249
Change-Id: Id023f5cc0252b47c274dfed9d93e7f49a3d0ab49
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-01-27 19:36:23 -08:00
Camera Software Integration
28e4171670 Merge "msm: camera: icp: Add err logs in failure cases" into camera-kernel.lnx.6.0 2021-12-23 15:56:07 -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
Pavan Kumar Chilamkurthi
3c9ec4886b msm: camera: icp: Add err logs in failure cases
Add ERR logs if something failed in hw_open flow.

CRs-Fixed: 3048249
Change-Id: I932ff0683e5775117b82aa704c3b740f930f7016
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
2021-12-07 15:36:49 -08:00
Depeng Shao
d8d3eaa882 msm: camera: sensor: Add component support for i2c driver
Sometimes, i2c driver will be probed earlier than CRM
driver ready, then we can't register the subdev for
this i2c driver. This change adds the component support
for i2c driver.

CRs-Fixed: 3073284
Change-Id: I5ee176497a667729d964758ac0909f6902877094
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2021-11-27 07:22:51 -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
8abb54dcb1 msm: camera: cdm: Fix of_match table null entry
global-out-of-bounds issue on:
msm_cam_hw_cdm_dt_match
Due to no null-terminating struct in the array.

CRs-Fixed: 2883523
Change-Id: I36e4811f239993e1e6de158df959157217c28bfe
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-03-22 16:53:25 -07: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
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
Jigarkumar Zala
fa08068801 msm: camera: csiphy: Update logic for lane enablement
Currently lane enablement is happening as a part of lanemask
field, which is send by UMD. Lane enablement should be purely
depends on laneCnt and laneAssign attributes. Also, combo mode
sensors needs to come with combo mode flag set from the UMD.
This change updates the logic for lane enablement with respect
to laneAssign and laneCnt, and also covers all combomode selection
as per the request. This change also enables the sensors to acquire
and streamon/streamoff at anytime in session.

CRs-Fixed: 2677450
Change-Id: I4f0d3ffd7245a931c273611c9c4b7e503c038664
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-06-29 15:56:53 -07:00
Jigarkumar Zala
0bede4b524 msm: camera: util: Correct the return code
For secure mode, csiphy driver ask for secure stream. Currently
this call always return success. This change return the appropriate
result of failure/success.

CRs-Fixed: 2673418
Change-Id: Ib425ad77e6481888acefdaf843256602aa759cf3
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-05-12 17:30:41 -07:00
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