提交線圖

205 次程式碼提交

作者 SHA1 備註 日期
Karthik Anantha Ram
5f13fe864f msm: camera: reqmgr: Correct condition check
Flag warning only if the wait call returns 0.

CRs-Fixed: 2841729
Change-Id: I456da8a66ea69bcf671f55bd5f0459aab74476f5
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-22 19:24:05 -07:00
Savita Patted
3dd2620d85 Merge "msm: camera: isp: Add support for flush in offline IFE" into camera-kernel.lnx.5.0 2021-07-21 22:29:05 -07:00
Camera Software Integration
5daf7da643 Merge "msm: camera: mem_mgr: Fix expanded memory allocations" into camera-kernel.lnx.5.0 2021-07-19 17:27:02 -07:00
Anand Ravi
25ee65107a msm: camera: isp: Add support for flush in offline IFE
Add flush device ioctl handler in ISP top state machine to translate
the flush command into equivalent CRM flush request command. Also add
support for flushing offline IFE workqueue.

CRs-Fixed: 2939523
Change-Id: I79a6b6bca241b954e06f78e8a05e55907f46aa59
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-07-19 09:02:49 -07:00
Camera Software Integration
3ec4a1fd7e Merge "msm: camera: common: Append timestamp in INFO LOGS" into camera-kernel.lnx.5.0 2021-07-16 19:48:48 -07:00
Karthik Jayakumar
9122c82fe1 msm: camera: mem_mgr: Fix expanded memory allocations
Fixes expanded memory allocations to only happen for ICP context banks.
Re-maps the command buffers to shared region of ICP context bank.

CRs-Fixed: 2985358
Change-Id: I3c2d5866b0041489577f6c5c0ec113c886437107
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-07-15 13:14:59 -07:00
Sokchetra Eung
5a11ba0725 msm: camera: common: Append timestamp in INFO LOGS
Use Kernel time to obtain the current time when IFE is acquired
/released and when sensor is streamed on/off. Convert the Ktime
to a timestamp format and log it in existing info prints. This
will help to co-relate timestamp between user-space and kernel
logs. The change also replaces the current usage of direct calls
to ktime_get_real_ts64 with macro across all drivers.

CRs-Fixed: 2987320
Change-Id: I87c4790164d222fc1ed6ff41ad00eeb1ed8c8867
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-07-15 11:56:33 -07:00
Ayush Kumar
c834473607 msm: camera: req_mgr: Fix request mismatch on slave bubble
Correct number of apply to skip for master in case of slave bubble.
Add log to check and print time left to apply.

CRs-Fixed: 2968652
Change-Id: I7698b79a6d98637726e528f3e40dda4b68118d50
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-07-14 21:35:36 -07:00
Camera Software Integration
3c599ca616 Merge "msm: camera: smmu: Use dmabuf inode num as unique identifier" into camera-kernel.lnx.5.0 2021-07-14 21:23:39 -07:00
Pavan Kumar Chilamkurthi
89d50926c5 msm: camera: smmu: Use dmabuf inode num as unique identifier
'fd' can be closed in user mode driver, though corresponding
dmabuf is still not freed if someone still holding a refCount
on that dmabuf, say camera smmu driver holding a refCOunt and
has that in its mapping info table. Then the same 'fd' can be
allotted for a different buffer in a new allocation. In such
cases, if we use 'fd' as identifier in camera smmu driver to
check if the buffer is already mapped based on mapping info
table, we mistakenly think the new buffer is already mapped
which is not the case. DMA buf's inode num is an unique
identifier that represents a buffer. Use this along with 'fd'
in camera smmu driver to see if the given buffer is already mapped.

CRs-Fixed: 2961136
Change-Id: I5baac99e3badaca3a376ecd724a7a7aa6da112a4
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-07-12 14:01:19 -07:00
Gaurav Jindal
eab943de93 msm: camera: isp: Add mutex while disabling rx
Disbaling RX in CSID during flush is not inside mutex lock.
This can result in damaging the lists and variables causing
stability issues.
This commit moves this call inside mutex lock. Also, a warn log
is added to inform if the flush call times out.

