aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-21 06:54:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-03 16:33:49 -0400
commite4bc6272ab3f7cb0b56705f78320e361880411e1 (patch)
tree39f68cc3543909707f8090766e5c81e790bac722 /drivers/media/video
parent083eb07854e128a0ed7d79390baae2439755ebdd (diff)
[media] omap3isp: preview: Remove horizontal averager support
The horizontal averager isn't used and will get in the way when implementing cropping support on the input pad. Remove it, it can be added back later if needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/omap3isp/isppreview.c18
-rw-r--r--drivers/media/video/omap3isp/isppreview.h7
2 files changed, 2 insertions, 23 deletions
diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c
index b3818356b6f3..c920c1e17ae9 100644
--- a/drivers/media/video/omap3isp/isppreview.c
+++ b/drivers/media/video/omap3isp/isppreview.c
@@ -1228,7 +1228,6 @@ static void preview_init_params(struct isp_prev_device *prev)
1228 /* Init values */ 1228 /* Init values */
1229 params->contrast = ISPPRV_CONTRAST_DEF * ISPPRV_CONTRAST_UNITS; 1229 params->contrast = ISPPRV_CONTRAST_DEF * ISPPRV_CONTRAST_UNITS;
1230 params->brightness = ISPPRV_BRIGHT_DEF * ISPPRV_BRIGHT_UNITS; 1230 params->brightness = ISPPRV_BRIGHT_DEF * ISPPRV_BRIGHT_UNITS;
1231 params->average = NO_AVE;
1232 params->cfa.format = OMAP3ISP_CFAFMT_BAYER; 1231 params->cfa.format = OMAP3ISP_CFAFMT_BAYER;
1233 memcpy(params->cfa.table, cfa_coef_table, 1232 memcpy(params->cfa.table, cfa_coef_table,
1234 sizeof(params->cfa.table)); 1233 sizeof(params->cfa.table));
@@ -1297,7 +1296,6 @@ static void preview_configure(struct isp_prev_device *prev)
1297 struct isp_device *isp = to_isp_device(prev); 1296 struct isp_device *isp = to_isp_device(prev);
1298 struct v4l2_mbus_framefmt *format; 1297 struct v4l2_mbus_framefmt *format;
1299 unsigned int max_out_width; 1298 unsigned int max_out_width;
1300 unsigned int format_avg;
1301 1299
1302 preview_setup_hw(prev); 1300 preview_setup_hw(prev);
1303 1301
@@ -1337,8 +1335,7 @@ static void preview_configure(struct isp_prev_device *prev)
1337 1335
1338 max_out_width = preview_max_out_width(prev); 1336 max_out_width = preview_max_out_width(prev);
1339 1337
1340 format_avg = fls(DIV_ROUND_UP(format->width, max_out_width) - 1); 1338 preview_config_averager(prev, 0);
1341 preview_config_averager(prev, format_avg);
1342 preview_config_ycpos(prev, format->code); 1339 preview_config_ycpos(prev, format->code);
1343} 1340}
1344 1341
@@ -1642,7 +1639,7 @@ static void preview_try_format(struct isp_prev_device *prev,
1642 */ 1639 */
1643 if (prev->input == PREVIEW_INPUT_MEMORY) { 1640 if (prev->input == PREVIEW_INPUT_MEMORY) {
1644 fmt->width = clamp_t(u32, fmt->width, PREV_MIN_WIDTH, 1641 fmt->width = clamp_t(u32, fmt->width, PREV_MIN_WIDTH,
1645 max_out_width * 8); 1642 max_out_width);
1646 fmt->height = clamp_t(u32, fmt->height, PREV_MIN_HEIGHT, 1643 fmt->height = clamp_t(u32, fmt->height, PREV_MIN_HEIGHT,
1647 PREV_MAX_HEIGHT); 1644 PREV_MAX_HEIGHT);
1648 } 1645 }
@@ -1689,17 +1686,6 @@ static void preview_try_format(struct isp_prev_device *prev,
1689 if (prev->input == PREVIEW_INPUT_CCDC) 1686 if (prev->input == PREVIEW_INPUT_CCDC)
1690 fmt->width -= 4; 1687 fmt->width -= 4;
1691 1688
1692 /* The preview module can output a maximum of 3312 pixels
1693 * horizontally due to fixed memory-line sizes. Compute the
1694 * horizontal averaging factor accordingly. Note that the limit
1695 * applies to the noise filter and CFA interpolation blocks, so
1696 * it doesn't take cropping by further blocks into account.
1697 *
1698 * ES 1.0 hardware revision is limited to 1280 pixels
1699 * horizontally.
1700 */
1701 fmt->width >>= fls(DIV_ROUND_UP(fmt->width, max_out_width) - 1);
1702
1703 /* Assume that all blocks are enabled and crop pixels and lines 1689 /* Assume that all blocks are enabled and crop pixels and lines
1704 * accordingly. See preview_config_input_size() for more 1690 * accordingly. See preview_config_input_size() for more
1705 * information. 1691 * information.
diff --git a/drivers/media/video/omap3isp/isppreview.h b/drivers/media/video/omap3isp/isppreview.h
index fa943bd05c7f..272a44a2b9bc 100644
--- a/drivers/media/video/omap3isp/isppreview.h
+++ b/drivers/media/video/omap3isp/isppreview.h
@@ -45,11 +45,6 @@
45#define ISPPRV_CONTRAST_HIGH 0xFF 45#define ISPPRV_CONTRAST_HIGH 0xFF
46#define ISPPRV_CONTRAST_UNITS 0x1 46#define ISPPRV_CONTRAST_UNITS 0x1
47 47
48#define NO_AVE 0x0
49#define AVE_2_PIX 0x1
50#define AVE_4_PIX 0x2
51#define AVE_8_PIX 0x3
52
53/* Features list */ 48/* Features list */
54#define PREV_LUMA_ENHANCE OMAP3ISP_PREV_LUMAENH 49#define PREV_LUMA_ENHANCE OMAP3ISP_PREV_LUMAENH
55#define PREV_INVERSE_ALAW OMAP3ISP_PREV_INVALAW 50#define PREV_INVERSE_ALAW OMAP3ISP_PREV_INVALAW
@@ -106,7 +101,6 @@ enum preview_ycpos_mode {
106 * @rgb2ycbcr: RGB to ycbcr parameters. 101 * @rgb2ycbcr: RGB to ycbcr parameters.
107 * @hmed: Horizontal median filter. 102 * @hmed: Horizontal median filter.
108 * @yclimit: YC limits parameters. 103 * @yclimit: YC limits parameters.
109 * @average: Downsampling rate for averager.
110 * @contrast: Contrast. 104 * @contrast: Contrast.
111 * @brightness: Brightness. 105 * @brightness: Brightness.
112 */ 106 */
@@ -124,7 +118,6 @@ struct prev_params {
124 struct omap3isp_prev_csc rgb2ycbcr; 118 struct omap3isp_prev_csc rgb2ycbcr;
125 struct omap3isp_prev_hmed hmed; 119 struct omap3isp_prev_hmed hmed;
126 struct omap3isp_prev_yclimit yclimit; 120 struct omap3isp_prev_yclimit yclimit;
127 u8 average;
128 u8 contrast; 121 u8 contrast;
129 u8 brightness; 122 u8 brightness;
130}; 123};