[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240604105402.2258395-1-devarsht@ti.com>
Date: Tue, 4 Jun 2024 16:24:02 +0530
From: Devarsh Thakkar <devarsht@...com>
To: <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>
CC: <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>, <devarsht@...com>, <andrzej.p@...labora.com>,
<nicolas@...fresne.ca>, <akpm@...ux-foundation.org>,
<gregkh@...uxfoundation.org>, <andriy.shevchenko@...ux.intel.com>,
<adobriyan@...il.com>, <jani.nikula@...el.com>
Subject: [PATCH v12 13/13] gpu: ipu-v3: Use generic macro for rounding closest to specified value
Use generic macro round_closest_up() for rounding closest to specified
value instead of using local macro round_closest().
There is no change from functionality point of view as round_closest_up()
is functionally same as the previously used local macro round_closest().
Signed-off-by: Devarsh Thakkar <devarsht@...com>
---
V12: No change
V11: No change
V10: No change
V9: No change
V8: Update commit message
V1->V7 : (No change, patch introduced in V7)
---
drivers/gpu/ipu-v3/ipu-image-convert.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c
index 841316582ea9..5192a8b5c02c 100644
--- a/drivers/gpu/ipu-v3/ipu-image-convert.c
+++ b/drivers/gpu/ipu-v3/ipu-image-convert.c
@@ -477,8 +477,6 @@ static int calc_image_resize_coefficients(struct ipu_image_convert_ctx *ctx,
return 0;
}
-#define round_closest(x, y) round_down((x) + (y)/2, (y))
-
/*
* Find the best aligned seam position for the given column / row index.
* Rotation and image offsets are out of scope.
@@ -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;
--
2.39.1
Powered by blists - more mailing lists