diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-06-21 02:35:36 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-07-01 05:07:14 -0400 |
commit | 5ed8cf5b8e053832a3d0552e0a9681a3ff0325ee (patch) | |
tree | 7b344de5b36f8720cc03a762c28931b6126b212f /drivers/video/omap2/dss | |
parent | 15ffa1dac53820bb712851d329ba465f74b00f76 (diff) |
OMAP: DSS2: Fix FIFO threshold and burst size for OMAP4
The DMA FIFO threshold registers and burst size registers have changed
for OMAP4. The current code only handles OMAP2/3 case, and so the
values are a bit off for OMAP4. A summary of the differences between
OMAP2/3 and OMAP4:
Burst size:
OMAP2/3: 4 x 32 bits / 8 x 32 bits / 16 x 32 bits
OMAP4: 2 x 128 bits / 4 x 128 bits / 8 x 128 bits
Threshold size:
OMAP2/3: in bytes (8 bit units)
OMAP4: in 128bit units
This patch fixes the issue by creating two new helper functions in
dss_features: dss_feat_get_buffer_size_unit() and
dss_feat_get_burst_size_unit(). These return (in bytes) the unit size
for threshold registers and unit size for burst size register,
respectively, and are used to calculate correct values.
For the threshold size the usage is straightforward. However, the burst
size register has different multipliers for OMAP2/3 and OMAP4. This
patch solves the problem by defining the multipliers for the burst size
as 2x, 4x and 8x, which fit fine for the OMAP4 burst size definition
(i.e. burst size unit for OMAP4 is 128bits), but requires a slight twist
on OMAP2/3 by defining the burst size unit as 64bit.
As the driver in practice always uses the maximum burst size, and no use
case currently exists where we would want to use a smaller burst size,
this patch changes the driver to hardcode the burst size when
initializing DISPC. This makes the threshold configuration code somewhat
simpler.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 50 | ||||
-rw-r--r-- | drivers/video/omap2/dss/display.c | 12 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 11 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 15 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 23 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/manager.c | 12 |
7 files changed, 86 insertions, 40 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 1abed77e9897..ba1ccf709e14 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -78,6 +78,12 @@ struct dispc_v_coef { | |||
78 | s8 vc00; | 78 | s8 vc00; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | enum omap_burst_size { | ||
82 | BURST_SIZE_X2 = 0, | ||
83 | BURST_SIZE_X4 = 1, | ||
84 | BURST_SIZE_X8 = 2, | ||
85 | }; | ||
86 | |||
81 | #define REG_GET(idx, start, end) \ | 87 | #define REG_GET(idx, start, end) \ |
82 | FLD_GET(dispc_read_reg(idx), start, end) | 88 | FLD_GET(dispc_read_reg(idx), start, end) |
83 | 89 | ||
@@ -992,11 +998,10 @@ static void _dispc_set_channel_out(enum omap_plane plane, | |||
992 | dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), val); | 998 | dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), val); |
993 | } | 999 | } |
994 | 1000 | ||
995 | void dispc_set_burst_size(enum omap_plane plane, | 1001 | static void dispc_set_burst_size(enum omap_plane plane, |
996 | enum omap_burst_size burst_size) | 1002 | enum omap_burst_size burst_size) |
997 | { | 1003 | { |
998 | int shift; | 1004 | int shift; |
999 | u32 val; | ||
1000 | 1005 | ||
1001 | enable_clocks(1); | 1006 | enable_clocks(1); |
1002 | 1007 | ||
@@ -1013,13 +1018,28 @@ void dispc_set_burst_size(enum omap_plane plane, | |||
1013 | return; | 1018 | return; |
1014 | } | 1019 | } |
1015 | 1020 | ||
1016 | val = dispc_read_reg(DISPC_OVL_ATTRIBUTES(plane)); | 1021 | REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), burst_size, shift + 1, shift); |
1017 | val = FLD_MOD(val, burst_size, shift+1, shift); | ||
1018 | dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), val); | ||
1019 | 1022 | ||
1020 | enable_clocks(0); | 1023 | enable_clocks(0); |
1021 | } | 1024 | } |
1022 | 1025 | ||
1026 | static void dispc_configure_burst_sizes(void) | ||
1027 | { | ||
1028 | int i; | ||
1029 | const int burst_size = BURST_SIZE_X8; | ||
1030 | |||
1031 | /* Configure burst size always to maximum size */ | ||
1032 | for (i = 0; i < omap_dss_get_num_overlays(); ++i) | ||
1033 | dispc_set_burst_size(i, burst_size); | ||
1034 | } | ||
1035 | |||
1036 | u32 dispc_get_burst_size(enum omap_plane plane) | ||
1037 | { | ||
1038 | unsigned unit = dss_feat_get_burst_size_unit(); | ||
1039 | /* burst multiplier is always x8 (see dispc_configure_burst_sizes()) */ | ||
1040 | return unit * 8; | ||
1041 | } | ||
1042 | |||
1023 | void dispc_enable_gamma_table(bool enable) | 1043 | void dispc_enable_gamma_table(bool enable) |
1024 | { | 1044 | { |
1025 | /* | 1045 | /* |
@@ -1118,14 +1138,17 @@ static void dispc_read_plane_fifo_sizes(void) | |||
1118 | u32 size; | 1138 | u32 size; |
1119 | int plane; | 1139 | int plane; |
1120 | u8 start, end; | 1140 | u8 start, end; |
1141 | u32 unit; | ||
1142 | |||
1143 | unit = dss_feat_get_buffer_size_unit(); | ||
1121 | 1144 | ||
1122 | enable_clocks(1); | 1145 | enable_clocks(1); |
1123 | 1146 | ||
1124 | dss_feat_get_reg_field(FEAT_REG_FIFOSIZE, &start, &end); | 1147 | dss_feat_get_reg_field(FEAT_REG_FIFOSIZE, &start, &end); |
1125 | 1148 | ||
1126 | for (plane = 0; plane < ARRAY_SIZE(dispc.fifo_size); ++plane) { | 1149 | for (plane = 0; plane < ARRAY_SIZE(dispc.fifo_size); ++plane) { |
1127 | size = FLD_GET(dispc_read_reg(DISPC_OVL_FIFO_SIZE_STATUS(plane)), | 1150 | size = REG_GET(DISPC_OVL_FIFO_SIZE_STATUS(plane), start, end); |
1128 | start, end); | 1151 | size *= unit; |
1129 | dispc.fifo_size[plane] = size; | 1152 | dispc.fifo_size[plane] = size; |
1130 | } | 1153 | } |
1131 | 1154 | ||
@@ -1137,9 +1160,18 @@ u32 dispc_get_plane_fifo_size(enum omap_plane plane) | |||
1137 | return dispc.fifo_size[plane]; | 1160 | return dispc.fifo_size[plane]; |
1138 | } | 1161 | } |
1139 | 1162 | ||
1140 | void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high) | 1163 | void dispc_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high) |
1141 | { | 1164 | { |
1142 | u8 hi_start, hi_end, lo_start, lo_end; | 1165 | u8 hi_start, hi_end, lo_start, lo_end; |
1166 | u32 unit; | ||
1167 | |||
1168 | unit = dss_feat_get_buffer_size_unit(); | ||
1169 | |||
1170 | WARN_ON(low % unit != 0); | ||
1171 | WARN_ON(high % unit != 0); | ||
1172 | |||
1173 | low /= unit; | ||
1174 | high /= unit; | ||
1143 | 1175 | ||
1144 | dss_feat_get_reg_field(FEAT_REG_FIFOHIGHTHRESHOLD, &hi_start, &hi_end); | 1176 | dss_feat_get_reg_field(FEAT_REG_FIFOHIGHTHRESHOLD, &hi_start, &hi_end); |
1145 | dss_feat_get_reg_field(FEAT_REG_FIFOLOWTHRESHOLD, &lo_start, &lo_end); | 1177 | dss_feat_get_reg_field(FEAT_REG_FIFOLOWTHRESHOLD, &lo_start, &lo_end); |
@@ -3624,6 +3656,8 @@ static void _omap_dispc_initial_config(void) | |||
3624 | dispc_set_loadmode(OMAP_DSS_LOAD_FRAME_ONLY); | 3656 | dispc_set_loadmode(OMAP_DSS_LOAD_FRAME_ONLY); |
3625 | 3657 | ||
3626 | dispc_read_plane_fifo_sizes(); | 3658 | dispc_read_plane_fifo_sizes(); |
3659 | |||
3660 | dispc_configure_burst_sizes(); | ||
3627 | } | 3661 | } |
3628 | 3662 | ||
3629 | int dispc_enable_plane(enum omap_plane plane, bool enable) | 3663 | int dispc_enable_plane(enum omap_plane plane, bool enable) |
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index a0bbdf6684b1..94495e45ec5a 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <video/omapdss.h> | 30 | #include <video/omapdss.h> |
31 | #include "dss.h" | 31 | #include "dss.h" |
32 | #include "dss_features.h" | ||
32 | 33 | ||
33 | static ssize_t display_enabled_show(struct device *dev, | 34 | static ssize_t display_enabled_show(struct device *dev, |
34 | struct device_attribute *attr, char *buf) | 35 | struct device_attribute *attr, char *buf) |
@@ -282,16 +283,13 @@ void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | |||
282 | EXPORT_SYMBOL(omapdss_default_get_resolution); | 283 | EXPORT_SYMBOL(omapdss_default_get_resolution); |
283 | 284 | ||
284 | void default_get_overlay_fifo_thresholds(enum omap_plane plane, | 285 | void default_get_overlay_fifo_thresholds(enum omap_plane plane, |
285 | u32 fifo_size, enum omap_burst_size *burst_size, | 286 | u32 fifo_size, u32 burst_size, |
286 | u32 *fifo_low, u32 *fifo_high) | 287 | u32 *fifo_low, u32 *fifo_high) |
287 | { | 288 | { |
288 | unsigned burst_size_bytes; | 289 | unsigned buf_unit = dss_feat_get_buffer_size_unit(); |
289 | 290 | ||
290 | *burst_size = OMAP_DSS_BURST_16x32; | 291 | *fifo_high = fifo_size - buf_unit; |
291 | burst_size_bytes = 16 * 32 / 8; | 292 | *fifo_low = fifo_size - burst_size; |
292 | |||
293 | *fifo_high = fifo_size - 1; | ||
294 | *fifo_low = fifo_size - burst_size_bytes; | ||
295 | } | 293 | } |
296 | 294 | ||
297 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev) | 295 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev) |
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 2881399be931..795da7281110 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -4320,16 +4320,11 @@ int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable) | |||
4320 | EXPORT_SYMBOL(omapdss_dsi_enable_te); | 4320 | EXPORT_SYMBOL(omapdss_dsi_enable_te); |
4321 | 4321 | ||
4322 | void dsi_get_overlay_fifo_thresholds(enum omap_plane plane, | 4322 | void dsi_get_overlay_fifo_thresholds(enum omap_plane plane, |
4323 | u32 fifo_size, enum omap_burst_size *burst_size, | 4323 | u32 fifo_size, u32 burst_size, |
4324 | u32 *fifo_low, u32 *fifo_high) | 4324 | u32 *fifo_low, u32 *fifo_high) |
4325 | { | 4325 | { |
4326 | unsigned burst_size_bytes; | 4326 | *fifo_high = fifo_size - burst_size; |
4327 | 4327 | *fifo_low = fifo_size - burst_size * 2; | |
4328 | *burst_size = OMAP_DSS_BURST_16x32; | ||
4329 | burst_size_bytes = 16 * 32 / 8; | ||
4330 | |||
4331 | *fifo_high = fifo_size - burst_size_bytes; | ||
4332 | *fifo_low = fifo_size - burst_size_bytes * 2; | ||
4333 | } | 4328 | } |
4334 | 4329 | ||
4335 | int dsi_init_display(struct omap_dss_device *dssdev) | 4330 | int dsi_init_display(struct omap_dss_device *dssdev) |
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 0b4166085b17..0283f48450e6 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -97,12 +97,6 @@ extern unsigned int dss_debug; | |||
97 | #define FLD_MOD(orig, val, start, end) \ | 97 | #define FLD_MOD(orig, val, start, end) \ |
98 | (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end)) | 98 | (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end)) |
99 | 99 | ||
100 | enum omap_burst_size { | ||
101 | OMAP_DSS_BURST_4x32 = 0, | ||
102 | OMAP_DSS_BURST_8x32 = 1, | ||
103 | OMAP_DSS_BURST_16x32 = 2, | ||
104 | }; | ||
105 | |||
106 | enum omap_parallel_interface_mode { | 100 | enum omap_parallel_interface_mode { |
107 | OMAP_DSS_PARALLELMODE_BYPASS, /* MIPI DPI */ | 101 | OMAP_DSS_PARALLELMODE_BYPASS, /* MIPI DPI */ |
108 | OMAP_DSS_PARALLELMODE_RFBI, /* MIPI DBI */ | 102 | OMAP_DSS_PARALLELMODE_RFBI, /* MIPI DBI */ |
@@ -194,7 +188,7 @@ void dss_uninit_device(struct platform_device *pdev, | |||
194 | bool dss_use_replication(struct omap_dss_device *dssdev, | 188 | bool dss_use_replication(struct omap_dss_device *dssdev, |
195 | enum omap_color_mode mode); | 189 | enum omap_color_mode mode); |
196 | void default_get_overlay_fifo_thresholds(enum omap_plane plane, | 190 | void default_get_overlay_fifo_thresholds(enum omap_plane plane, |
197 | u32 fifo_size, enum omap_burst_size *burst_size, | 191 | u32 fifo_size, u32 burst_size, |
198 | u32 *fifo_low, u32 *fifo_high); | 192 | u32 *fifo_low, u32 *fifo_high); |
199 | 193 | ||
200 | /* manager */ | 194 | /* manager */ |
@@ -304,7 +298,7 @@ int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk, | |||
304 | bool enable_hsdiv); | 298 | bool enable_hsdiv); |
305 | void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes); | 299 | void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes); |
306 | void dsi_get_overlay_fifo_thresholds(enum omap_plane plane, | 300 | void dsi_get_overlay_fifo_thresholds(enum omap_plane plane, |
307 | u32 fifo_size, enum omap_burst_size *burst_size, | 301 | u32 fifo_size, u32 burst_size, |
308 | u32 *fifo_low, u32 *fifo_high); | 302 | u32 *fifo_low, u32 *fifo_high); |
309 | void dsi_wait_pll_hsdiv_dispc_active(struct platform_device *dsidev); | 303 | void dsi_wait_pll_hsdiv_dispc_active(struct platform_device *dsidev); |
310 | void dsi_wait_pll_hsdiv_dsi_active(struct platform_device *dsidev); | 304 | void dsi_wait_pll_hsdiv_dsi_active(struct platform_device *dsidev); |
@@ -398,10 +392,9 @@ void dispc_enable_fifohandcheck(enum omap_channel channel, bool enable); | |||
398 | void dispc_set_lcd_size(enum omap_channel channel, u16 width, u16 height); | 392 | void dispc_set_lcd_size(enum omap_channel channel, u16 width, u16 height); |
399 | void dispc_set_digit_size(u16 width, u16 height); | 393 | void dispc_set_digit_size(u16 width, u16 height); |
400 | u32 dispc_get_plane_fifo_size(enum omap_plane plane); | 394 | u32 dispc_get_plane_fifo_size(enum omap_plane plane); |
401 | void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high); | 395 | void dispc_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high); |
402 | void dispc_enable_fifomerge(bool enable); | 396 | void dispc_enable_fifomerge(bool enable); |
403 | void dispc_set_burst_size(enum omap_plane plane, | 397 | u32 dispc_get_burst_size(enum omap_plane plane); |
404 | enum omap_burst_size burst_size); | ||
405 | void dispc_enable_cpr(enum omap_channel channel, bool enable); | 398 | void dispc_enable_cpr(enum omap_channel channel, bool enable); |
406 | void dispc_set_cpr_coef(enum omap_channel channel, | 399 | void dispc_set_cpr_coef(enum omap_channel channel, |
407 | struct omap_dss_cpr_coefs *coefs); | 400 | struct omap_dss_cpr_coefs *coefs); |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index bd420f9650c9..b415c4ee621d 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -49,6 +49,9 @@ struct omap_dss_features { | |||
49 | const enum omap_color_mode *supported_color_modes; | 49 | const enum omap_color_mode *supported_color_modes; |
50 | const char * const *clksrc_names; | 50 | const char * const *clksrc_names; |
51 | const struct dss_param_range *dss_params; | 51 | const struct dss_param_range *dss_params; |
52 | |||
53 | const u32 buffer_size_unit; | ||
54 | const u32 burst_size_unit; | ||
52 | }; | 55 | }; |
53 | 56 | ||
54 | /* This struct is assigned to one of the below during initialization */ | 57 | /* This struct is assigned to one of the below during initialization */ |
@@ -274,6 +277,8 @@ static const struct omap_dss_features omap2_dss_features = { | |||
274 | .supported_color_modes = omap2_dss_supported_color_modes, | 277 | .supported_color_modes = omap2_dss_supported_color_modes, |
275 | .clksrc_names = omap2_dss_clk_source_names, | 278 | .clksrc_names = omap2_dss_clk_source_names, |
276 | .dss_params = omap2_dss_param_range, | 279 | .dss_params = omap2_dss_param_range, |
280 | .buffer_size_unit = 1, | ||
281 | .burst_size_unit = 8, | ||
277 | }; | 282 | }; |
278 | 283 | ||
279 | /* OMAP3 DSS Features */ | 284 | /* OMAP3 DSS Features */ |
@@ -296,6 +301,8 @@ static const struct omap_dss_features omap3430_dss_features = { | |||
296 | .supported_color_modes = omap3_dss_supported_color_modes, | 301 | .supported_color_modes = omap3_dss_supported_color_modes, |
297 | .clksrc_names = omap3_dss_clk_source_names, | 302 | .clksrc_names = omap3_dss_clk_source_names, |
298 | .dss_params = omap3_dss_param_range, | 303 | .dss_params = omap3_dss_param_range, |
304 | .buffer_size_unit = 1, | ||
305 | .burst_size_unit = 8, | ||
299 | }; | 306 | }; |
300 | 307 | ||
301 | static const struct omap_dss_features omap3630_dss_features = { | 308 | static const struct omap_dss_features omap3630_dss_features = { |
@@ -317,6 +324,8 @@ static const struct omap_dss_features omap3630_dss_features = { | |||
317 | .supported_color_modes = omap3_dss_supported_color_modes, | 324 | .supported_color_modes = omap3_dss_supported_color_modes, |
318 | .clksrc_names = omap3_dss_clk_source_names, | 325 | .clksrc_names = omap3_dss_clk_source_names, |
319 | .dss_params = omap3_dss_param_range, | 326 | .dss_params = omap3_dss_param_range, |
327 | .buffer_size_unit = 1, | ||
328 | .burst_size_unit = 8, | ||
320 | }; | 329 | }; |
321 | 330 | ||
322 | /* OMAP4 DSS Features */ | 331 | /* OMAP4 DSS Features */ |
@@ -339,6 +348,8 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = { | |||
339 | .supported_color_modes = omap4_dss_supported_color_modes, | 348 | .supported_color_modes = omap4_dss_supported_color_modes, |
340 | .clksrc_names = omap4_dss_clk_source_names, | 349 | .clksrc_names = omap4_dss_clk_source_names, |
341 | .dss_params = omap4_dss_param_range, | 350 | .dss_params = omap4_dss_param_range, |
351 | .buffer_size_unit = 16, | ||
352 | .burst_size_unit = 16, | ||
342 | }; | 353 | }; |
343 | 354 | ||
344 | /* For all the other OMAP4 versions */ | 355 | /* For all the other OMAP4 versions */ |
@@ -361,6 +372,8 @@ static const struct omap_dss_features omap4_dss_features = { | |||
361 | .supported_color_modes = omap4_dss_supported_color_modes, | 372 | .supported_color_modes = omap4_dss_supported_color_modes, |
362 | .clksrc_names = omap4_dss_clk_source_names, | 373 | .clksrc_names = omap4_dss_clk_source_names, |
363 | .dss_params = omap4_dss_param_range, | 374 | .dss_params = omap4_dss_param_range, |
375 | .buffer_size_unit = 16, | ||
376 | .burst_size_unit = 16, | ||
364 | }; | 377 | }; |
365 | 378 | ||
366 | /* Functions returning values related to a DSS feature */ | 379 | /* Functions returning values related to a DSS feature */ |
@@ -406,6 +419,16 @@ const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id) | |||
406 | return omap_current_dss_features->clksrc_names[id]; | 419 | return omap_current_dss_features->clksrc_names[id]; |
407 | } | 420 | } |
408 | 421 | ||
422 | u32 dss_feat_get_buffer_size_unit(void) | ||
423 | { | ||
424 | return omap_current_dss_features->buffer_size_unit; | ||
425 | } | ||
426 | |||
427 | u32 dss_feat_get_burst_size_unit(void) | ||
428 | { | ||
429 | return omap_current_dss_features->burst_size_unit; | ||
430 | } | ||
431 | |||
409 | /* DSS has_feature check */ | 432 | /* DSS has_feature check */ |
410 | bool dss_has_feature(enum dss_feat_id id) | 433 | bool dss_has_feature(enum dss_feat_id id) |
411 | { | 434 | { |
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index 5be8103a159e..b7398cbcda5f 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -94,6 +94,9 @@ bool dss_feat_color_mode_supported(enum omap_plane plane, | |||
94 | enum omap_color_mode color_mode); | 94 | enum omap_color_mode color_mode); |
95 | const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id); | 95 | const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id); |
96 | 96 | ||
97 | u32 dss_feat_get_buffer_size_unit(void); /* in bytes */ | ||
98 | u32 dss_feat_get_burst_size_unit(void); /* in bytes */ | ||
99 | |||
97 | bool dss_has_feature(enum dss_feat_id id); | 100 | bool dss_has_feature(enum dss_feat_id id); |
98 | void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); | 101 | void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); |
99 | void dss_features_init(void); | 102 | void dss_features_init(void); |
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 7ebaa40d3b56..49c0d77a5f24 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c | |||
@@ -507,7 +507,6 @@ struct overlay_cache_data { | |||
507 | bool replication; | 507 | bool replication; |
508 | bool ilace; | 508 | bool ilace; |
509 | 509 | ||
510 | enum omap_burst_size burst_size; | ||
511 | u32 fifo_low; | 510 | u32 fifo_low; |
512 | u32 fifo_high; | 511 | u32 fifo_high; |
513 | }; | 512 | }; |
@@ -947,8 +946,7 @@ static int configure_overlay(enum omap_plane plane) | |||
947 | 946 | ||
948 | dispc_enable_replication(plane, c->replication); | 947 | dispc_enable_replication(plane, c->replication); |
949 | 948 | ||
950 | dispc_set_burst_size(plane, c->burst_size); | 949 | dispc_set_fifo_threshold(plane, c->fifo_low, c->fifo_high); |
951 | dispc_setup_plane_fifo(plane, c->fifo_low, c->fifo_high); | ||
952 | 950 | ||
953 | dispc_enable_plane(plane, 1); | 951 | dispc_enable_plane(plane, 1); |
954 | 952 | ||
@@ -1417,7 +1415,7 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) | |||
1417 | /* Configure overlay fifos */ | 1415 | /* Configure overlay fifos */ |
1418 | for (i = 0; i < omap_dss_get_num_overlays(); ++i) { | 1416 | for (i = 0; i < omap_dss_get_num_overlays(); ++i) { |
1419 | struct omap_dss_device *dssdev; | 1417 | struct omap_dss_device *dssdev; |
1420 | u32 size; | 1418 | u32 size, burst_size; |
1421 | 1419 | ||
1422 | ovl = omap_dss_get_overlay(i); | 1420 | ovl = omap_dss_get_overlay(i); |
1423 | 1421 | ||
@@ -1435,6 +1433,8 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) | |||
1435 | if (use_fifomerge) | 1433 | if (use_fifomerge) |
1436 | size *= 3; | 1434 | size *= 3; |
1437 | 1435 | ||
1436 | burst_size = dispc_get_burst_size(ovl->id); | ||
1437 | |||
1438 | switch (dssdev->type) { | 1438 | switch (dssdev->type) { |
1439 | case OMAP_DISPLAY_TYPE_DPI: | 1439 | case OMAP_DISPLAY_TYPE_DPI: |
1440 | case OMAP_DISPLAY_TYPE_DBI: | 1440 | case OMAP_DISPLAY_TYPE_DBI: |
@@ -1442,13 +1442,13 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) | |||
1442 | case OMAP_DISPLAY_TYPE_VENC: | 1442 | case OMAP_DISPLAY_TYPE_VENC: |
1443 | case OMAP_DISPLAY_TYPE_HDMI: | 1443 | case OMAP_DISPLAY_TYPE_HDMI: |
1444 | default_get_overlay_fifo_thresholds(ovl->id, size, | 1444 | default_get_overlay_fifo_thresholds(ovl->id, size, |
1445 | &oc->burst_size, &oc->fifo_low, | 1445 | burst_size, &oc->fifo_low, |
1446 | &oc->fifo_high); | 1446 | &oc->fifo_high); |
1447 | break; | 1447 | break; |
1448 | #ifdef CONFIG_OMAP2_DSS_DSI | 1448 | #ifdef CONFIG_OMAP2_DSS_DSI |
1449 | case OMAP_DISPLAY_TYPE_DSI: | 1449 | case OMAP_DISPLAY_TYPE_DSI: |
1450 | dsi_get_overlay_fifo_thresholds(ovl->id, size, | 1450 | dsi_get_overlay_fifo_thresholds(ovl->id, size, |
1451 | &oc->burst_size, &oc->fifo_low, | 1451 | burst_size, &oc->fifo_low, |
1452 | &oc->fifo_high); | 1452 | &oc->fifo_high); |
1453 | break; | 1453 | break; |
1454 | #endif | 1454 | #endif |