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>
Having a global variable and using the same for all devices
will overwrite the name of previous device. Use pdev name
to be consistent and helps in debugging logs.
CRs-Fixed: 2901925
Change-Id: I086f3dbd12e720c5e6497355eae40ca242d3d408
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Apply the flash at EOF and apply the other devices
at the EPOCH of next frame, then the flash can
cover all the exposure zone of current request.
Add the inject delay for SOF and EOF separate,
then we can use inject delay for more flexible
frame skip control.
CRs-Fixed: 2820683
Change-Id: Ic6a58327a0ae44c54190884ba42ea7926ec7c90e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Enable these format measure error IRQs by default in CSID.
CRs-Fixed: 2830502
Change-Id: Ic9703be3fb2672487ee6f135a41ee6454a393203
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
In current implementation, cam_ctx_req has a array of
hw_update_entries, in_map_entries and out_map_entries. Each
context has array of N requests. Memory for all contexts is
allocated during probe. This causes a huge memory remaining
unutilized.
This commit moves the memory allocation to context acquire time
and freeing this memory during context release. In place
of using array, now dynamic allocation is used.
A top level calculation shows a memory reduction of around 2M-
2.5M with this change including all the camera drivers.
CRs-Fixed: 2830502
Change-Id: Id63cf2a52272e2a419704dc95100694e384330c3
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Due to major hw changes in latest CSID680 IP block, refactoring of
CSID kernel driver is required.
To support the hw speciific driver, version based files
are added. One common file to support the common functionality
and common utilities has also been added.
CRs-Fixed: 2830502
Change-Id: If1e2a0835ce285f968f154d2da5595e882ae6ccd
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Add support for bubble handling in custom driver allowing
the custom block to re-apply bubbled request in sync with IFE.
CRs-Fixed: 2805278
Change-Id: I411d033f2470de3fab7587c7c019a933bda28020
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Currently when page fault happen, iommu driver callers camera
handler with CB details and iova address which caused the page
fault. With iommu iova address cam smmu driver finds the
closest mapping address for that cb and call the
corresponding driver to find the which port caused page fault.
This has limitation has page fault address always not mapped.
New approach is get the page fault ids from iommu driver.
Based on the Pid and Mid values, get the HW id and port ids,
go through all context which has this hw id and port id and log
the data. Once context id is identified, log the acquire data and
last consumed client address details. Dump the hw register data
in the given buffer. Send the smmu page fault event through
v4l2 queue to user.
CRs-Fixed: 2750690
Change-Id: I87c809b3229992c7c95655a4f3c6c70ebc035ae8
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Add SYNC_V4L_EVENT_V2 support in sync driver. As part of this
change, added the reason code field as part of sync event header.
This failure reason code is filled by camera kernel driver and
propagate to userspace.
CRs-Fixed: 2750553
Change-Id: I206d0d51c38cfe4214814b89d241f51c1f50605b
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Improve the error-handling code paths to prevent accesses to
uninitialized variables. This is done by either picking a sane
default for the variable or skipping accesses altogether after
an unsuccessful attempt to initialize.
CRs-Fixed: 2748220
Change-Id: Ibe383e56ec4e3f45f76f619c7d6b62c3d7dfcadb
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
This change adds support to notify frame skip when CRM
not ready to apply a normal setting. Sensor and custom
device also want to update the HW settings in some
conditions even if a frame is skipped.
CRs-Fixed: 2691642
Change-Id: Ibd2b22655d0f6b6c90663df75a0f5fad8565e918
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Enable custom driver compilation on lahaina and few minor fixes
in custom HW driver.
CRs-Fixed: 2716300
Change-Id: I6f9ead5d2d67d91c14daf200ba12e95a1afec61d
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Add cpas interface to allow clients or usecase to select
different QoS settings based on requirement. Selection
API must be called before camera hw powers up.
CRs-Fixed: 2687917
Change-Id: Ie524fcd6131d7c42288d0d734a7cdf6b9fcb92b7
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Add support to handle SW sync & ZSLSnapshot. Add substate machine
and mechanism to handle the lifecycle of requests based on irqs
accordingly.
CRs-Fixed: 2524308
Change-Id: Ie5ba97d4ae1b38f4b44c2d3935d2882df59fcac6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
If there is a valid request CRM will apply that request to the
custom device, in scenerios during which there is no setting to
be applied to a custom device at a given epoch CRM needs to invoke
the custom device to program default settings for the next frame.
CRs-Fixed: 2524308
Change-Id: I4701c602ab68b9f64266f03a9b200d15a808165e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Due to the asynchronous nature of platform probes, inter
dependency between drivers needs to be taken care during
kernel boot up. Component helper provides the facility of
adding matching drivers in a list ordered in the way we want
to bind those drivers. The CRM driver acts as component master
to make sure all slave drivers are bound before it returns
from its own bind call. Add support for serializing platform
probes through component framework.
CRs-Fixed: 2584631
Change-Id: I345da1d2b9cccf6021ac6fc899143013b7714ec4
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Add support for immediate stop and reset during flush
for custom HW.
CRs-Fixed: 2585745
Change-Id: I542ac02f8d99c194efa498bc07dffae7879a6c8a
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
This change disables overflow recovery/detection for
custom CSID. Currently for QCOM CSID we enable overflow
detection and freeze on overflow. But for custom HW the
CSID needs to be free running, custom HW will take care
of handling any backpressure from IFE pipeline/DDR.
There is no need to backpressure to CSID in case of custom
HW.
CRs-Fixed: 2524308
Change-Id: I5de62eea0e87674d7ac24bb5ad2f11ff2a5a6b7c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Currently camera modules platform registration/remove function
is being called as a part of module_init function individually.
Building camera as module, current infrastructure cannot support
it, as DLKM only support single module_init/exit function.
This change enables that support by combining all platform
entry/remove functions centrally. Also, remove all submodule
makefiles and combined into one root makefile in order to generate
single kernel object file to dynamically loading the kernel module
in case of DLKM compilation.
CRs-Fixed: 2569808
Change-Id: I59db3ed6cef60123e474db2f222c39836056bd6e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Split the acquire in custom node to acquire device and
acquire hw to be in line with IFE for multicamera usecases.
CRs-Fixed: 2524308
Change-Id: I7be7d5227dcd304d095d7e3d7fac32800fecc199
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Adds fixes to makefile in order to support legacy kernel build systems.
CRs-Fixed: 2560543
Change-Id: Iab571871e5171aab501c41496cc09e3c5d942985
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
When the userspace issues flush, ISP driver needs to ensure that
wait and active list requests are flushed and corresponding
buffer fences are signaled with error. For active and wait lists
IFE hardware is stopped immediately. Therefore IFE must also be
reset to ensure that VFE BUS FIFOs are cleared. Start IFE HW
after receiving init packet again.
CRs-Fixed: 2513939
Change-Id: I9a35ce05c24d6b63016e264a870d376eabb2b56f
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
The client handle is obtained by providing client identifier
to cpas. Add identifier in custom hw registration for cpas
to recognize client. Also, improve identifier string
validation in cpas register client.
CRs-Fixed: 2528679
Change-Id: I924f5c98a8affa26753710fa542c1bb651d0af13
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
This change provides a template to add any custom HW
block.
CRs-Fixed: 2515662
Change-Id: Ie707c27950a330658cdaa4b64b7e304f4d62a5b2
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>