1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00
openmptcprouter/6.12/target/linux/bcm27xx/patches-6.12/950-0531-drm-Add-a-DRM_MODE_TRANSPOSE-option-to-the-DRM-rotat.patch
Ycarus (Yannick Chabanois) bdb9b0046f Add bcm27xx 6.12 test support
2024-12-20 14:17:26 +01:00

47 lines
1.6 KiB
Diff

From 13773d71a079a52a5847144d7a59ce072ceaa575 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Tue, 22 Oct 2024 17:17:31 +0100
Subject: [PATCH 531/697] 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>
---
drivers/gpu/drm/drm_blend.c | 3 +++
include/uapi/drm/drm_mode.h | 1 +
2 files changed, 4 insertions(+)
--- a/drivers/gpu/drm/drm_blend.c
+++ b/drivers/gpu/drm/drm_blend.c
@@ -263,6 +263,8 @@ EXPORT_SYMBOL(drm_plane_create_alpha_pro
* "reflect-x"
* DRM_MODE_REFLECT_Y:
* "reflect-y"
+ * DRM_MODE_TRANSPOSE:
+ * "transpose"
*
* Rotation is the specified amount in degrees in counter clockwise direction,
* 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(s
{ __builtin_ffs(DRM_MODE_ROTATE_270) - 1, "rotate-270" },
{ __builtin_ffs(DRM_MODE_REFLECT_X) - 1, "reflect-x" },
{ __builtin_ffs(DRM_MODE_REFLECT_Y) - 1, "reflect-y" },
+ { __builtin_ffs(DRM_MODE_TRANSPOSE) - 1, "transpose" },
};
struct drm_property *prop;
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -203,6 +203,7 @@ extern "C" {
*/
#define DRM_MODE_REFLECT_X (1<<4)
#define DRM_MODE_REFLECT_Y (1<<5)
+#define DRM_MODE_TRANSPOSE (1<<6)
/*
* DRM_MODE_REFLECT_MASK