Commit graph

13877 commits

Author SHA1 Message Date
Sakari Ailus
b8cc8d7a57 [media] smiapp: Add support for 8-bit uncompressed formats
Add support for uncompressed 8-bit raw bayer formats.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:47:38 -03:00
Sakari Ailus
27b2e76dbc [media] smiapp: Allow generic quirk registers
Implement more generic quirk registers than just limit and capability
registers. This comes with the expense of a little bit more access time so
these should be only used when really needed.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:47:25 -03:00
Sakari Ailus
3de886e0e4 [media] smiapp: Use non-binning limits if the binning limit is zero
Some sensors do use binning but do not have valid limits in binning
registers. Use non-binning limits in that case.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:43 -03:00
Sakari Ailus
0458294751 [media] smiapp: Initialise rval in smiapp_read_nvm()
rval was not properly initialised in smiapp_read_nvm(). Do that.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:27 -03:00
Sakari Ailus
6f36799398 [media] smiapp: Round minimum pre_pll up rather than down in ip_clk_freq check
The pre_pll divisor must be such that ext_clk / pre_pll divisor does not
result in a frequency that is greater than pll_ip_clk_freq. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:17 -03:00
Sakari Ailus
98add8e807 [media] smiapp: Use 8-bit reads only before identifying the sensor
Some sensors only allow 8-bit access, so use safe 8-bit access before the
sensor has been identified.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:02 -03:00
Sakari Ailus
ceb9e30e9f [media] smiapp: Quirk for sensors that only do 8-bit reads
Some sensors implement only 8-bit read functionality and fail on wider
reads. Add a quirk flag for such sensors.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:45:39 -03:00
Sakari Ailus
1e73eea781 [media] smiapp: Pass struct sensor to register writing commands instead of i2c_client
Pass struct sensor to register access commands. This allows taking quirks
into account in register access.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:45:01 -03:00
Sakari Ailus
2547428de0 [media] smiapp: Allow using external clock from the clock framework
Instead of providing a function in platform data, allow also providing the
name of the external clock and use it through the clock framework.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:44:24 -03:00
Antti Palosaari
13c6a9f706 [media] zl10353: change .read_snr() to report SNR as a 0.1 dB
Report SNR in 0.1 dB scale instead of raw hardware register values.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:19:36 -03:00
Jozsef Marton
5b84325a31 [media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300)
gspca_pac7302 module supports the webcam with usb id: 093a:2627.
It is a Genius FaceCam 300.
The module does not need any changes but listing the usb id along with a vertical flip flag.
The included patch adds this to the module source.

