Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 400C53F076B for ; Wed, 10 Jun 2026 10:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781087429; cv=none; b=jd89GVLSxtzjMbnF0rgn8/XSTu6BBLkWR/W3NIpPoEsStcH5tJ+BkvsuItmfxS7IiHUS4b6dY+YveHsyJ/25FX3tw8taSG0fA5f/9MuDQrI4V8xj4XAH+fl1Yr4Cl07GFJFTky0S0wvWbIThbaP8AiBy3Fk+Gmi49XU1za5ZzrE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781087429; c=relaxed/simple; bh=ko81T1zT05pTNinPNHBNoDJ/iwXyHHAQ4DVB71YTrBY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DYFQgN1Uxj3RF9A/yi2JniPYBtPYW4B7FnAGrEcpA4ja3a0o9ZCCrHHUiGDLZUUJjg4WEdHXfmf5cgtSjL4VvVSrTyOtX+yfo28ladPCOVhZ98Ikx5bwj1khtdt5G2x/ePOVSNtzZonzI5IaYN3fK2vOZnGOzGyYFFP+ZsRHz+Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UjRkHHFr; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UjRkHHFr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781087427; x=1812623427; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ko81T1zT05pTNinPNHBNoDJ/iwXyHHAQ4DVB71YTrBY=; b=UjRkHHFr/VGAHFeBvriTHltmCwyk56V2EJzmujKGNNmYKuF6oFmUWbUK DCx2GsynKwGnDw1ppLmAp8g1541xgZIGb5zo69E6U/VbNeKjBDgrexGjT TLD4RexyjXSmnnai2WORQ0AIeta4UFu0ZwlFdRBuCTKXEiEU5A7jhKxi0 yrr3EaIECZ3/DtL7BEFnOos7z6aZpZu4i0mBDsMnx7uMeQPGbfraQ0t7h WV4cMfCx+ELBgPuhdvo0m8Ql8cJGTu5KSf7pZVOS6KkPCguIV6fT0kDD7 YZAqu+rcNAkioHNJkqPoPj8TLb9zePPoOaAI6ksAUqNnjmF76DTTWfaXK Q==; X-CSE-ConnectionGUID: GcdJGnO9Q3S1iFI2kYU8NQ== X-CSE-MsgGUID: kAAFabRmS9WNo4Zv+z2Gqg== X-IronPort-AV: E=McAfee;i="6800,10657,11812"; a="92442948" X-IronPort-AV: E=Sophos;i="6.24,197,1774335600"; d="scan'208";a="92442948" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2026 03:30:26 -0700 X-CSE-ConnectionGUID: Gx4GbpbWTRW3KCpjXhfZMg== X-CSE-MsgGUID: cq/tkSVGTwmZ0bhTAxYcSQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,197,1774335600"; d="scan'208";a="241708364" Received: from vpanait-mobl.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.245.253]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2026 03:30:20 -0700 Received: from kekkonen.localdomain (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 4E64511F94F; Wed, 10 Jun 2026 13:30:17 +0300 (EEST) Date: Wed, 10 Jun 2026 13:30:17 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: Sakari Ailus To: Jai Luthra Cc: Dave Stevenson , Jacopo Mondi , Hans Verkuil , Laurent Pinchart , linux-media@vger.kernel.org, Prabhakar , Kate Hsuan , Tommaso Merciai , Benjamin Mugnier , Sylvain Petinot , Christophe JAILLET , Julien Massot , Naushir Patuck , "Yan, Dongcheng" , Stefan Klug , Mirela Rabulea , =?iso-8859-1?Q?Andr=E9?= Apitzsch , Heimir Thor Sverrisson , Kieran Bingham , Mehdi Djait , Ricardo Ribalda Delgado , Hans de Goede , Tomi Valkeinen , David Plowman , "Yu, Ong Hock" , "Ng, Khai Wen" , Rishikesh Donadkar Subject: Re: [PATCH v5 06/10] media: imx219: Fix vertical blanking and exposure for analogue binning Message-ID: References: <20260607215356.842932-1-sakari.ailus@linux.intel.com> <20260607215356.842932-7-sakari.ailus@linux.intel.com> <178091466607.16054.13972332068848565738@freya> <178102372666.1799417.2096397903236324900@freya> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <178102372666.1799417.2096397903236324900@freya> Hi Jai, On Tue, Jun 09, 2026 at 10:18:46PM +0530, Jai Luthra wrote: > > > OPTION 2 (something that struck me today morning discussing with Jacopo): > > > > > > Fix PIXEL_RATE to 182400000 but **adjust the HBLANK values** to go > > > lower to compensate, which will diverge from the sensor registers which > > > keep MIN_LINE_LENGTH fixed across both binning modes. > > > > > > This will make the driver quite more complicated, but userspace > > > expectations of non-negative blankings will be met. And it's likely > > > that the sensor is internally doing pre-ADC averaging horizontally as > > > well, or so my best guess is. > > > > It is true that the line length configured is sufficient that it could > > be halved in order to keep the pixel rate the same. That would seem > > feasible. > > > > It is indeed feasible, and imho most likely what the sensor is internally > doing (I'd be happy to be proven wrong). I've posted a patch separately > implementing that. I can't prove you wrong (nor right) but in general the line length in pixels and frame length in lines registers on the sensor's register interface really control the sensor's internal operation. These values aren't divided or multiplied based on other configurations. In this case, as the sensor appears to be reading out twice as many lines from its pixel array as you'd expect suggests that on each step two (2x analogue binned) lines are being read instead of just one, and thus four lines in the pixel array get read in the same amount of time that normally would be spent reading just a single line. How it does that, I don't know. Analogue operation would need more hardware than there apparently is whereas digital operation would require storing each even (binned) line of image data in internal SRAM until the previous odd line has been sent out, while some extra hardware would probably still be needed besides the SRAM. The latter is my wild guess. You could ascertain the independence of horizontal and vertical binning by configuring the sensor to do just horizontal or vertical binning and then see how it affects the line length in pixels and frame length in lines limits experimentally. My guess is that it doesn't. This may also not work at all, the sensor datasheet isn't very clear about this. -- Kind regards, Sakari Ailus