diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-11-14 19:53:58 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-11-14 20:57:42 +0300 |
commit | f22aa14352cc6f40fdb81cdb2e4f4f9d75613a37 (patch) | |
tree | 02d47d890733b45ec600efc322bbe214cdf42419 /drivers/gpu/drm/i915/intel_sprite.c | |
parent | 5697d60f6e56f90e191d00579307eba044d061a4 (diff) | |
download | linux-f22aa14352cc6f40fdb81cdb2e4f4f9d75613a37.tar.xz |
drm/i915: Use & instead if == to check for rotations
Using == to check for 180 degree rotation only works as long as the
reflection bits aren't set. That will change soon enough for CHV, so
let's stop doing things the wrong way.
v2: Drop the BIT()
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479142440-25283-2-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 5e4eb7cafef0..ea85d27af217 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -436,7 +436,7 @@ vlv_update_plane(struct drm_plane *dplane, intel_add_fb_offsets(&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; @@ -566,7 +566,7 @@ ivb_update_plane(struct drm_plane *plane, intel_add_fb_offsets(&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 |= SPRITE_ROTATE_180; /* HSW and BDW does this automagically in hardware */ @@ -700,7 +700,7 @@ ilk_update_plane(struct drm_plane *plane, intel_add_fb_offsets(&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; |