Commit c74e83a8 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (5670): Adding new fields to v4l2_pix_format broke the ABI, reverted that change

Reverted the change to struct v4l2_pix_format. I completely missed that
this struct was used by existing ioctls so that changing it broke the ABI.
I will have to think of another way of setting the top/left coordinates
but for now this change is reverted to preserve compatibility.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent bf57ab7a
...@@ -362,8 +362,6 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm ...@@ -362,8 +362,6 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm
case V4L2_BUF_TYPE_VIDEO_OUTPUT: case V4L2_BUF_TYPE_VIDEO_OUTPUT:
if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
return -EINVAL; return -EINVAL;
fmt->fmt.pix.left = itv->main_rect.left;
fmt->fmt.pix.top = itv->main_rect.top;
fmt->fmt.pix.width = itv->main_rect.width; fmt->fmt.pix.width = itv->main_rect.width;
fmt->fmt.pix.height = itv->main_rect.height; fmt->fmt.pix.height = itv->main_rect.height;
fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
...@@ -402,8 +400,6 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm ...@@ -402,8 +400,6 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm
break; break;
case V4L2_BUF_TYPE_VIDEO_CAPTURE: case V4L2_BUF_TYPE_VIDEO_CAPTURE:
fmt->fmt.pix.left = 0;
fmt->fmt.pix.top = 0;
fmt->fmt.pix.width = itv->params.width; fmt->fmt.pix.width = itv->params.width;
fmt->fmt.pix.height = itv->params.height; fmt->fmt.pix.height = itv->params.height;
fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
...@@ -498,15 +494,13 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype, ...@@ -498,15 +494,13 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype,
if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
return -EINVAL; return -EINVAL;
field = fmt->fmt.pix.field; field = fmt->fmt.pix.field;
r.top = fmt->fmt.pix.top; r.top = 0;
r.left = fmt->fmt.pix.left; r.left = 0;
r.width = fmt->fmt.pix.width; r.width = fmt->fmt.pix.width;
r.height = fmt->fmt.pix.height; r.height = fmt->fmt.pix.height;
ivtv_get_fmt(itv, streamtype, fmt); ivtv_get_fmt(itv, streamtype, fmt);
if (itv->output_mode != OUT_UDMA_YUV) { if (itv->output_mode != OUT_UDMA_YUV) {
/* TODO: would setting the rect also be valid for this mode? */ /* TODO: would setting the rect also be valid for this mode? */
fmt->fmt.pix.top = r.top;
fmt->fmt.pix.left = r.left;
fmt->fmt.pix.width = r.width; fmt->fmt.pix.width = r.width;
fmt->fmt.pix.height = r.height; fmt->fmt.pix.height = r.height;
} }
...@@ -1141,8 +1135,6 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void ...@@ -1141,8 +1135,6 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
fb->fmt.pixelformat = itv->osd_pixelformat; fb->fmt.pixelformat = itv->osd_pixelformat;
fb->fmt.width = itv->osd_rect.width; fb->fmt.width = itv->osd_rect.width;
fb->fmt.height = itv->osd_rect.height; fb->fmt.height = itv->osd_rect.height;
fb->fmt.left = itv->osd_rect.left;
fb->fmt.top = itv->osd_rect.top;
fb->base = (void *)itv->osd_video_pbase; fb->base = (void *)itv->osd_video_pbase;
if (itv->osd_global_alpha_state) if (itv->osd_global_alpha_state)
fb->flags |= V4L2_FBUF_FLAG_GLOBAL_ALPHA; fb->flags |= V4L2_FBUF_FLAG_GLOBAL_ALPHA;
......
...@@ -267,8 +267,6 @@ struct v4l2_pix_format ...@@ -267,8 +267,6 @@ struct v4l2_pix_format
__u32 sizeimage; __u32 sizeimage;
enum v4l2_colorspace colorspace; enum v4l2_colorspace colorspace;
__u32 priv; /* private data, depends on pixelformat */ __u32 priv; /* private data, depends on pixelformat */
__u32 left; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
__u32 top; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
}; };
/* Pixel format FOURCC depth Description */ /* Pixel format FOURCC depth Description */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment