Upstream patches for Samsung Exynos s5p-mfc and gsc-m2m

2014-03-11 Thread John Sheu
This patchset upstreams some changes carried in the ChromeOS kernel tree especially regarding the s5p-mfc video encoder and gsc-m2m color converter hardware functionality. Patch 4 in particular affects the V4L2 interface by allowing VIDIOC_REQBUFS(0) to succeed when the queue is of type V4L2_MEMOR

[PATCH 4/4] v4l2-mem2mem: allow reqbufs(0) with "in use" MMAP buffers

2014-03-11 Thread John Sheu
k lifetime appropriately. Remove the specific check for type V4L2_MEMOMRY_MMAP when freeing all buffers through VIDIOC_REQBUFS. Signed-off-by: John Sheu --- drivers/media/v4l2-core/videobuf2-core.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/

[PATCH 2/4] CHROMIUM: s5p-mfc: support dynamic encoding parameter changes

2014-03-11 Thread John Sheu
(V4L2_CID_MPEG_VIDEO_BITRATE) * (h264) frame type (V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE) Signed-off-by: John Sheu --- drivers/media/platform/s5p-mfc/regs-mfc-v6.h| 4 ++ drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 31 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c| 53

[PATCH 1/4] s5p-mfc: fix encoder crash after VIDIOC_STREAMOFF

2014-03-11 Thread John Sheu
VIDIOC_STREAMOFF clears the encoder's destination queue -- routines run from the interrupt handler cannot assume that the queue is non-empty. Signed-off-by: John Sheu --- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 20 +++- 1 file changed, 11 insertions(+), 9 dele

[PATCH 3/4] gsc-m2m: report correct format bytesperline and sizeimage

2014-03-11 Thread John Sheu
Explicitly specify sampling period for subsampled chroma formats, so stride and image size are properly reported through VIDIOC_{S,G}_FMT. Signed-off-by: John Sheu --- drivers/media/platform/exynos-gsc/gsc-core.c | 154 +++ drivers/media/platform/exynos-gsc/gsc-core.h

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread John Sheu
On Thu, Oct 17, 2013 at 3:54 PM, Sylwester Nawrocki wrote: > On 10/18/2013 12:25 AM, John Sheu wrote: >> On Thu, Oct 17, 2013 at 2:46 PM, John Sheu wrote: >>> > Sweet. Thanks for spelling things out explicitly like this. The fact >>> > that the CAPTURE and O

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread John Sheu
On Thu, Oct 17, 2013 at 2:46 PM, John Sheu wrote: > Sweet. Thanks for spelling things out explicitly like this. The fact > that the CAPTURE and OUTPUT queues "invert" their sense of "crop-ness" > when used in a m2m device is definitely all sorts of confusing. Jus

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-17 Thread John Sheu
t the CAPTURE and OUTPUT queues "invert" their sense of "crop-ness" when used in a m2m device is definitely all sorts of confusing. I'll have an updated patch shortly. -John Sheu -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of

Re: Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-12 Thread John Sheu
AM, John Sheu wrote: >> On Wed, Oct 9, 2013 at 11:49 PM, Hans Verkuil wrote: >> In all cases, the crop boundary refers to the area in the source >> image; for a CAPTURE device, this is the (presumably analog) sensor, > > Correct. > >> and for an OUTPUT device, this

Fwd: [PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-11 Thread John Sheu
same operation; cropping on the sink image, i.e. whatever memory buffer I'm providing to the CAPTURE queue. Not sure what you mean by "S_CROP on an output video node doesn't crop, it composes", though. Thanks, -John Sheu -- To unsubscribe from this list: send the line "

[PATCH 1/6] [media] s5p-mfc: fix DISPLAY_DELAY

2013-10-09 Thread John Sheu
V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE is being ignored, and the display delay is always being applied. Fix this. Signed-off-by: John Sheu --- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 0/6] Exynos video fixes from ChromeOS

2013-10-09 Thread John Sheu
These are various video processing driver fixes for the s5p-mfc and gsc-m2m hardware blocks on the Samsung Exynos (ARM) platform, that have been carried in the ChromeOS kernel tree for a while and should be pushed upstream. John Sheu (6): [media] s5p-mfc: fix DISPLAY_DELAY [media] s5p-mfc

[PATCH 3/6] [media] s5p-mfc: add support for VIDIOC_{G,S}_CROP to encoder

2013-10-09 Thread John Sheu
Allow userspace to set the crop rect of the input image buffer to encode. Signed-off-by: John Sheu --- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 6 ++- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c| 7 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c| 54

