* [PATCH] media: nxp: imx8-isi: Drop unneeded downscaling factor clamping
@ 2026-05-20 20:27 Laurent Pinchart
2026-06-29 19:35 ` Frank.Li
0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2026-05-20 20:27 UTC (permalink / raw)
To: linux-media; +Cc: Guoniu Zhou, Frank Li, Dong Aisheng, Jacopo Mondi, imx
The total scaling factor including bi-linear downscaling and decimation
is clamped to 16. The bilinear factor calculation therefore produceds
values guaranteed not to exceed the maximum factor of 2.0. The clamping
is unneeded, drop it.
Note that the ISI_DOWNSCALE_THRESHOLD value of 0x4000 is incorrect, as
that would be a factor of 4.0. This was inconsequential given that the
computed factor never exceeded 0x2000.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c
index 16b20ea2d1db..e07eebae9e2b 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c
@@ -11,8 +11,6 @@
#include "imx8-isi-core.h"
#include "imx8-isi-regs.h"
-#define ISI_DOWNSCALE_THRESHOLD 0x4000
-
static inline u32 mxc_isi_read(struct mxc_isi_pipe *pipe, u32 reg)
{
return readl(pipe->regs + reg);
@@ -118,8 +116,7 @@ static u32 mxc_isi_channel_scaling_ratio(unsigned int from, unsigned int to,
* output (input / scale_factor) rounds up to exactly the desired
* output.
*/
- return min_t(u32, DIV_ROUND_UP(from * 0x1000, to * *dec),
- ISI_DOWNSCALE_THRESHOLD);
+ return DIV_ROUND_UP(from * 0x1000, to * *dec);
}
static void mxc_isi_channel_set_scaling(struct mxc_isi_pipe *pipe,
base-commit: d97d13c24d7893abcfb80d38630ce74daaa1434c
prerequisite-patch-id: 2d7379698fb55fe2345d604dfb73914f91705a5a
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: nxp: imx8-isi: Drop unneeded downscaling factor clamping
2026-05-20 20:27 [PATCH] media: nxp: imx8-isi: Drop unneeded downscaling factor clamping Laurent Pinchart
@ 2026-06-29 19:35 ` Frank.Li
2026-06-29 20:11 ` Laurent Pinchart
0 siblings, 1 reply; 3+ messages in thread
From: Frank.Li @ 2026-06-29 19:35 UTC (permalink / raw)
To: linux-media, Laurent Pinchart
Cc: Frank Li, Guoniu Zhou, Frank Li, Dong Aisheng, Jacopo Mondi, imx
From: Frank Li <Frank.Li@nxp.com>
On Wed, 20 May 2026 22:27:38 +0200, Laurent Pinchart wrote:
> The total scaling factor including bi-linear downscaling and decimation
> is clamped to 16. The bilinear factor calculation therefore produceds
> values guaranteed not to exceed the maximum factor of 2.0. The clamping
> is unneeded, drop it.
>
> Note that the ISI_DOWNSCALE_THRESHOLD value of 0x4000 is incorrect, as
> that would be a factor of 4.0. This was inconsequential given that the
> computed factor never exceeded 0x2000.
>
> [...]
Applied, thanks!
[1/1] media: nxp: imx8-isi: Drop unneeded downscaling factor clamping
commit: 5f074ef2f1fa19d8730f5c0329ff2f7633639875
Best regards,
--
Frank Li <Frank.Li@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: nxp: imx8-isi: Drop unneeded downscaling factor clamping
2026-06-29 19:35 ` Frank.Li
@ 2026-06-29 20:11 ` Laurent Pinchart
0 siblings, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2026-06-29 20:11 UTC (permalink / raw)
To: Frank.Li
Cc: linux-media, Frank Li, Guoniu Zhou, Dong Aisheng, Jacopo Mondi,
imx
Hi Frank,
On Mon, Jun 29, 2026 at 03:35:27PM -0400, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
>
>
> On Wed, 20 May 2026 22:27:38 +0200, Laurent Pinchart wrote:
> > The total scaling factor including bi-linear downscaling and decimation
> > is clamped to 16. The bilinear factor calculation therefore produceds
> > values guaranteed not to exceed the maximum factor of 2.0. The clamping
> > is unneeded, drop it.
> >
> > Note that the ISI_DOWNSCALE_THRESHOLD value of 0x4000 is incorrect, as
> > that would be a factor of 4.0. This was inconsequential given that the
> > computed factor never exceeded 0x2000.
> >
> > [...]
>
> Applied, thanks!
>
> [1/1] media: nxp: imx8-isi: Drop unneeded downscaling factor clamping
> commit: 5f074ef2f1fa19d8730f5c0329ff2f7633639875
Please note that you are not supposed to push patches to the media
committers tree if you're not listed in the MAINTAINERS file for the
driver (as listed as a Linux media submaintainer for the specific part
of the subsystem).
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-29 20:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20 20:27 [PATCH] media: nxp: imx8-isi: Drop unneeded downscaling factor clamping Laurent Pinchart
2026-06-29 19:35 ` Frank.Li
2026-06-29 20:11 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox