Skip to content

Commit fe4c5ef

Browse files
6by9popcornmix
authored andcommitted
drm: Add a DRM_MODE_TRANSPOSE option to the DRM rotation property
Some hardware will implement transpose as a rotation operation, which when combined with X and Y reflect can result in a rotation, but is a discrete operation in its own right. Add an option for transpose only. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 3937e32 commit fe4c5ef

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/drm_blend.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ EXPORT_SYMBOL(drm_plane_create_alpha_property);
269269
* "reflect-x"
270270
* DRM_MODE_REFLECT_Y:
271271
* "reflect-y"
272+
* DRM_MODE_TRANSPOSE:
273+
* "transpose"
272274
*
273275
* Rotation is the specified amount in degrees in counter clockwise direction,
274276
* the X and Y axis are within the source rectangle, i.e. the X/Y axis before
@@ -286,6 +288,7 @@ int drm_plane_create_rotation_property(struct drm_plane *plane,
286288
{ __builtin_ffs(DRM_MODE_ROTATE_270) - 1, "rotate-270" },
287289
{ __builtin_ffs(DRM_MODE_REFLECT_X) - 1, "reflect-x" },
288290
{ __builtin_ffs(DRM_MODE_REFLECT_Y) - 1, "reflect-y" },
291+
{ __builtin_ffs(DRM_MODE_TRANSPOSE) - 1, "transpose" },
289292
};
290293
struct drm_property *prop;
291294

include/uapi/drm/drm_mode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ extern "C" {
203203
*/
204204
#define DRM_MODE_REFLECT_X (1<<4)
205205
#define DRM_MODE_REFLECT_Y (1<<5)
206+
#define DRM_MODE_TRANSPOSE (1<<6)
206207

207208
/*
208209
* DRM_MODE_REFLECT_MASK

0 commit comments

Comments
 (0)