Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp572088lqo; Fri, 10 May 2024 08:17:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnCsO/uEPBTvt8R6bwVBJtv5sWxM6DX4cT+TPC/7FYmqmwod/gkE2KWlANqGDGkChe23mpHBvc8rDPS1sYW0CjpdNQwiwu28jKBdOZsQ== X-Google-Smtp-Source: AGHT+IHwQRQKgO+IAtuxMk2AZso/Dd8Mn6vAH7EywbEUau8jNKhTrrufT26nJPH40/smsxSL36/k X-Received: by 2002:a05:622a:5a15:b0:43b:487:44e9 with SMTP id d75a77b69052e-43dfdbb7d10mr31368991cf.61.1715354259859; Fri, 10 May 2024 08:17:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715354259; cv=pass; d=google.com; s=arc-20160816; b=y6Pe7pELcxfqML3zTicwUozysa/99nqwjg60XmIjpHpiZk7wv+SQaKm57RWrV2/u70 u6gA8ldMpdMRMCqrq+0403KLLgbWJ6FcsVEe5UtOFn0L933NSUjqFSSHAUESxlTpaiD4 0bZJq8UzddLCM3WKDAl2KEV7E9c6x89a4qbSmyi7PNKLiaG+Ew6jZcdPrN+KjHSalFK9 e2Pc44SSq+8tB9imKFLI4BO8JzxnTH8d1dsGSx8z9Vx7s6cl9qK8ITumOsthReUVVkqp 1GK0bIJGt4hSCqY4jA0zMAn5GWlicJRXSU9OmHLkNv3LYGAlxcRnvUcRQiCsRSm+7cAt zXzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=Uc4+4JUzBAwh10FCUCLcKegf84jUvPyOZo8RW/YLnH0=; fh=W3MQxwovQPxCy6gfnriQC0HucKD8gzMoncyEGtsmi58=; b=Qj22PqchKJj0Q5bEHoCWqPFW787slv/j29cFfw7oQNE0bwsS07fjCo9y6cd/94rYAz fEq6FuKia3SqJMRq+OTGrU6OatTPZRA8X7ABQ/MIe7iDsGyHGKdlLBRRn/7RgCc8k6/e tehtvva8y2NdjxpyqrL7MRUcjdkIOrSuRu0AcBWK0ir2a/aC9jx4g6u6sgJz1U0cuWPz Q8NnNFlN8rB/yLfyayPK14M+35aXt2+GMlj0f17ozxjpIK5yoRi0eVm/jITqN4ajz1ou FsEbYGMjv0ZS2TH+LdkTS6DRDRsp4vtdyL/eXSRqkrPR8dHcDyL7bUTX8q7JDE+aV2tR ZPcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="nXNRXI+/"; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-175937-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175937-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df54b585dsi40574911cf.215.2024.05.10.08.17.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 08:17:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175937-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 (test mode) header.i=@ideasonboard.com header.s=mail header.b="nXNRXI+/"; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-175937-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175937-linux.lists.archive=gmail.com@vger.kernel.org" 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 8E9BE1C23BFD for ; Fri, 10 May 2024 15:17:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3E65171655; Fri, 10 May 2024 15:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nXNRXI+/" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 450B412C490; Fri, 10 May 2024 15:16:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715354216; cv=none; b=ushablJTeE/JULvfpkwBIPmSttvubtyEqkLLip5O0L9b+9heAKWuLgmh/4T5WoHRom/JqDmraAVcZcIs+LPUNyNYlKwNwZqsY0rpd0+BE3fQXsNQ7iOQwNkPQuo0hTCXiMfmrDoPhA9auuzQ3wEqi9tQOKBjKPu/qECdbnfnhQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715354216; c=relaxed/simple; bh=j5U02hjASsINAaYItIarcZkmxJVACMCoVQyAxb1d4YM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=atLC8A75npo45Z+ECZ3sFRBStOgCWDwK1RM9to4+74Y6oJfqJkz+Lu1wAmVlEELbV8HvUViijiVxpVg69PtGFjbq3Zfv1crbev0M4R9WdtOpiIYbnH/B33NVr9BkmyQ8JtZmb85dYfRHGZDMGgddUNKtRqw8e1kIb2aPHKfKemU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=nXNRXI+/; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5E8083D5; Fri, 10 May 2024 17:16:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1715354206; bh=j5U02hjASsINAaYItIarcZkmxJVACMCoVQyAxb1d4YM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nXNRXI+/cEEbdhU/LxaMwVEoVFGICuenZ9oKzJ4Pvw+4Rn9vTPy48wsxJX5oaXsZo w5eqhuDoHDehHp7iDKWM5Xjv15q+WA2DDWr95lpQMzWXyKfTxEAm+oCmYQq3FBVXGM i+p2lMs53bhqlhIXnc56sLbqmR8fTqZDnSq2b9yI= Date: Fri, 10 May 2024 18:16:42 +0300 From: Laurent Pinchart To: Andy Shevchenko Cc: Devarsh Thakkar , mchehab@kernel.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, benjamin.gaignard@collabora.com, sebastian.fricke@collabora.com, p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, 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, akpm@linux-foundation.org, gregkh@linuxfoundation.org, adobriyan@gmail.com, jani.nikula@intel.com Subject: Re: [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to nearest multiple Message-ID: <20240510151642.GA17158@pendragon.ideasonboard.com> References: <20240509184010.4065359-1-devarsht@ti.com> 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-Disposition: inline In-Reply-To: On Fri, May 10, 2024 at 06:03:52PM +0300, Andy Shevchenko wrote: > On Fri, May 10, 2024 at 12:10:10AM +0530, Devarsh Thakkar wrote: > > Use generic macro round_closest_up for rounding to nearest multiple instead > > round_closest_up() > > We refer to the functions as func(). > > > of using local function. > > ... > > > @@ -565,7 +563,7 @@ static void find_best_seam(struct ipu_image_convert_ctx *ctx, > > * The closest input sample position that we could actually > > * start the input tile at, 19.13 fixed point. > > */ > > - in_pos_aligned = round_closest(in_pos, 8192U * in_align); > > + in_pos_aligned = round_closest_up(in_pos, 8192U * in_align); > > /* Convert 19.13 fixed point to integer */ > > in_pos_rounded = in_pos_aligned / 8192U; > > Oh, these seems to be better to use either ALIGN*(), or PFN_*() / PAGE_*() > families of macros. What the semantic of 8192 is? The comment mentions 19.13 fixed point, so I assume that's the fractional part of the integer. It doesn't seem related to pages. -- Regards, Laurent Pinchart