[PATCH v2 0/2] Add resolution change event

2014-04-21 Thread Arun Kumar K
This patchset adds the resolution change event to the MFC decoder. This will be used for triggering the runtime resolution change. Changes from v1 --- - Addressed review comments from Hans and Laurent https://patchwork.kernel.org/patch/4000951/ Pawel Osciak (2): v4l: Add

[PATCH v2 2/2] [media] s5p-mfc: Add support for resolution change event

2014-04-21 Thread Arun Kumar K
From: Pawel Osciak posc...@chromium.org When a resolution change point is reached, queue an event to signal the userspace that a new set of buffers is required before decoding can continue. Signed-off-by: Pawel Osciak posc...@chromium.org Signed-off-by: Arun Kumar K arun...@samsung.com ---

[PATCH v2 1/2] v4l: Add resolution change event.

2014-04-21 Thread Arun Kumar K
From: Pawel Osciak posc...@chromium.org This event indicates that the decoder has reached a point in the stream, at which the resolution changes. The userspace is expected to provide a new set of CAPTURE buffers for the new format before decoding can continue. The event can also be used for more

Re: [PATCH v2 1/2] v4l: Add resolution change event.

2014-04-21 Thread Arun Kumar K
Hi Pawel, On Mon, Apr 21, 2014 at 2:58 PM, Pawel Osciak posc...@chromium.org wrote: Arun, I think it'd better if you attributed this patch to yourself, I'm not the author of it. I only wrote patch 2/2 in this series. Thanks, Pawel Sure I will change it. I kept your name as it was a rework

Re: [PATCH v2 1/2] v4l: Add resolution change event.

2014-04-21 Thread Laurent Pinchart
Hi Arun, Thank you for the patch. On Monday 21 April 2014 14:56:01 Arun Kumar K wrote: From: Pawel Osciak posc...@chromium.org This event indicates that the decoder has reached a point in the stream, at which the resolution changes. The userspace is expected to provide a new set of CAPTURE

Re: [PATCH v2 1/2] v4l: Add resolution change event.

2014-04-21 Thread Arun Kumar K
Hi Laurent, Thank you for the review. On Mon, Apr 21, 2014 at 3:54 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Arun, Thank you for the patch. On Monday 21 April 2014 14:56:01 Arun Kumar K wrote: From: Pawel Osciak posc...@chromium.org This event indicates that the

[PATCH v2 02/26] omap3isp: stat: Remove impossible WARN_ON

2014-04-21 Thread Laurent Pinchart
The WARN_ON statements in the buffer allocation functions try to catch conditions where buffers would have already been allocated. As the buffers are explicitly freed right before being allocated this can't happen. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com ---

[PATCH v2 01/26] omap3isp: stat: Rename IS_COHERENT_BUF to ISP_STAT_USES_DMAENGINE

2014-04-21 Thread Laurent Pinchart
The macro is meant to test whether the statistics engine uses an external DMA engine to transfer data or supports DMA directly. As both cases will be supported by DMA coherent buffers rename the macro to ISP_STAT_USES_DMAENGINE for improved clarity. Signed-off-by: Laurent Pinchart

[PATCH v2 00/26] OMAP3 ISP: Move to videobuf2

2014-04-21 Thread Laurent Pinchart
Hello, This is the second version of the patch set that ports the OMAP3 ISP driver to the videobuf2 framework. I've tried to keep patches small and reviewable (24/25 is a bit too big for my taste, but splitting it further would be pretty difficult), so please look at them for details. The

[PATCH v2 03/26] omap3isp: stat: Share common code for buffer allocation

2014-04-21 Thread Laurent Pinchart
Move code common between the isp_stat_bufs_alloc_dma() and isp_stat_bufs_alloc_iommu() functions to isp_stat_bufs_alloc(). Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispstat.c | 114 ++ 1 file changed, 54

[PATCH v2 09/26] omap3isp: video: Set the buffer bytesused field at completion time

2014-04-21 Thread Laurent Pinchart
The v4l buffer bytesused field is a value that will be returned to userspace when the buffer gets dequeued. As such it doesn't need to be set early at buffer queue time. Move the assignment to buffer completion in the omap3isp_video_buffer_next() function to prepare for the video buffers queue

[PATCH v2 07/26] omap3isp: ccdc: Use the DMA API for LSC

2014-04-21 Thread Laurent Pinchart
Replace the OMAP-specific IOMMU API usage by the DMA API for LSC. The table is now allocated using dma_alloc_coherent() and the related sg table is retrieved using dma_get_sgtable() for sync operations. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com ---

[PATCH v2 10/26] omap3isp: queue: Move IOMMU handling code to the queue

