2013-02-12 21:35:08 +00:00
|
|
|
/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
|
msm: video: vcap: Add video capture driver
commit 6a744e339817d68e2b371fa35b0040382b38d044
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri Dec 7 15:50:32 2012 -0500
media: video: Allow NR threshold to be updated by motion est
VCAP did not allow for client to update threshold values based
on the motion estimation. By enabling an option for this threshold
to be updated dynamically by hardware, this allows for a more
aggressive noise reduction to be applied at the request of the
client.
Change-Id: I0ac590ef826ce4567c048745efafbeb05011f31e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 06550627e1f08b3956e9bf190999cd14123acf9d
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri Nov 30 14:35:16 2012 -0500
media: video: Prevent memory leak in VCAP
If a client were to do the following, VCAP would not free the ion
handle:
-Opened VCAP
-Start initial configuration
-Queues buffers
-Close VCAP without ever calling stream on
Since VCAP was not freeing ion this would cause a memory leak
CRs-Fixed: 423881
Change-Id: I594924d85884aa5e0a647bc52fa9e89e720f4ff6
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 14600e5b94992cebb0cdc1b541293c8f6c952715
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Nov 7 17:16:27 2012 -0500
media: video: vp_enabled state incorrect after a forced reset
After a forced reset occurred on VP, during a stream_off call,
vp_enabled state was incorrect causing one extra call to
disable_irq. This would result in VP isr to be called whenever
interrupt was triggered.
CRs-Fixed: 418792
Change-Id: Ia66b2d70506d4b06782bc5c25c83587c78f8e9c8
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit df1d4deafb7931eed7ae102440aea76647aab234
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Nov 5 17:06:02 2012 -0500
media: video: Stride alignment configurable by client
Prior to this patch VCAP assumed that the line stride should be
aligned to 16 bytes. It is possible that that the client needs a
line stride to be 32 bytes aligned. Line stride is now a
configurable parameter.
Change-Id: Id05aa862813582c23b18c79bd9edf95b2cdfffbe
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit b0c58b1c28f95b653808a32e1069f88e474bfd0d
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Oct 30 17:56:36 2012 -0400
media: video: Prevent buffer ion resource from being freed twice
It was possible for the client to have two threads running where
one would be blocked in dq_buf that would wake up while the other
thread was in the process of turning the stream off. This cause
two thread to try freeing the ion resource which would result
in a crash.
Change-Id: Ibbbf34c7770eed99e1a89d2a4c41ad48f5b6a13a
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit aa64d3a2c70286485c37ae640bf929c451ac6188
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Oct 29 13:05:37 2012 -0400
media: video: VC ISR restructure to make code more readable
As new features were added to VCAP the ISR for VC has become
increasingly complex and difficult to read. It was determined that
the VC ISR code should be simplified and cleaned up in order to
make the code flow more easier to read.
Change-Id: If7bc0a41e14c40f67120dacde9a1544e8f1ef7b1
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 37b1ecc312d7fcc3baa4423dfde6a107d85c2500
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Oct 29 17:53:39 2012 -0400
media: video: Make VCAP properly call regulator_get
VCAP was not providing a pointer to the device when calling
regulator_get. Although the call was able to get the regulator,
there was always an error message regarding not being able to
create a debugfs node. The problem was because the device provided
to the regulator_get call was NULL.
Change-Id: I6b344cafd96db50e95abfbf46021a361ac0de638
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 1f0f274818326a871184fa3e5597d0d2d82002b1
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Oct 24 17:43:47 2012 -0400
media: video: VC to use data polarity given by client
VC would ignore the polarity given by the client and hardcode the
value to zero. Now client is properly reporting value, VC now
takes the value provided by the client.
Change-Id: I511b59ed3e9f6b47d14cd688592d85ab97a5204d
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit f0ab1ee4a19e9616b8726d7974b1fb89baec9086
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Oct 22 12:43:36 2012 -0400
media: video: Force drop 2nd field after VC drops 1st field
If a field was dropped by the VC, the VP would not be able to
de-interlace the content properly. The problem with the VP is
it would have an unbalanced number of top fields and bottom
fields. In order to alleviate this problem the subsequent field
will also be dropped. That way there would be a balanced number
of top and bottom fields in the VP which would prevent jumping
behavior observed in the de-interlaced frame.
Change-Id: I96e8c0670b5b29baea8d1574b21c259c16a7a32e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 0857c97b89fdc6316ed3a1029179963a07c785b4
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Oct 17 16:24:21 2012 -0400
media: video: Prevent VCAP from dequeue buffers once turned off
VCAP should not report any buffers ready to be dequeued or allow
for any buffers to be dq once streamoff has been called.
CRs-Fixed: 398896
Change-Id: I2eccf62b7ddff0f7cc0343c8e26bd699b335b9dc
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 8d1c327634466332a93c6d7403758e61de79f728
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri Jul 27 16:36:31 2012 -0400
media: video: Use IOMMU mapping API
The ion_phys API is being deprecated. Instead there is a new set
of API.
Change-Id: I701cc045fe5a0cb0026574dd08016a2bccbc4c72
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit f1b7b584430f6cd33bfee13b916a084fc1b80419
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Oct 16 11:49:24 2012 -0400
media: video: Shutdown VP before freeing VP buffers
It was possible for buffers to be freed while VP was still using
them. This patch ensures that VP has been stopped before that
happens.
Change-Id: Ifff689f690cdc43c935ee355dfaca61ade9e9d65
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 9d6f89cb2343ff5adaccb77a177fdc6c3844c65d
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Oct 3 16:24:04 2012 -0400
msm: mpq8064: Correct VCAP stride calucation
VCAP was not properly calucating the stride values. This patch
allows for line stride to be 16 byte aligned.
CRs-Fixed: 390191
Change-Id: Id9eca2fd3ec4a51347f2656271591f7bccf36ad5
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit c4aa4c09475ed3029d010417393a6a6368449772
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri Aug 31 04:49:21 2012 -0400
msm: mpq8064: Adding debugfs support to VCAP
In order to assist in debugging various VCAP issue it would be
useful to have debugfs. This patch is about making everything to
debug VCAP, from message to getting important data, available
within debugfs.
Change-Id: Ic9373036af6a5eb795da2d89d6f26fcd404264af
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit f3cd9a12838bfe4688e184f90ad16b6c304a8245
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri Sep 21 11:18:02 2012 -0400
msm: mpq8064: Correct VP event type
There is a VP error that was being incorrectly reported as a VC
error event. This patch allows for the error to properly be
reported.
Change-Id: Ic2a1c6eb3b149bb7075417d54e2040d2261dda08
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 674f4799a54da7f5c38675308c3471c1b70bba4f
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri Sep 21 11:10:22 2012 -0400
msm: mpq8064: VCAP probe properly reports failures
It was possible for VCAP probe to fail, but still return 0.
Change-Id: I395cecea90475ea07491a57dde12aae1fa67166e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit f51f6e6d43c8d1d9b5a8ed86e044f19020146407
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Aug 29 11:02:17 2012 -0400
msm: mpq8064: Improve VCAP performance
This patch increase bandwidth request and VCAP core clock
for 1080 interlace or progressive content. This increase
helps VCAP capture and process content in a timely manner.
Change-Id: I8cb8d6e87954272b28a8e83351152354ea75a184
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 911b4b702a63fbd241863966cad45909e40e4665
Author: Mitchel Humpherys <mitchelh@codeaurora.org>
Date: Wed Sep 12 14:42:50 2012 -0700
ion: change ion kernel map function to not take flags argument
Buffer flags are going to be specified at allocation time rather than
map time. This removes the flags argument from the ion kernel map
function.
Change-Id: I91589ca7b1ab142bb5ac8e6b0f4c06fa1305f23a
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
commit 7d72bad55a0e03392d81eee77a9a8c9df6b73a9a
Author: Hanumant Singh <hanumant@codeaurora.org>
Date: Wed Aug 29 18:39:44 2012 -0700
ion: Port heap mask change to ion
Heap mask field passes as argument at allocation time to specify ion
heap.
Change-Id: I8881dfc491dc0f8f70581ad97b35756a6a33dd6d
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
commit 8ba7ad9492496e12c5555da796bc1f60d52c46f8
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Sep 18 17:01:34 2012 -0400
msm: mpq8064: Improve VP de-interlacing completion time
VP time to de-interlacing for 1080i content was over 20ms. This
was way too long considering content updating at 60Hz requires
latency to be under 16ms. This change allow for de-interlacing
to complete within 7ms.
Change-Id: Iae2be758ef8d5a6fcecb96df93448226c9ed9109
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 9c4f8a220532407fd890187522b0ddb365b1d660
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Sep 12 10:25:50 2012 -0400
msm: mpq8064: VC report field info that is used by VP
VP assumed that the first field provided was a bottom field, if VP
was incorrect in this assumption it would not properly de-interlace
content. It was also possible for VC to drop a field, when this
happened VP would become out of sync again causing de-interlacing
to be incorrect.
CRs-Fixed: 397534
Change-Id: I7a75a5dcd27149220273284a3d48f407bc5a4f31
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 3af95c07d0ff5be80502734f87ed90dc811face7
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Sep 18 16:43:38 2012 -0400
msm: mpq8064: VP report proper timestamp value
There was a problem where de-interlace content was not getting a
valid timestamp.
Change-Id: Ief9e19c9d20bae3d785a7932b5021e2bba36d238
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit a1e8af4e6cf4bf8a4187a1be844a1462d37affff
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Sep 18 16:41:57 2012 -0400
msm: mpq8064: Timestamp properly populated within VCAP
Before this change VCAP was only populating the usec parameter in
timeval. Now VCAP populates sec and accounts for timestamp counter
overflows.
Change-Id: I32b2c49604baba95f56faa483acfe787fdb13b34
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 616762dc78540d8cf82fed1cbbc19cf90956aa4b
Author: Terence Hampson <thampson@codeaurora.org>
Date: Thu Aug 16 17:47:44 2012 -0400
msm: mpq8064: Allow any client to control noise reduction parms
It was requested that any client be allowed to modify the nr
parameters. Reason for this is that there will be a separate
pc tool that will be controlling NR for demos. Also fixed a
bug with that cause s_fmt to failed with EINVAL when arguments
were valid.
Change-Id: Ie58972a036bb6637a938b48212ef85faf894002e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 4b88553634efb3b8748a4c2462c71b69bf491947
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Sep 4 03:51:55 2012 -0400
msm: mpq8064: Prevent VC from running after error reported
If VC continues to capture frames after receiving an error the
frames do not contain a valid frame it is possible for a system
crash to occur. This change resets NPL as soon as an error occurs,
thus preventing VC from capturing any more frames. VC waits for
client to handle error reported by VC.
CRs-Fixed: 372564
Change-Id: I72bdbab3251852520801541ed6d5521dc75f7cf1
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 2cba63f9f64c1c5e7d53eeddefc67d075d78d6f8
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Aug 21 10:54:38 2012 -0400
msm: mpq8064: Allow client to select num bufs for VC to hold onto
VC part of the VCAP driver was initial implmented for the hardware
to 2 store and work with 2 buffers. Since hardware is capable of
storing and filling up to 6 buffers, a new API was created to allow
client to select how many they want VC to use.
Change-Id: I0548f1322c9703d9ccf12700be05511b0e1eb0de
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit b128b98ac802c210dfb0ea0b279271c0c24bc2eb
Author: Terence Hampson <thampson@codeaurora.org>
Date: Thu Aug 16 14:41:19 2012 -0400
msm: mpq8064: Correct VCAP shutdown procedure
VCAP hardware shutdown sequence was incorrect. This would cause
the hardware to become unstable, which would result in the system
crashing. This patch corrects it so the driver calls the correct
shutdown procedure.
Change-Id: I78273f2c70d9eab060dcc34aef0b3704ed685f40
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 72452631e2db3ca641414d05d2437144ac0366c6
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Aug 13 12:32:24 2012 -0400
msm: mpq8064: Fix false error reported by VP
Logical or where there should have been a bitwise or. Also ignoring
cadence change interrupt, because there is nothing for the driver
to do cadence change occurs.
Change-Id: I8a6214a66b67f6397a7b99ef54969761640abedf
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit a2cba0df366dc571feb8f8a750405f2ad8284cf6
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Aug 8 11:39:53 2012 -0400
msm: mpq8064: Use ION to alloc driver buffers
Since VCAP is behind IOMMU, in order to get proper address for VCAP
hw to write to driver needs to alloc buffer from ION and not
kzalloc.
Change-Id: I1f4fcc6834d0ea09ba0fc812b301219d35f40721
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit cc88c1256aaf04ad1ecc1d7ae6b35ae05112a397
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Jul 16 18:20:02 2012 -0400
msm: mpq8064: Avoid NPL clock overflow
Since external components has its own variation there is a need
for an additional 2% margin for the npl_clk
Change-Id: I27d77ccd2f5cd9a9635975ea286bf3d0f8dba1d2
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 3dff4ef26eb40494eebb17adef80e66a0a469478
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Jun 13 15:20:59 2012 -0400
msm: mpq8064: Enable separate ioctl call for noise reduction (nr)
NR for VCAP is capable of receiving manual tuning parameters. In
order for the client to pass in these parameters a separate ioctl
was developed.
Change-Id: Ia8d7e8de80ee4fd7ccd2019d30b4457f1000e106
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 54d3a6d39374c5fe3bd22be970717f57480d6ad8
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Jul 10 14:05:35 2012 -0400
msm: mpq8064: Dummy read to prevent false interrupt from triggering
The VBIF is capable of triggering a false bus error the first time
it performs a read. This fix creates a dummy read event that
happens every time that the VCAP is powered on that will ignore
the false positive VBIF interrupt error, so that during normal
operation the error can be properly identified.
Change-Id: Ie56e60faf2067fab7a05a0f16c2d840408c35035
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit ad33c513b4b9455f0822c125affc39138603459e
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Jul 16 17:50:00 2012 -0400
msm: mpq8064: VCAP corner case bug fixes
Closing VCAP devices could be called without calling stream off:
This problem would make VCAP resources taken by devices no longer
running.
Using unsigned variable to store signed result: This problem would
allow stream on to continue even when function returned error.
Fix problem of reading VP irq status register too early: It was
possible for cadence detection bit to be propgated faster by only
a few clock cycles then the picture done bit. When the irq status
read was performed and by the time a write to the clear register
was performed the picture done bit would propgate. Since the irq
is rising edge triggered this would cause a problem and the irq
would not be triggered until VP was reset.
Remove unused code
Change-Id: Iba72354c06287efb27178edf64d8d3f459dbf954
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit a6c9648dd8e85e1e1e854347a78e4497578ebf51
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri Jul 6 17:53:09 2012 -0400
msm: mpq8064: Separate q/dq buffer for VCAP de-interlacing mode
This change fixes a crash when running VCAP in de-interlace mode.
The problem was noticed in the introduction of kernel 3.4. VCAP
was improperly using the videobuf2 framework APIs. Since VCAP is
already reliant on queue structure provided by videobuf2 framework,
we created our own basic version of the qbuf and dqbuf calls that
have some similarities to the videobuf2 framework. This addition
was necessary since we are calling qbuf from a kernel work thread.
Since moving to kernel 3.4 there has been a change in videobuf2
qbuf that dereferences the current process.s mm_struct, from a
kernel work thread this struct is NULL, which was causing a crash.
When we are de-interlacing a captured video we are cycling the
buffers internally in the driver, which is why we needed to create
our own q/dq buffer functionality.
Change-Id: Id51b775ae7f0a58bbac8a581e07fa02417802a30
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit b14ed96f74b1258b1f102831a2b0ccd56f991132
Author: Laura Abbott <lauraa@codeaurora.org>
Date: Mon Jan 30 14:18:08 2012 -0800
gpu: ion: Pull in patches for 3.4
Pull in Ion patches for 3.4 upgrade. Inclues the following
patches from google:
commit 7191e9ba2508ca6f1eaab251cf3f0a2318eebe26
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Mon Jan 30 14:18:08 2012 -0800
ion: Switch map/unmap dma api to sg_tables
Switch these api's from scatterlists to sg_tables
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 6f9e56945d4ee3a2621968caa72b135cb07e49c4
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Tue Jan 31 09:40:30 2012 -0800
ion: Add reserve function to ion
Rather than requiring each platform call memblock_remove or reserve
from the board file, add this to ion
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 9ae7e01de1cf03c77054da44d135a7e85863fcb0
Author: KyongHo Cho <pullip.cho@samsung.com>
Date: Wed Sep 7 11:27:07 2011 +0900
gpu: ion: several bugfixes and enhancements of ION
1. Verifying if the size of memory allocation in ion_alloc() is aligned
by PAGE_SIZE at least. If it is not, this change makes the size to be
aligned by PAGE_SIZE.
2. Unmaps all mappings to the kernel and DMA address spaces when
destroying ion_buffer in ion_buffer_destroy(). This prevents leaks in
those virtual address spaces.
3. Makes the return value of ion_alloc() to be explicit Linux error code
when it fails to allocate a buffer.
4. Makes ion_alloc() implementation simpler. Removes 'goto' statement and
relavant call to ion_buffer_put().
5. Checks if the task is valid before calling put_task_struct() due
to failure on creating a ion client in ion_client_create().
6. Returns error when buffer allocation requested by userspace is failed.
Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
commit 043a61468f395dd6d4fc518299726955e9999c59
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Wed Feb 1 11:09:46 2012 -0800
ion: Switch ion to use dma-buf
Ion now uses dma-buf file descriptors to share
buffers with userspace. Ion becomes a dma-buf
exporter and any driver that can import dma-bufs
can now import ion file descriptors.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 0d1259b5f84969bd00811ff9faa1c44cdb9fdbb5
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Mon Apr 30 16:45:38 2012 -0700
gpu: ion: Use alloc_pages instead of vmalloc from the system heap
With this change the ion_system_heap will only use kernel address
space when the memory is mapped into the kernel (rare case).
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit be4a1ee79a89da3ca705aecc2ac92cbeedd032bd
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Thu Apr 26 20:44:10 2012 -0700
gpu: ion: support begin/end and kmap/kunmap dma_buf ops
These ops were added in the 3.4 kernel. This patch adds support
for them to ion. Previous ion_map/unmap_kernel api is also
retained in addition to this new api.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 46d71337f9aa84694e4e6cca7f3beb6b033bbf76
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Mon May 7 16:06:32 2012 -0700
gpu: ion: Allocate the sg_table at creation time rather than dynamically
Rather than calling map_dma on the allocations dynamically, this patch
switches to creating the sg_table at the time the buffer is created.
This is necessary because in future updates the sg_table will be used
for cache maintenance.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 903f6c716db3d4e26952aae9717f81dd5bc9e4ba
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Wed May 23 12:55:55 2012 -0700
gpu: ion: Get an sg_table from an ion handle
This patch adds an interface to return and sg_table given a
valid ion handle.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
The commit also includes fixups needed for MSM specific code.
Change-Id: Idbcfa9d6af0febf06f56daaa6beaa59cc08e4351
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
commit 779dc76f0a8d5db02df5d8b7d9794cd6766d0b9d
Author: Terence Hampson <thampson@codeaurora.org>
Date: Thu Jun 7 15:59:27 2012 -0400
msm: mpq8064: Allow power up and down to be more dynamic
To save power regulators are only powered on when needed. Also in
this change is that clock rate is not longer set to max rate.
Clock speed set to lowest rate and still remain properly functional
Change-Id: I7141c8d630e4dbf5c2593e0aea9a18dc3866a1fd
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 98d11809bd87467a452f9e74d591515499abcfd8
Author: Terence Hampson <thampson@codeaurora.org>
Date: Wed Jun 6 18:18:43 2012 -0400
msm: mpq8064: Enable v4l2 event handle in VCAP
This will allow client to subscribe and receive events regarding
VCAP device
Change-Id: If8b6723feaa29dcf4e6a3bb9275ccc776081c830
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 5b1e6f1afb70ace03b32b48d4d70f34302decdc2
Author: Laura Abbott <lauraa@codeaurora.org>
Date: Mon May 28 08:13:55 2012 -0700
msm: camera: Remove subsystem_map header
The old subsystem_map APIs are being deprecated. The
msm_subsystem_map.h header file used to have definitions for
iommu domains. Remove this header file and include iommu_domains.h
to get the necessary iommu definitions.
Change-Id: I417a357789a8fea16bbadd98663a8ebe873ff4e7
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
commit aeb793ea48f0958b0aafac76c3fe774862f4dc69
Author: Terence Hampson <thampson@codeaurora.org>
Date: Fri May 11 11:41:16 2012 -0400
msm: mpq8064: Add Video processing driver block for VCAP
Adding VP portion to MSM VCAP. VP is used for deinterlacing video.
Change-Id: I888e841cf4d65cf1e5b0316db16923c914469235
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 7d5bfbc69248f59e4889372e536d310ccfeb49a3
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue May 8 13:33:48 2012 -0400
msm: mpq8064: Client passes timing information to VCAP
This will allow the VCAP driver to be more dynamic and will allow
for the timing table to be removed from the Video Capture
Change-Id: Ib631104cc2c45adf429b6a6ca90415c191e24566
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit 3cd5b3d7ce774bf6ea5b1aa5cf38db9ac470985c
Author: Matt Wagantall <mattw@codeaurora.org>
Date: Thu May 3 20:35:20 2012 -0700
msm: vcap: Pass device pointers to regulator_get()
Passing a device pointer instead of NULL as the first argument
to regulator_get() allows the device to be taken into account
when finding a matching regulator.
Change-Id: I8cb02e5dc3294090f2f81371fca64b82139756d7
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
commit 2dd21d788f51b52b32b3bbfd9baeda9726940ad7
Author: Terence Hampson <thampson@codeaurora.org>
Date: Tue Apr 24 11:16:51 2012 -0400
msm: mpq8064: Change in how vcap req_buf calcs num buf
A design change in how req_buf is suppose to work. Before req_buf
would set the number of buffers needed to the minimum required by
VCAP plus one buffer for cycling. The design now is now designed
that req_buf now adds the minimum number of buffers requred by the
VCAP to the value passed in.
Change-Id: If3ac47fee076aefc9095804abfb38cf26c4a806f
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
commit a6914ca5f03f7f8e35ad443c612a6081a8efa127
Author: Terence Hampson <thampson@codeaurora.org>
Date: Mon Apr 9 14:06:50 2012 -0400
msm: mpq8064: Add VCAP v4l2 device for MPQ8064
Adding v4l2 interface for VCAP device driver that utilizes
video capture (VC) portion of VCAP.
Future addition will allow for v4l2 VCAP to utilize video
processing (VP).
Change-Id: I5e68f4ba39f569ef07d67ca39fb922ad5a19aa4e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-01-14 22:07:14 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
|
|
* only version 2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifndef VCAP_VC_H
|
|
|
|
#define VCAP_VC_H
|
|
|
|
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
|
|
|
|
#include <media/vcap_v4l2.h>
|
|
|
|
|
|
|
|
#define VCAP_HARDWARE_VERSION 0x10000000
|
|
|
|
|
|
|
|
#define VCAP_BASE (dev->vcapbase)
|
|
|
|
#define VCAP_OFFSET(off) (VCAP_BASE + off)
|
|
|
|
|
|
|
|
#define VCAP_HARDWARE_VERSION_REG (VCAP_BASE + 0x0000)
|
|
|
|
|
|
|
|
#define VCAP_SW_RESET_REQ (VCAP_BASE + 0x0024)
|
|
|
|
#define VCAP_SW_RESET_STATUS (VCAP_BASE + 0x0028)
|
|
|
|
|
|
|
|
#define VCAP_VC_CTRL (VCAP_BASE + 0x0800)
|
|
|
|
#define VCAP_VC_NPL_CTRL (VCAP_BASE + 0x0804)
|
|
|
|
#define VCAP_VC_POLARITY (VCAP_BASE + 0x081c)
|
|
|
|
#define VCAP_VC_V_H_TOTAL (VCAP_BASE + 0x0820)
|
|
|
|
#define VCAP_VC_H_ACTIVE (VCAP_BASE + 0x0824)
|
|
|
|
#define VCAP_VC_V_ACTIVE (VCAP_BASE + 0x0828)
|
|
|
|
#define VCAP_VC_V_ACTIVE_F2 (VCAP_BASE + 0x0830)
|
|
|
|
#define VCAP_VC_VSYNC_VPOS (VCAP_BASE + 0x0834)
|
|
|
|
#define VCAP_VC_VSYNC_F2_VPOS (VCAP_BASE + 0x0838)
|
|
|
|
#define VCAP_VC_HSYNC_HPOS (VCAP_BASE + 0x0840)
|
|
|
|
#define VCAP_VC_VSYNC_F2_HPOS (VCAP_BASE + 0x083c)
|
|
|
|
#define VCAP_VC_BUF_CTRL (VCAP_BASE + 0x0848)
|
|
|
|
|
|
|
|
#define VCAP_VC_Y_STRIDE (VCAP_BASE + 0x084c)
|
|
|
|
#define VCAP_VC_C_STRIDE (VCAP_BASE + 0x0850)
|
|
|
|
|
|
|
|
#define VCAP_VC_Y_ADDR_1 (VCAP_BASE + 0x0854)
|
|
|
|
#define VCAP_VC_C_ADDR_1 (VCAP_BASE + 0x0858)
|
|
|
|
#define VCAP_VC_Y_ADDR_2 (VCAP_BASE + 0x085c)
|
|
|
|
#define VCAP_VC_C_ADDR_2 (VCAP_BASE + 0x0860)
|
|
|
|
#define VCAP_VC_Y_ADDR_3 (VCAP_BASE + 0x0864)
|
|
|
|
#define VCAP_VC_C_ADDR_3 (VCAP_BASE + 0x0868)
|
|
|
|
#define VCAP_VC_Y_ADDR_4 (VCAP_BASE + 0x086c)
|
|
|
|
#define VCAP_VC_C_ADDR_4 (VCAP_BASE + 0x0870)
|
|
|
|
#define VCAP_VC_Y_ADDR_5 (VCAP_BASE + 0x0874)
|
|
|
|
#define VCAP_VC_C_ADDR_5 (VCAP_BASE + 0x0878)
|
|
|
|
#define VCAP_VC_Y_ADDR_6 (VCAP_BASE + 0x087c)
|
|
|
|
#define VCAP_VC_C_ADDR_6 (VCAP_BASE + 0x0880)
|
|
|
|
|
|
|
|
#define VCAP_VC_IN_CTRL1 (VCAP_BASE + 0x0808)
|
|
|
|
#define VCAP_VC_IN_CTRL2 (VCAP_BASE + 0x080c)
|
|
|
|
#define VCAP_VC_IN_CTRL3 (VCAP_BASE + 0x0810)
|
|
|
|
#define VCAP_VC_IN_CTRL4 (VCAP_BASE + 0x0814)
|
|
|
|
#define VCAP_VC_IN_CTRL5 (VCAP_BASE + 0x0818)
|
|
|
|
|
|
|
|
#define VCAP_VC_INT_MASK (VCAP_BASE + 0x0884)
|
|
|
|
#define VCAP_VC_INT_CLEAR (VCAP_BASE + 0x0888)
|
|
|
|
#define VCAP_VC_INT_STATUS (VCAP_BASE + 0x088c)
|
|
|
|
#define VCAP_VC_TIMESTAMP (VCAP_BASE + 0x0034)
|
|
|
|
|
|
|
|
#define VC_BUFFER_WRITTEN (0x3 << 1)
|
|
|
|
|
|
|
|
int vc_start_capture(struct vcap_client_data *c_data);
|
|
|
|
int vc_hw_kick_off(struct vcap_client_data *c_data);
|
|
|
|
void vc_stop_capture(struct vcap_client_data *c_data);
|
|
|
|
int config_vc_format(struct vcap_client_data *c_data);
|
|
|
|
int detect_vc(struct vcap_dev *dev);
|
|
|
|
int deinit_vc(void);
|
|
|
|
irqreturn_t vc_handler(struct vcap_dev *dev);
|
|
|
|
#endif
|