The following commits have been reverted from this merge, as they are
known to introduce new bugs and are currently incompatible with our
audio implementation. Investigation of these commits is ongoing, and
they are expected to be brought in at a later time:
86e6de7 ALSA: compress: fix drain calls blocking other compress functions (v6)
16442d4 ALSA: compress: fix drain calls blocking other compress functions
This merge commit also includes a change in block, necessary for
compilation. Upstream has modified elevator_init_fn to prevent race
conditions, requring updates to row_init_queue and test_init_queue.
* commit 'v3.10.28': (1964 commits)
Linux 3.10.28
ARM: 7938/1: OMAP4/highbank: Flush L2 cache before disabling
drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()
serial: amba-pl011: use port lock to guard control register access
mm: Make {,set}page_address() static inline if WANT_PAGE_VIRTUAL
md/raid5: Fix possible confusion when multiple write errors occur.
md/raid10: fix two bugs in handling of known-bad-blocks.
md/raid10: fix bug when raid10 recovery fails to recover a block.
md: fix problem when adding device to read-only array with bitmap.
drm/i915: fix DDI PLLs HW state readout code
nilfs2: fix segctor bug that causes file system corruption
thp: fix copy_page_rep GPF by testing is_huge_zero_pmd once only
ftrace/x86: Load ftrace_ops in parameter not the variable holding it
SELinux: Fix possible NULL pointer dereference in selinux_inode_permission()
writeback: Fix data corruption on NFS
hwmon: (coretemp) Fix truncated name of alarm attributes
vfs: In d_path don't call d_dname on a mount point
staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq()
staging: comedi: addi_apci_1032: fix subdevice type/flags bug
mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully
GFS2: Increase i_writecount during gfs2_setattr_chown
perf/x86/amd/ibs: Fix waking up from S3 for AMD family 10h
perf scripting perl: Fix build error on Fedora 12
ARM: 7815/1: kexec: offline non panic CPUs on Kdump panic
Linux 3.10.27
sched: Guarantee new group-entities always have weight
sched: Fix hrtimer_cancel()/rq->lock deadlock
sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining
sched: Fix race on toggling cfs_bandwidth_used
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper
SCSI: sd: Reduce buffer size for vpd request
intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters.
mac80211: move "bufferable MMPDU" check to fix AP mode scan
ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS
ACPI / TPM: fix memory leak when walking ACPI namespace
mfd: rtsx_pcr: Disable interrupts before cancelling delayed works
clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks
clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock
clk: samsung: exynos4: Correct SRC_MFC register
clk: clk-divider: fix divisor > 255 bug
ahci: add PCI ID for Marvell 88SE9170 SATA controller
parisc: Ensure full cache coherency for kmap/kunmap
drm/nouveau/bios: make jump conditional
ARM: shmobile: mackerel: Fix coherent DMA mask
ARM: shmobile: armadillo: Fix coherent DMA mask
ARM: shmobile: kzm9g: Fix coherent DMA mask
ARM: dts: exynos5250: Fix MDMA0 clock number
ARM: fix "bad mode in ... handler" message for undefined instructions
ARM: fix footbridge clockevent device
net: Loosen constraints for recalculating checksum in skb_segment()
bridge: use spin_lock_bh() in br_multicast_set_hash_max
netpoll: Fix missing TXQ unlock and and OOPS.
net: llc: fix use after free in llc_ui_recvmsg
virtio-net: fix refill races during restore
virtio_net: don't leak memory or block when too many frags
virtio-net: make all RX paths handle errors consistently
virtio_net: fix error handling for mergeable buffers
vlan: Fix header ops passthru when doing TX VLAN offload.
net: rose: restore old recvmsg behavior
rds: prevent dereference of a NULL device
ipv6: always set the new created dst's from in ip6_rt_copy
net: fec: fix potential use after free
hamradio/yam: fix info leak in ioctl
drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl()
net: inet_diag: zero out uninitialized idiag_{src,dst} fields
ip_gre: fix msg_name parsing for recvfrom/recvmsg
net: unix: allow bind to fail on mutex lock
ipv6: fix illegal mac_header comparison on 32bit
netvsc: don't flush peers notifying work during setting mtu
tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0
net: unix: allow set_peek_off to fail
net: drop_monitor: fix the value of maxattr
ipv6: don't count addrconf generated routes against gc limit
packet: fix send path when running with proto == 0
virtio: delete napi structures from netdev before releasing memory
macvtap: signal truncated packets
tun: update file current position
macvtap: update file current position
macvtap: Do not double-count received packets
rds: prevent BUG_ON triggered on congestion update to loopback
net: do not pretend FRAGLIST support
IPv6: Fixed support for blackhole and prohibit routes
HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue""
gpio-rcar: R-Car GPIO IRQ share interrupt
clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
irqchip: renesas-irqc: Fix irqc_probe error handling
Linux 3.10.26
sh: add EXPORT_SYMBOL(min_low_pfn) and EXPORT_SYMBOL(max_low_pfn) to sh_ksyms_32.c
ext4: fix bigalloc regression
arm64: Use Normal NonCacheable memory for writecombine
arm64: Do not flush the D-cache for anonymous pages
arm64: Avoid cache flushing in flush_dcache_page()
ARM: KVM: arch_timers: zero CNTVOFF upon return to host
ARM: hyp: initialize CNTVOFF to zero
clocksource: arch_timer: use virtual counters
arm64: Remove unused cpu_name ascii in arch/arm64/mm/proc.S
arm64: dts: Reserve the memory used for secondary CPU release address
arm64: check for number of arguments in syscall_get/set_arguments()
arm64: fix possible invalid FPSIMD initialization state
...
Change-Id: Ia0e5d71b536ab49ec3a1179d59238c05bdd03106
Signed-off-by: Ian Maund <imaund@codeaurora.org>
commit a19dec6ea94c036af68c31930c1c92681f55af41 upstream.
This patch fixes following error:
include/media/v4l2-ctrls.h:193:15: error: field ‘_lock’ has incomplete type
include/media/v4l2-ctrls.h: In function ‘v4l2_ctrl_lock’:
include/media/v4l2-ctrls.h:570:2: error: implicit declaration of
function ‘mutex_lock’ [-Werror=implicit-function-declaration]
include/media/v4l2-ctrls.h: In function ‘v4l2_ctrl_unlock’:
include/media/v4l2-ctrls.h:579:2: error: implicit declaration of
function ‘mutex_unlock’ [-Werror=implicit-function-declaration]
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
When calling v4l2_ctrl_add_handler(), lockdep would detect a potential
recursive locking problem on a situation that is by design intended and
not a recursive lock. This happened because all struct
v4l2_ctrl_handler.lock mutexes were created as members of the same lock
class in v4l2_ctrl_handler_init(), and v4l2_ctrl_add_handler() takes the
hdl->lock on two different v4l2_ctrl_handler instances.
This change breaks the large lockdep lock class for struct
v4l2_ctrl_handler.lock and breaks it into v4l2_ctrl_handler
instantiation specific lock classes with meaningful class names.
This will validly eliminate lockdep alarms for v4l2_ctrl_handler locking
validation, as long as the relationships between drivers adding v4l2
controls to their own handler from other v4l2 drivers' control handlers
remains straightforward.
struct v4l2_ctrl_handler.lock lock classes are created with names such
that the output of cat /proc/lockdep indicates where in the v4l2 driver
code v4l2_ctrl_handle_init() is being called on instantiations:
ffffffffa045f490 FD: 10 BD: 8 +.+...: cx2341x:1534:(hdl)->lock
ffffffffa0497d20 FD: 12 BD: 2 +.+.+.: saa7115:1581:(hdl)->lock
ffffffffa04ac660 FD: 14 BD: 2 +.+.+.: msp3400_driver:756:(hdl)->lock
ffffffffa0484b90 FD: 12 BD: 1 +.+.+.: ivtv_gpio:366:(&itv->hdl_gpio)->lock
ffffffffa04eb530 FD: 11 BD: 2 +.+.+.: cx25840_core:1982:(&state->hdl)->lock
ffffffffa04fbc80 FD: 11 BD: 3 +.+.+.: wm8775:246:(&state->hdl)->lock
Some lock chains, that were previously causing the recursion alarms, are
now visible in the output of cat /proc/lockdep_chains:
irq_context: 0
[ffffffffa0497d20] saa7115:1581:(hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa04ac660] msp3400_driver:756:(hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa0484b90] ivtv_gpio:366:(&itv->hdl_gpio)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa04eb530] cx25840_core:1982:(&state->hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa04fbc80] wm8775:246:(&state->hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
[hans.verkuil@cisco.com: keep mutex_init in v4l2_ctrl_handler_init_class]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds a v4l2 core helper function that can be used as
the log_status handler for subdevs that only need to log state
of the v4l2 controls owned by the subdev's control handler.
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add a v4l2 core helper function that can be used as the subdev
.subscribe_event handler. This allows to eliminate some boilerplate
from drivers that are only handling the control events.
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds a helper function that allows to modify range,
i.e. minimum, maximum, step and default value of a v4l2 control,
after the control has been created and initialized. This is helpful
in situations when range of a control depends on user configurable
parameters, e.g. camera sensor absolute exposure time depending on
an output image resolution and frame rate.
v4l2_ctrl_modify_range() function allows to modify range of an
INTEGER, BOOL, MENU, INTEGER_MENU and BITMASK type controls.
Based on a patch from Hans Verkuil http://patchwork.linuxtv.org/patch/8654.
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sometimes platform/bridge drivers need to be notified when a control from
a sub-device changes value. In order to support this a notify callback was
added.
[dheitmueller@kernellabs.com: fix merge conflict in v4l2-ctrls.c]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add helper function v4l2_ctrl_new_std_menu_items(), which adds
a standard menu control, with driver specific menu.
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
With a filter function you can control more precisely which controls
are added. This is useful in particular for radio device nodes for
combined TV/Radio cards where you want to show just the radio-specific
controls and not controls like brightness.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_(un)subscribe_event.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
These helper functions get and set a 64-bit control's value from within
a driver. They are similar to v4l2_ctrl_[gs]_ctrl() but operate on
64-bit integer controls instead of 32-bit controls.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds v4l2_ctrl_new_int_menu() helper function which can be used
in drivers for creating standard integer menu control with driver-specific
menu item list. It is similar to v4l2_ctrl_new_std_menu(), except it doesn't
have a mask parameter and an additional qmenu parameter allows passing
an array of signed 64-bit integers as the menu item list.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Tested-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This fixes the following warning:
In file included from drivers/media/video/v4l2-subdev.c:29:
include/media/v4l2-ctrls.h:501: warning: 'struct file' declared inside
parameter list
include/media/v4l2-ctrls.h:501: warning: its scope is only this
definition or declaration, which is probably not what you want
include/media/v4l2-ctrls.h:509: warning: 'struct file' declared inside
parameter list
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Allow choosing the lock used by the control handler. This may be handy
sometimes when a driver providing multiple subdevs does not want to use
several locks to serialise its functions.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Fix the warning:
In file included from /home/lyakh/software/project/24/src/linux-2.6/drivers/media/video/v4l2-subdev.c:29:
linux-2.6/include/media/v4l2-ctrls.h:497: warning: 'struct file' declared inside parameter list
linux-2.6/include/media/v4l2-ctrls.h:497: warning: its scope is only this definition or declaration, which is probably not what you want
linux-2.6/include/media/v4l2-ctrls.h:505: warning: 'struct file' declared inside parameter list
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* tag 'v3.4-rc3': (3755 commits)
Linux 3.4-rc3
x86-32: fix up strncpy_from_user() sign error
ARM: 7386/1: jump_label: fixup for rename to static_key
ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU
ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus
PCI: Fix regression in pci_restore_state(), v3
SCSI: Fix error handling when no ULD is attached
ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors
ARM: dts: remove blank interrupt-parent properties
ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files
do not export kernel's NULL #define to userspace
ARM: EXYNOS: Remove broken config values for touchscren for NURI board
ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards
ARM: EXYNOS: fix regulator name for NURI board
ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL
cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS
sparc64: Eliminate obsolete __handle_softirq() function
sparc64: Fix bootup crash on sun4v.
ARM: msm: Fix section mismatches in proc_comm.c
...
Create a new control type called V4L2_CTRL_TYPE_INTEGER_MENU. Integer menu
controls are just like menu controls but the menu items are 64-bit integers
rather than strings.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
"[RFC PATCH 0/2] audit of linux/device.h users in include/*"
https://lkml.org/lkml/2012/3/4/159
--
Nearly every subsystem has some kind of header with a proto like:
void foo(struct device *dev);
and yet there is no reason for most of these guys to care about the
sub fields within the device struct. This allows us to significantly
reduce the scope of headers including headers. For this instance, a
reduction of about 40% is achieved by replacing the include with the
simple fact that the device is some kind of a struct.
Unlike the much larger module.h cleanup, this one is simply two
commits. One to fix the implicit <linux/device.h> users, and then
one to delete the device.h includes from the linux/include/ dir
wherever possible.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPbNxLAAoJEOvOhAQsB9HWR6QQAMRUZ94O2069/nW9h4TO/xTr
Hq/80lo/TBBiRmob3iWBP76lzgeeMPPVEX1I6N7YYlhL3IL7HsaJH1DvpIPPHXQP
GFKcBsZ5ZLV8c4CBDSr+/HFNdhXc0bw0awBjBvR7gAsWuZpNFn4WbhizJi4vWAoE
4ydhPu55G1G8TkBtYLJQ8xavxsmiNBSDhd2i+0vn6EVpgmXynjOMG8qXyaS97Jvg
pZLwnN5Wu21coj6+xH3QUKCl1mJ+KGyamWX5gFBVIfsDB3k5H4neijVm7t1en4b0
cWxmXeR/JE3VLEl/17yN2dodD8qw1QzmTWzz1vmwJl2zK+rRRAByBrL0DP7QCwCZ
ppeJbdhkMBwqjtknwrmMwsuAzUdJd79GXA+6Vm+xSEkr6FEPK1M0kGbvaqV9Usgd
ohMewewbO6ddgR9eF7Kw2FAwo0hwkPNEplXIym9rZzFG1h+T0STGSHvkn7LV765E
ul1FapSV3GCxEVRwWTwD28FLU2+0zlkOZ5sxXwNPTT96cNmW+R7TGuslZKNaMNjX
q7eBZxo8DtVt/jqJTntR8bs8052c8g1Ac1IKmlW8VSmFwT1M6VBGRn1/JWAhuUgv
dBK/FF+I1GJTAJWIhaFcKXLHvmV9uhS6JaIhLMDOetoOkpqSptJ42hDG+89WkFRk
o55GQ5TFdoOpqxVzGbvE
=3j4+
-----END PGP SIGNATURE-----
Merge tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
Pull <linux/device.h> avoidance patches from Paul Gortmaker:
"Nearly every subsystem has some kind of header with a proto like:
void foo(struct device *dev);
and yet there is no reason for most of these guys to care about the
sub fields within the device struct. This allows us to significantly
reduce the scope of headers including headers. For this instance, a
reduction of about 40% is achieved by replacing the include with the
simple fact that the device is some kind of a struct.
Unlike the much larger module.h cleanup, this one is simply two
commits. One to fix the implicit <linux/device.h> users, and then one
to delete the device.h includes from the linux/include/ dir wherever
possible."
* tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
device.h: audit and cleanup users in main include dir
device.h: cleanup users outside of linux/include (C files)
The <linux/device.h> header includes a lot of stuff, and
it in turn gets a lot of use just for the basic "struct device"
which appears so often.
Clean up the users as follows:
1) For those headers only needing "struct device" as a pointer
in fcn args, replace the include with exactly that.
2) For headers not really using anything from device.h, simply
delete the include altogether.
3) For headers relying on getting device.h implicitly before
being included themselves, now explicitly include device.h
4) For files in which doing #1 or #2 uncovers an implicit
dependency on some other header, fix by explicitly adding
the required header(s).
Any C files that were implicitly relying on device.h to be
present have already been dealt with in advance.
Total removals from #1 and #2: 51. Total additions coming
from #3: 9. Total other implicit dependencies from #4: 7.
As of 3.3-rc1, there were 110, so a net removal of 42 gives
about a 38% reduction in device.h presence in include/*
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Many drivers just support control events, and most radio drivers just need
to poll for control events. Add some functions to simplify those jobs.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
For drivers that properly use the v4l2 framework (i.e. set v4l2_dev in the
video_device struct), the start and end messages of VIDIOC_LOG_STATUS are
now generated automatically. People tended to forget these, but the v4l2-ctl
tool scans for these messages, and it also makes it easier to read the status
output in the kernel log.
The cx18, ivtv and bttv drivers were changed since they no longer need to
log these start/end messages.
In saa7164 two empty log_status functions were removed.
Also added a helper function to v4l2-ctrl.c that can be used as the
vidioc_log_status callback if all you need to do is to log the current control
values. This is now used by pwc and vivi.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Steven Toth <stoth@kernellabs.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The problem tackled in this patch is how to handle volatile autoclusters
correctly. A volatile autocluster is a cluster of related controls where one
control is the control that toggles between manual and auto mode and the other
controls are the values for the manual mode. For example autogain and gain,
autoexposure and exposure, etc.
If the hardware lets you read out the automatically calculated manual values
while in automode, then those manual controls should be marked volatile.
gain value as calculated by the autogain circuitry, then you would mark the
gain control as volatile (i.e. continuously changing).
The question in such use cases is what to do when switching from the auto
mode to the manual mode. Should we switch to the last set manual values or
should the volatile values be copied and used as the initial manual values.
For example: suppose the mode is manual gain and gain is set to 5. Then
autogain is turned on and the gain is set by the hardware to 2. Finally
the user switches back to manual gain. What should the gain be? 2 or 5?
After a long discussion the decisions was made to keep the last value as
calculated by the auto mode (so 2 in the example above).
The reason is that webcams that do such things will adapt themselves to
the current light conditions and when you switch back to manual mode you
expect that you keep the same picture. If you would switch back to old
manual values, then that would give you a suddenly different picture,
which is jarring for the user.
Additionally, this would be difficult to implement in applications that
store and restore the control values at application exit and start.
If you want to keep the old manual values when you switch from auto to
manual, then there would have to be a way for applications to get hold
of those old values while in auto mode, but there isn't.
So this patch will do all the heavy lifting in v4l2-ctrls.c: if you go
from auto mode to manual mode and the manual controls are volatile, then
g_volatile_ctrl will be called to get the current values for the manual
controls before switching to manual mode.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
With the new flag there is no need anymore to have a separate is_volatile
field. Modify all users to use the new flag.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The implementation of VIDIOC_G/S/TRY_EXT_CTRLS in the control framework has
to figure out which controls in the control list belong to the same cluster.
Since controls belonging to the same cluster need to be handled as a unit,
this is important information.
It did that by going over the controls in the list and for each control that
belonged to a multi-control cluster it would walk the remainder of the list
to try and find controls that belong to that same cluster.
This approach has two disadvantages:
1) it was a potentially quadratic algorithm (although highly unlikely that
it would ever be that bad in practice).
2) it took place with the control handler's lock held.
Since we want to make it possible in the future to change control values
from interrupt context, doing a lot of work while holding a lock is not a
good idea.
In the new code the algorithm is no longer quadratic but linear in the
number of controls in the list. Also, it now can be done beforehand.
Another change that was made was to so the try and set at the same time.
Before when S_TRY_EXT_CTRLS was called it would 'try' the controls first,
and then it would 'set' them. The idea was that any 'try' errors would
prevent the 'set' from happening, thus avoiding having partially set
control lists.
However, this caused more problems than it solved because between the 'try'
and the 'set' changes might have happened, so it had to try a second time,
and since actual controls with a try_ctrl op are very rare (and those that
we have just adjust values and do not return an error), I've decided to
drop that two-stage approach and just combine try and set.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The driver had to decide how many events to allocate when the v4l2_fh struct
was created. It was possible to add more events afterwards, but there was no
way to ensure that you wouldn't miss important events if the event queue
would fill up for that filehandle.
In addition, once there were no more free events, any new events were simply
dropped on the floor.
For the control event in particular this made life very difficult since
control status/value changes could just be missed if the number of allocated
events and the speed at which the application read events was too low to keep
up with the number of generated events. The application would have no idea
what the latest state was for a control since it could have missed the latest
control change.
So this patch makes some major changes in how events are allocated. Instead
of allocating events per-filehandle they are now allocated when subscribing an
event. So for that particular event type N events (determined by the driver)
are allocated. Those events are reserved for that particular event type.
This ensures that you will not miss events for a particular type altogether.
In addition, if there are N events in use and a new event is raised, then
the oldest event is dropped and the new one is added. So the latest event
is always available.
This can be further improved by adding the ability to merge the state of
two events together, ensuring that no data is lost at all. This will be
added in the next patch.
This also makes it possible to allow the user to determine the number of
events that will be allocated. This is not implemented at the moment, but
would be trivial.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2_ctrl_fh struct connected v4l2_ctrl with v4l2_fh so the control
would know which filehandles subscribed to it. However, it is much easier
to use struct v4l2_subscribed_event directly for that and get rid of that
intermediate struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Whenever a control changes value or state an event is sent to anyone
that subscribed to it.
This functionality is useful for control panels but also for applications
that need to wait for (usually status) controls to change value.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
When an application changes a control you want to generate an event.
However, you want to avoid sending such an event back to the application
(file handle) that caused the change.
Add the filehandle to the various set control functions.
The filehandle isn't used yet, but the control event patches will need
this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It is a bit tricky to handle autogain/gain type scenerios correctly. Such
controls need to be clustered and the V4L2_CTRL_FLAG_UPDATE should be set on
the autofoo controls. In addition, the manual controls should be marked
inactive when the automatic mode is on, and active when the manual mode is on.
This also requires specialized volatile handling.
The chances of drivers doing all these things correctly are pretty remote.
So a new v4l2_ctrl_auto_cluster function was added that takes care of these
issues.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The later makes extensive use of structures defined in the former.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Renamed has_new to is_new.
Drivers can use the is_new field to determine if a new value was specified
for a control. The v4l2_ctrl_handler_setup() must always set this to 1 since
the setup has to force a full update of all controls.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This prevents checkpatch warnings generated when defining
'static const char *foo[]' arrays. It makes sense to use
const char * const * anyway since the pointers in the array
are indeed const.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add a new framework to handle controls which makes life for driver
developers much easier.
Note that this patch moves some of the control support that used to be in
v4l2-common.c to v4l2-ctrls.c. The tables were copied unchanged. The body
of v4l2_ctrl_query_fill() was copied to a new v4l2_ctrl_fill() function
in v4l2-ctrls.c. This new function doesn't use the v4l2_queryctrl
struct anymore, which makes it more general.
The remainder of v4l2-ctrls.c is all new. Highlights include:
- No need to implement VIDIOC_QUERYCTRL, QUERYMENU, S_CTRL, G_CTRL,
S_EXT_CTRLS, G_EXT_CTRLS or TRY_EXT_CTRLS in either bridge drivers
or subdevs. New wrapper functions are provided that can just be plugged in.
Once everything has been converted these wrapper functions can be removed as well.
- When subdevices are added their controls can be automatically merged
with the bridge driver's controls.
- Most drivers just need to implement s_ctrl to set the controls.
The framework handles the locking and tries to be as 'atomic' as possible.
- Ready for the subdev device nodes: the same mechanism applies to subdevs
and their device nodes as well. Sub-device drivers can make controls
local, preventing them from being merged with bridge drivers.
- Takes care of backwards compatibility handling of VIDIOC_S_CTRL and
VIDIOC_G_CTRL. Handling of V4L2_CID_PRIVATE_BASE is fully transparent.
CTRL_CLASS controls are automatically added.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>