From patchwork Fri Aug 25 04:20:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chiranjeevi Rapolu X-Patchwork-Id: 9921223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0A3B2602BD for ; Fri, 25 Aug 2017 04:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE89C223C6 for ; Fri, 25 Aug 2017 04:22:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E24DD22AFC; Fri, 25 Aug 2017 04:22:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65AFE223C6 for ; Fri, 25 Aug 2017 04:22:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751453AbdHYEWf (ORCPT ); Fri, 25 Aug 2017 00:22:35 -0400 Received: from mga01.intel.com ([192.55.52.88]:18120 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbdHYEWf (ORCPT ); Fri, 25 Aug 2017 00:22:35 -0400 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Aug 2017 21:22:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,424,1498546800"; d="scan'208";a="143737336" Received: from crapolu-desk.sc.intel.com ([10.3.62.62]) by fmsmga005.fm.intel.com with ESMTP; 24 Aug 2017 21:22:34 -0700 From: Chiranjeevi Rapolu To: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com Cc: tfiga@chromium.org, jian.xu.zheng@intel.com, tian.shu.qiu@intel.com, rajmohan.mani@intel.com, hyungwoo.yang@intel.com, Chiranjeevi Rapolu Subject: [PATCH v1] media: ov5670: Use recommended black level and output bias Date: Thu, 24 Aug 2017 21:20:55 -0700 Message-Id: <1503634855-5740-1-git-send-email-chiranjeevi.rapolu@intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Previously, images were relatively darker due to non-optimal settings for black target level and bias. Now, use recommended settings for black target level and output bias as default values. The same default settings apply to all the resolutions. Given these recommeneded settings do not change dynamically, add these to existing mode register settings. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov5670.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 6f7a1d6..759ca62 100644 --- a/drivers/media/i2c/ov5670.c +++ b/drivers/media/i2c/ov5670.c @@ -390,7 +390,10 @@ struct ov5670_mode { {0x5792, 0x00}, {0x5793, 0x52}, {0x5794, 0xa3}, - {0x3503, 0x00} + {0x3503, 0x00}, + {0x5045, 0x05}, + {0x4003, 0x40}, + {0x5048, 0x40} }; static const struct ov5670_reg mode_1296x972_regs[] = { @@ -653,7 +656,10 @@ struct ov5670_mode { {0x5792, 0x00}, {0x5793, 0x52}, {0x5794, 0xa3}, - {0x3503, 0x00} + {0x3503, 0x00}, + {0x5045, 0x05}, + {0x4003, 0x40}, + {0x5048, 0x40} }; static const struct ov5670_reg mode_648x486_regs[] = { @@ -916,7 +922,10 @@ struct ov5670_mode { {0x5792, 0x00}, {0x5793, 0x52}, {0x5794, 0xa3}, - {0x3503, 0x00} + {0x3503, 0x00}, + {0x5045, 0x05}, + {0x4003, 0x40}, + {0x5048, 0x40} }; static const struct ov5670_reg mode_2560x1440_regs[] = { @@ -1178,7 +1187,10 @@ struct ov5670_mode { {0x5791, 0x06}, {0x5792, 0x00}, {0x5793, 0x52}, - {0x5794, 0xa3} + {0x5794, 0xa3}, + {0x5045, 0x05}, + {0x4003, 0x40}, + {0x5048, 0x40} }; static const struct ov5670_reg mode_1280x720_regs[] = { @@ -1441,7 +1453,10 @@ struct ov5670_mode { {0x5792, 0x00}, {0x5793, 0x52}, {0x5794, 0xa3}, - {0x3503, 0x00} + {0x3503, 0x00}, + {0x5045, 0x05}, + {0x4003, 0x40}, + {0x5048, 0x40} }; static const struct ov5670_reg mode_640x360_regs[] = { @@ -1704,7 +1719,10 @@ struct ov5670_mode { {0x5792, 0x00}, {0x5793, 0x52}, {0x5794, 0xa3}, - {0x3503, 0x00} + {0x3503, 0x00}, + {0x5045, 0x05}, + {0x4003, 0x40}, + {0x5048, 0x40} }; static const char * const ov5670_test_pattern_menu[] = {