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>
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>
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>
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>
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>
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>
Only do self correction after initial sync.
CRs-Fixed: 3047181
Change-Id: I29d5a633984322d2383d48ba0956fc4e2e57f87f
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>