]> err.no Git - linux-2.6/log
linux-2.6
16 years agoslub: pack objects denser
Christoph Lameter [Mon, 14 Apr 2008 16:13:29 +0000 (19:13 +0300)]
slub: pack objects denser

Since we now have more orders available use a denser packing.
Increase slab order if more than 1/16th of a slab would be wasted.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Calculate min_objects based on number of processors.
Christoph Lameter [Mon, 14 Apr 2008 16:11:41 +0000 (19:11 +0300)]
slub: Calculate min_objects based on number of processors.

The mininum objects per slab is calculated based on the number of processors
that may come online.

Processors    min_objects
---------------------------
1             8
2             12
4             16
8             20
16            24
32            28
64            32
1024          48
4096          56

The higher the number of processors the large the order sizes used for various
slab caches will become. This has been shown to address the performance issues
in hackbench on 16p etc.

The calculation is only performed if slub_min_objects is zero (default). If one
specifies a slub_min_objects on boot then that setting is taken.

As suggested by Zhang Yanmin's performance tests on 16-core Tigerton, use the
formula '4 * (fls(nr_cpu_ids) + 1)':

  ./hackbench 100 process 2000:

  1) 2.6.25-rc6slab: 23.5 seconds
  2) 2.6.25-rc7SLUB+slub_min_objects=20: 31 seconds
  3) 2.6.25-rc7SLUB+slub_min_objects=24: 23.5 seconds

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Drop DEFAULT_MAX_ORDER / DEFAULT_MIN_OBJECTS
Christoph Lameter [Mon, 14 Apr 2008 16:11:41 +0000 (19:11 +0300)]
slub: Drop DEFAULT_MAX_ORDER / DEFAULT_MIN_OBJECTS

We can now fallback to order 0 slabs. So set the slub_max_order to
PAGE_CACHE_ORDER_COSTLY but keep the slub_min_objects at 4. This
will mostly preserve the orders used in 2.6.25. F.e. The 2k kmalloc slab
will use order 1 allocs and the 4k kmalloc slab order 2.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Simplify any_slab_object checks
Christoph Lameter [Mon, 14 Apr 2008 16:11:41 +0000 (19:11 +0300)]
slub: Simplify any_slab_object checks

Since we now have total_objects counter per node use that to
check for the presence of any objects. The loop over all cpu slabs
is not that useful since any cpu slab would require an object allocation
first. So drop that.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Make the order configurable for each slab cache
Christoph Lameter [Mon, 14 Apr 2008 16:11:41 +0000 (19:11 +0300)]
slub: Make the order configurable for each slab cache

Makes /sys/kernel/slab/<slabname>/order writable. The allocation
order of a slab cache can then be changed dynamically during runtime.
This can be used to override the objects per slabs value establisheed
with the slub_min_objects setting that was manually specified or
calculated on bootup.

The changes of the slab order can occur while allocate_slab() runs.
Allocate slab needs the order and the number of slab objects that
are both changed by the change of order. Both are put into
a single word (struct kmem_cache_order_objects). They can then
be atomically updated and retrieved.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Drop fallback to page allocator method
Christoph Lameter [Mon, 14 Apr 2008 16:11:41 +0000 (19:11 +0300)]
slub: Drop fallback to page allocator method

There is now a generic method of falling back to a slab page of minimal
order. No need anymore for the fallback to kmalloc_large().

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Fallback to minimal order during slab page allocation
Christoph Lameter [Mon, 14 Apr 2008 16:11:40 +0000 (19:11 +0300)]
slub: Fallback to minimal order during slab page allocation

If any higher order allocation fails then fall back the smallest order
necessary to contain at least one object. This enables fallback for all
allocations to order 0 pages. The fallback will waste more memory (objects
will not fit neatly) and the fallback slabs will be not as efficient as larger
slabs since they contain less objects.

Note that SLAB also depends on order 1 allocations for some slabs that waste
too much memory if forced into PAGE_SIZE'd page. SLUB now can now deal with
failing order 1 allocs which SLAB cannot do.

Add a new field min that will contain the objects for the smallest possible order
for a slab cache.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Update statistics handling for variable order slabs
Christoph Lameter [Mon, 14 Apr 2008 16:11:40 +0000 (19:11 +0300)]
slub: Update statistics handling for variable order slabs

Change the statistics to consider that slabs of the same slabcache
can have different number of objects in them since they may be of
different order.

Provide a new sysfs field

total_objects

which shows the total objects that the allocated slabs of a slabcache
could hold.

Add a max field that holds the largest slab order that was ever used
for a slab cache.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Add kmem_cache_order_objects struct
Christoph Lameter [Mon, 14 Apr 2008 16:11:31 +0000 (19:11 +0300)]
slub: Add kmem_cache_order_objects struct

Pack the order and the number of objects into a single word.
This saves some memory in the kmem_cache_structure and more importantly
allows us to fetch both values atomically.

Later the slab orders become runtime configurable and we need to fetch these
two items together in order to properly allocate a slab and initialize its
objects.

Fix the race by fetching the order and the number of objects in one word.

[penberg@cs.helsinki.fi: fix memset() page order in new_slab()]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: for_each_object must be passed the number of objects in a slab
Christoph Lameter [Mon, 14 Apr 2008 16:11:31 +0000 (19:11 +0300)]
slub: for_each_object must be passed the number of objects in a slab

Pass the number of objects to the for_each_object macro. Most of these are
debug related.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Store max number of objects in the page struct.
Christoph Lameter [Mon, 14 Apr 2008 16:11:30 +0000 (19:11 +0300)]
slub: Store max number of objects in the page struct.

Split the inuse field up to be able to store the number of objects in this
page in the page struct as well. Necessary if we want to have pages of
various orders for a slab. Also avoids touching struct kmem_cache cachelines in
__slab_alloc().

Update diagnostic code to check the number of objects and make sure that
the number of objects always stays within the bounds of a 16 bit unsigned
integer.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Dump list of objects not freed on kmem_cache_close()
Christoph Lameter [Fri, 25 Apr 2008 19:22:43 +0000 (12:22 -0700)]
slub: Dump list of objects not freed on kmem_cache_close()

Dump a list of unfreed objects if a slab cache is closed but
objects still remain.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: free_list() cleanup
Christoph Lameter [Wed, 23 Apr 2008 19:36:52 +0000 (12:36 -0700)]
slub: free_list() cleanup

free_list looked a bit screwy so here is an attempt to clean it up.

free_list is is only used for freeing partial lists. We do not need to return a
parameter if we decrement nr_partial within the function which allows a
simplification of the whole thing.

The current version modifies nr_partial outside of the list_lock which is
technically not correct. It was only ok because we should be the only user of
this slab cache at this point.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: improve kmem_cache_destroy() error message
Pekka Enberg [Wed, 23 Apr 2008 19:31:08 +0000 (22:31 +0300)]
slub: improve kmem_cache_destroy() error message

As pointed out by Ingo, the SLUB warning of calling kmem_cache_destroy()
with cache that still has objects triggers in practice. So turn this
WARN_ON() into a nice SLUB specific error message to avoid people
confusing it to a SLUB bug.

Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslob: fix bug - when slob allocates "struct kmem_cache", it does not force alignment.
Yi Li [Fri, 25 Apr 2008 16:49:21 +0000 (19:49 +0300)]
slob: fix bug - when slob allocates "struct kmem_cache", it does not force alignment.

