Skip to content

Commit 66d81de

Browse files
mmindmchehab
authored andcommitted
media: rockchip: rkisp1: reduce number of histogram grid elements in uapi
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> Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent a802a04 commit 66d81de

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/media/platform/rockchip/rkisp1/rkisp1-params.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,6 @@ static void rkisp1_hst_config(struct rkisp1_params *params,
589589
RKISP1_CIF_ISP_HIST_WEIGHT_22TO03,
590590
RKISP1_CIF_ISP_HIST_WEIGHT_13TO43,
591591
RKISP1_CIF_ISP_HIST_WEIGHT_04TO34,
592-
RKISP1_CIF_ISP_HIST_WEIGHT_44,
593592
};
594593
const u8 *weight;
595594
unsigned int i;
@@ -622,6 +621,8 @@ static void rkisp1_hst_config(struct rkisp1_params *params,
622621
weight[2],
623622
weight[3]),
624623
hist_weight_regs[i]);
624+
625+
rkisp1_write(params->rkisp1, weight[0] & 0x1F, RKISP1_CIF_ISP_HIST_WEIGHT_44);
625626
}
626627

627628
static void

include/uapi/linux/rkisp1-config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@
102102
/*
103103
* Histogram calculation
104104
*/
105-
/* Last 3 values unused. */
106-
#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 28
105+
#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 25
107106

108107
/*
109108
* Defect Pixel Cluster Correction

0 commit comments

Comments
 (0)