diff options
author | Archit Taneja <archit@ti.com> | 2010-09-15 09:50:00 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-10-22 16:21:04 -0400 |
commit | a0acb5574b01f1a82dc5d863b4d89d84397aeafa (patch) | |
tree | 8ca0294379846cd2ea6437126b98a2530a78c33f /drivers/video/omap2/dss/manager.c | |
parent | e1ef4d236f11ef0cb674deead822d029f1bb2745 (diff) |
OMAP: DSS2: Use dss_features framework on DSS2 code
Calls init functions of dss_features during dss_probe, and the following
features are made omapxxxx independent:
- number of managers, overlays
- supported color modes for each overlay
- supported displays for each manager
- global aplha, and restriction of global alpha for video1 pipeline
- The register field ranges : FIRHINC, FIRVINC, FIFOHIGHTHRESHOLD
FIFOLOWTHRESHOLD and FIFOSIZE
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/dss/manager.c')
-rw-r--r-- | drivers/video/omap2/dss/manager.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 6a649ab5539e..545e9b9a4d92 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <plat/cpu.h> | 33 | #include <plat/cpu.h> |
34 | 34 | ||
35 | #include "dss.h" | 35 | #include "dss.h" |
36 | #include "dss_features.h" | ||
36 | 37 | ||
37 | static int num_managers; | 38 | static int num_managers; |
38 | static struct list_head manager_list; | 39 | static struct list_head manager_list; |
@@ -448,8 +449,8 @@ struct manager_cache_data { | |||
448 | 449 | ||
449 | static struct { | 450 | static struct { |
450 | spinlock_t lock; | 451 | spinlock_t lock; |
451 | struct overlay_cache_data overlay_cache[3]; | 452 | struct overlay_cache_data overlay_cache[MAX_DSS_OVERLAYS]; |
452 | struct manager_cache_data manager_cache[2]; | 453 | struct manager_cache_data manager_cache[MAX_DSS_MANAGERS]; |
453 | 454 | ||
454 | bool irq_enabled; | 455 | bool irq_enabled; |
455 | } dss_cache; | 456 | } dss_cache; |
@@ -882,12 +883,12 @@ static int configure_dispc(void) | |||
882 | { | 883 | { |
883 | struct overlay_cache_data *oc; | 884 | struct overlay_cache_data *oc; |
884 | struct manager_cache_data *mc; | 885 | struct manager_cache_data *mc; |
885 | const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); | 886 | const int num_ovls = dss_feat_get_num_ovls(); |
886 | const int num_mgrs = ARRAY_SIZE(dss_cache.manager_cache); | 887 | const int num_mgrs = dss_feat_get_num_mgrs(); |
887 | int i; | 888 | int i; |
888 | int r; | 889 | int r; |
889 | bool mgr_busy[2]; | 890 | bool mgr_busy[MAX_DSS_MANAGERS]; |
890 | bool mgr_go[2]; | 891 | bool mgr_go[MAX_DSS_MANAGERS]; |
891 | bool busy; | 892 | bool busy; |
892 | 893 | ||
893 | r = 0; | 894 | r = 0; |
@@ -989,7 +990,7 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev, | |||
989 | { | 990 | { |
990 | struct overlay_cache_data *oc; | 991 | struct overlay_cache_data *oc; |
991 | struct manager_cache_data *mc; | 992 | struct manager_cache_data *mc; |
992 | const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); | 993 | const int num_ovls = dss_feat_get_num_ovls(); |
993 | struct omap_overlay_manager *mgr; | 994 | struct omap_overlay_manager *mgr; |
994 | int i; | 995 | int i; |
995 | u16 x, y, w, h; | 996 | u16 x, y, w, h; |
@@ -1121,8 +1122,8 @@ void dss_start_update(struct omap_dss_device *dssdev) | |||
1121 | { | 1122 | { |
1122 | struct manager_cache_data *mc; | 1123 | struct manager_cache_data *mc; |
1123 | struct overlay_cache_data *oc; | 1124 | struct overlay_cache_data *oc; |
1124 | const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); | 1125 | const int num_ovls = dss_feat_get_num_ovls(); |
1125 | const int num_mgrs = ARRAY_SIZE(dss_cache.manager_cache); | 1126 | const int num_mgrs = dss_feat_get_num_mgrs(); |
1126 | struct omap_overlay_manager *mgr; | 1127 | struct omap_overlay_manager *mgr; |
1127 | int i; | 1128 | int i; |
1128 | 1129 | ||
@@ -1151,10 +1152,10 @@ static void dss_apply_irq_handler(void *data, u32 mask) | |||
1151 | { | 1152 | { |
1152 | struct manager_cache_data *mc; | 1153 | struct manager_cache_data *mc; |
1153 | struct overlay_cache_data *oc; | 1154 | struct overlay_cache_data *oc; |
1154 | const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); | 1155 | const int num_ovls = dss_feat_get_num_ovls(); |
1155 | const int num_mgrs = ARRAY_SIZE(dss_cache.manager_cache); | 1156 | const int num_mgrs = dss_feat_get_num_mgrs(); |
1156 | int i, r; | 1157 | int i, r; |
1157 | bool mgr_busy[2]; | 1158 | bool mgr_busy[MAX_DSS_MANAGERS]; |
1158 | 1159 | ||
1159 | mgr_busy[0] = dispc_go_busy(0); | 1160 | mgr_busy[0] = dispc_go_busy(0); |
1160 | mgr_busy[1] = dispc_go_busy(1); | 1161 | mgr_busy[1] = dispc_go_busy(1); |
@@ -1461,7 +1462,7 @@ int dss_init_overlay_managers(struct platform_device *pdev) | |||
1461 | 1462 | ||
1462 | num_managers = 0; | 1463 | num_managers = 0; |
1463 | 1464 | ||
1464 | for (i = 0; i < 2; ++i) { | 1465 | for (i = 0; i < dss_feat_get_num_mgrs(); ++i) { |
1465 | struct omap_overlay_manager *mgr; | 1466 | struct omap_overlay_manager *mgr; |
1466 | mgr = kzalloc(sizeof(*mgr), GFP_KERNEL); | 1467 | mgr = kzalloc(sizeof(*mgr), GFP_KERNEL); |
1467 | 1468 | ||
@@ -1471,14 +1472,10 @@ int dss_init_overlay_managers(struct platform_device *pdev) | |||
1471 | case 0: | 1472 | case 0: |
1472 | mgr->name = "lcd"; | 1473 | mgr->name = "lcd"; |
1473 | mgr->id = OMAP_DSS_CHANNEL_LCD; | 1474 | mgr->id = OMAP_DSS_CHANNEL_LCD; |
1474 | mgr->supported_displays = | ||
1475 | OMAP_DISPLAY_TYPE_DPI | OMAP_DISPLAY_TYPE_DBI | | ||
1476 | OMAP_DISPLAY_TYPE_SDI | OMAP_DISPLAY_TYPE_DSI; | ||
1477 | break; | 1475 | break; |
1478 | case 1: | 1476 | case 1: |
1479 | mgr->name = "tv"; | 1477 | mgr->name = "tv"; |
1480 | mgr->id = OMAP_DSS_CHANNEL_DIGIT; | 1478 | mgr->id = OMAP_DSS_CHANNEL_DIGIT; |
1481 | mgr->supported_displays = OMAP_DISPLAY_TYPE_VENC; | ||
1482 | break; | 1479 | break; |
1483 | } | 1480 | } |
1484 | 1481 | ||
@@ -1494,6 +1491,8 @@ int dss_init_overlay_managers(struct platform_device *pdev) | |||
1494 | mgr->disable = &dss_mgr_disable; | 1491 | mgr->disable = &dss_mgr_disable; |
1495 | 1492 | ||
1496 | mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC; | 1493 | mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC; |
1494 | mgr->supported_displays = | ||
1495 | dss_feat_get_supported_displays(mgr->id); | ||
1497 | 1496 | ||
1498 | dss_overlay_setup_dispc_manager(mgr); | 1497 | dss_overlay_setup_dispc_manager(mgr); |
1499 | 1498 | ||