This may trigger misaligned memory access exception.

Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Thu, 24 Apr 2008 21:41:20 +0000 (14:41 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes:
  "make namespacecheck" fixes
  x86: fix compilation error in VisWS
  x86: voyager fix
  x86: Drop duplicate from setup.c
  intel-iommu.c: dma ops fix

16 years ago"make namespacecheck" fixes
Ingo Molnar [Wed, 23 Apr 2008 11:20:56 +0000 (13:20 +0200)]
"make namespacecheck" fixes

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix compilation error in VisWS
Alexey Starikovskiy [Mon, 21 Apr 2008 09:32:01 +0000 (13:32 +0400)]
x86: fix compilation error in VisWS

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: voyager fix
Ingo Molnar [Mon, 21 Apr 2008 11:39:53 +0000 (13:39 +0200)]
x86: voyager fix

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: Drop duplicate from setup.c
Alexey Starikovskiy [Mon, 21 Apr 2008 09:31:55 +0000 (13:31 +0400)]
x86: Drop duplicate from setup.c

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agointel-iommu.c: dma ops fix
Ingo Molnar [Tue, 22 Apr 2008 09:09:04 +0000 (11:09 +0200)]
intel-iommu.c: dma ops fix

Stephen Rothwell noticed that:

Commit 2be621498d461b63ca6124f86e3b9582e1a8e722 ("x86: dma-ops on highmem
fix") in Linus' tree introduced a new warning (noticed in the x86_64
allmodconfig build of linux-next):

drivers/pci/intel-iommu.c:2240: warning: initialization from incompatible pointer type

Which points at an instance of map_single that needs updating.

Fix it to the new prototype.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Thu, 24 Apr 2008 20:47:31 +0000 (13:47 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix typo in previous commit
  [CIFS] Fix define for new proxy cap to match documentation
  [CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slash
  [CIFS] Reserve new proxy cap for WAFS
  [CIFS] Add various missing flags and defintions
  [CIFS] make cifs_dfs_automount_list_static
  [CIFS] Fix oops when slow oplock process races with unmount
  [CIFS] Fix acl length when very short ACL being modified by chmod
  [CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail on reconnect
  [CIFS] minor update to change log

16 years agoRxRPC: Fix a regression in the RXKAD security module
David Howells [Thu, 24 Apr 2008 19:38:56 +0000 (20:38 +0100)]
RxRPC: Fix a regression in the RXKAD security module

Fix a regression in the RXKAD security module introduced in:

commit 91e916cffec7c0153c5cbaa447151862a7a9a047
Author: Al Viro <viro@ftp.linux.org.uk>
Date:   Sat Mar 29 03:08:38 2008 +0000

net/rxrpc trivial annotations

A variable was declared as a 16-bit type rather than a 32-bit type.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-with-apologies-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRemove -numa from EXTRAVERSION
Sebastian Siewior [Thu, 24 Apr 2008 19:32:28 +0000 (21:32 +0200)]
Remove -numa from EXTRAVERSION

This snuck in through 919ee677b656c52c5f86d3d916786891220d5452
("[SPARC64]: Add NUMA support")

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Thu, 24 Apr 2008 18:46:16 +0000 (11:46 -0700)]
Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits)
  SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request
  make nfs_automount_list static
  NFS: remove duplicate flags assignment from nfs_validate_mount_data
  NFS - fix potential NULL pointer dereference v2
  SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use
  SUNRPC: Fix a race in gss_refresh_upcall()
  SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests
  SUNRPC: Remove the unused export of xprt_force_disconnect
  SUNRPC: remove XS_SENDMSG_RETRY
  SUNRPC: Protect creds against early garbage collection
  NFSv4: Attempt to use machine credentials in SETCLIENTID calls
  NFSv4: Reintroduce machine creds
  NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()
  nfs: fix printout of multiword bitfields
  nfs: return negative error value from nfs{,4}_stat_to_errno
  NLM/lockd: Ensure client locking calls use correct credentials
  NFS: Remove the buggy lock-if-signalled case from do_setlk()
  NLM/lockd: Fix a race when cancelling a blocking lock
  NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call
  NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel
  ...

16 years agoMerge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Thu, 24 Apr 2008 18:45:00 +0000 (11:45 -0700)]
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux

* 'for-linus' of git://linux-nfs.org/~bfields/linux: (52 commits)
  knfsd: clear both setuid and setgid whenever a chown is done
  knfsd: get rid of imode variable in nfsd_setattr
  SUNRPC: Use unsigned loop and array index in svc_init_buffer()
  SUNRPC: Use unsigned index when looping over arrays
  SUNRPC: Update RPC server's TCP record marker decoder
  SUNRPC: RPC server still uses 2.4 method for disabling TCP Nagle
  NLM: don't let lockd exit on unexpected svc_recv errors (try #2)
  NFS: don't let nfs_callback_svc exit on unexpected svc_recv errors (try #2)
  Use a zero sized array for raw field in struct fid
  nfsd: use static memory for callback program and stats
  SUNRPC: remove svc_create_thread()
  nfsd: fix comment
  lockd: Fix stale nlmsvc_unlink_block comment
  NFSD: Strip __KERNEL__ testing from unexported header files.
  sunrpc: make token header values less confusing
  gss_krb5: consistently use unsigned for seqnum
  NFSD: Remove NFSv4 dependency on NFSv3
  SUNRPC: Remove PROC_FS dependency
  NFSD: Use "depends on" for PROC_FS dependency
  nfsd: move most of fh_verify to separate function
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Thu, 24 Apr 2008 18:21:08 +0000 (11:21 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (452 commits)
  V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
  V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
  V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
  V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
  V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
  V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
  V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
  V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
  V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
  V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
  V4L/DVB (7719): pvrusb2: Implement input selection enforcement
  V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
  V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
  V4L/DVB (7716): pvrusb2: clean up global functions
  V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
  V4L/DVB (7714): pvrusb2: Fix hang on module removal
  V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
  V4L/DVB (7712): pvrusb2: Close connect/disconnect race
  V4L/DVB (7711): pvrusb2: Fix race on module unload
  V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
  ...

16 years agoMerge branch 'devel'
Trond Myklebust [Thu, 24 Apr 2008 18:01:02 +0000 (14:01 -0400)]
Merge branch 'devel'

16 years agoSUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request
Trond Myklebust [Tue, 22 Apr 2008 20:47:55 +0000 (16:47 -0400)]
SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request

RFC 2203 requires the server to drop the request if it believes the
RPCSEC_GSS context is out of sequence. The problem is that we have no way
on the client to know why the server dropped the request. In order to avoid
spinning forever trying to resend the request, the safe approach is
therefore to always invalidate the RPCSEC_GSS context on every major
timeout.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoV4L/DVB (7731): tuner-xc2028: fix signal strength calculus
Mauro Carvalho Chehab [Thu, 24 Apr 2008 14:19:55 +0000 (11:19 -0300)]
V4L/DVB (7731): tuner-xc2028: fix signal strength calculus

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
Mauro Carvalho Chehab [Thu, 24 Apr 2008 13:56:41 +0000 (10:56 -0300)]
V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares

There are different tables for MTS firmwares. This should be taken into
account while selecting the proper firmware.

While at tuner-xc2028.h, improve some comments.

Thanks to Edward J. Sheldrake <ejs1920@yahoo.co.uk> for helping to
diagnose such troubles with PAL/I standard.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
Alan Cox [Sun, 20 Apr 2008 14:27:36 +0000 (11:27 -0300)]
V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv

Frank Bennett reported that ivtv was causing skype to crash. With help
from one of their developers he showed it was a kernel problem.
VIDIOCGCAP copies a name into a fixed length buffer - ivtv uses names
that are too long and does not truncate them so corrupts a few bytes of
the app data area.

Possibly the names also want trimming but for now this should fix the
corruption case.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
Mauro Carvalho Chehab [Wed, 23 Apr 2008 20:27:27 +0000 (17:27 -0300)]
V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
Steven Toth [Mon, 14 Jan 2008 02:44:47 +0000 (23:44 -0300)]
V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800

cx23885: Enable cx23417 support on the HVR1800

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
Steven Toth [Mon, 14 Jan 2008 02:42:44 +0000 (23:42 -0300)]
V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support

cx23885: Add generic cx23417 hardware encoder support.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
Mike Isely [Mon, 21 Apr 2008 06:52:34 +0000 (03:52 -0300)]
V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface

Change how list of possible pvrusb2 inputs is generated to include
only those interfaces that make sense for the interface instance.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
Mike Isely [Mon, 21 Apr 2008 06:50:39 +0000 (03:50 -0300)]
V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit...
Mike Isely [Mon, 21 Apr 2008 06:49:33 +0000 (03:49 -0300)]
V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
Mike Isely [Mon, 21 Apr 2008 06:48:41 +0000 (03:48 -0300)]
V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7719): pvrusb2: Implement input selection enforcement
Mike Isely [Mon, 21 Apr 2008 06:47:43 +0000 (03:47 -0300)]
V4L/DVB (7719): pvrusb2: Implement input selection enforcement

In the pvrusb2 driver, different interfaces (e.g. V4L, DVB) have

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
Michael Krufky [Sun, 20 Apr 2008 05:42:55 +0000 (02:42 -0300)]
V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections

These changes are required with the addition of digital television support
for the Hauppauge HVR1900 & HVR1950, the OnAir Creator and Sasem USB HDTV

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
Michael Krufky [Sat, 19 Apr 2008 18:36:51 +0000 (15:36 -0300)]
V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7716): pvrusb2: clean up global functions
Adrian Bunk [Fri, 18 Apr 2008 08:38:56 +0000 (05:38 -0300)]
V4L/DVB (7716): pvrusb2: clean up global functions

