From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 50E3739A7F5; Wed, 25 Mar 2026 08:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774428983; cv=none; b=r5lsobUq5R/raoioR0yz86oUt5mA43gJPsGLB8lTqgZpu3yYxpXIIvykypJBucKyju9JWsJalqVLOg8Xe4taqPHVB9nGNBrhU4Nfdv6TSAwNfkm+SYpV3ylJ13W6YvwFzlfDQkJ7rm9PasuUYvNXt9L0PLdNq+g0W4JmdyoERoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774428983; c=relaxed/simple; bh=i3RVsIoEwIF477giVRo9cm7wj/FOUjCy2mU65c2lBJk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H0AXlqynwEkL0FMYUuBf8ng1CQVvizofqQ34dyXtdx+BhcN4dv3EgiaPaMlM541N7dRl98epnGEhdeRTJX8osOfmQgDJp7MPPKBrho4nXsa0OqnXnERx+mOYwH5fBi/2UYVqsSpQyFtfJJKYUfbGWKYGGysxlsLTW7edyINUwa8= 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=eRBgMWtd; arc=none smtp.client-ip=198.175.65.13 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="eRBgMWtd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774428982; x=1805964982; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=i3RVsIoEwIF477giVRo9cm7wj/FOUjCy2mU65c2lBJk=; b=eRBgMWtd9QrCbioiGNFmsHhn40IqMLW+3XMUgJuaoR5+hdoU8RvOkuPy +r3x3eX4Ng06m7IMiiIKeVP9qmI8I0nNmBqCnqkwf1XHFHS+T0bFFkAjP PNSlafGg1HFBwVDQxwiwZ/ac+pSr+DEl/RF0pfkxo/9cEWzheLTKtGNGl psEcYgQBXgwOCEx4EqSiXNw/cyvQf0q6q1bsqcROw6rOlTgyd2xjhhlRq 05WybdAD8BUKHC2TZx6QTQqlJ1UVW+Y2ghDxzhBnpyZugm775j7UeeRz6 bjS0ZJ7iH2BEZOa9KyzCZpDJRff1W4kA8QQNH4at3cs9dkBCiwmIU7VSO Q==; X-CSE-ConnectionGUID: zqKL9sTIQT2Sfpjj7sAB6w== X-CSE-MsgGUID: 1JVrUNbAS6ydjKZUZWi5YQ== X-IronPort-AV: E=McAfee;i="6800,10657,11739"; a="86538553" X-IronPort-AV: E=Sophos;i="6.23,139,1770624000"; d="scan'208";a="86538553" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2026 01:56:22 -0700 X-CSE-ConnectionGUID: Jb3KGClIT92Ld+xxeCsBIA== X-CSE-MsgGUID: 9klnmbjCS8aT4HolBNdIAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,139,1770624000"; d="scan'208";a="247648255" Received: from dalessan-mobl3.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.245.64]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2026 01:56:19 -0700 Received: from kekkonen.localdomain (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 9354C121CF9; Wed, 25 Mar 2026 10:56:23 +0200 (EET) Date: Wed, 25 Mar 2026 10:56:23 +0200 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: "sakari.ailus@linux.intel.com" To: Tarang Raval Cc: "mehdi.djait@linux.intel.com" , Himanshu Bhavani , Elgin Perumbilly , Mauro Carvalho Chehab , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 11/13] media: i2c: os05b10: Update active format before adjusting framing controls Message-ID: References: <20260306123304.76722-1-tarang.raval@siliconsignals.io> <20260306123304.76722-12-tarang.raval@siliconsignals.io> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi Tarang, On Tue, Mar 24, 2026 at 04:31:02PM +0000, Tarang Raval wrote: >   > Hi Sakari, > > > os05b10_set_pad_format() calls os05b10_set_framing_limits() before updating > > the ACTIVE format. As a result, the VBLANK control handler uses the old > > height when recalculating exposure limits, causing -ERANGE when switching > > to a larger resolution. > > > > Update the ACTIVE format before adjusting framing controls so control > > callbacks use the correct dimensions. > > > > Signed-off-by: Tarang Raval > > --- > >  drivers/media/i2c/os05b10.c | 4 ++-- > >  1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/media/i2c/os05b10.c b/drivers/media/i2c/os05b10.c > > index 4601e33b7e8f..476dbcb49351 100644 > > --- a/drivers/media/i2c/os05b10.c > > +++ b/drivers/media/i2c/os05b10.c > > @@ -902,14 +902,14 @@ static int os05b10_set_pad_format(struct v4l2_subdev *sd, > >   > >          format = v4l2_subdev_state_get_format(sd_state, 0); > >   > > +       *format = fmt->format; > > + > > This is the final analysis without this patch. > > Please check the logs in the attached file. > > When switching the resolution from 1280x720 to 2592x1944, the logs show that > while configuring the 1280 mode from the 2592 mode, the maximum exposure value > is calculated as 2219 (fmt->height + ctrl->val - exposure margin). > > However, after switching to the 2592 mode, the maximum exposure value is 774. > > From both cases, it is evident that fmt->height is being calculated incorrectly > It is still using the previous height instead of updating to the new resolution. > > Please share your thoughts. Am I heading in the right direction? I think the patch is reasonable. It'd be still nice to get reviews from others before merging this. -- Kind regards, Sakari Ailus