drm_rotation_simplify(9)
okay so bestie, welcome to the drm_rotation_simplify(9) page from the Kernel API Manual β manual name folded in right here like a lil ribbon π. This one is all about taking a rotation and trying to simplify it into a form the hardware actually supports, and it is lowkey iconic for that. π
πΈ NAME πΈ
drm_rotation_simplifyβ Try to simplify the rotation β¨
β¨ SYNOPSIS β¨
hereβs the signature, copied exactly so nobody comes for me:
unsigned int drm_rotation_simplify (unsigned int rotation , unsigned int
supported_rotations );
π ARGUMENTS π
rotationβ Rotation to be simplified. Thatβs the one youβre trying to glow-up. πsupported_rotationsβ Supported rotations. The set your hardware can actually serve. π
π¦ DESCRIPTION π¦
Attempt to simplify the rotation to a form that is supported. e.g. if the hardware supports everything except DRM_MODE_REFLECT_X, one could call this function like this:
drm_rotation_simplify(rotation, DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270 | DRM_MODE_REFLECT_Y);
to eliminate the DRM_MODE_REFLECT_X flag. So yeah, itβs giving βmake it fit the supported listβ energy. π
β οΈ important bestie: 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. No cap, check that result. π
π₯ SEE ALSO π₯
the whole squad of related kernel docs, fr fr:
Kernel file ./drivers/gpu/drm/drm_blend.c overview(9)drm_plane_create_alpha_property(9)drm_plane_create_rotation_property(9)drm_plane_create_zpos_property(9)drm_plane_create_zpos_immutable_property(9)drm_atomic_normalize_zpos(9)drm_plane_create_blend_mode_property(9)drm_crtc_attach_background_color_property(9)
later, bestie π«Ά β source/version: ./drivers/gpu/drm; date: October 2026. drm_rotation_simplify(9) out. πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms