Commit fc5cc967 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/omap: work-around for omap3 display enable

Seems that on omap3 enabling a crtc without any planes causes a sync
lost flood. This only happens on the first enable, and after that it
works. This looks like an HW issue and it's unclear why this is
happening or how to fix it.

This started happening after 897145d0
("drm/omapdrm: Move commit_modeset_enables() before commit_planes()")
which, as a work-around, changed omapdrm first to do the modeset enable,
and plane set only after that. This WA should be fine on all DSS
versions, but apparently OMAP3 DSS is an exception.

This patch reverts that work-around for OMAP3 DSS.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 0c43f1e0
...@@ -84,23 +84,36 @@ static void omap_atomic_commit_tail(struct drm_atomic_state *old_state) ...@@ -84,23 +84,36 @@ static void omap_atomic_commit_tail(struct drm_atomic_state *old_state)
/* Apply the atomic update. */ /* Apply the atomic update. */
drm_atomic_helper_commit_modeset_disables(dev, old_state); drm_atomic_helper_commit_modeset_disables(dev, old_state);
/* With the current dss dispc implementation we have to enable if (priv->omaprev != 0x3430) {
* the new modeset before we can commit planes. The dispc ovl /* With the current dss dispc implementation we have to enable
* configuration relies on the video mode configuration been * the new modeset before we can commit planes. The dispc ovl
* written into the HW when the ovl configuration is * configuration relies on the video mode configuration been
* calculated. * 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 * This approach is not ideal because after a mode change the
* interrupt. The dispc implementation should be fixed so that * plane update is executed only after the first vblank
* it is able use uncommitted drm state information. * interrupt. The dispc implementation should be fixed so that
*/ * it is able use uncommitted drm state information.
drm_atomic_helper_commit_modeset_enables(dev, old_state); */
omap_atomic_wait_for_completion(dev, old_state); drm_atomic_helper_commit_modeset_enables(dev, old_state);
omap_atomic_wait_for_completion(dev, old_state);
drm_atomic_helper_commit_planes(dev, old_state, 0);
drm_atomic_helper_commit_planes(dev, old_state, 0);
drm_atomic_helper_commit_hw_done(old_state);
drm_atomic_helper_commit_hw_done(old_state);
} else {
/*
* OMAP3 DSS seems to have issues with the work-around above,
* resulting in endless sync losts if a crtc is enabled without
* a plane. For now, skip the WA for OMAP3.
*/
drm_atomic_helper_commit_planes(dev, old_state, 0);
drm_atomic_helper_commit_modeset_enables(dev, old_state);
drm_atomic_helper_commit_hw_done(old_state);
}
/* /*
* Wait for completion of the page flips to ensure that old buffers * Wait for completion of the page flips to ensure that old buffers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment