aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2011-07-28 11:13:52 -0700
committerErik Gilling <konkers@android.com>2011-07-28 11:13:54 -0700
commit5c307680a7f88216d4af60dab26f055af039f0bf (patch)
tree3bb14638b5dc92de56cf61c33df4ee3f8cfb41d2
parentfcc6cd153f2da1505acd7730b90d849724da9452 (diff)
parentf9ace53d7c88c687d3ca7d8f73a1ce3022bf09cb (diff)
downloadkernel_samsung_tuna-5c307680a7f88216d4af60dab26f055af039f0bf.zip
kernel_samsung_tuna-5c307680a7f88216d4af60dab26f055af039f0bf.tar.gz
kernel_samsung_tuna-5c307680a7f88216d4af60dab26f055af039f0bf.tar.bz2
Merge branch 'linux-omap-dss-3.0' into linux-omap-3.0
Change-Id: I8de5242eeb114d07cc6cd7cc17b5b26fe8accee8
-rw-r--r--drivers/video/omap2/dss/dispc.c8
-rw-r--r--drivers/video/omap2/dss/dss.h1
-rw-r--r--drivers/video/omap2/dss/manager.c3
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index d2b1912..a676cf1 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1148,6 +1148,9 @@ void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high)
hi_start, hi_end),
low, high);
+ /* preload to high threshold to avoid FIFO underflow */
+ dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfffu));
+
dispc_write_reg(DISPC_OVL_FIFO_THRESHOLD(plane),
FLD_VAL(high, hi_start, hi_end) |
FLD_VAL(low, lo_start, lo_end));
@@ -1828,6 +1831,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 +1853,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 +1880,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,