Sylwester Nawrocki wrote:
> -----Original Message-----
> From: [email protected] [mailto:linux-media-
> [email protected]] On Behalf Of Sylwester Nawrocki
> Sent: Wednesday, December 01, 2010 11:36 PM
> To: [email protected]; [email protected]
> Cc: [email protected]; [email protected];
> [email protected]
> Subject: [RFC/PATCH 2/4] [media] s5p-fimc: Porting to videobuf 2
>
> Porting to videobuf 2 and minor cleanup.
> Separate videobuf_queue_ops are are created for m2m
> and capture video nodes.
>
> Signed-off-by: Sylwester Nawrocki <[email protected]>
> Signed-off-by: Marek Szyprowski <[email protected]>
> Signed-off-by: Kyungmin Park <[email protected]>
> ---
<snip>
Hi,
> @@ -968,6 +934,11 @@ static int fimc_m2m_streamon(struct file *file, void
*priv,
> enum v4l2_buf_type type)
> {
> struct fimc_ctx *ctx = priv;
> +
> + /* The source and target color format need to be set */
> + if (~ctx->state & (FIMC_DST_FMT | FIMC_SRC_FMT))
> + return -EINVAL;
> +
> return v4l2_m2m_streamon(file, ctx->m2m_ctx, type);
> }
You had better divide a state checking according to v4l2_buf_type to make
easier
for application to use it. For example application can have two threads
for handling m2m device. The one is for source control(OUTPUT) and
the other is for destination control(CAPTURE). If state checking is not
divided,
application should consider other thread's state whether VIDIOC_S_FMT was
called or not
before VIDIOC_STREAMON.
BRs,
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html