Home | History | Annotate | Download | only in drm

Lines Matching refs:rotation

106  * rotation:
107 * Rotation is set up with drm_plane_create_rotation_property(). It adds a
108 * rotation and reflection step between the source and destination rectangles.
229 * drm_plane_create_rotation_property - create a new rotation property
231 * @rotation: initial value of the rotation property
236 * Since a rotation by 180° degress is the same as reflecting both along the x
237 * and the y axis the rotation property is somewhat redundant. Drivers can use
241 * drm_property_create_bitmask()) called "rotation" and has the following
257 * Rotation is the specified amount in degrees in counter clockwise direction,
259 * rotation. After reflection, the rotation is applied to the image sampled from
263 unsigned int rotation,
277 WARN_ON(!is_power_of_2(rotation & DRM_MODE_ROTATE_MASK));
278 WARN_ON(rotation & ~supported_rotations);
280 prop = drm_property_create_bitmask(plane->dev, 0, "rotation",
286 drm_object_attach_property(&plane->base, prop, rotation);
289 plane->state->rotation = rotation;
298 * drm_rotation_simplify() - Try to simplify the rotation
299 * @rotation: Rotation to be simplified
302 * Attempt to simplify the rotation to a form that is supported.
306 * drm_rotation_simplify(rotation, DRM_MODE_ROTATE_0 |
315 unsigned int drm_rotation_simplify(unsigned int rotation,
318 if (rotation & ~supported_rotations) {
319 rotation ^= DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y;
320 rotation = (rotation & DRM_MODE_REFLECT_MASK) |
321 BIT((ffs(rotation & DRM_MODE_ROTATE_MASK) + 1)
325 return rotation;