]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.17-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Apr 2022 11:01:36 +0000 (13:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Apr 2022 11:01:36 +0000 (13:01 +0200)
added patches:
drm-simpledrm-add-panel-orientation-property-on-non-upright-mounted-lcd-panels.patch

queue-5.17/drm-simpledrm-add-panel-orientation-property-on-non-upright-mounted-lcd-panels.patch [new file with mode: 0644]
queue-5.17/series

diff --git a/queue-5.17/drm-simpledrm-add-panel-orientation-property-on-non-upright-mounted-lcd-panels.patch b/queue-5.17/drm-simpledrm-add-panel-orientation-property-on-non-upright-mounted-lcd-panels.patch
new file mode 100644 (file)
index 0000000..18e34e9
--- /dev/null
@@ -0,0 +1,42 @@
+From 94fa115f7b28a3f02611499175e134f0a823b686 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 21 Feb 2022 23:00:45 +0100
+Subject: drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 94fa115f7b28a3f02611499175e134f0a823b686 upstream.
+
+Some devices use e.g. a portrait panel in a standard laptop casing made
+for landscape panels. efifb calls drm_get_panel_orientation_quirk() and
+sets fb_info.fbcon_rotate_hint to make fbcon rotate the console so that
+it shows up-right instead of on its side.
+
+When switching to simpledrm the fbcon renders on its side. Call the
+drm_connector_set_panel_orientation_with_quirk() helper to add
+a "panel orientation" property on devices listed in the quirk table,
+to make the fbcon (and aware userspace apps) rotate the image to
+display properly.
+
+Cc: Javier Martinez Canillas <javierm@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+Link: https://patchwork.freedesktop.org/patch/msgid/20220221220045.11958-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/tiny/simpledrm.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/gpu/drm/tiny/simpledrm.c
++++ b/drivers/gpu/drm/tiny/simpledrm.c
+@@ -798,6 +798,9 @@ static int simpledrm_device_init_modeset
+       if (ret)
+               return ret;
+       drm_connector_helper_add(connector, &simpledrm_connector_helper_funcs);
++      drm_connector_set_panel_orientation_with_quirk(connector,
++                                                     DRM_MODE_PANEL_ORIENTATION_UNKNOWN,
++                                                     mode->hdisplay, mode->vdisplay);
+       formats = simpledrm_device_formats(sdev, &nformats);
index 18fff1f5ea0bc4e2f4780ddb5118d6ee285f9aee..773df2de6336d54545b5d584272afd75c8a16924 100644 (file)
@@ -101,3 +101,4 @@ rtc-mc146818-lib-fix-locking-in-mc146818_set_time.patch
 rtc-pl031-fix-rtc-features-null-pointer-dereference.patch
 io_uring-ensure-that-fsnotify-is-always-called.patch
 ocfs2-fix-crash-when-mount-with-quota-enabled.patch
+drm-simpledrm-add-panel-orientation-property-on-non-upright-mounted-lcd-panels.patch