drm/i915: Only run commit when crtc is active, v2.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 23 Sep 2015 14:29:38 +0000 (16:29 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 19 Oct 2015 09:38:20 +0000 (11:38 +0200)
The crtc->active guards are no longer needed now that all state
updates are outside the commit.

Changes since v1:
- Only check crtc->state->active before calling commit_planes_on_crtc.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_sprite.c

index 016fab6d12838888119d9c1177875df74be9000c..d5d00e929da25f74f0904e6cd3c9f72b2454f13f 100644 (file)
@@ -13153,7 +13153,8 @@ static int intel_atomic_commit(struct drm_device *dev,
                if (!modeset)
                        intel_pre_plane_update(intel_crtc);
 
-               drm_atomic_helper_commit_planes_on_crtc(crtc_state);
+               if (crtc->state->active)
+                       drm_atomic_helper_commit_planes_on_crtc(crtc_state);
 
                if (put_domains)
                        modeset_put_power_domains(dev_priv, put_domains);
@@ -13471,9 +13472,6 @@ intel_commit_primary_plane(struct drm_plane *plane,
 
        crtc = crtc ? crtc : plane->crtc;
 
-       if (!crtc->state->active)
-               return;
-
        dev_priv->display.update_primary_plane(crtc, fb,
                                               state->src.x1 >> 16,
                                               state->src.y1 >> 16);
@@ -13502,8 +13500,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
                intel_update_watermarks(crtc);
 
        /* Perform vblank evasion around commit operation */
-       if (crtc->state->active)
-               intel_pipe_update_start(intel_crtc);
+       intel_pipe_update_start(intel_crtc);
 
        if (modeset)
                return;
@@ -13519,8 +13516,7 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc,
 {
        struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 
-       if (crtc->state->active)
-               intel_pipe_update_end(intel_crtc);
+       intel_pipe_update_end(intel_crtc);
 }
 
 /**
@@ -13703,8 +13699,7 @@ intel_commit_cursor_plane(struct drm_plane *plane,
        intel_crtc->cursor_bo = obj;
 
 update:
-       if (crtc->state->active)
-               intel_crtc_update_cursor(crtc, state->visible);
+       intel_crtc_update_cursor(crtc, state->visible);
 }
 
 static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
index 56dc132e8e20a092c2f61ce8f1f11d62580294e1..2551335ada040d92b40e62b31a06f9905cc0649c 100644 (file)
@@ -938,9 +938,6 @@ intel_commit_sprite_plane(struct drm_plane *plane,
 
        crtc = crtc ? crtc : plane->crtc;
 
-       if (!crtc->state->active)
-               return;
-
        if (state->visible) {
                intel_plane->update_plane(plane, crtc, fb,
                                          state->dst.x1, state->dst.y1,