Grafico dei commit

255 Commit

Autore SHA1 Messaggio Data
Savita Patted
a89651c3b0 Merge "msm: camera: isp: Apply scratch only on SOF trigger" into camera-kernel.lnx.5.0 2021-10-15 23:34:34 -07:00
Camera Software Integration
c469b0db2d Merge "msm: camera: common: Make msg_cb for cam_subdev generic" into camera-kernel.lnx.5.0 2021-10-14 16:55:23 -07:00
Karthik Anantha Ram
498012e556 msm: camera: isp: Apply scratch only on SOF trigger
It's possible that CRM triggers frame skip call at SOF
and EOF. For IFE ignore the call on EOF. Only use
SOF trigger to apply default settings [scratch buffers],
for fetch engine use-cases.

CRs-Fixed: 3055035
Change-Id: Ic0b59e5beb6dff70bb1b515117f0b641d8e09308
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-10-13 11:40:17 -07:00
Camera Software Integration
79879d890a Merge "msm: camera: common: fix map check failure for presil buffer send" into camera-kernel.lnx.5.0 2021-10-12 19:30:44 -07:00
Haritha Chintalapati
0af295b8f6 Merge "msm: camera: reqmgr: Fix the crm driver" into camera-kernel.lnx.5.0 2021-10-11 21:10:03 -07:00
Savita Patted
3c4809d109 Merge "msm: camera: req_mgr: Rearrange state change sequence" into camera-kernel.lnx.5.0 2021-10-08 17:20:07 -07:00
Jigar Agrawal
41d8370e72 msm: camera: reqmgr: Fix the crm driver
Add a check in the request manager code
to prevent the possible out of bound
array access.

CRs-Fixed: 3051099
Change-Id: I4b4ec5778d83aa8993225cae0cd599a02f526082
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-06 21:57:30 -07:00
Camera Software Integration
fc8becbc86 Merge "msm: camera: reqmgr: Only do self correction after initial sync" into camera-kernel.lnx.5.0 2021-10-06 17:42:05 -07:00
Suraj Dongre
0fe49d5aa7 msm: camera: common: fix map check failure for presil buffer send
Add correct way to check if buffer can be sent to hw in below cases.
1. buffer handle mapped twice, resulting into two entries in buf_q.
   One entry without smmu mapping and one with smmu mapping.
   fixed by checking if another entry with smmu map exists for i_no.
2. blob cmd buffer, packet buffer are shared only between umd and kmd.
   send_buffer_to_presil expected to be called and return success.

CRs-Fixed: 2932495
Change-Id: I2dd884b7dd16c5c45d3dfc25380d039b92199319
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
2021-10-06 11:49:41 -07:00
Camera Software Integration
4c38664b95 Merge "msm: camera: isp: Reduce traffic for shutter notification" into camera-kernel.lnx.5.0 2021-10-04 17:32:47 -07:00
Shardul Bankar
dc53926c40 msm: camera: common: Make msg_cb for cam_subdev generic
The current implementation allows to pass uint_32 as
argument in the message callback. Changing it to (void *)
type so that any type of data can be passed in the future
implementations.

CRs-Fixed: 2847155
Change-Id: Ic52a5ccfe13efdba37bbcfdb7154ed789b1943fd
Signed-off-by: Shardul Bankar <sharbank@codeaurora.org>
2021-10-04 15:05:10 +05:30
Jigarkumar Zala
33cf758851 msm: camera: req_mgr: Rearrange state change sequence
Component bind is responsible for platform bus. QUP i2c bus slaves
can come at probe anytime. This operation is corrupting the slave
list for CRM. This change makes sure that CRM is available after
subdev list is initiate first and then only allows the subdev to be
add in the list.

CRs-Fixed: 3034933
Change-Id: Ia08702a8b38f2f2f590021b997c729131e919d2d
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-03 22:26:05 -07:00
Camera Software Integration
13d3e00200 Merge "msm: camera: reqmgr: Handle fatal error notification" into camera-kernel.lnx.5.0 2021-10-01 19:50:18 -07:00
Pranav Sanwal
0ddfe2d482 msm: camera: isp: Reduce traffic for shutter notification
To reduce traffic for shutter notification, sof and boot
sof timestamps are sent in a unified v4l2 event.
Thereby, reducing the event notification traffic by 50%.

CRs-Fixed: 3040374
Change-Id: Ib4580e0a4df7c3d1cb892fdf3254272d3134d4cb
Signed-off-by: Pranav Sanwal <psanwal@codeaurora.org>
2021-09-30 18:05:29 +05:30
Camera Software Integration
a6d54a3219 Merge "msm: camera: req_mgr: Allow request cancellation if not applied to IFE" into camera-kernel.lnx.5.0 2021-09-29 15:57:59 -07:00
Depeng Shao
83001935a7 msm: camera: reqmgr: Only do self correction after initial sync
Only do self correction after initial sync.

CRs-Fixed: 3047181
Change-Id: I29d5a633984322d2383d48ba0956fc4e2e57f87f
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-29 10:36:00 +08:00
Anand Ravi
0417e88967 msm: camera: req_mgr: Allow request cancellation if not applied to IFE
Since we don't wait for requests to be ready on lower pd devices before
applying request on higher pd devices, add provision to cancel request
if it has not been applied on IFE.

CRs-Fixed: 3014942
Change-Id: I8850b0dfe3f88e04b86f7bb6b597657ad7e0a4f9
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-09-27 14:41:03 -07:00
Karthik Anantha Ram
26f225b85b msm: camera: reqmgr: Handle fatal error notification
Handle fatal error notification by any device on the link.
On receiving the error propagate it to all connected devices.

CRs-Fixed: 3045706
Change-Id: Ia36a3262a48ea35afc8b98df21056461c5c523ef
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-09-27 11:18:56 -07:00
chengxue
ad1a1dcfb2 msm: camera: reqmgr: Delay to do slot reset for finished req
For boken mode with hw sync enable, a link and its synclink
streaming with sync. if a bubble condition happens on a link,
and can not wait all buf done to clear the isp ctx
process_bubble flag in time, there may apply fails on isp
during the bubble recovery flow. current crm reset in_q slot
after req's report has finished. this may lead to a synclink
slot not found while do ready check.

So delay to do slot reset by referring the link delay.

CRs-Fixed: 2996710
Change-Id: Ice8c340a9f478a69d97e3a7c77e0d0a263be66fa
Signed-off-by: chengxue <chengxue@codeaurora.org>
2021-09-22 23:36:09 -07:00
Depeng Shao
c8ac17dee6 msm: camera: reqmgr: Fix request sync issues
Fix several request sync issues.

CRs-Fixed: 3029196
Change-Id: I92b4048b392fa19e2c9748a5ee0efd9ef0b4e680
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-20 13:04:31 +08:00
Camera Software Integration
0a2a2dca28 Merge "msm: camera: reqmgr: Correct masked value for pending devices" into camera-kernel.lnx.5.0 2021-09-17 16:37:37 -07:00
Camera Software Integration
cfa89c05e4 Merge changes Ifd1e0fdb,Icfb6dc1a into camera-kernel.lnx.5.0
* changes:
  msm: camera: common: Add buffer send and receive mechanism
  msm: camera: memmgr: Add presil memory API implementation
2021-09-10 18:09:09 -07:00
Camera Software Integration
207895b464 Merge "msm: camera: reqmgr: Notify devices of frame skip" into camera-kernel.lnx.5.0 2021-09-10 18:08:36 -07:00
Suraj Dongre
37de6613a8 msm: camera: memmgr: Add presil memory API implementation
Add code for dmabuf, fd conversion and copying all buffers
using presil framework APIs.

CRs-Fixed: 2932495
Change-Id: Icfb6dc1a3326ea8214a71fd39871a8583a6e902c
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-09-09 12:40:34 -07:00
Depeng Shao
b5d455f995 msm: camera: reqmgr: Change warn logs to rate limited
In notify trigger and if link state isn't ready, it may
print excessive log which causes watchdog bite.

CRs-Fixed: 3031599
Change-Id: I758dcb26d9d110b0ba080e31f87e1fcafc6fd0e8
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-08 18:50:42 +08:00
Karthik Anantha Ram
4f751b3daf msm: camera: reqmgr: Correct masked value for pending devices
When checking if a request is ready, for pending devices of a
given pipeline delay, update the request pending mask correctly.
This will ensure "Skip frame" log indicates the right devices
missing a request packet.

CRs-Fixed: 3031843
Change-Id: Ib2aff1d0c31cb9425616ff53cadd78a6130206e7
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-09-07 23:45:51 -07:00
Depeng Shao
e73c1b91e1 msm: camera: reqmgr: Notify devices of frame skip
Notify devices of frame skip when CRM skip a frame,
this is needed by SW frame sync.

CRs-Fixed: 3030315
Change-Id: If99cd976c215fe85c8f9fc600af22a82bb972917
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-08 14:22:03 +08:00
Camera Software Integration
0794e0fa6b Merge "msm: camera: req_mgr: Apply lower pd request in sync" into camera-kernel.lnx.5.0 2021-09-03 14:30:20 -07:00
Camera Software Integration
cea86bb84b Merge "msm: camera: reqmgr: Fix pagefault in workqueue get task" into camera-kernel.lnx.5.0 2021-09-03 14:30:11 -07:00
Anand Ravi
22097757a8 msm: camera: reqmgr: Fix pagefault in workqueue get task
Protect taskpool memory free operation with workqueue lock to prevent
use after free issues.

CRs-Fixed: 3019429
Change-Id: I0282e01e093f80578c5058a41823036370f5a88a
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-09-01 10:45:34 -07:00
Ayush Kumar
7b9703b0db msm: camera: req_mgr: Apply lower pd request in sync
This change help to aply request for lower pd device in sync mode
even if next open request is not avaiable at CRM.

CRs-Fixed: 3017979
Change-Id: Idfae0438d53e61f49c30f205357d5826dd943daa
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-09-01 09:06:52 -07:00
sokchetra eung
b5bec7886f msm: camera: reqmgr: Prevent session deadlock
Releasing session lock before unlink and acquiring
it immediately after to allow workq to be done. Check
link state after acquiring session lock in process_
req to return if link is IDLE.

CRs-Fixed: 3003287
Change-Id: Ie7a8ffc4edcb123db290d6da047d748b3e99d68b
Signed-off-by: sokchetra eung <eung@codeaurora.org>
2021-08-31 13:52:27 -07:00
Camera Software Integration
918ec12e6f Merge "msm: camera: req_mgr: Table info dump removed" into camera-kernel.lnx.5.0 2021-08-27 17:59:39 -07:00
Savita Patted
09f1d471b3 Merge "msm: camera: common: Add camera minidump changes" into camera-kernel.lnx.5.0 2021-08-24 20:01:45 -07:00
Gaurav Jindal
d266ac8813 msm: camera: common: Add camera minidump changes
Based on targets, in case of device crash, in place
of complete memory dump, mini dump can be extracted.
This commit adds changes for basic framework
to interact with base kernel for mini dump.
This commit also adds changes for ISP, CRM, SMMU and
Memory Manager.

CRs-Fixed: 2993116
Change-Id: I02620bd79ee2f84847381509a5eb030ffb1ca9d4
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-08-22 12:00:40 -07:00
Ayush Kumar
f428aed04a msm: camera: req_mgr: Handle apply failure
Handle apply failure in workqueue. Add recovery mechanism
to recovery in req_mgr to handle frame out of sync issue.

CRs-Fixed: 2997164
Change-Id: I0e04571b3a31d7a879a7aa579c1f0be51c233277
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-08-19 07:54:50 -07:00
Savita Patted
b07d7da652 Merge "msm: camera: reqmgr: Fix trigger count out of bound issue" into camera-kernel.lnx.5.0 2021-08-18 00:18:51 -07:00
Savita Patted
05d72291f7 Merge "msm: camera: core: Add delay detection support" into camera-kernel.lnx.5.0 2021-08-18 00:18:33 -07:00
sokchetra eung
64ff6b3ffc msm: camera: req_mgr: Table info dump removed
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>
2021-08-17 20:58:29 -07:00
Camera Software Integration
7e00864138 Merge "msm: camera: jpeg: Add Support for JPEG retry mechanism" into camera-kernel.lnx.5.0 2021-08-16 21:02:55 -07:00
Jigar Agrawal
e8f91ce471 msm: camera: jpeg: Add Support for JPEG retry mechanism
Add support for JPEG Thumbnail retry mechanism. Restructure
the command buffer arrangement, add JPEG generic blob functionality
and add support to notify user when the JPEG Thumbnail encoder
size increases than the threshold size received through blob.

CRs-Fixed: 2999106
Change-Id: Ica74f934939b562a3a88af551bfb5de79399e247
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-08-12 18:14:36 -07:00
Ayush Kumar
8554f46816 msm: camera: core: Add delay detection support
This changes is to detect workqueue and tasklet
scheduling and execution delay.

CRs-Fixed: 2977775
Change-Id: Ia4b4845a067c22bd1f24bd63a971d103fcfc049c
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-08-11 22:18:10 +05:30
Ayush Kumar
688f87e5e7 msm: camera: req_mgr: Increase one more request to apply in initial sync
For SW sync to work, CRM needs to apply the first 6 requests in
initial sync mode. This change is to increase the count of requests
to be applied in the initial sync mode.

CRs-Fixed: 3000684
Change-Id: Ic35d37ac727fc10ec113dd9f05074cec7a52e39a
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-08-11 19:16:22 +05:30
Depeng Shao
75a0aff96f msm: camera: reqmgr: Fix trigger count out of bound issue
Since the CAM_TRIGGER_MAX_POINTS equal to CAM_TRIGGER_POINT_EOF,
so we need to use CAM_TRIGGER_MAX_POINTS + 1 to define the
trigger count.

CRs-Fixed: 3007296
Change-Id: Ia0cefd8381417a4b7ecd8636796bf25df705101d
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-08-05 15:27:01 +08:00
Haritha Chintalapati
854ef5bbec Merge "msm: camera: common: Append workq name in log" into camera-kernel.lnx.5.0 2021-07-27 22:12:54 -07:00
Haritha Chintalapati
2c70bb0fa0 Merge "msm: camera: reqmgr: Notify devices on link stall" into camera-kernel.lnx.5.0 2021-07-27 22:10:12 -07:00
Haritha Chintalapati
5971e01fa7 Merge "msm: camera: reqmgr: check link state before taking mutex" into camera-kernel.lnx.5.0 2021-07-27 22:09:31 -07:00
Sokchetra Eung
ba664cddff msm: camera: common: Append workq name in log
Append workq name in workq delay detect API to identify
which workq is scheduled late. Create workq name macros for
cci and cpas to pass to workq delay detect API.

CRs-Fixed: 2994927
Change-Id: Iebc14520b918272e92b59c900de5fe17f38a2406
Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
2021-07-26 17:43:37 -07:00
Karthik Anantha Ram
4ebcff0692 msm: camera: reqmgr: Notify devices on link stall
Notify all the connected devices, when the link is stalled.

CRs-Fixed: 2841729
Change-Id: I08cbb587071f4bfd6e1cdefddffb66a83ba8c187
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-07-26 09:35:25 -07:00
Tejas Prajapati
29e76ca7d2 msm: camera: reqmgr: check link state before taking mutex
In case if the destroy session is processed first it will
as a part of unlink try to drain the work queue. This will
schedule all the enqueued wq. Workqueue when scheduled
try to acquire same mutex destroy session has already acquried
this will lead to dead-lock. To avoid that, check the link
state first if it is in idle state then return from the
workqueue without trying to acquire mutex.

CRs-Fixed: 2976325
Change-Id: I57a53455c69e5f4f38c92413f9d1b7f2d06c9960
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2021-07-24 07:55:00 -07:00