Commit Graph
735 Commits
Author SHA1 Message Date
huaqin78 b56aeec82b Rhode: add flash current ma control
details:
add flash current ma control

Change-Id: Ic3c89657ac568cf56fc2f402c90211fb433b6212
Signed-off-by: huaqin78 <huaqin78@motorola.com>
Reviewed-on: https://gerrit.mot.com/2142100
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <huaqin90@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
huaqin78 39aa228086 Rhode: flash bring up(2/3)
details:
flash bring up

Change-Id: I374e8666a6e5c4dba6e3aae64b210d37d0535070
Signed-off-by: huaqin78 <huaqin78@motorola.com>
Reviewed-on: https://gerrit.mot.com/2137257
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
2023-05-31 16:59:32 -03:00
qiaopf1 4a736e098f Rhode4G: main eeprom bring up(3/3)
details:
modify the default load eeprom limit size

Change-Id: Idba0e3d9fb512ff085c95eac5f48b585c109c10b
Signed-off-by: qiaopf1 <qiaopf1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2125684
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Xingyun Fu <fuxy7@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
huangdra 1a779204ec Caprip: add wakelock for the actuator noise reduction.
Sometimes system will suspend during the delaywork.
so add wakelock to ensure system is awake.

Change-Id: I7e4db27bf2cebb96faee219ba161b10fdc14ccc9
Signed-off-by: huangdra <huangdra@motorola.com>
Reviewed-on: https://gerrit.mot.com/1984717
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
huangdra e8e1335e7c cam: Add actuator standalone diver for vibrator.
To eliminate the resonance noise during system vibrator vibrating, set actuator to
DAC 154 position, then the resonance noise can be obviously improved. To achieve
the combination between vibrator and camera AF actuator,we implement:
- Actuator separately control during camera power off.
- Actuator policy to avoid vibrating disturb normal camera AF.

Change-Id: Ibf4aa73266b44e9f92275b5e9d1fb8dfd5d44f78
Signed-off-by: huangdra <huangdra@motorola.com>
Reviewed-on: https://gerrit.mot.com/1835501
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
zhouguangcheng 74e72cf3bd guamna:[camera] Fix capture failed when set exposure time 1s
Modify CAM_REQ_MGR_WATCHDOG_TIMEOUT 1000 to 5000.
Because the timeout for SOF Freeze wasn't reset after every frame received.

Change-Id: I5d29b25f8beb9eac4c41e767189c060997638c75
Signed-off-by: zhouguangcheng <zhouguangcheng@longcheer.com>
Reviewed-on: https://gerrit.mot.com/1729372
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
wangdw10 fb1fdb2d12 msm: camera: req_mgr: Decrease device handles in hdl_tbl
Decreasing device handles to 64 in handle table.
This change will decrease provider memory 12M at idle status
check by: dumpsys meminfo | grep -iE "camera"
before: 31,801K: android.hardware.camera.provider@2.4-service_64 (pid 929)
after: 19,022K: android.hardware.camera.provider@2.4-service_64 (pid 930)

CRs-Fixed: 04658611
MOt-CRs-fixed: (CR)

Change-Id: I9cda4b3472e9bb215c33f358bc6f07063308b75b
Signed-off-by: wangdw10 <wangdw10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1630674
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zilong Zhang <zhangzl7@lenovo.com>
Reviewed-by: Shanghui Zhang <zhangsh@motorola.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
zhouguangcheng 5e83112dad guamna: Add eeprom operation READ_LOOP
1. add eeprom operation READ_LOOP for hi556
2. remove eeprom name

Change-Id: I65cc19d8956c5bbeb9a0db4f9051d7a8e4b21c51
Signed-off-by: zhouguangcheng <zhouguangcheng@longcheer.com>
Reviewed-on: https://gerrit.mot.com/1621339
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
zhouguangcheng c26e6021fd guamna: add eeprom name and add hi556 otp read method
1. add eeprom name
2. add hi556 otp read method

Change-Id: I371baf40b5a7b77788e5bbe98b37e7cb82085639
Signed-off-by: zhouguangcheng <zhouguangcheng@longcheer.com>
Reviewed-on: https://gerrit.mot.com/1599774
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
liuwang2 5ca247a819 guam: EXPORT_SYMBOL cam_cci_get_subdev
[detail]
EXPORT_SYMBOL cam_cci_get_subdev.

