diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 10:46:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:19:02 -0400 |
commit | 4a5a5b2d620c3ec362936c4fe3799a29f8de163c (patch) | |
tree | 06ed606ad5303c3b350800c2e16d63d1d27775f2 /drivers/media | |
parent | 94896298bea7823cbccbff563c77b4ae6cabb08e (diff) |
V4L/DVB (12527): tw9910: do not lie about cropping abilities
The current tw9910 driver does not implement cropping correctly. Therefore, and
also because various rectangles in struct soc_camera_device are in user scale,
we cannot and shall not use rect_current as window location.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/tw9910.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 83596cbc9b98..735d0bd4bb10 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -719,9 +719,10 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) | |||
719 | struct i2c_client *client = sd->priv; | 719 | struct i2c_client *client = sd->priv; |
720 | struct soc_camera_device *icd = client->dev.platform_data; | 720 | struct soc_camera_device *icd = client->dev.platform_data; |
721 | struct v4l2_pix_format *pix = &f->fmt.pix; | 721 | struct v4l2_pix_format *pix = &f->fmt.pix; |
722 | /* See tw9910_set_crop() - no proper cropping support */ | ||
722 | struct v4l2_rect rect = { | 723 | struct v4l2_rect rect = { |
723 | .left = icd->rect_current.left, | 724 | .left = 0, |
724 | .top = icd->rect_current.top, | 725 | .top = 0, |
725 | .width = pix->width, | 726 | .width = pix->width, |
726 | .height = pix->height, | 727 | .height = pix->height, |
727 | }; | 728 | }; |
@@ -850,6 +851,7 @@ static struct v4l2_subdev_ops tw9910_subdev_ops = { | |||
850 | * i2c_driver function | 851 | * i2c_driver function |
851 | */ | 852 | */ |
852 | 853 | ||
854 | /* This is called during probe, so, setting rect_max is Ok here: scale == 1 */ | ||
853 | static void limit_to_scale(struct soc_camera_device *icd, | 855 | static void limit_to_scale(struct soc_camera_device *icd, |
854 | const struct tw9910_scale_ctrl *scale) | 856 | const struct tw9910_scale_ctrl *scale) |
855 | { | 857 | { |