From b4d1acd7d8fa1640888f80a0f28f0d6e4cf81f1f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 23 May 2012 06:51:55 -0300 Subject: [PATCH] --- yaml --- r: 330945 b: refs/heads/master c: 5266c98b15e682694e4d79590d39416ad3bde687 h: refs/heads/master i: 330943: 0ef200a4c1073590052d95bef96919f3fd4a9690 v: v3 --- [refs] | 2 +- trunk/drivers/media/i2c/mt9p031.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index c9a6de5deed5..5cab7d5b8ad3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9ec670e2aad515bbb36c020a6ebdc707ace4f24d +refs/heads/master: 5266c98b15e682694e4d79590d39416ad3bde687 diff --git a/trunk/drivers/media/i2c/mt9p031.c b/trunk/drivers/media/i2c/mt9p031.c index 3be537ef22d2..2c0f4077c491 100644 --- a/trunk/drivers/media/i2c/mt9p031.c +++ b/trunk/drivers/media/i2c/mt9p031.c @@ -55,9 +55,9 @@ #define MT9P031_HORIZONTAL_BLANK_MIN 0 #define MT9P031_HORIZONTAL_BLANK_MAX 4095 #define MT9P031_VERTICAL_BLANK 0x06 -#define MT9P031_VERTICAL_BLANK_MIN 0 -#define MT9P031_VERTICAL_BLANK_MAX 4095 -#define MT9P031_VERTICAL_BLANK_DEF 25 +#define MT9P031_VERTICAL_BLANK_MIN 1 +#define MT9P031_VERTICAL_BLANK_MAX 4096 +#define MT9P031_VERTICAL_BLANK_DEF 26 #define MT9P031_OUTPUT_CONTROL 0x07 #define MT9P031_OUTPUT_CONTROL_CEN 2 #define MT9P031_OUTPUT_CONTROL_SYN 1 @@ -368,13 +368,13 @@ static int mt9p031_set_params(struct mt9p031 *mt9p031) /* Blanking - use minimum value for horizontal blanking and default * value for vertical blanking. */ - hblank = 346 * ybin + 64 + (80 >> max_t(unsigned int, xbin, 3)); + hblank = 346 * ybin + 64 + (80 >> min_t(unsigned int, xbin, 3)); vblank = MT9P031_VERTICAL_BLANK_DEF; - ret = mt9p031_write(client, MT9P031_HORIZONTAL_BLANK, hblank); + ret = mt9p031_write(client, MT9P031_HORIZONTAL_BLANK, hblank - 1); if (ret < 0) return ret; - ret = mt9p031_write(client, MT9P031_VERTICAL_BLANK, vblank); + ret = mt9p031_write(client, MT9P031_VERTICAL_BLANK, vblank - 1); if (ret < 0) return ret;