aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss_features.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/dss_features.c')
-rw-r--r--drivers/video/omap2/dss/dss_features.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index 1c18888e5df3..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 */
@@ -286,7 +291,9 @@ static const struct omap_dss_features omap3430_dss_features = {
286 FEAT_LCDENABLESIGNAL | FEAT_PCKFREEENABLE | 291 FEAT_LCDENABLESIGNAL | FEAT_PCKFREEENABLE |
287 FEAT_FUNCGATED | FEAT_ROWREPEATENABLE | 292 FEAT_FUNCGATED | FEAT_ROWREPEATENABLE |
288 FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF | 293 FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF |
289 FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC, 294 FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC |
295 FEAT_VENC_REQUIRES_TV_DAC_CLK | FEAT_CPR | FEAT_PRELOAD |
296 FEAT_FIR_COEF_V,
290 297
291 .num_mgrs = 2, 298 .num_mgrs = 2,
292 .num_ovls = 3, 299 .num_ovls = 3,
@@ -294,6 +301,8 @@ static const struct omap_dss_features omap3430_dss_features = {
294 .supported_color_modes = omap3_dss_supported_color_modes, 301 .supported_color_modes = omap3_dss_supported_color_modes,
295 .clksrc_names = omap3_dss_clk_source_names, 302 .clksrc_names = omap3_dss_clk_source_names,
296 .dss_params = omap3_dss_param_range, 303 .dss_params = omap3_dss_param_range,
304 .buffer_size_unit = 1,
305 .burst_size_unit = 8,
297}; 306};
298 307
299static const struct omap_dss_features omap3630_dss_features = { 308static const struct omap_dss_features omap3630_dss_features = {
@@ -306,7 +315,8 @@ static const struct omap_dss_features omap3630_dss_features = {
306 FEAT_PRE_MULT_ALPHA | FEAT_FUNCGATED | 315 FEAT_PRE_MULT_ALPHA | FEAT_FUNCGATED |
307 FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT | 316 FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT |
308 FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG | 317 FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG |
309 FEAT_DSI_PLL_FREQSEL, 318 FEAT_DSI_PLL_FREQSEL | FEAT_CPR | FEAT_PRELOAD |
319 FEAT_FIR_COEF_V,
310 320
311 .num_mgrs = 2, 321 .num_mgrs = 2,
312 .num_ovls = 3, 322 .num_ovls = 3,
@@ -314,6 +324,8 @@ static const struct omap_dss_features omap3630_dss_features = {
314 .supported_color_modes = omap3_dss_supported_color_modes, 324 .supported_color_modes = omap3_dss_supported_color_modes,
315 .clksrc_names = omap3_dss_clk_source_names, 325 .clksrc_names = omap3_dss_clk_source_names,
316 .dss_params = omap3_dss_param_range, 326 .dss_params = omap3_dss_param_range,
327 .buffer_size_unit = 1,
328 .burst_size_unit = 8,
317}; 329};
318 330
319/* OMAP4 DSS Features */ 331/* OMAP4 DSS Features */
@@ -327,7 +339,8 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = {
327 FEAT_MGR_LCD2 | FEAT_GLOBAL_ALPHA_VID1 | 339 FEAT_MGR_LCD2 | FEAT_GLOBAL_ALPHA_VID1 |
328 FEAT_CORE_CLK_DIV | FEAT_LCD_CLK_SRC | 340 FEAT_CORE_CLK_DIV | FEAT_LCD_CLK_SRC |
329 FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH | 341 FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH |
330 FEAT_DSI_GNQ | FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2, 342 FEAT_DSI_GNQ | FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2 |
343 FEAT_CPR | FEAT_PRELOAD | FEAT_FIR_COEF_V,
331 344
332 .num_mgrs = 3, 345 .num_mgrs = 3,
333 .num_ovls = 3, 346 .num_ovls = 3,
@@ -335,6 +348,8 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = {
335 .supported_color_modes = omap4_dss_supported_color_modes, 348 .supported_color_modes = omap4_dss_supported_color_modes,
336 .clksrc_names = omap4_dss_clk_source_names, 349 .clksrc_names = omap4_dss_clk_source_names,
337 .dss_params = omap4_dss_param_range, 350 .dss_params = omap4_dss_param_range,
351 .buffer_size_unit = 16,
352 .burst_size_unit = 16,
338}; 353};
339 354
340/* For all the other OMAP4 versions */ 355/* For all the other OMAP4 versions */
@@ -348,7 +363,8 @@ static const struct omap_dss_features omap4_dss_features = {
348 FEAT_CORE_CLK_DIV | FEAT_LCD_CLK_SRC | 363 FEAT_CORE_CLK_DIV | FEAT_LCD_CLK_SRC |
349 FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH | 364 FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH |
350 FEAT_DSI_GNQ | FEAT_HDMI_CTS_SWMODE | 365 FEAT_DSI_GNQ | FEAT_HDMI_CTS_SWMODE |
351 FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2, 366 FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2 | FEAT_CPR |
367 FEAT_PRELOAD | FEAT_FIR_COEF_V,
352 368
353 .num_mgrs = 3, 369 .num_mgrs = 3,
354 .num_ovls = 3, 370 .num_ovls = 3,
@@ -356,6 +372,8 @@ static const struct omap_dss_features omap4_dss_features = {
356 .supported_color_modes = omap4_dss_supported_color_modes, 372 .supported_color_modes = omap4_dss_supported_color_modes,
357 .clksrc_names = omap4_dss_clk_source_names, 373 .clksrc_names = omap4_dss_clk_source_names,
358 .dss_params = omap4_dss_param_range, 374 .dss_params = omap4_dss_param_range,
375 .buffer_size_unit = 16,
376 .burst_size_unit = 16,
359}; 377};
360 378
361/* Functions returning values related to a DSS feature */ 379/* Functions returning values related to a DSS feature */
@@ -401,6 +419,16 @@ const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id)
401 return omap_current_dss_features->clksrc_names[id]; 419 return omap_current_dss_features->clksrc_names[id];
402} 420}
403 421
422u32 dss_feat_get_buffer_size_unit(void)
423{
424 return omap_current_dss_features->buffer_size_unit;
425}
426
427u32 dss_feat_get_burst_size_unit(void)
428{
429 return omap_current_dss_features->burst_size_unit;
430}
431
404/* DSS has_feature check */ 432/* DSS has_feature check */
405bool dss_has_feature(enum dss_feat_id id) 433bool dss_has_feature(enum dss_feat_id id)
406{ 434{