2014-04-21 Thread Laurent Pinchart
As a preparation for the switch from the OMAP IOMMU API to the DMA API move all IOMMU handling code from the video node implementation to the buffers queue implementation. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 78

[PATCH v2 06/26] omap3isp: stat: Use the DMA API

2014-04-21 Thread Laurent Pinchart
Replace the OMAP-specific IOMMU API usage by the DMA API. All buffers are now allocated using dma_alloc_coherent() and the related sg table is retrieved using dma_get_sgtable() for sync operations. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com ---

[PATCH v2 12/26] omap3isp: queue: Merge the prepare and sglist functions

2014-04-21 Thread Laurent Pinchart
In preparation for the switch to the DMA API merge the two functions that handle buffer preparation for the USERPTR cases (both page-backed and non page-backed memory). Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 169

[PATCH v2 08/26] omap3isp: ccdc: Use the DMA API for FPC

2014-04-21 Thread Laurent Pinchart
Replace the OMAP-specific IOMMU API usage by the DMA API for FPC. The table is now allocated using dma_alloc_coherent() and the related sg table is retrieved using dma_get_sgtable() for sync operations. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com ---

[PATCH v2 19/26] omap3isp: queue: Don't build scatterlist for kernel buffer

2014-04-21 Thread Laurent Pinchart
The scatterlist is not needed for those buffers, don't build it. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 24 +++- drivers/media/platform/omap3isp/ispqueue.h | 8 2 files changed, 7

[PATCH v2 11/26] omap3isp: queue: Use sg_table structure

2014-04-21 Thread Laurent Pinchart
Replace the sglen and sglist fields stored in the buffer structure with an sg_table. This allows using the sg table allocation helper function. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 108 ++---

[PATCH v2 14/26] omap3isp: queue: Allocate kernel buffers with dma_alloc_coherent

2014-04-21 Thread Laurent Pinchart
And retrieve the related sg table using dma_get_sgtable(). Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 57 +- drivers/media/platform/omap3isp/ispqueue.h | 2 ++ 2 files changed, 27 insertions(+),

[PATCH v2 04/26] omap3isp: stat: Merge dma_addr and iommu_addr fields

2014-04-21 Thread Laurent Pinchart
The fields store buffer addresses as seen from the device. The first one is used with an external DMA engine while the second one is used with the ISP DMA engine. As they're never used together, merge them. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com ---

[PATCH v2 16/26] omap3isp: queue: Map PFNMAP buffers to device

2014-04-21 Thread Laurent Pinchart
Userspace PFNMAP buffers need to be mapped to the device like the userspace non-PFNMAP buffers in order for the DMA mapping implementation to create IOMMU mappings when we'll switch to the IOMMU-aware DMA mapping backend. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com ---

[PATCH v2 18/26] omap3isp: Use the ARM DMA IOMMU-aware operations

2014-04-21 Thread Laurent Pinchart
Attach an ARM DMA I/O virtual address space to the ISP device. This switches to the IOMMU-aware ARM DMA backend, we can thus remove the explicit calls to the OMAP IOMMU map and unmap functions. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/Kconfig

[PATCH v2 22/26] omap3isp: Move buffer irqlist to isp_buffer structure

2014-04-21 Thread Laurent Pinchart
This prepares for the move to videobuf2. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.h | 2 -- drivers/media/platform/omap3isp/ispvideo.c | 39 +++--- drivers/media/platform/omap3isp/ispvideo.h | 2 ++ 3

[PATCH v2 20/26] omap3isp: Move queue mutex to isp_video structure

2014-04-21 Thread Laurent Pinchart
This prepares for the move to videobuf2. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 102 - drivers/media/platform/omap3isp/ispqueue.h | 2 - drivers/media/platform/omap3isp/ispvideo.c | 72

[PATCH v2 23/26] omap3isp: Cancel all queued buffers when stopping the video stream

2014-04-21 Thread Laurent Pinchart
When stopping a video stream the driver waits for ongoing DMA opeations to complete for the currently active buffer, but doesn't release the non-active queued buffers. This isn't a problem in most cases as the video device is usually closed after the stream is stopped, which will release all the

[PATCH v2 17/26] omap3isp: queue: Use sg_alloc_table_from_pages()

2014-04-21 Thread Laurent Pinchart
Replace the custom implementation with a call to the scatterlist helper function. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git

[PATCH v2 26/26] omap3isp: Rename isp_buffer isp_addr field to dma

2014-04-21 Thread Laurent Pinchart
Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispccdc.c| 4 ++-- drivers/media/platform/omap3isp/ispccp2.c| 4 ++-- drivers/media/platform/omap3isp/ispcsi2.c| 4 ++-- drivers/media/platform/omap3isp/isppreview.c | 8

