linux/drivers
Marin Mitov d42bffb899 Staging: Yet another (third) dt3155 driver PCI/video4linux compliant
Kernel module (device driver) for dt3155 frame grabber
video4linux2 compliant (finally). Works with "xawtv -f".

======================================================

This driver is written (almost) from scratch, using the
allocator developed for dt3155pci see bellow). The driver
uses videobuf-dma-contig interface modified to use the above
mentioned allocator instead of dma_alloc_coheren().

The first thing to do was to design a new allocator based
on allocating a configurable number of 4MB chunks of memory,
that latter are broken into frame buffers of 768x576 bytes
kept in different FIFOs (queues). As far as the driver autoloads
as a kernel module during kernel boot, the allocation of 4MB
chunks succeeds.

The driver keeps three FIFOs: one for 4MB chunks, one for free
buffers (available for allocations) and one for buffers already
allocated. Allocation/deallocation is done automatically though
the video4linux videobuf subsystem (some pointers to functions
are replaced by driver supplied functions).

Sure, there are problems:

1. The device tested to work with "xawtv -f" either via read()
   method (DT3155_STREAMING not selected), or via mmap() method
   (DT3155_STREAMING is selected) only. This coresponds to either
   cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
   or
   cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
   but not when
   cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
                           V4L2_CAP_STREAMING |
                           V4L2_CAP_READWRITE;
   This is because xawtv calls poll() before starting streaming,
   but videobuf_poll_stream() automatically starts reading if streaming
   is not started.
   This selection is made during kernel configuration (for now).

2. Works for CCIR, but should work for RS-170 (not tested)
   This is made also during kernel configuration.

3. Could work for multiple dt3155 frame grabbers in a PC,
   (private data is allocated during PCI probe() method), but
   is not tested due to lack of a second board.

4. Not tested on a BIG ENDIAN architecture.

5. Many others you could find .... :-)

All critics, comments, suggestions are wellcome.

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:59 -07:00
..
accessibility
acpi Merge branch 'bugzilla-15749' into release 2010-04-16 16:08:07 -04:00
amba
ata libata: ensure NCQ error result taskfile is fully initialized 2010-04-22 21:59:13 -04:00
atm include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
auxdisplay include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
base Revert "memory-hotplug: add 0x prefix to HEX block_size_bytes" 2010-04-09 10:05:33 -07:00
block pktcdvd: improve BKL and compat_ioctl.c usage 2010-04-29 08:44:37 -07:00
bluetooth include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cdrom block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
char Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2010-04-20 09:21:19 -07:00
clocksource include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
connector include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cpufreq Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2010-04-24 11:35:21 -07:00
cpuidle include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
crypto include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dca include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dio
dma include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
edac include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
eisa eisa: fix coding style for eisa bus code 2010-03-06 11:26:32 -08:00
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2010-04-22 12:54:54 -07:00
firmware Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip 2010-04-07 11:02:23 -07:00
gpio Merge master.kernel.org:/home/rmk/linux-2.6-arm 2010-04-29 17:17:35 -07:00
gpu Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-04-27 08:22:50 -07:00
hid Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
hwmon lis3: add support for HP ProBook 432x/442x/452x/522x 2010-04-24 11:31:24 -07:00
i2c i2c-stu300: off by one issue 2010-04-20 01:17:13 +01:00
ide pata_pcmcia/ide-cs: add IDs for transcend and kingston cards 2010-04-22 21:51:12 -04:00
idle include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ieee1394 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ieee802154
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2010-04-09 11:53:06 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-04-15 11:49:55 -07:00
isdn Fix ISDN/Gigaset build failure 2010-04-19 11:53:17 -07:00
leds include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
lguest lguest: stop using KVM hypercall mechanism 2010-04-14 21:43:56 +09:30
macintosh device_attributes: add sysfs_attr_init() for dynamic attributes 2010-04-07 08:38:03 -07:00
mca
md md/raid5: fix previous patch. 2010-04-23 07:08:28 +10:00
media device_attributes: add sysfs_attr_init() for dynamic attributes 2010-04-07 08:38:03 -07:00
memstick include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
message include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mfd include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
misc VMware Balloon driver 2010-04-24 11:31:26 -07:00
mmc omap hsmmc: fix a bug in card remove scenario 2010-04-07 08:38:03 -07:00
mtd Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2010-04-28 07:56:05 -07:00
net sfc: Change falcon_probe_board() to fail for unsupported boards 2010-04-28 12:18:27 -07:00
nubus include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
of Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
oprofile include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
parisc include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
parport include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pci Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-04-29 17:16:36 -07:00
pcmcia pcmcia: fix matching rules for pseudo-multi-function cards 2010-04-26 20:09:07 +02:00
platform eeepc-laptop: add missing sparse_keymap_free 2010-04-23 15:23:21 -04:00
pnp Merge branches 'battery', 'bugzilla-14667', 'bugzilla-15096', 'bugzilla-15480', 'bugzilla-15521', 'bugzilla-15605', 'gpe-reference-counters', 'misc', 'pxm-fix' and 'video-random-key' into release 2010-04-06 17:06:22 -04:00
power include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pps include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ps3 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rapidio
regulator regulator: fix enabling regulator issue on max8925 2010-04-28 15:24:34 +01:00
rtc rtc-mxc: multiple fixes in rtc-mxc probe method 2010-04-07 08:38:05 -07:00
s390 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 2010-04-22 08:43:59 -07:00
sbus include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
scsi scsi: fix operator precedence warning 2010-04-22 11:11:02 -07:00
serial Merge master.kernel.org:/home/rmk/linux-2.6-arm 2010-04-29 17:17:35 -07:00
sfi
sh include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sn include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
spi include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ssb MIPS: Fix SSB PCIcore IO resource management 2010-04-12 17:26:14 +01:00
staging Staging: Yet another (third) dt3155 driver PCI/video4linux compliant 2010-05-11 11:35:59 -07:00
tc include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
telephony
thermal drivers/thermal/thermal_sys.c: fix 'key f70f4b50 not in .data' in thermal_sys 2010-04-07 08:38:03 -07:00
uio include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
usb usb: Increase timeout value for device reset 2010-04-22 15:18:29 -07:00
uwb include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vhost Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2010-04-11 02:44:30 -07:00
video drivers/video/efifb.c: support framebuffer for NVIDIA 9400M in MacBook Pro 5,1 2010-04-24 11:31:24 -07:00
virtio virtio: Fix GFP flags passed from the virtio balloon driver 2010-04-22 07:34:05 -07:00
vlynq include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
w1 w1: fix omap 1-wire driver compilation 2010-04-24 11:31:25 -07:00
watchdog watchdog: booke_wdt: fix build - unconstify watchdog_info 2010-04-27 07:58:47 +00:00
xen include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
zorro tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments 2010-02-15 15:38:10 +01:00
Kconfig MFGPT: move clocksource menu 2010-03-06 11:26:28 -08:00
Makefile Merge branch 'origin' into devel-stable 2010-03-08 20:21:04 +00:00