mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-17 09:16:59 +08:00

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>
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From 99399fefab6c124d81b8e91e3f761369ff867d97 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Tue, 1 Feb 2022 12:20:20 +0000
|
|
Subject: [PATCH] drm/panel: Add and initialise an orientation field to
|
|
drm_panel from OF
|
|
|
|
"rotation" is listed as a standard property of panels in panel-common.yaml,
|
|
therefore it would be logical to process that from within the core
|
|
code should a panel driver not implement the get_orientation hook.
|
|
|
|
Call of_drm_get_panel_orientation from
|
|
drm_connector_set_orientation_from_panel to get that information.
|
|
|
|
This removes the need for any boiler-plate in panel drivers for calling
|
|
drm_connector_set_orientation_from_panel or
|
|
drm_connector_set_panel_orientation.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/drm_connector.c | 9 +++++++--
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/drm_connector.c
|
|
+++ b/drivers/gpu/drm/drm_connector.c
|
|
@@ -2965,10 +2965,15 @@ int drm_connector_set_orientation_from_p
|
|
{
|
|
enum drm_panel_orientation orientation;
|
|
|
|
- if (panel && panel->funcs && panel->funcs->get_orientation)
|
|
+ if (panel && panel->funcs && panel->funcs->get_orientation) {
|
|
orientation = panel->funcs->get_orientation(panel);
|
|
- else
|
|
+ } else {
|
|
orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
|
|
+ if (panel) {
|
|
+ of_drm_get_panel_orientation(panel->dev->of_node,
|
|
+ &orientation);
|
|
+ }
|
|
+ }
|
|
|
|
return drm_connector_set_panel_orientation(connector, orientation);
|
|
}
|