From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18241483838 for ; Wed, 5 Aug 2026 16:11:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785946320; cv=none; b=BAPqhqX0TMiiUVcVkAoeBT4TK3WOIvmTtgOUqN0ucoWX3Tqa20DxLet8WrKkjF6K3n6zy203HJz/xSKGbbGd24fhrVbs56FfO4qQtuOACKwhwXALoX+t5+oLzkSUxDIgldjl+q9hs/mDTt3cUoEeWEMRybO/7XfAKIHJeYGmIEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785946320; c=relaxed/simple; bh=k2tmsV927fEWq+0uoPJfB+l7KPP84PEO2Drh0XIEcB4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cZjAnQNT/UG1hh4BpX9c3O+vYTmBQKo8TJQJrCiy/ju/gLSydkBbHU0DXyV98knOo2xb2ixACdM1DpWHudZ/RTfb3NgWeZy4vXHtWi0lJqzdEOtQfVybC+P3odTqAXJx1FJ0FPDD7OnfcPBsNw6rCOq9hNsGrKz8e8XeZIl0bvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=Ue0lP9ra; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Ue0lP9ra" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-496b7622a83so9748175e9.2 for ; Wed, 05 Aug 2026 09:11:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1785946314; x=1786551114; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=t/hiUWokFGsvqlinNWj7i/VJuE+r3v8Euned1qXrpkk=; b=Ue0lP9ra2y1VhGTL+LdBQN+l4YE/wzScxlxjROn8LpZWGs+6I5Us8KjK7s5jSiNb20 8DcexvupRoL9pDLLeHtnzN1RjiW6BMhxjyi17Dqdly4DxE1Rhey+Te910216HwQBg2Ox dkqJJFsmCo11gpXyaGvJ5KeS96EJ1M4goQvLpzO5SUZ1JGaAl1+uoNQK17ibxi9pfBXS gA/Wbs3zM971lQjws5fxCSFW1OXQF24kX2iSS+HkgkJUssumz8wdmCs0x5caw4vFUXe5 DAgJWrWuHR7RmWLjxr3F0D/QVZ5nmOFABIpPHXEDvVdEwJjZR28LfLjxKYyxe9QItYJl lUZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785946314; x=1786551114; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=t/hiUWokFGsvqlinNWj7i/VJuE+r3v8Euned1qXrpkk=; b=rrjqknYaIvidJWp3tS+D4hPZ0sZy6zCeFw/kA9EHILM5SnS5bexR1K2D62KfGlnfmx ptCAfZVl525l8XAQLiuuuJK9fioyiVCiGD+2zvFU7cEefOP++jkPsP5NpQAO//ul2N+T jZPhwA415kO7Lvxhk09RBb+XYJHgmtM4NuAdXZaJ/KHiqpfEBKxSquY2MJl9IhSW4oey hjF8YI3JOh2rc+UgxkCr64j5i69Le+X4Ve1pP9EMFMuCk9XJervd2s5CWg7bWEm1PDHE 2cjWZCP91LsdM/y1uAibF6yEs+9HQ9+vqc85vQF/5QIZcS2FkrIOUhigMcErKcRYTEK7 wY5Q== X-Forwarded-Encrypted: i=1; AHgh+RpdzNrtiR6292irZp/K68imVH/MpSwWiUelbJ+1ay4IuX0Kb3v2ofYOB9Ra3Pz4S4I5+wOxy/UrnMtnC1M=@vger.kernel.org X-Gm-Message-State: AOJu0YxDy8ynIw+WjYc8av/nq8mwdPFtsnbk5wUAvkrbuC9rmm4zg6kd pR+nwTYrXYRwydBDseN72QfXK6mci9tb5lmY104rqxMrLkcdU1u6dCBXfoIiI1ZWeEo= X-Gm-Gg: AR+sD11Wben/tWHOAedHkHcyz4w+DLqm4lS4uLmYUUNb5eMMwo2CVgiG+C8HKoCbOxB 2WDZfg3l3xheMWmM4P2je/DUqqNRYEbBzrqsFFHEcmmhiWn9FK2Juhk0QjdsE56qS87MtP5QgED 5foFcfAcqxfJNpd/VVzYUXi4fsL8GOz+VEcx3gIlrB1VtyFjfugZjUwCOdMsakpK5eCplgNHzY+ 2JOwUATVDR/BwlfUUcAzll5PuUiQB7FGcyA1qKYz3oTCRuEc1fq3sUXyR8bMRoFQAlEvz1fSaNJ LUrRxEu96efI3gTWYQNFEWta3flhuqX71rhLcDq4rk5q7QJJBl0r7BofyCjtFx0twmSKvQ72wGO 51Kzx7h/lWyvqhwZSla5HTM0bme4YaqN8MNgxE4Vh5yi5wi/WLwVupcOHYCUsIfLhnlHoj1EGAS gztJxXOrw0c0pXhRvBLiqRyIZ7CvPbWOq4Fbn4ykHf8+J4cg8GprOg3YGFioJGZ/HQGjfb6lOHN NKIzOle0Nq70TS3eZqKJLGTBkwMR0TCrChfUSJy X-Received: by 2002:a05:600c:840f:b0:493:bacb:1341 with SMTP id 5b1f17b1804b1-4994e72605emr94806895e9.4.1785946314017; Wed, 05 Aug 2026 09:11:54 -0700 (PDT) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-47febfda0cbsm9802575f8f.6.2026.08.05.09.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 09:11:53 -0700 (PDT) From: Dave Stevenson Date: Wed, 05 Aug 2026 17:09:16 +0100 Subject: [PATCH RFC 1/4] media: i2c: imx678: Always program the sensor in window mode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260805-media-starvis2-v1-1-91e8e4eae44f@raspberrypi.com> References: <20260805-media-starvis2-v1-0-91e8e4eae44f@raspberrypi.com> In-Reply-To: <20260805-media-starvis2-v1-0-91e8e4eae44f@raspberrypi.com> To: Sakari Ailus , Jai Luthra , Mauro Carvalho Chehab Cc: Laurent Pinchart , Alexander Shiyan , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Stevenson X-Mailer: b4 0.14.1 If the requested region matched the defined active area then the driver switched to all-pixel mode. This left the possibilty that the activeare was incorrect and not reading out the area expected. Switch to always requesting window mode. Signed-off-by: Dave Stevenson --- drivers/media/i2c/imx678.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/i2c/imx678.c b/drivers/media/i2c/imx678.c index 0efbf43d2fe6..f7b988dca2ac 100644 --- a/drivers/media/i2c/imx678.c +++ b/drivers/media/i2c/imx678.c @@ -917,9 +917,7 @@ static int imx678_program_window(struct imx678 *imx678, int ret = 0; cci_write(imx678->cci, IMX678_REG_ADDMODE, 0x00, &ret); - cci_write(imx678->cci, IMX678_REG_WINMODE, - v4l2_rect_equal(crop, &imx678_active_area) ? 0x00 : 0x04, - &ret); + cci_write(imx678->cci, IMX678_REG_WINMODE, 0x04, &ret); cci_write(imx678->cci, IMX678_REG_PIX_HST, crop->left - imx678_active_area.left, &ret); cci_write(imx678->cci, IMX678_REG_PIX_HWIDTH, crop->width, &ret); -- 2.34.1