From: Daniel Vetter Date: Fri, 10 Apr 2015 14:22:39 +0000 (+0200) Subject: drm/atomic-helper: Don't call atomic_update_plane when it stays off X-Git-Tag: firefly_0821_release~176^2~1470^2~60^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=475d231be9bae4b997eb7e5a9a3cb214259cf90a;p=firefly-linux-kernel-4.4.55.git drm/atomic-helper: Don't call atomic_update_plane when it stays off It's a silly thing to do and surprises driver writers. Most likely this did already blow up for exynos. It's also a silly thing to change plane state when it's off, but fbdev is silly (it does an unconditional modeset over all planes). And userspace can be evil. So I think we need this. With this check in the helpers we can remove the one in i915 code for the same conditions (becuase ->crtc iff ->fb). Cc: Gustavo Padovan Cc: dri-devel@lists.freedesktop.org Cc: Inki Dae Cc: Matt Roper Acked-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index a2fb0d45217a..d536817699c1 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1138,7 +1138,8 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev, if (drm_atomic_plane_disabling(plane, old_plane_state) && funcs->atomic_disable) funcs->atomic_disable(plane, old_plane_state); - else + else if (plane->state->crtc || + drm_atomic_plane_disabling(plane, old_plane_state)) funcs->atomic_update(plane, old_plane_state); } diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c index 976b89156570..cb383a0fc392 100644 --- a/drivers/gpu/drm/i915/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c @@ -172,10 +172,6 @@ static void intel_plane_atomic_update(struct drm_plane *plane, struct intel_plane_state *intel_state = to_intel_plane_state(plane->state); - /* Don't disable an already disabled plane */ - if (!plane->state->fb && !old_state->fb) - return; - intel_plane->commit_plane(plane, intel_state); }