diff options
author | Archit Taneja <archit@ti.com> | 2012-06-05 09:07:27 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-26 07:58:38 -0400 |
commit | 3c2995ac34eb559106504be962b162aef215895b (patch) | |
tree | 87b1d203cef69785448a7b07611314c2a203ae23 | |
parent | 0f0e4e3cd8030c3056e8f43196a112e887a545f9 (diff) |
OMAPDSS: Remove old way of setting manager and device links
Now that an omap_dss_output can be used to link between managers and devices, we
can remove the old way of setting manager and device links. This involves
removing the device and manager pointers from omap_overlay_manager and
omap_dss_device respectively, and removing the set_device/unset_device ops from
omap_overlay_manager.
Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/apply.c | 64 | ||||
-rw-r--r-- | drivers/video/omap2/dss/manager.c | 2 | ||||
-rw-r--r-- | include/video/omapdss.h | 5 |
3 files changed, 0 insertions, 71 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 4bd1c998e12d..2b1fa851a8b9 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c | |||
@@ -1110,70 +1110,6 @@ void dss_mgr_get_info(struct omap_overlay_manager *mgr, | |||
1110 | spin_unlock_irqrestore(&data_lock, flags); | 1110 | spin_unlock_irqrestore(&data_lock, flags); |
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | int dss_mgr_set_device(struct omap_overlay_manager *mgr, | ||
1114 | struct omap_dss_device *dssdev) | ||
1115 | { | ||
1116 | int r; | ||
1117 | |||
1118 | mutex_lock(&apply_lock); | ||
1119 | |||
1120 | if (dssdev->manager) { | ||
1121 | DSSERR("display '%s' already has a manager '%s'\n", | ||
1122 | dssdev->name, dssdev->manager->name); | ||
1123 | r = -EINVAL; | ||
1124 | goto err; | ||
1125 | } | ||
1126 | |||
1127 | if ((mgr->supported_displays & dssdev->type) == 0) { | ||
1128 | DSSERR("display '%s' does not support manager '%s'\n", | ||
1129 | dssdev->name, mgr->name); | ||
1130 | r = -EINVAL; | ||
1131 | goto err; | ||
1132 | } | ||
1133 | |||
1134 | dssdev->manager = mgr; | ||
1135 | mgr->device = dssdev; | ||
1136 | |||
1137 | mutex_unlock(&apply_lock); | ||
1138 | |||
1139 | return 0; | ||
1140 | err: | ||
1141 | mutex_unlock(&apply_lock); | ||
1142 | return r; | ||
1143 | } | ||
1144 | |||
1145 | int dss_mgr_unset_device(struct omap_overlay_manager *mgr) | ||
1146 | { | ||
1147 | int r; | ||
1148 | |||
1149 | mutex_lock(&apply_lock); | ||
1150 | |||
1151 | if (!mgr->device) { | ||
1152 | DSSERR("failed to unset display, display not set.\n"); | ||
1153 | r = -EINVAL; | ||
1154 | goto err; | ||
1155 | } | ||
1156 | |||
1157 | /* | ||
1158 | * Don't allow currently enabled displays to have the overlay manager | ||
1159 | * pulled out from underneath them | ||
1160 | */ | ||
1161 | if (mgr->device->state != OMAP_DSS_DISPLAY_DISABLED) { | ||
1162 | r = -EINVAL; | ||
1163 | goto err; | ||
1164 | } | ||
1165 | |||
1166 | mgr->device->manager = NULL; | ||
1167 | mgr->device = NULL; | ||
1168 | |||
1169 | mutex_unlock(&apply_lock); | ||
1170 | |||
1171 | return 0; | ||
1172 | err: | ||
1173 | mutex_unlock(&apply_lock); | ||
1174 | return r; | ||
1175 | } | ||
1176 | |||
1177 | int dss_mgr_set_output(struct omap_overlay_manager *mgr, | 1113 | int dss_mgr_set_output(struct omap_overlay_manager *mgr, |
1178 | struct omap_dss_output *output) | 1114 | struct omap_dss_output *output) |
1179 | { | 1115 | { |
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index f662eb5c2aeb..c54d2f620ce3 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c | |||
@@ -99,8 +99,6 @@ int dss_init_overlay_managers(struct platform_device *pdev) | |||
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | 101 | ||
102 | mgr->set_device = &dss_mgr_set_device; | ||
103 | mgr->unset_device = &dss_mgr_unset_device; | ||
104 | mgr->set_output = &dss_mgr_set_output; | 102 | mgr->set_output = &dss_mgr_set_output; |
105 | mgr->unset_output = &dss_mgr_unset_output; | 103 | mgr->unset_output = &dss_mgr_unset_output; |
106 | mgr->apply = &omap_dss_mgr_apply; | 104 | mgr->apply = &omap_dss_mgr_apply; |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index fd8f8be449d7..e65e2e9e16eb 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -464,7 +464,6 @@ struct omap_overlay_manager { | |||
464 | enum omap_dss_output_id supported_outputs; | 464 | enum omap_dss_output_id supported_outputs; |
465 | 465 | ||
466 | /* dynamic fields */ | 466 | /* dynamic fields */ |
467 | struct omap_dss_device *device; | ||
468 | struct omap_dss_output *output; | 467 | struct omap_dss_output *output; |
469 | 468 | ||
470 | /* | 469 | /* |
@@ -478,9 +477,6 @@ struct omap_overlay_manager { | |||
478 | * interrupt context | 477 | * interrupt context |
479 | */ | 478 | */ |
480 | 479 | ||
481 | int (*set_device)(struct omap_overlay_manager *mgr, | ||
482 | struct omap_dss_device *dssdev); | ||
483 | int (*unset_device)(struct omap_overlay_manager *mgr); | ||
484 | int (*set_output)(struct omap_overlay_manager *mgr, | 480 | int (*set_output)(struct omap_overlay_manager *mgr, |
485 | struct omap_dss_output *output); | 481 | struct omap_dss_output *output); |
486 | int (*unset_output)(struct omap_overlay_manager *mgr); | 482 | int (*unset_output)(struct omap_overlay_manager *mgr); |
@@ -628,7 +624,6 @@ struct omap_dss_device { | |||
628 | 624 | ||
629 | enum omap_display_caps caps; | 625 | enum omap_display_caps caps; |
630 | 626 | ||
631 | struct omap_overlay_manager *manager; | ||
632 | struct omap_dss_output *output; | 627 | struct omap_dss_output *output; |
633 | 628 | ||
634 | enum omap_dss_display_state state; | 629 | enum omap_dss_display_state state; |