summaryrefslogtreecommitdiff
path: root/drivers/media/platform/davinci/vpif_display.c
AgeCommit message (Collapse)Author
2014-05-23[media] media: davinci: vpif_display: return -ENODATA for *dv_timings callsLad, Prabhakar
this patch adds suppport to return -ENODATA for *dv_timings calls if the current output does not 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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: use SIMPLE_DEV_PM_OPSLad, Prabhakar
this patch uses SIMPLE_DEV_PM_OPS, and drops unneeded members from io_usrs, usrs and makes use of vb2 helepers instead. 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-23[media] media: davinci: vpif_display: group v4l2_ioctl_opsLad, Prabhakar
this patch gorups the v4l2_ioctl_ops and align them appropriately. No functional changes. 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-23[media] media: davinci: vpif_display: drop cropcapLad, Prabhakar
this patch drops cropcap as this driver doesnt support cropping. 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-23[media] media: davinci: vpif_display: drop unneeded module paramsLad, Prabhakar
this pacth drops unneeded module params and vpif_config_params. 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-23[media] media: davinci: vpif_display: initialize the video device in single ↵Lad, Prabhakar
place this patch moves the initalization of video device to a single place and uses macro to define the driver name and use it appropraitely in required places. 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-23[media] media: davinic: vpif_display: drop started member from struct common_objLad, Prabhakar
the started member was indicating whether streaming was started or not, this can be determined by vb2 offering, this patch replaces the started member from struct common_obj with appropriate vb2 calls. 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-23[media] media: davinci: vpif_display: drop numbuffers field from common_objLad, Prabhakar
This patch drops numbuffers member from struct common_obj as this was 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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: drop unnecessary field memoryLad, Prabhakar
The common->memory field is set but not used anywhere. Drop 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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: drop reserving memory for deviceLad, Prabhakar
this patch drops reserving contigiuos memory for the device, as now with CMA support there is no need of this. This patch also prepares to removal of config_params. 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-23[media] media: davinci: vpif_display: use vb2_ioctl_* helpersLad, Prabhakar
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-23[media] media: davinci: vpif_display: use v4l2_fh_open and vb2_fop_releaseLad, Prabhakar
this patch adds support to use v4l2_fh_open() and vb2_fop_release, which allows to drop driver specific struct vpif_fh, as this is handeled by core. This patch also drops vpif_g/s_priority as this handeled by 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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: use vb2_fop_mmap/pollLad, Prabhakar
No need to reinvent the wheel. Just use the already existing functions for that. 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-23[media] media: davinci: vpif_display: improve start/stop_streaming callbacksLad, Prabhakar
this patch drops unnecessary check from start_streaming() callback as this is already done in try/s_fmt and some minor code cleanups, drops check for vb2_is_streaming() as this check is done by vb2 itself before calling this callback. 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-23[media] media: davinci: vpif_display: improve vpif_buffer_queue_setup() functionLad, Prabhakar
this patch sets the sizes[0] of plane according to the fmt passed or which is being set in the channel, in both MMAP and USERPTR buffer type. This patch also move the calculation of offests(vpif_calculate_offsets()) to queue_setup() callback as after queue_setup() callback the application is no longer allowed to change format, and prepares to removal of config_params. 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-23[media] media: davinci: vpif_display: improve vpif_buffer_prepare() callbackLad, Prabhakar
this patch improve vpif_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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: drop buf_cleanup() callbackLad, Prabhakar
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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: release buffers in case ↵Lad, Prabhakar
start_streaming() call back fails this patch adds support to release the buffer by calling vb2_buffer_done(), with state marked as VB2_BUF_STATE_QUEUED if start_streaming() call back fails. 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-23[media] media: davinci: vpif_display: use vb2_ops_wait_prepare/finish helper ↵Lad, Prabhakar
functions 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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: drop buf_init() callbackLad, Prabhakar
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 <m.chehab@samsung.com>
2014-05-23[media] media: davinci: vpif_display: initialize vb2 queue and DMA context ↵Lad, Prabhakar
during probe this patch moves the initalization 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 <m.chehab@samsung.com>
2014-04-23[media] vb2: stop_streaming should return voidHans Verkuil
The vb2 core ignores any return code from the stop_streaming op. And there really isn't anything it can do anyway in case of an error. So change the return type to void and update any drivers that implement it. The int return gave drivers the idea that this operation could actually fail, but that's really not the case. The pwc amd sdr-msi3101 drivers both had this construction: if (mutex_lock_interruptible(&s->v4l2_lock)) return -ERESTARTSYS; This has been updated to just call mutex_lock(). The stop_streaming op expects this to really stop streaming and I very much doubt this will work reliably if stop_streaming just returns without really stopping the DMA. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-15[media] media: davinci: vpif_display: fix releasing of active buffersLad, Prabhakar
from commit-id: b3379c6201bb3555298cdbf0aa004af260f2a6a4 "vb2: only call start_streaming if sufficient buffers are queued" the vb2 framework warns on (WARN_ON()) if all the active buffers are not released when streaming is stopped, initially the vb2 silently released the buffer internally if the buffer was not released by the driver. Also this patch moves the disabling of interrupts from relase() callback to stop_streaming() callback as which needs to be done ideally. This patch fixes following issue: WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218() Modules linked in: CPU: 0 PID: 2049 Comm: vpif_display Tainted: G W 3.14.0-rc5-00414-ged97a6f #89 [<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14) [<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88) [<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24) [<c001adec>] (warn_slowpath_null) from [<c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218) [<c0252e0c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24) [<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpif_release+0x60/0x230) [<c025a65c>] (vpif_release) from [<c023fe5c>] (v4l2_release+0x34/0x74) [<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224) [<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0) [<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918) [<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc) [<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc) [<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0) [<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4) [<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20) ---[ end trace 5faa75e8c2f8a6a1 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224() Modules linked in: CPU: 0 PID: 2049 Comm: vpif_display Tainted: G W 3.14.0-rc5-00414-ged97a6f #89 [<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14) [<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88) [<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24) [<c001adec>] (warn_slowpath_null) from [<c0252c28>] (vb2_buffer_done+0x1e0/0x224) [<c0252c28>] (vb2_buffer_done) from [<c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218) [<c0252e3c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24) [<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpif_release+0x60/0x230) [<c025a65c>] (vpif_release) from [<c023fe5c>] (v4l2_release+0x34/0x74) [<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224) [<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0) [<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918) [<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc) [<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc) [<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0) [<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4) [<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20) ---[ end trace 5faa75e8c2f8a6a2 ]--- 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-03-11[media] vb2: only call start_streaming if sufficient buffers are queuedHans Verkuil
In commit 02f142ecd24aaf891324ffba8527284c1731b561 support was added to start_streaming to return -ENOBUFS if insufficient buffers were queued for the DMA engine to start. The vb2 core would attempt calling start_streaming again if another buffer would be queued up. Later analysis uncovered problems with the queue management if start_streaming would return an error: the buffers are enqueued to the driver before the start_streaming op is called, so after an error they are never returned to the vb2 core. The solution for this is to let the driver return them to the vb2 core in case of an error while starting the DMA engine. However, in the case of -ENOBUFS that would be weird: it is not a real error, it just says that more buffers are needed. Requiring start_streaming to give them back only to have them requeued again the next time the application calls QBUF is inefficient. This patch changes this mechanism: it adds a 'min_buffers_needed' field to vb2_queue that drivers can set with the minimum number of buffers required to start the DMA engine. The start_streaming op is only called if enough buffers are queued. The -ENOBUFS handling has been dropped in favor of this new method. Drivers are expected to return buffers back to vb2 core with state QUEUED if start_streaming would return an error. The vb2 core checks for this and produces a warning if that didn't happen and it will forcefully reclaim such buffers to ensure that the internal vb2 core state remains consistent and all buffer-related resources have been correctly freed and all op calls have been balanced. __reqbufs() has been updated to check that at least min_buffers_needed buffers could be allocated. If fewer buffers were allocated then __reqbufs will free what was allocated and return -ENOMEM. Based on a suggestion from Pawel Osciak. __create_bufs() doesn't do that check, since the use of __create_bufs assumes some advance scenario where the user might want more control. Instead streamon will check if enough buffers were allocated to prevent streaming with fewer than the minimum required number of buffers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-05[media] v4l: Rename vb2_queue.timestamp_type as timestamp_flagsSakari Ailus
The timestamp_type field used to contain only the timestamp type. Soon it will be used for timestamp source flags as well. Rename the field accordingly. [m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255] Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07[media] vb2: return ENOBUFS in start_streaming in case of too few buffersHans Verkuil
This works together with the retry_start_streaming mechanism to allow userspace to start streaming even if not all required buffers have been queued. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Tomasz Stanislawski <t.stanislaws@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Kamil Debski <k.debski@samsung.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-26[media] davinci: vpif_display: fix error return code in vpif_probe()Wei Yongjun
Fix to return -ENODEV in the subdevice register error handling case instead of 0, as done elsewhere in this function. Introduce by commit 4b8a531e6bb0686203e9cf82a54dfe189de7d5c2. ([media] media: davinci: vpif: display: add V4L2-async support) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] v4l2: use new V4L2_DV_BT_BLANKING/FRAME definesHans Verkuil
Use the new blanking and frame size defines. This also fixed a bug in these drivers: they assumed that the height for interlaced formats was the field height, however height is the frame height. So the height for a field is actually bt->height / 2. Signed-off-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>
2013-07-30[media] V4L: Rename subdev field of struct v4l2_async_notifierSylwester Nawrocki
This is a purely cosmetic change. Since the 'subdev' member points to an array of subdevs make it more explicit by renaming to the plural form. Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-07-26[media] media: davinci: vpif: display: add V4L2-async supportLad, Prabhakar
Add support for asynchronous subdevice probing, using the v4l2-async API. The legacy synchronous mode is still supported too, which allows to gradually update drivers and platforms. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-06-21[media] media: davinci: vpif_display: remove unnecessary loop for IRQ resourceLad, Prabhakar
For vpif display driver each IRQ resource contains a single IRQ so drop the second loop. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21[media] media: davinci: vpif_display: Convert to devm_* apiLad, Prabhakar
use devm_request_irq() instead of request_irq(). This ensures more consistent error values and simplifies error paths. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21[media] media: davinci: vpif_display: use module_platform_driver()Lad, Prabhakar
This patch uses module_platform_driver() to simplify the code. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21[media] media: davinci: vpif_display: move the freeing of irq and global ↵Lad, Prabhakar
variables to remove() Ideally the freeing of irq's and the global variables needs to be done in the remove() rather than module_exit(), this patch moves the freeing up of irq's and freeing the memory allocated to channel objects to remove() callback of struct platform_driver. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17[media] v4l2: remove g_chip_ident from bridge drivers where it is easy to do soHans Verkuil
VIDIOC_DBG_G_CHIP_IDENT has been replaced by VIDIOC_DBG_G_CHIP_INFO. Remove g_chip_ident support from bridge drivers since it is no longer needed. This patch takes care of all the trivial cases. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-27[media] vpif_display: fix error return code in vpif_probe()Wei Yongjun
Fix to return -ENODEV in the subdevice register error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] media: davinci: vpif_display: move displaying of error to ↵Lad, Prabhakar
approppraite place this patch moves the displaying out error case "VPIF IRQ request failed\n" when there is actual request_irq() fail. 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@redhat.com>
2013-05-21[media] media: davinci: vpif: remove unwanted header file inclusionLad, Prabhakar
this patch removes unwanted header file inclusion and sorts header alphabetically. 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@redhat.com>
2013-03-24[media] v4l2: add const to argument of write-only s_register ioctlHans Verkuil
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: pass std by value to the write-only s_std ioctlHans Verkuil
This ioctl is defined as IOW, so pass the argument by value instead of by reference. I could have chosen to add const instead, but this is 1) easier to handle in drivers and 2) consistent with the s_std subdev operation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] davinci: vpif: Fix module build for capture and displayLad, Prabhakar
export the symbols which are used by two modules vpif_capture and vpif_display. renamed "ch_params" to "vpif_ch_params" so as to avoid name collision. This patch fixes following error: ERROR: "ch_params" [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: "ch_params" [drivers/media/platform/davinci/vpif_capture.ko] undefined! ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_capture.ko] undefined! ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_capture.ko] undefined! make[1]: *** [__modpost] Error 1 Reported-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05[media] vb2: Add support for non monotonic timestampsKamil Debski
Not all drivers use monotonic timestamps. This patch adds a way to set the timestamp type per every queue. In addition, set proper timestamp type in drivers that I am sure that use either MONOTONIC or COPY timestamps. Other drivers will correctly report UNKNOWN timestamp type instead of assuming that all drivers use monotonic timestamps. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> 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>
2012-12-21[media] v4l: Convert drivers to use monotonic timestampsSakari Ailus
Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the monotonic timer (CLOCK_MONOTONIC). Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22[media] vpif_display: protect dma_queue by a spin_lockHans Verkuil
The dma_queue list is accessed by both the interrupt handler and by normal code. It needs to be protected by a lock to prevent possible list corruption. Corruption has been observed in 'real-life' conditions. Adding this lock made it go away. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22[media] davinci: vpif: fix return value check for vb2_dma_contig_init_ctx()Wei Yongjun
In case of error, the function vb2_dma_contig_init_ctx() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> [prabhakar.lad@ti.com: reword commit header] Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22[media] davinci: vpif_display: fix return type check for v4l2_subdev_call()Wei Yongjun
The v4l2_subdev_call() call returns -ENODEV when subdev is null and -ENOIOCTLCMD wnen no icotl is present. This patch fixes the return type check for v4l2_subdev_call(). The pattern E == C1 && E == C2 is always false. This patch fix this according to the assumption that && should be ||. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> [prabhakar.lad@ti.com: reword commit messaage] Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05[media] media: davinci: vpif: set device capabilitiesLad, Prabhakar
set device_caps and also change the driver and bus_info to proper values as per standard. Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05[media] media: davinci: vpif: Add return code check at vb2_queue_init()Lad, Prabhakar
from commit with id 896f38f582730a19eb49677105b4fe4c0270b82e it's mandatory to check the return code of vb2_queue_init(). Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05[media] media: davinci: vpif: display: separate out subdev from outputLad, Prabhakar
vpif_display relied on a 1-1 mapping of output and subdev. This is not necessarily the case. Separate the two. So there is a list of subdevs and a list of outputs. Each output refers to a subdev and has routing information. An output does not have to have a subdev. The initial output for each channel is set to the fist output. Currently missing is support for associating multiple subdevs with an output. Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05[media] vpif_display: use a v4l2_subdev pointer to call a subdevHans Verkuil
This makes it easier to have outputs without subdevs. This needs more work. The way the outputs are configured should be identical to how inputs are configured. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>