Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3815074ybn; Fri, 27 Sep 2019 11:46:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYUxmgjJ7SuGTpBKg9l1T7zaviFRMnElnGvAqx5HzT6UzBngJJyIq/G7y+leyW6OSpHpzK X-Received: by 2002:a17:906:960d:: with SMTP id s13mr9191844ejx.166.1569610013596; Fri, 27 Sep 2019 11:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569610013; cv=none; d=google.com; s=arc-20160816; b=jOQRwlGMIPRGnaa1+P53q2+Gowd9y7li9HMSHmhiwPfgUmRoUSBTAM92irfzhgDQHg rnJ/RNOvLtlZBOt5ZmGc3ZZbscVP09xKt9g4s8LGcP5JbBV4NWVDYLYMVRB+5MX/sbCf /6KNtSe770KT2DSkLOTLm5KFKDOx0Ucy4QDTDaNcdxuPj8IsVBzUlBIWCfIY1Qqycfj+ v0uVzSJ/hb1/7jbnhM0fGNd6JHWO7+AOmRy8PDvWkuk9QeONzQ1bjeIkpFlJLd2BgWOf oUWbwzZRUX34VhYj7r/aUTt3jOIOC/5WQehkfh3tEL0oQpu6g04wBs3U5mYwUXqEYmI+ HI9A== 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=iTVrMjr1jpW2jGLDHpDluWhwBeMusQS6Cqz8cCy6Yzo=; b=KW/JVuaObJWmmaAdAcSHBa6DgoJMdcHNcJygvt+HwesUMOEtbrUV1bkM+3KW4GSs0b eFBlY0RiZuFXU8VyD9NwwWQp/tyjdoF+kvE5Z6djt1lftpgfe/XBCe0R7qzX44ij9us5 eyOyyyklFeIihXH391CpdPYb0uBRuPo2o5L+mNx09kNR5DAxcZjMukNxBUVhDtfWr6jG jtLBoGkEqb/rq1f7JoVdYPw+DwDZaGzUcIlbR616ZW6VD5hhzbKHS/ojLhnQCDM1Wqbr 82WGtw4yKDNo3cHeoIMOFNui+K11106bUsoZ3yAloohBRdpYvmCsOXu9T5U4dEA0HnOp z1ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FdjSwUSH; 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 g5si3295408ejp.350.2019.09.27.11.46.29; Fri, 27 Sep 2019 11:46:53 -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=FdjSwUSH; 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 S1728453AbfI0SpT (ORCPT + 99 others); Fri, 27 Sep 2019 14:45:19 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:46730 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbfI0SpR (ORCPT ); Fri, 27 Sep 2019 14:45:17 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8RIjGbg094624; Fri, 27 Sep 2019 13:45:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569609916; bh=iTVrMjr1jpW2jGLDHpDluWhwBeMusQS6Cqz8cCy6Yzo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FdjSwUSHWrJ3hkJDyxDauyRMGlEWaGXNjDq/6ckDzXIHyaJoKT3/8x7gAg8N7DRvc tOBayG5d12WiB0zfxdM9DWySnU9bh+h3x0uZknt1fAvpas2JfPqU+gnITMWueQpE7+ Vv+1/soLwG1msSclO30iuJthmmr4XjSsdg2YfT00= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8RIjG6Z074937 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 27 Sep 2019 13:45:16 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) 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; Fri, 27 Sep 2019 13:45:07 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE114.ent.ti.com (157.170.170.25) 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; Fri, 27 Sep 2019 13:45:07 -0500 Received: from uda0869644b.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8RIjEVW122194; Fri, 27 Sep 2019 13:45:15 -0500 From: Benoit Parrot To: Hans Verkuil , Sakari Ailus CC: , , , Benoit Parrot , Jyri Sarha Subject: [Patch v4 1/8] media: i2c: ov2659: Fix for image wrap-around in lower resolution Date: Fri, 27 Sep 2019 13:47:15 -0500 Message-ID: <20190927184722.31989-2-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190927184722.31989-1-bparrot@ti.com> References: <20190927184722.31989-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 --- 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