This patch contains the following cleanups:
- make the following needlessly global function static:
  - pvr2_hdw_set_cur_freq()
- #if 0 the following unused global functions:
  - pvr2_hdw_get_state_name()
  - pvr2_hdw_get_debug_info_unlocked()
  - pvr2_hdw_get_debug_info_locked()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
Mike Isely [Wed, 9 Apr 2008 08:44:57 +0000 (05:44 -0300)]
V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__

Apparently the kernel developers no longer consider it proper
etiquette to use __FUNCTION__; everyone must instead use __func__
(even though it breaks with older compilers).  And worse still, actual
effort is being expended to sweep this change throughout the kernel
source tree.  Don't these people have better things to do?  So...
Completely clean out all use of __FUNCTION__ from the pvrusb2 driver
(it was just in the sysfs interface).  I'm not going to use __func__
either.  So there.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7714): pvrusb2: Fix hang on module removal
Mike Isely [Wed, 9 Apr 2008 08:14:11 +0000 (05:14 -0300)]
V4L/DVB (7714): pvrusb2: Fix hang on module removal

The pvrusb2 driver was getting had by this scenario:

1. Task A calls kthread_stop() for task B.
2. Before exiting, then Task B calls kthread_stop() for task C.

The problem is, kthread_stop() wants to allocate an internal resource
to itself (i.e. acquire a lock), which won't be released until
kthread_stop() returns.  But kthread_stop() won't return until task B
is dead.  But task B won't die until it finishes its call to
kthread_stop() for task C, and that will block waiting on the resource
already allocated inside task A.  Deadlock.

With the pvrusb2 driver, task A is the caller to pvr_exit(), task B is
the control thread run inside of pvrusb2-context.c, and task C is any
worker thread run inside of pvrusb2-hdw.c.

This problem got introduced by the previous threading setup change,
which was itself an attempt to fix a module tear-down race (which it
actually did fix).  The lesson here is that a task being waited on as
part of a kthread_stop() simply cannot be allow to also issue a
kthread_stop() - or we make sure not to issue the enclosing
kthread_stop() until we know that the inner kthread_stop() has
completed first.  The solution for the pvrusb2 driver is some hackish
code which changes the main control thread tear down into a two step
process.  This then makes it possible to delay issuing the
kthread_stop() on the control thread until after we know that
everything has been torn down first.  (And yes, we really need that
kthread_stop() because it's the only way to safely guarantee that a
module-referencing kernel thread has safely returned back out of the
module before we finally remove the module.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
Mike Isely [Mon, 7 Apr 2008 05:57:13 +0000 (02:57 -0300)]
V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown

Earlier fix to handle DVB feed thread aborts was overly-aggressive.
We can take better advantage of what kthread_stop() can do.  This
change simplifies things.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7712): pvrusb2: Close connect/disconnect race
Mike Isely [Mon, 7 Apr 2008 05:22:43 +0000 (02:22 -0300)]
V4L/DVB (7712): pvrusb2: Close connect/disconnect race

