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
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
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>
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>
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>
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>
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>
Update QUIC copyright for new code changes.
CRs-Fixed: 3118778
Change-Id: I9e3631cc86c5e10e4e2020d4a9b2264ea282d437
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
Update QUIC copyright for new code changes.
CRs-Fixed: 3118778
Change-Id: I9e3631cc86c5e10e4e2020d4a9b2264ea282d437
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>