aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2017-01-27 05:04:55 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-02-16 07:09:55 -0500
commit897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9 (patch)
treea87e7da0cf80596e14639911dfc4216f364d2d0b
parente025d3860bd9f718d4d8ce251e6a823dd8293b51 (diff)
drm/omapdrm: Move commit_modeset_enables() before commit_planes()
Move drm_atomic_helper_commit_modeset_enables() call to before drm_atomic_helper_commit_planes() call and have a omap_atomic_wait_for_completion() call after both. With the current dss dispc implementation we have to enable the new modeset before we can commit planes. The dispc ovl configuration relies on the video mode configuration been written into the HW when the ovl configuration is calculated. This approach is not ideal because after a mode change the plane update is executed only after the first vblank interrupt. The dispc implementation should be fixed so that it is able use uncommitted drm state information. information. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index f85c9c8d8467..3f2554235225 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -96,8 +96,22 @@ static void omap_atomic_complete(struct omap_atomic_state_commit *commit)
96 dispc_runtime_get(); 96 dispc_runtime_get();
97 97
98 drm_atomic_helper_commit_modeset_disables(dev, old_state); 98 drm_atomic_helper_commit_modeset_disables(dev, old_state);
99 drm_atomic_helper_commit_planes(dev, old_state, 0); 99
100 /* With the current dss dispc implementation we have to enable
101 * the new modeset before we can commit planes. The dispc ovl
102 * configuration relies on the video mode configuration been
103 * written into the HW when the ovl configuration is
104 * calculated.
105 *
106 * This approach is not ideal because after a mode change the
107 * plane update is executed only after the first vblank
108 * interrupt. The dispc implementation should be fixed so that
109 * it is able use uncommitted drm state information.
110 */
100 drm_atomic_helper_commit_modeset_enables(dev, old_state); 111 drm_atomic_helper_commit_modeset_enables(dev, old_state);
112 omap_atomic_wait_for_completion(dev, old_state);
113
114 drm_atomic_helper_commit_planes(dev, old_state, 0);
101 115
102 omap_atomic_wait_for_completion(dev, old_state); 116 omap_atomic_wait_for_completion(dev, old_state);
103 117