platform/kernel/linux-stable.git
11 years ago[media] DocBook: mention that EINVAL can be returned for invalid menu indices
Hans Verkuil [Fri, 11 Jan 2013 13:49:12 +0000 (10:49 -0300)]
[media] DocBook: mention that EINVAL can be returned for invalid menu indices

The documentation suggested that if the control value is wrong only
ERANGE can be returned. But in some cases (an invalid menu index)
EINVAL can also be returned. Clarify this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: improve the error_idx field documentation
Hans Verkuil [Fri, 11 Jan 2013 13:33:30 +0000 (10:33 -0300)]
[media] DocBook: improve the error_idx field documentation

The documentation of the error_idx field was incomplete and confusing.
This patch improves it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: fix various validation errors
Hans Verkuil [Fri, 11 Jan 2013 11:18:55 +0000 (08:18 -0300)]
[media] DocBook: fix various validation errors

Fixed the following errors (with exception of the SVG errors):
  GEN     /home/hans/work/src/v4l/media-git/Documentation/DocBook//v4l2.xml
  rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 3.8.0-rc1</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/media_api.html >> Documentation/DocBook/index.html
  /tmp/x.xml:883: element revremark: validity error : Element structname is not declared in revremark list of possible children
  /tmp/x.xml:883: element revremark: validity error : Element xref is not declared in revremark list of possible children
  /tmp/x.xml:9580: element xref: validity error : Element xref was declared EMPTY this one has content
  /tmp/x.xml:13508: element link: validity error : Element link does not carry attribute linkend
  /tmp/x.xml:13508: element link: validity error : No declaration for attribute linked of element link
  /tmp/x.xml:16986: element imagedata: validity error : Value "SVG" for attribute format of imagedata is not among the enumerated set
  /tmp/x.xml:17003: element imagedata: validity error : Value "SVG" for attribute format of imagedata is not among the enumerated set
  /tmp/x.xml:17022: element imagedata: validity error : Value "SVG" for attribute format of imagedata is not among the enumerated set

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuners/xc5000: fix MODE_AIR in xc5000_set_params()
Dan Carpenter [Sun, 13 Jan 2013 18:31:33 +0000 (15:31 -0300)]
[media] tuners/xc5000: fix MODE_AIR in xc5000_set_params()

There is a missing break so we use XC_RF_MODE_CABLE instead of
XC_RF_MODE_AIR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: input: use common work_struct callback function for IR RC key polling
Frank Schaefer [Sun, 13 Jan 2013 13:20:45 +0000 (10:20 -0300)]
[media] em28xx: input: use common work_struct callback function for IR RC key polling

Remove em28xx_i2c_ir_work() and check the device type in the common callback
function em28xx_ir_work() instead. Simplifies em28xx_ir_start().
Reduces the code size with a minor performance drawback.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: i2c RC devices: minor code size and memory usage optimization
Frank Schaefer [Sun, 13 Jan 2013 13:20:44 +0000 (10:20 -0300)]
[media] em28xx: i2c RC devices: minor code size and memory usage optimization

Set up the i2c_client locally in em28xx_i2c_ir_handle_key().

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: fix a comment and a small coding style issue
Frank Schaefer [Sun, 13 Jan 2013 13:20:43 +0000 (10:20 -0300)]
[media] em28xx: fix a comment and a small coding style issue

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: remove unused parameter ir_raw from i2c RC key polling functions
Frank Schaefer [Sun, 13 Jan 2013 13:20:42 +0000 (10:20 -0300)]
[media] em28xx: remove unused parameter ir_raw from i2c RC key polling functions

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: get rid of the dependency on module ir-kbd-i2c
Frank Schaefer [Sun, 13 Jan 2013 13:20:41 +0000 (10:20 -0300)]
[media] em28xx: get rid of the dependency on module ir-kbd-i2c

We already have the key polling functions and the polling infrastructure in
em28xx-input, so we can easily get rid of the dependency on module ir-kbd-i2c.
For maximum safety, do not touch the key reporting mechanism for those devices.
Code size could be improved further but would have minor peformance impacts.
Tested with device "Terratec Cinergy 200 USB" (EM2800_BOARD_TERRATEC_CINERGY_200)