If a disconnect happens before initialization is completed, the
pvrusb2 driver can accidentally touch dangling pointers.  The whole
initialization function must be protected by the big_lock, and once
inside that lock, the initialization function should abort if it is
discovered that a disconnect has already taken place.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7711): pvrusb2: Fix race on module unload
Mike Isely [Mon, 7 Apr 2008 05:22:04 +0000 (02:22 -0300)]
V4L/DVB (7711): pvrusb2: Fix race on module unload

The pvrusb2 driver - for basically forever - was not enforcing a
proper module tear-down.  Kernel threads are used inside the driver
and all must be gone before the module can be safely removed.  This
changeset reimplements a chunk of pvrusb2-context.c to enforce this
correctly.  Unfortunately this is not a simple fix.  The new
implementation also cuts back on kernel thread usage; instead of there
being 1 control thread per instance now it's just 1 control thread
shared by all instances.  (By dropping to a single thread then the
module exit function can block on its shutdown and the thread itself
can monitor and cleanly shut down all of the other instances first.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
Mike Isely [Sun, 6 Apr 2008 07:04:35 +0000 (04:04 -0300)]
V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices

Implement timed measurement of encoder operation for the first time it
is run.  This allows the driver to note when the encoder has been run
successfully for at least 1/4 second.  On top of that implement
various bits to ensure that the encoder has been run once before
digital streaming for OnAir devices.  This is done via several core
state machine tweaks.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7709): pvrusb2: New device attribute for encoder usage in digital mode
Mike Isely [Thu, 3 Apr 2008 07:51:19 +0000 (04:51 -0300)]
V4L/DVB (7709): pvrusb2: New device attribute for encoder usage in digital mode

Some tuners seem to not work in digital mode unless the encoder is
healthy.  Implement a device attribute to represent this flag and
modify the core state machines to enforce this requirement.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7708): pvrusb2-dvb: Fix stuck thread on streaming abort
Mike Isely [Sun, 30 Mar 2008 23:36:31 +0000 (20:36 -0300)]
V4L/DVB (7708): pvrusb2-dvb: Fix stuck thread on streaming abort

If the device fails to stream, the feed thread will block forever
waiting for buffers.  But while in this state it was not looking for
an exit condition from the driver DVB interface.  This caused the
thread to jam.  Implement a new stop flag (which will be set
appropriately) to tell the thread to stop.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7707): pvrusb2-dvb: add atsc/qam support for Hauppauge pvrusb2 model 750xx
Michael Krufky [Fri, 28 Mar 2008 08:49:36 +0000 (05:49 -0300)]
V4L/DVB (7707): pvrusb2-dvb: add atsc/qam support for Hauppauge pvrusb2 model 750xx

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7706): pvrusb2: create a separate pvr2_device_desc structure for 751xx models
Michael Krufky [Fri, 28 Mar 2008 08:48:44 +0000 (05:48 -0300)]
V4L/DVB (7706): pvrusb2: create a separate pvr2_device_desc structure for 751xx models

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7705): pvrusb2: Enable OnAir digital operation
Michael Krufky [Fri, 28 Mar 2008 08:47:47 +0000 (05:47 -0300)]
V4L/DVB (7705): pvrusb2: Enable OnAir digital operation

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7704): pvrusb2: Fix slop involving use of struct which might not be defined
Mike Isely [Fri, 28 Mar 2008 08:43:45 +0000 (05:43 -0300)]
V4L/DVB (7704): pvrusb2: Fix slop involving use of struct which might not be defined

When the DVB interface is not compiled, the pvr2_dvb_props struct is
not available - so it really should be ifdef'ed out as well.  This
didn't cause an error because in this context its usage was as an
opaque pointer.  But it really shouldn't be present at all if DVB is
not enabled.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7703): pvrusb2: Fix minor problem involving ARRAY_SIZE confusion
Mike Isely [Fri, 28 Mar 2008 08:42:10 +0000 (05:42 -0300)]
V4L/DVB (7703): pvrusb2: Fix minor problem involving ARRAY_SIZE confusion

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7702): pvrusb2: Rework USB streaming start/stop execution
Mike Isely [Fri, 28 Mar 2008 08:41:19 +0000 (05:41 -0300)]
V4L/DVB (7702): pvrusb2: Rework USB streaming start/stop execution

The commands to start / stop USB streaming for an analog device are
fairly standard, owing to the fact that all supported devices
apparently started from the same common reference design.  However
with digital mode, the commands seem to vary by vendor.  This change
makes that variance more explicit.  It also cleans up a related
problem for OnAir devices which prevented digital mode from working at
all.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7701): pvrusb2: Centralize handling of simple FX2 commands
Mike Isely [Fri, 28 Mar 2008 08:38:54 +0000 (05:38 -0300)]
V4L/DVB (7701): pvrusb2: Centralize handling of simple FX2 commands

