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>
Use CAM_PERF logging group while printing logs related
to clock, bandwidth updates.
CRs-Fixed: 2523062
Change-Id: Icaa912ae308c307d55e318c0861850093d0ee456
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Various drivers are using right shift by 32 to check if dma address is
32 bit addressable. This will result in shift count overflow in 32 bit
arch.
CRs-Fixed: 2543730
Change-Id: I57e30bc9c0a8179c8d74f3bd3b6567bdfff60741
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Device enable flag is getting set after configuring the CSID csi rx
and csid path configuration. If irq comes after configuring the csi rx
hardware then irq handler is not handling as it is checking the device
enable flag. So set device enable flag after enabling the hardware.
CRs-Fixed: 2541840
Change-Id: I022b6dccef4153c34bc8cf99e7a18e2978f92d3f
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Improve sp substate logging to print state string
instead of value. Add handler for reg_update in
bubble state to print a warning log indicate the
event.
CRs-Fixed: 2523062
Change-Id: I95c6f16733a177cbf33099775d8ef7eb049a62b4
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
This change limits SOF in early PCR log to the first
frame for that context. This log is needed to catch
unexpected reg updates on first frame after stream on.
CRs-Fixed: 2553728
Change-Id: Icad85aeab2b095a6b95889c933a2de34acebed80
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
This commit changes the isp context state to flushed state
immediately in order to ignore any further IRQs from the HW.
CRs-Fixed: 2546941
Change-Id: I47f4999a3f51b581697e8dbfd07ef1539b478766
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change adds packing format field for CSID in IFE Lite for
version 17x hardware.
CRs-Fixed: 2547147
Change-Id: Ib6b8331af6a425314a507e18486c1fffd819007a
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
This change removes duplicate add to port counters during
IFE acquire.
CRs-Fixed: 2546941
Change-Id: Ie42838a2e66200a5a52cc27600bd25e430c0e3f0
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change adds a log for first SOF in early PCR.
CRs-Fixed: 2546941
Change-Id: Iaca8695f0886fecba84e40b06798818b3f864c35
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change removes line start addition to epoch line config.
After CSID crop is applied, the first line that CAMIF
receives is already at the required line and therefore number
of lines for epoch should just be half of the frame width.
CRs-Fixed: 2546941
Change-Id: Ib12b1fc96cedf140672af03862aaf4be65ab38d8
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Fix improper use of divide and modulo operator on 64 bit numbers.
Fix variable type to work with both 32/64 bit arch.
CRs-Fixed: 2543730
Change-Id: Ifa52d46dece3434d41308d284982a0cd8e17cd1b
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
ife camnoc debug registers need to dumped only
when bus overflow status is set.
CRs-Fixed: 2538876
Change-Id: I6f886f6e084380de62c0b4acaa48fa02fce01136
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
This change updates last applied request ID when init packets
are applied and when stop ioctls are invoked.
CRs-Fixed: 2539888
Change-Id: I113b7897740d6577a4757ce41f9fcb1fff8c56e9
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
We must deinit IFE input mux resources before the check for open
count. Without this change the last bus resource is the last to
enter this function when open count reaches zero. So input mux
resources are never deinitialized.
CRs-Fixed: 2545140
Change-Id: I355afce7d631cdb00e3f6da0ba0be40c2e2b63a2
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change disables early eof strobe for version 480 hardware
due to hardware limitation.
CRs-Fixed: 2545140
Change-Id: I727ba5950911caac76cd2046e9e7c1e6d7ca6d96
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change sets error type to fatal by default when hardware
errors occur.
CRs-Fixed: 2545140
Change-Id: Ic530fe460e67b6d5ec26a6d9d5735f4c8b34affc
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change adds tasklet index to logs which shares a one-one
mapping with ife hardware manager context ID.
CRs-Fixed: 2545140
Change-Id: I879662c9d90e98c604d20d975b4973369ac7a41e
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change adds a log in flush to indicate stop/restart HW complete.
CRs-Fixed: 2545140
Change-Id: I0068f239c5efeb536d60a9de27577d46bdc66edd
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Print the split id correctly as part of the acquire
failure dump.
CRs-Fixed: 2541667
Change-Id: Ie7156e35458027e24cea1993e487bfe38fcc2324
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Interrupts in activated state machine are already
protected with spin_lock for context. No need to
reuse the spin_lock in interrupt handling routine.
CRs-Fixed: 2538876
Change-Id: Id86e7dc3419861cb8bce143c56923126a3dc3d3e
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
In certain scenario Buf_done failures are observed
for the request which is in bubble state. Since we
never get bufdone we inadvertently are stuck
in Bubble state. This change will wait for a period
of two frames to receive bufdone and recover from bubble
state. If any bufdone IRQ is never generated within this
time period, we remove the request from active list and
add it back to pending request list.
CRs-Fixed: 2506159
Change-Id: Ibcce21a1a87d0a64e49c6454391ca139fc7d1fa7
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Return different error number when new requests and update
packets are rejected due to bad request ID. This allows
userspace to differentiate this specific reason for failure.
CRs-Fixed: 2518451
Change-Id: I0400c6f2b2e0baf99bee4b4a3736bb1eab646627
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Gralloc allocated buffers are aligned before calculating
stride, which can lead to corruption in frame based mode.
This change programs RDI clients in line based mode when
the output format is PLAIN_16 to prevent this. RDI clients
support only PLAIN128 packing format and this change also
enforces that.
CRs-Fixed: 2513939
Change-Id: Ic079e4cfd34cb4a9a0edc1152ff40565cdab2a81
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
During second init request of EPCR, number of reg dump
buffers was set to zero causing no reg dump. Add fix to
ensure value is updated to ife ctx when it is non zero.
CRs-Fixed: 2532096, 2532101
Change-Id: Ic16001314522cc5b227fc3c33d899c719fbaeacd
Signed-off-by: Mukund Madhusudan Atre <matre@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>
This change adds packing format field for CSID in IFE Lite for
version 480 hardware.
CRs-Fixed: 2537287
Change-Id: Ifa46b07218fefe46721f99e65291837500c413de
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change removes enabling CAMIF and CAMIF Lite module config
programming by default. Henceforth these settings must be
programmed by the userspace by adding them in command buffers.
CRs-Fixed: 2513939
Change-Id: I739a57a392974056f358820f77bc2ae40451d9d6
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
This change sets primary RDI source and out resources for a
particular RDI only Context. This information
is utilized during start HW resource to tell the driver
if it should subscribe to IRQs.
CRs-Fixed: 2521064
Change-Id: Ia5567b4432603db993c4783e60721be144c619f9
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
This change adds a check for last flush request ID before adding
bubbled request to pending list. This prevents the request from
sitting in pending list indefinitely.
CRs-Fixed: 2533433
Change-Id: I82d641d42fe507e8eabf0bee0e9a2f0b98d9a802
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
If RDI only context has two rdi ports enabled, then register
single irq handler for both ports.
This change help registering only one irq handlers for
rdi only context.
CRs-Fixed: 2521064
Change-Id: I201cf62b73dbfb20636821213afc7f2a4d6cf13c
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Do the initial sync by SOF timestamp, if the gap
between the initial SOF of link and the last SOF
of sync link is less than half of frame druation,
CRM should abandon this frame since this frame
should sync with next frame of sync link.
CRs-Fixed: 2492019
Change-Id: I204e3ed49bcf4ac7424aaf5109ad5ce3bc3a2789
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Updating same DMI bank, which is consumed by HW, can result in
violations so during bubble recvery skip updating DMI config.
CRs-Fixed: 2511286
Change-Id: I1af2dbf2f1b49afcd4276d3f5759e5ba6d8da637
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
This change adds support for RDI crop in dual IFE usecases. The
crop window for RDI is obtained by combining left and right IFE
crop windows and width is calculated based on the crop window.
If crop or drop is needed on RDI, decode format should not be
programmed as payload only in order to enable RPP subpath.
CRs-Fixed: 2513939
Change-Id: Iaaf64784372ef918802a684b33e16845fd7d2b3b
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
In case of page fault for first request, page fault
information is not dumped since we are not initializing
member variable in case of init request.
CRs-Fixed: 2498880
Change-Id: Ie9ecda7434028e396392f3ac905ae80ae6ad6376
Signed-off-by: Prakasha Nayak <pnayak@codeaurora.org>
As part of cpas start, all drivers will now request for
LOW_SVS as opposed to SVS. The drivers also scale the AHB
vote based on the corresponding HW's src clk voltage.
CRs-Fixed: 2507919
Change-Id: I7fd35e9dd298deb1603812f39d50e4e9390b3aac
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>