Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273726
b: refs/heads/master
c: 059dc1d
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent aeec5bf commit 41f92a9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4bc6272ab3f7cb0b56705f78320e361880411e1
refs/heads/master: 059dc1d9841f061e5767b95822fb4035ad7559fc
33 changes: 17 additions & 16 deletions trunk/drivers/media/video/omap3isp/isppreview.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ static struct omap3isp_prev_csc flr_prev_csc = {

#define DEF_DETECT_CORRECT_VAL 0xe

#define PREV_MIN_WIDTH 64
#define PREV_MIN_HEIGHT 8
#define PREV_MAX_HEIGHT 16384
#define PREV_MIN_IN_WIDTH 64
#define PREV_MIN_IN_HEIGHT 8
#define PREV_MAX_IN_HEIGHT 16384

#define PREV_MIN_OUT_WIDTH 0
#define PREV_MIN_OUT_HEIGHT 0
#define PREV_MAX_OUT_WIDTH 1280
#define PREV_MAX_OUT_WIDTH_ES2 3300
#define PREV_MAX_OUT_WIDTH_3630 4096

/*
* Coeficient Tables for the submodules in Preview.
Expand Down Expand Up @@ -1280,22 +1286,21 @@ static unsigned int preview_max_out_width(struct isp_prev_device *prev)

switch (isp->revision) {
case ISP_REVISION_1_0:
return ISPPRV_MAXOUTPUT_WIDTH;
return PREV_MAX_OUT_WIDTH;

case ISP_REVISION_2_0:
default:
return ISPPRV_MAXOUTPUT_WIDTH_ES2;
return PREV_MAX_OUT_WIDTH_ES2;

case ISP_REVISION_15_0:
return ISPPRV_MAXOUTPUT_WIDTH_3630;
return PREV_MAX_OUT_WIDTH_3630;
}
}

static void preview_configure(struct isp_prev_device *prev)
{
struct isp_device *isp = to_isp_device(prev);
struct v4l2_mbus_framefmt *format;
unsigned int max_out_width;

preview_setup_hw(prev);

Expand Down Expand Up @@ -1333,8 +1338,6 @@ static void preview_configure(struct isp_prev_device *prev)
preview_config_outlineoffset(prev,
ALIGN(format->width, 0x10) * 2);

max_out_width = preview_max_out_width(prev);

preview_config_averager(prev, 0);
preview_config_ycpos(prev, format->code);
}
Expand Down Expand Up @@ -1620,12 +1623,9 @@ static void preview_try_format(struct isp_prev_device *prev,
enum v4l2_subdev_format_whence which)
{
struct v4l2_mbus_framefmt *format;
unsigned int max_out_width;
enum v4l2_mbus_pixelcode pixelcode;
unsigned int i;

max_out_width = preview_max_out_width(prev);

switch (pad) {
case PREV_PAD_SINK:
/* When reading data from the CCDC, the input size has already
Expand All @@ -1638,10 +1638,11 @@ static void preview_try_format(struct isp_prev_device *prev,
* filter array interpolation.
*/
if (prev->input == PREVIEW_INPUT_MEMORY) {
fmt->width = clamp_t(u32, fmt->width, PREV_MIN_WIDTH,
max_out_width);
fmt->height = clamp_t(u32, fmt->height, PREV_MIN_HEIGHT,
PREV_MAX_HEIGHT);
fmt->width = clamp_t(u32, fmt->width, PREV_MIN_IN_WIDTH,
preview_max_out_width(prev));
fmt->height = clamp_t(u32, fmt->height,
PREV_MIN_IN_HEIGHT,
PREV_MAX_IN_HEIGHT);
}

fmt->colorspace = V4L2_COLORSPACE_SRGB;
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/media/video/omap3isp/ispreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,6 @@
#define ISPPRV_YENH_TABLE_ADDR 0x1000
#define ISPPRV_CFA_TABLE_ADDR 0x1400

#define ISPPRV_MAXOUTPUT_WIDTH 1280
#define ISPPRV_MAXOUTPUT_WIDTH_ES2 3300
#define ISPPRV_MAXOUTPUT_WIDTH_3630 4096
#define ISPRSZ_MIN_OUTPUT 64
#define ISPRSZ_MAX_OUTPUT 3312

Expand Down

0 comments on commit 41f92a9

Please sign in to comment.