Add support for IFE2 hardware in ife hw manager, bus files.
CRs-Fixed: 2571273
Change-Id: I6193b70707b15282b8d819e8dda5eb2e5fc4c345
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
This change adds a check to validate the cid being acquired,
when custom HW is in the pipeline.
CRs-Fixed: 2524308
Change-Id: I32913e74bc946a4333f77f5e10757c4bd51eab67
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
This change removes the VFE reset type override that
was introduced to a hardware limitation that has since
been rectified.
CRs-Fixed: 2590331
Change-Id: I2232ab69a9c66e9e14dd849755d8b4eba63fe136
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change reduces the duration of wait for config done during
stop and flush. We perform wait for completion once for reg
dump during flush so there is no need for a long wait during
stop.
CRs-Fixed: 2606911
Change-Id: Ib1c2d7655d8a213495618a140acea2391b262082
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
CDM driver read the user_data reg to inform CDM's clients
about the request status being served. If before clearing
the IRQ, the value of userdata register gets updated, then
CDM will not receive another INLINE_IRQ for the updated
userdata.
This change will make sure that another interrupt is fired
by clearing the IRQ first and reading the userdata later.
CRs-Fixed: 2581559
Change-Id: I74edf1b8439ae2f88f30b6c2fdbf9ac9f3742503
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change adds logic to stop IFE hardware in case of
hardware errors.
CRs-Fixed: 2590331
Change-Id: I86773cc44ce890cea47f19f0482761e686b0cd00
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Clock gating must be disabled at top level initialize
hardware routine as VFE is reset after resource level
initialize hardware routine.
CRs-Fixed: 2590331
Change-Id: I5c51c402a3a6076f056368493b774daa199228aa
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Enable rdi interrupts from the required sources only,
other unused interrupts from rdi sources should be masked.
Also in the case where multiple rdi has been acquired in
same context interrupts from only one of them should be
enabled.
CRs-Fixed: 2590476
Change-Id: Icd074d1566db0b758d25c7b127402b424e48efd9
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
The EPOCH at which bubble is detected no setting is applied
to any device. This change will trigger applying the bubbled
setting to the device with highest pipeline delay.
CRs-Fixed: 2564669
Change-Id: I180b4a1d2d29267f330546b8860a099baf1688e9
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Use unsigned long to capture the return value of
wait_for_completion APIs as part of CSID path reset.
CRs-Fixed: 2600604
Change-Id: Ic21ddf283180a177b2c2d9e9a33fec4ec68bdd98
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Reset the slot with the valid request on receiving
the buf_done which is reported on next EPOCH.
In case of back to back irqs slot is marked as skip idx
it will apply the request and try to reset a slot based
on MAX_PD + 1 calculation which might have the request
for which we have got a bubble. To make sure this does not
happen, reset a slot only on the buf_done for valid request.
If STOP ioctl is called from UMD for ISP, it will flush all
the lists. But this is not notified to CRM which might have
a stale entry of the half applied request, so on STOP ioctl
clear all the slots.
In case of SAT mode if one of the link has generated bubble,
while the sync_link has the sync_request slot reset sync_link
will not let the link recover of the bubble. To make sure the
recovery sync_mode is set to 0 for two consecutive slots of
the link.
CRs-Fixed: 2551701
Change-Id: If4b6f8a4a831ffddcef2cae6292d066778c18b04
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
When epoch comes along with RUP we report bubble as per current state
machine. This was because in camif_bottom_half handler we are handling
EPOCH before RUP. This change prioritize RUP over EPOCH and EOF over
SOF to handle race.
CRs-Fixed: 2567120
Change-Id: I236bcc44b609f8ef7f963f19d33d46a3d95ba0d2
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
Isp bus port secure mode not coming properly. Added proper
logic to get the bus port secure mode correctly.
Use secure iommu handle to get secure buffer for ope.
Add spin lock for tfe irq handler.
Use proper bw structure to copy the user send blob
data.
CRs-Fixed: 2594541
Change-Id: Icb8ecf869681c370efa084991505036f90a35065
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Adding fixes to set IRQ mask after reset and strings to
print OPE CPAS PATH enums.
CRs-Fixed: 2594541
Change-Id: I5873b8b0494623c36ca94edf7a26cc952fbb5e68
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
Do not read the hw register to update the bus width.
Update register with stored height and user space given width
Update the tfe core irq command register after clear the registers.
CRs-Fixed: 2594541
Change-Id: I3fd9e0ce4319cd19b94e9c83fa63aab37f26027e
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Arm arch does not support dividing 64 bit integer, replacing it with
do_div call.
Fix variable type to work with both 32/64 bit arch.
CRs-Fixed: 2594541
Change-Id: I6b30f089bc998e98c7f2e20dc7fc11eedf6e6bc7
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
User space will send HBI and VBI values for tpg. Configure the TPG
HBI and VBI values based on the user space given values.
If user space does not send then configure the default values.
Assign the isp context variable in the hw update data during the
tfe hw config. Update proper comp group id for slave tfe.
CRs-Fixed: 2594541
Change-Id: I2771d3c663c0fcb58306952f161c11a473846f8d
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
TFE is thin front end hardware that capture and process the
real time image. Support is added to enable the TFE
hardware.
CRs-Fixed: 2594541
Change-Id: I0ab2eff7924e9e01f6a0fcec772d3a7dda229b37
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Different CDM hardware have different capability and registers.
With old register space, handling new features and operations
would have been a complex task. This change takes care of old
version of CDM and also changes the regspace to provide every
register's access to CDM.
This change further adds support for "arbitration" in case of
multi-context CDMs.
Exports reset functionality to clients, detection of CDM hang.
Flushing the CDM requests and dumping the FIFO content for all
contexts.
It also adds submitting "debug_gen_irq" as BL_done IRQ is only
an indication for availability of FIFO's. The AHB operations
are completed can only be known if the added "debug_gen_irqs"
gets executed and are received by the CDM.
CRs-Fixed: 2594541
Change-Id: I9846b1c5320ba652c5d3b7d83d616d2dabc843e1
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Hardware manager resource is generic. Move the resource definition
to isp hw manager so that it can be used by other hw manager.
Remove the parent and child graph in the hardware manager resource
as it is not used. Use the common isp resource type everywhere.
CRs-Fixed: 2594541
Change-Id: I41d49af0855f3bd3768450d850b1284ff1e3fea9
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Program hw_sync_sel field in core_cfg register
in case of dual ife.
CRs-Fixed: 2582959
Change-Id: I8a60cb06991738872c4caf0120ea21e5954d208a
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
The platform register requires dt match string for csid to probe
and correct cpas hw version is required for vfe to function. Add
dt match strings and hw version checks in csid and vfe.
CRs-Fixed: 2584631
Change-Id: Ieb2766fa6243bf4133b43f657a18aed7f04447be
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
For some targets, there is a requirement to have the lower IFE
as master. Current implementation selects the higher IFE as
the master.
This commit changes the acquire logic to reserve the lower IFE
first and then the higher IFE as slave. This logic is for dual
ife use cases. For single IFE use case, acquire logic is not
changed.
Also, removes the hard coded check for master hw index
during the irq handling. Stores the master hw index
in ife hardware manager context and check against it.
Change-Id: Ifd3a28e80a0a4d16e3d9278b7ed61290c620ec79
CRs-Fixed: 2582959
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@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>
Old API's returning struct timeval and struct timespec will be
deprecated in future kernel versions as their tv_sec members
will overflow in the year 2038 on 32-bit arhitectures.
CRs-Fixed: 2564616
Change-Id: I6e3e37cf957daca992b66cad1134f49dd78961f5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
CSID hw register reset is done with the the help of
IRQ to make sure it is reset every time before we start
a new session.
CRs-Fixed: 2563958
Change-Id: I33c870003eb1e99d458b7650b5b3218f61cccd3b
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
While start hw, either a fresh start or resume after flush,
reset the overflow pending flag as we reset the hw and start
fresh with applying init packet. In case where overflow happening
at the same time as halt immediately, we set overflow pending
flag to true. Eventhough while halt immediate and resume
scenario, we reset the hw, not resetting overflow pending flag
causes not to apply any new packets while resume.
CRs-Fixed: 2565049
Change-Id: Ia9c871402343306945fe1b8f8373659e52630fe2
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Adding CRM interface to stop SOF timer from isp during flush.
During flush hardware is getting stop and will not send SOF
notification to CRM so need to pause SOF timer. Whenever SOF
timer will get expire,do not need to send error to UMD during
pause time.
CRs-Fixed: 2564389
Change-Id: I6d85f2c658c30dbe211f0ec9d83bca323a5c265b
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
The boot timestamp is calculated in tasklet context. Due to system
performance and scheduling delay, it may vary. It is somtimes causing
failure for few time bound test cases.
To handle above problem, This change also considers qtime difference
to calculate accurate boot time at CSID each SOF.
CRs-Fixed: 2557758
Change-Id: I36b21a0f2c12cc1c83c209ab01ea90c0ac226995
Signed-off-by: Alok Pandey <akumarpa@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>