summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran/zoran_driver.c
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignmentsLaurent Pinchart2009-12-161-1/+0
| | | | | | | | | | | | | Now that the video_device registration is tested using video_is_registered(), drivers don't need to initialize the video_device::minor field to -1 anymore. Remove those unneeded assignments. [mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13241): Cleanup redundant tests on unsignedRoel Kluin2009-12-051-1/+1
| | | | | | | | | The variables are unsigned so the test `>= 0' is always true, the `< 0' test always fails. In these cases the other part of the test catches wrapped values. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* const: mark struct vm_struct_operationsAlexey Dobriyan2009-09-271-1/+1
| | | | | | | | | | | * mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* headers: smp_lock.h reduxAlexey Dobriyan2009-07-121-0/+1
| | | | | | | | | | | | | * Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* V4L/DVB (11904): zoran: Use v4l bounding/alignment functiobTrent Piepho2009-06-231-10/+4
| | | | | | | The v4l function has a better algorithm for aligning image size. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11660): zoran: fix bug when enumerating format -1Trent Piepho2009-05-091-15/+13
| | | | | | | | | | | | | If someone requests a format at fmt->index == (unsigned)-1 and the first format in the array doesn't have the requested type then num will still be -1 when it's compared to fmt->index and there will appear to be a match. Restructure the loop so this can't happen. It's simpler this way too. The unnecessary check for (unsigned)fmt->index < 0 found by Roel Kluin <roel.kluin@gmail.com> is removed this way too. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11380): v4l2-subdev: change s_routing prototypeHans Verkuil2009-04-061-13/+7
| | | | | | | | | It is no longer needed to use a struct pointer as argument, since v4l2_subdev doesn't require that ioctl-like approach anymore. Instead just pass the input, output and config (new!) arguments directly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11370): v4l2-subdev: move s_std from tuner to core.Hans Verkuil2009-04-061-3/+3
| | | | | | | | | s_std didn't belong in the tuner ops. Stricly speaking it should be part of the video ops, but it is used by audio and tuner devices as well, so it is more efficient to make it part of the core ops. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11237): media/zoran: fix printk formatRandy Dunlap2009-03-301-2/+2
| | | | | | | | | | Fix printk format warning: drivers/media/video/zoran/zoran_driver.c:345: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11022): zoran/bt819: use new notify functionality.Hans Verkuil2009-03-301-6/+6
| | | | | | | | Bt819 needs the parent driver to drive a GPIO pin low and high in order to reset its fifo. Use the new notify callback for this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10934): zoran: replace functions names in strings with __func__Trent Piepho2009-03-301-127/+127
| | | | | | | | It reduces the size of the driver over all, and the function names in strings need to be manually kept up to date while __func__ doesn't. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10933): zoran: Pass zoran_fh pointers instead of file pointersTrent Piepho2009-03-301-104/+54
| | | | | | | | | | | | | Many functions had a struct file pointer argument, but all they wants is the struct zoran_fh pointer from the file's private data. Since every caller of those functions already has the zoran_fh, just pass the that instead. This saves a dereference in each function change. While I'm at it, change the code formatting of affected functions to be kernel standard style. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10932): zoran: Don't frighten users with failed buffer allocationJean Delvare2009-03-301-1/+2
| | | | | | | | | | | kmalloc() can fail for large video buffers. By default the kernel complains loudly about allocation failures, but we don't want to frighten the user, so ask kmalloc() to keep quiet on such failures. Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10931): zoran: Drop the lock_norm module parameterJean Delvare2009-03-301-20/+0
| | | | | | | | | | | The lock_norm module parameter doesn't look terribly useful. If you don't want to change the norm, just don't change it. As a matter of fact, no other v4l driver has such a parameter. Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10930): zoran: Unify buffer descriptorsTrent Piepho2009-03-301-476/+353
| | | | | | | The zoran driver had two kinds of buffer descriptors, one for jpg buffers and one for raw buffers. They were mostly the same with only a couple Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10907): avoid loading the entire videodev.h header on V4L2 driversMauro Carvalho Chehab2009-03-301-1/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10848): zoran: Change first argument to zoran_v4l2_buffer_statusTrent Piepho2009-03-301-5/+4
| | | | | | | | | It was a struct file *, but all that function wants is the struct zoran_fh from the file's private data. Since every caller already has this, just pass the zoran_fh instead. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10794): v4l2: Move code to zero querybuf output struct to v4l2_ioctlTrent Piepho2009-03-301-6/+1
| | | | | | | | | | | | | | | | | For VIDIOC_QUERYBUF only the first two fields, size and type, are used as input. The rest can be filled in by the driver as output. Most drivers do not actually use all the field and unused ones should be zeroed out. Some drivers have code to do this and some drivers should but don't. So put some zero out code in v4l2_ioctl so that all drivers using that system get it. The drivers that have zeroing code get that code removed. Some drivers checked that the type field was valid, but v4l2_ioctl already does this so those checks can be removed as well. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10732): zoran: s_jpegcomp should return a proper result, not 0.Hans Verkuil2009-03-301-1/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10730): v4l-dvb: cleanup obsolete references to v4l1 headers.Hans Verkuil2009-03-301-21/+19
| | | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [mchehab@redhat.com: fix compilation of tea575x-tuner.c] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10729): zoran: convert to v4l2_device/v4l2_subdev.Hans Verkuil2009-03-301-60/+18
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10717): zoran: TRY_FMT and S_FMT now do the same parameter checks.Hans Verkuil2009-03-301-2/+10
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10715): zoran: clean up some old V4L1 left-overs and remove the ↵Hans Verkuil2009-03-301-87/+43
| | | | | | | MAP_NR macro. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10714): zoran et al: convert zoran i2c modules to V4L2.Hans Verkuil2009-03-301-162/+58
| | | | | | | | | The zoran i2c modules were still using V4L1 internally. Replace this with V4L2. Also deleted saa7111.c and saa7114.c, we use saa7115.c instead. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [mchehab@redhat.com: fix v4l2_ctrl_query_fill_std merge conflict] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10713): zoran: if reqbufs is called with count == 0, do a streamoff.Hans Verkuil2009-03-301-3/+7
| | | | | | | count == 0 has a special meaning, implement this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10712): zoran: fix G_FMTHans Verkuil2009-03-301-1/+1
| | | | | | | Returned height was really height / 2. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10711): zoran: fix TRY_FMT supportHans Verkuil2009-03-301-5/+16
| | | | | | | | Actually try to turn the format into something usable rather than just rejecting it if it isn't perfect. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10710): zoran: cleanups in an attempt to make the source a bit more ↵Hans Verkuil2009-03-301-2/+2
| | | | | | | readable. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10708): zoran: remove old V4L1 ioctls, use v4l1-compat instead.Hans Verkuil2009-03-301-415/+44
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10707): zoran: set bytesperline to 0 when using MJPEG.Hans Verkuil2009-03-301-6/+2
| | | | | | | | Remove bogus check on bytesperline in the try_fmt_vid_out call. Just set it to 0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10706): zoran: fix field typo.Hans Verkuil2009-03-301-1/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10705): zoran: use slider flag with volume etc. controls.Hans Verkuil2009-03-301-0/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10704): zoran: remove broken BIGPHYS_AREA and BUZ_HIMEM code, and ↵Hans Verkuil2009-03-301-158/+31
| | | | | | | | | allow for kmallocs > 128 kB Remove memory allocation madness. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10703): zoran: convert to video_ioctl2 and remove ↵Hans Verkuil2009-03-301-1441/+1112
| | | | | | | 'ready_to_be_freed' hack. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10631): zoran: fix printk formatRandy Dunlap2009-03-301-2/+2
| | | | | | | | | Fix printk format warning: drivers/media/video/zoran/zoran_driver.c:345: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10226): zoran: Get rid of extra module ref countTrent Piepho2009-01-291-49/+33
| | | | | | | | | | | | | | The zoran driver does a module_get/put of THIS_MODULE on device open/close. This isn't necessary as the kernel does this automatically. Clean up the failure path of zoran_open() somewhat. Make the dprintk()s on open/close a higher debug level and make the user count printed take the current open/close into account. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10223): zoran: Remove global device arrayTrent Piepho2009-01-291-22/+3
| | | | | | | | | | | | | | | | | | | The driver was keeping a global array with an entry for each zoran device probed. It was a leftover from when the driver didn't dynamically allocate the driver data for each device. There was only one use left, in the video device's ->open() method, looking up the struct zoran for the opened device from the minor number. This can be done better with video_get_drvdata(). Since zoran_num is now only used in the pci driver's ->probe() method, it doesn't need to be an atomic_t and be static. There is a race if multiple zoran cards could be probed at the same time, but currently the probe method for a given driver is single threaded. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10212): Convert to be a pci driverTrent Piepho2009-01-291-1/+1
| | | | | | | | | | This is a really old and crufty driver that wasn't using the long established pci driver framework. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org> [mchehab@redhat.com: Cleaned up a few CodingStyle issues] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.Hans Verkuil2009-01-021-2/+2
| | | | | | | | | | | | | Since internal to v4l2 the ioctl prototype is the same regardless of it being called through .ioctl or .unlocked_ioctl, we need to convert it all to the long return type of unlocked_ioctl. Thanks to Jean-Francois Moine for posting an initial patch for this and thus bringing it to our attention. Cc: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10135): v4l2: introduce v4l2_file_operations.Hans Verkuil2009-01-021-14/+7
| | | | | | | | | | | | | | | | Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9503): v4l: remove inode argument from video_usercopyHans Verkuil2008-12-291-6/+2
| | | | | | | | | The inode argument was never used. Removing it from video_usercopy brings the function pointer type of video_usercopy in line with similar v4l2 functions, thus simplifying several drivers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9234): zoran: Drop redundant printkJean Delvare2008-10-171-1/+0
| | | | | | | There's no point in logging two messages for the same error. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9129): zoran: move zoran sources into a zoran subdirectoryHans Verkuil2008-10-121-0/+4649
Prevent the zoran driver sources from cluttering the video directory. This changeset only moves the drivers and it does not fix any of the checkpatch warnings/errors to keep the changeset clean. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud