lede/target/linux/bcm27xx/patches-6.12/950-0529-drm-Add-a-DRM_MODE_TRANSPOSE-option-to-the-DRM-rotat.patch
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= d81c03f05e bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-20 17:01:06 +08:00

48 lines
1.6 KiB
Diff

From 4b040e91035e62cfb802161d7e27e74123a95954 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] 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