Commit graph

1,471 commits

Author SHA1 Message Date
zhuql3
59915db63d Berlin:add ois data type
Fixed the issue that the submission milan ois bringup caused
the Berlin tele sensor not work

Change-Id: Ib77132b7ef9785f717bb95a51ba758ab7d761851
Signed-off-by: zhuql3 <zhuql3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2074029
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: Xingyun Fu <fuxy7@motorola.com>
Reviewed-by: Zilong Zhang <zhangzl7@lenovo.com>
Reviewed-by: Qiang Guo <guoq8@motorola.com>
Reviewed-by: Shanghui Zhang <zhangsh@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-04-14 14:47:30 +08:00
wangshuo18
121a965a52 cam: support volt compatible for hm2sp03&hm2sd03
-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
2023-04-14 14:47:30 +08:00
wangshuo18
861c995355 cam: add reset lens to reduce pop noise during quick-draw
-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
2023-04-14 14:47:30 +08:00
wangshuo18
216643ab56 cam: add wakelock for the actuator noise reduction.
-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
2023-04-14 14:47:30 +08:00
wangshuo18
70cfea590d cam: reduce launch_lens step,add judgement before init
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
2023-04-14 14:47:30 +08:00
wangshuo18
bc6fc504f9 cam: add launch_lens method and some optimization
-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
2023-04-14 14:47:30 +08:00
wangshuo18
47c3f617f1 cam: update berlin gt9772 DAC value for resonance noise issue
-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
2023-04-14 14:47:30 +08:00
wangshuo18
50d0d3de28 cam: enable cci dump when meet cci fail
[detail]
Default enable cci register dump when meet NACK or Timeout issue.

Change-Id: I4656f4eca644fb4a8a8274323b5943122e15df58
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1936494
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Peng Zhang <zhangp49@motorola.com>
Reviewed-by: Xingyun Fu <fuxy7@motorola.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2023-04-14 14:47:30 +08:00
wangshuo18
b7b5e8bc55 cam: Add actuator standalone diver for berlin
-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
2023-04-14 14:47:30 +08:00
wangshuo18
9d023ce977 cam: add macro CONFIG_AF_NOISE_ELIMINATION judgment
-fix build error
-only integrate mot_actuator driver on device which enabled
CONFIG_AF_NOISE_ELIMINATION
-modify dac_pos to 480,follow hanoip

Change-Id: I7205cd01df239ede3c7a54609d4c8eb54f42eb87
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1918702
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2023-04-14 14:47:30 +08:00
wangshuo18
68f7e5cb86 cam: Add actuator standalone diver for vibrator.
-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
2023-04-14 14:47:30 +08:00
wangdw10
09fc695550 msm: ois: support new OIS i2c settings
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>
2023-04-14 14:47:30 +08:00
Vishal Verma
e57ff4ba23 msm: camera: sensor: Read using addr and data type
[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>
2023-04-14 14:47:30 +08:00
timwang
ae871fa71d V(CR): Port Active OIS Kernel Changes
-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
2023-04-14 14:47:29 +08:00
timwang
23cf72040d V(CR): Port OIS Kernel Changes
-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
2023-04-14 14:47:29 +08:00
liuwang2
2ce39159e6 camera: EXPORT_SYMBOL cam_cci_get_subdev function
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
2023-04-14 14:47:29 +08:00
Linux Build Service Account
2ebae66b2b Merge d7eae61ec4 on remote branch
Change-Id: I4b6209be4551a9d2d5e197d68896a05c1a207c89
2023-03-10 14:14:20 -08:00
Linux Build Service Account
eaaf04edec Merge 687f2e3e5d on remote branch
Change-Id: I313e3e033f26be000282547cdf8909d588158fb7
2023-03-01 21:42:40 -08:00
Shivakumar Malke
d7eae61ec4 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-02-21 12:19:00 +05:30
Shivakumar Malke
687f2e3e5d msm: camera: lrme: BL command length validation
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>
2022-12-13 10:39:35 +05:30
Linux Build Service Account
5b238dc24d Merge 9831108abf on remote branch
Change-Id: Ib9bfad4f6fe859add6cfb30f363beebdb2076888
2022-12-05 22:14:49 -08:00
Shivakumar Malke
9831108abf msm: camera: isp: Handle early bufdones
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>
2022-11-16 18:59:51 +05:30
Linux Build Service Account
bace5badd2 Merge 5685ecf200 on remote branch
Change-Id: I313c08be9c07561b81bc4784fa8af67b45bae178
2022-11-08 01:14:12 -08:00
Ashish Bhimanpalliwar
5685ecf200 msm: camera: common: Add conditions to catch invalid packet data
Add conditions to catch invalid cmd_desc, io buffers, and kmd buffers in
the packet payload.

CRs-Fixed: 3250331
Change-Id: I2db474572a8c5391ba9b9821de2da0db8f10eb4d
Signed-off-by: Ashish Bhimanpalliwar <quic_abhiman@quicinc.com>
2022-10-10 20:49:53 -07:00
Shivakumar Malke
a2b2dfab21 msm: camera: isp: Handle RUP in applied substate
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>
2022-09-28 16:38:19 +05:30
Linux Build Service Account
48ed7e9b51 Merge 336163ddec on remote branch
Change-Id: Idfbc8a49611bfeb2a16f0aed81ec905c3264359f
2022-08-13 02:48:52 -07:00
Yash Upadhyay
336163ddec msm: camera: memmgr: Avoid TOCTOU buffer access on multiple use of same fd
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>
2022-08-03 10:04:47 +05:30
Linux Build Service Account
50ebe04a4d Merge d35e7e899b on remote branch
Change-Id: I889f4758852b34bd233bc50c9d34b544fde4b4dc
2022-07-15 01:09:21 -07:00
Camera Software Integration
d35e7e899b Merge "msm: camera: utils: modify debug function logic" into camera-kernel.lnx.4.0 2022-06-29 21:13:09 -07:00
Linux Build Service Account
601dbd45c9 Merge 21017701fa on remote branch
Change-Id: Ibcfbbe1cac86dd25011d3b64396beb671fdbfde0
2022-06-10 08:19:36 -07:00
daopingl
cfb8c413c9 msm: camera: utils: modify debug function logic
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>
2022-05-27 17:58:36 +08:00
Camera Software Integration
21017701fa Merge "msm: camera: reqmgr: Reset the slot if it is applied" into camera-kernel.lnx.4.0 2022-05-25 11:38:34 -07:00
Kai Xing
028478e7df msm: camera: fd: fix compile error for kernel 5.4
Function definition error: delete static keyword.

CRs-Fixed: 3191744
Change-Id: Ifea089f47de02233b31695146b1ddacfbaec35a8
Signed-off-by: Kai Xing <quic_kxing@quicinc.com>
2022-05-11 16:59:10 +05:30
Linux Build Service Account
2a481c8b72 Merge 40348c542e on remote branch
Change-Id: Idfb6d7977ff43bc74030f077921fa69990c4ad30
2022-05-09 06:50:03 -07:00
Camera Software Integration
40348c542e Merge "msm: camera: jpeg: By default disable Camnoc MISR configuration" into camera-kernel.lnx.4.0 2022-05-01 08:33:39 -07:00
Depeng Shao
f4a952f180 msm: camera: reqmgr: Reset the slot if it is applied
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>
2022-04-28 09:48:17 +05:30
Linux Build Service Account
68281ab74e Merge 355f51b649 on remote branch
Change-Id: Ic203eab25532a4784593fe0a950290c3833436a5
2022-04-15 05:06:54 -07:00
Shravan Nevatia
6c445cfb01 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-11 23:23:41 +05:30
Linux Build Service Account
160438c604 Merge 6d548aa9b5 on remote branch
Change-Id: I50d124ce14c9f6347a7d5d7bb268321c2c728d8f
2022-04-07 23:08:12 -07:00
Camera Software Integration
355f51b649 Merge "msm: camera: ife: dump data at overlflow for rdi only use case" into camera-kernel.lnx.4.0 2022-04-06 02:13:15 -07:00
Camera Software Integration
d8227145a5 Merge "msm: camera: memmgr: update correct length in bufq" into camera-kernel.lnx.4.0 2022-04-06 02:13:04 -07:00
Tejas Prajapati
dd87df520d msm: camera: ife: dump data at overlflow for rdi only use case
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>
2022-03-31 10:10:01 +05:30
Camera Software Integration
6d548aa9b5 Merge "msm: camera: reqmgr: Validate the link handle" into camera-kernel.lnx.4.0 2022-03-22 06:26:28 -07:00
Camera Software Integration
a9d8ab272a Merge "msm: camera: reqmgr: Avoid freeing subdev twice" into camera-kernel.lnx.4.0 2022-03-22 06:21:19 -07:00
Tejas Prajapati
a4b0246d27 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: I23d91445bd088bbde19ffa191e158256166f2053
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-03-17 14:49:58 +05:30
Yash Upadhyay
e5cbfaf0af 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>
2022-03-15 09:22:45 +05:30
Dharmender Sharma
24a4646c76 msm: camera: jpeg: By default disable Camnoc MISR configuration
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>
2022-03-15 08:07:38 +05:30
Linux Build Service Account
a40498dc1f Merge 6639a3b50f on remote branch
Change-Id: I76dd960cbd377d6ecf36ed81e692f368a8016718
2022-03-11 00:22:14 -08:00
zhuo
f33380f182 msm: camera: cdm: Fix workqueue timing issue
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>
2022-02-28 13:24:40 +08:00
Linux Build Service Account
76dfbada09 Merge b3fd39f822 on remote branch
Change-Id: I10adf57982731981b958de3cbf44b39741d31baa
2022-02-11 01:24:41 -08:00