Signed-off-by: Jozsef Marton <jmarton@users.sourceforge.net>
Acked-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:15:12 -03:00
Malcolm Priestley
e58c11f234 [media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
Continuous flip of bit2 reg 0x70 can cause device to become unresponsive.

Also correct reg read mistake.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:14:05 -03:00
Igor M. Liplianin
38431a98a1 [media] m88rs2000: LNB voltage control implemented
Trival patch to get it working with my cards stuff.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:13:32 -03:00
Mauro Carvalho Chehab
6ae009a8ba [media] sta2x11_vip: Fix 60Hz video standard handling
This device supports V4L2_STD_ALL, but its check for 60Hz standards
is broken, as NTSC is not the only standard that uses 60Hz.

Cc: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:07:41 -03:00
Federico Vaga
efeb98b4e2 [media] STA2X11 VIP: new V4L2 driver
V4L2 driver for the Video Input Port within STA2X11 board

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:05:46 -03:00
Federico Vaga
a8f3c203e1 [media] videobuf-dma-contig: add cache support
Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:01:58 -03:00
Federico Vaga
bca7ad1a33 [media] adv7180: add support to user controls
Video user controls such as brightness, contrast, saturation, and
hue are now handled.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:59:22 -03:00
Ben Hutchings
f27b853ea2 [media] rc: Fix invalid free_region and/or free_irq on probe failure
fintek-cir, ite-cir and nuvoton-cir may try to free an I/O region
and/or IRQ handler that was never allocated after a failure in their
respective probe functions.  Add and use separate labels on the
failure path so they will do the right cleanup after each possible
point of failure.

Compile-tested only.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:43:05 -03:00
Malcolm Priestley
81cda57742 [media] rc-it913x=v2 Incorrect assigned KEY_1
Correct incorrect scancode for KEY_1

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:41:45 -03:00
Anssi Hannula
be1027cc0f [media] ati_remote: add regular up/down buttons to Medion Digitainer keymap
There are many different Medion X10 remotes that need slightly different
keymaps. We may not yet have all the needed keymaps, in which case a
wrong keymap may be used. This happened with Medion X10 OR2x remotes
before the keymap for them was added, causing the ati_remote driver to
select the Medion Digitainer keymap instead. Unfortunately, the Medion
Digitainer keymap doesn't have the standard X10 up/down scancodes
assigned to KEY_UP and KEY_DOWN keycodes, making wrongly assigned
remotes mostly unusable.

Add the regular KEY_UP and KEY_DOWN scancodes to the Medion X10
Digitainer keymap, making any Medion remote mostly usable even when
wrongly used with that keymap (standard buttons, such as
up/down/left/right, 0-9, play/stop/pause, have the same scancode in all
the X10 remotes).

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:40:37 -03:00
Anssi Hannula
5085c99eeb [media] ati_remote: add keymap for Medion X10 OR2x remotes
Add another Medion X10 remote keymap. This is for the Medion OR2x
remotes with the Windows MCE button.

The receiver shipped with this remote has the same USB ID as the other
Medion receivers, but the name is different and is therefore used to
detect this variant.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:40:06 -03:00
Igor M. Liplianin
7b134e85b1 [media] cx23885: TeVii s471 card support
The card is similar to TeVii s470, but has different LNB power control.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:09:26 -03:00
Laurent Pinchart
6b363f9f97 [media] uvcvideo: Fix V4L2 button controls that share the same UVC control
The Logitech pan/tilt reset UVC control contains two V4L2 button
controls to reset pan and tilt. As the UVC control is not marked as
auto-update, the button bits are set but never reset. A pan reset that
follows a tilt reset would thus reset both pan and tilt.

Fix this by not caching the control value of write-only controls. All
standard UVC controls are either readable or auto-update, so this will
not cause any regression and will not result in extra USB requests.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:41:18 -03:00
Ismael Luceno
e2b710bfde [media] au0828: Add USB ID used by many dongles
Tested with Yfeng 680 ATV dongle.

Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:30:31 -03:00
Antti Palosaari
ccb5cf9bfc [media] rtl28xxu: add small sleep for rtl2830 demod attach
Demod needs some time to wake up after power on.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:25:00 -03:00
Antti Palosaari
c188637dc5 [media] rtl2830: prevent hw access when sleeping
to prevent I/O errors...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:53 -03:00
Antti Palosaari
631a2b6112 [media] rtl2830: implement .get_frontend()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:37 -03:00
Antti Palosaari
78e750754b [media] rtl2830: implement .read_signal_strength()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:12 -03:00
Antti Palosaari
525ffc19b9 [media] rtl2830: implement .read_ber()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:01 -03:00
Antti Palosaari
eba672a045 [media] rtl2830: implement .read_snr()
Reports value as a 0.1 dB.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:23:18 -03:00
Antti Palosaari
f6f379df65 [media] em28xx: disable LNA - PCTV QuatroStick nano (520e)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:57 -03:00
Antti Palosaari
140534432e [media] drxk: fix GPIOs
UIO-2 and UIO-3 were broken.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:42 -03:00
Hans-Frieder Vogt
b144c98ca0 [media] fc0013 ver. 0.2: introduction of get_rf_strength function
Changes compared to version 0.1 of driver (sent 6 May):
- Initial implementation of get_rf_strength function.
- Introduction of a warning message

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:17 -03:00
Hans-Frieder Vogt
4a14db7e61 [media] fc0012 ver. 0.6: introduction of get_rf_strength function
Changes compared to version 0.5 of driver (sent 6 May):
- Initial implementation of get_rf_strength function.

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:08 -03:00
Hans-Frieder Vogt
e889adc911 [media] fc001x: tuner driver for FC0013
Support for tuner Fitipower FC0013

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:21:47 -03:00
Hans-Frieder Vogt
ef89ec7ecd [media] fc001x: tuner driver for FC0012, version 0.5
Support for tuner Fitipower FC0012

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:19:46 -03:00
Hans-Frieder Vogt
fee5fcf6b3 [media] fc001x: common header file for FC0012 and FC0013
Common defines for the FC0012 (v0.5) and FC0013 tuner drivers

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:19:02 -03:00
Mauro Carvalho Chehab
5444a1b76b [media] lg2160: Fix a few warnings
drivers/media/dvb/frontends/lg2160.c: In function ‘lg216x_read_ucblocks’:
drivers/media/dvb/frontends/lg2160.c:1336:1: warning: label ‘fail’ defined but not used [-Wunused-label]
drivers/media/dvb/frontends/lg2160.c:1325:6: warning: unused variable ‘ret’ [-Wunused-variable]
drivers/media/dvb/frontends/lg2160.c:1324:23: warning: unused variable ‘state’ [-Wunused-variable]
drivers/media/dvb/frontends/lg2160.c: In function ‘lg216x_set_ensemble’:
drivers/media/dvb/frontends/lg2160.c:420:23: warning: ‘reg’ may be used uninitialized in this function [-Wuninitialized]

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:13:23 -03:00
Michael Krufky
10d67371fc [media] DVB: remove "stats" property bits from ATSC-MH API property additions
Mauro is proposing a new API to handle statistics. This functionality will
be returned after the statistics API is ready. Just remove them for now.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:06:08 -03:00
Michael Krufky
3113621492 [media] mxl111sf: add ATSC-MH support
Add support for the ATSC-MH frontend on the WinTV Aero-m

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:05:51 -03:00
Michael Krufky
52660885e5 [media] dvb-usb: increase MAX_NO_OF_FE_PER_ADAP from 2 to 3
The following patch adds support for a third frontend to exist on a single
DVB adapter, in the mxl111sf driver. This patch allows that to be possible.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:08 -03:00
Michael Krufky
379aa4d0c0 [media] dvb-usb: add support for dvb-usb-adapters that deliver raw payload
Select this feature setting the dvb-usb-adapter caps field with
DVB_USB_ADAP_RECEIVES_RAW_PAYLOAD

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:07 -03:00
Michael Krufky
8e156702aa [media] dvb-demux: add functionality to send raw payload to the dvr device
If your driver needs to deliver the raw payload to userspace without
passing through the kernel demux, use function: dvb_dmx_swfilter_raw

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:06 -03:00
Mauro Carvalho Chehab
adabb266ef [media] lg2160: Don't fill the legacy DVBv3 ops.type field
This field should not be used anymore inside the frontend drivers.
The DVB core won't rely on it.

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:01 -03:00
Michael Krufky
e26f2ae452 [media] DVB: add support for the LG2160 ATSC-MH demodulator
This patch adds support for controlling the LG2160 and
LG2161 ATSC-MH demodulators.

[mchehab@redhat.com: fold with the next patch that was fixing the DVB ABI]
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:02:11 -03:00
Michael Krufky
4ef7077507 [media] mxl111sf-tuner: tune SYS_ATSCMH just like SYS_ATSC
The MxL111SF tuner is programmed the same way for ATSC-MH
as it is programmed for ATSC.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:47:28 -03:00
Michael Krufky
ca689488ee [media] linux-dvb v5 API support for ATSC-MH
Add the following properties for controlling an ATSC-MH frontend:

DTV_ATSCMH_FIC_VER
DTV_ATSCMH_PARADE_ID
DTV_ATSCMH_NOG
DTV_ATSCMH_TNOG
DTV_ATSCMH_SGN
DTV_ATSCMH_PRC
DTV_ATSCMH_RS_FRAME_MODE
DTV_ATSCMH_RS_FRAME_ENSEMBLE
DTV_ATSCMH_RS_CODE_MODE_PRI
DTV_ATSCMH_RS_CODE_MODE_SEC
DTV_ATSCMH_SCCC_BLOCK_MODE
DTV_ATSCMH_SCCC_CODE_MODE_A
DTV_ATSCMH_SCCC_CODE_MODE_B
DTV_ATSCMH_SCCC_CODE_MODE_C
DTV_ATSCMH_SCCC_CODE_MODE_D
DTV_ATSCMH_FIC_ERR
DTV_ATSCMH_CRC_ERR
DTV_ATSCMH_RS_ERR

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:41:50 -03:00
Hans Verkuil
4ad34da030 [media] gspca: the field 'frozen' is under CONFIG_PM
The gspca_dev field 'frozen' is added only if CONFIG_PM is set. So add the
relevant #ifdef's to various subdrivers that use it.

The m32r daily build caught this mistake.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:35:42 -03:00
Sylwester Nawrocki
fed07f8488 [media] s5p-fimc: Use selection API in place of crop operations
Replace deprecated crop operations with the selection API.
Original crop ioctls are supported through a compatibility
layer at the v4l2 core.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kuyngmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:29:12 -03:00
Sylwester Nawrocki
9448ab7dec [media] s5p-fimc: Add color effect control
Add support for V4L2_CID_COLORFX control at the mem-to-mem and capture
video nodes.

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>
2012-05-20 09:27:16 -03:00
Sylwester Nawrocki
0c9204d342 [media] s5p-fimc: Update copyright notices
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>
2012-05-20 09:26:49 -03:00
Sylwester Nawrocki
4af813108b [media] s5p-fimc: Add support for Exynos4x12 FIMC-LITE
This patch adds driver for FIMC-LITE camera host interface. This new IP
differs from the regular FIMC IP in that it doesn't have input DMA,
scaler and color space conversion support. So it just plain camera host
interface for MIPI-CSI2 and ITU-R interfaces. For the serial bus support
it interworks with MIPI-CSIS and the exisiting s5p-csis driver.
The FIMC-LITE and MIPI-CSIS drivers can also be reused in the Exynos5
SoC series.

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>
2012-05-20 09:26:24 -03:00
Sylwester Nawrocki
5af86c2691 [media] s5p-fimc: Make sure an interrupt is properly requested
Use dev_name() for requesting an interrupt so we don't get an interrupt
requested with same name for multiple device instances.

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>
2012-05-20 09:23:49 -03:00
Sylwester Nawrocki
bb7c276ec4 [media] s5p-fimc: Minor cleanups
Tidy up the variant and driver data handling. Remove the 'samsung_'
prefix from some data structures since it doesn't really carry any
useful information and makes the names unnecessarily long.

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>
2012-05-20 09:23:35 -03:00
Sylwester Nawrocki
3d112d9ace [media] s5p-fimc: Prefix format enumerations with FIMC_FMT_
Prefix the pixel format enumerations with FIMC_FMT_ to make it more clear,
especially when used in new IP drivers, like fimc-lite, etc. Also add IO_
prefix in the input/output enumeration.

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>
2012-05-20 09:23:09 -03:00
Sylwester Nawrocki
0f735f5236 [media] s5p-fimc: Rework the video pipeline control functions
There is getting more entities to manage within single video pipeline
in newer SoCs. To simplify code put subdevs' pointer into an array
rather than adding new member in struct fimc_pipeline for each subdev.
This allows to easier handle subdev operations in proper order.

Additionally walk graph in one direction only in fimc_pipeline_prepare()
function to make sure we properly gather only media entities that below
to single data pipeline. This avoids wrong initialization in case where,
for example there are multiple active links from s5p-mipi-csis subdev
output pad.

struct fimc_pipeline declaration is moved to the driver's public header
to allow other drivers to reuse the fimc-lite driver added in subsequent
patches.

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>
2012-05-20 09:22:47 -03:00
Sylwester Nawrocki
2b511edb98 [media] s5p-fimc: Add FIMC-LITE register definitions
Add register definitions and register API for FIMC-LITE devices.

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>
2012-05-20 09:21:50 -03:00
Sylwester Nawrocki
c83a1ff063 [media] s5p-fimc: Refactor the register interface functions
Simplify the register API and use FIMC_REG_ prefix for all register
definitions for consistency with FIMC-LITE. The unused image effect
defines are removed.

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>
2012-05-20 09:19:32 -03:00
Sylwester Nawrocki
693f5c4082 [media] s5p-fimc: Use v4l2_subdev internal ops to register video nodes
In order to be able to select only FIMC-LITE support, which is added
with subsequent patches, the regular FIMC support is now contained
only in fimc-core.c, fimc-m2m.c and fimc-capture.c files. The graph
and pipeline management is now solely handled in fimc-mdevice.[ch].
This means the FIMC driver can now be excluded with Kconfig option,
leaving only FIMC-LITE and allowing this driver to be reused in SoCs
that have only FIMC-LITE and no regular FIMC IP.

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>
2012-05-20 09:17:11 -03:00
Sylwester Nawrocki
97d9742265 [media] s5p-fimc: Move m2m node driver into separate file
Virtually no functional changes, just code reordering. This let us to
clearly separate all logical functions available in the driver: fimc
capture, mem-to-mem, and later fimc-lite capture, ISP features, etc.

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>
2012-05-20 09:15:10 -03:00
Sylwester Nawrocki
41df5bf088 [media] s5p-fimc: Avoid crash with null platform_data
In commit "s5p-fimc: Handle sub-device interdependencies using deferred.."
there was a check added for pdata->num_clients without first checking
pdata against NULL. This causes a crash when platform_data is not set,
which is a valid use case. Fix this regression by skipping the MIPI-CSIS
subdev registration also when pdata is null.

Reported-by: HeungJun Kim <riverful.kim@samsung.com>
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>
2012-05-20 09:14:11 -03:00
Sachin Kamat
d310f478e2 [media] s5p-mfc: Use devm_* functions in s5p_mfc.c file
devm_* functions are device managed functions and make error handling
and cleanup simpler.

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>
2012-05-20 09:07:44 -03:00
Sachin Kamat
5b58b95405 [media] s5p-jpeg: Use devm_* functions in jpeg-core.c file
devm_* functions are used to replace kzalloc, request_mem_region, ioremap
and request_irq functions in probe call. With the usage of devm_* functions
explicit freeing and unmapping is not required.

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>
2012-05-20 09:05:44 -03:00
Sachin Kamat
32fced05ad [media] s5p-g2d: Use devm_* functions in g2d.c file
devm_* functions are device managed functions and make error handling
and cleanup simpler.

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>
2012-05-20 09:05:18 -03:00
Sachin Kamat
3e9095d54c [media] s5p-mfc: Add missing static storage class in s5p_mfc_enc.c file
Fixes the following sparse warnings:
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1439:5: warning: symbol 'vidioc_s_parm' was not declared. Should it be static?
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1455:5: warning: symbol 'vidioc_g_parm' was not declared. Should it be static?

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>
2012-05-20 09:04:42 -03:00
Sachin Kamat
9f3bd320fc [media] s5p-jpeg: Make s5p_jpeg_g_selection function static
Makes the function s5p_jpeg_g_selection static (detected by sparse).

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>
2012-05-20 09:04:13 -03:00
Sachin Kamat
ec76afe897 [media] s5p-g2d: Add missing static storage class in g2d.c file
Fixes the following sparse warnings:
drivers/media/video/s5p-g2d/g2d.c:68:18: warning: symbol 'def_frame' was not declared. Should it be static?
drivers/media/video/s5p-g2d/g2d.c:80:16: warning: symbol 'find_fmt' was not declared. Should it be static?
drivers/media/video/s5p-g2d/g2d.c:205:5: warning: symbol 'g2d_setup_ctrls' was not declared. Should it be static?

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>
2012-05-20 09:03:52 -03:00
Sachin Kamat
2356877cb1 [media] s5p-g2d: Fix NULL pointer warnings in g2d.c file
Fixes the following warnings detected by sparse:
warning: Using plain integer as NULL pointer

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>
2012-05-20 09:03:32 -03:00
Sachin Kamat
a13bba4f35 [media] s5p-mfc: Add missing static storage class to silence warnings
Fixes the following sparse warnings:

drivers/media/video/s5p-mfc/s5p_mfc.c:73:6
	warning: symbol 's5p_mfc_watchdog' was not declared. Should it be static?
drivers/media/video/s5p-mfc/s5p_mfc_opr.c:299:6:
	warning: symbol 's5p_mfc_set_shared_buffer' was not declared. Should it be static?

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>
2012-05-20 09:03:18 -03:00
Sachin Kamat
1259762fac [media] s5p-mfc: Fix NULL pointer warnings
Fixes the following type of warnings detected by sparse:
warning: Using plain integer as NULL pointer.

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>
2012-05-20 09:03:02 -03:00
Sachin Kamat
e6364a9874 [media] v4l: s5p-tv: Fix section mismatch warning in mixer_video.c
The function __devinit mxr_probe() references
a function __devexit mxr_release_video().

Since mxr_release_video() is referenced outside the exit section, the following
compilation warning is generated which is fixed here:

WARNING: drivers/media/video/s5p-tv/s5p-mixer.o(.devinit.text+0x340):
Section mismatch in reference from the function mxr_probe() to the function
devexit.text:mxr_release_video()

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>
2012-05-20 09:02:45 -03:00
Tomasz Stanislawski
ef6a6ddc4d [media] v4l: s5p-tv: mixer: fix handling of interlaced modes
The next frame was fetched by Mixer at every VSYNC event.  This caused tearing
when Mixer's output in interlaced mode.  This patch fixes this bug by fetching
new frame every second VSYNC when working in interlaced mode.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@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>
2012-05-20 09:02:28 -03:00
Tomasz Stanislawski
2fd07a4a9e [media] v4l: s5p-tv: hdmi: fix mode synchronization
The mode setup was applied on HDMI hardware only on resume event.  This caused
problem if HDMI was not suspended between mode switches.  This patch fixes this
problem by setting a dirty flag on a mode change event.  If flag is set, then
new mode is applied on the next stream-on event.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@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>
2012-05-20 09:02:15 -03:00
Tomasz Stanislawski
3f468accf2 [media] v4l: s5p-tv: hdmi: parametrize DV timings
This patch fixes timings configuration in HDMI register. It adds
support for numerous new presets including interlaced ones.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@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>
2012-05-20 09:01:56 -03:00
Tomasz Stanislawski
2470ea3f7f [media] v4l: s5p-tv: hdmiphy: add support for per-platform variants
Adds selection of HDMIPHY configuration tables basing on both preset
and platform variant.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@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>
2012-05-20 09:01:19 -03:00
Tomasz Stanislawski
c31e3c4b1e [media] v4l: s5p-tv: mixer: fix compilation warning
This patch fixes compilation warning in debug message.  The warning is caused
by incorrect 'unsigned' to 'unsigned long' conversion in dev_dbg.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@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>
2012-05-20 09:00:37 -03:00
Marek Szyprowski
c1bf9c654a [media] v4l: s5p-tv: fix plane size calculation
Fix plane size calculation.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:00:13 -03:00
Hans Verkuil
9d5934446a [media] w9966: convert to the latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:44:00 -03:00
Hans Verkuil
c551af62e5 [media] arv: use latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:43:42 -03:00
Hans Verkuil
34caed8b3a [media] c-qcam: convert to the latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:43:18 -03:00
Hans Verkuil
5fa1a89d37 [media] bw-qcam: update to latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:42:58 -03:00
Hans Verkuil
eb8305b159 [media] tvp7002: add support for the new dv timings API
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:30:09 -03:00
Hans Verkuil
5d7758eed2 [media] v4l2 framework: add support for the new dv_timings ioctls
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:22:30 -03:00
Ezequiel García
dedb8cb1d6 [media] em28xx: Fix memory leak on driver defered resource release
When the device is physically unplugged but there are still
open file handles, resource release is defered until last
opened handle is closed.
This patch fixes a missing em28xx_fh struct release.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-18 15:51:07 -03:00
Masahiro Nakai
61282daf50 [media] V4L2: mt9t112: fixup JPEG initialization workaround
It has been indicated on Atmark Techno Web page
http://armadillo.atmark-techno.com/faq/a800eva-dont-work-camera

Signed-off-by: Masahiro Nakai <nakai@atmark-techno.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:15:35 -03:00
Kuninori Morimoto
2564f67bc8 [media] V4L2: sh_mobile_ceu: manage lower 8bit bus
CAMCR::DTIF feild controls camera bus as upper8bit/16bit/lower8bit.
This patch manages unmanaged lower 8bit bus

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:15:14 -03:00
Guennadi Liakhovetski
fec0f72f5f [media] V4L: sh_mobile_ceu_camera: don't fail TRY_FMT
VIDIOC_TRY_FMT shouldn't fail if the user requests an unsupported pixel
format. Instead the driver should replace it with a supported one. Fix the
sh_mobile_ceu_camera driver accordingly.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:14:42 -03:00
Guennadi Liakhovetski
9633c0867f [media] V4L: soc-camera: switch to using the existing .enum_framesizes()
The recently introduced .enum_mbus_fsizes() v4l2-subdev video operation is
a duplicate of the .enum_framesizes() operation, introduced earlier. Switch
soc-camera over to using the original one.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:14:23 -03:00
Guennadi Liakhovetski
67e86524b9 [media] V4L: mx2-camera: avoid overflowing 32-bits
In mx2_camera_try_fmt(), when applying i.MX25 restrictions to frame sizes,
the height is checked to be <= 0xffff. But later an integer multiplication
height * 4 * 0x3ffff is performed, which will overflow even for bounded
height values. This patch switches to using 64-bit multiplication and
division to avoid overflowing.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:14:01 -03:00
Laurent Pinchart
fc13baff74 [media] sh_mobile_ceu_camera: Support user-configurable line stride
In image mode, the CEU allows configurable line strides up to 8188
pixels.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[g.liakhovetski@gmx.de: unify sh_mobile_ceu_set_rect() in data-fetch mode]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:13:22 -03:00
Laurent Pinchart
914f05c811 [media] soc-camera: Support user-configurable line stride
Add a capabilities field to the soc_camera_host structure to flag hosts
that support user-configurable line strides. soc_camera_try_fmt() then
passes the user-provided bytesperline and sizeimage format fields to
such hosts, and expects the host to check (and fix if needed) the
values.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[g.liakhovetski@gmx.de: fix a typo in mx2_camera.c]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:12:54 -03:00
Laurent Pinchart
b0a461ff1b [media] mx2_camera: Use soc_mbus_image_size() instead of manual computation
Use the new soc_mbus_image_size() function to compute the image size.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:11:23 -03:00
Laurent Pinchart
bed8d80330 [media] soc-camera: Honor user-requested bytesperline and sizeimage
Compute the bytesperline and sizeimage values when trying/setting
formats or when allocating buffers by taking the user-requested values
into account.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:11:07 -03:00
Laurent Pinchart
8929c96378 [media] soc-camera: Add soc_mbus_image_size
The function returns the minimum size of an image for a given number of
bytes per line (as per the V4L2 specification), width and format.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:10:20 -03:00
Laurent Pinchart
4e0e620ce7 [media] soc-camera: Fix bytes per line computation for planar formats
The V4L2 specification defines bytesperline for planar formats as the
number of bytes per line for the largest plane. Modify
soc_mbus_bytes_per_line() accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:10:03 -03:00
Laurent Pinchart
ad3b81faa1 [media] soc-camera: Add plane layout information to struct soc_mbus_pixelfmt
To compute the value of the v4l2_pix_format::bytesperline field, we need
information about planes layout for planar formats. The new enum
soc_mbus_layout conveys that information.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:09:41 -03:00
Laurent Pinchart
1c0f95eec6 [media] soc_camera: Use soc_camera_device::bytesperline to compute line sizes
Instead of computing the line sizes, use the previously negotiated
soc_camera_device::bytesperline value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:09:02 -03:00
Laurent Pinchart
2b61d46e2c [media] soc_camera: Use soc_camera_device::sizeimage to compute buffer sizes
Instead of computing the buffer size manually in the videobuf queue
setup and buffer prepare callbacks, use the previously negotiated
soc_camera_device::sizeimage value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:08:22 -03:00
Laurent Pinchart
584943aa06 [media] mx2_camera: Fix sizeimage computation in try_fmt()
The try_fmt() handler restricts the image width based on the hardware
limits and updates the bytesperline value, but doesn't update sizeimage.
Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:07:12 -03:00
Guennadi Liakhovetski
9ce3ce4d4a [media] V4L: mem2mem: fix alignment in mem2mem-testdev
Fix a trivial alignment calculation issue.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 13:38:33 -03:00