Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp410019lqt; Thu, 6 Jun 2024 07:15:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGolK7+11OTObbSKQK+2Fbq95E1jUkZ9T4JNuAZvGzXaP/LJLchMdAkTeahQ8fO5mw3MQBmHUcGRoKGQGC7Z9S/gxAJXt6XAu0WPpuUg== X-Google-Smtp-Source: AGHT+IEsBcRzKlDuemxLHd7CFIyGl8lSPjSZRCyJyrPtzlgJScX7eCB/xO368HpdtipJSPEXU4LF X-Received: by 2002:a05:6102:2921:b0:48b:a42d:e6f1 with SMTP id ada2fe7eead31-48c04869198mr7395100137.9.1717683345833; Thu, 06 Jun 2024 07:15:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717683345; cv=pass; d=google.com; s=arc-20160816; b=qzN26Z6cHUiHJhL/j//xDzXYZbMZx4KNbCM+amOJFHRgqgP5ksrc8r/xl6kDbAOc6n QqHlzQuKMvCjij2/kSPZF+t9JQRu5ZuQJ3JSW6rQEA5uV2mueEIWHtLAOb4tqJCeoplz SSKYosPVYGxsRW1IJQoX9qaQTFB7cQdsixMSnq4d42KQ/Qh6KG807CgV5aAU+sFiL73m lM8kuMFwd+oKSu11ZjJ8b46zTbYjqqNuVrPj0Yxz7nQk/axoKFitFPDg+X52K8XYuddQ pW9VtApscm5tP4l5Df5AVnCvEMY2h+lud+tB9FFNshe2zl5ydtwITaQr4XzJEZI//bxM yWhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=4ktDUV7K/LitxVzjNp3ktY0kOPlXbhueIbcPgQUcBIc=; fh=yf5z7aofz3bW9Xi5i90JpfLZBizrwSqrUzCmWJ0RI9Y=; b=KHK5Os1gUd7w9otux/PsmnXsrGFpUtacLCc5WA0yJcI/LitHeUOyU4E+MC5YPoViv8 aYkljKVVeStpaT74WH41VK/ZBQyCXh83mOkZS9vTl7dw0LFdWoi8s4m7wJ8zXHkx/PO8 ve/yKHY7W0JAYk5cKub4whHqltPJNCQnYg9qeghhph8aiYQQlCuvvkE9Zeke8HplB+pP Ho3wWt1kWhR4aTWWmvLML67B+W5JRVqg/N+WI1idqyEgdMhKBu+dTRP5Nr/mmgCFozf0 mIsZ9VPzw3nP4CINYgaWp5M2S5snow17KzjKnPK6irlheQ+BGXuci/GLI6AVWBxNe/lO gzuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NqPlybz9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-204421-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48c1a214914si270385137.480.2024.06.06.07.15.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:15:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204421-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NqPlybz9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-204421-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 83BF81C24EF4 for ; Thu, 6 Jun 2024 14:15:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B084919AD7F; Thu, 6 Jun 2024 14:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NqPlybz9" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 DED7E19AD5C; Thu, 6 Jun 2024 14:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683045; cv=none; b=hoCny5thMzQ8FCgMEY1tee2jHuA/M2n9T7HFgNp7eZggVtINPRpyWW3C5/2o6RghuQiGcr1MEzBYTi+Mah4a7SXkb3v2pXNAipY8jxJE6yFYeMB1UUsCWkMI+WxcsI5iyt/ZoYJUpqp3ORPiSKOuJBidYwz4F0V8ogFmHWM1278= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683045; c=relaxed/simple; bh=MUI6PIsAE4F5Czr38Qw9LN4nLxY0Y714ALhc4YdR7Ig=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ckJ2To8mQ19QNg7hBFWqSJfiyF4U7OusBjYlVMfLi1m38fqqEvYrH3QOSq/JmBDPSL8YKtmoQC337JDfd4jYRZZQjgPAFa1+vqNCc7VyIFFkKGeQr77UG3LyykDGPnYZXyzfOZYHVjcmjSwAtwBn/buM7H8Ilmx8BSi2Sliay3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NqPlybz9; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717683044; x=1749219044; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=MUI6PIsAE4F5Czr38Qw9LN4nLxY0Y714ALhc4YdR7Ig=; b=NqPlybz9L5vuu97ai4SV1SZw1lS4AbohjcGeSD73eNa/mO5TaXdSNbHr QluLD2sHkVHaj+dCHLOhGSLU/xr2so9yCimCfpHZhBbnfiutjereK16bl SiLslH9DjTARhsTdlRCmv0VuM/KOvVJsvFirlT6yMo+udVUNPtPwIsUlf Pk51zyzbLu2CdfyC00w/zhuPgzQeDXbQfey+XeO0oTa8N139Dt4IdO9pg 9CPrmBdaombLwDDrfSjoa1a7X8ywGXUT419YhZ+bTwRRrDrXC2pvy8X63 s7c/1lSP1TEiQjytaYe/fViyux7ZB1d/Sto2HRiSswhbXIevrOVjTHRsA Q==; X-CSE-ConnectionGUID: teN4sAQsTJuFMgtrRgKyvg== X-CSE-MsgGUID: QotK4DpwSR23w2ChglR5Aw== X-IronPort-AV: E=McAfee;i="6600,9927,11095"; a="18144821" X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="18144821" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 07:10:43 -0700 X-CSE-ConnectionGUID: 3UNBXoQ1QG+szVQWA/DKGA== X-CSE-MsgGUID: 8x0BivwhSzSELBrM4WHGhQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="42444804" Received: from smile.fi.intel.com ([10.237.72.54]) by fmviesa003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 07:10:38 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1sFDp4-0000000ECQy-0sFQ; Thu, 06 Jun 2024 17:10:34 +0300 Date: Thu, 6 Jun 2024 17:10:33 +0300 From: Andy Shevchenko To: Sebastian Fricke Cc: Devarsh Thakkar , mchehab@kernel.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, benjamin.gaignard@collabora.com, dri-devel@lists.freedesktop.org, laurent.pinchart@ideasonboard.com, praneeth@ti.com, nm@ti.com, vigneshr@ti.com, a-bhatia1@ti.com, j-luthra@ti.com, b-brnich@ti.com, detheridge@ti.com, p-mantena@ti.com, vijayp@ti.com, andrzej.p@collabora.com, nicolas@ndufresne.ca, p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, akpm@linux-foundation.org, gregkh@linuxfoundation.org, adobriyan@gmail.com, jani.nikula@intel.com Subject: Re: [PATCH v12 12/13] media: imagination: Round to closest multiple for cropping region Message-ID: References: <20240604104001.2235082-1-devarsht@ti.com> <20240604105335.2257629-1-devarsht@ti.com> <20240606114459.x73yebdu7kg7re52@basti-XPS-13-9310> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240606114459.x73yebdu7kg7re52@basti-XPS-13-9310> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Jun 06, 2024 at 01:44:59PM +0200, Sebastian Fricke wrote: > Hey, > > On 04.06.2024 16:23, Devarsh Thakkar wrote: > > If neither of the flags to round down (V4L2_SEL_FLAG_LE) or round up > > (V4L2_SEL_FLAG_GE) are specified by the user, then round to nearest > > multiple of requested value while updating the crop rectangle coordinates. > > > > Use the rounding macro which gives preference to rounding down in case two > > nearest values (high and low) are possible to raise the probability of > > cropping rectangle falling inside the bound region. > > > > This complies with the VIDIOC_G_SELECTION, VIDIOC_S_SELECTION ioctl > > description as documented in v4l uapi [1] which specifies that driver > > should choose crop rectangle as close as possible if no flags are passed by > > user-space, as quoted below : > > > > "``0`` - The driver can adjust the rectangle size freely and shall choose a > > crop/compose rectangle as close as possible to the requested > > one." > > > > Link: https://www.kernel.org/doc/Documentation/userspace-api/media/v4l/vidioc-g-selection.rst [1] > > Signed-off-by: Devarsh Thakkar > > Acked-by: Sebastian Fricke > > Can, whoever picks up the math changes, pick up this change as well? > I will send 1-6 via the media subsystem. math.h is orphaned, meaning any Tier-1 maintainer may push this through. So, there is nobody behind it. -- With Best Regards, Andy Shevchenko