Skip to content

Commit fe975d0

Browse files
6by9pelwell
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 <[email protected]>
1 parent 9cc9d43 commit fe975d0

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
@@ -263,6 +263,8 @@ EXPORT_SYMBOL(drm_plane_create_alpha_property);
263263
* "reflect-x"
264264
* DRM_MODE_REFLECT_Y:
265265
* "reflect-y"
266+
* DRM_MODE_TRANSPOSE:
267+
* "transpose"
266268
*
267269
* Rotation is the specified amount in degrees in counter clockwise direction,
268270
* the X and Y axis are within the source rectangle, i.e. the X/Y axis before
@@ -280,6 +282,7 @@ int drm_plane_create_rotation_property(struct drm_plane *plane,
280282
{ __builtin_ffs(DRM_MODE_ROTATE_270) - 1, "rotate-270" },
281283
{ __builtin_ffs(DRM_MODE_REFLECT_X) - 1, "reflect-x" },
282284
{ __builtin_ffs(DRM_MODE_REFLECT_Y) - 1, "reflect-y" },
285+
{ __builtin_ffs(DRM_MODE_TRANSPOSE) - 1, "transpose" },
283286
};
284287
struct drm_property *prop;
285288

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)