diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 10:46:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:18:56 -0400 |
commit | 123ab622c075e2252b46565c81dbf5c0748a82af (patch) | |
tree | 6bf10c1fbd0b47ff12d53b18778ed948fed1bd73 /drivers/media/video/tw9910.c | |
parent | 904078f16fab80ed1f6adf7f6a0bd166d6b58d07 (diff) |
V4L/DVB (12523): tw9910: return updated geometry on successful S_FMT and S_CROP
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tw9910.c')
-rw-r--r-- | drivers/media/video/tw9910.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 7199e0f71b2a..83596cbc9b98 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -699,6 +699,11 @@ static int tw9910_set_crop(struct soc_camera_device *icd, | |||
699 | if (ret < 0) | 699 | if (ret < 0) |
700 | goto tw9910_set_fmt_error; | 700 | goto tw9910_set_fmt_error; |
701 | 701 | ||
702 | rect->width = priv->scale->width; | ||
703 | rect->height = priv->scale->height; | ||
704 | rect->left = 0; | ||
705 | rect->top = 0; | ||
706 | |||
702 | return ret; | 707 | return ret; |
703 | 708 | ||
704 | tw9910_set_fmt_error: | 709 | tw9910_set_fmt_error: |
@@ -720,7 +725,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) | |||
720 | .width = pix->width, | 725 | .width = pix->width, |
721 | .height = pix->height, | 726 | .height = pix->height, |
722 | }; | 727 | }; |
723 | int i; | 728 | int i, ret; |
724 | 729 | ||
725 | /* | 730 | /* |
726 | * check color format | 731 | * check color format |
@@ -732,7 +737,12 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) | |||
732 | if (i == ARRAY_SIZE(tw9910_color_fmt)) | 737 | if (i == ARRAY_SIZE(tw9910_color_fmt)) |
733 | return -EINVAL; | 738 | return -EINVAL; |
734 | 739 | ||
735 | return tw9910_set_crop(icd, &rect); | 740 | ret = tw9910_set_crop(icd, &rect); |
741 | if (!ret) { | ||
742 | pix->width = rect.width; | ||
743 | pix->height = rect.height; | ||
744 | } | ||
745 | return ret; | ||
736 | } | 746 | } |
737 | 747 | ||
738 | static int tw9910_try_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) | 748 | static int tw9910_try_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) |