CRs-Fixed: 2974631
Change-Id: I50082c03bebacc4a11f826bdb318c52dbf5400e7
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-07-12 20:22:22 +05:30
Savita Patted
769d026c3a Merge "msm: camera: memmgr: Add support for non pix secure buffers" into camera-kernel.lnx.5.0 2021-07-08 18:59:30 -07:00
Savita Patted
a1e328751b Merge "msm: camera: core: v780 enhanced memory addresses" into camera-kernel.lnx.5.0 2021-07-08 13:23:13 -07:00
Savita Patted
44d4c40b5f Merge "msm: camera: req_mgr: Increase in_q rdx index in workqueue" into camera-kernel.lnx.5.0 2021-07-08 13:22:32 -07:00
Savita Patted
dba6c5e0f0 Merge "msm: camera: common: Change shutdown sequence for subdevices" into camera-kernel.lnx.5.0 2021-07-07 09:54:21 -07:00
Rishabh Jain
e2c7402dfd msm: camera: memmgr: Add support for non pix secure buffers
Add support to allocate such buffers which need to accessed
by non-pix VM.

CRs-Fixed: 2981372
Change-Id: Iac965a479e05d638c6323bfacd7c6a4d89f2a223
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2021-07-06 11:31:00 +05:30
Ayush Kumar
f510695ed6 msm: camera: req_mgr: Increase in_q rdx index in workqueue
This change is to correct in_q rdx index logic. If rdx index is
increased in tasklet, then it is possible that due to delay in
workqueue scheduling crm send apply request for same request.
Also, it prevent concurrent access of in_q rdx index.

CRs-Fixed: 2980811
Change-Id: Iba7d3c0faf6abe845745acbcd810ca52a43e4d01
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-07-05 17:56:46 +05:30
Savita Patted
9e5e021304 Merge "msm: camera: sensor: Add tpg driver support" into camera-kernel.lnx.5.0 2021-07-01 15:29:06 -07:00
Karthik Anantha Ram
d785949196 msm: camera: common: Change shutdown sequence for subdevices
In subdev close call if CRM is still active wait for shutdown
from CRM [media device]. Remove subdevice check for active
handles, shutdown to happen irrespective of any active context.

If CRM is not active, subdevice shutdown should ensure there is
no access to kernel allocated buffers since at this point
memmgr is de-initialized.

As part of ICP close, remove usage of HFI queues, trigger PIL
to transfer FW memory ownership back to HLOS and power off ICP.

CRs-Fixed: 2976107
Change-Id: Ib05b3fbdcc33f4072da7ef77cf0118a807860e8c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-06-30 17:04:11 -07:00
Karthik Jayakumar
0d00f4feee msm: camera: core: v780 enhanced memory addresses
Added support for v780 enhanced memory address handling

CRs-Fixed: 2948659
Change-Id: I46ed16ad70103553a18cc69d762c6d93fc9fd8d9
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-06-29 11:08:03 -07:00
Ayush Kumar
e8e814eda9 msm: camera: req_mgr: CRM Code refactoring
Due to major changes in CRM code, refactoring CRM
kernel driver code. Fix apply threshold calculation logic.

CRs-Fixed: 2783209
Change-Id: I08ba6c89b0d4f0e982c017bab4226a569327f861
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-06-29 18:18:35 +05:30
Tony Lijo Jose
caa6b2a1a4 msm: camera: sensor: Add tpg driver support
Add new tpg subdev driver. This change exposes the tpg hw as a new
subdev similar to that of a sensor driver.

CRs-Fixed: 2973850
Change-Id: I6fdb4457d8cc829546896f26bdde8765a4258e7c
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2021-06-29 00:44:14 -07:00
Camera Software Integration
c6903209f2 Merge "msm: camera: common: Fix dma_attr_t types" into camera-kernel.lnx.5.0 2021-06-28 17:27:09 -07:00
Camera Software Integration
8a032188a5 Merge "msm: camera: common: memory api for presil hw access" into camera-kernel.lnx.5.0 2021-06-28 17:26:28 -07:00
Karthik Anantha Ram
ae190c6af9 msm: camera: reqmgr: Add missing spin unlock call
In cam_req_mgr_cb_notify_trigger add missing spin unlock
call. In case of IRQ delays the API returns without invoking
unlock.

CRs-Fixed: 2975974
Change-Id: I1dc87e457b7c6d9d099ddb54d31be8fc2476f360
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-06-23 13:32:23 -07:00
Suraj Dongre
c65c2f10c9 msm: camera: common: memory api for presil hw access
Added declarations for apis used for memory copy to and from presil hw.

CRs-Fixed: 2932495
Change-Id: I19cd272fd4993c68278b3d8cceabe5d9b5d9a5f6
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
2021-06-23 10:42:35 -07:00
Karthik Jayakumar
9e5bc7a1f4 msm: camera: common: Fix dma_attr_t types
Fixes typecasts from dma_attr_t types to uint32_t types for memory
management.

CRs-Fixed: 2948659
Change-Id: Ie3898176195ac508f1a922a5e499e6e33ac8e490
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-06-23 10:09:24 -07:00
Savita Patted
68de607556 Merge "msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence" into camera-kernel.lnx.5.0 2021-06-21 18:38:47 -07:00
Ayush Kumar
566ac7abf8 msm: camera: common: Multiple fixes for crm redesign
This change help to resolve below issues :-
1. Update frame duration calculation
   Add frame duration calculation with the use of fps. In some cases
   where horizonal blanking is more, frame duration calculation based
   on sof epoch calculation is not accurate.
2. Corner case in bubble handling
   Add support to handle master link bubble even if ISP linked with
   slave link receive few buf done irq for bubble request before master
   sends slave link to bubble state.

CRs-Fixed: 2783209
Change-Id: Ibf35f31f5263be7b6a6be6cd095447a2910a6878
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-06-05 00:16:43 +05:30
Ayush Kumar
0259331da4 msm: camera: req_mgr: Re-design CRM to support multi links in sync mode
This change is to support multi links in sync mode. Supports dynmanic
switching to select master link in rtb and sat use case in sync mode.
Supports sync logic for rtb and sat use case in sync mode. Apply
requests for all links is triggered only on master epoch. Supports
bubble recovery and sync logic for different pd links in sync mode.

CRs-Fixed: 2783209
Change-Id: I81d1d0d37aa0d6e18c19ca87eac51ef3f160abfb
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-06-04 20:23:00 +05:30
Camera Software Integration
a87bd04ba8 Merge "msm: camera: common: Add common function to modify timer" into camera-kernel.lnx.5.0 2021-06-03 17:54:45 -07:00
Camera Software Integration
4eb55453f1 Merge "msm: camera: reqmgr: Correct the count decrement logic" into camera-kernel.lnx.5.0 2021-06-02 12:07:26 -07:00
Mukund Madhusudan Atre
c31cb00512 msm: camera: common: Add common function to modify timer
Add common function to modify system timer, with timeout
multiplier as a debug capability.

CRs-Fixed: 2932495
Change-Id: I73282aa30b938b7efce97a2e8fd757b04096ccad
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-06-02 11:10:53 -07:00
Depeng Shao
2d0124f109 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 <depengs@codeaurora.org>
2021-05-26 09:42:13 +08:00
Jigar Agrawal
1559a4b3dd msm: camera: reqmgr: Correct the count decrement logic
Correct the open requests count decrement logic.
Open request count decrements even when there is
no requests in the higher Pipeline_delay devices,
making the open request count negative.

CRs-Fixed: 2912147
Change-Id: If2d72f59a96290a2ccff59665af323da4329f9f4
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-05-25 16:04:12 -07:00
Haritha Chintalapati
facbe0251d Merge "msm: camera: reqmgr: Only do self-correction at SOF" into camera-kernel.lnx.5.0 2021-04-30 17:31:05 -07:00
Camera Software Integration
18e3dd6a8e Merge "msm: camera: reqmgr: Propagate hw failures to user" into camera-kernel.lnx.5.0 2021-04-28 21:22:50 -07:00
Camera Software Integration
639f9c82b4 Merge "msm: camera: reqmgr: Remove debug flags when creating timer slab" into camera-kernel.lnx.5.0 2021-04-28 21:22:46 -07:00
Depeng Shao
924246efa3 msm: camera: reqmgr: Only do self-correction at SOF
Since the SOF timestamp is only updated at SOF,
so we can't do self-correction at EOF. When the
frames already in sync, but the req is a EOF
triggered req, then the req can't be applied at
SOF, but it will fail to pass self-correction
checking at EOF. Then we will loop this progress,
the req can't be applied anymore.

