]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/i915/intel_sprite.c
Merge tag 'drm-intel-next-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel...
[karo-tx-linux.git] / drivers / gpu / drm / i915 / intel_sprite.c
index 9dfd5b343497cdd50f96130149893463ab3ef7e8..c4bf19364e490c9358780b7d8872d681773aed69 100644 (file)
@@ -198,12 +198,15 @@ void intel_pipe_update_end(struct intel_crtc *crtc, struct intel_flip_work *work
                          ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
                          crtc->debug.min_vbl, crtc->debug.max_vbl,
                          crtc->debug.scanline_start, scanline_end);
-       } else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
-                  VBLANK_EVASION_TIME_US)
+       }
+#ifdef CONFIG_DRM_I915_DEBUG_VBLANK_EVADE
+       else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
+                VBLANK_EVASION_TIME_US)
                DRM_WARN("Atomic update on pipe (%c) took %lld us, max time under evasion is %u us\n",
                         pipe_name(pipe),
                         ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
                         VBLANK_EVASION_TIME_US);
+#endif
 }
 
 static void
@@ -391,10 +394,10 @@ static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
        if (fb->modifier == I915_FORMAT_MOD_X_TILED)
                sprctl |= SP_TILED;
 
-       if (rotation & DRM_ROTATE_180)
+       if (rotation & DRM_MODE_ROTATE_180)
                sprctl |= SP_ROTATE_180;
 
-       if (rotation & DRM_REFLECT_X)
+       if (rotation & DRM_MODE_REFLECT_X)
                sprctl |= SP_MIRROR;
 
        if (key->flags & I915_SET_COLORKEY_SOURCE)
@@ -522,7 +525,7 @@ static u32 ivb_sprite_ctl(const struct intel_crtc_state *crtc_state,
        if (fb->modifier == I915_FORMAT_MOD_X_TILED)
                sprctl |= SPRITE_TILED;
 
-       if (rotation & DRM_ROTATE_180)
+       if (rotation & DRM_MODE_ROTATE_180)
                sprctl |= SPRITE_ROTATE_180;
 
        if (key->flags & I915_SET_COLORKEY_DESTINATION)
@@ -659,7 +662,7 @@ static u32 g4x_sprite_ctl(const struct intel_crtc_state *crtc_state,
        if (fb->modifier == I915_FORMAT_MOD_X_TILED)
                dvscntr |= DVS_TILED;
 
-       if (rotation & DRM_ROTATE_180)
+       if (rotation & DRM_MODE_ROTATE_180)
                dvscntr |= DVS_ROTATE_180;
 
        if (key->flags & I915_SET_COLORKEY_DESTINATION)
@@ -1124,15 +1127,15 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
 
        if (INTEL_GEN(dev_priv) >= 9) {
                supported_rotations =
-                       DRM_ROTATE_0 | DRM_ROTATE_90 |
-                       DRM_ROTATE_180 | DRM_ROTATE_270;
+                       DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
+                       DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270;
        } else if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B) {
                supported_rotations =
-                       DRM_ROTATE_0 | DRM_ROTATE_180 |
-                       DRM_REFLECT_X;
+                       DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180 |
+                       DRM_MODE_REFLECT_X;
        } else {
                supported_rotations =
-                       DRM_ROTATE_0 | DRM_ROTATE_180;
+                       DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;
        }
 
        intel_plane->pipe = pipe;
@@ -1159,7 +1162,7 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
                goto fail;
 
        drm_plane_create_rotation_property(&intel_plane->base,
-                                          DRM_ROTATE_0,
+                                          DRM_MODE_ROTATE_0,
                                           supported_rotations);
 
        drm_plane_helper_add(&intel_plane->base, &intel_plane_helper_funcs);