drm_rotation_simplify(9) 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 <[email protected]>
Intel Corporation,         
        

Initial version

Laurent Pinchart <[email protected]>
Ideas on board SPRL,         
        

Driver internals

Daniel Vetter <[email protected]>
Intel Corporation,         
        

Contributions all over the place

Lukas Wunner <[email protected]>

vga_switcheroo documentation

COPYRIGHT