Commit Graph

306032 Commits

Author SHA1 Message Date
Mekala Natarajan
23760bfdf3 msm: qpsp6v2: Makefile change to build adsp_loader
Bug: 8204207

Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
2013-04-18 16:08:42 -07:00
Iliyan Malchev
f0283f1467 flo_defconfig: enable lid driver
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-04-18 16:08:42 -07:00
Iliyan Malchev
042d8afeca flo: add board support for lid driver
Change-Id: I713a37dca0200919b3e204e47d23638691c965a4
Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: paris_yeh <paris_yeh@asus.com>
2013-04-18 16:08:42 -07:00
hsuan-chih_chen
d6768814c1 flo: lid: add hall sensor driver
Change-Id: I0f8506f6e74d329b108dfb92f9604884636c9c9a
Signed-off-by: hsuan-chih_chen <hsuan-chih_chen@asus.com>
Signed-off-by: paris_yeh <paris_yeh@asus.com>
2013-04-18 16:08:42 -07:00
Mansoor Aftab
7dd2a48252 msm: camera: Fix copyright
Changing copyright to Linux Foundation.
2013-04-18 16:08:41 -07:00
Mansoor Aftab
1978f2bea4 msm: camera: Enable compilation camera v2 compliation for flo
Change defconfig file for flo to use camera_v2 driver, also
fix compilation issue for non SEKONIX Actuator.
2013-04-18 16:08:41 -07:00
Konstantin Motov
986586383e msm: camera: Fix AF for ISP32.
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>
2013-04-18 16:08:41 -07:00
Mansoor Aftab
c943f419ca mako: Add actuator info in sensor info
Change-Id: I5bbae4c3f0fc0ae951ca59354407563b60d1658f
2013-04-18 16:08:41 -07:00
Petar Sivenov
3807b4005f msm: camera: Added support for VFE1 in ISPIF.
Added full set for ISPIF VFE1 registers support.

Change-Id: I4054f0cac7301dfb37e5215c9c0dd2817b7e90ca
Signed-off-by: Petar Sivenov <psiven@codeaurora.org>
2013-04-18 16:08:41 -07:00
Vladislav Hristov
a2ef977f73 msm: camera: Use a new reset_complete per VFE
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>
2013-04-18 16:08:40 -07:00
Rajakumar Govindaram
0eb5e8fab2 msm: camera2: Enhance flush queue interface in cpp driver
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>
2013-04-18 16:08:40 -07:00
Stepan Moskovchenko
582fd4c11d msm: camera: Fix broken error handling
Fix conditional expression in error handling code on the
camera initailization path.

Change-Id: Ic41e98f389b13c38dc123f0ffa508c558b6e9eda
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2013-04-18 16:08:40 -07:00
Rajakumar Govindaram
8e504d82b1 msm: camera2: Fix to flush the queue in cpp driver
The kernel driver supports flush interface to allow flusing
the queue.

Change-Id: I4f71a53cf9d384a1ce3b27d6bd10874ca9f45189
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
2013-04-18 16:08:40 -07:00
Ankit Premrajka
06236b1ed9 msm: camera: store queued buffers in local list.
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>
2013-04-18 16:08:40 -07:00
Kevin Chan
892b43a7d2 msm: camera: Increase max ISP buffer queue
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>
2013-04-18 16:08:40 -07:00
Kevin Chan
a2be4e2218 msm: camera: Add open count check for isp buffer manager
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>
2013-04-18 16:08:39 -07:00
Nagesh Subba Reddy
40d40c8579 msm: camera: Fix DMI 64 bit write
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>
2013-04-18 16:08:39 -07:00
Kevin Chan
9a5ea8fb45 msm: camera: Fix for QOS settings
QOS settings should be initialize after hardware reset.
Fix that.

