drm/modes: parse_cmdline: Add support for specifying panel_orientation (v2)
authorHans de Goede <hdegoede@redhat.com>
Mon, 18 Nov 2019 15:51:30 +0000 (16:51 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:29 +0000 (16:33 +0100)
commit95ce81438b16103fe5c6fd0b89613a855efafdb9
tree6dec1daf673939528d657dfc2924d2e6db92fe55
parentd847db3c2075d5d65de2b3ae20635f88e798744d
drm/modes: parse_cmdline: Add support for specifying panel_orientation (v2)

Commit 4e7a4a6fbdc669c44e6079f9d5eb25673749455f upstream.

Sometimes we want to override a connector's panel_orientation from the
kernel commandline. Either for testing and for special cases, e.g. a kiosk
like setup which uses a TV mounted in portrait mode.

Users can already specify a "rotate" option through a video= kernel cmdline
option. But that only supports 0/180 degrees (see drm_client_modeset TODO)
and only works for in kernel modeset clients, not for userspace kms users.

The "panel-orientation" connector property OTOH does support 90/270 degrees
as it leaves dealing with the rotation up to userspace and this does work
for userspace kms clients (at least those which support this property).

Changes in v2:
-Add missing ':' after @panel_orientation (reported by kbuild test robot)

BugLink: https://gitlab.freedesktop.org/plymouth/plymouth/merge_requests/83
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-9-hdegoede@redhat.com
Documentation/fb/modedb.rst
drivers/gpu/drm/drm_modes.c
drivers/gpu/drm/selftests/drm_cmdline_selftests.h
drivers/gpu/drm/selftests/test-drm_cmdline_parser.c
include/drm/drm_connector.h