]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/i915/intel_atomic_plane.c
Merge remote-tracking branch 'sound/for-next'
[karo-tx-linux.git] / drivers / gpu / drm / i915 / intel_atomic_plane.c
index c6bb0fc1edfb57280c37972e656c1eb6f04c0990..e0b851a0004abd3dc2dde47e9b7af90e5a177510 100644 (file)
@@ -152,9 +152,9 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
        intel_state->clip.x1 = 0;
        intel_state->clip.y1 = 0;
        intel_state->clip.x2 =
-               crtc_state->base.active ? crtc_state->pipe_src_w : 0;
+               crtc_state->base.enable ? crtc_state->pipe_src_w : 0;
        intel_state->clip.y2 =
-               crtc_state->base.active ? crtc_state->pipe_src_h : 0;
+               crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
 
        if (state->fb && intel_rotation_90_or_270(state->rotation)) {
                if (!(state->fb->modifier[0] == I915_FORMAT_MOD_Y_TILED ||
@@ -194,8 +194,16 @@ static void intel_plane_atomic_update(struct drm_plane *plane,
        struct intel_plane *intel_plane = to_intel_plane(plane);
        struct intel_plane_state *intel_state =
                to_intel_plane_state(plane->state);
+       struct drm_crtc *crtc = plane->state->crtc ?: old_state->crtc;
+       struct drm_crtc_state *crtc_state =
+               drm_atomic_get_existing_crtc_state(old_state->state, crtc);
 
-       intel_plane->commit_plane(plane, intel_state);
+       if (intel_state->visible)
+               intel_plane->update_plane(plane,
+                                         to_intel_crtc_state(crtc_state),
+                                         intel_state);
+       else
+               intel_plane->disable_plane(plane, crtc);
 }
 
 const struct drm_plane_helper_funcs intel_plane_helper_funcs = {