Change-Id: Iab1324904207e4fb7d16f792695e40014d4cab2e
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1515796
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-05-31 16:59:32 -03:00
Linux Build Service Account 3187db7c6b Merge e687fa9aa3 on remote branch
Change-Id: I43538b267ac62293659186dd95b7bce14682621a
2023-05-08 06:30:58 -07:00
Shivakumar Malke e687fa9aa3 msm: camera: smmu: Use get_file to increase ref count
Due to race condition, fd pointing to a particular dma buf
is released by userspace  before incrementing ref count and
hence freed that dma buf. When the call returns it still uses
the freed dma buf causing use-after-free.

This fix includes get_file API to increment ref count
before dma_buf_fd.

CRs-Fixed: 3341070
Change-Id: I8ebc37b4ceb5f8691bbbb3d26b8b64878d832fbe
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
2023-03-28 09:48:15 -07:00
Linux Build Service Account 2a49492f4f Merge c487910c62 on remote branch
Change-Id: I6a8bee55b4deb2034a46ed63d703a05120884b76
2022-05-16 05:45:30 -07:00
Shravan Nevatia c487910c62 msm: camera: eeprom: Add OOB read check for eeprom memory map
Add check to prevent OOB read of eeprom memory map.

Change-Id: Ifeeeffdc2a50536edbde5b5d755a052ace86d596
CRs-Fixed: 3003049
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
2022-04-13 21:46:30 +05:30
Tejas Prajapati 04627d7bfc msm: camera: memmgr: Update copyright fix
CRs-Fixed: 3161837
Change-Id: Ibf7a6fc9f3ed7b75cad90d88444078621944fbad
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-04-08 07:14:10 -07:00
Sridhar Gujje d9fc57eaf8 msm: camera: reqmgr: Validate the link handle
Instead of correct link handle, if some other handle like
dev handle is passed then it may access some other data space.
To avoid such scenario, need to check whether link handle
passed by ioctl is same as retrieved link handle.

CRs-Fixed: 3120454
Change-Id: Idff2e3c25b60563788ffb426c7cabc367c3c97f8
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
Signed-off-by: Sridhar Gujje <quic_sgujje@quicinc.com>
2022-04-06 22:58:05 -07:00
Linux Build Service Account caa64ad246 Merge 06c05d9f2b on remote branch
Change-Id: I994868e183364079d665f6993193ccd78081d57c
2022-04-06 05:32:03 -07:00
Tejas Prajapati d4d1e1402e msm: camera: memmgr: Update copyright fix
CRs-Fixed: 3161837
Change-Id: Ibf7a6fc9f3ed7b75cad90d88444078621944fbad
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-03-30 10:38:26 -07:00
Camera Software Integration 06c05d9f2b Merge "msm: camera: reqmgr: Avoid freeing subdev twice" into camera-kernel.lnx.3.1 2022-03-27 10:53:00 -07:00
Nirmal Abraham a04138c832 msm: camera: reqmgr: Avoid freeing subdev twice
The 'l_device' pointer in __cam_req_mgr_destroy_subdev is
set to NULL after freeing but this is done on a
local copy of the variable in stack. This results in
double-free when this function is called again. To avoid
this, pass 'l_device' pointer by reference and assign it
to NULL after freeing.

CRs-Fixed: 3120468
Change-Id: If2dde6f1c702bee26a3c8a68c2f45bafbf0f7cd6
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
2022-03-24 16:52:34 +05:30
Linux Build Service Account 6eb4b6a37e Merge 66de6dd5e0 on remote branch
Change-Id: I7e87521b36aa10ea6ead43ab26a7a0b01be8ab20
2022-03-08 23:08:20 -08:00
Tejas Prajapati e561ca2a21 msm: camera: memmgr: update correct length in bufq
In a corner case race condition to free the original
ion buf allocated and new ion buffer with same fd but
different size after freeing the origianl ion buf might
result into mismatches in the real ion buf size assigned
in bufq. To avoid this update length in bufq with
local variable.

CRs-Fixed: 3142221
Change-Id: I8241544dba7609662d01f8d765e8d171b8288baa
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-03-07 17:26:08 +05:30
Tejas Prajapati 66de6dd5e0 msm: camera: reqmgr: check if link handle is correctly passed
Instead of the link handle if the dev handle is
passed for dumping the request information, this
can lead to accessing invalid data structure.
To avodi accessing invalid data structure based on
the dev handle, first check if the link handle passed
in IOCTL is matchting with looked up link handle.

CRs-Fixed: 3097336
Change-Id: I815457ff96e3b26fe9fa886bd984d53d209e4edb
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-02-09 09:07:33 -08:00
Nirmal Abraham 5c1776ce70 msm: camera: update copyright markings
Update QUIC copyright for new code changes.

