From: Devarsh Thakkar <devarsht@ti.com>
To: <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>
Cc: <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>, <devarsht@ti.com>,
<andrzej.p@collabora.com>, <nicolas@ndufresne.ca>,
<akpm@linux-foundation.org>, <gregkh@linuxfoundation.org>,
<andriy.shevchenko@linux.intel.com>, <adobriyan@gmail.com>,
<jani.nikula@intel.com>
Subject: [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to nearest multiple
Date: Fri, 10 May 2024 00:10:10 +0530 [thread overview]
Message-ID: <20240509184010.4065359-1-devarsht@ti.com> (raw)
Use generic macro round_closest_up for rounding to nearest multiple instead
of using local function.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
---
V1->V6 (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
next reply other threads:[~2024-05-09 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 18:40 Devarsh Thakkar [this message]
2024-05-10 15:03 ` [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to nearest multiple Andy Shevchenko
2024-05-10 15:16 ` Laurent Pinchart
2024-05-10 15:33 ` Andy Shevchenko
2024-05-11 17:49 ` Devarsh Thakkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240509184010.4065359-1-devarsht@ti.com \
--to=devarsht@ti.com \
--cc=a-bhatia1@ti.com \
--cc=adobriyan@gmail.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andrzej.p@collabora.com \
--cc=b-brnich@ti.com \
--cc=benjamin.gaignard@collabora.com \
--cc=daniel@ffwll.ch \
--cc=detheridge@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=j-luthra@ti.com \
--cc=jani.nikula@intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nicolas@ndufresne.ca \
--cc=nm@ti.com \
--cc=p-mantena@ti.com \
--cc=p.zabel@pengutronix.de \
--cc=praneeth@ti.com \
--cc=sebastian.fricke@collabora.com \
--cc=vigneshr@ti.com \
--cc=vijayp@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).