[mchehab@redhat.com: Fix two checkpatch.pl warnings:
 ERROR: "foo * bar" should be "foo *bar" (line 465)
 WARNING: kfree(NULL) is safe this check is probably not required (line 725)]

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: remove i2cdprintk() messages
Frank Schaefer [Sun, 13 Jan 2013 13:20:40 +0000 (10:20 -0300)]
[media] em28xx: remove i2cdprintk() messages

We don't report any key/scan codes or errors inside the key polling functions
for internal IR RC devices, just in the key handling fucntions.
Do the same for external devices.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx-input: remove dead code line from em28xx_get_key_em_haup()
Frank Schaefer [Sun, 13 Jan 2013 13:20:39 +0000 (10:20 -0300)]
[media] em28xx-input: remove dead code line from em28xx_get_key_em_haup()

Field 'old' of struct IR_i2c is used nowhere in module ir-kbd-i2c.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: add missing IR RC slave address to the list of known i2c devices
Frank Schaefer [Sun, 13 Jan 2013 13:15:08 +0000 (10:15 -0300)]
[media] em28xx: add missing IR RC slave address to the list of known i2c devices

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx231xx: add a missing break statement
Dan Carpenter [Fri, 11 Jan 2013 05:48:41 +0000 (02:48 -0300)]
[media] cx231xx: add a missing break statement

My static checker complains about the fall through here.  From the
context it looks like we should add a break statement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging: go7007: print the audio input type
Dan Carpenter [Thu, 10 Jan 2013 08:00:57 +0000 (05:00 -0300)]
[media] staging: go7007: print the audio input type

Smatch complains that the "Audio input:" printk isn't reachable.  Hiding
the "return 0;" behind another statement is a style violation.
It looks like audio_input is normally configured so I've enabled the
print statement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/pci: use memmove for overlapping regions
Nickolai Zeldovich [Tue, 8 Jan 2013 01:28:05 +0000 (22:28 -0300)]
[media] drivers/media/pci: use memmove for overlapping regions

Change several memcpy() to memmove() in cases when the regions are
definitely overlapping; memcpy() of overlapping regions is undefined
behavior in C and can produce different results depending on the compiler,
the memcpy implementation, etc.

Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: media: struct v4l2_capability card field is a UTF-8 string
Laurent Pinchart [Mon, 7 Jan 2013 19:30:24 +0000 (16:30 -0300)]
[media] DocBook: media: struct v4l2_capability card field is a UTF-8 string

The struct v4l2_capability card field stores the device name. That name
can be hardcoded in drivers, or be retrieved directly from the device.
The later is very common with USB devices. As several devices already
report names that include non-ASCII characters, update the field
description to use UTF-8.

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>
11 years ago[media] media: cx18, ivtv: eliminate unnecessary array index checks
Nickolai Zeldovich [Mon, 7 Jan 2013 00:52:03 +0000 (21:52 -0300)]
[media] media: cx18, ivtv: eliminate unnecessary array index checks

The idx values passed to cx18_i2c_register() and ivtv_i2c_register()
by cx18_init_subdevs() and ivtv_load_and_init_modules() respectively
are always in-range, based on how the hw_all bitmask is populated.
Previously, the checks were already ineffective because arrays were
being dereferenced using the index before the check.

Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift
Nickolai Zeldovich [Sat, 5 Jan 2013 18:13:05 +0000 (15:13 -0300)]
[media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift

Fix bug introduced in 7757ddda6f4febbc52342d82440dd4f7a7d4f14f, where
instead of bit-negating the bitmask, the bit position was bit-negated
instead.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Cc: Olivier Grenie <olivier.grenie@dibcom.fr>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] iguanair: intermittent initialization failure
Sean Young [Mon, 14 Jan 2013 08:51:44 +0000 (05:51 -0300)]
[media] iguanair: intermittent initialization failure

On cold boot the device does not initialize until the first packet is
received, and that packet is not processed.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] iguanair: ensure transmission mask is initialized
Sean Young [Sun, 6 Jan 2013 16:19:44 +0000 (13:19 -0300)]
[media] iguanair: ensure transmission mask is initialized

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] winbond-cir: only enable higher sample resolution if needed
Sean Young [Sun, 6 Jan 2013 16:19:43 +0000 (13:19 -0300)]
[media] winbond-cir: only enable higher sample resolution if needed

A sample resolution of 2us generates more than 300 interrupts per key
and this resolution is not needed unless carrier reports are enabled.
Revert to a resolution of 10us unless carrier reports are needed. This
generates up to a fifth of the interrupts.

