Граф коммитов

1452 Коммитов

Автор SHA1 Сообщение Дата
Jose Guzman 855a73f942 Updates for Surface Duo 2 2023-05-25 17:04:22 -07:00
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
Camera Software Integration 6639a3b50f Merge "msm: camera: tfe: dump csid clock and path data at overflow" into camera-kernel.lnx.4.0 2022-02-09 22:58:05 -08:00
Nirmal Abraham 583fb300c8 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-02-08 10:14:49 +05:30
Camera Software Integration b3fd39f822 Merge "msm: camera: reqmgr: reader writer locks to avoid memory faults" into camera-kernel.lnx.4.0 2022-01-27 11:47:04 -08:00
Tejas Prajapati a35c7c2f10 msm: camera: tfe: dump csid clock and path data at overflow
On overflow dump the AB and IB votes, tfe clock,
CSID clock and respective bus path data for acquire
time and addr_status registers.

CRs-Fixed: 3118430
Change-Id: Ia38eb4350e8e38562b6d22769b38637480da0b9d
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-01-19 10:32:57 +05:30
Linux Build Service Account 470ff8ddcc Merge c450d2e419 on remote branch
Change-Id: I216a09f1eaa0725f5c0ec1ca7362af1953e1b2d5
2022-01-13 04:10:10 -08:00
Camera Software Integration eac3f0b664 Merge "msm: camera: ope: Fix for 32-bit kernel" into camera-kernel.lnx.4.0 2022-01-11 03:35:41 -08:00
Tejas Prajapati 691ddd437f 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: I464411576a5a04f5d0b402c403ce8a1d4df7dad0
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2022-01-07 17:22:12 +05:30
Camera Software Integration c450d2e419 Merge "msm: camera: reqmgr: check if link handle is correctly passed" into camera-kernel.lnx.4.0 2022-01-03 10:53:03 -08:00
Alok Chauhan deb0914ed4 msm: camera: ope: Fix for 32-bit kernel
Use div_u64 to do 64-bit division.

CRs-Fixed: 3099898
Change-Id: I405461ea02d0ec668cb7be764543a9a16bd1c3e6
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
2022-01-03 17:42:21 +05:30
Camera Software Integration 89103da2f8 Merge "msm: camera: isp: Add eof notification for rdi only context" into camera-kernel.lnx.4.0 2021-12-21 20:58:00 -08:00
Tejas Prajapati 4856f7a40a 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>
2021-12-20 14:44:36 +05:30
Camera Software Integration be0697dec4 Merge "msm: camera: ope: Increase max bl limit and max stripe to process" into camera-kernel.lnx.4.0 2021-12-13 11:01:00 -08:00
Camera Software Integration 7ad290b351 Merge "msm: camera: ope: Update request timeout for NRT/RT context" into camera-kernel.lnx.4.0 2021-12-13 10:59:30 -08:00
Tejas Prajapati c6de9ec432 msm: camera: isp: Add eof notification for rdi only context
For RDI only context EOF is not notified; it should be
notified, for the corner case if the flash is
configured to apply at EOF then it will block apply for
ISP on SOF as well until the EOF is notified, this
change adds EOF notification.

CRs-Fixed: 3091241
Change-Id: If6d974d092d640d9def89bbcf7a88fba0d85579b
Signed-off-by: Tejas Prajapati <quic_tpraja@quicinc.com>
2021-12-13 01:08:06 -08:00
Linux Build Service Account 945d74685e Merge ce9b4b3f12 on remote branch
Change-Id: I1a7b7fc87e5d535c6ec57f2baef2f8a25c874bc5
2021-12-12 23:52:02 -08:00
Zhenlin Lian ce9b4b3f12 msm: camera: config: Enable camera drivers for qcs610
Add camera config files for target qcs610.

Change-Id: I4fefaa0254aa8267b4375bb4270f286f46ec7997
Signed-off-by: Zhenlin Lian <quic_zlian@quicinc.com>
2021-12-03 01:58:20 -08:00
Camera Software Integration c9f9bce593 Merge "msm: camera: reqmgr: Prevent session deadlock" into camera-kernel.lnx.4.0 2021-12-02 04:27:09 -08:00
Camera Software Integration f9bcd25377 Merge "msm: camera: isp: handle buf_done at apply failure from deferred list" into camera-kernel.lnx.4.0 2021-12-02 04:26:15 -08:00
Alok Chauhan 8eeacc770c 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>
2021-11-26 18:07:31 +05:30