OSDN Git Service

drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
authorHans de Goede <hdegoede@redhat.com>
Mon, 21 Feb 2022 22:00:45 +0000 (23:00 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 23 Feb 2022 12:17:50 +0000 (13:17 +0100)
commit94fa115f7b28a3f02611499175e134f0a823b686
tree4789b729e176a2d04e6ab930af26c90b327e4abd
parentf915686bd97a9c234602426e6d132b74a112a8d6
drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels

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
drivers/gpu/drm/tiny/simpledrm.c