[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12c8f50e-3bba-5936-6e67-55bd928a75c7@xs4all.nl>
Date: Mon, 8 Feb 2021 21:46:57 +0100
From: Hans Verkuil <hverkuil-cisco@...all.nl>
To: Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>,
Helen Koike <helen.koike@...labora.com>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-media@...r.kernel.org, devel@...verdev.osuosl.org
Subject: Re: [PATCH AUTOSEL 5.10 14/36] media: rkisp1: uapi: change hist_bins
array type from __u16 to __u32
On 08/02/2021 18:57, Sasha Levin wrote:
> From: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
>
> [ Upstream commit 31f190e0ccac8b75d33fdc95a797c526cf9b149e ]
>
> Each entry in the array is a 20 bits value composed of 16 bits unsigned
> integer and 4 bits fractional part. So the type should change to __u32.
> In addition add a documentation of how the measurements are done.
Dafna, Helen, does it make sense at all to backport these three patches to
when rkisp1 was a staging driver?
I would be inclined not to backport this.
Regards,
Hans
>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
> Acked-by: Helen Koike <helen.koike@...labora.com>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@...all.nl>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
> drivers/staging/media/rkisp1/uapi/rkisp1-config.h | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/media/rkisp1/uapi/rkisp1-config.h b/drivers/staging/media/rkisp1/uapi/rkisp1-config.h
> index 432cb6be55b47..c19fe059c2442 100644
> --- a/drivers/staging/media/rkisp1/uapi/rkisp1-config.h
> +++ b/drivers/staging/media/rkisp1/uapi/rkisp1-config.h
> @@ -848,13 +848,18 @@ struct rkisp1_cif_isp_af_stat {
> /**
> * struct rkisp1_cif_isp_hist_stat - statistics histogram data
> *
> - * @hist_bins: measured bin counters
> + * @hist_bins: measured bin counters. Each bin is a 20 bits unsigned fixed point
> + * type. Bits 0-4 are the fractional part and bits 5-19 are the
> + * integer part.
> *
> - * Measurement window divided into 25 sub-windows, set
> - * with ISP_HIST_XXX
> + * The window of the measurements area is divided to 5x5 sub-windows. The
> + * histogram is then computed for each sub-window independently and the final
> + * result is a weighted average of the histogram measurements on all
> + * sub-windows. The window of the measurements area and the weight of each
> + * sub-window are configurable using struct @rkisp1_cif_isp_hst_config.
> */
> struct rkisp1_cif_isp_hist_stat {
> - __u16 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];
> + __u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];
> };
>
> /**
>
Powered by blists - more mailing lists