From: Alain Volmat <alain.volmat@foss.st.com>
To: David Carlier <devnexen@gmail.com>
Cc: Hugues Fruchet <hugues.fruchet@foss.st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
<linux-media@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: stm32: dcmipp: pixelproc: Round up the compose lower bound
Date: Tue, 3 Nov 2026 13:51:07 +0100 [thread overview]
Message-ID: <aunYu3XpKWjx20AS@gnbcxd0016.gnb.st.com> (raw)
In-Reply-To: <20261018032011.207050-1-devnexen@gmail.com>
Hi David,
thanks for the patch.
On Sun, Oct 18, 2026 at 04:20:11AM +0100, David Carlier wrote:
> The minimum compose size is crop / 64, rounded down. A 17 pixel compose
> on an 1100 pixel crop then needs four decimation steps, which overflows
> the 2-bit HDEC and VDEC fields in PxDCCR. Round the minimum up instead.
>
> Fixes: 239cf9e5fda1 ("media: stm32: dcmipp: pixelproc: addition of dcmipp-pixelproc subdev")
> Signed-off-by: David Carlier <devnexen@gmail.com>
> ---
> .../media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c
> index 7d8e5f0863bf..9055682481de 100644
> --- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c
> +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c
> @@ -597,10 +597,10 @@ static int dcmipp_pixelproc_set_selection(struct v4l2_subdev *sd,
> s->r.top = 0;
> s->r.left = 0;
> s->r.width = clamp_t(u32, s->r.width,
> - crop->width / DCMIPP_MAX_DOWNSCALE_RATIO,
> + DIV_ROUND_UP(crop->width, DCMIPP_MAX_DOWNSCALE_RATIO),
> crop->width);
> s->r.height = clamp_t(u32, s->r.height,
> - crop->height / DCMIPP_MAX_DOWNSCALE_RATIO,
> + DIV_ROUND_UP(crop->height, DCMIPP_MAX_DOWNSCALE_RATIO),
> crop->height);
> v4l2_rect_set_min_size(&s->r, &min_rect);
> *compose = s->r;
Acked-by: Alain Volmat <alain.volmat@foss.st.com>
Regards,
Alain
> --
> 2.55.0
>
prev parent reply other threads:[~2026-11-03 12:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 3:20 David Carlier
2026-11-03 12:51 ` Alain Volmat [this message]
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=aunYu3XpKWjx20AS@gnbcxd0016.gnb.st.com \
--to=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=devnexen@gmail.com \
--cc=hugues.fruchet@foss.st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mchehab@kernel.org \
--cc=mcoquelin.stm32@gmail.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
all inboxes | Powered by JetHome®