drm/i915: remove !enabled handling from commit primary plane step
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 9 Sep 2014 14:43:19 +0000 (11:43 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 19 Sep 2014 12:43:07 +0000 (14:43 +0200)
The !crtc->enabled case will now be handled by the !visible code,
since the handling is basically the same.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
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

index fc1844d7076fe52150e074c858d985b15f15e147..870555b3ccf76247ccadc0e1f19677ffd255a90c 100644 (file)
@@ -11838,32 +11838,6 @@ intel_commit_primary_plane(struct drm_plane *plane,
        struct drm_rect *src = &state->src;
        int ret;
 
-       /*
-        * If the CRTC isn't enabled, we're just pinning the framebuffer,
-        * updating the fb pointer, and returning without touching the
-        * hardware.  This allows us to later do a drmModeSetCrtc with fb=-1 to
-        * turn on the display with all planes setup as desired.
-        */
-       if (!crtc->enabled) {
-               mutex_lock(&dev->struct_mutex);
-
-               /*
-                * If we already called setplane while the crtc was disabled,
-                * we may have an fb pinned; unpin it.
-                */
-               if (plane->fb)
-                       intel_unpin_fb_obj(old_obj);
-
-               i915_gem_track_fb(old_obj, obj,
-                                 INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe));
-
-               /* Pin and return without programming hardware */
-               ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
-               mutex_unlock(&dev->struct_mutex);
-
-               return ret;
-       }
-
        intel_crtc_wait_for_pending_flips(crtc);
 
        /*