diff options
-rw-r--r-- | drivers/media/video/cx18/cx18-av-core.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c index cf256a999bd4..aeeb3cfa3390 100644 --- a/drivers/media/video/cx18/cx18-av-core.c +++ b/drivers/media/video/cx18/cx18-av-core.c | |||
@@ -867,8 +867,22 @@ static int cx18_av_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) | |||
867 | Hsrc = (cx18_av_read(cx, 0x472) & 0x3f) << 4; | 867 | Hsrc = (cx18_av_read(cx, 0x472) & 0x3f) << 4; |
868 | Hsrc |= (cx18_av_read(cx, 0x471) & 0xf0) >> 4; | 868 | Hsrc |= (cx18_av_read(cx, 0x471) & 0xf0) >> 4; |
869 | 869 | ||
870 | Vlines = pix->height + (is_50Hz ? 4 : 7); | 870 | /* |
871 | * This adjustment reflects the excess of vactive, set in | ||
872 | * cx18_av_std_setup(), above standard values: | ||
873 | * | ||
874 | * 480 + 1 for 60 Hz systems | ||
875 | * 576 + 4 for 50 Hz systems | ||
876 | */ | ||
877 | Vlines = pix->height + (is_50Hz ? 4 : 1); | ||
871 | 878 | ||
879 | /* | ||
880 | * Invalid height and width scaling requests are: | ||
881 | * 1. width less than 1/16 of the source width | ||
882 | * 2. width greater than the source width | ||
883 | * 3. height less than 1/8 of the source height | ||
884 | * 4. height greater than the source height | ||
885 | */ | ||
872 | if ((pix->width * 16 < Hsrc) || (Hsrc < pix->width) || | 886 | if ((pix->width * 16 < Hsrc) || (Hsrc < pix->width) || |
873 | (Vlines * 8 < Vsrc) || (Vsrc < Vlines)) { | 887 | (Vlines * 8 < Vsrc) || (Vsrc < Vlines)) { |
874 | CX18_ERR_DEV(sd, "%dx%d is not a valid size!\n", | 888 | CX18_ERR_DEV(sd, "%dx%d is not a valid size!\n", |