summaryrefslogtreecommitdiff
path: root/include/drm/drm_blend.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2016-09-26 19:30:46 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-10-21 19:21:33 +0300
commitbd2ef25d921c0d937e4bc4f5a4f98f534424c6aa (patch)
tree79890cbbe96fd0d494c5240d64e0c47b24850d77 /include/drm/drm_blend.h
parent30cd85dd6edc86ea8d8589efb813f1fad41ef233 (diff)
downloadlinux-bd2ef25d921c0d937e4bc4f5a4f98f534424c6aa.tar.xz
drm: Add drm_rotation_90_or_270()
We have intel_rotation_90_or_270() in i915 to check if the rotation is 90 or 270 degrees. Similar checks are elsewhere in drm, so let's move the helper into a central place and use it everwhere. v2: Drop the BIT() Convert all new intel_rotation_90_or_270() calls Deal with superfluous code shuffling Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1) Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1474907460-10717-2-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to 'include/drm/drm_blend.h')
-rw-r--r--include/drm/drm_blend.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_blend.h b/include/drm/drm_blend.h
index 36baa175de99..bb493410396c 100644
--- a/include/drm/drm_blend.h
+++ b/include/drm/drm_blend.h
@@ -47,6 +47,11 @@ struct drm_atomic_state;
#define DRM_REFLECT_Y BIT(5)
#define DRM_REFLECT_MASK (DRM_REFLECT_X | DRM_REFLECT_Y)
+static inline bool drm_rotation_90_or_270(unsigned int rotation)
+{
+ return rotation & (DRM_ROTATE_90 | DRM_ROTATE_270);
+}
+
struct drm_property *drm_mode_create_rotation_property(struct drm_device *dev,
unsigned int supported_rotations);
unsigned int drm_rotation_simplify(unsigned int rotation,