CRs-Fixed: 3118778
Change-Id: I9e3631cc86c5e10e4e2020d4a9b2264ea282d437
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
2022-02-07 01:26:14 -08:00
Linux Build Service Account a459402940 Merge 848cd3a923 on remote branch
Change-Id: I8d65f625b5e3c16cc42c5e131342d9430bb4ddc7
2022-02-02 09:59:06 -08:00
Nirmal Abraham 3cce45b5d0 msm: camera: update copyright markings
Update QUIC copyright for new code changes.

CRs-Fixed: 3118778
Change-Id: I9e3631cc86c5e10e4e2020d4a9b2264ea282d437
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
2022-01-28 16:55:35 +05:30
Camera Software Integration 848cd3a923 Merge "msm: camera: ope: Update request timeout for NRT/RT context" into camera-kernel.lnx.3.1 2022-01-19 05:25:31 -08:00
Vikram Sharma c4a3b49efc msm: camera: ope: Increase max bl limit and max stripe to process
Increase “OPE_MAX_CDM_BLS” to 32 from 24 and MAX_STRIPES to 64 from 48
to process 108M frame.

CRs-Fixed: 3082993
Change-Id: I9e3631cc86c5e10e4e2020d4a9b2264ea282e437
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
2022-01-18 10:53:31 +05:30
Alok Chauhan 497a10ac98 msm: camera: ope: Update request timeout for NRT/RT context
Currently the ope request timeout value for RT and NRT context
are same. In some usecases, NRT request processing takes more time.

Hence, initialize the RT and NRT request timeout value separately.

CRs-Fixed: 3082993
Change-Id: I17e86d26403fb21cdff518a81dee7a19c865144e
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
2022-01-17 18:14:31 +05:30
Camera Software Integration be62dc00cf Merge "msm: camera: ope: Fix false hw hang detection" into camera-kernel.lnx.3.1 2022-01-17 02:26:30 -08:00
Camera Software Integration 0f060dd784 Merge "msm: camera: cdm: handle deadlock scenario" into camera-kernel.lnx.3.1 2022-01-17 02:26:18 -08:00
Shravya Samala 2c5dafdb13 msm: camera: ope: Fix false hw hang detection
While preparing config packet at HW layer,
we are setting Ope request timer even before
processing command buffer and IO cfg. This is
leading to false hw hang detection.
Expectation is Ope request timer has to
start after req is submitted to HW.

CRs-Fixed: 2788900
Change-Id: Idd1420b2ee1aed4bfe947cf5617bbec9b39147d3
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
2022-01-11 17:00:14 +05:30
Vikram Sharma 375e055dd6 msm: camera: cdm: handle deadlock scenario
This change handles a race condition in which cdm workqueue is
scheduled on one of the cores and cdm flush is executing on
another core. We come across a dead lock between fifo_lock and
hw_mutex lock.

CRs-Fixed: 3106935
Change-Id: Ie0b8982a7e55218fc5655f8e3d08a952fd852ed7
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
2022-01-11 13:57:02 +05:30
Tejas Prajapati b2e5336673 msm: camera: reqmgr: reader writer locks to avoid memory faults
Shared memory is initialized by CRM and used by
other drivers; with CRM not active other drivers
would fail to access the shared memory if
memory manager is deinit. Reader Writer locks can
prevent the open/close/ioctl calls from other drivers
if CRM open/close is already being processed.

Issue observed with the below sequence if drivers
are opened from UMD directly without this change.
CRM Open successful,ICP open successful,
CRM close in progress, ICP open successful,
mem mgr deinit and CRM close successful,
ICP tries to access HFI memory and result in crash.

This change helps to serialze the calls and prevents
issue.

CRs-Fixed: 3019488
Change-Id: Ifdf198c2e3593050573c66aeba69d50d131435b9
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-01-07 17:26:05 +05:30
Linux Build Service Account da95630f34 Merge be866e11e5 on remote branch
Change-Id: I97b697d4936c63b7f55deb28eee11b5ef53037f7
2021-11-29 22:13:40 -08:00
Camera Software Integration be866e11e5 Merge "msm: camera: csiphy: Update PHY setting in 1+1 combo mode" into camera-kernel.lnx.3.1 2021-11-19 03:08:05 -08:00
Linux Build Service Account ce09f734cf Merge b3d7a7703a on remote branch
Change-Id: Ifb31dd511078a0bc9973acd5a7415604186a4610
2021-11-16 22:25:45 -08:00
Camera Software Integration b3d7a7703a Merge "msm: camera: isp: Fix PPI index based on the phy selection" into camera-kernel.lnx.3.1 2021-11-09 03:43:49 -08:00
Camera Software Integration be53bed3f3 Merge "msm: camera: flash: Add support for i2c flash" into camera-kernel.lnx.3.1 2021-11-09 03:43:30 -08:00
shiwgupt a27df09f66 msm: camera: csiphy: Update PHY setting in 1+1 combo mode
Enable FORCE_TERM_EN for LN6 in 1+1 combo mode.

