From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> To: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl, sakari.ailus@linux.intel.com, heiko@sntech.de Cc: dafna.hirschfeld@collabora.com, helen.koike@collabora.com, ezequiel@collabora.com, kernel@collabora.com, dafna3@gmail.com, linux-rockchip@lists.infradead.org, mchehab@kernel.org, tfiga@chromium.org, Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Subject: [PATCH v8 4/6] media: rockchip: rkisp1: reduce number of histogram grid elements in uapi Date: Thu, 21 Jan 2021 15:44:05 +0100 [thread overview] Message-ID: <20210121144407.9045-5-dafna.hirschfeld@collabora.com> (raw) In-Reply-To: <20210121144407.9045-1-dafna.hirschfeld@collabora.com> From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> The uapi right now specifies an array size of 28 but the actual number of elements is only 25 with the last 3 being unused. Reduce the array size to the correct number of elements and change the params code to iterate the array 25 times. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> --- drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 3 ++- include/uapi/linux/rkisp1-config.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c index 6af4d551ffb5..021939466b24 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c @@ -589,7 +589,6 @@ static void rkisp1_hst_config(struct rkisp1_params *params, RKISP1_CIF_ISP_HIST_WEIGHT_22TO03, RKISP1_CIF_ISP_HIST_WEIGHT_13TO43, RKISP1_CIF_ISP_HIST_WEIGHT_04TO34, - RKISP1_CIF_ISP_HIST_WEIGHT_44, }; const u8 *weight; unsigned int i; @@ -622,6 +621,8 @@ static void rkisp1_hst_config(struct rkisp1_params *params, weight[2], weight[3]), hist_weight_regs[i]); + + rkisp1_write(params->rkisp1, weight[0] & 0x1F, RKISP1_CIF_ISP_HIST_WEIGHT_44); } static void diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h index 24f05d6d258f..35aa82d5f6dd 100644 --- a/include/uapi/linux/rkisp1-config.h +++ b/include/uapi/linux/rkisp1-config.h @@ -102,8 +102,7 @@ /* * Histogram calculation */ -/* Last 3 values unused. */ -#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 28 +#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 25 /* * Defect Pixel Cluster Correction -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> To: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl, sakari.ailus@linux.intel.com, heiko@sntech.de Cc: mchehab@kernel.org, dafna.hirschfeld@collabora.com, Heiko Stuebner <heiko.stuebner@theobroma-systems.com>, dafna3@gmail.com, tfiga@chromium.org, linux-rockchip@lists.infradead.org, helen.koike@collabora.com, kernel@collabora.com, ezequiel@collabora.com Subject: [PATCH v8 4/6] media: rockchip: rkisp1: reduce number of histogram grid elements in uapi Date: Thu, 21 Jan 2021 15:44:05 +0100 [thread overview] Message-ID: <20210121144407.9045-5-dafna.hirschfeld@collabora.com> (raw) In-Reply-To: <20210121144407.9045-1-dafna.hirschfeld@collabora.com> From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> The uapi right now specifies an array size of 28 but the actual number of elements is only 25 with the last 3 being unused. Reduce the array size to the correct number of elements and change the params code to iterate the array 25 times. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> --- drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 3 ++- include/uapi/linux/rkisp1-config.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c index 6af4d551ffb5..021939466b24 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c @@ -589,7 +589,6 @@ static void rkisp1_hst_config(struct rkisp1_params *params, RKISP1_CIF_ISP_HIST_WEIGHT_22TO03, RKISP1_CIF_ISP_HIST_WEIGHT_13TO43, RKISP1_CIF_ISP_HIST_WEIGHT_04TO34, - RKISP1_CIF_ISP_HIST_WEIGHT_44, }; const u8 *weight; unsigned int i; @@ -622,6 +621,8 @@ static void rkisp1_hst_config(struct rkisp1_params *params, weight[2], weight[3]), hist_weight_regs[i]); + + rkisp1_write(params->rkisp1, weight[0] & 0x1F, RKISP1_CIF_ISP_HIST_WEIGHT_44); } static void diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h index 24f05d6d258f..35aa82d5f6dd 100644 --- a/include/uapi/linux/rkisp1-config.h +++ b/include/uapi/linux/rkisp1-config.h @@ -102,8 +102,7 @@ /* * Histogram calculation */ -/* Last 3 values unused. */ -#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 28 +#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 25 /* * Defect Pixel Cluster Correction -- 2.17.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2021-01-21 14:46 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-21 14:44 [PATCH v8 0/6] Fix the rkisp1 userspace API for later IP versions Dafna Hirschfeld 2021-01-21 14:44 ` Dafna Hirschfeld 2021-01-21 14:44 ` [PATCH v8 1/6] media: rkisp1: uapi: change hist_bins array type from __u16 to __u32 Dafna Hirschfeld 2021-01-21 14:44 ` Dafna Hirschfeld 2021-01-21 14:44 ` [PATCH v8 2/6] media: rkisp1: stats: remove a wrong cast to u8 Dafna Hirschfeld 2021-01-21 14:44 ` Dafna Hirschfeld 2021-01-21 14:44 ` [PATCH v8 3/6] media: rkisp1: stats: mask the hist_bins values Dafna Hirschfeld 2021-01-21 14:44 ` Dafna Hirschfeld 2021-01-21 14:44 ` Dafna Hirschfeld [this message] 2021-01-21 14:44 ` [PATCH v8 4/6] media: rockchip: rkisp1: reduce number of histogram grid elements in uapi Dafna Hirschfeld 2021-01-21 17:04 ` Helen Koike 2021-01-21 17:04 ` Helen Koike 2021-01-21 17:12 ` Heiko Stübner 2021-01-21 17:12 ` Heiko Stübner 2021-01-21 17:22 ` Helen Koike 2021-01-21 17:22 ` Helen Koike 2021-01-21 14:44 ` [PATCH v8 5/6] media: rockchip: rkisp1: carry ip version information Dafna Hirschfeld 2021-01-21 14:44 ` Dafna Hirschfeld 2021-01-21 14:44 ` [PATCH v8 6/6] media: rockchip: rkisp1: extend uapi array sizes Dafna Hirschfeld 2021-01-21 14:44 ` Dafna Hirschfeld
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=20210121144407.9045-5-dafna.hirschfeld@collabora.com \ --to=dafna.hirschfeld@collabora.com \ --cc=dafna3@gmail.com \ --cc=ezequiel@collabora.com \ --cc=heiko.stuebner@theobroma-systems.com \ --cc=heiko@sntech.de \ --cc=helen.koike@collabora.com \ --cc=hverkuil@xs4all.nl \ --cc=kernel@collabora.com \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-media@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=mchehab@kernel.org \ --cc=sakari.ailus@linux.intel.com \ --cc=tfiga@chromium.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.