Add warn log to indicate shutdown has occurred.
Also decrement the open req count after successfully applying
a request.
Change-Id: I1b420dff52e016f52e19c5572824e4ed6f53744b
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
If the resource for which BUF_DONE event has come is already
signalled in the oldest request, this BUF_DONE could be for
the next request in the list. This can happen if the IRQ
handling for BUF_DONE is delayed and by the time it is handled
if the resources for the next request are already signalled
along with other pending resources for the oldest request,
we might handle resources which corresponds to next request
first. If we do not look into next request and thus if we
ignore these BUF_DONEs, we will never be done with the next
request.
Change-Id: I1b20aff0a68172bc8794d2c37f088ba2539d173d
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Use pr_info for camera warning and error logs to avoid sending
to console (assuming info logs are disabled to console).
All camera warning and error logs are anyway tagged with
CAM_WARN and CAM_ERR, so using pr_info doesn't cause any
information loss.
Change-Id: Ib23fbad47c1dce4c45e3413d775303d681a1ff86
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Shutter notification must be sent when moving request
to free list if it was not sent out earlier due to
missed EPOCH IRQ or delayed EPOCH IRQ handling.
Change-Id: I9b3b039827bea24814fbea34e61abfc938f6bf2d
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Currently EPOCH IRQ handling is at a higher priority
compared to RUP IRQ as RUP is fired at bus level. If
RUP IRQ is not scheduled for handling by the time we
receive EPOCH IRQ, EPOCH IRQ will be processed first
and this will lead to missed SOF notification as the
active request list might be empty. This change sets
priority of both IRQs to the same by utilizing a new
IRQ controller that is tasked with handling RUP from
BUS. BUF_DONE is also subscribed to the same VFE top
level BUS_WR IRQ but with a lower priority. IRQs for
CAMIF Lite and RDI are subscribed to only if the ctx
is RDI only.
Change-Id: Id844ffe291e21ecfc7f7ed6fc53baf7e79dd2184
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Correct some Makefiles and drivers header inclusion.
Change-Id: Iec3e6e0333ae55e8f1cff9780723e0dad954ff83
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Currently we can infer only the pd of the device whose request
was not available on time leading to a frame skip. This change
identifies and logs the device name to ease debugging.
Change-Id: I49a3cd84611b21626c68395b11f0ef52bffb62db
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
IPE/BPS frame process data keeps changing one needs to update the
kernel hfi header accordingly everytime. This change avoids
accessing those structs in the kernel. Userspace will ensure
resetting the struct to a default value.
Change-Id: If224befa89643f44997bb6e826f8dfcfac5d08d1
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Certain register values are required by user space during flush
to apply settings accordingly. Also, support for dumping registers
at the time of error is needed for debugging. Add support for
dumping register values in a range of offsets to given cmd buffer.
Change-Id: I5912118809f7a7dd701a555639d1057ffe665ce1
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
For debugging, there are a set of register values that user
space needs. Based on the offset and range given, values can
be dumped into an out buffer to be further processed. Add
uapi support for this reg dump.
Change-Id: I6e6f89625a505158a6bf8932ebb9d0ae78bf0129
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
If bubble report is set from usersapce we move the active
request back to pending request list while handling error.
We need to iterate through pending request list as well
when dumping page fault info for erroneous request.
Change-Id: I2458313affbae6cb161f077eef7bdd0263c43ae2
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
This change add config support for LITO target.
Change-Id: Ia4a191c862f9886bb35fbd792ae786d027d5cc7e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Userspace is sending slave address as 32bit, and in order to parse
the correct data kernel space needs to match this bit pattern.
This change updates the structure to accommodate it.
Change-Id: Ib136bbd1656dba9da75d3b07c494caeebf03dfcb
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Add uapi support for IPE/BPS semi real time device types.
Change-Id: I12c733f51afdd70159f22f23be5967fc852549ca
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
This reverts commit 6094f6654bd6ddc7f6df54b19cb8e6697bf3111c.
The change introduces a lock around a code that can cause sleep.
It results in abnormal operation of camera functionality. Reverting
this change will lead to original problem of stability. That need
to be addressed.
Change-Id: I3899d6992350bc466e89ee1ca1834a8a7fbd0269
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
This change updates the scalable clock based on
hw src clock. Also, removed cam_soc_util_get_vote_level()
as it is duplicating the functionality with
cam_soc_util_get_clk_level() api.
Change-Id: I001264d150849770ef664ecc206a66f8a4f54412
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
This change moves init request out of pending list before
starting hardware. Currently if we receive the first SOF and
RUP IRQs before start_dev routine has completed, we miss
pushing out the init request to free list on the first RUP as
wait list will be empty.
Change-Id: Icd53e0ebe0d12e264172058d836e6ccfcb7df0c2
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Query secure camera capability from fuse, and enable only
if supported.
Change-Id: I4ff3c5afbf7c924368c95af5517a047149124c3e
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Power off the sensor if no gpios at the time of power on, since
some regulator and clk need to be released.
Change-Id: Ie200459276b5327a1627e8839ec404c3c26f4205
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
With the increase in the device handles, the corresponding
link info structure is changed. Handle setting up link
based on the right structure version.
Change-Id: I0d21866ba0bc4abfe78941e191688773441ce03f
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Increasing the device handles to 128 to support more
pipelines.
Change-Id: Id0322cba095091e6168d8541d432628d8422a641
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Fix array index validation number of axi ports while
setup/cleanup axi related settings. Also validate the
array index for slot index for CRM and updates operation
accordingly.
Change-Id: Ic42939b7c59a5602b82a19f558030552bf3c0b72
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>