summaryrefslogtreecommitdiff
path: root/drivers/media/platform/davinci
AgeCommit message (Collapse)Author
2015-04-02[media] media: davinci: vpfe_capture: embed video_deviceLad, Prabhakar
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] media: davinci: vpif_display: embed video_device struct in channel_objLad, Prabhakar
Embed video_device struct (video_dev) in channel_obj and also the Unregister path doesn't need to free the video_device structure, hence, change the video_device.release callback point to video_device_release_empty. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] media: davinci: vpif_capture: embed video_device struct in channel_objLad, Prabhakar
Embed video_device struct (video_dev) in channel_obj and also the Unregister path doesn't need to free the video_device structure, hence, change the video_device.release callback point to video_device_release_empty. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02[media] davinci: add V4L2 dependenciesArnd Bergmann
The davinci media drivers use videobuf2, which they enable through a 'select' statement. If one of these drivers is built-in, but the v4l2 core is a loadable modules, we end up with a link error: drivers/built-in.o: In function `vb2_fop_mmap': :(.text+0x113e84): undefined reference to `video_devdata' drivers/built-in.o: In function `vb2_ioctl_create_bufs': :(.text+0x114710): undefined reference to `video_devdata' drivers/built-in.o: In function `vb2_ioctl_reqbufs': :(.text+0x114ed8): undefined reference to `video_devdata' drivers/built-in.o: In function `vb2_ioctl_querybuf': :(.text+0x115530): undefined reference to `video_devdata' To solve this, we need to add a dependency on VIDEO_V4L2, which enforces that the davinci drivers themselves can only be loadable modules if V4L2 is not built-in, and they do not cause the videobuf2 code to be built-in. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-02[media] media: davinci: vpif_capture: use vb2_ops_wait_prepare/finish helperPrabhakar Lad
This patch adds support in the capture driver for using vb2_ops_wait_prepare/finish() helpers provided by the vb2 core. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-02[media] media/platform: fix querycapHans Verkuil
Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. In addition, remove the CAPTURE and OUTPUT caps for M2M devices. These were already slated for removal, so it's time to do so. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Kamil Debski <k.debski@samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] platform: Make use of media_bus_format enumBoris BREZILLON
In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all platform drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11[media] media: davinci: vpbe: missing clk_putSudip Mukherjee
we are getting struct clk using clk_get before calling clk_prepare_enable. but if clk_prepare_enable fails, then we are jumping to fail_mutex_unlock where we are just unlocking the mutex, but we are not freeing the clock source. this patch just adds a call to clk_put before jumping to fail_mutex_unlock. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11[media] media: davinci: vpbe: add support for VIDIOC_CREATE_BUFSPrabhakar Lad
this patch adds support for vidioc_create_bufs. Along side remove unneeded member numbuffers. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: return -ENODATA for *dv_timings/*_std callsPrabhakar Lad
this patch adds support for returning -ENODATA if the current output doesn't support it. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: group v4l2_ioctl_opsPrabhakar Lad
this patch groups the v4l2_ioctl_ops. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: use helpers provided by core if streaming is ↵Prabhakar Lad
started this patch uses vb2_is_busy() helper to check if streaming is actually started, instead of driver managing it. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: add support for VIDIOC_EXPBUFPrabhakar Lad
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: add support for VB2_DMABUFPrabhakar Lad
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: use vb2_ioctl_* helpersPrabhakar Lad
this patch adds support for using vb2_ioctl_* helpers. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: use fh handling provided by v4lPrabhakar Lad
this patch converts the driver to use fh handling provided by the v4l core instead of driver doing it. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: use vb2_fop_mmap/pollPrabhakar Lad
this patch teaches vpbe driver to use vb2_fop_mmap/poll helpers. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: improve vpbe_buffer_prepare() callbackPrabhakar Lad
this patch improve vpbe_buffer_prepare() callback, as buf_prepare() callback is never called with invalid state and check for vb2_plane_vaddr(vb, 0) is dropped as payload check should be done unconditionally. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: drop buf_cleanup() callbackPrabhakar Lad
this patch drops buf_cleanup() callback as this callback is never called with buffer state active. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: use vb2_ops_wait_prepare/finish helper functionsPrabhakar Lad
this patch makes use of vb2_ops_wait_prepare/finish helper functions. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: drop buf_init() callbackPrabhakar Lad
this patch drops the buf_init() callback as init of buf list is not required. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28[media] media: davinci: vpbe: initialize vb2 queue and DMA context in probePrabhakar Lad
this patch moves the initialization of vb2 queue and the DMA context to probe() and clean up in remove() callback respectively. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-20media: platform: davinci: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-09-23[media] davinci: remove an unneeded checkDan Carpenter
We don't need to check "ret", we know it's zero. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] vpfe_standards[] can be staticFengguang Wu
make vpfe_standards[] static. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] media: davinci: remove unneeded dependency ARCH_OMAP3Prabhakar Lad
this patch removes unneeded dependency of ARCH_OMAP3 on VIDEO_DM6446_CCDC. Also the top level platform Makefile descended into davinci/ without any dependency so just drop the dependency obj-y, as obj-$(CONFIG_ARCH_DAVINCI) already exists. Reported-by: Andreas Ruprecht <rupran@einserver.de> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] media: davinci: vpif_capture: fix the check on suspend/resume callbacksPrabhakar Lad
It is possible to call STREAMON without having any buffers queued. So vb2_is_streaming() can return true without start_streaming() having been called. Only after at least one buffer has been queued will start_streaming be called. The check vb2_is_streaming() is incorrect as this would start the DMA without having proper DMA pointers set up. this patch uses vb2_start_streaming_called() instead to check is streaming was called. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] media: davinci: vpif_display: fix the check on suspend/resume callbacksPrabhakar Lad
It is possible to call STREAMON without having any buffers queued. So vb2_is_streaming() can return true without start_streaming() having been called. Only after at least one buffer has been queued will start_streaming be called. The check vb2_is_streaming() is incorrect as this would start the DMA without having proper DMA pointers set up. this patch uses vb2_start_streaming_called() instead to check is streaming was called. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] media: davinci: vpif_capture: drop setting of vb2 buffer state to ACTIVEPrabhakar Lad
this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE, as any buffer queued to the driver is marked ACTIVE by the vb2 core. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] media: davinci: vpif_display: drop setting of vb2 buffer state to ACTIVEPrabhakar Lad
this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE, as any buffer queued to the driver is marked ACTIVE by the vb2 core. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-09[media] vpif: Fix compilation with allmodconfigMauro Carvalho Chehab
When vpif is compiled as module, those errors happen: ERROR: "vpif_lock" [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: "vpif_lock" [drivers/media/platform/davinci/vpif_capture.ko] undefined! That's because vpif_lock symbol is not exported. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] davinci: just return 0 instead of using a varMauro Carvalho Chehab
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Acked-by: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] be sure that HAS_DMA is enabled for vb2-dma-contigMauro Carvalho Chehab
vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take it into account at select. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] enable COMPILE_TEST for media driversMauro Carvalho Chehab
There are several arch-specific media drivers that don't require asm-specific includes and can be successfully compiled on x86. Add COMPILE_TEST dependency for them, in order to allow a broader test on those drivers. That helps static analysis tools like Coverity to discover eventual troubles there. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] dm644x_ccdc: use unsigned long for fpc_table_addrMauro Carvalho Chehab
The fpc_table_addr is used as an unsigned integer that stores an address. At the Kernel, the proper type for such integers is unsigned long. This generates lots of warnings when compiling on 64 bits. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] vpif: don't cast pointers to intMauro Carvalho Chehab
Shut up several warnings about invalid casting when printing the values of two pointers. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] dm355_ccdc: declare a function as staticMauro Carvalho Chehab
drivers/media/platform/davinci/dm355_ccdc.c:463:5: warning: no previous prototy pe for 'ccdc_write_dfc_entry' [-Wmissing-prototypes] int ccdc_write_dfc_entry(int index, struct ccdc_vertical_dft *dfc) ^ Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] dm644x_ccdc: declare some functions as staticMauro Carvalho Chehab
drivers/media/platform/davinci/dm644x_ccdc.c:133:6: warning: no previous protot ype for 'ccdc_setwin' [-Wmissing-prototypes] void ccdc_setwin(struct v4l2_rect *image_win, ^ drivers/media/platform/davinci/dm644x_ccdc.c:373:6: warning: no previous protot ype for 'ccdc_config_ycbcr' [-Wmissing-prototypes] void ccdc_config_ycbcr(void) ^ drivers/media/platform/davinci/dm644x_ccdc.c:526:6: warning: no previous protot ype for 'ccdc_config_raw' [-Wmissing-prototypes] void ccdc_config_raw(void) ^ Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] vpif_capture: get rid of some unused varsMauro Carvalho Chehab
drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_channel_isr': drivers/media/platform/davinci/vpif_capture.c:376:18: warning: variable 'field' set but not used [-Wunused-but-set-variable] enum v4l2_field field; ^ drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_calculate_offs ets': drivers/media/platform/davinci/vpif_capture.c:536:23: warning: variable 'vpitch ' set but not used [-Wunused-but-set-variable] unsigned int hpitch, vpitch, sizeimage; ^ Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] vpif_display: get rid of some unused varsMauro Carvalho Chehab
drivers/media/platform/davinci/vpif_display.c: In function 'vpif_channel_isr': drivers/media/platform/davinci/vpif_display.c:363:18: warning: variable 'field' set but not used [-Wunused-but-set-variable] enum v4l2_field field; ^ drivers/media/platform/davinci/vpif_display.c: In function 'vpif_calculate_offs ets': drivers/media/platform/davinci/vpif_display.c:505:23: warning: variable 'vpitch ' set but not used [-Wunused-but-set-variable] unsigned int hpitch, vpitch, sizeimage; ^ drivers/media/platform/davinci/vpif_display.c: In function 'vpif_set_output': drivers/media/platform/davinci/vpif_display.c:816:27: warning: variable 'subdev _info' set but not used [-Wunused-but-set-variable] struct vpif_subdev_info *subdev_info = NULL; Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22Merge commit '67dd8f35c2d8ed80f26c9654b474cffc11c6674d' into patchworkMauro Carvalho Chehab
* .: (268 commits) Linux 3.16-rc6 um: segv: Save regs only in case of a kernel mode fault um: Fix hung task in fix_range_common() um: Ensure that a stub page cannot get unmapped Revert "um: Fix wait_stub_done() error handling" btrfs: test for valid bdev before kobj removal in btrfs_rm_device Btrfs: fix abnormal long waiting in fsync random: check for increase of entropy_count because of signed conversion ARM: EXYNOS: Fix core ID used by platsmp and hotplug code ahci: add support for the Promise FastTrak TX8660 SATA HBA (ahci mode) ARM: at91/dt: add missing clocks property to pwm node in sam9x5.dtsi ARM: at91/dt: fix usb0 clocks definition in sam9n12 dtsi ARM: at91: at91sam9x5: correct typo error for ohci clock irqchip: gic: Fix core ID calculation when topology is read from DT GFS2: fs/gfs2/rgrp.c: kernel-doc warning fixes GFS2: memcontrol: Spelling s/invlidate/invalidate/ GFS2: Allow caching of glocks for flock GFS2: Allow flocks to use normal glock dq rather than dq_wait GFS2: replace count*size kzalloc by kcalloc GFS2: Use GFP_NOFS when allocating glocks ... Conflicts: drivers/media/dvb-frontends/si2168.c drivers/media/dvb-frontends/si2168_priv.h drivers/media/tuners/si2157.c
2014-07-22[media] media: davinci: vpif: fix array out of bound warningsPrabhakar Lad
This patch fixes following array out of bound warnings, drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove': drivers/media/platform/davinci/vpif_display.c:1389:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common->alloc_ctx); ^ drivers/media/platform/davinci/vpif_display.c:1385:2: note: containing loop for (i = 0; i < VPIF_DISPLAY_MAX_DEVICES; i++) { ^ drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove': drivers/media/platform/davinci/vpif_capture.c:1581:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common->alloc_ctx); ^ drivers/media/platform/davinci/vpif_capture.c:1577:2: note: containing loop for (i = 0; i < VPIF_CAPTURE_MAX_DEVICES; i++) { ^ drivers/media/platform/davinci/vpif_capture.c:1580:23: warning: array subscript is above array bounds [-Warray-bounds] common = &ch->common[i]; Reported-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17[media] v4l: Support extending the v4l2_pix_format structureLaurent Pinchart
The v4l2_pix_format structure has no reserved field. It is embedded in the v4l2_framebuffer structure which has no reserved fields either, and in the v4l2_format structure which has reserved fields that were not previously required to be zeroed out by applications. To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer structure, and use the priv field as a magic value to indicate that the application has set all v4l2_pix_format extended fields and zeroed all reserved fields following the v4l2_pix_format field in the v4l2_format structure. The availability of this API extension is reported to userspace through the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the priv field is still set to the magic value at [GS]_FMT return wouldn't be enough, as older kernels don't zero the priv field on return. To simplify the internal API towards drivers zero the extended fields and set the priv field to the magic value for applications not aware of the extensions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIORamakrishnan Muthukrishnan
Since all the drivers that use `struct v4l2_fh' use the core priority checking, the setting of the flag in the drivers can be removed. Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] dm644x_ccdc: remove check for CONFIG_DM644X_VIDEO_PORT_ENABLEPaul Bolle
A check for CONFIG_DM644X_VIDEO_PORT_ENABLE was added in v2.6.32. The related Kconfig symbol was never added so this check has always evaluated to false. Remove that check. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] davinci: vpif: missing unlocks on errorDan Carpenter
We recently changed some locking around so we need some new unlocks on the error paths. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] media: davinci: vpif_capture: fix v4l-compliance issuesLad, Prabhakar
This patch does the following: 1: sets initial default format during probe. 2: removes spurious messages. 3: optimize vpif_s/try_fmt_vid_out code. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] media: davinci: vpif_capture: drop unneeded module paramsLad, Prabhakar
Remove bogus 'numbuffers' and 'bufsize' module options. The number of buffers and buffer sizes are determined by VIDIOC_REQBUFS and VIDIOC_S_FMT and the amount of available memory (in the case of the MMAP stream I/O mode) and not by module options. These module params are a left-over from the original montavista code that used these parameters to pre-allocate the memory needed for the buffers. The code that allocated those buffers was never upstreamed since by the time the drivers were added to the kernel the TI cmem module could be used in combination with the USERPTR mode to reserve and pass physically contiguous memory pointers around. These days of course CMA is used instead of cmem. This patch removes these module options altogether since they no longer do what they originally were designed for. They should never have been part of the upstreamed code in the first place, so they've been pointless ever since 2.6.32 when this driver first appeared in the mainline kernel. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25[media] media: davinci: vpif: Switch to pad-level DV operationsLaurent Pinchart
The video-level enum_dv_timings and dv_timings_cap operations are deprecated in favor of the pad-level versions. All subdev drivers implement the pad-level versions, switch to them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>