diff options
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 22 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 190 | ||||
-rw-r--r-- | drivers/video/omap2/dss/manager.c | 47 | ||||
-rw-r--r-- | drivers/video/omap2/dss/overlay.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 23 | ||||
-rw-r--r-- | include/video/omapdss.h | 7 |
6 files changed, 22 insertions, 275 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 003227c82b3f..43dbfb1da778 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -3058,9 +3058,6 @@ static void dispc_error_worker(struct work_struct *work) | |||
3058 | struct omap_overlay *ovl; | 3058 | struct omap_overlay *ovl; |
3059 | ovl = omap_dss_get_overlay(i); | 3059 | ovl = omap_dss_get_overlay(i); |
3060 | 3060 | ||
3061 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
3062 | continue; | ||
3063 | |||
3064 | if (ovl->id == 0) { | 3061 | if (ovl->id == 0) { |
3065 | dispc_enable_plane(ovl->id, 0); | 3062 | dispc_enable_plane(ovl->id, 0); |
3066 | dispc_go(ovl->manager->id); | 3063 | dispc_go(ovl->manager->id); |
@@ -3076,9 +3073,6 @@ static void dispc_error_worker(struct work_struct *work) | |||
3076 | struct omap_overlay *ovl; | 3073 | struct omap_overlay *ovl; |
3077 | ovl = omap_dss_get_overlay(i); | 3074 | ovl = omap_dss_get_overlay(i); |
3078 | 3075 | ||
3079 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
3080 | continue; | ||
3081 | |||
3082 | if (ovl->id == 1) { | 3076 | if (ovl->id == 1) { |
3083 | dispc_enable_plane(ovl->id, 0); | 3077 | dispc_enable_plane(ovl->id, 0); |
3084 | dispc_go(ovl->manager->id); | 3078 | dispc_go(ovl->manager->id); |
@@ -3094,9 +3088,6 @@ static void dispc_error_worker(struct work_struct *work) | |||
3094 | struct omap_overlay *ovl; | 3088 | struct omap_overlay *ovl; |
3095 | ovl = omap_dss_get_overlay(i); | 3089 | ovl = omap_dss_get_overlay(i); |
3096 | 3090 | ||
3097 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
3098 | continue; | ||
3099 | |||
3100 | if (ovl->id == 2) { | 3091 | if (ovl->id == 2) { |
3101 | dispc_enable_plane(ovl->id, 0); | 3092 | dispc_enable_plane(ovl->id, 0); |
3102 | dispc_go(ovl->manager->id); | 3093 | dispc_go(ovl->manager->id); |
@@ -3131,9 +3122,6 @@ static void dispc_error_worker(struct work_struct *work) | |||
3131 | struct omap_overlay *ovl; | 3122 | struct omap_overlay *ovl; |
3132 | ovl = omap_dss_get_overlay(i); | 3123 | ovl = omap_dss_get_overlay(i); |
3133 | 3124 | ||
3134 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
3135 | continue; | ||
3136 | |||
3137 | if (ovl->id != 0 && ovl->manager == manager) | 3125 | if (ovl->id != 0 && ovl->manager == manager) |
3138 | dispc_enable_plane(ovl->id, 0); | 3126 | dispc_enable_plane(ovl->id, 0); |
3139 | } | 3127 | } |
@@ -3170,9 +3158,6 @@ static void dispc_error_worker(struct work_struct *work) | |||
3170 | struct omap_overlay *ovl; | 3158 | struct omap_overlay *ovl; |
3171 | ovl = omap_dss_get_overlay(i); | 3159 | ovl = omap_dss_get_overlay(i); |
3172 | 3160 | ||
3173 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
3174 | continue; | ||
3175 | |||
3176 | if (ovl->id != 0 && ovl->manager == manager) | 3161 | if (ovl->id != 0 && ovl->manager == manager) |
3177 | dispc_enable_plane(ovl->id, 0); | 3162 | dispc_enable_plane(ovl->id, 0); |
3178 | } | 3163 | } |
@@ -3209,9 +3194,6 @@ static void dispc_error_worker(struct work_struct *work) | |||
3209 | struct omap_overlay *ovl; | 3194 | struct omap_overlay *ovl; |
3210 | ovl = omap_dss_get_overlay(i); | 3195 | ovl = omap_dss_get_overlay(i); |
3211 | 3196 | ||
3212 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
3213 | continue; | ||
3214 | |||
3215 | if (ovl->id != 0 && ovl->manager == manager) | 3197 | if (ovl->id != 0 && ovl->manager == manager) |
3216 | dispc_enable_plane(ovl->id, 0); | 3198 | dispc_enable_plane(ovl->id, 0); |
3217 | } | 3199 | } |
@@ -3228,9 +3210,7 @@ static void dispc_error_worker(struct work_struct *work) | |||
3228 | for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) { | 3210 | for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) { |
3229 | struct omap_overlay_manager *mgr; | 3211 | struct omap_overlay_manager *mgr; |
3230 | mgr = omap_dss_get_overlay_manager(i); | 3212 | mgr = omap_dss_get_overlay_manager(i); |
3231 | 3213 | mgr->device->driver->disable(mgr->device); | |
3232 | if (mgr->caps & OMAP_DSS_OVL_CAP_DISPC) | ||
3233 | mgr->device->driver->disable(mgr->device); | ||
3234 | } | 3214 | } |
3235 | } | 3215 | } |
3236 | 3216 | ||
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index c951a75e7021..bd0ff1d64497 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -3648,161 +3648,6 @@ static void dsi_proto_timings(struct omap_dss_device *dssdev) | |||
3648 | enter_hs_mode_lat, exit_hs_mode_lat); | 3648 | enter_hs_mode_lat, exit_hs_mode_lat); |
3649 | } | 3649 | } |
3650 | 3650 | ||
3651 | |||
3652 | #define DSI_DECL_VARS \ | ||
3653 | int __dsi_cb = 0; u32 __dsi_cv = 0; | ||
3654 | |||
3655 | #define DSI_FLUSH(dsidev, ch) \ | ||
3656 | if (__dsi_cb > 0) { \ | ||
3657 | /*DSSDBG("sending long packet %#010x\n", __dsi_cv);*/ \ | ||
3658 | dsi_write_reg(dsidev, DSI_VC_LONG_PACKET_PAYLOAD(ch), __dsi_cv); \ | ||
3659 | __dsi_cb = __dsi_cv = 0; \ | ||
3660 | } | ||
3661 | |||
3662 | #define DSI_PUSH(dsidev, ch, data) \ | ||
3663 | do { \ | ||
3664 | __dsi_cv |= (data) << (__dsi_cb * 8); \ | ||
3665 | /*DSSDBG("cv = %#010x, cb = %d\n", __dsi_cv, __dsi_cb);*/ \ | ||
3666 | if (++__dsi_cb > 3) \ | ||
3667 | DSI_FLUSH(dsidev, ch); \ | ||
3668 | } while (0) | ||
3669 | |||
3670 | static int dsi_update_screen_l4(struct omap_dss_device *dssdev, | ||
3671 | int x, int y, int w, int h) | ||
3672 | { | ||
3673 | /* Note: supports only 24bit colors in 32bit container */ | ||
3674 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | ||
3675 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | ||
3676 | int first = 1; | ||
3677 | int fifo_stalls = 0; | ||
3678 | int max_dsi_packet_size; | ||
3679 | int max_data_per_packet; | ||
3680 | int max_pixels_per_packet; | ||
3681 | int pixels_left; | ||
3682 | int bytespp = dssdev->ctrl.pixel_size / 8; | ||
3683 | int scr_width; | ||
3684 | u32 __iomem *data; | ||
3685 | int start_offset; | ||
3686 | int horiz_inc; | ||
3687 | int current_x; | ||
3688 | struct omap_overlay *ovl; | ||
3689 | |||
3690 | debug_irq = 0; | ||
3691 | |||
3692 | DSSDBG("dsi_update_screen_l4 (%d,%d %dx%d)\n", | ||
3693 | x, y, w, h); | ||
3694 | |||
3695 | ovl = dssdev->manager->overlays[0]; | ||
3696 | |||
3697 | if (ovl->info.color_mode != OMAP_DSS_COLOR_RGB24U) | ||
3698 | return -EINVAL; | ||
3699 | |||
3700 | if (dssdev->ctrl.pixel_size != 24) | ||
3701 | return -EINVAL; | ||
3702 | |||
3703 | scr_width = ovl->info.screen_width; | ||
3704 | data = ovl->info.vaddr; | ||
3705 | |||
3706 | start_offset = scr_width * y + x; | ||
3707 | horiz_inc = scr_width - w; | ||
3708 | current_x = x; | ||
3709 | |||
3710 | /* We need header(4) + DCSCMD(1) + pixels(numpix*bytespp) bytes | ||
3711 | * in fifo */ | ||
3712 | |||
3713 | /* When using CPU, max long packet size is TX buffer size */ | ||
3714 | max_dsi_packet_size = dsi->vc[0].fifo_size * 32 * 4; | ||
3715 | |||
3716 | /* we seem to get better perf if we divide the tx fifo to half, | ||
3717 | and while the other half is being sent, we fill the other half | ||
3718 | max_dsi_packet_size /= 2; */ | ||
3719 | |||
3720 | max_data_per_packet = max_dsi_packet_size - 4 - 1; | ||
3721 | |||
3722 | max_pixels_per_packet = max_data_per_packet / bytespp; | ||
3723 | |||
3724 | DSSDBG("max_pixels_per_packet %d\n", max_pixels_per_packet); | ||
3725 | |||
3726 | pixels_left = w * h; | ||
3727 | |||
3728 | DSSDBG("total pixels %d\n", pixels_left); | ||
3729 | |||
3730 | data += start_offset; | ||
3731 | |||
3732 | while (pixels_left > 0) { | ||
3733 | /* 0x2c = write_memory_start */ | ||
3734 | /* 0x3c = write_memory_continue */ | ||
3735 | u8 dcs_cmd = first ? 0x2c : 0x3c; | ||
3736 | int pixels; | ||
3737 | DSI_DECL_VARS; | ||
3738 | first = 0; | ||
3739 | |||
3740 | #if 1 | ||
3741 | /* using fifo not empty */ | ||
3742 | /* TX_FIFO_NOT_EMPTY */ | ||
3743 | while (FLD_GET(dsi_read_reg(dsidev, DSI_VC_CTRL(0)), 5, 5)) { | ||
3744 | fifo_stalls++; | ||
3745 | if (fifo_stalls > 0xfffff) { | ||
3746 | DSSERR("fifo stalls overflow, pixels left %d\n", | ||
3747 | pixels_left); | ||
3748 | dsi_if_enable(dsidev, 0); | ||
3749 | return -EIO; | ||
3750 | } | ||
3751 | udelay(1); | ||
3752 | } | ||
3753 | #elif 1 | ||
3754 | /* using fifo emptiness */ | ||
3755 | while ((REG_GET(dsidev, DSI_TX_FIFO_VC_EMPTINESS, 7, 0)+1)*4 < | ||
3756 | max_dsi_packet_size) { | ||
3757 | fifo_stalls++; | ||
3758 | if (fifo_stalls > 0xfffff) { | ||
3759 | DSSERR("fifo stalls overflow, pixels left %d\n", | ||
3760 | pixels_left); | ||
3761 | dsi_if_enable(dsidev, 0); | ||
3762 | return -EIO; | ||
3763 | } | ||
3764 | } | ||
3765 | #else | ||
3766 | while ((REG_GET(dsidev, DSI_TX_FIFO_VC_EMPTINESS, | ||
3767 | 7, 0) + 1) * 4 == 0) { | ||
3768 | fifo_stalls++; | ||
3769 | if (fifo_stalls > 0xfffff) { | ||
3770 | DSSERR("fifo stalls overflow, pixels left %d\n", | ||
3771 | pixels_left); | ||
3772 | dsi_if_enable(dsidev, 0); | ||
3773 | return -EIO; | ||
3774 | } | ||
3775 | } | ||
3776 | #endif | ||
3777 | pixels = min(max_pixels_per_packet, pixels_left); | ||
3778 | |||
3779 | pixels_left -= pixels; | ||
3780 | |||
3781 | dsi_vc_write_long_header(dsidev, 0, DSI_DT_DCS_LONG_WRITE, | ||
3782 | 1 + pixels * bytespp, 0); | ||
3783 | |||
3784 | DSI_PUSH(dsidev, 0, dcs_cmd); | ||
3785 | |||
3786 | while (pixels-- > 0) { | ||
3787 | u32 pix = __raw_readl(data++); | ||
3788 | |||
3789 | DSI_PUSH(dsidev, 0, (pix >> 16) & 0xff); | ||
3790 | DSI_PUSH(dsidev, 0, (pix >> 8) & 0xff); | ||
3791 | DSI_PUSH(dsidev, 0, (pix >> 0) & 0xff); | ||
3792 | |||
3793 | current_x++; | ||
3794 | if (current_x == x+w) { | ||
3795 | current_x = x; | ||
3796 | data += horiz_inc; | ||
3797 | } | ||
3798 | } | ||
3799 | |||
3800 | DSI_FLUSH(dsidev, 0); | ||
3801 | } | ||
3802 | |||
3803 | return 0; | ||
3804 | } | ||
3805 | |||
3806 | static void dsi_update_screen_dispc(struct omap_dss_device *dssdev, | 3651 | static void dsi_update_screen_dispc(struct omap_dss_device *dssdev, |
3807 | u16 x, u16 y, u16 w, u16 h) | 3652 | u16 x, u16 y, u16 w, u16 h) |
3808 | { | 3653 | { |
@@ -3970,11 +3815,9 @@ int omap_dsi_prepare_update(struct omap_dss_device *dssdev, | |||
3970 | 3815 | ||
3971 | dsi_perf_mark_setup(dsidev); | 3816 | dsi_perf_mark_setup(dsidev); |
3972 | 3817 | ||
3973 | if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) { | 3818 | dss_setup_partial_planes(dssdev, x, y, w, h, |
3974 | dss_setup_partial_planes(dssdev, x, y, w, h, | 3819 | enlarge_update_area); |
3975 | enlarge_update_area); | 3820 | dispc_set_lcd_size(dssdev->manager->id, *w, *h); |
3976 | dispc_set_lcd_size(dssdev->manager->id, *w, *h); | ||
3977 | } | ||
3978 | 3821 | ||
3979 | return 0; | 3822 | return 0; |
3980 | } | 3823 | } |
@@ -3996,27 +3839,16 @@ int omap_dsi_update(struct omap_dss_device *dssdev, | |||
3996 | * see rather obscure HW error happening, as DSS halts. */ | 3839 | * see rather obscure HW error happening, as DSS halts. */ |
3997 | BUG_ON(x % 2 == 1); | 3840 | BUG_ON(x % 2 == 1); |
3998 | 3841 | ||
3999 | if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) { | 3842 | dsi->framedone_callback = callback; |
4000 | dsi->framedone_callback = callback; | 3843 | dsi->framedone_data = data; |
4001 | dsi->framedone_data = data; | ||
4002 | |||
4003 | dsi->update_region.x = x; | ||
4004 | dsi->update_region.y = y; | ||
4005 | dsi->update_region.w = w; | ||
4006 | dsi->update_region.h = h; | ||
4007 | dsi->update_region.device = dssdev; | ||
4008 | |||
4009 | dsi_update_screen_dispc(dssdev, x, y, w, h); | ||
4010 | } else { | ||
4011 | int r; | ||
4012 | 3844 | ||
4013 | r = dsi_update_screen_l4(dssdev, x, y, w, h); | 3845 | dsi->update_region.x = x; |
4014 | if (r) | 3846 | dsi->update_region.y = y; |
4015 | return r; | 3847 | dsi->update_region.w = w; |
3848 | dsi->update_region.h = h; | ||
3849 | dsi->update_region.device = dssdev; | ||
4016 | 3850 | ||
4017 | dsi_perf_show(dsidev, "L4"); | 3851 | dsi_update_screen_dispc(dssdev, x, y, w, h); |
4018 | callback(0, data); | ||
4019 | } | ||
4020 | 3852 | ||
4021 | return 0; | 3853 | return 0; |
4022 | } | 3854 | } |
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index a6a909ae8670..72e041b3a66e 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c | |||
@@ -1333,9 +1333,6 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) | |||
1333 | 1333 | ||
1334 | ovl = omap_dss_get_overlay(i); | 1334 | ovl = omap_dss_get_overlay(i); |
1335 | 1335 | ||
1336 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
1337 | continue; | ||
1338 | |||
1339 | oc = &dss_cache.overlay_cache[ovl->id]; | 1336 | oc = &dss_cache.overlay_cache[ovl->id]; |
1340 | 1337 | ||
1341 | if (ovl->manager_changed) { | 1338 | if (ovl->manager_changed) { |
@@ -1387,9 +1384,6 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) | |||
1387 | list_for_each_entry(mgr, &manager_list, list) { | 1384 | list_for_each_entry(mgr, &manager_list, list) { |
1388 | struct omap_dss_device *dssdev; | 1385 | struct omap_dss_device *dssdev; |
1389 | 1386 | ||
1390 | if (!(mgr->caps & OMAP_DSS_OVL_MGR_CAP_DISPC)) | ||
1391 | continue; | ||
1392 | |||
1393 | mc = &dss_cache.manager_cache[mgr->id]; | 1387 | mc = &dss_cache.manager_cache[mgr->id]; |
1394 | 1388 | ||
1395 | if (mgr->device_changed) { | 1389 | if (mgr->device_changed) { |
@@ -1435,9 +1429,6 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) | |||
1435 | 1429 | ||
1436 | ovl = omap_dss_get_overlay(i); | 1430 | ovl = omap_dss_get_overlay(i); |
1437 | 1431 | ||
1438 | if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC)) | ||
1439 | continue; | ||
1440 | |||
1441 | oc = &dss_cache.overlay_cache[ovl->id]; | 1432 | oc = &dss_cache.overlay_cache[ovl->id]; |
1442 | 1433 | ||
1443 | if (!oc->enabled) | 1434 | if (!oc->enabled) |
@@ -1592,7 +1583,7 @@ int dss_init_overlay_managers(struct platform_device *pdev) | |||
1592 | mgr->enable = &dss_mgr_enable; | 1583 | mgr->enable = &dss_mgr_enable; |
1593 | mgr->disable = &dss_mgr_disable; | 1584 | mgr->disable = &dss_mgr_disable; |
1594 | 1585 | ||
1595 | mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC; | 1586 | mgr->caps = 0; |
1596 | mgr->supported_displays = | 1587 | mgr->supported_displays = |
1597 | dss_feat_get_supported_displays(mgr->id); | 1588 | dss_feat_get_supported_displays(mgr->id); |
1598 | 1589 | ||
@@ -1609,42 +1600,6 @@ int dss_init_overlay_managers(struct platform_device *pdev) | |||
1609 | } | 1600 | } |
1610 | } | 1601 | } |
1611 | 1602 | ||
1612 | #ifdef L4_EXAMPLE | ||
1613 | { | ||
1614 | int omap_dss_mgr_apply_l4(struct omap_overlay_manager *mgr) | ||
1615 | { | ||
1616 | DSSDBG("omap_dss_mgr_apply_l4(%s)\n", mgr->name); | ||
1617 | |||
1618 | return 0; | ||
1619 | } | ||
1620 | |||
1621 | struct omap_overlay_manager *mgr; | ||
1622 | mgr = kzalloc(sizeof(*mgr), GFP_KERNEL); | ||
1623 | |||
1624 | BUG_ON(mgr == NULL); | ||
1625 | |||
1626 | mgr->name = "l4"; | ||
1627 | mgr->supported_displays = | ||
1628 | OMAP_DISPLAY_TYPE_DBI | OMAP_DISPLAY_TYPE_DSI; | ||
1629 | |||
1630 | mgr->set_device = &omap_dss_set_device; | ||
1631 | mgr->unset_device = &omap_dss_unset_device; | ||
1632 | mgr->apply = &omap_dss_mgr_apply_l4; | ||
1633 | mgr->set_manager_info = &omap_dss_mgr_set_info; | ||
1634 | mgr->get_manager_info = &omap_dss_mgr_get_info; | ||
1635 | |||
1636 | dss_overlay_setup_l4_manager(mgr); | ||
1637 | |||
1638 | omap_dss_add_overlay_manager(mgr); | ||
1639 | |||
1640 | r = kobject_init_and_add(&mgr->kobj, &manager_ktype, | ||
1641 | &pdev->dev.kobj, "managerl4"); | ||
1642 | |||
1643 | if (r) | ||
1644 | DSSERR("failed to create sysfs file\n"); | ||
1645 | } | ||
1646 | #endif | ||
1647 | |||
1648 | return 0; | 1603 | return 0; |
1649 | } | 1604 | } |
1650 | 1605 | ||
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c index ab444036146b..0b21af95b48c 100644 --- a/drivers/video/omap2/dss/overlay.c +++ b/drivers/video/omap2/dss/overlay.c | |||
@@ -613,21 +613,19 @@ void dss_init_overlays(struct platform_device *pdev) | |||
613 | case 0: | 613 | case 0: |
614 | ovl->name = "gfx"; | 614 | ovl->name = "gfx"; |
615 | ovl->id = OMAP_DSS_GFX; | 615 | ovl->id = OMAP_DSS_GFX; |
616 | ovl->caps = OMAP_DSS_OVL_CAP_DISPC; | 616 | ovl->caps = 0; |
617 | ovl->info.global_alpha = 255; | 617 | ovl->info.global_alpha = 255; |
618 | break; | 618 | break; |
619 | case 1: | 619 | case 1: |
620 | ovl->name = "vid1"; | 620 | ovl->name = "vid1"; |
621 | ovl->id = OMAP_DSS_VIDEO1; | 621 | ovl->id = OMAP_DSS_VIDEO1; |
622 | ovl->caps = OMAP_DSS_OVL_CAP_SCALE | | 622 | ovl->caps = OMAP_DSS_OVL_CAP_SCALE; |
623 | OMAP_DSS_OVL_CAP_DISPC; | ||
624 | ovl->info.global_alpha = 255; | 623 | ovl->info.global_alpha = 255; |
625 | break; | 624 | break; |
626 | case 2: | 625 | case 2: |
627 | ovl->name = "vid2"; | 626 | ovl->name = "vid2"; |
628 | ovl->id = OMAP_DSS_VIDEO2; | 627 | ovl->id = OMAP_DSS_VIDEO2; |
629 | ovl->caps = OMAP_DSS_OVL_CAP_SCALE | | 628 | ovl->caps = OMAP_DSS_OVL_CAP_SCALE; |
630 | OMAP_DSS_OVL_CAP_DISPC; | ||
631 | ovl->info.global_alpha = 255; | 629 | ovl->info.global_alpha = 255; |
632 | break; | 630 | break; |
633 | } | 631 | } |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 50394badec15..b605066c176b 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -783,10 +783,8 @@ int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, | |||
783 | if (*w == 0 || *h == 0) | 783 | if (*w == 0 || *h == 0) |
784 | return -EINVAL; | 784 | return -EINVAL; |
785 | 785 | ||
786 | if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) { | 786 | dss_setup_partial_planes(dssdev, x, y, w, h, true); |
787 | dss_setup_partial_planes(dssdev, x, y, w, h, true); | 787 | dispc_set_lcd_size(dssdev->manager->id, *w, *h); |
788 | dispc_set_lcd_size(dssdev->manager->id, *w, *h); | ||
789 | } | ||
790 | 788 | ||
791 | return 0; | 789 | return 0; |
792 | } | 790 | } |
@@ -796,22 +794,7 @@ int omap_rfbi_update(struct omap_dss_device *dssdev, | |||
796 | u16 x, u16 y, u16 w, u16 h, | 794 | u16 x, u16 y, u16 w, u16 h, |
797 | void (*callback)(void *), void *data) | 795 | void (*callback)(void *), void *data) |
798 | { | 796 | { |
799 | if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) { | 797 | rfbi_transfer_area(dssdev, w, h, callback, data); |
800 | rfbi_transfer_area(dssdev, w, h, callback, data); | ||
801 | } else { | ||
802 | struct omap_overlay *ovl; | ||
803 | void __iomem *addr; | ||
804 | int scr_width; | ||
805 | |||
806 | ovl = dssdev->manager->overlays[0]; | ||
807 | scr_width = ovl->info.screen_width; | ||
808 | addr = ovl->info.vaddr; | ||
809 | |||
810 | omap_rfbi_write_pixels(addr, scr_width, x, y, w, h); | ||
811 | |||
812 | callback(data); | ||
813 | } | ||
814 | |||
815 | return 0; | 798 | return 0; |
816 | } | 799 | } |
817 | EXPORT_SYMBOL(omap_rfbi_update); | 800 | EXPORT_SYMBOL(omap_rfbi_update); |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index ecde53f71bd2..cb1ff1a6b5ee 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -162,11 +162,10 @@ enum omap_dss_rotation_angle { | |||
162 | 162 | ||
163 | enum omap_overlay_caps { | 163 | enum omap_overlay_caps { |
164 | OMAP_DSS_OVL_CAP_SCALE = 1 << 0, | 164 | OMAP_DSS_OVL_CAP_SCALE = 1 << 0, |
165 | OMAP_DSS_OVL_CAP_DISPC = 1 << 1, | ||
166 | }; | 165 | }; |
167 | 166 | ||
168 | enum omap_overlay_manager_caps { | 167 | enum omap_overlay_manager_caps { |
169 | OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, | 168 | OMAP_DSS_DUMMY_VALUE, /* add a dummy value to prevent compiler error */ |
170 | }; | 169 | }; |
171 | 170 | ||
172 | enum omap_dss_clk_source { | 171 | enum omap_dss_clk_source { |
@@ -325,7 +324,7 @@ struct omap_overlay { | |||
325 | 324 | ||
326 | /* static fields */ | 325 | /* static fields */ |
327 | const char *name; | 326 | const char *name; |
328 | int id; | 327 | enum omap_plane id; |
329 | enum omap_color_mode supported_modes; | 328 | enum omap_color_mode supported_modes; |
330 | enum omap_overlay_caps caps; | 329 | enum omap_overlay_caps caps; |
331 | 330 | ||
@@ -368,7 +367,7 @@ struct omap_overlay_manager { | |||
368 | 367 | ||
369 | /* static fields */ | 368 | /* static fields */ |
370 | const char *name; | 369 | const char *name; |
371 | int id; | 370 | enum omap_channel id; |
372 | enum omap_overlay_manager_caps caps; | 371 | enum omap_overlay_manager_caps caps; |
373 | int num_overlays; | 372 | int num_overlays; |
374 | struct omap_overlay **overlays; | 373 | struct omap_overlay **overlays; |