openwrt/target/linux/bcm27xx/patches-6.6/950-1369-drm-Add-a-DRM_MODE_TRANSPOSE-option-to-the-DRM-rotat.patch
Álvaro Fernández Rojas 692205305d bcm27xx: pull 6.6 patches from RPi repo
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.67..HEAD
(HEAD -> 811ff707533bcd67cdcd368bbd46223082009b12)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-12-28 09:06:30 +01:00

48 lines
1.6 KiB
Diff

From b3b3d12cf0734318a0fed0b33e13d714188369db 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