Signed-off-by: Sean Young <sean@mess.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: davinci: da850 evm: pass platform data for adv7343 encoder
Lad, Prabhakar [Tue, 15 Jan 2013 08:04:41 +0000 (05:04 -0300)]
[media] ARM: davinci: da850 evm: pass platform data for adv7343 encoder

Without this patch the adv7343 encoder was being set to default
configuration which caused display not to work on this board.
This patch passes the necessary platform data required for adv7343
encoder to work on da850 evm.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: adv7343: accept configuration through platform data
Lad, Prabhakar [Tue, 22 Jan 2013 04:19:50 +0000 (01:19 -0300)]
[media] media: adv7343: accept configuration through platform data

The current code was implemented with some default configurations,
this default configuration works on board and doesn't work on other.
This patch accepts the configuration through platform data and configures
the encoder depending on the data passed.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: fix G/TRY_FMT
Hans Verkuil [Fri, 1 Feb 2013 12:08:46 +0000 (09:08 -0300)]
[media] tm6000: fix G/TRY_FMT

Two fixes:
- the priv field wasn't set to 0.
- only V4L2_FIELD_INTERLACED is supported.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: add poll op for radio device node
Hans Verkuil [Tue, 11 Sep 2012 14:53:51 +0000 (11:53 -0300)]
[media] tm6000: add poll op for radio device node

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: set colorspace field
Hans Verkuil [Tue, 11 Sep 2012 14:51:02 +0000 (11:51 -0300)]
[media] tm6000: set colorspace field

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: add support for control events and prio handling
Hans Verkuil [Tue, 11 Sep 2012 14:50:37 +0000 (11:50 -0300)]
[media] tm6000: add support for control events and prio handling

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: convert to the control framework
Hans Verkuil [Thu, 31 Jan 2013 11:23:01 +0000 (08:23 -0300)]
[media] tm6000: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: fix querycap and input/tuner compliance issues
Hans Verkuil [Tue, 11 Sep 2012 10:35:30 +0000 (07:35 -0300)]
[media] tm6000: fix querycap and input/tuner compliance issues

- add device_caps support
- fix bus_info
- fix numerous tuner-related problems due to incorrect tests
  and setting v4l2_tuner fields to wrong values.
- remove (audio) input support from the radio: it doesn't belong
  there. This also fixed a nasty issue where opening the radio
  would set dev->input to 5 for no good reason. This was never
  set back to a valid TV input after closing the radio device,
  thus leaving it at 5 which is out of bounds of the vinput
  card array.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] meye: convert to the control framework
Hans Verkuil [Tue, 29 Jan 2013 10:21:02 +0000 (07:21 -0300)]
[media] meye: convert to the control framework

Convert the meye driver to the control framework. Some private controls
have been replaced with standardized controls (SHARPNESS and JPEGQUAL).
The AGC control looks like it can be replaced by the AUTOGAIN control, but
it isn't a boolean so I do not know how to interpret it.
The FRAMERATE control looks like it can be replaced by S_PARM, but again,
without knowing how to interpret it I decided to leave it alone.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] videobuf2: don't return POLLERR when only polling for events
Hans Verkuil [Wed, 30 Jan 2013 16:29:02 +0000 (13:29 -0300)]
[media] videobuf2: don't return POLLERR when only polling for events

If you only poll for events, then vb2_poll will return POLLPRI | POLLERR if
no streaming is in progress. That's not right, it's perfectly valid to
poll just for events.

Cc: Pawel Osciak <pawel@osciak.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bw-qcam: remove unnecessary qc_reset and qc_setscanmode calls
Hans Verkuil [Wed, 30 Jan 2013 17:07:38 +0000 (14:07 -0300)]
[media] bw-qcam: remove unnecessary qc_reset and qc_setscanmode calls

These are already done elsewhere.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bw-qcam: convert to videobuf2
Hans Verkuil [Wed, 30 Jan 2013 17:10:14 +0000 (14:10 -0300)]
[media] bw-qcam: convert to videobuf2

I know, nobody really cares about this black-and-white webcam anymore, but
it was fun to do.
Tested with an actual webcam.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bw-qcam: zero priv field
Hans Verkuil [Wed, 30 Jan 2013 14:59:48 +0000 (11:59 -0300)]
[media] bw-qcam: zero priv field

Fix a v4l2-compliance problem: the priv field of v4l2_pix_format must be
cleared by drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: fix signal and stereo indication
Hans Verkuil [Mon, 28 May 2012 14:10:01 +0000 (11:10 -0300)]
[media] radio-miropcm20: fix signal and stereo indication

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: Fix audmode/tuner/frequency handling
Hans Verkuil [Wed, 30 Jan 2013 08:55:50 +0000 (05:55 -0300)]
[media] radio-miropcm20: Fix audmode/tuner/frequency handling

- instead of a mute module option, use audmode as per the spec.
- clamp the frequency before setting it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: add prio and control event support
Hans Verkuil [Wed, 30 Jan 2013 08:54:33 +0000 (05:54 -0300)]
[media] radio-miropcm20: add prio and control event support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: convert to the control framework
Hans Verkuil [Wed, 30 Jan 2013 08:50:28 +0000 (05:50 -0300)]
[media] radio-miropcm20: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: remove input/audio ioctls
Hans Verkuil [Wed, 30 Jan 2013 08:49:53 +0000 (05:49 -0300)]
[media] radio-miropcm20: remove input/audio ioctls

Such ioctls are not valid for radio devices.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: fix querycap
Hans Verkuil [Wed, 30 Jan 2013 14:26:36 +0000 (11:26 -0300)]
[media] radio-miropcm20: fix querycap

Don't set version (done by the v4l2 core), fill in bus_info, set correct
driver name and add device_caps support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tvaudio: convert to the control framework
Hans Verkuil [Sat, 2 Feb 2013 09:03:36 +0000 (06:03 -0300)]
[media] tvaudio: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tvaudio: fix two tea6420 errors
Hans Verkuil [Mon, 10 Sep 2012 14:06:57 +0000 (11:06 -0300)]
[media] tvaudio: fix two tea6420 errors

The inputmask for the tea6420 wasn't set and the wrong mute register value
was used.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tvaudio: fix broken volume/balance calculations
Hans Verkuil [Sat, 2 Feb 2013 08:57:37 +0000 (05:57 -0300)]
[media] tvaudio: fix broken volume/balance calculations

The balance control did not do what it is supposed to do due to wrong
calculations.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9v011: convert to the control framework
Hans Verkuil [Fri, 7 Sep 2012 08:42:15 +0000 (05:42 -0300)]
[media] mt9v011: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Move DV-class control IDs from videodev2.h to v4l2-controls.h
Hans Verkuil [Thu, 24 Jan 2013 07:42:05 +0000 (04:42 -0300)]
[media] Move DV-class control IDs from videodev2.h to v4l2-controls.h

When the control IDs were split off from videodev2.h to v4l2-controls.h
these new Digital Video controls were forgotten (the two patches may
have crossed one another).
Move these controls to their proper place in v4l2-controls.h.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Redefine platform data structure for fimc-is
Sylwester Nawrocki [Fri, 1 Feb 2013 18:00:40 +0000 (15:00 -0300)]
[media] s5p-fimc: Redefine platform data structure for fimc-is

Newer Exynos4 SoC are equipped with a local camera ISP that
controls external raw image sensor directly. Such sensors
can be connected through FIMC-LITEn (and MIPI-CSISn) IPs to
the ISP, which then feeds image data to the FIMCn IP. Thus
there can be two busses associated with an image source
(sensor). Rename struct s5p_fimc_isp_info describing external
image sensor (video decoder) to struct fimc_source_info to
avoid confusion. bus_type is split into fimc_bus_type and
sensor_bus_type. The bus type enumeration is extended to
include both FIMC Writeback input types.
The bus_type enumeration and the data structure name in the
board files are modified according to the above changes.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Add s5c73m3 driver entry
Andrzej Hajda [Thu, 31 Jan 2013 10:03:05 +0000 (07:03 -0300)]
[media] MAINTAINERS: Add s5c73m3 driver entry

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5c73m3: Use devm_regulator_bulk_get API
Sachin Kamat [Thu, 31 Jan 2013 04:12:46 +0000 (01:12 -0300)]
[media] s5c73m3: Use devm_regulator_bulk_get API

devm_regulator_bulk_get saves some cleanup and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Add clk_prepare/unprepare for sclk_cam clocks
Sylwester Nawrocki [Fri, 18 Jan 2013 18:34:37 +0000 (15:34 -0300)]
[media] s5p-fimc: Add clk_prepare/unprepare for sclk_cam clocks