[PATCH v2 05/26] omap3isp: stat: Store sg table in ispstat_buffer

2014-04-21 Thread Laurent Pinchart
The driver stores the IOMMU mapped iovm struct pointer in the buffer structure but only needs the iovm sg table. Store the sg table instead to prepare the migration to the DMA API. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispstat.c |

[PATCH v2 13/26] omap3isp: queue: Inline the ispmmu_v(un)map functions

2014-04-21 Thread Laurent Pinchart
The ispmmu_vmap() and ispmmu_vunmap() functions are just wrappers around omap_iommu_vmap() and omap_iommu_vunmap(). Inline them. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 36 -- 1 file changed, 4

[PATCH v2 24/26] v4l: vb2: Add a function to discard all DONE buffers

2014-04-21 Thread Laurent Pinchart
When suspending a device while a video stream is active all buffers marked as done but not dequeued yet will be kept across suspend and given back to userspace after resume. This will result in outdated buffers being dequeued. Introduce a new vb2 function to mark all done buffers as erroneous

[PATCH v2 15/26] omap3isp: queue: Fix the dma_map_sg() return value check

2014-04-21 Thread Laurent Pinchart
dma_map_sg() can merge sglist entries, and can thus return a number of mapped entries different than the original value. Don't consider this as an error. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispqueue.c | 2 +- 1 file changed, 1

[PATCH v2 21/26] omap3isp: Move queue irqlock to isp_video structure

2014-04-21 Thread Laurent Pinchart
This prepares for the move to videobuf2. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/isp.c | 6 +++--- drivers/media/platform/omap3isp/ispqueue.c | 13 + drivers/media/platform/omap3isp/ispqueue.h | 5 +

[PATCH v2 25/26] omap3isp: Move to videobuf2

2014-04-21 Thread Laurent Pinchart
Replace the custom buffers queue implementation with a videobuf2 queue. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/Makefile |2 +- drivers/media/platform/omap3isp/ispqueue.c | 1031

[Bugreport] v4l-utils/libv4lconvert/ov511-decomp does not shutdown on SIGTERM

2014-04-21 Thread Andrey Volkov
Guys, I use motion for my old web camera (v4l1) with export LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so v4l2convert.so run decompress helper ov511-decomp. Processes look like: /usr/bin/motion \_ /usr/lib/i386-linux-gnu/libv4lconvert0/ov511-decomp (motion -

[PATCH 2/2] omap4iss: Relax usleep ranges

2014-04-21 Thread Laurent Pinchart
Allow the system to merge CPU wakeups by specifying different minimum and maximum usleep values. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/staging/media/omap4iss/iss.c | 2 +- drivers/staging/media/omap4iss/iss_csi2.c | 4 ++-- 2 files changed, 3

[PATCH 1/2] omap4iss: Use a common macro for all sleep-based poll loops

2014-04-21 Thread Laurent Pinchart
Instead of implementing usleep_range-based poll loops manually (and slightly differently), create a generic iss_poll_wait_timeout() macro and use it through the driver. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/staging/media/omap4iss/iss.c | 46

Re: [PATCH] v4l: subdev: Move [gs]_std operation to video ops

2014-04-21 Thread Laurent Pinchart
Hans, Guennadi, Could you please review this patch ? I'd like to get it in v3.16. On Tuesday 11 March 2014 11:14:38 Laurent Pinchart wrote: The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart

Re: [Bugreport] v4l-utils/libv4lconvert/ov511-decomp does not shutdown on SIGTERM

2014-04-21 Thread Hans de Goede
Hi, Thanks for the bug report. I must say I don't really like the suggested fix. Can you try removing the kill altogether and moving the 2 close calls to above the waitpid call and see if that helps, I think that is a cleaner solution. Thanks Regards, Hans On 04/21/2014 03:11 PM, Andrey

Re: [PATCH v2 1/2] v4l: Add resolution change event.

2014-04-21 Thread Laurent Pinchart
Hi Arun, On Monday 21 April 2014 17:19:26 Arun Kumar K wrote: On Mon, Apr 21, 2014 at 3:54 PM, Laurent Pinchart wrote: On Monday 21 April 2014 14:56:01 Arun Kumar K wrote: From: Pawel Osciak posc...@chromium.org This event indicates that the decoder has reached a point in the stream,

cron job: media_tree daily build: WARNINGS

2014-04-21 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Tue Apr 22 04:00:15 CEST 2014 git branch: test git hash: 701b57ee3387b8e3749845b02310b5625fbd8da0 gcc