diff options
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/apply.c | 37 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 12 | ||||
-rw-r--r-- | drivers/video/omap2/dss/overlay.c | 17 |
3 files changed, 29 insertions, 37 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 98cebe30318a..038876a68d1a 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c | |||
@@ -416,6 +416,13 @@ static void wait_pending_extra_info_updates(void) | |||
416 | DSSWARN("timeout in wait_pending_extra_info_updates\n"); | 416 | DSSWARN("timeout in wait_pending_extra_info_updates\n"); |
417 | } | 417 | } |
418 | 418 | ||
419 | static inline struct omap_dss_device *dss_ovl_get_device(struct omap_overlay *ovl) | ||
420 | { | ||
421 | return ovl->manager ? | ||
422 | (ovl->manager->output ? ovl->manager->output->device : NULL) : | ||
423 | NULL; | ||
424 | } | ||
425 | |||
419 | static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr) | 426 | static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr) |
420 | { | 427 | { |
421 | return mgr->output ? mgr->output->device : NULL; | 428 | return mgr->output ? mgr->output->device : NULL; |
@@ -516,7 +523,7 @@ static int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr) | |||
516 | return r; | 523 | return r; |
517 | } | 524 | } |
518 | 525 | ||
519 | int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl) | 526 | static int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl) |
520 | { | 527 | { |
521 | unsigned long timeout = msecs_to_jiffies(500); | 528 | unsigned long timeout = msecs_to_jiffies(500); |
522 | struct ovl_priv_data *op; | 529 | struct ovl_priv_data *op; |
@@ -1248,7 +1255,7 @@ out: | |||
1248 | spin_unlock_irqrestore(&data_lock, flags); | 1255 | spin_unlock_irqrestore(&data_lock, flags); |
1249 | } | 1256 | } |
1250 | 1257 | ||
1251 | int dss_ovl_set_info(struct omap_overlay *ovl, | 1258 | static int dss_ovl_set_info(struct omap_overlay *ovl, |
1252 | struct omap_overlay_info *info) | 1259 | struct omap_overlay_info *info) |
1253 | { | 1260 | { |
1254 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 1261 | struct ovl_priv_data *op = get_ovl_priv(ovl); |
@@ -1269,7 +1276,7 @@ int dss_ovl_set_info(struct omap_overlay *ovl, | |||
1269 | return 0; | 1276 | return 0; |
1270 | } | 1277 | } |
1271 | 1278 | ||
1272 | void dss_ovl_get_info(struct omap_overlay *ovl, | 1279 | static void dss_ovl_get_info(struct omap_overlay *ovl, |
1273 | struct omap_overlay_info *info) | 1280 | struct omap_overlay_info *info) |
1274 | { | 1281 | { |
1275 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 1282 | struct ovl_priv_data *op = get_ovl_priv(ovl); |
@@ -1282,7 +1289,7 @@ void dss_ovl_get_info(struct omap_overlay *ovl, | |||
1282 | spin_unlock_irqrestore(&data_lock, flags); | 1289 | spin_unlock_irqrestore(&data_lock, flags); |
1283 | } | 1290 | } |
1284 | 1291 | ||
1285 | int dss_ovl_set_manager(struct omap_overlay *ovl, | 1292 | static int dss_ovl_set_manager(struct omap_overlay *ovl, |
1286 | struct omap_overlay_manager *mgr) | 1293 | struct omap_overlay_manager *mgr) |
1287 | { | 1294 | { |
1288 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 1295 | struct ovl_priv_data *op = get_ovl_priv(ovl); |
@@ -1334,7 +1341,7 @@ err: | |||
1334 | return r; | 1341 | return r; |
1335 | } | 1342 | } |
1336 | 1343 | ||
1337 | int dss_ovl_unset_manager(struct omap_overlay *ovl) | 1344 | static int dss_ovl_unset_manager(struct omap_overlay *ovl) |
1338 | { | 1345 | { |
1339 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 1346 | struct ovl_priv_data *op = get_ovl_priv(ovl); |
1340 | unsigned long flags; | 1347 | unsigned long flags; |
@@ -1394,7 +1401,7 @@ err: | |||
1394 | return r; | 1401 | return r; |
1395 | } | 1402 | } |
1396 | 1403 | ||
1397 | bool dss_ovl_is_enabled(struct omap_overlay *ovl) | 1404 | static bool dss_ovl_is_enabled(struct omap_overlay *ovl) |
1398 | { | 1405 | { |
1399 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 1406 | struct ovl_priv_data *op = get_ovl_priv(ovl); |
1400 | unsigned long flags; | 1407 | unsigned long flags; |
@@ -1409,7 +1416,7 @@ bool dss_ovl_is_enabled(struct omap_overlay *ovl) | |||
1409 | return e; | 1416 | return e; |
1410 | } | 1417 | } |
1411 | 1418 | ||
1412 | int dss_ovl_enable(struct omap_overlay *ovl) | 1419 | static int dss_ovl_enable(struct omap_overlay *ovl) |
1413 | { | 1420 | { |
1414 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 1421 | struct ovl_priv_data *op = get_ovl_priv(ovl); |
1415 | unsigned long flags; | 1422 | unsigned long flags; |
@@ -1459,7 +1466,7 @@ err1: | |||
1459 | return r; | 1466 | return r; |
1460 | } | 1467 | } |
1461 | 1468 | ||
1462 | int dss_ovl_disable(struct omap_overlay *ovl) | 1469 | static int dss_ovl_disable(struct omap_overlay *ovl) |
1463 | { | 1470 | { |
1464 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 1471 | struct ovl_priv_data *op = get_ovl_priv(ovl); |
1465 | unsigned long flags; | 1472 | unsigned long flags; |
@@ -1527,6 +1534,20 @@ int omapdss_compat_init(void) | |||
1527 | mgr->get_device = &dss_mgr_get_device; | 1534 | mgr->get_device = &dss_mgr_get_device; |
1528 | } | 1535 | } |
1529 | 1536 | ||
1537 | for (i = 0; i < omap_dss_get_num_overlays(); i++) { | ||
1538 | struct omap_overlay *ovl = omap_dss_get_overlay(i); | ||
1539 | |||
1540 | ovl->is_enabled = &dss_ovl_is_enabled; | ||
1541 | ovl->enable = &dss_ovl_enable; | ||
1542 | ovl->disable = &dss_ovl_disable; | ||
1543 | ovl->set_manager = &dss_ovl_set_manager; | ||
1544 | ovl->unset_manager = &dss_ovl_unset_manager; | ||
1545 | ovl->set_overlay_info = &dss_ovl_set_info; | ||
1546 | ovl->get_overlay_info = &dss_ovl_get_info; | ||
1547 | ovl->wait_for_go = &dss_mgr_wait_for_go_ovl; | ||
1548 | ovl->get_device = &dss_ovl_get_device; | ||
1549 | } | ||
1550 | |||
1530 | out: | 1551 | out: |
1531 | mutex_unlock(&compat_init_lock); | 1552 | mutex_unlock(&compat_init_lock); |
1532 | 1553 | ||
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 9e093bc81b5f..9ce798645b2d 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -178,7 +178,6 @@ void dss_copy_device_pdata(struct omap_dss_device *dst, | |||
178 | const struct omap_dss_device *src); | 178 | const struct omap_dss_device *src); |
179 | 179 | ||
180 | /* apply */ | 180 | /* apply */ |
181 | int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl); | ||
182 | void dss_mgr_start_update(struct omap_overlay_manager *mgr); | 181 | void dss_mgr_start_update(struct omap_overlay_manager *mgr); |
183 | int dss_mgr_enable(struct omap_overlay_manager *mgr); | 182 | int dss_mgr_enable(struct omap_overlay_manager *mgr); |
184 | void dss_mgr_disable(struct omap_overlay_manager *mgr); | 183 | void dss_mgr_disable(struct omap_overlay_manager *mgr); |
@@ -187,17 +186,6 @@ void dss_mgr_set_timings(struct omap_overlay_manager *mgr, | |||
187 | void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, | 186 | void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, |
188 | const struct dss_lcd_mgr_config *config); | 187 | const struct dss_lcd_mgr_config *config); |
189 | 188 | ||
190 | bool dss_ovl_is_enabled(struct omap_overlay *ovl); | ||
191 | int dss_ovl_enable(struct omap_overlay *ovl); | ||
192 | int dss_ovl_disable(struct omap_overlay *ovl); | ||
193 | int dss_ovl_set_info(struct omap_overlay *ovl, | ||
194 | struct omap_overlay_info *info); | ||
195 | void dss_ovl_get_info(struct omap_overlay *ovl, | ||
196 | struct omap_overlay_info *info); | ||
197 | int dss_ovl_set_manager(struct omap_overlay *ovl, | ||
198 | struct omap_overlay_manager *mgr); | ||
199 | int dss_ovl_unset_manager(struct omap_overlay *ovl); | ||
200 | |||
201 | /* output */ | 189 | /* output */ |
202 | void dss_register_output(struct omap_dss_output *out); | 190 | void dss_register_output(struct omap_dss_output *out); |
203 | void dss_unregister_output(struct omap_dss_output *out); | 191 | void dss_unregister_output(struct omap_dss_output *out); |
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c index 45f4994bc6b0..eccde322c28a 100644 --- a/drivers/video/omap2/dss/overlay.c +++ b/drivers/video/omap2/dss/overlay.c | |||
@@ -38,13 +38,6 @@ | |||
38 | static int num_overlays; | 38 | static int num_overlays; |
39 | static struct omap_overlay *overlays; | 39 | static struct omap_overlay *overlays; |
40 | 40 | ||
41 | static inline struct omap_dss_device *dss_ovl_get_device(struct omap_overlay *ovl) | ||
42 | { | ||
43 | return ovl->manager ? | ||
44 | (ovl->manager->output ? ovl->manager->output->device : NULL) : | ||
45 | NULL; | ||
46 | } | ||
47 | |||
48 | int omap_dss_get_num_overlays(void) | 41 | int omap_dss_get_num_overlays(void) |
49 | { | 42 | { |
50 | return num_overlays; | 43 | return num_overlays; |
@@ -93,16 +86,6 @@ void dss_init_overlays(struct platform_device *pdev) | |||
93 | break; | 86 | break; |
94 | } | 87 | } |
95 | 88 | ||
96 | ovl->is_enabled = &dss_ovl_is_enabled; | ||
97 | ovl->enable = &dss_ovl_enable; | ||
98 | ovl->disable = &dss_ovl_disable; | ||
99 | ovl->set_manager = &dss_ovl_set_manager; | ||
100 | ovl->unset_manager = &dss_ovl_unset_manager; | ||
101 | ovl->set_overlay_info = &dss_ovl_set_info; | ||
102 | ovl->get_overlay_info = &dss_ovl_get_info; | ||
103 | ovl->wait_for_go = &dss_mgr_wait_for_go_ovl; | ||
104 | ovl->get_device = &dss_ovl_get_device; | ||
105 | |||
106 | ovl->caps = dss_feat_get_overlay_caps(ovl->id); | 89 | ovl->caps = dss_feat_get_overlay_caps(ovl->id); |
107 | ovl->supported_modes = | 90 | ovl->supported_modes = |
108 | dss_feat_get_supported_color_modes(ovl->id); | 91 | dss_feat_get_supported_color_modes(ovl->id); |