diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2011-08-24 19:35:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-06 16:48:45 -0400 |
commit | 237e026559b7cd03fc575b6007cea11aef9e0aa6 (patch) | |
tree | 0d810b1d4a52973c497682fec2c9b817ecfca19e /drivers/media/video/s5p-fimc/fimc-reg.c | |
parent | 4db5e27ed9401a635b3c10994f2971c0441e3c90 (diff) |
[media] s5p-fimc: Add subdev for the FIMC processing block
Add a subdev to expose the host's scaling and composition functions.
The camera frame composition onto an output buffer may be configured
through set/get_crop at FIMC.{n} source pad.
Additionally allow crop, composition and controls to be modified
during streaming. Make sure the default format is set when opening
the video capture node.
Rename struct fimc_vid_cap::fmt to more relevant 'mf' to avoid
confusion.
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>
Diffstat (limited to 'drivers/media/video/s5p-fimc/fimc-reg.c')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-reg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/video/s5p-fimc/fimc-reg.c index 50937b40854f..a1fff022c5b4 100644 --- a/drivers/media/video/s5p-fimc/fimc-reg.c +++ b/drivers/media/video/s5p-fimc/fimc-reg.c | |||
@@ -572,7 +572,7 @@ int fimc_hw_set_camera_source(struct fimc_dev *fimc, | |||
572 | 572 | ||
573 | if (cam->bus_type == FIMC_ITU_601 || cam->bus_type == FIMC_ITU_656) { | 573 | if (cam->bus_type == FIMC_ITU_601 || cam->bus_type == FIMC_ITU_656) { |
574 | for (i = 0; i < ARRAY_SIZE(pix_desc); i++) { | 574 | for (i = 0; i < ARRAY_SIZE(pix_desc); i++) { |
575 | if (fimc->vid_cap.fmt.code == pix_desc[i].pixelcode) { | 575 | if (fimc->vid_cap.mf.code == pix_desc[i].pixelcode) { |
576 | cfg = pix_desc[i].cisrcfmt; | 576 | cfg = pix_desc[i].cisrcfmt; |
577 | bus_width = pix_desc[i].bus_width; | 577 | bus_width = pix_desc[i].bus_width; |
578 | break; | 578 | break; |
@@ -582,7 +582,7 @@ int fimc_hw_set_camera_source(struct fimc_dev *fimc, | |||
582 | if (i == ARRAY_SIZE(pix_desc)) { | 582 | if (i == ARRAY_SIZE(pix_desc)) { |
583 | v4l2_err(fimc->vid_cap.vfd, | 583 | v4l2_err(fimc->vid_cap.vfd, |
584 | "Camera color format not supported: %d\n", | 584 | "Camera color format not supported: %d\n", |
585 | fimc->vid_cap.fmt.code); | 585 | fimc->vid_cap.mf.code); |
586 | return -EINVAL; | 586 | return -EINVAL; |
587 | } | 587 | } |
588 | 588 | ||
@@ -642,12 +642,12 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc, | |||
642 | cfg |= S5P_CIGCTRL_SELCAM_MIPI_A; | 642 | cfg |= S5P_CIGCTRL_SELCAM_MIPI_A; |
643 | 643 | ||
644 | /* TODO: add remaining supported formats. */ | 644 | /* TODO: add remaining supported formats. */ |
645 | if (vid_cap->fmt.code == V4L2_MBUS_FMT_VYUY8_2X8) { | 645 | if (vid_cap->mf.code == V4L2_MBUS_FMT_VYUY8_2X8) { |
646 | tmp = S5P_CSIIMGFMT_YCBCR422_8BIT; | 646 | tmp = S5P_CSIIMGFMT_YCBCR422_8BIT; |
647 | } else { | 647 | } else { |
648 | v4l2_err(fimc->vid_cap.vfd, | 648 | v4l2_err(fimc->vid_cap.vfd, |
649 | "Not supported camera pixel format: %d", | 649 | "Not supported camera pixel format: %d", |
650 | vid_cap->fmt.code); | 650 | vid_cap->mf.code); |
651 | return -EINVAL; | 651 | return -EINVAL; |
652 | } | 652 | } |
653 | tmp |= (cam->csi_data_align == 32) << 8; | 653 | tmp |= (cam->csi_data_align == 32) << 8; |