aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/i2c/mt9p031.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
index 3be537ef22d2..2c0f4077c491 100644
--- a/drivers/media/i2c/mt9p031.c
+++ b/drivers/media/i2c/mt9p031.c
@@ -55,9 +55,9 @@
55#define MT9P031_HORIZONTAL_BLANK_MIN 0 55#define MT9P031_HORIZONTAL_BLANK_MIN 0
56#define MT9P031_HORIZONTAL_BLANK_MAX 4095 56#define MT9P031_HORIZONTAL_BLANK_MAX 4095
57#define MT9P031_VERTICAL_BLANK 0x06 57#define MT9P031_VERTICAL_BLANK 0x06
58#define MT9P031_VERTICAL_BLANK_MIN 0 58#define MT9P031_VERTICAL_BLANK_MIN 1
59#define MT9P031_VERTICAL_BLANK_MAX 4095 59#define MT9P031_VERTICAL_BLANK_MAX 4096
60#define MT9P031_VERTICAL_BLANK_DEF 25 60#define MT9P031_VERTICAL_BLANK_DEF 26
61#define MT9P031_OUTPUT_CONTROL 0x07 61#define MT9P031_OUTPUT_CONTROL 0x07
62#define MT9P031_OUTPUT_CONTROL_CEN 2 62#define MT9P031_OUTPUT_CONTROL_CEN 2
63#define MT9P031_OUTPUT_CONTROL_SYN 1 63#define MT9P031_OUTPUT_CONTROL_SYN 1
@@ -368,13 +368,13 @@ static int mt9p031_set_params(struct mt9p031 *mt9p031)
368 /* Blanking - use minimum value for horizontal blanking and default 368 /* Blanking - use minimum value for horizontal blanking and default
369 * value for vertical blanking. 369 * value for vertical blanking.
370 */ 370 */
371 hblank = 346 * ybin + 64 + (80 >> max_t(unsigned int, xbin, 3)); 371 hblank = 346 * ybin + 64 + (80 >> min_t(unsigned int, xbin, 3));
372 vblank = MT9P031_VERTICAL_BLANK_DEF; 372 vblank = MT9P031_VERTICAL_BLANK_DEF;
373 373
374 ret = mt9p031_write(client, MT9P031_HORIZONTAL_BLANK, hblank); 374 ret = mt9p031_write(client, MT9P031_HORIZONTAL_BLANK, hblank - 1);
375 if (ret < 0) 375 if (ret < 0)
376 return ret; 376 return ret;
377 ret = mt9p031_write(client, MT9P031_VERTICAL_BLANK, vblank); 377 ret = mt9p031_write(client, MT9P031_VERTICAL_BLANK, vblank - 1);
378 if (ret < 0) 378 if (ret < 0)
379 return ret; 379 return ret;
380 380