|
@@ -427,6 +427,9 @@ vlv_update_plane(struct drm_plane *dplane,
|
|
if (fb->modifier[0] == I915_FORMAT_MOD_X_TILED)
|
|
if (fb->modifier[0] == I915_FORMAT_MOD_X_TILED)
|
|
sprctl |= SP_TILED;
|
|
sprctl |= SP_TILED;
|
|
|
|
|
|
|
|
+ if (rotation & DRM_ROTATE_180)
|
|
|
|
+ sprctl |= SP_ROTATE_180;
|
|
|
|
+
|
|
/* Sizes are 0 based */
|
|
/* Sizes are 0 based */
|
|
src_w--;
|
|
src_w--;
|
|
src_h--;
|
|
src_h--;
|
|
@@ -437,8 +440,6 @@ vlv_update_plane(struct drm_plane *dplane,
|
|
sprsurf_offset = intel_compute_tile_offset(&x, &y, plane_state, 0);
|
|
sprsurf_offset = intel_compute_tile_offset(&x, &y, plane_state, 0);
|
|
|
|
|
|
if (rotation & DRM_ROTATE_180) {
|
|
if (rotation & DRM_ROTATE_180) {
|
|
- sprctl |= SP_ROTATE_180;
|
|
|
|
-
|
|
|
|
x += src_w;
|
|
x += src_w;
|
|
y += src_h;
|
|
y += src_h;
|
|
}
|
|
}
|
|
@@ -546,6 +547,9 @@ ivb_update_plane(struct drm_plane *plane,
|
|
if (fb->modifier[0] == I915_FORMAT_MOD_X_TILED)
|
|
if (fb->modifier[0] == I915_FORMAT_MOD_X_TILED)
|
|
sprctl |= SPRITE_TILED;
|
|
sprctl |= SPRITE_TILED;
|
|
|
|
|
|
|
|
+ if (rotation & DRM_ROTATE_180)
|
|
|
|
+ sprctl |= SPRITE_ROTATE_180;
|
|
|
|
+
|
|
if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
|
|
if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
|
|
sprctl &= ~SPRITE_TRICKLE_FEED_DISABLE;
|
|
sprctl &= ~SPRITE_TRICKLE_FEED_DISABLE;
|
|
else
|
|
else
|
|
@@ -566,14 +570,11 @@ ivb_update_plane(struct drm_plane *plane,
|
|
intel_add_fb_offsets(&x, &y, plane_state, 0);
|
|
intel_add_fb_offsets(&x, &y, plane_state, 0);
|
|
sprsurf_offset = intel_compute_tile_offset(&x, &y, plane_state, 0);
|
|
sprsurf_offset = intel_compute_tile_offset(&x, &y, plane_state, 0);
|
|
|
|
|
|
- if (rotation & DRM_ROTATE_180) {
|
|
|
|
- sprctl |= SPRITE_ROTATE_180;
|
|
|
|
-
|
|
|
|
- /* HSW and BDW does this automagically in hardware */
|
|
|
|
- if (!IS_HASWELL(dev_priv) && !IS_BROADWELL(dev_priv)) {
|
|
|
|
- x += src_w;
|
|
|
|
- y += src_h;
|
|
|
|
- }
|
|
|
|
|
|
+ /* HSW+ does this automagically in hardware */
|
|
|
|
+ if (!IS_HASWELL(dev_priv) && !IS_BROADWELL(dev_priv) &&
|
|
|
|
+ rotation & DRM_ROTATE_180) {
|
|
|
|
+ x += src_w;
|
|
|
|
+ y += src_h;
|
|
}
|
|
}
|
|
|
|
|
|
linear_offset = intel_fb_xy_to_linear(x, y, plane_state, 0);
|
|
linear_offset = intel_fb_xy_to_linear(x, y, plane_state, 0);
|
|
@@ -684,6 +685,9 @@ ilk_update_plane(struct drm_plane *plane,
|
|
if (fb->modifier[0] == I915_FORMAT_MOD_X_TILED)
|
|
if (fb->modifier[0] == I915_FORMAT_MOD_X_TILED)
|
|
dvscntr |= DVS_TILED;
|
|
dvscntr |= DVS_TILED;
|
|
|
|
|
|
|
|
+ if (rotation & DRM_ROTATE_180)
|
|
|
|
+ dvscntr |= DVS_ROTATE_180;
|
|
|
|
+
|
|
if (IS_GEN6(dev_priv))
|
|
if (IS_GEN6(dev_priv))
|
|
dvscntr |= DVS_TRICKLE_FEED_DISABLE; /* must disable */
|
|
dvscntr |= DVS_TRICKLE_FEED_DISABLE; /* must disable */
|
|
|
|
|
|
@@ -701,8 +705,6 @@ ilk_update_plane(struct drm_plane *plane,
|
|
dvssurf_offset = intel_compute_tile_offset(&x, &y, plane_state, 0);
|
|
dvssurf_offset = intel_compute_tile_offset(&x, &y, plane_state, 0);
|
|
|
|
|
|
if (rotation & DRM_ROTATE_180) {
|
|
if (rotation & DRM_ROTATE_180) {
|
|
- dvscntr |= DVS_ROTATE_180;
|
|
|
|
-
|
|
|
|
x += src_w;
|
|
x += src_w;
|
|
y += src_h;
|
|
y += src_h;
|
|
}
|
|
}
|