[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e8ae7dae-a39e-4e8d-a4ba-c720d40653e6@ti.com>
Date: Sat, 11 May 2024 23:19:13 +0530
From: Devarsh Thakkar <devarsht@...com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC: <mchehab@...nel.org>, <hverkuil-cisco@...all.nl>,
<linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<benjamin.gaignard@...labora.com>, <sebastian.fricke@...labora.com>,
<p.zabel@...gutronix.de>, <airlied@...il.com>, <daniel@...ll.ch>,
<dri-devel@...ts.freedesktop.org>, <laurent.pinchart@...asonboard.com>,
<praneeth@...com>, <nm@...com>, <vigneshr@...com>, <a-bhatia1@...com>,
<j-luthra@...com>, <b-brnich@...com>, <detheridge@...com>,
<p-mantena@...com>, <vijayp@...com>, <andrzej.p@...labora.com>,
<nicolas@...fresne.ca>, <akpm@...ux-foundation.org>,
<gregkh@...uxfoundation.org>, <adobriyan@...il.com>,
<jani.nikula@...el.com>
Subject: Re: [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to
nearest multiple
Hi Andy,
Thanks for the quick review.
On 10/05/24 20:33, 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().
>
Agreed. Will fix commit msg to use round_closest_up()
>> 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?
>
As Laurent mentioned, it looks like the fractional part of the integer.
But functionality wise, there is no change with the introduction of this
patch. round_closest_up() does exactly the same thing as what the local
function round_closest used to do before this patch.
Regards
Devarsh
Powered by blists - more mailing lists