diff options
author | Manjunath Hadli <manjunath.hadli@ti.com> | 2012-06-29 03:20:12 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-30 19:06:55 -0300 |
commit | 6964b1036388fee258c48a911ac4a3ff4e55b62d (patch) | |
tree | 471d3d5930fa56fef4b3e7294e9670fe29425c26 /drivers/media/video/davinci/vpif_display.c | |
parent | 2401dd25c70c07dcec8d7b5497cec4a7e74d2e31 (diff) | |
download | blackbird-op-linux-6964b1036388fee258c48a911ac4a3ff4e55b62d.tar.gz blackbird-op-linux-6964b1036388fee258c48a911ac4a3ff4e55b62d.zip |
[media] davinci: vpif: add support for clipping on output data
add hardware clipping support for VPIF output data. This
is needed as it is possible that the external encoder
might get confused between the FF or 00 which are a part
of the data and that of the SAV or EAV codes.
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/davinci/vpif_display.c')
-rw-r--r-- | drivers/media/video/davinci/vpif_display.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index 787245923a20..c3e2c193dda1 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c @@ -306,6 +306,8 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) channel2_intr_assert(); channel2_intr_enable(1); enable_channel2(1); + if (vpif_config_data->ch2_clip_en) + channel2_clipping_enable(1); } if ((VPIF_CHANNEL3_VIDEO == ch->channel_id) @@ -313,6 +315,8 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) channel3_intr_assert(); channel3_intr_enable(1); enable_channel3(1); + if (vpif_config_data->ch3_clip_en) + channel3_clipping_enable(1); } channel_first_int[VPIF_VIDEO_INDEX][ch->channel_id] = 1; @@ -1140,6 +1144,8 @@ static int vpif_streamoff(struct file *file, void *priv, struct vpif_fh *fh = priv; struct channel_obj *ch = fh->channel; struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX]; + struct vpif_display_config *vpif_config_data = + vpif_dev->platform_data; if (buftype != V4L2_BUF_TYPE_VIDEO_OUTPUT) { vpif_err("buffer type not supported\n"); @@ -1159,11 +1165,15 @@ static int vpif_streamoff(struct file *file, void *priv, if (buftype == V4L2_BUF_TYPE_VIDEO_OUTPUT) { /* disable channel */ if (VPIF_CHANNEL2_VIDEO == ch->channel_id) { + if (vpif_config_data->ch2_clip_en) + channel2_clipping_enable(0); enable_channel2(0); channel2_intr_enable(0); } if ((VPIF_CHANNEL3_VIDEO == ch->channel_id) || (2 == common->started)) { + if (vpif_config_data->ch3_clip_en) + channel3_clipping_enable(0); enable_channel3(0); channel3_intr_enable(0); } |