diff options
Diffstat (limited to 'drivers/media/video/s5p-fimc/fimc-capture.c')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 2cc3b916672..510cfab477f 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -63,6 +63,8 @@ static int fimc_init_capture(struct fimc_dev *fimc) | |||
63 | fimc_hw_set_effect(ctx, false); | 63 | fimc_hw_set_effect(ctx, false); |
64 | fimc_hw_set_output_path(ctx); | 64 | fimc_hw_set_output_path(ctx); |
65 | fimc_hw_set_out_dma(ctx); | 65 | fimc_hw_set_out_dma(ctx); |
66 | if (fimc->variant->has_alpha) | ||
67 | fimc_hw_set_rgb_alpha(ctx); | ||
66 | clear_bit(ST_CAPT_APPLY_CFG, &fimc->state); | 68 | clear_bit(ST_CAPT_APPLY_CFG, &fimc->state); |
67 | } | 69 | } |
68 | spin_unlock_irqrestore(&fimc->slock, flags); | 70 | spin_unlock_irqrestore(&fimc->slock, flags); |
@@ -154,6 +156,8 @@ int fimc_capture_config_update(struct fimc_ctx *ctx) | |||
154 | fimc_hw_set_rotation(ctx); | 156 | fimc_hw_set_rotation(ctx); |
155 | fimc_prepare_dma_offset(ctx, &ctx->d_frame); | 157 | fimc_prepare_dma_offset(ctx, &ctx->d_frame); |
156 | fimc_hw_set_out_dma(ctx); | 158 | fimc_hw_set_out_dma(ctx); |
159 | if (fimc->variant->has_alpha) | ||
160 | fimc_hw_set_rgb_alpha(ctx); | ||
157 | clear_bit(ST_CAPT_APPLY_CFG, &fimc->state); | 161 | clear_bit(ST_CAPT_APPLY_CFG, &fimc->state); |
158 | } | 162 | } |
159 | spin_unlock(&ctx->slock); | 163 | spin_unlock(&ctx->slock); |
@@ -812,6 +816,10 @@ static int fimc_capture_set_format(struct fimc_dev *fimc, struct v4l2_format *f) | |||
812 | FIMC_SD_PAD_SOURCE); | 816 | FIMC_SD_PAD_SOURCE); |
813 | if (!ff->fmt) | 817 | if (!ff->fmt) |
814 | return -EINVAL; | 818 | return -EINVAL; |
819 | |||
820 | /* Update RGB Alpha control state and value range */ | ||
821 | fimc_alpha_ctrl_update(ctx); | ||
822 | |||
815 | /* Try to match format at the host and the sensor */ | 823 | /* Try to match format at the host and the sensor */ |
816 | if (!fimc->vid_cap.user_subdev_api) { | 824 | if (!fimc->vid_cap.user_subdev_api) { |
817 | mf->code = ff->fmt->mbus_code; | 825 | mf->code = ff->fmt->mbus_code; |
@@ -1235,6 +1243,9 @@ static int fimc_subdev_set_fmt(struct v4l2_subdev *sd, | |||
1235 | *mf = fmt->format; | 1243 | *mf = fmt->format; |
1236 | return 0; | 1244 | return 0; |
1237 | } | 1245 | } |
1246 | /* Update RGB Alpha control state and value range */ | ||
1247 | fimc_alpha_ctrl_update(ctx); | ||
1248 | |||
1238 | fimc_capture_mark_jpeg_xfer(ctx, fimc_fmt_is_jpeg(ffmt->color)); | 1249 | fimc_capture_mark_jpeg_xfer(ctx, fimc_fmt_is_jpeg(ffmt->color)); |
1239 | 1250 | ||
1240 | ff = fmt->pad == FIMC_SD_PAD_SINK ? | 1251 | ff = fmt->pad == FIMC_SD_PAD_SINK ? |