From: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Stefan Riedmueller <s.riedmueller@phytec.de>,
Jacopo Mondi <jacopo@jmondi.org>,
Christian Hemp <c.hemp@phytec.de>, Frank Li <frank.li@nxp.com>
Cc: Dong Aisheng <aisheng.dong@nxp.com>,
linux-media@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Guoniu Zhou <guoniu.zhou@nxp.com>,
stable@vger.kernel.org, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v3 0/2] media: nxp: imx8-isi: Fix scaler rounding and downscaling limits
Date: Mon, 23 Mar 2026 16:33:29 +0800 [thread overview]
Message-ID: <20260323-isi-v3-0-8df53b24e622@oss.nxp.com> (raw)
Patch 1/2 enforces the 16x downscaling limit to prevent out-of-bounds access.
Patch 2/2 ensures the scale factor accounts for ISI's rounding-up behavior
to avoid producing one extra output line.
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
Changes in v3:
- New patch 2/2 to fix scale factor rounding
- Replace CLAMP_DOWNSCALE_16 macro with inline function
- Adjust downscale threshold from 0x4000 to 0x2000
- Clarify downscaling limit in comment
- Link to v2: https://lore.kernel.org/all/20260228-isi-v2-1-f6f9208c6844@nxp.com/
Changes in v2:
- Fix possible side-effects caused by 'max_val' in CLAMP_DOWNSCALE_16 macro.
- Add space line between two paragraph in comment.
- Link to v1: https://lore.kernel.org/r/20260122-isi-v1-1-c3ec6e264f13@nxp.com
---
Guoniu Zhou (2):
media: nxp: imx8-isi: Fix potential out-of-bounds issues
media: nxp: imx8-isi: Fix scale factor calculation for hardware rounding
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h | 16 ++++++++++++++++
drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c | 13 +++++++++++--
drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c | 11 ++++++++---
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c | 13 ++++++++-----
4 files changed, 43 insertions(+), 10 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260122-isi-74f87fbb9a6f
Best regards,
--
Guoniu Zhou <guoniu.zhou@oss.nxp.com>
next reply other threads:[~2026-03-23 8:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 8:33 Guoniu Zhou [this message]
2026-03-23 8:33 ` [PATCH v3 1/2] media: nxp: imx8-isi: Fix potential out-of-bounds issues Guoniu Zhou
2026-05-20 17:41 ` Laurent Pinchart
2026-03-23 8:33 ` [PATCH v3 2/2] media: nxp: imx8-isi: Fix scale factor calculation for hardware rounding Guoniu Zhou
2026-05-20 19:37 ` Laurent Pinchart
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=20260323-isi-v3-0-8df53b24e622@oss.nxp.com \
--to=guoniu.zhou@oss.nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=c.hemp@phytec.de \
--cc=festevam@gmail.com \
--cc=frank.li@nxp.com \
--cc=guoniu.zhou@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jacopo@jmondi.org \
--cc=kernel@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=s.riedmueller@phytec.de \
--cc=shawnguo@kernel.org \
--cc=stable@vger.kernel.org \
/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®