From 5038bb8cb2c9dfec6d188bdf9fc0d7a358e1e2ee Mon Sep 17 00:00:00 2001 From: Dave Gerlach Date: Fri, 31 Oct 2014 16:28:57 -0500 Subject: OMAPDSS: adopt pinctrl support Update omapdss driver to set the state of the pins to: - "default on resume - "sleep" on suspend By optionally putting the pins into sleep state in the suspend callback we can accomplish two things. - minimize current leakage from pins and thus save power, - prevent the IP from driving pins output in an uncontrolled manner, which may happen if the power domain drops the domain regulator. Signed-off-by: Dave Gerlach Acked-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dss.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c index 9200a8668b49..f95ff319e68e 100644 --- a/drivers/video/fbdev/omap2/dss/dss.c +++ b/drivers/video/fbdev/omap2/dss/dss.c @@ -1264,12 +1264,18 @@ static int dss_runtime_suspend(struct device *dev) { dss_save_context(); dss_set_min_bus_tput(dev, 0); + + pinctrl_pm_select_sleep_state(dev); + return 0; } static int dss_runtime_resume(struct device *dev) { int r; + + pinctrl_pm_select_default_state(dev); + /* * Set an arbitrarily high tput request to ensure OPP100. * What we should really do is to make a request to stay in OPP100, -- cgit v1.2.1 From e5f809171a217a83850e49b48b091188b27ce9f0 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 21 Oct 2015 13:08:59 +0300 Subject: OMAPDSS: DISPC: always set ALIGN when available By default DISPC asserts hsync and vsync sequentially, i.e. there's first hsync and that is immediately followed by vsync. This is the only available behaviour on OMAP2/3, and default behaviour on OMAP4+. OMAP4+ has ALIGN bit in POL_FREQ register, which makes DISPC assert both syncs at the same time. It has been observed that some panels don't like sequential syncs (AM5 EVM's panel). After studying the datasheets for multiple panels and encoders, and MIPI DPI spec, it looks like there is no standard way to handle this. Sometimes the datasheets don't mention the required syncs behaviour at all, sometimes the datasheets have images that hint towards simultaneous syncs, and sometimes it is explicitly mentioned that simultaneous syncs are needed. No panels or encoders requiring sequential sync was found. It thus seems to be safe to default to simultaneous syncs when the ALIGN bit is available. This fixed AM5 EVM's panel, and no side effects have been observed on other panels or encoders. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- drivers/video/fbdev/omap2/dss/dispc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index be716c9ffb88..ced6050666cc 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -99,6 +99,9 @@ struct dispc_features { /* PIXEL_INC is not added to the last pixel of a line */ bool last_pixel_inc_missing:1; + + /* POL_FREQ has ALIGN bit */ + bool supports_sync_align:1; }; #define DISPC_MAX_NR_FIFOS 5 @@ -3163,6 +3166,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw, FLD_VAL(hs, 13, 13) | FLD_VAL(vs, 12, 12); + /* always set ALIGN bit when available */ + if (dispc.feat->supports_sync_align) + l |= (1 << 18); + dispc_write_reg(DISPC_POL_FREQ(channel), l); if (dispc.syscon_pol) { @@ -3854,6 +3861,7 @@ static const struct dispc_features omap44xx_dispc_feats = { .num_fifos = 5, .gfx_fifo_workaround = true, .set_max_preload = true, + .supports_sync_align = true, }; static const struct dispc_features omap54xx_dispc_feats = { @@ -3875,6 +3883,7 @@ static const struct dispc_features omap54xx_dispc_feats = { .gfx_fifo_workaround = true, .mstandby_workaround = true, .set_max_preload = true, + .supports_sync_align = true, }; static int dispc_init_features(struct platform_device *pdev) -- cgit v1.2.1 From c2c06335ba9da4ce03c56c21fde4bd546af23edd Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:41 +0200 Subject: OMAPDSS: fix DISPC_MFLAG_THRESHOLD_OFFSET for WB DISPC_MFLAG_THRESHOLD_OFFSET() is missing the offset for WB. Add the offset. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.h b/drivers/video/fbdev/omap2/dss/dispc.h index 3043d6e0a5f9..483744223dd1 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.h +++ b/drivers/video/fbdev/omap2/dss/dispc.h @@ -908,6 +908,8 @@ static inline u16 DISPC_MFLAG_THRESHOLD_OFFSET(enum omap_plane plane) return 0x0868; case OMAP_DSS_VIDEO3: return 0x086c; + case OMAP_DSS_WB: + return 0x0870; default: BUG(); return 0; -- cgit v1.2.1 From 06c525fe65c3da5e6e3ed5e1a03634968b3d56d6 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:42 +0200 Subject: OMAPDSS: add WB to register dump Add dumping of the writeback registers to the register dump function. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index ced6050666cc..0cccff2ffd4e 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -3455,6 +3455,7 @@ static void dispc_dump_regs(struct seq_file *s) [OMAP_DSS_VIDEO1] = "VID1", [OMAP_DSS_VIDEO2] = "VID2", [OMAP_DSS_VIDEO3] = "VID3", + [OMAP_DSS_WB] = "WB", }; const char **p_names; @@ -3561,6 +3562,35 @@ static void dispc_dump_regs(struct seq_file *s) DUMPREG(i, DISPC_OVL_ATTRIBUTES2); } + if (dss_feat_get_num_wbs()) { + i = OMAP_DSS_WB; + DUMPREG(i, DISPC_OVL_BA0); + DUMPREG(i, DISPC_OVL_BA1); + DUMPREG(i, DISPC_OVL_SIZE); + DUMPREG(i, DISPC_OVL_ATTRIBUTES); + DUMPREG(i, DISPC_OVL_FIFO_THRESHOLD); + DUMPREG(i, DISPC_OVL_FIFO_SIZE_STATUS); + DUMPREG(i, DISPC_OVL_ROW_INC); + DUMPREG(i, DISPC_OVL_PIXEL_INC); + + if (dss_has_feature(FEAT_MFLAG)) + DUMPREG(i, DISPC_OVL_MFLAG_THRESHOLD); + + DUMPREG(i, DISPC_OVL_FIR); + DUMPREG(i, DISPC_OVL_PICTURE_SIZE); + DUMPREG(i, DISPC_OVL_ACCU0); + DUMPREG(i, DISPC_OVL_ACCU1); + if (dss_has_feature(FEAT_HANDLE_UV_SEPARATE)) { + DUMPREG(i, DISPC_OVL_BA0_UV); + DUMPREG(i, DISPC_OVL_BA1_UV); + DUMPREG(i, DISPC_OVL_FIR2); + DUMPREG(i, DISPC_OVL_ACCU2_0); + DUMPREG(i, DISPC_OVL_ACCU2_1); + } + if (dss_has_feature(FEAT_ATTR2)) + DUMPREG(i, DISPC_OVL_ATTRIBUTES2); + } + #undef DISPC_REG #undef DUMPREG -- cgit v1.2.1 From bae199cd3d4fde48a103570402d6d30ab7eb959e Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:43 +0200 Subject: OMAPDSS: add num_wbs=1 to omap5 dss features OMAP5+ DSS has a writeback pipeline, but this was not specified in the features list for OMAP5 DSS. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dss_features.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dss_features.c b/drivers/video/fbdev/omap2/dss/dss_features.c index b0b6dfd657bf..28fe9a3ca1fa 100644 --- a/drivers/video/fbdev/omap2/dss/dss_features.c +++ b/drivers/video/fbdev/omap2/dss/dss_features.c @@ -801,6 +801,7 @@ static const struct omap_dss_features omap5_dss_features = { .num_mgrs = 4, .num_ovls = 4, + .num_wbs = 1, .supported_displays = omap5_dss_supported_displays, .supported_outputs = omap5_dss_supported_outputs, .supported_color_modes = omap4_dss_supported_color_modes, -- cgit v1.2.1 From 20efbc35db42ba8164c42d36ed7ca32cd8184c2c Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:44 +0200 Subject: OMAPDSS: add 'has_writeback' flag At the moment we have a function to get the number of writeback pipelines supported. However, the function is used in a wrong way, causing a wrong pipeline to get configured when trying to use WB. Also, we only have a single writeback pipeline on any of the DSS versions. To fix and simplify this, create a 'has_writeback' flag into the dispc driver, and after checking the flag, use OMAP_DSS_WB pipeline explicitly when calling the configuration functions. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 11 +++++++---- drivers/video/fbdev/omap2/dss/dss_features.c | 10 ---------- drivers/video/fbdev/omap2/dss/dss_features.h | 1 - 3 files changed, 7 insertions(+), 15 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 0cccff2ffd4e..aa74b3da3718 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -102,6 +102,8 @@ struct dispc_features { /* POL_FREQ has ALIGN bit */ bool supports_sync_align:1; + + bool has_writeback:1; }; #define DISPC_MAX_NR_FIFOS 5 @@ -710,7 +712,6 @@ static void dispc_setup_color_conv_coef(void) { int i; int num_ovl = dss_feat_get_num_ovls(); - int num_wb = dss_feat_get_num_wbs(); const struct color_conv_coef ctbl_bt601_5_ovl = { 298, 409, 0, 298, -208, -100, 298, 0, 517, 0, }; @@ -721,8 +722,8 @@ static void dispc_setup_color_conv_coef(void) for (i = 1; i < num_ovl; i++) dispc_ovl_write_color_conv_coef(i, &ctbl_bt601_5_ovl); - for (; i < num_wb; i++) - dispc_ovl_write_color_conv_coef(i, &ctbl_bt601_5_wb); + if (dispc.feat->has_writeback) + dispc_ovl_write_color_conv_coef(OMAP_DSS_WB, &ctbl_bt601_5_wb); } static void dispc_ovl_set_ba0(enum omap_plane plane, u32 paddr) @@ -3562,7 +3563,7 @@ static void dispc_dump_regs(struct seq_file *s) DUMPREG(i, DISPC_OVL_ATTRIBUTES2); } - if (dss_feat_get_num_wbs()) { + if (dispc.feat->has_writeback) { i = OMAP_DSS_WB; DUMPREG(i, DISPC_OVL_BA0); DUMPREG(i, DISPC_OVL_BA1); @@ -3892,6 +3893,7 @@ static const struct dispc_features omap44xx_dispc_feats = { .gfx_fifo_workaround = true, .set_max_preload = true, .supports_sync_align = true, + .has_writeback = true, }; static const struct dispc_features omap54xx_dispc_feats = { @@ -3914,6 +3916,7 @@ static const struct dispc_features omap54xx_dispc_feats = { .mstandby_workaround = true, .set_max_preload = true, .supports_sync_align = true, + .has_writeback = true, }; static int dispc_init_features(struct platform_device *pdev) diff --git a/drivers/video/fbdev/omap2/dss/dss_features.c b/drivers/video/fbdev/omap2/dss/dss_features.c index 28fe9a3ca1fa..48951c5cb352 100644 --- a/drivers/video/fbdev/omap2/dss/dss_features.c +++ b/drivers/video/fbdev/omap2/dss/dss_features.c @@ -46,7 +46,6 @@ struct omap_dss_features { const int num_mgrs; const int num_ovls; - const int num_wbs; const enum omap_display_type *supported_displays; const enum omap_dss_output_id *supported_outputs; const enum omap_color_mode *supported_color_modes; @@ -735,7 +734,6 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = { .num_mgrs = 3, .num_ovls = 4, - .num_wbs = 1, .supported_displays = omap4_dss_supported_displays, .supported_outputs = omap4_dss_supported_outputs, .supported_color_modes = omap4_dss_supported_color_modes, @@ -757,7 +755,6 @@ static const struct omap_dss_features omap4430_es2_0_1_2_dss_features = { .num_mgrs = 3, .num_ovls = 4, - .num_wbs = 1, .supported_displays = omap4_dss_supported_displays, .supported_outputs = omap4_dss_supported_outputs, .supported_color_modes = omap4_dss_supported_color_modes, @@ -779,7 +776,6 @@ static const struct omap_dss_features omap4_dss_features = { .num_mgrs = 3, .num_ovls = 4, - .num_wbs = 1, .supported_displays = omap4_dss_supported_displays, .supported_outputs = omap4_dss_supported_outputs, .supported_color_modes = omap4_dss_supported_color_modes, @@ -801,7 +797,6 @@ static const struct omap_dss_features omap5_dss_features = { .num_mgrs = 4, .num_ovls = 4, - .num_wbs = 1, .supported_displays = omap5_dss_supported_displays, .supported_outputs = omap5_dss_supported_outputs, .supported_color_modes = omap4_dss_supported_color_modes, @@ -826,11 +821,6 @@ int dss_feat_get_num_ovls(void) } EXPORT_SYMBOL(dss_feat_get_num_ovls); -int dss_feat_get_num_wbs(void) -{ - return omap_current_dss_features->num_wbs; -} - unsigned long dss_feat_get_param_min(enum dss_range_param param) { return omap_current_dss_features->dss_params[param].min; diff --git a/drivers/video/fbdev/omap2/dss/dss_features.h b/drivers/video/fbdev/omap2/dss/dss_features.h index 100f7a2d0638..0e75927339c7 100644 --- a/drivers/video/fbdev/omap2/dss/dss_features.h +++ b/drivers/video/fbdev/omap2/dss/dss_features.h @@ -86,7 +86,6 @@ enum dss_range_param { }; /* DSS Feature Functions */ -int dss_feat_get_num_wbs(void); unsigned long dss_feat_get_param_min(enum dss_range_param param); unsigned long dss_feat_get_param_max(enum dss_range_param param); enum omap_overlay_caps dss_feat_get_overlay_caps(enum omap_plane plane); -- cgit v1.2.1 From d7df5ad44b1427598d7296b2c889988a63a4bce2 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:46 +0200 Subject: OMAPDSS: refactor dispc_ovl_get_channel_out Refactor dispc_ovl_get_channel_out() to a bit cleaner form, which makes it easier to add support for writeback in the following patch. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index aa74b3da3718..678a1928a9b5 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -992,7 +992,6 @@ static enum omap_channel dispc_ovl_get_channel_out(enum omap_plane plane) { int shift; u32 val; - enum omap_channel channel; switch (plane) { case OMAP_DSS_GFX: @@ -1010,23 +1009,21 @@ static enum omap_channel dispc_ovl_get_channel_out(enum omap_plane plane) val = dispc_read_reg(DISPC_OVL_ATTRIBUTES(plane)); - if (dss_has_feature(FEAT_MGR_LCD3)) { - if (FLD_GET(val, 31, 30) == 0) - channel = FLD_GET(val, shift, shift); - else if (FLD_GET(val, 31, 30) == 1) - channel = OMAP_DSS_CHANNEL_LCD2; - else - channel = OMAP_DSS_CHANNEL_LCD3; - } else if (dss_has_feature(FEAT_MGR_LCD2)) { - if (FLD_GET(val, 31, 30) == 0) - channel = FLD_GET(val, shift, shift); - else - channel = OMAP_DSS_CHANNEL_LCD2; - } else { - channel = FLD_GET(val, shift, shift); - } + if (FLD_GET(val, shift, shift) == 1) + return OMAP_DSS_CHANNEL_DIGIT; + + if (!dss_has_feature(FEAT_MGR_LCD2)) + return OMAP_DSS_CHANNEL_LCD; - return channel; + switch (FLD_GET(val, 31, 30)) { + case 0: + default: + return OMAP_DSS_CHANNEL_LCD; + case 1: + return OMAP_DSS_CHANNEL_LCD2; + case 2: + return OMAP_DSS_CHANNEL_LCD3; + } } void dispc_wb_set_channel_in(enum dss_writeback_channel channel) -- cgit v1.2.1 From c2665c4150ece59f13dcc78b9012d297acd96358 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:47 +0200 Subject: OMAPDSS: handle WB channel in dispc_set/get_channel_out Add handling of OMAP_DSS_CHANNEL_WB to dispc_ovl_set_channel_out() and dispc_ovl_get_channel_out(). Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 678a1928a9b5..4126d6225faf 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -974,6 +974,10 @@ void dispc_ovl_set_channel_out(enum omap_plane plane, enum omap_channel channel) return; } break; + case OMAP_DSS_CHANNEL_WB: + chan = 0; + chan2 = 3; + break; default: BUG(); return; @@ -1023,6 +1027,8 @@ static enum omap_channel dispc_ovl_get_channel_out(enum omap_plane plane) return OMAP_DSS_CHANNEL_LCD2; case 2: return OMAP_DSS_CHANNEL_LCD3; + case 3: + return OMAP_DSS_CHANNEL_WB; } } -- cgit v1.2.1 From 5b354af9eda43f8941f0f28873e6ce2b99f68413 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:48 +0200 Subject: OMAPDSS: configure burst size for WB Burst size for all pipelines is set in dispc_configure_burst_sizes(), but we are missing WB pipe. So add that. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 4126d6225faf..0ebfef9ae07f 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -1057,6 +1057,8 @@ static void dispc_configure_burst_sizes(void) /* Configure burst size always to maximum size */ for (i = 0; i < dss_feat_get_num_ovls(); ++i) dispc_ovl_set_burst_size(i, burst_size); + if (dispc.feat->has_writeback) + dispc_ovl_set_burst_size(OMAP_DSS_WB, burst_size); } static u32 dispc_ovl_get_burst_size(enum omap_plane plane) -- cgit v1.2.1 From 65e116e17327bce9b75adb02574a6edf126f7ef2 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:49 +0200 Subject: OMAPDSS: configure WB fifo thresholds Fifo thresholds for all pipelines are set in dispc_init_fifos(), but we are missing it for WB pipeline. Add that. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 0ebfef9ae07f..22b6e0f3e657 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -1205,6 +1205,17 @@ static void dispc_init_fifos(void) dispc_ovl_set_fifo_threshold(i, low, high); } + + if (dispc.feat->has_writeback) { + u32 low, high; + const bool use_fifomerge = false; + const bool manual_update = false; + + dispc_ovl_compute_fifo_thresholds(OMAP_DSS_WB, &low, &high, + use_fifomerge, manual_update); + + dispc_ovl_set_fifo_threshold(OMAP_DSS_WB, low, high); + } } static u32 dispc_ovl_get_fifo_size(enum omap_plane plane) -- cgit v1.2.1 From ecb0b366af3fb435b877d5648b363e069e97a754 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:50 +0200 Subject: OMAPDSS: configure WB mflag threshold Mflag thresholds for all pipelines are set in dispc_init_mflag(), but we are missing that for WB pipeline. Add WB configuration. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 22b6e0f3e657..3cd78dcfefc5 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -1384,6 +1384,25 @@ static void dispc_init_mflag(void) dispc_ovl_set_mflag_threshold(i, low, high); } + + if (dispc.feat->has_writeback) { + u32 size = dispc_ovl_get_fifo_size(OMAP_DSS_WB); + u32 unit = dss_feat_get_buffer_size_unit(); + u32 low, high; + + dispc_ovl_set_mflag(OMAP_DSS_WB, true); + + /* + * Simulation team suggests below thesholds: + * HT = fifosize * 5 / 8; + * LT = fifosize * 4 / 8; + */ + + low = size * 4 / 8 / unit; + high = size * 5 / 8 / unit; + + dispc_ovl_set_mflag_threshold(OMAP_DSS_WB, low, high); + } } static void dispc_ovl_set_fir(enum omap_plane plane, -- cgit v1.2.1 From fd2eac5a66e5830e99324ba65a33d883cfd31d9e Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:51 +0200 Subject: OMAPDSS: skip pclk check for WB mem2mem When doing mem-to-mem writeback, there's no pixelclock. However, the code that calculates scaling factors check that there is a pixel clock. We can just skip the check when doing mem-to-mem writeback. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 3cd78dcfefc5..837b1f508d79 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -2477,7 +2477,7 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, if (width == out_width && height == out_height) return 0; - if (pclk == 0 || mgr_timings->pixelclock == 0) { + if (!mem_to_mem && (pclk == 0 || mgr_timings->pixelclock == 0)) { DSSERR("cannot calculate scaling settings: pclk is zero\n"); return -EINVAL; } -- cgit v1.2.1 From 7d18bbee78d39f2a69929f59920205efeee864e2 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:52 +0200 Subject: OMAPDSS: fix rgb-to-yuv color conv coefs The color conversion coefficients for RGB to YUV conversion (used with writeback) don't result in the correct result. This patch sets the correct coefficients. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 837b1f508d79..c50bb0124d87 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -713,10 +713,12 @@ static void dispc_setup_color_conv_coef(void) int i; int num_ovl = dss_feat_get_num_ovls(); const struct color_conv_coef ctbl_bt601_5_ovl = { + /* YUV -> RGB */ 298, 409, 0, 298, -208, -100, 298, 0, 517, 0, }; const struct color_conv_coef ctbl_bt601_5_wb = { - 66, 112, -38, 129, -94, -74, 25, -18, 112, 0, + /* RGB -> YUV */ + 66, 129, 25, 112, -94, -18, -38, -74, 112, 0, }; for (i = 1; i < num_ovl; i++) -- cgit v1.2.1 From 4c055ce03b670664a8ac39878b219d94c8ef092f Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:53 +0200 Subject: OMAPDSS: set WB capturemode for m2m mode In mem-to-mem mode WB CAPTUREMODE needs to be set to 1 (capture one frame). Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index c50bb0124d87..6018518c1b25 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -2857,6 +2857,8 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, l = dispc_read_reg(DISPC_OVL_ATTRIBUTES(plane)); l = FLD_MOD(l, truncation, 10, 10); /* TRUNCATIONENABLE */ l = FLD_MOD(l, mem_to_mem, 19, 19); /* WRITEBACKMODE */ + if (mem_to_mem) + l = FLD_MOD(l, 1, 26, 24); /* CAPTUREMODE */ dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), l); return r; -- cgit v1.2.1 From 98cd5796b37074fb6542b1c4042c2fd3862a6f77 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:54 +0200 Subject: OMAPDSS: add setup for WB capture mode in dispc_wb_setup() dispc_wb_setup() handles configuration only for mem-to-mem case. This patch adds the necessary configuration to handle also display capture mode. We need to set CAPTUREMODE to 0 (continuous capture), and WBDELAYCOUNT according to the vertical timings of the display, so that the WB FIFO has time to flush before the next frame starts. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 6018518c1b25..c3ba555737b8 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -2859,8 +2859,23 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, l = FLD_MOD(l, mem_to_mem, 19, 19); /* WRITEBACKMODE */ if (mem_to_mem) l = FLD_MOD(l, 1, 26, 24); /* CAPTUREMODE */ + else + l = FLD_MOD(l, 0, 26, 24); /* CAPTUREMODE */ dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), l); + if (mem_to_mem) { + /* WBDELAYCOUNT */ + REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), 0, 7, 0); + } else { + int wbdelay; + + wbdelay = min(mgr_timings->vfp + mgr_timings->vsw + + mgr_timings->vbp, 255); + + /* WBDELAYCOUNT */ + REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0); + } + return r; } -- cgit v1.2.1 From f2d580a1b0f3c10c57fd89cd2e7389a4fa9b94f3 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:55 +0200 Subject: OMAPDSS: remove extra EXPORT_SYMBOLs The functions dispc_ovl_set_fifo_threshold and dispc_ovl_compute_fifo_thresholds are exported, but not declared in public headers, and thus are not used outside omapdss. So we can remove the EXPORT_SYMBOL()s. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- drivers/video/fbdev/omap2/dss/dispc.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index c3ba555737b8..822add50f92e 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -1270,7 +1270,6 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high) plane != OMAP_DSS_WB) dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfffu)); } -EXPORT_SYMBOL(dispc_ovl_set_fifo_threshold); void dispc_enable_fifomerge(bool enable) { @@ -1329,7 +1328,6 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane, *fifo_high = total_fifo_size - buf_unit; } } -EXPORT_SYMBOL(dispc_ovl_compute_fifo_thresholds); static void dispc_ovl_set_mflag(enum omap_plane plane, bool enable) { -- cgit v1.2.1 From 98c2835ede2427badb3bf57974f155a0011193c7 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:56 +0200 Subject: OMAPDSS: make a two dss feat funcs internal to omapdss dss_feat_get_supported_displays() and dss_feat_get_supported_outputs() are not used outside omapdss, but are exported. We can thus remove the export and move the declarations to the omapdss internal header. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- drivers/video/fbdev/omap2/dss/dss_features.c | 2 -- drivers/video/fbdev/omap2/dss/dss_features.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dss_features.c b/drivers/video/fbdev/omap2/dss/dss_features.c index 48951c5cb352..c886a2927f73 100644 --- a/drivers/video/fbdev/omap2/dss/dss_features.c +++ b/drivers/video/fbdev/omap2/dss/dss_features.c @@ -835,13 +835,11 @@ enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel { return omap_current_dss_features->supported_displays[channel]; } -EXPORT_SYMBOL(dss_feat_get_supported_displays); enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel) { return omap_current_dss_features->supported_outputs[channel]; } -EXPORT_SYMBOL(dss_feat_get_supported_outputs); enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane) { diff --git a/drivers/video/fbdev/omap2/dss/dss_features.h b/drivers/video/fbdev/omap2/dss/dss_features.h index 0e75927339c7..3d67d39f192f 100644 --- a/drivers/video/fbdev/omap2/dss/dss_features.h +++ b/drivers/video/fbdev/omap2/dss/dss_features.h @@ -101,4 +101,8 @@ bool dss_feat_rotation_type_supported(enum omap_dss_rotation_type rot_type); bool dss_has_feature(enum dss_feat_id id); void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); void dss_features_init(enum omapdss_version version); + +enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel); +enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel); + #endif -- cgit v1.2.1 From 659041550100d2015d0ed28e3274267eeb664868 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:57 +0200 Subject: OMAPDSS: change internal dispc functions to static A bunch of dispc functions are only used inside dispc, so we can make them static. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- drivers/video/fbdev/omap2/dss/dispc.c | 15 ++++++++++----- drivers/video/fbdev/omap2/dss/dss.h | 5 ----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 822add50f92e..346822b55947 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -251,6 +251,11 @@ struct color_conv_coef { int full_range; }; +static unsigned long dispc_fclk_rate(void); +static unsigned long dispc_core_clk_rate(void); +static unsigned long dispc_mgr_lclk_rate(enum omap_channel channel); +static unsigned long dispc_mgr_pclk_rate(enum omap_channel channel); + static unsigned long dispc_plane_pclk_rate(enum omap_plane plane); static unsigned long dispc_plane_lclk_rate(enum omap_plane plane); @@ -2952,7 +2957,7 @@ static void dispc_mgr_set_lcd_type_tft(enum omap_channel channel) mgr_fld_write(channel, DISPC_MGR_FLD_STNTFT, 1); } -void dispc_set_loadmode(enum omap_dss_load_mode mode) +static void dispc_set_loadmode(enum omap_dss_load_mode mode) { REG_FLD_MOD(DISPC_CONFIG, mode, 2, 1); } @@ -3311,7 +3316,7 @@ static void dispc_mgr_get_lcd_divisor(enum omap_channel channel, int *lck_div, *pck_div = FLD_GET(l, 7, 0); } -unsigned long dispc_fclk_rate(void) +static unsigned long dispc_fclk_rate(void) { struct dss_pll *pll; unsigned long r = 0; @@ -3342,7 +3347,7 @@ unsigned long dispc_fclk_rate(void) return r; } -unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) +static unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) { struct dss_pll *pll; int lcd; @@ -3383,7 +3388,7 @@ unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) } } -unsigned long dispc_mgr_pclk_rate(enum omap_channel channel) +static unsigned long dispc_mgr_pclk_rate(enum omap_channel channel) { unsigned long r; @@ -3408,7 +3413,7 @@ void dispc_set_tv_pclk(unsigned long pclk) dispc.tv_pclk_rate = pclk; } -unsigned long dispc_core_clk_rate(void) +static unsigned long dispc_core_clk_rate(void) { return dispc.core_clk_rate; } diff --git a/drivers/video/fbdev/omap2/dss/dss.h b/drivers/video/fbdev/omap2/dss/dss.h index 2406bcdb831a..fec68d8939bc 100644 --- a/drivers/video/fbdev/omap2/dss/dss.h +++ b/drivers/video/fbdev/omap2/dss/dss.h @@ -378,7 +378,6 @@ void dispc_lcd_enable_signal(bool enable); void dispc_pck_free_enable(bool enable); void dispc_enable_fifomerge(bool enable); void dispc_enable_gamma_table(bool enable); -void dispc_set_loadmode(enum omap_dss_load_mode mode); typedef bool (*dispc_div_calc_func)(int lckd, int pckd, unsigned long lck, unsigned long pck, void *data); @@ -388,7 +387,6 @@ bool dispc_div_calc(unsigned long dispc, bool dispc_mgr_timings_ok(enum omap_channel channel, const struct omap_video_timings *timings); -unsigned long dispc_fclk_rate(void); int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, struct dispc_clock_info *cinfo); @@ -398,9 +396,6 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane, u32 *fifo_low, u32 *fifo_high, bool use_fifomerge, bool manual_update); -unsigned long dispc_mgr_lclk_rate(enum omap_channel channel); -unsigned long dispc_mgr_pclk_rate(enum omap_channel channel); -unsigned long dispc_core_clk_rate(void); void dispc_mgr_set_clock_div(enum omap_channel channel, const struct dispc_clock_info *cinfo); int dispc_mgr_get_clock_div(enum omap_channel channel, -- cgit v1.2.1 From b742648c499444e6a3044c9e8afb08956c9ca75c Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 17:10:58 +0200 Subject: OMAPDSS: remove extra out == NULL checks All the output drivers check for 'out' being NULL, but it can never be NULL. Remove the check. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- drivers/video/fbdev/omap2/dss/dpi.c | 2 +- drivers/video/fbdev/omap2/dss/dsi.c | 2 +- drivers/video/fbdev/omap2/dss/hdmi4.c | 2 +- drivers/video/fbdev/omap2/dss/hdmi5.c | 2 +- drivers/video/fbdev/omap2/dss/rfbi.c | 2 +- drivers/video/fbdev/omap2/dss/sdi.c | 2 +- drivers/video/fbdev/omap2/dss/venc.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dpi.c b/drivers/video/fbdev/omap2/dss/dpi.c index fb45b6432968..7953e6a52346 100644 --- a/drivers/video/fbdev/omap2/dss/dpi.c +++ b/drivers/video/fbdev/omap2/dss/dpi.c @@ -395,7 +395,7 @@ static int dpi_display_enable(struct omap_dss_device *dssdev) goto err_no_reg; } - if (out == NULL || out->manager == NULL) { + if (out->manager == NULL) { DSSERR("failed to enable display: no output/manager\n"); r = -ENODEV; goto err_no_out_mgr; diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c index b3606def5b7b..59065e18444d 100644 --- a/drivers/video/fbdev/omap2/dss/dsi.c +++ b/drivers/video/fbdev/omap2/dss/dsi.c @@ -3833,7 +3833,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel) u16 word_count; int r; - if (out == NULL || out->manager == NULL) { + if (out->manager == NULL) { DSSERR("failed to enable display: no output/manager\n"); return -ENODEV; } diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c index 94c8d5549b4c..7103c659a534 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/dss/hdmi4.c @@ -343,7 +343,7 @@ static int hdmi_display_enable(struct omap_dss_device *dssdev) mutex_lock(&hdmi.lock); - if (out == NULL || out->manager == NULL) { + if (out->manager == NULL) { DSSERR("failed to enable display: no output/manager\n"); r = -ENODEV; goto err0; diff --git a/drivers/video/fbdev/omap2/dss/hdmi5.c b/drivers/video/fbdev/omap2/dss/hdmi5.c index b59ba7902be1..a955a2c4c061 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi5.c +++ b/drivers/video/fbdev/omap2/dss/hdmi5.c @@ -373,7 +373,7 @@ static int hdmi_display_enable(struct omap_dss_device *dssdev) mutex_lock(&hdmi.lock); - if (out == NULL || out->manager == NULL) { + if (out->manager == NULL) { DSSERR("failed to enable display: no output/manager\n"); r = -ENODEV; goto err0; diff --git a/drivers/video/fbdev/omap2/dss/rfbi.c b/drivers/video/fbdev/omap2/dss/rfbi.c index 1525a494d057..aea6a1d0fb20 100644 --- a/drivers/video/fbdev/omap2/dss/rfbi.c +++ b/drivers/video/fbdev/omap2/dss/rfbi.c @@ -880,7 +880,7 @@ static int rfbi_display_enable(struct omap_dss_device *dssdev) struct omap_dss_device *out = &rfbi.output; int r; - if (out == NULL || out->manager == NULL) { + if (out->manager == NULL) { DSSERR("failed to enable display: no output/manager\n"); return -ENODEV; } diff --git a/drivers/video/fbdev/omap2/dss/sdi.c b/drivers/video/fbdev/omap2/dss/sdi.c index 5843580a1deb..d747cc6b59e1 100644 --- a/drivers/video/fbdev/omap2/dss/sdi.c +++ b/drivers/video/fbdev/omap2/dss/sdi.c @@ -136,7 +136,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) unsigned long pck; int r; - if (out == NULL || out->manager == NULL) { + if (out->manager == NULL) { DSSERR("failed to enable display: no output/manager\n"); return -ENODEV; } diff --git a/drivers/video/fbdev/omap2/dss/venc.c b/drivers/video/fbdev/omap2/dss/venc.c index 99ca268c1cdd..c9260a451ca6 100644 --- a/drivers/video/fbdev/omap2/dss/venc.c +++ b/drivers/video/fbdev/omap2/dss/venc.c @@ -503,7 +503,7 @@ static int venc_display_enable(struct omap_dss_device *dssdev) mutex_lock(&venc.venc_lock); - if (out == NULL || out->manager == NULL) { + if (out->manager == NULL) { DSSERR("Failed to enable display: no output/manager\n"); r = -ENODEV; goto err0; -- cgit v1.2.1 From 00355412d1fb589503fb9d9b7631bb522d42ed4b Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 23 Nov 2015 21:22:36 +0300 Subject: OMAPDSS: DSI: cleanup DSI_IRQ_ERROR_MASK define DSI_IRQ_SYNC_LOST was ORed twice so we can remove one. Signed-off-by: Dan Carpenter Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c index 59065e18444d..43be4b2a7b05 100644 --- a/drivers/video/fbdev/omap2/dss/dsi.c +++ b/drivers/video/fbdev/omap2/dss/dsi.c @@ -144,7 +144,7 @@ struct dsi_reg { u16 module; u16 idx; }; #define DSI_IRQ_TA_TIMEOUT (1 << 20) #define DSI_IRQ_ERROR_MASK \ (DSI_IRQ_HS_TX_TIMEOUT | DSI_IRQ_LP_RX_TIMEOUT | DSI_IRQ_SYNC_LOST | \ - DSI_IRQ_TA_TIMEOUT | DSI_IRQ_SYNC_LOST) + DSI_IRQ_TA_TIMEOUT) #define DSI_IRQ_CHANNEL_MASK 0xf /* Virtual channel interrupts */ -- cgit v1.2.1 From 0bcfdba6c0b76f5aabd55993a8a6fdf87a6ae3e1 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Thu, 15 Oct 2015 13:29:38 +0100 Subject: OMAPDSS: DISPC: Remove boolean comparisons Boolean tests do not need explicit comparison to true or false. Signed-off-by: Luis de Bethencourt Acked-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc-compat.c | 6 +++--- drivers/video/fbdev/omap2/dss/dispc.c | 6 +++--- drivers/video/fbdev/omap2/dss/manager.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dispc-compat.c b/drivers/video/fbdev/omap2/dss/dispc-compat.c index 633c461fbc6e..0918b3bfe82a 100644 --- a/drivers/video/fbdev/omap2/dss/dispc-compat.c +++ b/drivers/video/fbdev/omap2/dss/dispc-compat.c @@ -476,7 +476,7 @@ static void dispc_mgr_disable_lcd_out(enum omap_channel channel) int r; u32 irq; - if (dispc_mgr_is_enabled(channel) == false) + if (!dispc_mgr_is_enabled(channel)) return; /* @@ -524,7 +524,7 @@ static void dispc_mgr_enable_digit_out(void) int r; u32 irq_mask; - if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT) == true) + if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT)) return; /* @@ -562,7 +562,7 @@ static void dispc_mgr_disable_digit_out(void) u32 irq_mask; int num_irqs; - if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT) == false) + if (!dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT)) return; /* diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 346822b55947..6b50476ec669 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -581,7 +581,7 @@ EXPORT_SYMBOL(dispc_mgr_go_busy); void dispc_mgr_go(enum omap_channel channel) { - WARN_ON(dispc_mgr_is_enabled(channel) == false); + WARN_ON(!dispc_mgr_is_enabled(channel)); WARN_ON(dispc_mgr_go_busy(channel)); DSSDBG("GO %s\n", mgr_desc[channel].name); @@ -3285,7 +3285,7 @@ void dispc_mgr_set_timings(enum omap_channel channel, DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt); } else { - if (t.interlace == true) + if (t.interlace) t.y_res /= 2; } @@ -3302,7 +3302,7 @@ static void dispc_mgr_set_lcd_divisor(enum omap_channel channel, u16 lck_div, dispc_write_reg(DISPC_DIVISORo(channel), FLD_VAL(lck_div, 23, 16) | FLD_VAL(pck_div, 7, 0)); - if (dss_has_feature(FEAT_CORE_CLK_DIV) == false && + if (!dss_has_feature(FEAT_CORE_CLK_DIV) && channel == OMAP_DSS_CHANNEL_LCD) dispc.core_clk_rate = dispc_fclk_rate() / lck_div; } diff --git a/drivers/video/fbdev/omap2/dss/manager.c b/drivers/video/fbdev/omap2/dss/manager.c index 1aac9b4191a9..08a67f4f6a20 100644 --- a/drivers/video/fbdev/omap2/dss/manager.c +++ b/drivers/video/fbdev/omap2/dss/manager.c @@ -210,7 +210,7 @@ static int dss_mgr_check_lcd_config(struct omap_overlay_manager *mgr, return -EINVAL; /* fifohandcheck should be used only with stallmode */ - if (stallmode == false && fifohandcheck == true) + if (!stallmode && fifohandcheck) return -EINVAL; /* -- cgit v1.2.1 From 9dec58e6c4d44175eaab64308c1bc27a2b5cb555 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Mon, 12 Oct 2015 22:43:14 +0200 Subject: video: omapdss: delete unneeded of_node_put Device node iterators perform an of_node_put on each iteration, so putting an of_node_put before a continue results in a double put. A simplified version of the semantic match that finds this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; iterator i; @@ i(..., child, ...) { ... when != of_node_get(child) * of_node_put(child); ... * continue; } // Signed-off-by: Julia Lawall Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/omapdss-boot-init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c index 8b6f6d5fdd68..136d30484d02 100644 --- a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c +++ b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c @@ -199,10 +199,8 @@ static int __init omapdss_boot_init(void) omapdss_walk_device(dss, true); for_each_available_child_of_node(dss, child) { - if (!of_find_property(child, "compatible", NULL)) { - of_node_put(child); + if (!of_find_property(child, "compatible", NULL)) continue; - } omapdss_walk_device(child, true); } -- cgit v1.2.1 From 85d90b12518f3dfaed23e83dd8b163bc6271725e Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 4 Dec 2015 16:14:58 +0300 Subject: OMAPDSS: DSS: fix a warning message The WARN() macro has to take a condition. The current code will just print the stack trace and the function name instead of the intended warning message. Signed-off-by: Dan Carpenter Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dss.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/dss/dss.h b/drivers/video/fbdev/omap2/dss/dss.h index fec68d8939bc..9a6453235585 100644 --- a/drivers/video/fbdev/omap2/dss/dss.h +++ b/drivers/video/fbdev/omap2/dss/dss.h @@ -343,7 +343,8 @@ u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt); #else static inline u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt) { - WARN("%s: DSI not compiled in, returning pixel_size as 0\n", __func__); + WARN(1, "%s: DSI not compiled in, returning pixel_size as 0\n", + __func__); return 0; } #endif -- cgit v1.2.1 From 7f496cfd6bd5a74c9cd50252b3a0141709cbf020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 10 Dec 2015 14:11:43 +0100 Subject: fbdev: omap2: panel-dpi: in .disable first disable backlight then display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes .disable operate in reverse order compared to .enable. Signed-off-by: Uwe Kleine-König Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c index f7be3489f744..06b6e611e4b2 100644 --- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c +++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c @@ -102,12 +102,12 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev) if (!omapdss_device_is_enabled(dssdev)) return; - if (ddata->enable_gpio) - gpiod_set_value_cansleep(ddata->enable_gpio, 0); - if (gpio_is_valid(ddata->backlight_gpio)) gpio_set_value_cansleep(ddata->backlight_gpio, 0); + if (ddata->enable_gpio) + gpiod_set_value_cansleep(ddata->enable_gpio, 0); + in->ops.dpi->disable(in); dssdev->state = OMAP_DSS_DISPLAY_DISABLED; -- cgit v1.2.1 From ef1ea03d7574273d39b6af49494b02e337992a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 10 Dec 2015 14:11:44 +0100 Subject: fbdev: omap2: panel-dpi: simplify gpio setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gpiod_set_value_cansleep is a noop when the passed descriptor is NULL. So there is no need to duplicate the check for NULL; just call the function unconditionally instead. Signed-off-by: Uwe Kleine-König Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c index 06b6e611e4b2..e780fd4f8b46 100644 --- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c +++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c @@ -83,8 +83,7 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev) if (r) return r; - if (ddata->enable_gpio) - gpiod_set_value_cansleep(ddata->enable_gpio, 1); + gpiod_set_value_cansleep(ddata->enable_gpio, 1); if (gpio_is_valid(ddata->backlight_gpio)) gpio_set_value_cansleep(ddata->backlight_gpio, 1); @@ -105,8 +104,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev) if (gpio_is_valid(ddata->backlight_gpio)) gpio_set_value_cansleep(ddata->backlight_gpio, 0); - if (ddata->enable_gpio) - gpiod_set_value_cansleep(ddata->enable_gpio, 0); + gpiod_set_value_cansleep(ddata->enable_gpio, 0); in->ops.dpi->disable(in); -- cgit v1.2.1 From 1c6aac92ee6cbb007ec0765956095357e7d4090c Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 9 Dec 2015 18:21:58 +0200 Subject: omapfb: allow compilation only if DRM_OMAP is disabled At the moment omapfb and omapdrm can be compiled at the same time, if both are modules. However, they can't be both loaded, as they use the same hardware. This has been mostly for compile testing. To make it clear that omapfb and omapdrm are mutually exclusive drivers, this patch makes omapfb available only if omapdrm is disabled. Signed-off-by: Tomi Valkeinen Acked-by: Dave Airlie Acked-by: Rob Clark --- drivers/video/fbdev/omap2/omapfb/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/omapfb/Kconfig b/drivers/video/fbdev/omap2/omapfb/Kconfig index 4cb12ce68855..7ba1a22199b8 100644 --- a/drivers/video/fbdev/omap2/omapfb/Kconfig +++ b/drivers/video/fbdev/omap2/omapfb/Kconfig @@ -1,6 +1,7 @@ menuconfig FB_OMAP2 tristate "OMAP2+ frame buffer support" - depends on FB && OMAP2_DSS && !DRM_OMAP + depends on FB + depends on DRM_OMAP = n select OMAP2_VRFB if ARCH_OMAP2 || ARCH_OMAP3 select FB_CFB_FILLRECT -- cgit v1.2.1 From f76ee892a99e68b55402b8d4b8aeffcae2aff34d Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 9 Dec 2015 18:28:28 +0200 Subject: omapfb: copy omapdss & displays for omapfb This patch makes a copy of the omapdss driver and the omap panel & encoder drivers for omapfb. The purpose is to separate omapdrm and omapfb drivers from each other. Note that this patch only does a direct copy of the files without any other modifications. The files are not yet used. The original files are in: drivers/video/fbdev/omap2/dss/ drivers/video/fbdev/omap2/displays-new/ Here's a more detailed explanation about this and the following patches, from the introduction mail of the patch series: A short background on the current status. We have the following entities: * omapdss, located in drivers/video/fbdev/omap2/dss/. This is a driver for the display subsystem IPs used on OMAP (and related) SoCs. It offers only a kernel internal API, and does not implement anything for fbdev or drm. * omapdss panels and encoders, located in drivers/video/fbdev/omap2/displays-new/. These are panel and external encoder drivers, which use APIs offered by omapdss driver. These also don't implement anything for fbdev or drm. * omapdrm, located in drivers/gpu/drm/omapdrm/. This is a drm driver, which uses omapdss and the panel/encoder drivers to operate the hardware. * omapfb, located in drivers/video/fbdev/omap2/omapfb/. This is an fbdev driver, which uses omapdss and the panel/encoder drivers to operate the hardware. * omap_vout, located in drivers/media/platform/omap/. This is a v4l2 driver, which uses omapdss and omapfb to implement a v4l2 API for the video overlays. So, on the top level, we have either omapdrm, or omapfb+omap_vout. Both of those use the same low level drivers. Without going to the historical details why the architecture is like that, I think it's finally time to change that. The situation with omapfb+omap_vout is that it still works, but no new features have been added for a long time, and I want to keep it working as it's still being used. At some point in the future I'd like to remove omapfb and omap_vout altogether. Omapdrm, on the other hand, is being actively developed. Sharing the low level parts with omapfb makes that development more difficult than it should be. It also "hides" half of the development, as everything happening in the low level parts resides under fbdev directory, not in the drm directory. I've been wanting to clean this up for a long time, but I haven't figured out a very good way to do it. I still haven't, but here's the best way I have come up with. This series makes a full copy of the low level parts, omapdss and panel/encoder drivers. Both omapfb+omap_vout and omapdrm will have their own versions. The copy omapfb+omap_vout get is a new copy, and the copy that omapdrm gets is just the current files moved. This way git will associate the omapdrm version with the old files. The omapfb+omap_vout versions won't be touched unless there are some big issues there. The omapdrm versions can be refactored and cleaned up, as the omapfb support code is no longer needed. We can perhaps also merge omapdss and omapdrm into the same kernel module. This series only does the copy, and the absolutely necessary parts. No further cleanups are done yet. Signed-off-by: Tomi Valkeinen Acked-by: Dave Airlie Acked-by: Rob Clark --- drivers/video/fbdev/omap2/omapfb/displays/Kconfig | 86 + drivers/video/fbdev/omap2/omapfb/displays/Makefile | 14 + .../omap2/omapfb/displays/connector-analog-tv.c | 320 ++ .../fbdev/omap2/omapfb/displays/connector-dvi.c | 398 ++ .../fbdev/omap2/omapfb/displays/connector-hdmi.c | 348 ++ .../fbdev/omap2/omapfb/displays/encoder-opa362.c | 278 + .../fbdev/omap2/omapfb/displays/encoder-tfp410.c | 320 ++ .../omap2/omapfb/displays/encoder-tpd12s015.c | 328 ++ .../video/fbdev/omap2/omapfb/displays/panel-dpi.c | 328 ++ .../fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 1388 +++++ .../omapfb/displays/panel-lgphilips-lb035q02.c | 404 ++ .../omap2/omapfb/displays/panel-nec-nl8048hl11.c | 437 ++ .../omapfb/displays/panel-sharp-ls037v7dw01.c | 415 ++ .../omap2/omapfb/displays/panel-sony-acx565akm.c | 917 ++++ .../omap2/omapfb/displays/panel-tpo-td028ttec1.c | 511 ++ .../omap2/omapfb/displays/panel-tpo-td043mtea1.c | 686 +++ drivers/video/fbdev/omap2/omapfb/dss/Kconfig | 135 + drivers/video/fbdev/omap2/omapfb/dss/Makefile | 18 + drivers/video/fbdev/omap2/omapfb/dss/apply.c | 1702 ++++++ drivers/video/fbdev/omap2/omapfb/dss/core.c | 343 ++ .../video/fbdev/omap2/omapfb/dss/dispc-compat.c | 667 +++ .../video/fbdev/omap2/omapfb/dss/dispc-compat.h | 30 + drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 4234 +++++++++++++++ drivers/video/fbdev/omap2/omapfb/dss/dispc.h | 918 ++++ drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c | 325 ++ .../video/fbdev/omap2/omapfb/dss/display-sysfs.c | 356 ++ drivers/video/fbdev/omap2/omapfb/dss/display.c | 338 ++ drivers/video/fbdev/omap2/omapfb/dss/dpi.c | 899 ++++ drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 5607 ++++++++++++++++++++ drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 183 + drivers/video/fbdev/omap2/omapfb/dss/dss.c | 1329 +++++ drivers/video/fbdev/omap2/omapfb/dss/dss.h | 468 ++ .../video/fbdev/omap2/omapfb/dss/dss_features.c | 951 ++++ .../video/fbdev/omap2/omapfb/dss/dss_features.h | 108 + drivers/video/fbdev/omap2/omapfb/dss/hdmi.h | 370 ++ drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 839 +++ drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | 904 ++++ drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.h | 273 + drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 876 +++ drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 916 ++++ drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.h | 304 ++ drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c | 148 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c | 247 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c | 255 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c | 282 + .../video/fbdev/omap2/omapfb/dss/manager-sysfs.c | 531 ++ drivers/video/fbdev/omap2/omapfb/dss/manager.c | 263 + .../fbdev/omap2/omapfb/dss/omapdss-boot-init.c | 225 + drivers/video/fbdev/omap2/omapfb/dss/output.c | 267 + .../video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | 456 ++ drivers/video/fbdev/omap2/omapfb/dss/overlay.c | 202 + drivers/video/fbdev/omap2/omapfb/dss/pll.c | 389 ++ drivers/video/fbdev/omap2/omapfb/dss/rfbi.c | 1078 ++++ drivers/video/fbdev/omap2/omapfb/dss/sdi.c | 454 ++ drivers/video/fbdev/omap2/omapfb/dss/venc.c | 997 ++++ drivers/video/fbdev/omap2/omapfb/dss/video-pll.c | 211 + 56 files changed, 36276 insertions(+) create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/Kconfig create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/Makefile create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c create mode 100644 drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/Kconfig create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/Makefile create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/apply.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/core.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/display.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dpi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dsi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss-of.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss_features.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss_features.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/manager.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/output.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/overlay.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/pll.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/rfbi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/sdi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/venc.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/video-pll.c (limited to 'drivers/video/fbdev/omap2') diff --git a/drivers/video/fbdev/omap2/omapfb/displays/Kconfig b/drivers/video/fbdev/omap2/omapfb/displays/Kconfig new file mode 100644 index 000000000000..574710141a61 --- /dev/null +++ b/drivers/video/fbdev/omap2/omapfb/displays/Kconfig @@ -0,0 +1,86 @@ +menu "OMAP Display Device Drivers (new device model)" + depends on OMAP2_DSS + +config DISPLAY_ENCODER_OPA362 + tristate "OPA362 external analog amplifier" + help + Driver for OPA362 external analog TV amplifier controlled + through a GPIO. + +config DISPLAY_ENCODER_TFP410 + tristate "TFP410 DPI to DVI Encoder" + help + Driver for TFP410 DPI to DVI encoder. + +config DISPLAY_ENCODER_TPD12S015 + tristate "TPD12S015 HDMI ESD protection and level shifter" + help + Driver for TPD12S015, which offers HDMI ESD protection and level + shifting. + +config DISPLAY_CONNECTOR_DVI + tristate "DVI Connector" + depends on I2C + help + Driver for a generic DVI connector. + +config DISPLAY_CONNECTOR_HDMI + tristate "HDMI Connector" + help + Driver for a generic HDMI connector. + +config DISPLAY_CONNECTOR_ANALOG_TV + tristate "Analog TV Connector" + help + Driver for a generic analog TV connector. + +config DISPLAY_PANEL_DPI + tristate "Generic DPI panel" + help + Driver for generic DPI panels. + +config DISPLAY_PANEL_DSI_CM + tristate "Generic DSI Command Mode Panel" + depends on BACKLIGHT_CLASS_DEVICE + help + Driver for generic DSI command mode panels. + +config DISPLAY_PANEL_SONY_ACX565AKM + tristate "ACX565AKM Panel" + depends on SPI && BACKLIGHT_CLASS_DEVICE + help + This is the LCD panel used on Nokia N900 + +config DISPLAY_PANEL_LGPHILIPS_LB035Q02 + tristate "LG.Philips LB035Q02 LCD Panel" + depends on SPI + help + LCD Panel used on the Gumstix Overo Palo35 + +config DISPLAY_PANEL_SHARP_LS037V7DW01 + tristate "Sharp LS037V7DW01 LCD Panel" + depends on BACKLIGHT_CLASS_DEVICE + help + LCD Panel used in TI's SDP3430 and EVM boards + +config DISPLAY_PANEL_TPO_TD028TTEC1 + tristate "TPO TD028TTEC1 LCD Panel" + depends on SPI + help + LCD panel used in Openmoko. + +config DISPLAY_PANEL_TPO_TD043MTEA1 + tristate "TPO TD043MTEA1 LCD Panel" + depends on SPI + help + LCD Panel used in OMAP3 Pandora + +config DISPLAY_PANEL_NEC_NL8048HL11 + tristate "NEC NL8048HL11 Panel" + depends on SPI + depends on BACKLIGHT_CLASS_DEVICE + help + This NEC NL8048HL11 panel is TFT LCD used in the + Zoom2/3/3630 sdp boards. + +endmenu diff --git a/drivers/video/fbdev/omap2/omapfb/displays/Makefile b/drivers/video/fbdev/omap2/omapfb/displays/Makefile new file mode 100644 index 000000000000..9aa176bfbf2e --- /dev/null +++ b/drivers/video/fbdev/omap2/omapfb/displays/Makefile @@ -0,0 +1,14 @@ +obj-$(CONFIG_DISPLAY_ENCODER_OPA362) += encoder-opa362.o +obj-$(CONFIG_DISPLAY_ENCODER_TFP410) += encoder-tfp410.o +obj-$(CONFIG_DISPLAY_ENCODER_TPD12S015) += encoder-tpd12s015.o +obj-$(CONFIG_DISPLAY_CONNECTOR_DVI) += connector-dvi.o +obj-$(CONFIG_DISPLAY_CONNECTOR_HDMI) += connector-hdmi.o +obj-$(CONFIG_DISPLAY_CONNECTOR_ANALOG_TV) += connector-analog-tv.o +obj-$(CONFIG_DISPLAY_PANEL_DPI) += panel-dpi.o +obj-$(CONFIG_DISPLAY_PANEL_DSI_CM) += panel-dsi-cm.o +obj-$(CONFIG_DISPLAY_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o +obj-$(CONFIG_DISPLAY_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o +obj-$(CONFIG_DISPLAY_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o +obj-$(CONFIG_DISPLAY_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o +obj-$(CONFIG_DISPLAY_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o +obj-$(CONFIG_DISPLAY_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c new file mode 100644 index 000000000000..8511c648a15c --- /dev/null +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c @@ -0,0 +1,320 @@ +/* + * Analog TV Connector driver + * + * Copyright (C) 2013 Texas Instruments + * Author: Tomi Valkeinen + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +#include +#include +#include +#include + +#include