diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/displays/panel-acx565akm.c | 23 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-generic-dpi.c | 36 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-lgphilips-lb035q02.c | 34 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-n8x0.c | 50 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | 24 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-picodlp.c | 44 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c | 17 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 72 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-tfp410.c | 33 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-tpo-td043mtea1.c | 20 | ||||
-rw-r--r-- | drivers/video/omap2/dss/display.c | 15 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi_panel.c | 70 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc_panel.c | 19 | ||||
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 8 |
14 files changed, 16 insertions, 449 deletions
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c index c835aa70f96f..65eb76c840a1 100644 --- a/drivers/video/omap2/displays/panel-acx565akm.c +++ b/drivers/video/omap2/displays/panel-acx565akm.c | |||
@@ -710,27 +710,6 @@ static void acx_panel_disable(struct omap_dss_device *dssdev) | |||
710 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 710 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
711 | } | 711 | } |
712 | 712 | ||
713 | static int acx_panel_suspend(struct omap_dss_device *dssdev) | ||
714 | { | ||
715 | dev_dbg(&dssdev->dev, "%s\n", __func__); | ||
716 | acx_panel_power_off(dssdev); | ||
717 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
718 | return 0; | ||
719 | } | ||
720 | |||
721 | static int acx_panel_resume(struct omap_dss_device *dssdev) | ||
722 | { | ||
723 | int r; | ||
724 | |||
725 | dev_dbg(&dssdev->dev, "%s\n", __func__); | ||
726 | r = acx_panel_power_on(dssdev); | ||
727 | if (r) | ||
728 | return r; | ||
729 | |||
730 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
731 | return 0; | ||
732 | } | ||
733 | |||
734 | static void acx_panel_set_timings(struct omap_dss_device *dssdev, | 713 | static void acx_panel_set_timings(struct omap_dss_device *dssdev, |
735 | struct omap_video_timings *timings) | 714 | struct omap_video_timings *timings) |
736 | { | 715 | { |
@@ -752,8 +731,6 @@ static struct omap_dss_driver acx_panel_driver = { | |||
752 | 731 | ||
753 | .enable = acx_panel_enable, | 732 | .enable = acx_panel_enable, |
754 | .disable = acx_panel_disable, | 733 | .disable = acx_panel_disable, |
755 | .suspend = acx_panel_suspend, | ||
756 | .resume = acx_panel_resume, | ||
757 | 734 | ||
758 | .set_timings = acx_panel_set_timings, | 735 | .set_timings = acx_panel_set_timings, |
759 | .check_timings = acx_panel_check_timings, | 736 | .check_timings = acx_panel_check_timings, |
diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c index 88295c526815..54ca8ae21078 100644 --- a/drivers/video/omap2/displays/panel-generic-dpi.c +++ b/drivers/video/omap2/displays/panel-generic-dpi.c | |||
@@ -688,40 +688,6 @@ static void generic_dpi_panel_disable(struct omap_dss_device *dssdev) | |||
688 | mutex_unlock(&drv_data->lock); | 688 | mutex_unlock(&drv_data->lock); |
689 | } | 689 | } |
690 | 690 | ||
691 | static int generic_dpi_panel_suspend(struct omap_dss_device *dssdev) | ||
692 | { | ||
693 | struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); | ||
694 | |||
695 | mutex_lock(&drv_data->lock); | ||
696 | |||
697 | generic_dpi_panel_power_off(dssdev); | ||
698 | |||
699 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
700 | |||
701 | mutex_unlock(&drv_data->lock); | ||
702 | |||
703 | return 0; | ||
704 | } | ||
705 | |||
706 | static int generic_dpi_panel_resume(struct omap_dss_device *dssdev) | ||
707 | { | ||
708 | struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); | ||
709 | int r; | ||
710 | |||
711 | mutex_lock(&drv_data->lock); | ||
712 | |||
713 | r = generic_dpi_panel_power_on(dssdev); | ||
714 | if (r) | ||
715 | goto err; | ||
716 | |||
717 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
718 | |||
719 | err: | ||
720 | mutex_unlock(&drv_data->lock); | ||
721 | |||
722 | return r; | ||
723 | } | ||
724 | |||
725 | static void generic_dpi_panel_set_timings(struct omap_dss_device *dssdev, | 691 | static void generic_dpi_panel_set_timings(struct omap_dss_device *dssdev, |
726 | struct omap_video_timings *timings) | 692 | struct omap_video_timings *timings) |
727 | { | 693 | { |
@@ -769,8 +735,6 @@ static struct omap_dss_driver dpi_driver = { | |||
769 | 735 | ||
770 | .enable = generic_dpi_panel_enable, | 736 | .enable = generic_dpi_panel_enable, |
771 | .disable = generic_dpi_panel_disable, | 737 | .disable = generic_dpi_panel_disable, |
772 | .suspend = generic_dpi_panel_suspend, | ||
773 | .resume = generic_dpi_panel_resume, | ||
774 | 738 | ||
775 | .set_timings = generic_dpi_panel_set_timings, | 739 | .set_timings = generic_dpi_panel_set_timings, |
776 | .get_timings = generic_dpi_panel_get_timings, | 740 | .get_timings = generic_dpi_panel_get_timings, |
diff --git a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c index 90c1cabf244e..ace419b801eb 100644 --- a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c +++ b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c | |||
@@ -143,46 +143,12 @@ static void lb035q02_panel_disable(struct omap_dss_device *dssdev) | |||
143 | mutex_unlock(&ld->lock); | 143 | mutex_unlock(&ld->lock); |
144 | } | 144 | } |
145 | 145 | ||
146 | static int lb035q02_panel_suspend(struct omap_dss_device *dssdev) | ||
147 | { | ||
148 | struct lb035q02_data *ld = dev_get_drvdata(&dssdev->dev); | ||
149 | |||
150 | mutex_lock(&ld->lock); | ||
151 | |||
152 | lb035q02_panel_power_off(dssdev); | ||
153 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
154 | |||
155 | mutex_unlock(&ld->lock); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static int lb035q02_panel_resume(struct omap_dss_device *dssdev) | ||
160 | { | ||
161 | struct lb035q02_data *ld = dev_get_drvdata(&dssdev->dev); | ||
162 | int r; | ||
163 | |||
164 | mutex_lock(&ld->lock); | ||
165 | |||
166 | r = lb035q02_panel_power_on(dssdev); | ||
167 | if (r) | ||
168 | goto err; | ||
169 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
170 | |||
171 | mutex_unlock(&ld->lock); | ||
172 | return 0; | ||
173 | err: | ||
174 | mutex_unlock(&ld->lock); | ||
175 | return r; | ||
176 | } | ||
177 | |||
178 | static struct omap_dss_driver lb035q02_driver = { | 146 | static struct omap_dss_driver lb035q02_driver = { |
179 | .probe = lb035q02_panel_probe, | 147 | .probe = lb035q02_panel_probe, |
180 | .remove = lb035q02_panel_remove, | 148 | .remove = lb035q02_panel_remove, |
181 | 149 | ||
182 | .enable = lb035q02_panel_enable, | 150 | .enable = lb035q02_panel_enable, |
183 | .disable = lb035q02_panel_disable, | 151 | .disable = lb035q02_panel_disable, |
184 | .suspend = lb035q02_panel_suspend, | ||
185 | .resume = lb035q02_panel_resume, | ||
186 | 152 | ||
187 | .driver = { | 153 | .driver = { |
188 | .name = "lgphilips_lb035q02_panel", | 154 | .name = "lgphilips_lb035q02_panel", |
diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index 3fc5ad081a21..265326955552 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c | |||
@@ -574,54 +574,6 @@ static void n8x0_panel_disable(struct omap_dss_device *dssdev) | |||
574 | mutex_unlock(&ddata->lock); | 574 | mutex_unlock(&ddata->lock); |
575 | } | 575 | } |
576 | 576 | ||
577 | static int n8x0_panel_suspend(struct omap_dss_device *dssdev) | ||
578 | { | ||
579 | struct panel_drv_data *ddata = get_drv_data(dssdev); | ||
580 | |||
581 | dev_dbg(&dssdev->dev, "suspend\n"); | ||
582 | |||
583 | mutex_lock(&ddata->lock); | ||
584 | |||
585 | rfbi_bus_lock(); | ||
586 | |||
587 | n8x0_panel_power_off(dssdev); | ||
588 | |||
589 | rfbi_bus_unlock(); | ||
590 | |||
591 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
592 | |||
593 | mutex_unlock(&ddata->lock); | ||
594 | |||
595 | return 0; | ||
596 | } | ||
597 | |||
598 | static int n8x0_panel_resume(struct omap_dss_device *dssdev) | ||
599 | { | ||
600 | struct panel_drv_data *ddata = get_drv_data(dssdev); | ||
601 | int r; | ||
602 | |||
603 | dev_dbg(&dssdev->dev, "resume\n"); | ||
604 | |||
605 | mutex_lock(&ddata->lock); | ||
606 | |||
607 | rfbi_bus_lock(); | ||
608 | |||
609 | r = n8x0_panel_power_on(dssdev); | ||
610 | |||
611 | rfbi_bus_unlock(); | ||
612 | |||
613 | if (r) { | ||
614 | mutex_unlock(&ddata->lock); | ||
615 | return r; | ||
616 | } | ||
617 | |||
618 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
619 | |||
620 | mutex_unlock(&ddata->lock); | ||
621 | |||
622 | return 0; | ||
623 | } | ||
624 | |||
625 | static void n8x0_panel_get_resolution(struct omap_dss_device *dssdev, | 577 | static void n8x0_panel_get_resolution(struct omap_dss_device *dssdev, |
626 | u16 *xres, u16 *yres) | 578 | u16 *xres, u16 *yres) |
627 | { | 579 | { |
@@ -683,8 +635,6 @@ static struct omap_dss_driver n8x0_panel_driver = { | |||
683 | 635 | ||
684 | .enable = n8x0_panel_enable, | 636 | .enable = n8x0_panel_enable, |
685 | .disable = n8x0_panel_disable, | 637 | .disable = n8x0_panel_disable, |
686 | .suspend = n8x0_panel_suspend, | ||
687 | .resume = n8x0_panel_resume, | ||
688 | 638 | ||
689 | .update = n8x0_panel_update, | 639 | .update = n8x0_panel_update, |
690 | .sync = n8x0_panel_sync, | 640 | .sync = n8x0_panel_sync, |
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c index 908fd268f3dc..2a79c283bebe 100644 --- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c +++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | |||
@@ -236,28 +236,6 @@ static void nec_8048_panel_disable(struct omap_dss_device *dssdev) | |||
236 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 236 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
237 | } | 237 | } |
238 | 238 | ||
239 | static int nec_8048_panel_suspend(struct omap_dss_device *dssdev) | ||
240 | { | ||
241 | nec_8048_panel_power_off(dssdev); | ||
242 | |||
243 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
244 | |||
245 | return 0; | ||
246 | } | ||
247 | |||
248 | static int nec_8048_panel_resume(struct omap_dss_device *dssdev) | ||
249 | { | ||
250 | int r; | ||
251 | |||
252 | r = nec_8048_panel_power_on(dssdev); | ||
253 | if (r) | ||
254 | return r; | ||
255 | |||
256 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
257 | |||
258 | return 0; | ||
259 | } | ||
260 | |||
261 | static int nec_8048_recommended_bpp(struct omap_dss_device *dssdev) | 239 | static int nec_8048_recommended_bpp(struct omap_dss_device *dssdev) |
262 | { | 240 | { |
263 | return 16; | 241 | return 16; |
@@ -268,8 +246,6 @@ static struct omap_dss_driver nec_8048_driver = { | |||
268 | .remove = nec_8048_panel_remove, | 246 | .remove = nec_8048_panel_remove, |
269 | .enable = nec_8048_panel_enable, | 247 | .enable = nec_8048_panel_enable, |
270 | .disable = nec_8048_panel_disable, | 248 | .disable = nec_8048_panel_disable, |
271 | .suspend = nec_8048_panel_suspend, | ||
272 | .resume = nec_8048_panel_resume, | ||
273 | .get_recommended_bpp = nec_8048_recommended_bpp, | 249 | .get_recommended_bpp = nec_8048_recommended_bpp, |
274 | 250 | ||
275 | .driver = { | 251 | .driver = { |
diff --git a/drivers/video/omap2/displays/panel-picodlp.c b/drivers/video/omap2/displays/panel-picodlp.c index 9df87640ddd2..e3a6c1996134 100644 --- a/drivers/video/omap2/displays/panel-picodlp.c +++ b/drivers/video/omap2/displays/panel-picodlp.c | |||
@@ -503,47 +503,6 @@ static void picodlp_panel_disable(struct omap_dss_device *dssdev) | |||
503 | dev_dbg(&dssdev->dev, "disabling picodlp panel\n"); | 503 | dev_dbg(&dssdev->dev, "disabling picodlp panel\n"); |
504 | } | 504 | } |
505 | 505 | ||
506 | static int picodlp_panel_suspend(struct omap_dss_device *dssdev) | ||
507 | { | ||
508 | struct picodlp_data *picod = dev_get_drvdata(&dssdev->dev); | ||
509 | |||
510 | mutex_lock(&picod->lock); | ||
511 | /* Turn off DLP Power */ | ||
512 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { | ||
513 | mutex_unlock(&picod->lock); | ||
514 | dev_err(&dssdev->dev, "unable to suspend picodlp panel," | ||
515 | " panel is not ACTIVE\n"); | ||
516 | return -EINVAL; | ||
517 | } | ||
518 | |||
519 | picodlp_panel_power_off(dssdev); | ||
520 | |||
521 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
522 | mutex_unlock(&picod->lock); | ||
523 | |||
524 | dev_dbg(&dssdev->dev, "suspending picodlp panel\n"); | ||
525 | return 0; | ||
526 | } | ||
527 | |||
528 | static int picodlp_panel_resume(struct omap_dss_device *dssdev) | ||
529 | { | ||
530 | struct picodlp_data *picod = dev_get_drvdata(&dssdev->dev); | ||
531 | int r; | ||
532 | |||
533 | mutex_lock(&picod->lock); | ||
534 | if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) { | ||
535 | mutex_unlock(&picod->lock); | ||
536 | dev_err(&dssdev->dev, "unable to resume picodlp panel," | ||
537 | " panel is not ACTIVE\n"); | ||
538 | return -EINVAL; | ||
539 | } | ||
540 | |||
541 | r = picodlp_panel_power_on(dssdev); | ||
542 | mutex_unlock(&picod->lock); | ||
543 | dev_dbg(&dssdev->dev, "resuming picodlp panel\n"); | ||
544 | return r; | ||
545 | } | ||
546 | |||
547 | static void picodlp_get_resolution(struct omap_dss_device *dssdev, | 506 | static void picodlp_get_resolution(struct omap_dss_device *dssdev, |
548 | u16 *xres, u16 *yres) | 507 | u16 *xres, u16 *yres) |
549 | { | 508 | { |
@@ -560,9 +519,6 @@ static struct omap_dss_driver picodlp_driver = { | |||
560 | 519 | ||
561 | .get_resolution = picodlp_get_resolution, | 520 | .get_resolution = picodlp_get_resolution, |
562 | 521 | ||
563 | .suspend = picodlp_panel_suspend, | ||
564 | .resume = picodlp_panel_resume, | ||
565 | |||
566 | .driver = { | 522 | .driver = { |
567 | .name = "picodlp_panel", | 523 | .name = "picodlp_panel", |
568 | .owner = THIS_MODULE, | 524 | .owner = THIS_MODULE, |
diff --git a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c index 1ec3b277ff15..cada8c621e01 100644 --- a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c | |||
@@ -194,29 +194,12 @@ static void sharp_ls_panel_disable(struct omap_dss_device *dssdev) | |||
194 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 194 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
195 | } | 195 | } |
196 | 196 | ||
197 | static int sharp_ls_panel_suspend(struct omap_dss_device *dssdev) | ||
198 | { | ||
199 | sharp_ls_power_off(dssdev); | ||
200 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | static int sharp_ls_panel_resume(struct omap_dss_device *dssdev) | ||
205 | { | ||
206 | int r; | ||
207 | r = sharp_ls_power_on(dssdev); | ||
208 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
209 | return r; | ||
210 | } | ||
211 | |||
212 | static struct omap_dss_driver sharp_ls_driver = { | 197 | static struct omap_dss_driver sharp_ls_driver = { |
213 | .probe = sharp_ls_panel_probe, | 198 | .probe = sharp_ls_panel_probe, |
214 | .remove = __exit_p(sharp_ls_panel_remove), | 199 | .remove = __exit_p(sharp_ls_panel_remove), |
215 | 200 | ||
216 | .enable = sharp_ls_panel_enable, | 201 | .enable = sharp_ls_panel_enable, |
217 | .disable = sharp_ls_panel_disable, | 202 | .disable = sharp_ls_panel_disable, |
218 | .suspend = sharp_ls_panel_suspend, | ||
219 | .resume = sharp_ls_panel_resume, | ||
220 | 203 | ||
221 | .driver = { | 204 | .driver = { |
222 | .name = "sharp_ls_panel", | 205 | .name = "sharp_ls_panel", |
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index f2f644680ca8..a32407a5735a 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -1245,76 +1245,6 @@ static void taal_disable(struct omap_dss_device *dssdev) | |||
1245 | mutex_unlock(&td->lock); | 1245 | mutex_unlock(&td->lock); |
1246 | } | 1246 | } |
1247 | 1247 | ||
1248 | static int taal_suspend(struct omap_dss_device *dssdev) | ||
1249 | { | ||
1250 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); | ||
1251 | int r; | ||
1252 | |||
1253 | dev_dbg(&dssdev->dev, "suspend\n"); | ||
1254 | |||
1255 | mutex_lock(&td->lock); | ||
1256 | |||
1257 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { | ||
1258 | r = -EINVAL; | ||
1259 | goto err; | ||
1260 | } | ||
1261 | |||
1262 | taal_cancel_ulps_work(dssdev); | ||
1263 | taal_cancel_esd_work(dssdev); | ||
1264 | |||
1265 | dsi_bus_lock(dssdev); | ||
1266 | |||
1267 | r = taal_wake_up(dssdev); | ||
1268 | if (!r) | ||
1269 | taal_power_off(dssdev); | ||
1270 | |||
1271 | dsi_bus_unlock(dssdev); | ||
1272 | |||
1273 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
1274 | |||
1275 | mutex_unlock(&td->lock); | ||
1276 | |||
1277 | return 0; | ||
1278 | err: | ||
1279 | mutex_unlock(&td->lock); | ||
1280 | return r; | ||
1281 | } | ||
1282 | |||
1283 | static int taal_resume(struct omap_dss_device *dssdev) | ||
1284 | { | ||
1285 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); | ||
1286 | int r; | ||
1287 | |||
1288 | dev_dbg(&dssdev->dev, "resume\n"); | ||
1289 | |||
1290 | mutex_lock(&td->lock); | ||
1291 | |||
1292 | if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) { | ||
1293 | r = -EINVAL; | ||
1294 | goto err; | ||
1295 | } | ||
1296 | |||
1297 | dsi_bus_lock(dssdev); | ||
1298 | |||
1299 | r = taal_power_on(dssdev); | ||
1300 | |||
1301 | dsi_bus_unlock(dssdev); | ||
1302 | |||
1303 | if (r) { | ||
1304 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | ||
1305 | } else { | ||
1306 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
1307 | taal_queue_esd_work(dssdev); | ||
1308 | } | ||
1309 | |||
1310 | mutex_unlock(&td->lock); | ||
1311 | |||
1312 | return r; | ||
1313 | err: | ||
1314 | mutex_unlock(&td->lock); | ||
1315 | return r; | ||
1316 | } | ||
1317 | |||
1318 | static void taal_framedone_cb(int err, void *data) | 1248 | static void taal_framedone_cb(int err, void *data) |
1319 | { | 1249 | { |
1320 | struct omap_dss_device *dssdev = data; | 1250 | struct omap_dss_device *dssdev = data; |
@@ -1818,8 +1748,6 @@ static struct omap_dss_driver taal_driver = { | |||
1818 | 1748 | ||
1819 | .enable = taal_enable, | 1749 | .enable = taal_enable, |
1820 | .disable = taal_disable, | 1750 | .disable = taal_disable, |
1821 | .suspend = taal_suspend, | ||
1822 | .resume = taal_resume, | ||
1823 | 1751 | ||
1824 | .update = taal_update, | 1752 | .update = taal_update, |
1825 | .sync = taal_sync, | 1753 | .sync = taal_sync, |
diff --git a/drivers/video/omap2/displays/panel-tfp410.c b/drivers/video/omap2/displays/panel-tfp410.c index 383811cf8648..8281baafe1ef 100644 --- a/drivers/video/omap2/displays/panel-tfp410.c +++ b/drivers/video/omap2/displays/panel-tfp410.c | |||
@@ -189,37 +189,6 @@ static void tfp410_disable(struct omap_dss_device *dssdev) | |||
189 | mutex_unlock(&ddata->lock); | 189 | mutex_unlock(&ddata->lock); |
190 | } | 190 | } |
191 | 191 | ||
192 | static int tfp410_suspend(struct omap_dss_device *dssdev) | ||
193 | { | ||
194 | struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); | ||
195 | |||
196 | mutex_lock(&ddata->lock); | ||
197 | |||
198 | tfp410_power_off(dssdev); | ||
199 | |||
200 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
201 | |||
202 | mutex_unlock(&ddata->lock); | ||
203 | |||
204 | return 0; | ||
205 | } | ||
206 | |||
207 | static int tfp410_resume(struct omap_dss_device *dssdev) | ||
208 | { | ||
209 | struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); | ||
210 | int r; | ||
211 | |||
212 | mutex_lock(&ddata->lock); | ||
213 | |||
214 | r = tfp410_power_on(dssdev); | ||
215 | if (r == 0) | ||
216 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
217 | |||
218 | mutex_unlock(&ddata->lock); | ||
219 | |||
220 | return r; | ||
221 | } | ||
222 | |||
223 | static void tfp410_set_timings(struct omap_dss_device *dssdev, | 192 | static void tfp410_set_timings(struct omap_dss_device *dssdev, |
224 | struct omap_video_timings *timings) | 193 | struct omap_video_timings *timings) |
225 | { | 194 | { |
@@ -355,8 +324,6 @@ static struct omap_dss_driver tfp410_driver = { | |||
355 | 324 | ||
356 | .enable = tfp410_enable, | 325 | .enable = tfp410_enable, |
357 | .disable = tfp410_disable, | 326 | .disable = tfp410_disable, |
358 | .suspend = tfp410_suspend, | ||
359 | .resume = tfp410_resume, | ||
360 | 327 | ||
361 | .set_timings = tfp410_set_timings, | 328 | .set_timings = tfp410_set_timings, |
362 | .get_timings = tfp410_get_timings, | 329 | .get_timings = tfp410_get_timings, |
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c index b5e6dbc59f0a..316b3da6d2cb 100644 --- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c | |||
@@ -401,24 +401,6 @@ static void tpo_td043_disable(struct omap_dss_device *dssdev) | |||
401 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 401 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
402 | } | 402 | } |
403 | 403 | ||
404 | static int tpo_td043_suspend(struct omap_dss_device *dssdev) | ||
405 | { | ||
406 | dev_dbg(&dssdev->dev, "suspend\n"); | ||
407 | |||
408 | tpo_td043_disable_dss(dssdev); | ||
409 | |||
410 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
411 | |||
412 | return 0; | ||
413 | } | ||
414 | |||
415 | static int tpo_td043_resume(struct omap_dss_device *dssdev) | ||
416 | { | ||
417 | dev_dbg(&dssdev->dev, "resume\n"); | ||
418 | |||
419 | return tpo_td043_enable_dss(dssdev); | ||
420 | } | ||
421 | |||
422 | static int tpo_td043_probe(struct omap_dss_device *dssdev) | 404 | static int tpo_td043_probe(struct omap_dss_device *dssdev) |
423 | { | 405 | { |
424 | struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev); | 406 | struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev); |
@@ -500,8 +482,6 @@ static struct omap_dss_driver tpo_td043_driver = { | |||
500 | 482 | ||
501 | .enable = tpo_td043_enable, | 483 | .enable = tpo_td043_enable, |
502 | .disable = tpo_td043_disable, | 484 | .disable = tpo_td043_disable, |
503 | .suspend = tpo_td043_suspend, | ||
504 | .resume = tpo_td043_resume, | ||
505 | .set_mirror = tpo_td043_set_hmirror, | 485 | .set_mirror = tpo_td043_set_hmirror, |
506 | .get_mirror = tpo_td043_get_hmirror, | 486 | .get_mirror = tpo_td043_get_hmirror, |
507 | 487 | ||
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index ccf8550fafde..1e587306215f 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c | |||
@@ -449,7 +449,6 @@ void dss_uninit_device(struct platform_device *pdev, | |||
449 | 449 | ||
450 | static int dss_suspend_device(struct device *dev, void *data) | 450 | static int dss_suspend_device(struct device *dev, void *data) |
451 | { | 451 | { |
452 | int r; | ||
453 | struct omap_dss_device *dssdev = to_dss_device(dev); | 452 | struct omap_dss_device *dssdev = to_dss_device(dev); |
454 | 453 | ||
455 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { | 454 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { |
@@ -457,15 +456,7 @@ static int dss_suspend_device(struct device *dev, void *data) | |||
457 | return 0; | 456 | return 0; |
458 | } | 457 | } |
459 | 458 | ||
460 | if (!dssdev->driver->suspend) { | 459 | dssdev->driver->disable(dssdev); |
461 | DSSERR("display '%s' doesn't implement suspend\n", | ||
462 | dssdev->name); | ||
463 | return -ENOSYS; | ||
464 | } | ||
465 | |||
466 | r = dssdev->driver->suspend(dssdev); | ||
467 | if (r) | ||
468 | return r; | ||
469 | 460 | ||
470 | dssdev->activate_after_resume = true; | 461 | dssdev->activate_after_resume = true; |
471 | 462 | ||
@@ -492,8 +483,8 @@ static int dss_resume_device(struct device *dev, void *data) | |||
492 | int r; | 483 | int r; |
493 | struct omap_dss_device *dssdev = to_dss_device(dev); | 484 | struct omap_dss_device *dssdev = to_dss_device(dev); |
494 | 485 | ||
495 | if (dssdev->activate_after_resume && dssdev->driver->resume) { | 486 | if (dssdev->activate_after_resume) { |
496 | r = dssdev->driver->resume(dssdev); | 487 | r = dssdev->driver->enable(dssdev); |
497 | if (r) | 488 | if (r) |
498 | return r; | 489 | return r; |
499 | } | 490 | } |
diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c index 69fb115bab32..3f9a4b947a54 100644 --- a/drivers/video/omap2/dss/hdmi_panel.c +++ b/drivers/video/omap2/dss/hdmi_panel.c | |||
@@ -280,58 +280,6 @@ static void hdmi_panel_disable(struct omap_dss_device *dssdev) | |||
280 | mutex_unlock(&hdmi.lock); | 280 | mutex_unlock(&hdmi.lock); |
281 | } | 281 | } |
282 | 282 | ||
283 | static int hdmi_panel_suspend(struct omap_dss_device *dssdev) | ||
284 | { | ||
285 | int r = 0; | ||
286 | |||
287 | mutex_lock(&hdmi.lock); | ||
288 | |||
289 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { | ||
290 | r = -EINVAL; | ||
291 | goto err; | ||
292 | } | ||
293 | |||
294 | /* | ||
295 | * TODO: notify audio users that the display was suspended. For now, | ||
296 | * disable audio locally to not break our audio state machine. | ||
297 | */ | ||
298 | hdmi_panel_audio_disable(dssdev); | ||
299 | |||
300 | dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; | ||
301 | omapdss_hdmi_display_disable(dssdev); | ||
302 | |||
303 | err: | ||
304 | mutex_unlock(&hdmi.lock); | ||
305 | |||
306 | return r; | ||
307 | } | ||
308 | |||
309 | static int hdmi_panel_resume(struct omap_dss_device *dssdev) | ||
310 | { | ||
311 | int r = 0; | ||
312 | |||
313 | mutex_lock(&hdmi.lock); | ||
314 | |||
315 | if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) { | ||
316 | r = -EINVAL; | ||
317 | goto err; | ||
318 | } | ||
319 | |||
320 | r = omapdss_hdmi_display_enable(dssdev); | ||
321 | if (r) { | ||
322 | DSSERR("failed to power on\n"); | ||
323 | goto err; | ||
324 | } | ||
325 | /* TODO: notify audio users that the panel resumed. */ | ||
326 | |||
327 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
328 | |||
329 | err: | ||
330 | mutex_unlock(&hdmi.lock); | ||
331 | |||
332 | return r; | ||
333 | } | ||
334 | |||
335 | static void hdmi_get_timings(struct omap_dss_device *dssdev, | 283 | static void hdmi_get_timings(struct omap_dss_device *dssdev, |
336 | struct omap_video_timings *timings) | 284 | struct omap_video_timings *timings) |
337 | { | 285 | { |
@@ -379,10 +327,13 @@ static int hdmi_check_timings(struct omap_dss_device *dssdev, | |||
379 | static int hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len) | 327 | static int hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len) |
380 | { | 328 | { |
381 | int r; | 329 | int r; |
330 | bool need_enable; | ||
382 | 331 | ||
383 | mutex_lock(&hdmi.lock); | 332 | mutex_lock(&hdmi.lock); |
384 | 333 | ||
385 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { | 334 | need_enable = dssdev->state == OMAP_DSS_DISPLAY_DISABLED; |
335 | |||
336 | if (need_enable) { | ||
386 | r = omapdss_hdmi_display_enable(dssdev); | 337 | r = omapdss_hdmi_display_enable(dssdev); |
387 | if (r) | 338 | if (r) |
388 | goto err; | 339 | goto err; |
@@ -390,8 +341,7 @@ static int hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len) | |||
390 | 341 | ||
391 | r = omapdss_hdmi_read_edid(buf, len); | 342 | r = omapdss_hdmi_read_edid(buf, len); |
392 | 343 | ||
393 | if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED || | 344 | if (need_enable) |
394 | dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) | ||
395 | omapdss_hdmi_display_disable(dssdev); | 345 | omapdss_hdmi_display_disable(dssdev); |
396 | err: | 346 | err: |
397 | mutex_unlock(&hdmi.lock); | 347 | mutex_unlock(&hdmi.lock); |
@@ -402,10 +352,13 @@ err: | |||
402 | static bool hdmi_detect(struct omap_dss_device *dssdev) | 352 | static bool hdmi_detect(struct omap_dss_device *dssdev) |
403 | { | 353 | { |
404 | int r; | 354 | int r; |
355 | bool need_enable; | ||
405 | 356 | ||
406 | mutex_lock(&hdmi.lock); | 357 | mutex_lock(&hdmi.lock); |
407 | 358 | ||
408 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { | 359 | need_enable = dssdev->state == OMAP_DSS_DISPLAY_DISABLED; |
360 | |||
361 | if (need_enable) { | ||
409 | r = omapdss_hdmi_display_enable(dssdev); | 362 | r = omapdss_hdmi_display_enable(dssdev); |
410 | if (r) | 363 | if (r) |
411 | goto err; | 364 | goto err; |
@@ -413,8 +366,7 @@ static bool hdmi_detect(struct omap_dss_device *dssdev) | |||
413 | 366 | ||
414 | r = omapdss_hdmi_detect(); | 367 | r = omapdss_hdmi_detect(); |
415 | 368 | ||
416 | if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED || | 369 | if (need_enable) |
417 | dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) | ||
418 | omapdss_hdmi_display_disable(dssdev); | 370 | omapdss_hdmi_display_disable(dssdev); |
419 | err: | 371 | err: |
420 | mutex_unlock(&hdmi.lock); | 372 | mutex_unlock(&hdmi.lock); |
@@ -427,8 +379,6 @@ static struct omap_dss_driver hdmi_driver = { | |||
427 | .remove = hdmi_panel_remove, | 379 | .remove = hdmi_panel_remove, |
428 | .enable = hdmi_panel_enable, | 380 | .enable = hdmi_panel_enable, |
429 | .disable = hdmi_panel_disable, | 381 | .disable = hdmi_panel_disable, |
430 | .suspend = hdmi_panel_suspend, | ||
431 | .resume = hdmi_panel_resume, | ||
432 | .get_timings = hdmi_get_timings, | 382 | .get_timings = hdmi_get_timings, |
433 | .set_timings = hdmi_set_timings, | 383 | .set_timings = hdmi_set_timings, |
434 | .check_timings = hdmi_check_timings, | 384 | .check_timings = hdmi_check_timings, |
diff --git a/drivers/video/omap2/dss/venc_panel.c b/drivers/video/omap2/dss/venc_panel.c index d55b8784ecfd..0d2b1a0834a0 100644 --- a/drivers/video/omap2/dss/venc_panel.c +++ b/drivers/video/omap2/dss/venc_panel.c | |||
@@ -157,12 +157,6 @@ static void venc_panel_disable(struct omap_dss_device *dssdev) | |||
157 | if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED) | 157 | if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED) |
158 | goto end; | 158 | goto end; |
159 | 159 | ||
160 | if (dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) { | ||
161 | /* suspended is the same as disabled with venc */ | ||
162 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | ||
163 | goto end; | ||
164 | } | ||
165 | |||
166 | omapdss_venc_display_disable(dssdev); | 160 | omapdss_venc_display_disable(dssdev); |
167 | 161 | ||
168 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 162 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
@@ -170,17 +164,6 @@ end: | |||
170 | mutex_unlock(&venc_panel.lock); | 164 | mutex_unlock(&venc_panel.lock); |
171 | } | 165 | } |
172 | 166 | ||
173 | static int venc_panel_suspend(struct omap_dss_device *dssdev) | ||
174 | { | ||
175 | venc_panel_disable(dssdev); | ||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | static int venc_panel_resume(struct omap_dss_device *dssdev) | ||
180 | { | ||
181 | return venc_panel_enable(dssdev); | ||
182 | } | ||
183 | |||
184 | static void venc_panel_set_timings(struct omap_dss_device *dssdev, | 167 | static void venc_panel_set_timings(struct omap_dss_device *dssdev, |
185 | struct omap_video_timings *timings) | 168 | struct omap_video_timings *timings) |
186 | { | 169 | { |
@@ -222,8 +205,6 @@ static struct omap_dss_driver venc_driver = { | |||
222 | 205 | ||
223 | .enable = venc_panel_enable, | 206 | .enable = venc_panel_enable, |
224 | .disable = venc_panel_disable, | 207 | .disable = venc_panel_disable, |
225 | .suspend = venc_panel_suspend, | ||
226 | .resume = venc_panel_resume, | ||
227 | 208 | ||
228 | .get_resolution = omapdss_default_get_resolution, | 209 | .get_resolution = omapdss_default_get_resolution, |
229 | .get_recommended_bpp = omapdss_default_get_recommended_bpp, | 210 | .get_recommended_bpp = omapdss_default_get_recommended_bpp, |
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index bc225e46fdd2..ba4630830e09 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -1258,11 +1258,10 @@ static int omapfb_blank(int blank, struct fb_info *fbi) | |||
1258 | 1258 | ||
1259 | switch (blank) { | 1259 | switch (blank) { |
1260 | case FB_BLANK_UNBLANK: | 1260 | case FB_BLANK_UNBLANK: |
1261 | if (display->state != OMAP_DSS_DISPLAY_SUSPENDED) | 1261 | if (display->state == OMAP_DSS_DISPLAY_ACTIVE) |
1262 | goto exit; | 1262 | goto exit; |
1263 | 1263 | ||
1264 | if (display->driver->resume) | 1264 | r = display->driver->enable(display); |
1265 | r = display->driver->resume(display); | ||
1266 | 1265 | ||
1267 | if ((display->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) && | 1266 | if ((display->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) && |
1268 | d->update_mode == OMAPFB_AUTO_UPDATE && | 1267 | d->update_mode == OMAPFB_AUTO_UPDATE && |
@@ -1283,8 +1282,7 @@ static int omapfb_blank(int blank, struct fb_info *fbi) | |||
1283 | if (d->auto_update_work_enabled) | 1282 | if (d->auto_update_work_enabled) |
1284 | omapfb_stop_auto_update(fbdev, display); | 1283 | omapfb_stop_auto_update(fbdev, display); |
1285 | 1284 | ||
1286 | if (display->driver->suspend) | 1285 | display->driver->disable(display); |
1287 | r = display->driver->suspend(display); | ||
1288 | 1286 | ||
1289 | break; | 1287 | break; |
1290 | 1288 | ||