Add clk_prepare(), clk_unprepare() calls for the sclk_cam clocks
to ensure the driver works on platforms with the common clocks
API enabled.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Fix FIMC.n subdev set_selection ioctl handler
Sylwester Nawrocki [Wed, 30 Jan 2013 12:55:46 +0000 (09:55 -0300)]
[media] s5p-fimc: Fix FIMC.n subdev set_selection ioctl handler

The V4L2_SEL_TGT_CROP_BOUNDS, V4L2_SEL_TGT_COMPOSE_BOUNDS selection
targets are not supposed to be handled in the set_selection ioctl.
Remove the code that doesn't do anything sensible now and make sure
ctx->state is modified with the spinlock held.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Set default image format at device open()
Sylwester Nawrocki [Wed, 30 Jan 2013 12:54:06 +0000 (09:54 -0300)]
[media] s5p-fimc: Set default image format at device open()

Make sure a valid image format is initially set on both the CAPTURE
and the OUTPUT buffer queue.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Avoid null pointer dereference in fimc_capture_ctrls_create()
Sylwester Nawrocki [Wed, 9 Jan 2013 18:09:55 +0000 (15:09 -0300)]
[media] s5p-fimc: Avoid null pointer dereference in fimc_capture_ctrls_create()

With presence of some faults, e.g. caused by wrong platform data or
the device tree structure the IDX_SENSOR entry in the array may be NULL,
so make sure it is not dereferenced then.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5c73m3: Staticize some symbols
Sachin Kamat [Tue, 29 Jan 2013 05:32:30 +0000 (02:32 -0300)]
[media] s5c73m3: Staticize some symbols

Fixes the following sparse warnings:
drivers/media/i2c/s5c73m3/s5c73m3-core.c:42:5: warning:
symbol 'boot_from_rom' was not declared. Should it be static?
drivers/media/i2c/s5c73m3/s5c73m3-core.c:45:5: warning:
symbol 'update_fw' was not declared. Should it be static?
drivers/media/i2c/s5c73m3/s5c73m3-core.c:298:5: warning:
symbol 's5c73m3_isp_comm_result' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-csis: Check return value of clk_enable/clk_set_rate
Sylwester Nawrocki [Tue, 29 Jan 2013 09:52:29 +0000 (06:52 -0300)]
[media] s5p-csis: Check return value of clk_enable/clk_set_rate

clk_set_rate(), clk_enable() functions can fail, so check the return
values to avoid surprises. While at it use ERR_PTR() value to indicate
an invalid clock.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Check return value of clk_enable/clk_set_rate
Sylwester Nawrocki [Tue, 29 Jan 2013 09:42:28 +0000 (06:42 -0300)]
[media] s5p-fimc: Check return value of clk_enable/clk_set_rate

clk_set_rate(), clk_enable() functions can fail, so check the return
values to avoid surprises. While at it use ERR_PTR() value to indicate
an invalid clock.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Change platform subdevs registration method
Sylwester Nawrocki [Wed, 12 Dec 2012 11:16:05 +0000 (08:16 -0300)]
[media] s5p-fimc: Change platform subdevs registration method

The previous method of registering platform entities into the main
driver using driver_find() and then iterating over devices bound to
a driver was racy and is being removed here. Nothing was preventing
module from unloading during a call to try_module_get(driver->owner).
Instead, we look up a device first and then check for its driver while
holding device lock.
The platform sub-devices are looked up and registered to the top
level driver. When any sub-device is not yet initialized and ready
the main driver's probe() will be deferred.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Add missing line breaks
Sylwester Nawrocki [Fri, 7 Dec 2012 19:40:08 +0000 (16:40 -0300)]
[media] s5p-fimc: Add missing line breaks

Add missing line breaks in the debug traces.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-csis: Use devm_regulator_bulk_get API
Sachin Kamat [Tue, 8 Jan 2013 05:58:51 +0000 (02:58 -0300)]
[media] s5p-csis: Use devm_regulator_bulk_get API

devm_regulator_bulk_get is device managed and saves some cleanup
and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: fimc-lite: Prevent deadlock at STREAMON/OFF ioctls
Sylwester Nawrocki [Fri, 18 Jan 2013 15:02:32 +0000 (12:02 -0300)]
[media] s5p-fimc: fimc-lite: Prevent deadlock at STREAMON/OFF ioctls

