diff options
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 38 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 50 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/sdi.c | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 3 | ||||
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 2 | ||||
-rw-r--r-- | include/video/omapdss.h | 4 |
8 files changed, 91 insertions, 11 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index e393b6ab60db..ab6d8b0e94c7 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
@@ -396,6 +396,36 @@ static int __init dpi_verify_dsi_pll(struct platform_device *dsidev) | |||
396 | return 0; | 396 | return 0; |
397 | } | 397 | } |
398 | 398 | ||
399 | /* | ||
400 | * Return a hardcoded channel for the DPI output. This should work for | ||
401 | * current use cases, but this can be later expanded to either resolve | ||
402 | * the channel in some more dynamic manner, or get the channel as a user | ||
403 | * parameter. | ||
404 | */ | ||
405 | static enum omap_channel dpi_get_channel(void) | ||
406 | { | ||
407 | switch (omapdss_get_version()) { | ||
408 | case OMAPDSS_VER_OMAP24xx: | ||
409 | case OMAPDSS_VER_OMAP34xx_ES1: | ||
410 | case OMAPDSS_VER_OMAP34xx_ES3: | ||
411 | case OMAPDSS_VER_OMAP3630: | ||
412 | case OMAPDSS_VER_AM35xx: | ||
413 | return OMAP_DSS_CHANNEL_LCD; | ||
414 | |||
415 | case OMAPDSS_VER_OMAP4430_ES1: | ||
416 | case OMAPDSS_VER_OMAP4430_ES2: | ||
417 | case OMAPDSS_VER_OMAP4: | ||
418 | return OMAP_DSS_CHANNEL_LCD2; | ||
419 | |||
420 | case OMAPDSS_VER_OMAP5: | ||
421 | return OMAP_DSS_CHANNEL_LCD3; | ||
422 | |||
423 | default: | ||
424 | DSSWARN("unsupported DSS version\n"); | ||
425 | return OMAP_DSS_CHANNEL_LCD; | ||
426 | } | ||
427 | } | ||
428 | |||
399 | static int __init dpi_init_display(struct omap_dss_device *dssdev) | 429 | static int __init dpi_init_display(struct omap_dss_device *dssdev) |
400 | { | 430 | { |
401 | struct platform_device *dsidev; | 431 | struct platform_device *dsidev; |
@@ -416,12 +446,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev) | |||
416 | dpi.vdds_dsi_reg = vdds_dsi; | 446 | dpi.vdds_dsi_reg = vdds_dsi; |
417 | } | 447 | } |
418 | 448 | ||
419 | /* | 449 | dsidev = dpi_get_dsidev(dpi.output.dispc_channel); |
420 | * XXX We shouldn't need dssdev->channel for this. The dsi pll clock | ||
421 | * source for DPI is SoC integration detail, not something that should | ||
422 | * be configured in the dssdev | ||
423 | */ | ||
424 | dsidev = dpi_get_dsidev(dssdev->channel); | ||
425 | 450 | ||
426 | if (dsidev && dpi_verify_dsi_pll(dsidev)) { | 451 | if (dsidev && dpi_verify_dsi_pll(dsidev)) { |
427 | dsidev = NULL; | 452 | dsidev = NULL; |
@@ -513,6 +538,7 @@ static void __init dpi_init_output(struct platform_device *pdev) | |||
513 | out->id = OMAP_DSS_OUTPUT_DPI; | 538 | out->id = OMAP_DSS_OUTPUT_DPI; |
514 | out->type = OMAP_DISPLAY_TYPE_DPI; | 539 | out->type = OMAP_DISPLAY_TYPE_DPI; |
515 | out->name = "dpi.0"; | 540 | out->name = "dpi.0"; |
541 | out->dispc_channel = dpi_get_channel(); | ||
516 | 542 | ||
517 | dss_register_output(out); | 543 | dss_register_output(out); |
518 | } | 544 | } |
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 294c83299cea..d13e77c01d7e 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -4946,6 +4946,55 @@ void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev, | |||
4946 | } | 4946 | } |
4947 | EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings); | 4947 | EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings); |
4948 | 4948 | ||
4949 | /* | ||
4950 | * Return a hardcoded channel for the DSI output. This should work for | ||
4951 | * current use cases, but this can be later expanded to either resolve | ||
4952 | * the channel in some more dynamic manner, or get the channel as a user | ||
4953 | * parameter. | ||
4954 | */ | ||
4955 | static enum omap_channel dsi_get_channel(int module_id) | ||
4956 | { | ||
4957 | switch (omapdss_get_version()) { | ||
4958 | case OMAPDSS_VER_OMAP24xx: | ||
4959 | DSSWARN("DSI not supported\n"); | ||
4960 | return OMAP_DSS_CHANNEL_LCD; | ||
4961 | |||
4962 | case OMAPDSS_VER_OMAP34xx_ES1: | ||
4963 | case OMAPDSS_VER_OMAP34xx_ES3: | ||
4964 | case OMAPDSS_VER_OMAP3630: | ||
4965 | case OMAPDSS_VER_AM35xx: | ||
4966 | return OMAP_DSS_CHANNEL_LCD; | ||
4967 | |||
4968 | case OMAPDSS_VER_OMAP4430_ES1: | ||
4969 | case OMAPDSS_VER_OMAP4430_ES2: | ||
4970 | case OMAPDSS_VER_OMAP4: | ||
4971 | switch (module_id) { | ||
4972 | case 0: | ||
4973 | return OMAP_DSS_CHANNEL_LCD; | ||
4974 | case 1: | ||
4975 | return OMAP_DSS_CHANNEL_LCD2; | ||
4976 | default: | ||
4977 | DSSWARN("unsupported module id\n"); | ||
4978 | return OMAP_DSS_CHANNEL_LCD; | ||
4979 | } | ||
4980 | |||
4981 | case OMAPDSS_VER_OMAP5: | ||
4982 | switch (module_id) { | ||
4983 | case 0: | ||
4984 | return OMAP_DSS_CHANNEL_LCD; | ||
4985 | case 1: | ||
4986 | return OMAP_DSS_CHANNEL_LCD3; | ||
4987 | default: | ||
4988 | DSSWARN("unsupported module id\n"); | ||
4989 | return OMAP_DSS_CHANNEL_LCD; | ||
4990 | } | ||
4991 | |||
4992 | default: | ||
4993 | DSSWARN("unsupported DSS version\n"); | ||
4994 | return OMAP_DSS_CHANNEL_LCD; | ||
4995 | } | ||
4996 | } | ||
4997 | |||
4949 | static int __init dsi_init_display(struct omap_dss_device *dssdev) | 4998 | static int __init dsi_init_display(struct omap_dss_device *dssdev) |
4950 | { | 4999 | { |
4951 | struct platform_device *dsidev = | 5000 | struct platform_device *dsidev = |
@@ -5184,6 +5233,7 @@ static void __init dsi_init_output(struct platform_device *dsidev) | |||
5184 | 5233 | ||
5185 | out->type = OMAP_DISPLAY_TYPE_DSI; | 5234 | out->type = OMAP_DISPLAY_TYPE_DSI; |
5186 | out->name = dsi->module_id == 0 ? "dsi.0" : "dsi.1"; | 5235 | out->name = dsi->module_id == 0 ? "dsi.0" : "dsi.1"; |
5236 | out->dispc_channel = dsi_get_channel(dsi->module_id); | ||
5187 | 5237 | ||
5188 | dss_register_output(out); | 5238 | dss_register_output(out); |
5189 | } | 5239 | } |
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 9cbca03eff43..a6f953898d94 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -1012,8 +1012,6 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev) | |||
1012 | hdmi.ls_oe_gpio = priv->ls_oe_gpio; | 1012 | hdmi.ls_oe_gpio = priv->ls_oe_gpio; |
1013 | hdmi.hpd_gpio = priv->hpd_gpio; | 1013 | hdmi.hpd_gpio = priv->hpd_gpio; |
1014 | 1014 | ||
1015 | dssdev->channel = OMAP_DSS_CHANNEL_DIGIT; | ||
1016 | |||
1017 | r = hdmi_init_display(dssdev); | 1015 | r = hdmi_init_display(dssdev); |
1018 | if (r) { | 1016 | if (r) { |
1019 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | 1017 | DSSERR("device %s init failed: %d\n", dssdev->name, r); |
@@ -1047,6 +1045,7 @@ static void __init hdmi_init_output(struct platform_device *pdev) | |||
1047 | out->id = OMAP_DSS_OUTPUT_HDMI; | 1045 | out->id = OMAP_DSS_OUTPUT_HDMI; |
1048 | out->type = OMAP_DISPLAY_TYPE_HDMI; | 1046 | out->type = OMAP_DISPLAY_TYPE_HDMI; |
1049 | out->name = "hdmi.0"; | 1047 | out->name = "hdmi.0"; |
1048 | out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT; | ||
1050 | 1049 | ||
1051 | dss_register_output(out); | 1050 | dss_register_output(out); |
1052 | } | 1051 | } |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index d9d7f3511a7b..1a691bb27547 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -1026,6 +1026,7 @@ static void __init rfbi_init_output(struct platform_device *pdev) | |||
1026 | out->id = OMAP_DSS_OUTPUT_DBI; | 1026 | out->id = OMAP_DSS_OUTPUT_DBI; |
1027 | out->type = OMAP_DISPLAY_TYPE_DBI; | 1027 | out->type = OMAP_DISPLAY_TYPE_DBI; |
1028 | out->name = "rfbi.0"; | 1028 | out->name = "rfbi.0"; |
1029 | out->dispc_channel = OMAP_DSS_CHANNEL_LCD; | ||
1029 | 1030 | ||
1030 | dss_register_output(out); | 1031 | dss_register_output(out); |
1031 | } | 1032 | } |
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index c27b58ad8e4d..3888cfa0881c 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c | |||
@@ -279,6 +279,7 @@ static void __init sdi_init_output(struct platform_device *pdev) | |||
279 | out->id = OMAP_DSS_OUTPUT_SDI; | 279 | out->id = OMAP_DSS_OUTPUT_SDI; |
280 | out->type = OMAP_DISPLAY_TYPE_SDI; | 280 | out->type = OMAP_DISPLAY_TYPE_SDI; |
281 | out->name = "sdi.0"; | 281 | out->name = "sdi.0"; |
282 | out->dispc_channel = OMAP_DSS_CHANNEL_LCD; | ||
282 | 283 | ||
283 | dss_register_output(out); | 284 | dss_register_output(out); |
284 | } | 285 | } |
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 4c07a25d3d9b..5cb983e2f170 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -786,8 +786,6 @@ static void __init venc_probe_pdata(struct platform_device *vencdev) | |||
786 | 786 | ||
787 | dss_copy_device_pdata(dssdev, plat_dssdev); | 787 | dss_copy_device_pdata(dssdev, plat_dssdev); |
788 | 788 | ||
789 | dssdev->channel = OMAP_DSS_CHANNEL_DIGIT; | ||
790 | |||
791 | r = venc_init_display(dssdev); | 789 | r = venc_init_display(dssdev); |
792 | if (r) { | 790 | if (r) { |
793 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | 791 | DSSERR("device %s init failed: %d\n", dssdev->name, r); |
@@ -820,6 +818,7 @@ static void __init venc_init_output(struct platform_device *pdev) | |||
820 | out->id = OMAP_DSS_OUTPUT_VENC; | 818 | out->id = OMAP_DSS_OUTPUT_VENC; |
821 | out->type = OMAP_DISPLAY_TYPE_VENC; | 819 | out->type = OMAP_DISPLAY_TYPE_VENC; |
822 | out->name = "venc.0"; | 820 | out->name = "venc.0"; |
821 | out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT; | ||
823 | 822 | ||
824 | dss_register_output(out); | 823 | dss_register_output(out); |
825 | } | 824 | } |
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index ca585ef37f25..f38348ea3375 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -2388,7 +2388,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev, | |||
2388 | struct omap_dss_device *dssdev = fbdev->displays[i].dssdev; | 2388 | struct omap_dss_device *dssdev = fbdev->displays[i].dssdev; |
2389 | struct omap_dss_output *out = dssdev->output; | 2389 | struct omap_dss_output *out = dssdev->output; |
2390 | 2390 | ||
2391 | mgr = omap_dss_get_overlay_manager(dssdev->channel); | 2391 | mgr = omap_dss_get_overlay_manager(out->dispc_channel); |
2392 | 2392 | ||
2393 | if (!mgr || !out) | 2393 | if (!mgr || !out) |
2394 | continue; | 2394 | continue; |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index fa800b7ef832..41fb434093e9 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -546,6 +546,9 @@ struct omap_dss_output { | |||
546 | /* display type supported by the output */ | 546 | /* display type supported by the output */ |
547 | enum omap_display_type type; | 547 | enum omap_display_type type; |
548 | 548 | ||
549 | /* DISPC channel for this output */ | ||
550 | enum omap_channel dispc_channel; | ||
551 | |||
549 | /* output instance */ | 552 | /* output instance */ |
550 | enum omap_dss_output_id id; | 553 | enum omap_dss_output_id id; |
551 | 554 | ||
@@ -563,6 +566,7 @@ struct omap_dss_device { | |||
563 | 566 | ||
564 | enum omap_display_type type; | 567 | enum omap_display_type type; |
565 | 568 | ||
569 | /* obsolete, to be removed */ | ||
566 | enum omap_channel channel; | 570 | enum omap_channel channel; |
567 | 571 | ||
568 | union { | 572 | union { |