diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-07-25 04:55:46 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-07-25 04:55:46 -0400 |
commit | d9053b487965042b9c849ce40c7f1fb7a0b84b39 (patch) | |
tree | 1fbb2559dd8fd400cf1dff5711cc5e408ea79ef6 /drivers/video/omap2/dss/overlay.c | |
parent | 4c5b1fb8a1348542afb153aef72f6067989f578e (diff) | |
parent | 974a65825e0b5fbda49605f0416a2c975d66e9e6 (diff) |
Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next
Conflicts:
drivers/video/omap2/dss/core.c
drivers/video/omap2/dss/dispc.c
Diffstat (limited to 'drivers/video/omap2/dss/overlay.c')
-rw-r--r-- | drivers/video/omap2/dss/overlay.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c index b0ba60f88dd2..952c6fad9a81 100644 --- a/drivers/video/omap2/dss/overlay.c +++ b/drivers/video/omap2/dss/overlay.c | |||
@@ -528,14 +528,24 @@ void dss_recheck_connections(struct omap_dss_device *dssdev, bool force) | |||
528 | struct omap_overlay_manager *lcd_mgr; | 528 | struct omap_overlay_manager *lcd_mgr; |
529 | struct omap_overlay_manager *tv_mgr; | 529 | struct omap_overlay_manager *tv_mgr; |
530 | struct omap_overlay_manager *lcd2_mgr = NULL; | 530 | struct omap_overlay_manager *lcd2_mgr = NULL; |
531 | struct omap_overlay_manager *lcd3_mgr = NULL; | ||
531 | struct omap_overlay_manager *mgr = NULL; | 532 | struct omap_overlay_manager *mgr = NULL; |
532 | 533 | ||
533 | lcd_mgr = omap_dss_get_overlay_manager(OMAP_DSS_OVL_MGR_LCD); | 534 | lcd_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_LCD); |
534 | tv_mgr = omap_dss_get_overlay_manager(OMAP_DSS_OVL_MGR_TV); | 535 | tv_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_DIGIT); |
536 | if (dss_has_feature(FEAT_MGR_LCD3)) | ||
537 | lcd3_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_LCD3); | ||
535 | if (dss_has_feature(FEAT_MGR_LCD2)) | 538 | if (dss_has_feature(FEAT_MGR_LCD2)) |
536 | lcd2_mgr = omap_dss_get_overlay_manager(OMAP_DSS_OVL_MGR_LCD2); | 539 | lcd2_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_LCD2); |
537 | 540 | ||
538 | if (dssdev->channel == OMAP_DSS_CHANNEL_LCD2) { | 541 | if (dssdev->channel == OMAP_DSS_CHANNEL_LCD3) { |
542 | if (!lcd3_mgr->device || force) { | ||
543 | if (lcd3_mgr->device) | ||
544 | lcd3_mgr->unset_device(lcd3_mgr); | ||
545 | lcd3_mgr->set_device(lcd3_mgr, dssdev); | ||
546 | mgr = lcd3_mgr; | ||
547 | } | ||
548 | } else if (dssdev->channel == OMAP_DSS_CHANNEL_LCD2) { | ||
539 | if (!lcd2_mgr->device || force) { | 549 | if (!lcd2_mgr->device || force) { |
540 | if (lcd2_mgr->device) | 550 | if (lcd2_mgr->device) |
541 | lcd2_mgr->unset_device(lcd2_mgr); | 551 | lcd2_mgr->unset_device(lcd2_mgr); |
@@ -677,3 +687,16 @@ int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info, | |||
677 | 687 | ||
678 | return 0; | 688 | return 0; |
679 | } | 689 | } |
690 | |||
691 | /* | ||
692 | * Checks if replication logic should be used. Only use when overlay is in | ||
693 | * RGB12U or RGB16 mode, and video port width interface is 18bpp or 24bpp | ||
694 | */ | ||
695 | bool dss_ovl_use_replication(struct dss_lcd_mgr_config config, | ||
696 | enum omap_color_mode mode) | ||
697 | { | ||
698 | if (mode != OMAP_DSS_COLOR_RGB12U && mode != OMAP_DSS_COLOR_RGB16) | ||
699 | return false; | ||
700 | |||
701 | return config.video_port_width > 16; | ||
702 | } | ||