From cf52df8acfda9442d64ab4d3d6085877f6d88d46 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Mon, 13 Jun 2011 11:09:40 -0300 Subject: [media] s5p-fimc: Correct color format enumeration Replace fimc_find_format() and find_mbus_format() with single function that can return a pointer to the private format description based on fourcc, media bus code or index in the table. Create separate VIDIOC_ENUM_FMT ioctl handlers for video capture and mem-to-mem video node. This is needed because some formats are valid only for the video capture and some only for the mem-to-mem video node. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/s5p-fimc/fimc-core.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/s5p-fimc/fimc-core.h') diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h index 1d2cfda5edb..f107485af7b 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.h +++ b/drivers/media/video/s5p-fimc/fimc-core.h @@ -654,9 +654,8 @@ void fimc_ctrls_delete(struct fimc_ctx *ctx); void fimc_ctrls_activate(struct fimc_ctx *ctx, bool active); int fimc_fill_format(struct fimc_frame *frame, struct v4l2_format *f); -struct fimc_fmt *find_format(struct v4l2_format *f, unsigned int mask); -struct fimc_fmt *find_mbus_format(struct v4l2_mbus_framefmt *f, - unsigned int mask); +struct fimc_fmt *fimc_find_format(u32 *pixelformat, u32 *mbus_code, + unsigned int mask, int index); int fimc_check_scaler_ratio(int sw, int sh, int dw, int dh, int rot); int fimc_set_scaler_info(struct fimc_ctx *ctx); -- cgit v1.2.3-70-g09d2