Add actuator subdevice to mako board.
Fix get ID for actuator subdevice.
Fix initialize of step table.
Change-Id: I935b999f929de2e8c5b148b41a2737242781cc14
Signed-off-by: Konstantin Motov <kmotov@codeaurora.org>
Added full set for ISPIF VFE1 registers support.
Change-Id: I4054f0cac7301dfb37e5215c9c0dd2817b7e90ca
Signed-off-by: Petar Sivenov <psiven@codeaurora.org>
Each VFE can be reset separate from the other. As this can happen during
the reset of the other, it is not reliable to wait on a single
completion.
Also this change completes VFE1 reset_complete on reset done IRQ.
Change-Id: I37177df4d15f04a7fad81b0f62544cd7b50e9d92
Signed-off-by: Vladislav Hristov <vhrist@codeaurora.org>
The flush function is enhanced to avoid queueing to HW. Instead
directly the frames are sent to userspace.
Change-Id: If5458009a71e8663d2390f434e25dd0f5dc66eeb
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
Fix conditional expression in error handling code on the
camera initailization path.
Change-Id: Ic41e98f389b13c38dc123f0ffa508c558b6e9eda
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Store all queued buffers in a protected local list
in the stream strcuture. All subsequent hardware requests
for buffers are fulfilled from this local list. This was done
becasue there was no staright-forward way to protect the inherent
vb2 queued_list.
Change-Id: Ib4f83d4eab933104a6c0fd45ef02ca8010f3dfe3
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
When two ISPs are used simultaneously, there could be
maximum of 7 image and 7 statistics output from each
ISP. Increase the maximum number of buffer queue to 28,
since two ISPs share the same buffer manager.
Change-Id: I74fab1dd6091b61db0885dd04b129accd3e81d73
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
When the second ISP open, the buffer manager should not
be initialized again. This change allow buffer manager
to be shared by two ISP.
Change-Id: I401196296dcc8b4d1eb3056c07f9b5f79c9529d0
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Updated the DMI 64 bit write to fix issues while writing
both high and low values.
Change-Id: I073bf6aab0cc7ca8789729b62519bb034a5e0deb
Signed-off-by: Nagesh Subba Reddy <nageshsreddy@codeaurora.org>
QOS settings should be initialize after hardware reset.
Fix that.
Change-Id: I159da1729ec5f238345e5e7de0a3fab14aa8a838
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
This change adds support to read the HW information and use it
to select FW version.
Change-Id: I8ce11341f87b61668f907e969e07bdde5601c066
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
VFE and CPP shared the same bus port, thus CPP
driver cannot request its own bus vector based on the frame request.
Increase bus bandwidth request in ISP driver since the frame should
pass through both driver for all usercases for denoise operation.
Change-Id: I3748be6b52516cb7e147eade14e9fcab71de10d4
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
This change is required so that all pointers get
re-initialzed to NULL when their memory is freed. Doing
this helps in preventing double frees and incorrect
memory acceses.
Change-Id: Idbef3371c1f145c1407aa626f599e634146b662d
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
The return value from the get stream function could be
an error pointer. Hence, it is not sufficient to do a
NULL check on the return value. Instead we need to pass
the pointer through the IS_ERR_OR_NULL function.
Change-Id: I32afbbc53a3b67cc75472db56173f640e9c398e3
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Upon every buf done, we should set the msm_vb2 buffer's in free_q
field to zero, like we do for every put buf. This is in consistence
with the design and ensures proper buffer circulation.
Change-Id: I484d400b55d57afa957ef90ce4b303cffeb74d5b
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
This change removes the unused subdev ioctls that are resulting
in a mutex being locked in interrupt context.
Change-Id: I7e6d8148dcf786a07cd7d94e0eb420914f95609f
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
The ION handles were not properly released. This change releases
the ION handle after hardware acknowledgement.
Change-Id: Ie3a86e23837a94a1b15d6e2cf2029da3e1c4e1ec
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
This change adds the list traversal itself into the mutex protected
critical path, instead of adding just the list delete operation. This
provides better synchronization in the list used by multiple
streams.
Change-Id: I672acad45316a86e274790c534e47ec86052227d
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
The list in the generic buf manager may be operated upon
bu multiple user space processes. This calls for all list
operations, namely add and delete, to be atomic operations.
Change-Id: Ie6caf3e3a3704d0beabb41702e0d165deec73ff7
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
We keep a counter in csid interrupt handler to track
SOT. But when we try to disable SOT bit after a number
of frames, we overwrite some bits which are being used.
This change works around the issue.
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
For thermal mitigation, the ISP needs to reduce the
throughput to the bus by dropping frames output from
the ISP. This change add the configuration to update
the skip pattern when the ISP is running.
Change-Id: Icfd79300ecbdc15297d5b0d948380ed1d2961719
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
This change aligns ISP 3.2 to new ISP driver architecture,
and takes care of version specific register configurations.
msm_vfe32_process_stats_irq is replaced with common
function msm_isp_process_stats_irq.
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Add a spinlock and a boolen wait_timeout to protect shared resource
between IRQ handle and userspace IOCTL access. There should have no
complete if timed out or interrupted.
Change-Id: Ibf28da252fb665e997c89344a85a817ed14c5b81
CRs-Fixed: 452849
Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>
Enable compilation of LED flash driver so that v4l2 subdev node
is created by driver. This node shall be used for configuring pm8941
LED device for camera flash functionality
Change-Id: Ia2ddc875bfdcaed91930a53b5b49af256c7474e8
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Add parsing of LED flash property in camera sensor driver. If camera
sensor supports LED flash functionality, led-flash-src property
shall point to phandle of respective LED flash device.
Change-Id: Ic94c166d02cd77cff68dff427c5706b267eb7714
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Pull HIGH STANDBY gpio pin to enable auto focus functionality for
S5K3L1YX camera sensor on 8974 fluid.
Change-Id: I9a9ebbb4857f9c141eaaef73c7c9f4245e4fd6ef
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
The get_buf list has buffers based on session and stream id.
While buf_done, we have to find correct buffer from list.
Change-Id: I72a90730558dcf04fa8064cda41b550436ec3f88
Signed-off-by: Jignesh Mehta <jigneshm@codeaurora.org>
When ISP stream is enabled or disable on the fly,
the ioctl is blocked until there is a register update
ack. If the ack does not come, the ioctl will timeout.
The return value for sucessful case should be 0 instead
of the jiffies remaining before timeout.
Change-Id: Ie549b7a0b75160d3c96f336c8a6a072e35c1ab43
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Post proc module needs monotonic clock for buffer done.
Change to send monotonic clock when buffer is diverted
to userspace.
Change-Id: I2a973e66dc06a629290b14ca071c980d8a164ab2
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
ISP send V4L2 events to userspace for processing,
buffer divert events are stream based and image statistics
events on based on statistics type.
Add support to allow events subscription based on
stream index or statistics type.
Change-Id: I2a3399754b746acf105612a048e1b6a121f652b2
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
For burst stream, framedrop registers need to be configured
on the fly to stop the hardware once the burst capture is done.
The framedrop information is calculated when the stream is requested.
This information needs to be stored separately, so that it can
be reused when the burst stream is started again.
This change add variables to store calculated values.
Change-Id: I7836e3a8e5c5bb5588de1ac9bfed566fc470a642
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
When stream is requested but not started, framedrop
update should be ignored otherwise when the stream is
actually started, the framedrop count will be incorrect.
Change the logic to check if stream is active before updating
framedrop count.
Change-Id: I3cd7e045f904ee55b0369dbe140bc5f0a9d252fa
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Frame id is incremented for each ISP input interface,
for ISP pixel pipeline, there are four different output
interface, therefore stream source does not match with input
interface. This change convert stream source to input interface
to get the correct frame id.
Change-Id: I03620ef83638bc43a455df5144aa2ba7d81ca437
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Return error from ISP driver for proper error handling
Change-Id: I59d32527cb878adf592223b1d44cf7b732374355
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Increase latency buffer for bayer grid and bayer focus statistics
to fix bus overflow issue related to statistics write masters.
Change-Id: Ie2a7fb177d933ec26c1879fa3bbc63a384ce4a87
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Split raw dump interface configuration from stream
configuration to align with other ISP input configuration.
Add image formats to differentiate MIPI raw format and
Qualcomm raw format.
Change-Id: Ieefc4401ff5142682d7891debfe041ae6bd44145
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Certain camera features need realtime clock for
calculation. This change add support to store realtime
clock and send the timestamp for userspace notification.
Change-Id: Ifa565a0d888e34a47c5e6e9e0a849c767e0e7e09
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
This change adds necessary state and IOCTL interface for correct
sequence of firmware loading. This also helps to avoid redundant firmware
loading.
Change-Id: I1aff000b36bfe0fbe2fabb01b9a23e1f86bf1a88
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
Add driver for Camera Post Processing hardware. This
module is responsible for supporting scaling, cropping,
rotation, flip, wavelet denoise and Sharpening features.
Change-Id: I4b130a5e53d40f96186992d540b93bbf4f8e628f
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
In recording, timestamp is checked by video layers,
to validate frame. Add support for timestamp in
vb2 buffers.
Change-Id: I6f93dd89f39b8f5db26c100c3838cb479f23a8cc
Signed-off-by: Jignesh Mehta <jigneshm@codeaurora.org>
A spinlock is shared across streams. This causes problems when two or
more streams are invoked, as the spinlock will be re-initialized.
Fix this by using a per-stream spinlock.
Change-Id: Ic70d588c6c1b09a70ff50eb2ad5f9590f5960f0e
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
During burst mode, when ISP need to capture one burst image.
Only one buffer is allocated. Both ping pong buffer
should be configured to the same address.
Change the buffer management code flow to fetch new buffer
when there are free buffers avaliable.
Change-Id: I5b7c19e1986bd670904fa326943699a89f00d4b8
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>