summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-08-21[media] flexcop: Show the item to enable debug after the driverMauro Carvalho Chehab
Instead of showing the option to show debug at the end, show it after each driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Kconfig: merge all customise options into just oneMauro Carvalho Chehab
Instead of having 3 options to allow customizing the media sub-drivers (tuners, I2C drivers, frontends), merge all of them into just one. That simplifies the life for users, as they can just keep this untouched. Life for developers is also simpler, as there's now just one Kconfig item to remember, for the ancillary sub-drivers providing supports for chips that could change from one board design to another. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Kconfig: use menuconfig instead of menuMauro Carvalho Chehab
This allows disabling all drivers of a certain type as a hole Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Cleanup media Kconfig filesMauro Carvalho Chehab
- get rid of ridden V4L2_COMMON symbol This symbol is not needed anymore; it can be folded with V4L2 one, simplifying the Kconfig a little bit; - Comment why some Kconfig items are needed; - Remove if test for MEDIA_CAMERA_SUPPORT, replacing it by depends on. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Put the test devices togetherMauro Carvalho Chehab
Vivi is not that important to appear at the main menu, so move it to its own submenu. Also, the mem2mem test device driver is similar to vivi. So, put both at the same menu. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Kconfig reorganizationMauro Carvalho Chehab
Reorganize the Kconfig order, for it to be a little more intuitive. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] move soc_camera to its own directoryMauro Carvalho Chehab
That helps to better organize the soc_camera items. While here, cleanup Makefiles, removing uneeded include dirs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21sh_mobile_csi2: move it to the right placeMauro Carvalho Chehab
make[4]: *** No rule to make target `drivers/media/platform/sh_mobile_csi2.c', needed by `drivers/media/platform/sh_mobile_csi2.o'. Stop. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-17[media] b2c2: export b2c2_flexcop_debug symbolMauro Carvalho Chehab
ERROR: "b2c2_flexcop_debug" [drivers/media/pci/b2c2/b2c2-flexcop-pci.ko] undefined! Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-16[media] Fix some Makefile rulesMauro Carvalho Chehab
On a few places, := were using instead of +=, causing drivers to not compile. While here, standardize the usage of += on all cases where multiple lines are needed, and for obj-y/obj-m targets, and := when just one line is needed, on <module>-obj rules. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Identified-by: Antti Polosaari <crope@iki.fi> Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] cx23885-cards: fix netup card default revisionAnton Nurkin
Netup cards revision 1 are not manufactured anymore. So, rev. 4 should be default. Signed-off-by: Anton Nurkin <ptqa@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] media: soc_camera: don't clear pix->sizeimage in JPEG modeAlbert Wang
In JPEG mode, the size of image is variable due to different JPEG compression rate. We only can get the pix->sizeimage from the user. If we clear pix->sizeimage in soc_camera_try_fmt() then we will get it from: ret = soc_mbus_image_size(xlate->host_fmt, pix->bytesperline, pix->height); if (ret < 0) return ret; pix->sizeimage = max_t(u32, pix->sizeimage, ret); In general, this sizeimage will be larger than the actul JPEG image size. But vb2 will check the buffer and size of image in __qbuf_userptr(): /* Check if the provided plane buffer is large enough */ if (planes[plane].length < q->plane_sizes[plane]) So we shouldn't clear the pix->sizeimage and also shouldn't re-calculate the pix->sizeimage in soc_mbus_image_size() in JPEG mode We also shouldn't re-calculate pix->bytesperline: ret = soc_mbus_bytes_per_line(pix->width, xlate->host_fmt); if (ret < 0) return ret; pix->bytesperline = max_t(u32, pix->bytesperline, ret); pix->bytesperline also should be set by the user or by the driver's try_fmt() implementation. Change-Id: I700690a2287346127a624b5260922eaa5427a596 Signed-off-by: Albert Wang <twang13@marvell.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] media: mx3_camera: Improve data bus width check code for probeLiu Ying
This patch contains code change only to use the present macro- MX3_CAMERA_DATAWIDTH_MASK to check valid camera platform data bus width instead of enumerating every possible data bus width. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] mt9v022: Add support for mt9v024Alex Gershgorin
Driver for mt9v022 camera sensor is fully compatible for mt9v024 camera sensor with the exception of several registers which have been changed addresses. mt9v024 also has improved and additional features, but they are currently not in use. Signed-off-by: Alex Gershgorin <alexg@meprolight.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] media: mx2_camera: Fix clock handling for i.MX27Javier Martin
On i.MX27 two clocks are required: emma-ipg and emma-ahb. The ahb clock has to be requested using both a device and a connection ID. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> [g.liakhovetski@gmx.de: rebase to the current media tree] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] media: mx3_camera: buf_init() add buffer state checkAlex Gershgorin
This patch checks the state of the buffer when calling .buf_init() method. This is needed for the USERPTR buffer type, because in that case .buf_init() is called every time a buffer is queued, and not only once during the preparation stage, like in the MMAP case. Without this check buffers get initialised repeatedly, which also leads to the allocation of new DMA descriptors, of which there is only a final relatively small number available. Both MMAP and USERPTR methods were successfully tested. Signed-off-by: Alex Gershgorin <alexg@meprolight.com> [g.liakhovetski@gmx.de: remove mx3_camera_buffer::state completely] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_usb_v2: ce6230, rtl28xxu use .reset_resumeAntti Palosaari
All these seems to survive .reset_resume. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_usb_v2: af9015, af9035, anysee use .reset_resumeAntti Palosaari
All these seems to survive .reset_resume. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_usb_v2: .reset_resume() supportAntti Palosaari
Add .reset_resume() support. Also some other small changes for suspend / resume. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_frontend: implement suspend / resumeAntti Palosaari
Move initial suspend / resume support from dvb_usb_v2 to dvb_frontend as it is dvb general feature that could be used all dvb devices. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_usb_v2: implement power-management for suspendAntti Palosaari
Put device full sleep on suspend, wake-up it on resume and acquire retune in order to return same television channel. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_core: export function to perform retuneAntti Palosaari
We need to retune when resume from suspend. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] media: coda: add const qualifiersEmil Goode
The commit 98d7bbb9 changed *of_device_id.data to const which introduced warnings in various places that have mostly been fixed. This patch fixes one such warning by introducing two const qualifiers. GCC warning: drivers/media/platform/coda.c:1785:16: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] anysee: convert Kernel dev_* loggingAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] anysee: fix compiler warningAntti Palosaari
debug_dump macro was defined twice when CONFIG_DVB_USB_DEBUG was not set. Move debug_dump macro to correct place. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] drivers/media/usb/{s2255drv.c, tm6000/tm6000-alsa.c, ↵Julia Lawall
tm6000/tm6000-input.c}: Remove potential NULL dereferences If the NULL test is necessary, the initialization involving a dereference of the tested value should be moved after the NULL test. The sematic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] s5p-tv: Use devm_* functions in sii9234_drv.c fileSachin Kamat
devm_* functions are device managed functions and make error handling and cleanup cleaner and 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-08-15[media] s5p-tv: Replace printk with pr_* functionsSachin Kamat
Replace printk with pr_* functions to silence checkpatch warnings. 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-08-15[media] s5p-tv: Use devm_regulator_get() in sdo_drv.c fileSachin Kamat
devm_regulator_get() is a device managed function and makes the exit code a bit simpler and cleaner. 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-08-15[media] drivers/media/platform/mx2_emmaprp.c: use devm_kzalloc and devm_clk_getJulia Lawall
Using devm_kzalloc simplifies the code and ensures that the use of devm_request_irq is safe. When kzalloc and kfree were used, the interrupt could be triggered after the handler's data argument had been freed. This also introduces some missing initializations of the return variable ret, and uses devm_request_and_ioremap instead of the combination of devm_request_mem_region and devm_ioremap. The problem of a free after a devm_request_irq was found using the following semantic match (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression e1,e2,x,a,b,c,d; identifier free; position p1,p2; @@ devm_request_irq@p1(e1,e2,...,x) ... when any when != e2 = a when != x = b if (...) { ... when != e2 = c when != x = d free@p2(...,x,...); ... return ...; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] DocBook validation fixesHans Verkuil
More validation fixes as reported by xmllint. There are still three xmllint errors after this remaining regarding SVG file support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] DocBook: update RDS references to the latest RDS standardsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] stk1160: remove unneeded checkDan Carpenter
"card" is a valid pointer here because we checked snd_card_create() for error returns. Checking after a dereference makes the static checkers complain. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] stk1160: unlock on error path stk1160_set_alternate()Dan Carpenter
There are some unlocks missing on error. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] mem2mem_testdev: unlock and return error code properlyDan Carpenter
We recently added locking to this function, but there was an error path which accidentally returned holding a lock. Also we returned zero on failure on some paths instead of the error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] em28xx: use after free in em28xx_v4l2_close()Dan Carpenter
We need to move the unlock before the kfree(dev); Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] it913x-fe: use ARRAY_SIZE() as a cleanupDan Carpenter
This code looks suspicious, but it turns out that "nv" is an array of u8 so sizeof() is the same as ARRAY_SIZE(). Using ARRAY_SIZE() is more readable though. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] V4L: soc-camera: add selection API host operationsGuennadi Liakhovetski
Add .get_selection() and .set_selection() soc-camera host driver operations. Additionally check, that the user is not trying to change the output sizes during a running capture. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] media: mx2_camera: Add YUYV output formatJavier Martin
Add explicit conversions from UYVY and YUYV to YUYV so that csicr1 configuration can be set properly for each format. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] video: mx2_camera: Use clk_prepare_enable/clk_disable_unprepareFabio Estevam
Prepare the clock before enabling it. Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: <linux-media@vger.kernel.org> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepareFabio Estevam
Prepare the clock before enabling it. Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: <linux-media@vger.kernel.org> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] ov772x: Stop sensor readout right after resetLaurent Pinchart
The sensor starts streaming video as soon as it gets powered or is reset. Disable the output in the reset function. 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-08-15[media] ov772x: Compute window size registers at runtimeLaurent Pinchart
Instead of hardcoding register arrays, compute the values at runtime. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [g.liakhovetski@gmx.de: keep (Q)VGA_* macros for now] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] ov772x: Add support for SBGGR10 formatLaurent Pinchart
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-08-15[media] ov772x: Add ov772x_read() and ov772x_write() functionsLaurent Pinchart
And use them instead of calling SMBus access functions directly. 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-08-15[media] ov772x: Make to_ov772x convert from v4l2_subdev to ov772x_privLaurent Pinchart
Conversion from i2c_client to ov772x_priv is only needed in a single location, while conversion from v4l2_subdev to ov772x_priv is needed in several locations. Perform the former manually, and use to_ov772x for the later. 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-08-15[media] ov772x: try_fmt must not default to the current formatLaurent Pinchart
If the requested format isn't supported, return a fixed default format instead of the current 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-08-15[media] ov772x: Don't fail in s_fmt if the requested format isn't supportedLaurent Pinchart
Select a default format instead. 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-08-15[media] ov772x: Select the default format at probe timeLaurent Pinchart
The format and window size are only initialized during the first g_fmt call. This leaves the device in an inconsistent state after initialization, which will cause problems when implementing pad operations. Move the format and window size initialization to probe time. 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-08-15[media] ov772x: Fix memory leak in probe error pathLaurent Pinchart
The control handler isn't freed if its initialization fails. 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>