diff options
author | Lajos Molnar <molnar@ti.com> | 2011-07-27 19:52:45 -0500 |
---|---|---|
committer | Erik Gilling <konkers@android.com> | 2011-07-28 11:12:39 -0700 |
commit | 74ee24a54b3cb17fce170ee1d8b6c60df980b506 (patch) | |
tree | c24f0d8dbfd540d574d314233646e7798f22af1d | |
parent | 5bbc925b36858142a91f64a7782a2208577d519f (diff) | |
download | kernel_samsung_tuna-74ee24a54b3cb17fce170ee1d8b6c60df980b506.zip kernel_samsung_tuna-74ee24a54b3cb17fce170ee1d8b6c60df980b506.tar.gz kernel_samsung_tuna-74ee24a54b3cb17fce170ee1d8b6c60df980b506.tar.bz2 |
OMAP4:DSS: Add missing max y-decimation limit to predecimation.
Max y-decimation limit was missing from predecimation patch, so
it was possible to set up unsupported y-decimation scenarios.
This is now fixed.
Change-Id: I36ed9de7f5c32ad664e4e31b9f3ab31d1f3f4086
Signed-off-by: Lajos Molnar <molnar@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 5 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/manager.c | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index d2b1912..4d03fd4 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -1828,6 +1828,7 @@ int dispc_scaling_decision(u16 width, u16 height, enum omap_plane plane, enum omap_color_mode color_mode, enum omap_channel channel, u8 rotation, + enum omap_dss_rotation_type type, u16 min_x_decim, u16 max_x_decim, u16 min_y_decim, u16 max_y_decim, u16 *x_decim, u16 *y_decim, bool *five_taps) @@ -1849,6 +1850,7 @@ int dispc_scaling_decision(u16 width, u16 height, int min_factor, max_factor; /* decimation search limits */ int x, y; /* decimation search variables */ unsigned long fclk_max = dispc_fclk_rate(); + u16 y_decim_limit = type == OMAP_DSS_ROT_TILER ? 2 : 16; /* No decimation for bitmap formats */ if (color_mode == OMAP_DSS_COLOR_CLUT1 || @@ -1875,6 +1877,9 @@ int dispc_scaling_decision(u16 width, u16 height, if (min_y_decim > 1) return -EINVAL; min_y_decim = max_y_decim = 1; + } else { + if (max_y_decim > y_decim_limit) + max_y_decim = y_decim_limit; } /* diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index bed345e..6cd2248 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -433,6 +433,7 @@ int dispc_scaling_decision(u16 width, u16 height, enum omap_plane plane, enum omap_color_mode color_mode, enum omap_channel channel, u8 rotation, + enum omap_dss_rotation_type type, u16 min_x_decim, u16 max_x_decim, u16 min_y_decim, u16 max_y_decim, u16 *x_decim, u16 *y_decim, bool *three_tap); diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 3e5654a..c3f96eb 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -1038,7 +1038,8 @@ static int configure_overlay(enum omap_plane plane) r = dispc_scaling_decision(w, h, outw, outh, plane, c->color_mode, c->channel, - c->rotation, c->min_x_decim, c->max_x_decim, + c->rotation, c->rotation_type, + c->min_x_decim, c->max_x_decim, c->min_y_decim, c->max_y_decim, &x_decim, &y_decim, &five_taps); r = r ? : dispc_setup_plane(plane, |