Numerous places in the driver need to issue simple commands to the FX2
microcontroller (e.g. only 1 or 2 bytes, no reply needed).  Previously
each place that did this, had to take lock, set up a central buffer,
and call the function to perform the handshake.  This change puts
these steps into a single spot.  This also has the effect of removing
the need to mess with the control lock from numerous places in the
code.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7700): pvrusb2: Make FX2 command codes unsigned constants
Mike Isely [Fri, 28 Mar 2008 08:36:25 +0000 (05:36 -0300)]
V4L/DVB (7700): pvrusb2: Make FX2 command codes unsigned constants

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7699): pvrusb2: Implement statistics for USB I/O performance / tracking
Mike Isely [Fri, 28 Mar 2008 08:34:45 +0000 (05:34 -0300)]
V4L/DVB (7699): pvrusb2: Implement statistics for USB I/O performance / tracking

Implement a mechanism in the pvrusb2 driver for gathering statistics
on the stream buffering, including bytes transferred, buffers handled,
buffers in flight, etc.  This is useful for debugging certain classes
of streaming issues and for determining if the buffer pool size is
generally correct for the driver.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7698): pvrusb2: Remove never-reached break statements (trivial)
Mike Isely [Fri, 28 Mar 2008 08:32:23 +0000 (05:32 -0300)]
V4L/DVB (7698): pvrusb2: Remove never-reached break statements (trivial)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7697): pvrusb2: Fix misleading bit of debug output (trivial)
Mike Isely [Fri, 28 Mar 2008 08:31:40 +0000 (05:31 -0300)]
V4L/DVB (7697): pvrusb2: Fix misleading bit of debug output (trivial)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7696): pvrusb2: state control tweak
Mike Isely [Fri, 28 Mar 2008 08:30:48 +0000 (05:30 -0300)]
V4L/DVB (7696): pvrusb2: state control tweak

Don't trigger a pathway state change if it's already been triggered
(eliminates some wasted processing and some debug output noise)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7695): pvrusb2: Make associativity of == and && explicit (cosmetic)
Mike Isely [Fri, 28 Mar 2008 08:28:20 +0000 (05:28 -0300)]
V4L/DVB (7695): pvrusb2: Make associativity of == and && explicit (cosmetic)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7694): pvrusb2: Fix compilation goof when CONFIG_VIDEO_PVRUSB2_DVB is off
Mike Isely [Sun, 16 Mar 2008 05:12:12 +0000 (02:12 -0300)]
V4L/DVB (7694): pvrusb2: Fix compilation goof when CONFIG_VIDEO_PVRUSB2_DVB is off

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7693): pvrusb2-dvb: Change usage of 0 --> NULL
Mike Isely [Sat, 9 Feb 2008 22:47:52 +0000 (19:47 -0300)]
V4L/DVB (7693): pvrusb2-dvb: Change usage of 0 --> NULL

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7692): pvrusb2-dvb: Further clean up dvb init/tear-down
Mike Isely [Sat, 9 Feb 2008 22:47:07 +0000 (19:47 -0300)]
V4L/DVB (7692): pvrusb2-dvb: Further clean up dvb init/tear-down

Move pvr2_dvb_adapter usage out of the pvrusb2 driver core - it's
really private to the pvrusb2-dvb module and nothing outside of the
dvb implementation should care about it.  Creation / destruction of
the pvr2_dvb_adapter instance is now contained entirely within
pvrusb2-dvb.c.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7691): pvrusb2-dvb: Don't initialize if device lacks a digital side
Mike Isely [Sat, 9 Feb 2008 19:29:52 +0000 (16:29 -0300)]
V4L/DVB (7691): pvrusb2-dvb: Don't initialize if device lacks a digital side

In the end we'd like the dvb interface to always be present - even for
analog devices (via the mpeg encoder).  However right now pvrusb2-dvb
won't operate correctly if the hardware doesn't have a digital tuner,
so don't initialize the DVB interface unless we know we have a digital
tuner.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7690): pvrusb2-dvb: Remove digital_up flag
Mike Isely [Sat, 9 Feb 2008 18:55:54 +0000 (15:55 -0300)]
V4L/DVB (7690): pvrusb2-dvb: Remove digital_up flag

Other pvrusb2-dvb changes have made the digital_up flag obsolete.  So
kill it.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7689): pvrusb2-dvb: Rework module tear-down
Mike Isely [Sat, 9 Feb 2008 18:44:30 +0000 (15:44 -0300)]
V4L/DVB (7689): pvrusb2-dvb: Rework module tear-down

Rather than making an explicit call to tear down the pvrusb2-dvb
module, use the callback in the pvr2_channel structure.  This has the
advantage that now tear-down only happens when it makes sense.  The
previous implementation had scenarios where it was possible for the
tear-down call to happen without a prior initialization.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7688): pvrusb2: Clean up dvb streaming start/stop
Mike Isely [Wed, 6 Feb 2008 09:59:48 +0000 (06:59 -0300)]
V4L/DVB (7688): pvrusb2: Clean up dvb streaming start/stop

Eliminate the need for a separate pvr2_dvb_fh; since in the DVB
context there can only ever be a single instance then there is no need
for a separate instance to handle streaming state.  This simplifies
the module.  Also move streaming start/stop out of the feed thread and
into the driver's main context - which makes it possible for streaming
start up failures to be detected by the DVB core.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7687): pvrusb2: Fix oops in pvrusb2-dvb
Mike Isely [Wed, 6 Feb 2008 07:24:51 +0000 (04:24 -0300)]
V4L/DVB (7687): pvrusb2: Fix oops in pvrusb2-dvb