CRs-Fixed: 2930497
Change-Id: I079cbd3cb9ac9541f049c5369baeee831f7444a2
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-04-26 18:27:25 -07:00
Jigar Agrawal
76857940be msm: camera: reqmgr: Propagate hw failures to user
Propagate error code to user in order to let the
user know more about the failure.

CRs-Fixed: 2860306
Change-Id: Icf030aa9df32eac97371059c2d282cfb53257401
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-19 19:07:15 -07:00
Jigar Agrawal
5992dd4885 msm: camera: common: Fix NULL pointer dereference
Set the debugfs root entry pointer to null after
recursive remove at unbinding to prevent null pointer
dereference by kernel followed by kernel panic. Also,
add checks to avoid null pointer dereference.

CRs-Fixed: 2920490
Change-Id: I5a4f44f3d8f533f3a51e108472d5ccf93c261a98
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-04-19 11:25:07 -07:00
Haritha Chintalapati
d62972c20f Merge "msm: camera: common: Use the appropriate header for spinlock" into camera-kernel.lnx.5.0 2021-04-14 19:20:47 -07:00
Karthik Anantha Ram
18485ef697 msm: camera: reqmgr: Remove debug flags when creating timer slab
Remove all the debug flags in cache create call. The change
also adds the destroy call during unbind for consistency.

CRs-Fixed: 2841729
Change-Id: I2e0a0e4f2ec9191a3159d77892ff292a0a3cc131
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-04-14 14:30:17 -07:00
Alok Chauhan
2ebae4fabe msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence
when provider crash occurred, there was a CSID lane overflow
observed due to shutdown sequence from CRM(sensor, csid, csiphy).
To fix the issue need to change the shutdown sequence
(csid, sensor, csiphy).

This change will update the devices sequence in order while registering
and close the sequence accordingly.

CRs-Fixed: 2852076
Change-Id: Ia6d8022e995823bf031400c33528eb8544dc2e29
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-04-14 05:20:37 -07:00
Haritha Chintalapati
29eebb1ebf Merge "msm: camera: common: NULL pointer and array fixes" into camera-kernel.lnx.5.0 2021-04-13 19:29:45 -07:00
Karthik Anantha Ram
9f4f8e114c msm: camera: common: Use the appropriate header for spinlock
With the allow list tightened, use the right header for spinlock
usage. Change replaces usage of linux/spinlock.h to
linux/spinlock_types.h.

CRs-Fixed: 2841729
Change-Id: I0247501b765436099f75c9725e9f614f0873c888
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-04-12 14:42:58 -07:00
Depeng Shao
5e48beb98b msm: camera: reqmgr: Reset the status for next req if bubble
If req#N in slot idx, and this req meets bubble issue,
then the req#(N+1) in slot (idx+1) may also be applied,
and its status is APPLIED. If req#(N+1) applies failed
after finishing bubble recovery due to some reasons,
but we still can move to next slot since the status of
slot (idx+1) is already APPLIED. This change resets
the status of slot (idx+1) to ADDED if it is APPLIED
during processing error.

CRs-Fixed: 2902809
Change-Id: I32f318569ad8f24fdf0f324603f4ea0036867e98
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-04-05 12:26:09 +08:00
Karthik Jayakumar
67707a7305 msm: camera: common: NULL pointer and array fixes
Fix NULL pointer checks in cam_mem dma_buf functions.
Fix local array bounds check for cam_vfe_top_set_axi_bw_vote.

CRs-Fixed: 2906570
Change-Id: Ib41223ad56cbb5618d73e8aa6907907dd6f8f4fb
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-03-31 20:49:27 -07:00
Savita Patted
5e47b695d8 Merge "msm: camera: memmgr: Add support for secure allocations" into camera-kernel.lnx.5.0 2021-03-29 18:41:03 -07:00
Pavan Kumar Chilamkurthi
4def5ba7ab msm: camera: memmgr: Add support for secure allocations
Add secure allocation support with dma buf heaps.

CRs-Fixed: 2904440
Change-Id: Ide01e228d2ca4c7cde85eea5a6eef565c3c7d183
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-03-21 00:09:15 -07:00