DRM_ROTATION_SIMPLIF(9)

NAME
drm_rotation_simplify - Try to simplify the rotation

SYNOPSIS

unsigned int drm_rotation_simplify(unsigned int rotation, unsigned int supported_rotations);

ARGUMENTS

rotation
    Rotation to be simplified

supported_rotations
    Supported rotations

DESCRIPTION

Attempt to simplify the rotation to a form that is supported. Eg. if the hardware supports everything except DRM_REFLECT_X

ONE COULD CALL THIS FUNCTION LIKE THIS

drm_rotation_simplify(rotation, BIT(DRM_ROTATE_0) | BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_180) | BIT(DRM_ROTATE_270) | BIT(DRM_REFLECT_Y));

to eliminate the DRM_ROTATE_X flag. Depending on what kind of transforms the hardware supports, this function may not be able to produce a supported transform, so the caller should check the result afterwards.

AUTHORS

Jesse Barnes <jesse.barnes@intel.com>
Intel Corporation,

    Initial version

Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Ideas on board SPRL,

    Driver internals

Daniel Vetter <daniel.vetter@ffwll.ch>
Intel Corporation,

    Contributions all over the place

COPYRIGHT