Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6927843ybn; Mon, 30 Sep 2019 06:07:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBqfMuaPktuk5tfODMGchvr64AUb+a/K1IR6xB//DAmUY6phSgEFn7Z6WpbHx9oP0HveAY X-Received: by 2002:a05:6402:346:: with SMTP id r6mr19189543edw.124.1569848862827; Mon, 30 Sep 2019 06:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569848862; cv=none; d=google.com; s=arc-20160816; b=tTBz4/Ir7oel32D7DOUjijE3ton96o5elgHKxUv9af8TmSX/mc1f8Vhl42GJT4Vsfh xuKeAw5Lw7io1aX49H+UiVI0KbYCfrv84bnF6XZ2x3L0XYTWLOF//2NnALzWiPNAESQa 39DPPm3sA8NaILP59pT3BNyddTW40/MHohctEyqCp2WUab3Bu5Rw9I2f6LAbBUhv2Ms1 0vePnDUbSB2wHS1RoumJP4I1p6Y++1tRGMgzuFbAwhwhUK/1H5cfwiVO1HAnRwH79EOG dWt0FkUtxIgpmPEQ0B8w2chJdWRYGFI/umAEuRp2SkI1mb1r/djOVMeyYOdo6nnvufku AWgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6eJVirsFiqTwdMuIYCCTbpbN4VdfqWDO+ZLJ0ZgDJQ8=; b=E3OUYqvuBID62SQOR78Yndr15/+D+IW7u3fpLWW+T7Mva+eWMSTptrlotUytzAQd7R 71qXK6741Y7OXbwTYiBSYFraYn4TRDEfVfT1mtfPFh66q2e1JPChdPZnwZJmUbZyKSNA dphpwBqs0KsEXbRMfhHB5lxD23o/s9Dgn1yFjRphUXrQGCuyObLLVW8a7khHikdqd7Or iIImmdsFygeBbJov8J+lDfPWSUffL9Yl8CF5yLFlT46MgJ3kITAmQlkN3pyhEPqZdaa8 Ix/ufVE+eq0JzEE2NMiczlQtOXIbMAVVVue2VNHNjOS75GgLTV6CJRxgNql0BxefVRL9 /0/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x6Pjc23c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si6761220eja.9.2019.09.30.06.07.17; Mon, 30 Sep 2019 06:07:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x6Pjc23c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731217AbfI3NEl (ORCPT + 99 others); Mon, 30 Sep 2019 09:04:41 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43420 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730929AbfI3NEk (ORCPT ); Mon, 30 Sep 2019 09:04:40 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8UD4bOH003771; Mon, 30 Sep 2019 08:04:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569848677; bh=6eJVirsFiqTwdMuIYCCTbpbN4VdfqWDO+ZLJ0ZgDJQ8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=x6Pjc23c3k+auPDuYzOClk5zDeTwu06PRXU1WBPtQ549yS0+YDpm2+WvB6HEgUxm6 RUPiT6yGXj6dOXt31tSGI2HNW+2dGcoWYvgilTyoXNmqRjXeY54K1t2h9xkv5kE5nU tG+esKFq6Ama5V52tdqM92jQZ3ITWufDGapaQXrA= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8UD4bJk057362; Mon, 30 Sep 2019 08:04:37 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 30 Sep 2019 08:04:27 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 30 Sep 2019 08:04:36 -0500 Received: from uda0869644b.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8UD4Zig115624; Mon, 30 Sep 2019 08:04:36 -0500 From: Benoit Parrot To: Hans Verkuil , Sakari Ailus CC: , , , Benoit Parrot , Jyri Sarha Subject: [Patch v5 1/8] media: i2c: ov2659: Fix for image wrap-around in lower resolution Date: Mon, 30 Sep 2019 08:06:37 -0500 Message-ID: <20190930130644.8704-2-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190930130644.8704-1-bparrot@ti.com> References: <20190930130644.8704-1-bparrot@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Based on recently found sensor configuration examples, it was discovered that when scaling and binning are used for the lower resolutions (i.e. 640x480, 320x240) the read offset has to be increased otherwise the image appears to be wrapped around. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Acked-by: Lad, Prabhakar --- drivers/media/i2c/ov2659.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c index f4ded0669ff9..17573257097d 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -661,7 +661,7 @@ static struct sensor_register ov2659_vga[] = { { REG_TIMING_HORIZ_FORMAT, 0x01 }, { 0x370a, 0x52 }, { REG_VFIFO_READ_START_H, 0x00 }, - { REG_VFIFO_READ_START_L, 0x80 }, + { REG_VFIFO_READ_START_L, 0xa0 }, { REG_ISP_CTRL02, 0x10 }, { REG_NULL, 0x00 }, }; @@ -709,7 +709,7 @@ static struct sensor_register ov2659_qvga[] = { { REG_TIMING_HORIZ_FORMAT, 0x01 }, { 0x370a, 0x52 }, { REG_VFIFO_READ_START_H, 0x00 }, - { REG_VFIFO_READ_START_L, 0x80 }, + { REG_VFIFO_READ_START_L, 0xa0 }, { REG_ISP_CTRL02, 0x10 }, { REG_NULL, 0x00 }, }; -- 2.17.1