Skip to content

Commit

Permalink
[media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads
Browse files Browse the repository at this point in the history
Ensure there is a valid initial resolution and pixel format set
at the FIMC-IS-ISP subdev pads.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Jun 28, 2013
1 parent 5cfaad6 commit 9494573
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/media/platform/exynos4-is/fimc-isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,22 @@ static const struct v4l2_ctrl_ops fimc_isp_ctrl_ops = {
.s_ctrl = fimc_is_s_ctrl,
};

static void __isp_subdev_set_default_format(struct fimc_isp *isp)
{
struct fimc_is *is = fimc_isp_to_is(isp);

isp->sink_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH +
FIMC_ISP_CAC_MARGIN_WIDTH;
isp->sink_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT +
FIMC_ISP_CAC_MARGIN_HEIGHT;
isp->sink_fmt.code = V4L2_MBUS_FMT_SGRBG10_1X10;

isp->src_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH;
isp->src_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT;
isp->src_fmt.code = V4L2_MBUS_FMT_SGRBG10_1X10;
__is_set_frame_size(is, &isp->src_fmt);
}

int fimc_isp_subdev_create(struct fimc_isp *isp)
{
const struct v4l2_ctrl_ops *ops = &fimc_isp_ctrl_ops;
Expand Down Expand Up @@ -725,6 +741,8 @@ int fimc_isp_subdev_create(struct fimc_isp *isp)
sd->entity.ops = &fimc_is_subdev_media_ops;
v4l2_set_subdevdata(sd, isp);

__isp_subdev_set_default_format(isp);

return 0;
}

Expand Down

0 comments on commit 9494573

Please sign in to comment.