Re: [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to nearest multiple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 10, 2024 at 06:16:42PM +0300, Laurent Pinchart wrote:
> 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.

Okay, and align word in all those variable names?

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux