summaryrefslogtreecommitdiff
path: root/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-01 14:06:44 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 17:57:51 (GMT)
commit5da545ad08a3c6ea71d3ba074adc7582e7e9a024 (patch)
tree2a3f5a859822518184a4507a60fbaccbab486611 /drivers/media/common/saa7146_fops.c
parent4894b709d14c593466cc05e55ee493af931205e8 (diff)
downloadlinux-fsl-qoriq-5da545ad08a3c6ea71d3ba074adc7582e7e9a024.tar.xz
[media] saa7146: move overlay information from saa7146_fh into saa7146_vv
This is global information, not per-filehandle information. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r--drivers/media/common/saa7146_fops.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index f14e218..68047c9 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -436,6 +436,7 @@ static const struct v4l2_ctrl_ops saa7146_ctrl_ops = {
int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
{
struct v4l2_ctrl_handler *hdl = &dev->ctrl_handler;
+ struct v4l2_pix_format *fmt;
struct saa7146_vv *vv;
int err;
@@ -496,6 +497,15 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
saa7146_vbi_uops.init(dev,vv);
+ fmt = &vv->ov_fb.fmt;
+ fmt->width = vv->standard->h_max_out;
+ fmt->height = vv->standard->v_max_out;
+ fmt->pixelformat = V4L2_PIX_FMT_RGB565;
+ fmt->bytesperline = 2 * fmt->width;
+ fmt->sizeimage = fmt->bytesperline * fmt->height;
+ fmt->colorspace = V4L2_COLORSPACE_SRGB;
+ vv->ov_fb.capability = V4L2_FBUF_CAP_LIST_CLIPPING;
+ vv->ov_fb.flags = V4L2_FBUF_FLAG_PRIMARY;
dev->vv_data = vv;
dev->vv_callback = &vv_callback;