ov8830: enlarge maximum resolution by using dummy pixels
authorTuukka Toivonen <tuukka.toivonen@intel.com>
Wed, 7 Mar 2012 11:41:31 +0000 (13:41 +0200)
committerbuildbot <buildbot@intel.com>
Mon, 12 Mar 2012 10:17:47 +0000 (03:17 -0700)
BZ: 26638

The nominal 8 Mpix resolution for ov8830 is 3264x2448. However,
the ISP is cropping some pixels away from this which makes
the maximum resolution visible to application less than the
nominal resolution. This patch increases the maximum resolution
mode for ov8830 by 16 pixels by including dummy pixels around
the active image area so that the nominal resolution is maintained
after ISP cropping.

Change-Id: I9ff9d75ebb31f972512463ca69e725ea3a9d9a4e
Signed-off-by: Tuukka Toivonen <tuukka.toivonen@intel.com>
Reviewed-on: http://android.intel.com:8080/37838
Reviewed-by: Monroy, German <german.monroy@intel.com>
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/ov8830.c
drivers/media/video/ov8830.h

index 15a1083..1534b34 100644 (file)
@@ -791,21 +791,21 @@ static const struct ov8830_reg ov8830_mode2[] = {
        { OV8830_8BIT, { 0x37de }, 0x00 },
        { OV8830_8BIT, { 0x37df }, 0x00 },
        { OV8830_8BIT, { 0x3800 }, 0x00 },
-       { OV8830_8BIT, { 0x3801 }, 0x0c },
+       { OV8830_8BIT, { 0x3801 }, 0x04 },
        { OV8830_8BIT, { 0x3802 }, 0x00 },
-       { OV8830_8BIT, { 0x3803 }, 0x0c },
+       { OV8830_8BIT, { 0x3803 }, 0x04 },
        { OV8830_8BIT, { 0x3804 }, 0x0c },
-       { OV8830_8BIT, { 0x3805 }, 0xd3 },
+       { OV8830_8BIT, { 0x3805 }, 0xdb },
        { OV8830_8BIT, { 0x3806 }, 0x09 },
-       { OV8830_8BIT, { 0x3807 }, 0xa3 },
+       { OV8830_8BIT, { 0x3807 }, 0xab },
        { OV8830_8BIT, { 0x3808 }, 0x0c },
-       { OV8830_8BIT, { 0x3809 }, 0xc0 },
+       { OV8830_8BIT, { 0x3809 }, 0xd0 },
        { OV8830_8BIT, { 0x380a }, 0x09 },
-       { OV8830_8BIT, { 0x380b }, 0x90 },
+       { OV8830_8BIT, { 0x380b }, 0xa0 },
        { OV8830_8BIT, { 0x380c }, 0x0e },
        { OV8830_8BIT, { 0x380d }, 0x18 },
-       { OV8830_8BIT, { 0x380e }, 0x09 },
-       { OV8830_8BIT, { 0x380f }, 0xb4 },
+       { OV8830_8BIT, { 0x380e }, 0x0a },
+       { OV8830_8BIT, { 0x380f }, 0x00 },
        { OV8830_8BIT, { 0x3810 }, 0x00 },
        { OV8830_8BIT, { 0x3811 }, 0x04 },
        { OV8830_8BIT, { 0x3812 }, 0x00 },
@@ -957,12 +957,12 @@ struct ov8830_resolution ov8830_res_preview[] = {
        },
        {
                .desc =        "STILL_8M_15fps"        ,
-               .width =       3264    ,
-               .height =      2448    ,
+               .width =       3280    ,
+               .height =      2464    ,
                .fps =         15      ,
                .used =        0       ,
                .pixels_per_line = 3608, /* consistent with regs arrays */
-               .lines_per_frame = 2484, /* consistent with regs arrays */
+               .lines_per_frame = 2560, /* consistent with regs arrays */
                .regs =        ov8830_mode2  ,
        },
 };
@@ -992,12 +992,12 @@ struct ov8830_resolution ov8830_res_still[] = {
        },
        {
                .desc =        "STILL_8M_15fps"        ,
-               .width =       3264    ,
-               .height =      2448    ,
+               .width =       3280    ,
+               .height =      2464    ,
                .fps =         15      ,
                .used =        0       ,
                .pixels_per_line = 3608, /* consistent with regs arrays */
-               .lines_per_frame = 2484, /* consistent with regs arrays */
+               .lines_per_frame = 2560, /* consistent with regs arrays */
                .regs =        ov8830_mode2  ,
        },
 };
@@ -1027,12 +1027,12 @@ struct ov8830_resolution ov8830_res_video[] = {
        },
        {
                .desc =        "STILL_8M_15fps"        ,
-               .width =       3264    ,
-               .height =      2448    ,
+               .width =       3280    ,
+               .height =      2464    ,
                .fps =         15      ,
                .used =        0       ,
                .pixels_per_line = 3608, /* consistent with regs arrays */
-               .lines_per_frame = 2484, /* consistent with regs arrays */
+               .lines_per_frame = 2560, /* consistent with regs arrays */
                .regs =        ov8830_mode2  ,
        },
 };
index c68bc5d..b4c4281 100644 (file)
@@ -399,7 +399,7 @@ struct ov8830_write_ctrl {
 
 #define MAX_FMTS 1
 
-#define OV8830_RES_WIDTH_MAX   3264
-#define OV8830_RES_HEIGHT_MAX  2448
+#define OV8830_RES_WIDTH_MAX   3280
+#define OV8830_RES_HEIGHT_MAX  2464
 
 #endif