[RFC PATCH v1] media: rppx1: hist: Adjust configured LAST_MEAS_LINE
From: Barnabás Pőcze
Date: Mon Oct 26 2026 - 10:56:01 EST
The `LAST_MEAS_LINE` parameter determines at the end of which line the
interrupt is generated. The documentation states that it is usually
configured to the last line of the measurement window.
Currently it is programmed such that there is a margin of 2 lines after
the last measured line. This is more than what is required by the
documentation. So change it to the documentation suggested value.
Note, that this is in contrast to the "exm" module, where the last line
needs a margin of two lines on account of the division that is carried
out when calculating the average.
Signed-off-by: Barnabás Pőcze <barnabas.pocze+renesas@xxxxxxxxxxxxxxxx>
---
While this has worked in my testing, I'm sending this as an RFC because I'm
not sure if this is maybe a copy-paste issue from the "exm" module or if
someone has noticed scenarios where reality contradicts the documentation.
---
drivers/media/platform/dreamchip/rppx1/rppx1_hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/dreamchip/rppx1/rppx1_hist.c b/drivers/media/platform/dreamchip/rppx1/rppx1_hist.c
index 8fe8cbbc85df7..af82f31e4c86c 100644
--- a/drivers/media/platform/dreamchip/rppx1/rppx1_hist.c
+++ b/drivers/media/platform/dreamchip/rppx1/rppx1_hist.c
@@ -128,7 +128,7 @@ static int rppx1_hist_fill_params(struct rpp_module *mod,
* Set last measurement line for ready interrupt. Ignore the value
* from the parameters as it is only useful for fast-channel switching.
*/
- write(priv, mod->base + HIST_LAST_MEAS_LINE_REG, v_offs + v_size + 1);
+ write(priv, mod->base + HIST_LAST_MEAS_LINE_REG, v_offs + v_size - 1);
/* Set measurement window weights. */
write(priv, mod->base + HIST_WEIGHT_00TO30_REG,
--
2.56.0