aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Schellen <Johannes.Schellen@rwth-aachen.de>2013-01-11 10:00:19 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-05 11:50:49 -0500
commit58bc8b7e380554d2d32f8d7f776a019cefc8afbf (patch)
treede7986c22ed06dc2a7e14c27ecbe66d4ac986a91
parentcf2b4cf661bd183791ebc0a7ab091de77a1748b0 (diff)
[media] omap3isp: Fix histogram regions
This patch fixes a bug which causes all histogram regions to start in the top left corner of the image. The histogram region coordinates are 16 bit values which share a 32 bit register. The bug is due to the region end value assignments overwriting the region start values with zero. Signed-off-by: Johannes Schellen <Johannes.Schellen@rwth-aachen.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/platform/omap3isp/isphist.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/platform/omap3isp/isphist.c b/drivers/media/platform/omap3isp/isphist.c
index 2ccc4e5702b2..e070c24048ef 100644
--- a/drivers/media/platform/omap3isp/isphist.c
+++ b/drivers/media/platform/omap3isp/isphist.c
@@ -114,14 +114,14 @@ static void hist_setup_regs(struct ispstat *hist, void *priv)
114 /* Regions size and position */ 114 /* Regions size and position */
115 for (c = 0; c < OMAP3ISP_HIST_MAX_REGIONS; c++) { 115 for (c = 0; c < OMAP3ISP_HIST_MAX_REGIONS; c++) {
116 if (c < conf->num_regions) { 116 if (c < conf->num_regions) {
117 reg_hor[c] = conf->region[c].h_start << 117 reg_hor[c] = (conf->region[c].h_start <<
118 ISPHIST_REG_START_SHIFT; 118 ISPHIST_REG_START_SHIFT)
119 reg_hor[c] = conf->region[c].h_end << 119 | (conf->region[c].h_end <<
120 ISPHIST_REG_END_SHIFT; 120 ISPHIST_REG_END_SHIFT);
121 reg_ver[c] = conf->region[c].v_start << 121 reg_ver[c] = (conf->region[c].v_start <<
122 ISPHIST_REG_START_SHIFT; 122 ISPHIST_REG_START_SHIFT)
123 reg_ver[c] = conf->region[c].v_end << 123 | (conf->region[c].v_end <<
124 ISPHIST_REG_END_SHIFT; 124 ISPHIST_REG_END_SHIFT);
125 } else { 125 } else {
126 reg_hor[c] = 0; 126 reg_hor[c] = 0;
127 reg_ver[c] = 0; 127 reg_ver[c] = 0;