diff options
Diffstat (limited to 'drivers/video/omap2/dss')
-rw-r--r-- | drivers/video/omap2/dss/display.c | 40 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 10 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/sdi.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 8 |
8 files changed, 42 insertions, 56 deletions
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index e688d10f061a..faf7d91c4a84 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c | |||
@@ -359,46 +359,6 @@ void dss_init_device(struct platform_device *pdev, | |||
359 | int i; | 359 | int i; |
360 | int r; | 360 | int r; |
361 | 361 | ||
362 | switch (dssdev->type) { | ||
363 | #ifdef CONFIG_OMAP2_DSS_DPI | ||
364 | case OMAP_DISPLAY_TYPE_DPI: | ||
365 | r = dpi_init_display(dssdev); | ||
366 | break; | ||
367 | #endif | ||
368 | #ifdef CONFIG_OMAP2_DSS_RFBI | ||
369 | case OMAP_DISPLAY_TYPE_DBI: | ||
370 | r = rfbi_init_display(dssdev); | ||
371 | break; | ||
372 | #endif | ||
373 | #ifdef CONFIG_OMAP2_DSS_VENC | ||
374 | case OMAP_DISPLAY_TYPE_VENC: | ||
375 | r = venc_init_display(dssdev); | ||
376 | break; | ||
377 | #endif | ||
378 | #ifdef CONFIG_OMAP2_DSS_SDI | ||
379 | case OMAP_DISPLAY_TYPE_SDI: | ||
380 | r = sdi_init_display(dssdev); | ||
381 | break; | ||
382 | #endif | ||
383 | #ifdef CONFIG_OMAP2_DSS_DSI | ||
384 | case OMAP_DISPLAY_TYPE_DSI: | ||
385 | r = dsi_init_display(dssdev); | ||
386 | break; | ||
387 | #endif | ||
388 | case OMAP_DISPLAY_TYPE_HDMI: | ||
389 | r = hdmi_init_display(dssdev); | ||
390 | break; | ||
391 | default: | ||
392 | DSSERR("Support for display '%s' not compiled in.\n", | ||
393 | dssdev->name); | ||
394 | return; | ||
395 | } | ||
396 | |||
397 | if (r) { | ||
398 | DSSERR("failed to init display %s\n", dssdev->name); | ||
399 | return; | ||
400 | } | ||
401 | |||
402 | /* create device sysfs files */ | 362 | /* create device sysfs files */ |
403 | i = 0; | 363 | i = 0; |
404 | while ((attr = display_sysfs_attrs[i++]) != NULL) { | 364 | while ((attr = display_sysfs_attrs[i++]) != NULL) { |
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 35eb29706934..de3454b91497 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
@@ -339,7 +339,7 @@ int dpi_check_timings(struct omap_dss_device *dssdev, | |||
339 | } | 339 | } |
340 | EXPORT_SYMBOL(dpi_check_timings); | 340 | EXPORT_SYMBOL(dpi_check_timings); |
341 | 341 | ||
342 | int dpi_init_display(struct omap_dss_device *dssdev) | 342 | static int __init dpi_init_display(struct omap_dss_device *dssdev) |
343 | { | 343 | { |
344 | DSSDBG("init_display\n"); | 344 | DSSDBG("init_display\n"); |
345 | 345 | ||
@@ -376,6 +376,12 @@ static int __init omap_dpi_probe(struct platform_device *pdev) | |||
376 | if (dssdev->type != OMAP_DISPLAY_TYPE_DPI) | 376 | if (dssdev->type != OMAP_DISPLAY_TYPE_DPI) |
377 | continue; | 377 | continue; |
378 | 378 | ||
379 | r = dpi_init_display(dssdev); | ||
380 | if (r) { | ||
381 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
382 | continue; | ||
383 | } | ||
384 | |||
379 | r = omap_dss_register_device(dssdev, &pdev->dev, i); | 385 | r = omap_dss_register_device(dssdev, &pdev->dev, i); |
380 | if (r) | 386 | if (r) |
381 | DSSERR("device %s register failed: %d\n", | 387 | DSSERR("device %s register failed: %d\n", |
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 78b962308a02..8cc0b2d53c6f 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -4454,7 +4454,7 @@ int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable) | |||
4454 | } | 4454 | } |
4455 | EXPORT_SYMBOL(omapdss_dsi_enable_te); | 4455 | EXPORT_SYMBOL(omapdss_dsi_enable_te); |
4456 | 4456 | ||
4457 | int dsi_init_display(struct omap_dss_device *dssdev) | 4457 | static int __init dsi_init_display(struct omap_dss_device *dssdev) |
4458 | { | 4458 | { |
4459 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 4459 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
4460 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 4460 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
@@ -4710,6 +4710,12 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev) | |||
4710 | if (dssdev->phy.dsi.module != dsi_module) | 4710 | if (dssdev->phy.dsi.module != dsi_module) |
4711 | continue; | 4711 | continue; |
4712 | 4712 | ||
4713 | r = dsi_init_display(dssdev); | ||
4714 | if (r) { | ||
4715 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
4716 | continue; | ||
4717 | } | ||
4718 | |||
4713 | r = omap_dss_register_device(dssdev, &dsidev->dev, i); | 4719 | r = omap_dss_register_device(dssdev, &dsidev->dev, i); |
4714 | if (r) | 4720 | if (r) |
4715 | DSSERR("device %s register failed: %d\n", | 4721 | DSSERR("device %s register failed: %d\n", |
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 972b22d27972..d5cb19fe7e8b 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -275,7 +275,6 @@ int dss_calc_clock_div(bool is_tft, unsigned long req_pck, | |||
275 | /* SDI */ | 275 | /* SDI */ |
276 | int sdi_init_platform_driver(void) __init; | 276 | int sdi_init_platform_driver(void) __init; |
277 | void sdi_uninit_platform_driver(void) __exit; | 277 | void sdi_uninit_platform_driver(void) __exit; |
278 | int sdi_init_display(struct omap_dss_device *display); | ||
279 | 278 | ||
280 | /* DSI */ | 279 | /* DSI */ |
281 | #ifdef CONFIG_OMAP2_DSS_DSI | 280 | #ifdef CONFIG_OMAP2_DSS_DSI |
@@ -291,7 +290,6 @@ void dsi_runtime_put(struct platform_device *dsidev); | |||
291 | 290 | ||
292 | void dsi_dump_clocks(struct seq_file *s); | 291 | void dsi_dump_clocks(struct seq_file *s); |
293 | 292 | ||
294 | int dsi_init_display(struct omap_dss_device *display); | ||
295 | void dsi_irq_handler(void); | 293 | void dsi_irq_handler(void); |
296 | u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt); | 294 | u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt); |
297 | 295 | ||
@@ -366,7 +364,6 @@ static inline struct platform_device *dsi_get_dsidev_from_id(int module) | |||
366 | /* DPI */ | 364 | /* DPI */ |
367 | int dpi_init_platform_driver(void) __init; | 365 | int dpi_init_platform_driver(void) __init; |
368 | void dpi_uninit_platform_driver(void) __exit; | 366 | void dpi_uninit_platform_driver(void) __exit; |
369 | int dpi_init_display(struct omap_dss_device *dssdev); | ||
370 | 367 | ||
371 | /* DISPC */ | 368 | /* DISPC */ |
372 | int dispc_init_platform_driver(void) __init; | 369 | int dispc_init_platform_driver(void) __init; |
@@ -437,7 +434,6 @@ void dispc_mgr_setup(enum omap_channel channel, | |||
437 | #ifdef CONFIG_OMAP2_DSS_VENC | 434 | #ifdef CONFIG_OMAP2_DSS_VENC |
438 | int venc_init_platform_driver(void) __init; | 435 | int venc_init_platform_driver(void) __init; |
439 | void venc_uninit_platform_driver(void) __exit; | 436 | void venc_uninit_platform_driver(void) __exit; |
440 | int venc_init_display(struct omap_dss_device *display); | ||
441 | unsigned long venc_get_pixel_clock(void); | 437 | unsigned long venc_get_pixel_clock(void); |
442 | #else | 438 | #else |
443 | static inline unsigned long venc_get_pixel_clock(void) | 439 | static inline unsigned long venc_get_pixel_clock(void) |
@@ -451,13 +447,8 @@ static inline unsigned long venc_get_pixel_clock(void) | |||
451 | #ifdef CONFIG_OMAP4_DSS_HDMI | 447 | #ifdef CONFIG_OMAP4_DSS_HDMI |
452 | int hdmi_init_platform_driver(void) __init; | 448 | int hdmi_init_platform_driver(void) __init; |
453 | void hdmi_uninit_platform_driver(void) __exit; | 449 | void hdmi_uninit_platform_driver(void) __exit; |
454 | int hdmi_init_display(struct omap_dss_device *dssdev); | ||
455 | unsigned long hdmi_get_pixel_clock(void); | 450 | unsigned long hdmi_get_pixel_clock(void); |
456 | #else | 451 | #else |
457 | static inline int hdmi_init_display(struct omap_dss_device *dssdev) | ||
458 | { | ||
459 | return 0; | ||
460 | } | ||
461 | static inline unsigned long hdmi_get_pixel_clock(void) | 452 | static inline unsigned long hdmi_get_pixel_clock(void) |
462 | { | 453 | { |
463 | WARN("%s: HDMI not compiled in, returning pclk as 0\n", __func__); | 454 | WARN("%s: HDMI not compiled in, returning pclk as 0\n", __func__); |
@@ -477,7 +468,6 @@ void hdmi_panel_exit(void); | |||
477 | /* RFBI */ | 468 | /* RFBI */ |
478 | int rfbi_init_platform_driver(void) __init; | 469 | int rfbi_init_platform_driver(void) __init; |
479 | void rfbi_uninit_platform_driver(void) __exit; | 470 | void rfbi_uninit_platform_driver(void) __exit; |
480 | int rfbi_init_display(struct omap_dss_device *display); | ||
481 | 471 | ||
482 | 472 | ||
483 | #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS | 473 | #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS |
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index faa91441a6b0..fa1a054bb03b 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -147,7 +147,7 @@ static void hdmi_runtime_put(void) | |||
147 | WARN_ON(r < 0); | 147 | WARN_ON(r < 0); |
148 | } | 148 | } |
149 | 149 | ||
150 | int hdmi_init_display(struct omap_dss_device *dssdev) | 150 | static int __init hdmi_init_display(struct omap_dss_device *dssdev) |
151 | { | 151 | { |
152 | DSSDBG("init_display\n"); | 152 | DSSDBG("init_display\n"); |
153 | 153 | ||
@@ -819,6 +819,12 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev) | |||
819 | if (dssdev->type != OMAP_DISPLAY_TYPE_HDMI) | 819 | if (dssdev->type != OMAP_DISPLAY_TYPE_HDMI) |
820 | continue; | 820 | continue; |
821 | 821 | ||
822 | r = hdmi_init_display(dssdev); | ||
823 | if (r) { | ||
824 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
825 | continue; | ||
826 | } | ||
827 | |||
822 | r = omap_dss_register_device(dssdev, &pdev->dev, i); | 828 | r = omap_dss_register_device(dssdev, &pdev->dev, i); |
823 | if (r) | 829 | if (r) |
824 | DSSERR("device %s register failed: %d\n", | 830 | DSSERR("device %s register failed: %d\n", |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 4c0a6c97d62b..f081f01b0b7d 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -920,7 +920,7 @@ void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) | |||
920 | } | 920 | } |
921 | EXPORT_SYMBOL(omapdss_rfbi_display_disable); | 921 | EXPORT_SYMBOL(omapdss_rfbi_display_disable); |
922 | 922 | ||
923 | int rfbi_init_display(struct omap_dss_device *dssdev) | 923 | static int __init rfbi_init_display(struct omap_dss_device *dssdev) |
924 | { | 924 | { |
925 | rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev; | 925 | rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev; |
926 | dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE; | 926 | dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE; |
@@ -985,6 +985,12 @@ static int __init omap_rfbihw_probe(struct platform_device *pdev) | |||
985 | if (dssdev->type != OMAP_DISPLAY_TYPE_DBI) | 985 | if (dssdev->type != OMAP_DISPLAY_TYPE_DBI) |
986 | continue; | 986 | continue; |
987 | 987 | ||
988 | r = rfbi_init_display(dssdev); | ||
989 | if (r) { | ||
990 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
991 | continue; | ||
992 | } | ||
993 | |||
988 | r = omap_dss_register_device(dssdev, &pdev->dev, i); | 994 | r = omap_dss_register_device(dssdev, &pdev->dev, i); |
989 | if (r) | 995 | if (r) |
990 | DSSERR("device %s register failed: %d\n", | 996 | DSSERR("device %s register failed: %d\n", |
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 3be8134ec2d9..2641a768f316 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c | |||
@@ -156,7 +156,7 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) | |||
156 | } | 156 | } |
157 | EXPORT_SYMBOL(omapdss_sdi_display_disable); | 157 | EXPORT_SYMBOL(omapdss_sdi_display_disable); |
158 | 158 | ||
159 | int sdi_init_display(struct omap_dss_device *dssdev) | 159 | static int __init sdi_init_display(struct omap_dss_device *dssdev) |
160 | { | 160 | { |
161 | DSSDBG("SDI init\n"); | 161 | DSSDBG("SDI init\n"); |
162 | 162 | ||
@@ -187,6 +187,12 @@ static int __init omap_sdi_probe(struct platform_device *pdev) | |||
187 | if (dssdev->type != OMAP_DISPLAY_TYPE_SDI) | 187 | if (dssdev->type != OMAP_DISPLAY_TYPE_SDI) |
188 | continue; | 188 | continue; |
189 | 189 | ||
190 | r = sdi_init_display(dssdev); | ||
191 | if (r) { | ||
192 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
193 | continue; | ||
194 | } | ||
195 | |||
190 | r = omap_dss_register_device(dssdev, &pdev->dev, i); | 196 | r = omap_dss_register_device(dssdev, &pdev->dev, i); |
191 | if (r) | 197 | if (r) |
192 | DSSERR("device %s register failed: %d\n", | 198 | DSSERR("device %s register failed: %d\n", |
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index c194dfab6356..005fdaa2cf7d 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -725,7 +725,7 @@ static struct omap_dss_driver venc_driver = { | |||
725 | }; | 725 | }; |
726 | /* driver end */ | 726 | /* driver end */ |
727 | 727 | ||
728 | int venc_init_display(struct omap_dss_device *dssdev) | 728 | static int __init venc_init_display(struct omap_dss_device *dssdev) |
729 | { | 729 | { |
730 | DSSDBG("init_display\n"); | 730 | DSSDBG("init_display\n"); |
731 | 731 | ||
@@ -883,6 +883,12 @@ static int __init omap_venchw_probe(struct platform_device *pdev) | |||
883 | if (dssdev->type != OMAP_DISPLAY_TYPE_VENC) | 883 | if (dssdev->type != OMAP_DISPLAY_TYPE_VENC) |
884 | continue; | 884 | continue; |
885 | 885 | ||
886 | r = venc_init_display(dssdev); | ||
887 | if (r) { | ||
888 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
889 | continue; | ||
890 | } | ||
891 | |||
886 | r = omap_dss_register_device(dssdev, &pdev->dev, i); | 892 | r = omap_dss_register_device(dssdev, &pdev->dev, i); |
887 | if (r) | 893 | if (r) |
888 | DSSERR("device %s register failed: %d\n", | 894 | DSSERR("device %s register failed: %d\n", |