From 04b1fc0291674666110fffd09b30d8304aaa4602 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 14 May 2013 10:55:19 +0300 Subject: OMAPDRM: fix overlay manager handling Currently omapdrm creates crtcs, which map directly to DSS overlay managers, only on demand at init time. This would make it difficult to manage connecting the display entities in the future, as the code cannot just search for a suitable overlay manager. We cannot fix this the sane way, which would be to create crtcs for each overlay manager, because we need an overlay for each crtc. With limited number of overlays, that's not possible. So the solution for now is to detach the overlay manager from the crtc. crtcs are still created on demand at init time, but all overlay managers are always initialized by the omapdss. This way we can create and connect whole display pipelines from the overlay manager to the display, regardless of which crtcs omapdrm would create. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/apply.c | 3 --- drivers/video/omap2/dss/dispc.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 74d1d000e92d..c844071e8e28 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1577,7 +1577,6 @@ int omapdss_compat_init(void) apply_init_priv(); - dss_init_overlay_managers(); dss_init_overlay_managers_sysfs(pdev); dss_init_overlays(pdev); @@ -1642,7 +1641,6 @@ err_disp_sysfs: err_mgr_ops: dss_uninit_overlay_managers_sysfs(pdev); - dss_uninit_overlay_managers(); dss_uninit_overlays(pdev); compat_refcnt--; @@ -1671,7 +1669,6 @@ void omapdss_compat_uninit(void) dss_uninstall_mgr_ops(); dss_uninit_overlay_managers_sysfs(pdev); - dss_uninit_overlay_managers(); dss_uninit_overlays(pdev); out: mutex_unlock(&compat_init_lock); diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index b33b0169bb3b..83d7bb9da609 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3710,6 +3710,8 @@ static int __init omap_dispchw_probe(struct platform_device *pdev) dispc_runtime_put(); + dss_init_overlay_managers(); + dss_debugfs_create_file("dispc", dispc_dump_regs); return 0; @@ -3723,6 +3725,8 @@ static int __exit omap_dispchw_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); + dss_uninit_overlay_managers(); + return 0; } -- cgit v1.2.1