Change-Id: I159da1729ec5f238345e5e7de0a3fab14aa8a838
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
2013-04-18 16:08:39 -07:00
Rajakumar Govindaram
4350f3254d msm: camera2: Add support for HW information based FW load
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>
2013-04-18 16:08:39 -07:00
Kevin Chan
ae6e1e8f18 msm: camera: Increase ISP bus vector
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>
2013-04-18 16:08:39 -07:00
Azam Sadiq Pasha Kapatrala Syed
0a8986a96f msm: camera: Replace kfree with kzfree
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>
2013-04-18 16:08:38 -07:00
Ankit Premrajka
b3e9bfdd67 msm: camera: fix error check in msm vb2.
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>
2013-04-18 16:08:38 -07:00
Ankit Premrajka
a16c7db167 msm: camera: fix bug in camera msm_vb2 implementation
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>
2013-04-18 16:08:38 -07:00
Ankit Premrajka
ab4d38407e msm: camera: prevent mutex lock in interrupt context.
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>
2013-04-18 16:08:38 -07:00
Rajakumar Govindaram
2b020310a8 msm: camera2: Fix ION memory release in cpp driver
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>
2013-04-18 16:08:38 -07:00
Ankit Premrajka
b311463563 msm: camera: include list traversal within lock protection.
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>
2013-04-18 16:08:37 -07:00
Ankit Premrajka
71768f6c00 msm: camera: protect list operations around a mutex.
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>
2013-04-18 16:08:37 -07:00
Shuzhen Wang
59174d3e95 msm: camera: Fix random no SOT issue for CSID
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>
2013-04-18 16:08:37 -07:00
Kevin Chan
9082dd9c95 msm: camera: Add support for runtime framedrop config
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>
2013-04-18 16:08:37 -07:00
Shuzhen Wang
d6de497145 msm: camera: Align ISP 3.2 to new driver architecture
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>
2013-04-18 16:08:37 -07:00
Shuzhen Wang
637cba2cfd msm: ispif: Protect shared resource
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>
2013-04-18 16:08:36 -07:00
Sreesudhan Ramakrish Ramkumar
c806eefbde msm: camera: Enable LED flash driver on 8974
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>
2013-04-18 16:08:36 -07:00
Sreesudhan Ramakrish Ramkumar
51572b65de msm: camera: Add parsing of LED flash property
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>
2013-04-18 16:08:36 -07:00
Sreesudhan Ramakrish Ramkumar
13ae9f786f msm: camera: Enable auto focus functionality for S5K3L1YX
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>
2013-04-18 16:08:36 -07:00
Jignesh Mehta
bbc17ff7d5 msm: camera2: Check session and stream id support
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>
2013-04-18 16:08:36 -07:00
Kevin Chan
cc4549c47e msm: camera: Fix stream on error
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>
2013-04-18 16:08:35 -07:00
Kevin Chan
907518561f msm: camera: Use montonic clock for buffer divert event
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>
2013-04-18 16:08:35 -07:00
Kevin Chan
a0c22441f3 msm: camera: Add stream based event subscribe
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>
2013-04-18 16:08:35 -07:00
Kevin Chan
93f385ff9b msm: camera: Add support for burst stream restart
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>
2013-04-18 16:08:35 -07:00
Kevin Chan
074ca055c5 msm: camera: Fix for framedrop update
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>
2013-04-18 16:08:35 -07:00
Kevin Chan
7a138347cf msm: camera: Use correct interface frame id
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>
2013-04-18 16:08:34 -07:00
Kevin Chan
d25a7d4c6e msm: camera: Return ISP error
Return error from ISP driver for proper error handling

Change-Id: I59d32527cb878adf592223b1d44cf7b732374355
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
2013-04-18 16:08:34 -07:00
Kevin Chan
13a3225799 msm: camera: Increase Bayer statistics latency buffer
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>
2013-04-18 16:08:34 -07:00
Kevin Chan
7fd1781e21 msm: camera: Refactor ISP RDI pipeline control
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>
2013-04-18 16:08:34 -07:00
Kevin Chan
ffd5f1cc04 msm: camera: Use wall clock for event timestamp
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>
2013-04-18 16:08:34 -07:00
Rajakumar Govindaram
d269011a00 msm: camera2: Enhance cpp driver.
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>
2013-04-18 16:08:34 -07:00
Sreesudhan Ramakrish Ramkumar
f24bcddcc0 msm: camera2: Add driver for cpp module
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>
2013-04-18 16:08:33 -07:00
Jignesh Mehta
8e21db46e1 msm: camera: Add timestamp for vb2 buffers
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>
2013-04-18 16:08:33 -07:00
Azam Sadiq Pasha Kapatrala Syed
3a9c4f31f0 msm: camera: Add synchronisation mechanism per stream.
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>
2013-04-18 16:08:33 -07:00
Kevin Chan
3c620b64c5 msm: camera: Refactor ISP snapshot buffer management
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>
2013-04-18 16:08:33 -07:00