-On xpeng,rear main camera s5khm2 will have two type(SP03&SD03), we need
set correct DVDD voltage for each sensor per module pin_20 value.
-Use gpio_48 to read module pin_20
-1 means hm2SP03,DVDD is 1.1v. 0 means hm2SD03,DVDD is 1.05v.
Change-Id: I119d9c17795867c84b21ff0e8afa6b69f0579778
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1960645
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-when use quick-draw to open camera,vibrator will be trigger first,and
mot_acatuator will power on and pull lens to specify DAC position,
DAC is 900 on berlin.And then camera will take control of
actuator and init actuator,this will cause lens fall back from a
high position to a low position,it will cause a obvious hit noise.
-This change will move lens back to low position step-by-step,befor
camera take control of actuator.
-It will cause about 38ms delay,will affect focus lock performance of
opening tele camera after vibration.
Change-Id: Icded21d8a863af79abcb9e9f98559757158d75ba
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1989392
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-Sometimes system will suspend during the delaywork.
so add wakelock to ensure system is awake.
-port from 1984717
Change-Id: Ie081d6d3e6642c7d6f77b2a1f3eb9a3d82c9f69c
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1985991
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Yongqin Wan <wanyq1@motorola.com>
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Quanlin Zhu <zhuql3@motorola.com>
Submit-Approved: Jira Key
1.Reduces the number and length of launch_lens,to reduce delay of vibrating.
-Optimize delay of vibrating,but it still have about 110ms delay.
2.Do not init actuator when camera APP is holding actuator.
-Fix the wide camera image shaking issue when the phone was vibrating
Change-Id: I7ee1c1a063cb6428d36544b6958e1b2f19f518ed
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1976594
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: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Xingyun Fu <fuxy7@motorola.com>
Reviewed-by: Qiang Guo <guoq8@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-On berlin gt9772, according to KP's testing,safe DAC pose is 900, it's too
close to the edge,and may cause a small tick noise.So use launch_lens to move
lens step-by-step to reduce tick noise.
-It may cause about 180ms delay to move lens to specify location.
-This change just take effect during vibrating, don't affect normal camera.
-add some delay after camera action,to allow lens to be pulled into position
-try to init cci again when meet cci init failed on the first time.
-change log level and add some debug method to debug low probability resonance
noise issues on berlna
Change-Id: I7188a5fe2a7697af19b6830fc82a5f99195b7c44
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1954392
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-According KP's request,update DAC value to 900 for gt9772 on berlin.
-This value may cause a small hit noise when actuator power on during vibrating.
Change-Id: If366e101d0319fda77458827f400d91ad06f83cc
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1949296
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Zilong Zhang <zhangzl7@lenovo.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
-To eliminate the resonance noise during system vibrator vibrating, set actuator to
specified DAC position(480 on GT9772), then the resonance noise can be obviously improved.
To achieve the conbination between vibrator and camera AF actuator,we implemnte:
- Actuator separately control during camera power off.
- Actuator policy to avoid vibrating disturb normal camera AF.
- reinitialize when the safe_pos parameter is manually configured.
Change-Id: I8f674eb441e8382f4de77acbca27179f8302139e
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1928778
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-To eliminate the resonance noise during system vibrator vibrating, set actuator to
specified DAC position(480 on DW9714), then the resonance noise can be obviously improved.
To achieve the conbination between vibrator and camera AF actuator,we implemnte:
- Actuator separately control during camera power off.
- Actuator policy to avoid vibrating disturb normal camera AF.
port from (CR),fix berlna wide camera resonance noise issue.
-Port from (CR): cam/actuator: Add CCI access lock to avoid conflicts.
Usually actuator initial setting will execute power down reset(PD), actuator can't respond
CCI access for a while after PD. Add lock to avoid access actuator while PD operation.
-Port from (CR): cam/actuator: Create separate work queue for park lens.
Park lens may cost more than 100ms for different camera modules, create seperate
work queue for actuator to avoid park lens operation block system_wq too long.
-Port from (CR): cam/actautor: Optimizing park lens for vibrating.
Move lens to noise reduction postion after camera exited.
-Port from (CR): cam/actuator: Avoid error releasing CCI/regulator.
Avoid unbalanced aquire/release of CCI/regulator when actuator init failed.
Due to when CCI init for vibrator failed, regulators had been released.
-For new baseline sm8350,compile this standalone actuator diver into camera.ko
Change-Id: If77d10badfb4147c467ebae238f4e6af317d466f
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1906964
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Add new fields to OIS data structures, support to apply ois
preprog data, precoeff data and postcalibration data
Change-Id: Ic8546882e053c10981698bc5ef5182571e6afc0b
Signed-off-by: wangdw10 <wangdw10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1898786
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
[detail]
Read using address and data type provided in xml
CRs-Fixed: 2675042
Change-Id: Ice85f2ce4a6fa38a7de4b1bf4233449c52cd39e2
Signed-off-by: Vishal Verma <vishverm@codeaurora.org>
Reviewed-on: https://gerrit.mot.com/1761431
Submit-Approved: Jira Key
Tested-by: Jira Key
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
(cherry picked from commit cab465769a5a610d37bccb99e8fb722ab2ffe188)
Reviewed-on: https://gerrit.mot.com/1763255
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
(cherry picked from commit f1f2e1f642f7d1526d9ceb51e9947ceb98292862)
Reviewed-on: https://gerrit.mot.com/1893806
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
-Adds Active OIS packet decoding logic
-Adds logic to read Active OIS data out of the OIS chip
Change-Id: I428e912d401fd18d555df62fe4cdea1d8a3ca18d
Reviewed-on: https://gerrit.mot.com/1738888
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jian Luan <jamesluan@motorola.com>
Submit-Approved: Jira Key
-Add new fields to OIS data structures
-Add capability to program OIS more flexibly
Change-Id: I97988cc3a6d7fa2241016bd4a269618c8ff10ad0
Reviewed-on: https://gerrit.mot.com/1736525
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
In kernel 5.4, camera driver would compile to camera.ko as GKI requirements,
and cci_intf driver need to call cam_cci_get_subdev function,
so export symbol cam_cci_get_subdev to it.
Change-Id: Ic299d9135f147d703d082604d02b43d88b7eb5ef
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1679152
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@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>
This change is to validate BL command length and
addresses before submitting to CDM. Also as part
of recovery avoids moving wrong packet submit request
to pending queue.
CRs-Fixed: 3342983
Change-Id: I15f082cdd4d54ad6bf0e446115780829b3b711dd
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
In case of early bufones, signalling fence for few
ports are missed for target which do not support
last consumed address which result in a unsignalled fence
Issue is fixed by handling early bufdones and signalling
success for resource which got early bufdone.
CRs-Fixed: 3333269
Change-Id: I0a56f770806d48034bcc45d2ca68d8f9adcc8eee
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
In TFE top-half handler, TOP register status is read first and
then based on top register status, bus register status is read.
There could be a corner case where bufdone irq top-half handling
is ongoing, top status registers are read, and while reading bus
register status we might have got SOF and RUP irqs. Since RUP and
Bufdone both come from bus side, RUP bit is set during this bus
register read. Hence, RUP is handled first along with bufdone and
then SOF irq is handled. There is no handling in statemachine for
such RUP's in RDI only context statemachine. Hence leading to
bubble condition resulting in frame drop
To overcome such scenario, handling for RUP in applied substate
is introduced in RDI only statemachine.
CRs-Fixed: 3298719
Change-Id: I5cc8a0c122aa09c22da6536303f849344454c480
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
Fd is a user-accessible value, referring it multiple times
leads to TOCTOU issues. Dma_buf can be freed after the 1st
use of fd and userspace can create another dma_buf but with
same fd. In such scenario, during 2nd use of fd, we may get
a different dma_buf with different length. To avoid this, we
can use same dma_buf instead of retrieving it twice using same
fd. In this change FD is accessed only once in syscall.
CRs-Fixed: 3159446
Change-Id: I00eb6dd3d798165f5c6c0bd59feabe80a68592b1
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
there are only 8k stack in 32 bit system, this change used to make
the temp variables be contorl by the parameters, which can decrase
the stack resource cost under default debug settings and finally
improve the stability of multi camera cases.
CRs-fixed: 3193708
Change-Id: If0f33cc310d64c83c0e4781a5de61483ebc35769
Signed-off-by: daopingl <quic_daopingl@quicinc.com>
This change reset the slot when the next req is applied, it
should be caused by some exception before, we need to reset
this slot in case we applied wrong req to sub devices.
CRs-Fixed: 2949657
Change-Id: I0b5f7b1d8450ed355701090b185812fb7a6b6e06
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
Below information is dumped at the overflow
1. Dump SOF, EPOCH, EOF and Error time.
2. Dump IRQ status.
3. Cpas AB, IB votes.
4. Dump width and height of all the acquired ports.
5. CSID clock.
CRs-Fixed: 3159425
Change-Id: I580d8f4d50c49568a6bc9ae8d06fc4b93f11891c
Signed-off-by: Tejas Prajapati <quic_tpraja@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: I23d91445bd088bbde19ffa191e158256166f2053
Signed-off-by: Tejas Prajapati <quic_tpraja@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>
By default driver is configuring jpeg misr and also dumping misr values.
So added a check if camnoc_misr_support is enabled then only configure
and dump the misr value.
CRs-Fixed: 3168072
Change-Id: I4090b1a43b55a0f7643c352689aa04b56d31df8d
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
Due to workqueue does not process the work in order,
so sometimes the later work will be processed earlier.
Such as, when submit request order: 1/2/3, cdm interrupt
come order: 1/2/3, workqueue process order: 2/1/3,
when process 2 request, which currently will notify 1/2
CDM clients and remove 1/2 from submit list. After that,
when process 1 request, will notify 3, actually 3 is not
done at the moment, which maybe cause smmu page fault issue.
And sometimes, when there is a delay in handling interrupts,
then HLOS handles two interrupts as one only. This change only
notify the request less than and equal to the interrupt request.
CRs-Fixed: 3130447
Change-Id: I0fd0e8adee48767e5ab7db1921a8284d107c2f40
Signed-off-by: zhuo <quic_zhuo@quicinc.com>