Commit Graph

15 Commits

Author SHA1 Message Date
Adrian Bunk
d9aedf1fe8 V4L/DVB (7479): proper prototype for zoran_device.c:zr36016_write()
This patch adds a proper prototype for zr36016_write() in
drivers/media/video/zoran_card.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Roel Kluin
7bf9746d93 V4L/DVB (7459): Test cmd, not definition in decoder_command(), drivers/media/video/zoran_device.c
include/linux/video_decoder.h:
34:#define DECODER_SET_NORM	_IOW('d', 3, int)
35:#define DECODER_SET_INPUT	_IOW('d', 4, int)

untested, please confirm it's right.

Test cmd value, not definition of DECODER_SET_INPUT

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Douglas Schilling Landgraf
ff699e6bd0 V4L/DVB (7094): static memory
- Static memory is always initialized with 0.
- Replaced in some cases C99 comments for /* */

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:20 -03:00
Mauro Carvalho Chehab
6165894fb6 V4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum
Thanks to Martin Michlmayr <tbm@cyrius.com> for reporting this issue:

The zoran driver fails to compile on the ARM Orion platform with:

In file included from drivers/media/video/zoran_procfs.c:50:
drivers/media/video/zoran.h:232: error: expected identifier before numeric
constant

The reason is that drivers/media/video/zoran.h defines an enum with
GPIO_MAX in it, but Orion contains a #define GPIO_MAX 32 in
include/asm-arm/arch-orion/orion.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 12:18:28 -03:00
Trent Piepho
60e3cac47a V4L/DVB (5885): zr36067: Fix problems with module parameters
Add permissions to all the module parameters so they can be queried and set
(when possible) via sysfs.

Add description for the vidmem parameter.

Change the video_nr parameter to an array, so that the video number can be
specified when a user has more than one card.  The driver would try to give
all cards the same number otherwise, which will fail for all cards after the
first.

The default_input option would only allow values of 0 or 1, contrary to the
description.  Allow values up to the number of inputs defined for the card.

Add description of lock_norm's different behavior for 1 and >1.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:58 -03:00
Jean Delvare
18b548ca58 V4L/DVB (5884): zr36067: clean up debug function
Debugging cleanups to the zr36067 driver:

* Use module_param_named() to declare the debug parameter, so we can
  use a single global variable to handle the debug level. This makes
  the driver a bit smaller (by 648 bytes on x86_64), thanks to one
  less level of indirection on every use.

* Change the debug parameter sysfs permissions, so that the debug
  level can be adjusted at runtime, as is done in many other
  media/video drivers.

* The debug level is between 0 and 5, not 0 and 4.

* Move the zr_debug export and dprintk macro definition to a header
  file so that we don't have to define them in each source file.

* Simplify a duplicate test on zr_debug.

Note that zr_debug was subsequently renamed to debug_zr36067 to avoid
possible conflicts with other Zoran device drivers, on a suggestion
by Trent Piepho.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:57 -03:00
Trent Piepho
9896bbc197 V4L/DVB (5891): zr36067: Turn off raw capture properly
When raw capture was turned off, the current capturing frame (v4l_grab_frame)
wasn't reset to NO_GRAB_ACTIVE.  If capture was turned back on, the driver
would think this frame was currently being captured, and wait for it to
complete before starting a new frame.  The hardware on the other hand would
not be actively capturing a frame.  The result was the driver would wait
forever for v4l_grab_frame to be captured.

Some calls to zr36057_set_memgrab(0) were missing spin-locks, which have been
added.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-30 16:26:26 -03:00
Trent Piepho
603d6f2c8f V4L/DVB (5890): zr36067: Add UYVY, RGB555X, RGB565X, and RGB32 formats
Add support for the UYVY and the other big endian output formats.  The
driver was naming formats based on the host endianess.  This is different
that all the other drivers appear to work and not what software appears
to expect.

Use ARRAY_SIZE() to find the the size of the zoran_formats array.

Change the way the driver handles setting the video format register.  Rather
than use some if and switch statements to set to register by looking at the
format id, the format list simply has a field with the proper bits to set.

Adds a bit of ifdef to make a driver without V4L1 support more possible.
Also create a macro for defining formats that handles vl41 and/or vl42
support to avoid repeated ifdefs in the format list.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-30 16:26:26 -03:00
audetto@tiscali.it
2485eb0a55 V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette
Consistent handling of VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422

Signed-off-by: Andrea A Odetti <audetto@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:18:50 -02:00
Jeff Garzik
c7bec5aba5 Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void*

- Eliminate checks for conditions that never occur.  These typically
  fall into two classes:

	1) Checking for 'dev_id == NULL', then it is never called with
	NULL as an argument.

	2) Checking for invalid irq number, when the only caller (the
	system) guarantees the irq handler is called with the proper
	'irq' number argument.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-06 15:00:58 -04:00
David Howells
7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Jörn Engel
6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Mauro Carvalho Chehab
d6144028af V4L/DVB (4036): Fix some compilation warnings
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 02:00:36 -03:00
Mauro Carvalho Chehab
d56410e0a5 V4L/DVB (3599b): Whitespace cleanups under drivers/media
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-25 09:29:23 -03:00
Linus Torvalds
1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00