[PATCH 5/6] [media] gsc-m2m: report correct format bytesperline and sizeimage

2013-10-09 Thread John Sheu
Explicitly specify sampling period for subsampled chroma formats, so stride and image size are properly reported through VIDIOC_{S,G}_FMT. Signed-off-by: John Sheu --- drivers/media/platform/exynos-gsc/gsc-core.c | 154 +++ drivers/media/platform/exynos-gsc/gsc-core.h

[PATCH 4/6] [media] s5p-mfc: support dynamic encoding parameter changes

2013-10-09 Thread John Sheu
(V4L2_CID_MPEG_VIDEO_BITRATE) * (h264) frame type (V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE) Signed-off-by: John Sheu --- drivers/media/platform/s5p-mfc/regs-mfc-v6.h| 4 ++ drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 32 +++-- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c| 53

[PATCH 6/6] [media] v4l2-mem2mem: allow reqbufs(0) with "in use" MMAP buffers

2013-10-09 Thread John Sheu
k lifetime appropriately. Remove the specific check for type V4L2_MEMOMRY_MMAP when freeing all buffers through VIDIOC_REQBUFS. Signed-off-by: John Sheu --- drivers/media/v4l2-core/videobuf2-core.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/

[PATCH 2/6] [media] s5p-mfc: fix encoder crash after VIDIOC_STREAMOFF

2013-10-09 Thread John Sheu
VIDIOC_STREAMOFF clears the encoder's destination queue -- routines run from the interrupt handler cannot assume that the queue is non-empty. Signed-off-by: John Sheu --- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 20 +++- 1 file changed, 11 insertions(+), 9 dele

[PATCH 2/2] [media] s5p-mfc: Fix input/output format reporting

2013-05-30 Thread John Sheu
From: John Sheu The video encode/decode paths have duplicated logic between VIDIOC_TRY_FMT and VIDIOC_S_FMT that should be de-duped. Also, video decode reports V4L2_PIX_FMT_NV12MT_16X16 output format, regardless of what the actual output has been set at. Fix this. Signed-off-by: John Sheu

[PATCH] [media] v4l2: mem2mem: save irq flags correctly

2013-05-23 Thread John Sheu
Save flags correctly when taking spinlocks in v4l2_m2m_try_schedule. Signed-off-by: John Sheu --- drivers/media/v4l2-core/v4l2-mem2mem.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core

NACK: [PATCH] [media] s5p-mfc: Modify encoder buffer alloc sequence

2013-03-20 Thread John Sheu
Arun Kumar K samsung.com> writes: > MFC v6 needs minimum number of capture buffers to be queued > for encoder depending on the stream type and profile. > For achieving this the sequence for allocating buffers at > the encoder is modified similar to that of decoder. > The new sequence is as follow

[PATCH] CHROMIUM: dma-buf: restore args on failure of dma_buf_mmap

2013-02-11 Thread sheu
From: John Sheu Callers to dma_buf_mmap expect to fput() the vma struct's vm_file themselves on failure. Not restoring the struct's data on failure causes a double-decrement of the vm_file's refcount. Signed-off-by: John Sheu --- drivers/base/dma-buf.c | 21 +++

[PATCH 2/3] [media]: v4l2-mem2mem: drop rdy_queue on STREAMOFF

2013-02-06 Thread John Sheu
From: John Sheu When a v4l2-mem2mem context gets a STREAMOFF call on either its CAPTURE or OUTPUT queues, we should: * Drop the corresponding rdy_queue, since a subsequent STREAMON expects an empty queue. * Deschedule the context, as it now has at least one empty queue and cannot run

[PATCH 3/3] dma-buf: restore args on failure of dma_buf_mmap

2013-02-06 Thread John Sheu
From: John Sheu Callers to dma_buf_mmap expect to fput() the vma struct's vm_file themselves on failure. Not restoring the struct's data on failure causes a double-decrement of the vm_file's refcount. Signed-off-by: John Sheu --- drivers/base/dma-buf.c | 18 ++

[PATCH 1/3] [media] v4l2-mem2mem: use CAPTURE queue lock

2013-02-06 Thread John Sheu
From: John Sheu In v4l2_m2m_try_schedule(), use the CAPTURE queue lock when accessing the CAPTURE queue, instead of relying on just holding the OUTPUT queue lock. Signed-off-by: John Sheu --- drivers/media/v4l2-core/v4l2-mem2mem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers