aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_drv.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-05 18:39:52 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-04-03 12:36:40 +0300
commit9f759225e42b00ad0c5a55907f443b388e8960f4 (patch)
treead3c4b7b29003cdc70002fb3b8c9dcd41b33f93e /drivers/gpu/drm/omapdrm/omap_drv.c
parentdrm/omap: fill dispc_ops (diff)
downloadlinux-dev-9f759225e42b00ad0c5a55907f443b388e8960f4.tar.xz
linux-dev-9f759225e42b00ad0c5a55907f443b388e8960f4.zip
drm/omap: use dispc_ops
Change omapdrm to get dispc_ops and use that to call the dispc functions instead or direct function calls. The change is very straightforward. The only problem was in omap_crtc_init() which calls pipe2vbl(crtc), and at that point of time the crtc->dev link, which is used to get the dispc_ops, has not been set up yet. This patch makes omap_crtc_init() skip the call to pipe2vbl() and instead calls dispc_ops->mgr_get_vsync_irq() directly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index db0b485ef6c2..c7dbf30a61fa 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -93,7 +93,7 @@ static void omap_atomic_complete(struct omap_atomic_state_commit *commit)
struct drm_atomic_state *old_state = commit->state;
/* Apply the atomic update. */
- dispc_runtime_get();
+ priv->dispc_ops->runtime_get();
drm_atomic_helper_commit_modeset_disables(dev, old_state);
@@ -117,7 +117,7 @@ static void omap_atomic_complete(struct omap_atomic_state_commit *commit)
drm_atomic_helper_cleanup_planes(dev, old_state);
- dispc_runtime_put();
+ priv->dispc_ops->runtime_put();
drm_atomic_state_put(old_state);
@@ -320,8 +320,8 @@ static int omap_modeset_init(struct drm_device *dev)
{
struct omap_drm_private *priv = dev->dev_private;
struct omap_dss_device *dssdev = NULL;
- int num_ovls = dispc_get_num_ovls();
- int num_mgrs = dispc_get_num_mgrs();
+ int num_ovls = priv->dispc_ops->get_num_ovls();
+ int num_mgrs = priv->dispc_ops->get_num_mgrs();
int num_crtcs;
int i, id = 0;
int ret;
@@ -782,6 +782,8 @@ static int pdev_probe(struct platform_device *pdev)
goto err_disconnect_dssdevs;
}
+ priv->dispc_ops = dispc_get_ops();
+
priv->omaprev = pdata->omaprev;
priv->wq = alloc_ordered_workqueue("omapdrm", 0);