Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 511F53F788A for ; Thu, 11 Jun 2026 12:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781181459; cv=none; b=cYHsxkzmqu5jGGbz7Iha18Rjm/Rga+5vDUNaQvqK06iO1Fe7Q/wsyPPJEZq/nkRZ9vdpP///Uiatb3DDhQG9GYi1haPnnRDvm51qWswNXpxsxMmJQr05DTADdVAkXKD1oBTwmQGD+4VzRoxuevI9przBTDYC+Bz43nU9B0jTyhk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781181459; c=relaxed/simple; bh=4HbTYaaqY8QdsGlcTd6udAT/ROxObnw61mM+ITXuNCE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ty+73o6XiS1yyFDtoIS/QKVO2PBPikef6fD/u0XQyjLIlVF6zJEP+bfmPIdHwIruzJRcKVXCDIHbv3DwW3iAPh51F+nywPbA2406vYvj9kRWUfTQlBUdnaIswdjQx/ekCSM9znGLrjleWpEoLb4hWgoRpggcBqIjRddiCvGdiOM= 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=com8xICG; arc=none smtp.client-ip=198.175.65.10 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="com8xICG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781181457; x=1812717457; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4HbTYaaqY8QdsGlcTd6udAT/ROxObnw61mM+ITXuNCE=; b=com8xICGSSmoeoOGadt7vAqWSWPk/1wOCx+QDdfcrz9r9DckSC6PpUgW hAsdl2KnrGTjkwOvIs0q08tkuq/zQQs1lGJOjjs/olZIevmW3lBqRW8F+ tDTL2+7DH8GJvJTlzcKjJAaTN9fhNnltsriddDJvgdXsKfFUiGS8M7E8h WPzfxTVrgGzsnd30Kvxs4CtYiv7hUWbTXPox/XCXr0PqyKm1kKqGfr8Ry GnA+VqK1VbkfhcwfeYIbbxYvBsG9PHPvyUXiXj6v+9B5cOjRGLjM++ty9 OPzzil53U84+L1M6O9eyaCRiMOMqMsY+CNgswX1AaY8E/UZOdHJow0q3W A==; X-CSE-ConnectionGUID: joSRldA7Rpar68WKKNlVaw== X-CSE-MsgGUID: eCUb/qrpRmCSFkP25o9xAg== X-IronPort-AV: E=McAfee;i="6800,10657,11813"; a="99415632" X-IronPort-AV: E=Sophos;i="6.24,198,1774335600"; d="scan'208";a="99415632" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2026 05:37:36 -0700 X-CSE-ConnectionGUID: yE9aCu0gSKWHGx/p0Iyvbw== X-CSE-MsgGUID: 5K7usirlRtanzh3jRbu+GA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,198,1774335600"; d="scan'208";a="248350758" Received: from abityuts-desk.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.244.136]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2026 05:37:30 -0700 Received: from kekkonen.localdomain (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with SMTP id DECDC121C39; Thu, 11 Jun 2026 15:37:26 +0300 (EEST) Date: Thu, 11 Jun 2026 15:37:26 +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: linux-media@vger.kernel.org, hans@jjverkuil.nl, laurent.pinchart@ideasonboard.com, Prabhakar , Kate Hsuan , Dave Stevenson , Tommaso Merciai , Benjamin Mugnier , Sylvain Petinot , Christophe JAILLET , Julien Massot , Naushir Patuck , Stefan Klug , Mirela Rabulea , =?iso-8859-1?Q?Andr=E9?= Apitzsch , Heimir Thor Sverrisson , Kieran Bingham , Mehdi Djait , Ricardo Ribalda Delgado , Hans de Goede , Jacopo Mondi , Tomi Valkeinen , David Plowman , "Yu, Ong Hock" , " Ng, Khai Wen" , Rishikesh Donadkar Subject: Re: [PATCH v12 24/86] media: Documentation: Add scaling and post-scaler crop for common raw Message-ID: References: <20260409201501.975242-1-sakari.ailus@linux.intel.com> <20260409201501.975242-25-sakari.ailus@linux.intel.com> <177929421045.2341049.3815318982292932607@selene> 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: <177929421045.2341049.3815318982292932607@selene> Hi Jai, On Wed, May 20, 2026 at 06:23:30PM +0200, Jai Luthra wrote: > Quoting Sakari Ailus (2026-04-09 22:13:59) > > Document scaling and post-scaler digital crop operations for the common > > raw sensor model. > > > > Signed-off-by: Sakari Ailus > > Reviewed-by: Tomi Valkeinen > > Reviewed-by: Lad Prabhakar > > Reviewed-by: Jacopo Mondi > > --- > > .../media/v4l/subdev-config-model.rst | 26 ++++++++++++++----- > > 1 file changed, 20 insertions(+), 6 deletions(-) > > > > diff --git a/Documentation/userspace-api/media/v4l/subdev-config-model.rst b/Documentation/userspace-api/media/v4l/subdev-config-model.rst > > index b450f698a608..1525119cbeb9 100644 > > --- a/Documentation/userspace-api/media/v4l/subdev-config-model.rst > > +++ b/Documentation/userspace-api/media/v4l/subdev-config-model.rst > > @@ -146,12 +146,19 @@ binning and sub-sampling to achieve the desired size. > > > > The digital crop operation takes place after binning and sub-sampling. It is > > configured by setting the ``V4L2_SEL_TGT_CROP`` rectangle on (pad, stream) pair > > -0/0. The resulting image size is further output by the sensor on the sensor's > > -data interface. > > +0/0. > > + > > +The scaling operation is performed after the digital crop. It is configured by > > +setting the ``V4L2_SEL_TGT_COMPOSE`` rectangle on (pad, stream) pair 0/0, > > +relative to the digital crop. The resulting image size is further output by the > > +sensor on the sensor's data interface. > > > > The sensor's output mbus code is configured by setting the format on the (pad, > > -stream) pair 0/0. When setting the format, always use the same width and height > > -as for the digital crop setting. > > +stream) pair 0/0. The width and height fields are used to configure post-scaler > > +digital crop if supported by the driver, affecting the right and bottom edges of > > +the frame. If post-scaler digital crop is not supported, the width and height > > +fields of the format will match the compose rectangle sizes applied on the same > > +0/0 (pad, stream) pair. > > > > Given most raw sensors don't support a scaler, or a post-scaler crop, IMO Many sensors do support it, but few drivers implement it, also due to non-CCS UAPI not allowing it right now. Probably CCS is the only one right now. But this isn't to say this wouldn't be more widely supported in the future: I'd expect to see more freely configurable drivers as well as new drivers that could control classes of sensors programmatically rather than a single one based on register lists. In those cases supporting a feature such as that is more meaningful. > this section would be easier to read if we say: > > The sensor's output mbus code is configured by setting the format on > the (pad, stream) pair 0/0. The format's width and height should > usually match the compose rectangle sizes applied on the same 0/0 (pad, > stream) pair. If the sensor supports a post-scaler digital crop, the > width and height may be lesser, affecting the right and bottom edges of > the frame. I'd prefer keep it as-is -- the second sentence above is rather vague. -- Kind regards, Sakari Ailus