diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-09-11 00:07:19 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-09-13 23:20:54 +0200 |
commit | 216c59d65f99aa1ef1a92e1ae64f1f1c2590dddc (patch) | |
tree | 5ff49bb6eb7e68fb7079f213e339e8da2bc11c21 /drivers/gpu/drm/drm_atomic_helper.c | |
parent | c86fb9d997428e0d55ab5a47488b6ba3bc4b5c5b (diff) | |
download | op-kernel-dev-216c59d65f99aa1ef1a92e1ae64f1f1c2590dddc.zip op-kernel-dev-216c59d65f99aa1ef1a92e1ae64f1f1c2590dddc.tar.gz |
drm/atomic-helper: Don't skip plane disabling on active CRTC
Since commit "drm/atomic-helper: Add option to update planes only on
active crtc" the drm_atomic_helper_commit_planes() function accepts an
active_only argument to skip updating planes when the associated CRTC is
inactive. Planes being disabled on an active CRTC are incorrectly
considered as associated with an inactive CRTC and are thus skipped,
preventing any plane disabling update from reaching drivers.
Fix it by checking the state of the CRTC stored in the old plane state
for planes being disabled.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 9941167..94d6c8e 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1227,23 +1227,35 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev, for_each_plane_in_state(old_state, plane, old_plane_state, i) { const struct drm_plane_helper_funcs *funcs; + bool disabling; funcs = plane->helper_private; if (!funcs) continue; - if (active_only && !plane_crtc_active(plane->state)) - continue; + disabling = drm_atomic_plane_disabling(plane, old_plane_state); + + if (active_only) { + /* + * Skip planes related to inactive CRTCs. If the plane + * is enabled use the state of the current CRTC. If the + * plane is being disabled use the state of the old + * CRTC to avoid skipping planes being disabled on an + * active CRTC. + */ + if (!disabling && !plane_crtc_active(plane->state)) + continue; + if (disabling && !plane_crtc_active(old_plane_state)) + continue; + } /* * Special-case disabling the plane if drivers support it. */ - if (drm_atomic_plane_disabling(plane, old_plane_state) && - funcs->atomic_disable) + if (disabling && funcs->atomic_disable) funcs->atomic_disable(plane, old_plane_state); - else if (plane->state->crtc || - drm_atomic_plane_disabling(plane, old_plane_state)) + else if (plane->state->crtc || disabling) funcs->atomic_update(plane, old_plane_state); } |