CRs-Fixed: 3071453
Change-Id: I301942c7cecaca175b1d9d3c31bf203bfc683359
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2021-11-09 12:50:47 +05:30
Vikram Sharma 57bf85b69d msm: camera: isp: Fix PPI index based on the phy selection
1) There is one to one mapping for ppi index with phy index
but phy select is not always equal to phy number,for some
targets "phy_sel = phy_idx + 1", and for some targets it is
"phy_sel = phy_idx", ppi_index should be updated accordingly.
2) Updated to configure ppi cfg register as.
 for cphy, disable dphy in config register.
 for dphy, do nothing (both cphy and dphy will be selected).
 then enable all lanes.

CRs-Fixed: 3057665
Change-Id: I1d5d66034a5563b5adcb8163acf9a668d10d4a19
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-11-07 21:31:02 -08:00
Linux Build Service Account c8f09d3b08 Merge d6feb1486e on remote branch
Change-Id: Icf0886318a73b74e4e97417ea79d3ac2bde94949
2021-11-01 01:01:54 -07:00
Vikram Sharma 2a84188877 msm: camera: isp: Fix PPI index based on the phy selection
1) There is one to one mapping for ppi index with phy index
but phy select is not always equal to phy number,for some
targets "phy_sel = phy_idx + 1", and for some targets it is
"phy_sel = phy_idx", ppi_index should be updated accordingly.
2) Updated to configure ppi cfg register as.
 for cphy, disable dphy in config register.
 for dphy, do nothing (both cphy and dphy will be selected).
 then enable all lanes.

CRs-Fixed: 3057665
Change-Id: I1d5d66034a5563b5adcb8163acf9a668d10d4a19
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-10-29 03:02:44 -07:00
Camera Software Integration d6feb1486e Merge "msm: camera: csiphy: Update Phy header file for 1.2.1" into camera-kernel.lnx.3.1 2021-10-29 02:52:37 -07:00
Vishal Verma f04fe7dfcf msm: camera: flash: Add support for i2c flash
Add Support for qup i2c based flash. Update i2c driver
probe function and added  init for gpio pin control
table. Since positive return values are not errors for
qup i2c rx and tx data transfer, fix the return type
for the APIs. Added check for null pointer in get flash
dt data for device node.

CRs-Fixed: 3056236
Change-Id: If33086c80bd7d5c1403aedf1a2c01867d6c56687
Signed-off-by: Vishal Verma <vishverm@codeaurora.org>
2021-10-28 17:49:11 +05:30
shiwgupt 538f7283f9 msm: camera: csiphy: Update Phy header file for 1.2.1
Update the cphy register settings in 1.2.1 phy header
file.

CRs-fixed: 3063363
Change-Id: I9a78ccdb6a91305c8b6d5fb014c9f0fe9c622f84
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2021-10-27 09:10:59 +05:30
Linux Build Service Account 0086bb941f Merge 9144efff1b on remote branch
Change-Id: I1e7d0903643321d701578d66ad7b7510a20f4b7e
2021-10-17 03:58:04 -07:00
Shravya Samala cf4b525b4a msm: camera: jpeg: Ensure in/out map entries are within allowed range
Added checks to make sure in_map /out_map entries of packet
io configs are within expected maximum value.

CRs-Fixed: 3007258
Change-Id: I7e5a652cd8f9ae104a10a2af551fe49930849b2d
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2021-10-05 03:42:09 -07:00
Linux Build Service Account 37a0c2d4c2 Merge 39dd48f638 on remote branch
Change-Id: Icc79a08bc616a396fe1b34d42e1d5c8d9b2650cb
2021-09-30 10:53:06 -07:00
sokchetra eung 9144efff1b msm: camera: req_mgr: Table info dump removed
Remove dump_tbl_info function and all of its
invocations in CRM to prevent dumping all the
handle info when holding the spin lock.

CRs-Fixed: 3014074, 3014073
Change-Id: Ie98bafb489fc0d1f2d75cf0f3f08efb48d9b4062
Signed-off-by: sokchetra eung <eung@codeaurora.org>
2021-09-30 15:21:35 +05:30