The pvrusb2-dvb feed thread cannot be allowed to exit by itself
without first waiting for kthread_should_stop() to return true.
Otherwise the driver will have a dangling task_struct context, which
will cause a very nasty kernel oops.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7686): pvrusb2: Fix broken debug interface build
Mike Isely [Mon, 4 Feb 2008 07:22:21 +0000 (04:22 -0300)]
V4L/DVB (7686): pvrusb2: Fix broken debug interface build

Fix pvrusb2 kbuild typo introduced when pvrusb2-dvb was added.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7685): pvrusb2: Fix really bad typo if DVB config option description
Mike Isely [Mon, 4 Feb 2008 04:00:33 +0000 (01:00 -0300)]
V4L/DVB (7685): pvrusb2: Fix really bad typo if DVB config option description

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7684): pvrusb2: Add VIDEO_PVRUSB2_DVB config variable
Mike Isely [Mon, 4 Feb 2008 03:12:16 +0000 (00:12 -0300)]
V4L/DVB (7684): pvrusb2: Add VIDEO_PVRUSB2_DVB config variable

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7683): pvrusb2-dvb: set to DTV mode before attaching frontend
Michael Krufky [Sun, 10 Feb 2008 08:33:37 +0000 (05:33 -0300)]
V4L/DVB (7683): pvrusb2-dvb: set to DTV mode before attaching frontend

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7682): pvrusb2-dvb: finish up stream & buffer handling
Mike Isely [Mon, 4 Feb 2008 03:00:19 +0000 (00:00 -0300)]
V4L/DVB (7682): pvrusb2-dvb: finish up stream & buffer handling

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7681): pvrusb2-dvb: start working on streaming / buffer handling code
Michael Krufky [Mon, 4 Feb 2008 02:55:07 +0000 (23:55 -0300)]
V4L/DVB (7681): pvrusb2-dvb: start working on streaming / buffer handling code

start work on streaming / buffer handling code to feed the software demux

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7680): pvrusb2-dvb: add pvr2_dvb_bus_ctrl to allow frontends to negotiate...
Michael Krufky [Mon, 4 Feb 2008 02:48:09 +0000 (23:48 -0300)]
V4L/DVB (7680): pvrusb2-dvb: add pvr2_dvb_bus_ctrl to allow frontends to negotiate bus access

This function is just a skeleton for now -
a placeholder to remind us to fix it.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7679): pvrusb2: add DVB API framework
Michael Krufky [Mon, 4 Feb 2008 02:46:16 +0000 (23:46 -0300)]
V4L/DVB (7679): pvrusb2: add DVB API framework

Add basic framework for the DVB API.  This is enough to control the
tuner & demod of the digital frontend, but the stream & buffer handling
is still missing.

Additional note from Mike Isely <isely@pobox.com> - also, since these
changes are still very experimental arrange for DVB changes to be
compiled in via new CONFIG_VIDEO_PVRUSB2_DVB option, for now.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7678): pvrusb2: Fix stupid string typo that has been reproducing wildly
Mike Isely [Sun, 16 Mar 2008 04:13:17 +0000 (01:13 -0300)]
V4L/DVB (7678): pvrusb2: Fix stupid string typo that has been reproducing wildly

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7677): saa7134: Add/fix Beholder entries
Dmitry Belimov [Wed, 23 Apr 2008 17:09:08 +0000 (14:09 -0300)]
V4L/DVB (7677): saa7134: Add/fix Beholder entries

Beholder TV/FM tuners:

Changes:
     Add support Beholder Columbus PCMCIA card.
     Add key map for remote control of Beholder Columbus PCMCIA card.
     Fix gpiomask for all Beholder tuners.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7676): saa7134: fix: Properly handle busy states on i2c bus
Dmitry Belimov [Wed, 23 Apr 2008 17:07:09 +0000 (14:07 -0300)]
V4L/DVB (7676): saa7134: fix: Properly handle busy states on i2c bus

There are two conditions, reported by saa7134 that indicates that the I2C bus
is busy: TO_SCL and TO_ARB.

On both states, it needs to wait for I2C release, before using the bus.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7675): tea5767 autodetection is not working on some saa7134 boards
Dmitry Belimov [Wed, 23 Apr 2008 17:01:52 +0000 (14:01 -0300)]
V4L/DVB (7675): tea5767 autodetection is not working on some saa7134 boards

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7674): tda10048: Adding an SNR table
Steven Toth [Wed, 23 Apr 2008 01:52:01 +0000 (22:52 -0300)]
V4L/DVB (7674): tda10048: Adding an SNR table

Trying to improve the SNR reporting.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7673): cx23885: Add support for the Hauppauge HVR1400
Steven Toth [Tue, 22 Apr 2008 18:38:26 +0000 (15:38 -0300)]
V4L/DVB (7673): cx23885: Add support for the Hauppauge HVR1400

DVB-T mode is now supported using the DiBcom dib7000p demodulator
and the Xceive xc3028L silicon tuner. Analog mode is not supported.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7672): dib7000p: Add output mode param to the attach struct
Steven Toth [Tue, 22 Apr 2008 18:37:01 +0000 (15:37 -0300)]
V4L/DVB (7672): dib7000p: Add output mode param to the attach struct

This allows future drivers to select the most appropriate output mode.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7671): pxa-camera: fix DMA sg-list coalescing for more than 2 buffers
Guennadi Liakhovetski [Tue, 22 Apr 2008 13:40:23 +0000 (10:40 -0300)]
V4L/DVB (7671): pxa-camera: fix DMA sg-list coalescing for more than 2 buffers

Currently the pxa-camera driver has a bug, visible when the user requests
more than 2 video buffers. When the third buffer is queued, it is not
appended to the DMA-descriptor list of the second buffer, but is again
appended to the first buffer. Fix it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7670): pxa-camera: handle FIFO overruns
Guennadi Liakhovetski [Tue, 22 Apr 2008 13:37:49 +0000 (10:37 -0300)]
V4L/DVB (7670): pxa-camera: handle FIFO overruns

FIFO overruns are not seldom on PXA camera interface FIFOs. Handle them by
dropping the corrupted frame, waiting for the next start-of-frame, and
restarting capture.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7669): pxa_camera: Add support for YUV modes
Mike Rapoport [Tue, 22 Apr 2008 13:36:32 +0000 (10:36 -0300)]
V4L/DVB (7669): pxa_camera: Add support for YUV modes

This patch adds support for YUV packed and planar capture for pxa_camera.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7668): soc-camera: Remove redundant return
Guennadi Liakhovetski [Tue, 22 Apr 2008 13:33:39 +0000 (10:33 -0300)]
V4L/DVB (7668): soc-camera: Remove redundant return

This obviously redundant return has been in the driver from the very first
version. Remove it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7666): meye: Replace meye_do_ioctl to use video_ioctl2
Douglas Schilling Landgraf [Thu, 10 Apr 2008 05:07:14 +0000 (02:07 -0300)]
V4L/DVB (7666): meye: Replace meye_do_ioctl to use video_ioctl2

Convert meye to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7665): videodev: Add default vidioc handler
Douglas Schilling Landgraf [Thu, 10 Apr 2008 04:18:56 +0000 (01:18 -0300)]
V4L/DVB (7665): videodev: Add default vidioc handler

Added default vidioc handler for other private ioctls

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7663): budget: Support for Activy budget card with BSBE1 tuner
Oliver Endriss [Mon, 21 Apr 2008 01:34:57 +0000 (22:34 -0300)]
V4L/DVB (7663): budget: Support for Activy budget card with BSBE1 tuner

Add support for Activy budget card with BSBE1 tuner, subsystem id 0x1131:0x4f60.
Low band and DiSEqC support should work now (BSBE1 and BSRU6 tuner).

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7662): stv0299: Fixed some typos
Oliver Endriss [Mon, 21 Apr 2008 01:13:37 +0000 (22:13 -0300)]
V4L/DVB (7662): stv0299: Fixed some typos

Fixed some typos.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7661): stv0299: Add flag to turn off OP0 output
Oliver Endriss [Mon, 21 Apr 2008 00:57:34 +0000 (21:57 -0300)]
V4L/DVB (7661): stv0299: Add flag to turn off OP0 output

Add flag to turn off OP0 output.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7660): bsbe1: Use settings recommended by the manufacturer
Oliver Endriss [Sun, 20 Apr 2008 23:41:42 +0000 (20:41 -0300)]
V4L/DVB (7660): bsbe1: Use settings recommended by the manufacturer

Reworked the BSBE1 tuner support in bsbe1.h to follow
the ALPS-recommended parameters more closely.

Tested with BSBE1-based Activy cards and TT DVB-S rev 2.3.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7659): dvb-core: Implement DMX_SET_BUFFER_SIZE for dvr
Andrea Odetti [Sun, 20 Apr 2008 22:14:51 +0000 (19:14 -0300)]
V4L/DVB (7659): dvb-core: Implement DMX_SET_BUFFER_SIZE for dvr

Implementation of DMX_SET_BUFFER_SIZE for dvr.
Synchronization of the code of DMX_SET_BUFFER_SIZE for demux and dvr.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7658): dvb-core: Fix DMX_SET_BUFFER_SIZE in case the buffer shrinks
Andrea Odetti [Sun, 20 Apr 2008 21:37:45 +0000 (18:37 -0300)]
V4L/DVB (7658): dvb-core: Fix DMX_SET_BUFFER_SIZE in case the buffer shrinks

This patch fixes the bug in DMX_SET_BUFFER_SIZE for the demux.
Basically it resets read and write pointers to 0 in case they are
beyond the new size of the buffer.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7656): tda826x: Calculate cut off fequency from symbol rate
Hartmut Hackmann [Mon, 14 Apr 2008 01:41:19 +0000 (22:41 -0300)]
V4L/DVB (7656): tda826x: Calculate cut off fequency from symbol rate

This patch makes the tuner work with transonders providing higher
symbol rates.
It was contributed by Oliver Endriss.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>