This patch fixes regression introduced in commit 6319d6a002beb26631
'[media] fimc-lite: Add ISP FIFO output support'.
In case of a configuration where video is captured at the video node
exposed by the FIMC-LITE driver there is a following video pipeline:
sensor -> MIPI-CSIS.n -> FIMC-LITE.n subdev -> FIMC-LITE.n video node
In this situation s_stream() handler of the FIMC-LITE.n is called
back from within VIDIOC_STREAMON/OFF ioctl of the FIMC-LITE.n video
node, through vb2_stream_on/off(), start/stop_streaming and
fimc_pipeline_call(set_stream). The fimc->lock mutex is already held
then, before invoking vidioc_streamon/off. So it must not be taken
again in the s_stream() callback in this case, to avoid a deadlock.
This patch makes fimc->out_path atomic_t so the mutex don't need
to be taken in the FIMC-LITE subdev s_stream() callback in the DMA
output case.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyugmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: fimc-lite: Remove empty s_power subdev callback
Sylwester Nawrocki [Fri, 18 Jan 2013 15:02:31 +0000 (12:02 -0300)]
[media] s5p-fimc: fimc-lite: Remove empty s_power subdev callback

The .s_power FIMC-LITE subdev callback is now empty and
unneeded. The FIMC-LITE IP power handling will be done
by the FIMC-IS driver, so just remove the callback.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] V4L: Add S5C73M3 camera driver
Andrzej Hajda [Thu, 22 Nov 2012 14:39:18 +0000 (11:39 -0300)]
[media] V4L: Add S5C73M3 camera driver

Add driver for S5C73M3 image sensor. The driver exposes the sensor as
two subdevs: pure sensor and output interface. Two subdev architecture
supports interleaved UYVY/JPEG image format with separate frame size
for both sub-formats, there is a spearate pad for each sub-format.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Fix kernel warning on memory init
Arun Kumar K [Fri, 18 Jan 2013 18:42:34 +0000 (15:42 -0300)]
[media] s5p-mfc: Fix kernel warning on memory init

Cleaned up the memory devices allocation code and added
missing device_initialize() call to remove the kernel warning
during memory allocations.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Use WARN_ON(condition) directly
Sachin Kamat [Tue, 22 Jan 2013 04:00:06 +0000 (01:00 -0300)]
[media] s5p-mfc: Use WARN_ON(condition) directly

Use WARN_ON(condition) directly instead of wrapping around an if
condition.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5k6aa: Use devm_regulator_bulk_get API
Sachin Kamat [Tue, 8 Jan 2013 05:48:24 +0000 (02:48 -0300)]
[media] s5k6aa: Use devm_regulator_bulk_get API

devm_regulator_bulk_get is device managed and saves some cleanup
and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] noon010p30: Remove unneeded v4l2 control compatibility ops
Sylwester Nawrocki [Sun, 13 Jan 2013 17:50:59 +0000 (14:50 -0300)]
[media] noon010p30: Remove unneeded v4l2 control compatibility ops

All host drivers using this subdev driver are already converted
to use the control framework so the compatibility ops can be dropped.

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>
11 years ago[media] s5p-g2d: Add support for G2D H/W Rev.4.1
Sachin Kamat [Thu, 17 Jan 2013 03:07:18 +0000 (00:07 -0300)]
[media] s5p-g2d: Add support for G2D H/W Rev.4.1

Modified the G2D driver (which initially supported only H/W Rev.3)
to support H/W Rev.4.1 present on Exynos4x12 and Exynos52x0 SOCs.
- Set the SRC and DST type to 'memory' instead of using reset values.
- FIMG2D v4.1 H/W uses different logic for stretching(scaling).
- Use CACHECTL_REG only with FIMG2D v3.
[s.nawrocki: removed empty line at end of file]]

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Use NULL instead of 0 for pointer
Sachin Kamat [Mon, 14 Jan 2013 09:09:41 +0000 (06:09 -0300)]
[media] s5p-mfc: Use NULL instead of 0 for pointer

Fixes the following warning:
drivers/media/platform/s5p-mfc/s5p_mfc_opr.c:56:27: warning:
Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Fix bytesperline value for V4L2_PIX_FMT_YUV420M format
Sylwester Nawrocki [Fri, 11 Jan 2013 09:36:19 +0000 (06:36 -0300)]
[media] s5p-fimc: Fix bytesperline value for V4L2_PIX_FMT_YUV420M format

