Flag warning only if the wait call returns 0.
CRs-Fixed: 2841729
Change-Id: I456da8a66ea69bcf671f55bd5f0459aab74476f5
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
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>
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>
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>
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>
'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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>