Make sure bytesperline for Cb, Cr planes for V4L2_PIX_FMT_YUV420M
format is half of the Y plane value, rather than having same
bytesperline for all planes.
While at it, simplify the bytesperline parameter handling by
storing it when image format is set and returning those values
when getting the format, instead of recalculating bytesperline
from intermediate parameters.

Reported-by: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Fix a watchdog bug
Kamil Debski [Fri, 11 Jan 2013 14:29:32 +0000 (11:29 -0300)]
[media] s5p-mfc: Fix a watchdog bug

Fixed wrong condition in firmware reload function used by the watchdog.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuner-core: map audmode to STEREO for radio devices
Hans Verkuil [Fri, 28 Sep 2012 11:18:07 +0000 (08:18 -0300)]
[media] tuner-core: map audmode to STEREO for radio devices

Fixes a v4l2-compliance error: setting audmode to a value other than mono
or stereo for a radio device should map to MODE_STEREO.
The spec specifies that for radio devices only mono and stereo audmodes are
valid. If the user specifies another audmode in v4l2_tuner, then that should
be mapped to valid audmode. That didn't happen here.
Note that tuner drivers might decide to limit the possible audmode even
further if it only supports mono. In that case the tuner driver can set
audmode to mono. However, that new value wasn't copied back to t->audmode,
and that has been fixed as well in this patch.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] V4L: Add driver for OV9650/52 image sensors
Sylwester Nawrocki [Wed, 26 Dec 2012 18:50:03 +0000 (15:50 -0300)]
[media] V4L: Add driver for OV9650/52 image sensors

This patch adds V4L2 sub-device driver for OV9650/OV9652 image sensors.
The driver exposes following V4L2 controls:
- auto/manual exposure,
- auto/manual white balance,
- auto/manual gain,
- brightness, saturation, sharpness,
- horizontal/vertical flip,
- color bar test pattern,
- banding filter (power line frequency).
Frame rate can be configured with g/s_frame_interval pad level ops.
Supported resolution are only: SXGA, VGA, QVGA.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] V4L: Add v4l2_ctrl_subdev_log_status() helper function
Sylwester Nawrocki [Tue, 22 Jan 2013 22:01:02 +0000 (19:01 -0300)]
[media] V4L: Add v4l2_ctrl_subdev_log_status() helper function

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>
11 years ago[media] V4L: Add v4l2_ctrl_subdev_subscribe_event() helper function
Sylwester Nawrocki [Tue, 22 Jan 2013 22:00:23 +0000 (19:00 -0300)]
[media] V4L: Add v4l2_ctrl_subdev_subscribe_event() helper function

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>
11 years ago[media] V4L: Add v4l2_event_subdev_unsubscribe() helper function
Sylwester Nawrocki [Tue, 22 Jan 2013 21:58:57 +0000 (18:58 -0300)]
[media] V4L: Add v4l2_event_subdev_unsubscribe() helper function

Add a v4l2 core helper function that can be used as the subdev
.unsubscribe_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>
11 years ago[media] v4l2-ctrl: Add helper function for the controls range update
Sylwester Nawrocki [Sat, 19 Jan 2013 18:51:55 +0000 (15:51 -0300)]
[media] v4l2-ctrl: Add helper function for the controls range update

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>
11 years ago[media] V4L: Add header file defining standard image sizes
Sylwester Nawrocki [Thu, 20 Dec 2012 18:03:14 +0000 (15:03 -0300)]
[media] V4L: Add header file defining standard image sizes

Add common header file defining standard image sizes, so we can
avoid redefining those in each driver.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] pwc: Don't return EINVAL when an unsupported pixelformat is requested
Hans de Goede [Fri, 25 Jan 2013 09:53:07 +0000 (06:53 -0300)]
[media] pwc: Don't return EINVAL when an unsupported pixelformat is requested

Instead chaneg the passed in format to the pwc default pixelformat.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/zc3xx.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:13 +0000 (19:29 -0300)]
[media] usb/gspca/zc3xx.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/xirlink_cit.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:12 +0000 (19:29 -0300)]
[media] usb/gspca/xirlink_cit.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/t613.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:11 +0000 (19:29 -0300)]
[media] usb/gspca/t613.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/stv06xx/stv06xx.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:10 +0000 (19:29 -0300)]
[media] usb/gspca/stv06xx/stv06xx.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/spca561.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:09 +0000 (19:29 -0300)]
[media] usb/gspca/spca561.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/sonixj.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:08 +0000 (19:29 -0300)]
[media] usb/gspca/sonixj.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/sonixb.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:07 +0000 (19:29 -0300)]
[media] usb/gspca/sonixb.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT
Also replaced:
 #if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE
with:
 #if !IS_ENABLED(CONFIG_USB_SN9C102)

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/sn9c20x.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:06 +0000 (19:29 -0300)]
[media] usb/gspca/sn9c20x.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/se401.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:05 +0000 (19:29 -0300)]
[media] usb/gspca/se401.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/pac7311.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:04 +0000 (19:29 -0300)]
[media] usb/gspca/pac7311.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] gspca/pac7302.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:03 +0000 (19:29 -0300)]
[media] gspca/pac7302.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/pac207.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:02 +0000 (19:29 -0300)]
[media] usb/gspca/pac207.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/ov519.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:01 +0000 (19:29 -0300)]
[media] usb/gspca/ov519.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/konica.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:29:00 +0000 (19:29 -0300)]
[media] usb/gspca/konica.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:28:59 +0000 (19:28 -0300)]
[media] usb/gspca: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usb/gspca/cpia1.c: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:28:58 +0000 (19:28 -0300)]
[media] usb/gspca/cpia1.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio/si470x/radio-si470x.h: use IS_ENABLED() macro
Peter Senna Tschudin [Thu, 24 Jan 2013 22:28:57 +0000 (19:28 -0300)]
[media] radio/si470x/radio-si470x.h: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_USB_SI470X) || \
     defined(CONFIG_USB_SI470X_MODULE)
with:
 #if IS_ENABLED(CONFIG_USB_SI470X)
This change was made for: CONFIG_USB_SI470X,
CONFIG_I2C_SI470X

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: Fix histogram regions
Johannes Schellen [Fri, 11 Jan 2013 15:00:19 +0000 (12:00 -0300)]
[media] omap3isp: Fix histogram regions

This patch fixes a bug which causes all histogram regions to start in the
top left corner of the image. The histogram region coordinates are 16 bit
values which share a 32 bit register. The bug is due to the region end
value assignments overwriting the region start values with zero.

Signed-off-by: Johannes Schellen <Johannes.Schellen@rwth-aachen.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: Use devm_* managed functions
Laurent Pinchart [Tue, 25 Dec 2012 20:27:31 +0000 (17:27 -0300)]
[media] omap3isp: Use devm_* managed functions

Replace kzalloc, request_mem_region, ioremap, clk_get and regulator_get
with their devm_* managed replacement.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: Remove unneeded memset after kzalloc
Laurent Pinchart [Fri, 21 Dec 2012 19:44:34 +0000 (16:44 -0300)]
[media] omap3isp: Remove unneeded memset after kzalloc

kzalloc initializes the memory it allocates to 0, there's no need for an
explicit memset.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: preview: Lower the crop margins
Laurent Pinchart [Fri, 7 Dec 2012 10:48:55 +0000 (07:48 -0300)]
[media] omap3isp: preview: Lower the crop margins

The preview engine includes filters that consume columns and lines as
part of their operation, thus resulting in a cropped image. To allow
turning those filters on/off during streaming without affecting the
output image size, the driver adds additional cropping to make the total
number of cropped columns and lines constant regardless of which filters
are enabled.
This process needlessly includes the CFA filter, as whether the filter
is enabled only depends on the sink pad format, which can't change
during streaming.
Exclude the CFA filter from the preview engine margins.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: Fix race of open and suspend in error case
Oliver Neukum [Thu, 10 Jan 2013 10:04:55 +0000 (07:04 -0300)]
[media] uvcvideo: Fix race of open and suspend in error case

Ming Lei reported:
IMO, there is a minor fault in the error handling path of
uvc_status_start() inside uvc_v4l2_open(), and the 'users' count should
have been decreased before usb_autopm_put_interface(). In theory, a [URB
resubmission] warning can be triggered when the device is opened just
between usb_autopm_put_interface() and atomic_dec(&stream->dev->users).
The fix is trivial.

Reported-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: Replace memcpy with struct assignment
Ezequiel Garcia [Mon, 14 Jan 2013 18:22:55 +0000 (15:22 -0300)]
[media] uvcvideo: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>