diff options
author | Hans de Goede <j.w.r.degoede@gmail.com> | 2017-11-25 22:35:48 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2017-12-05 01:03:21 +0300 |
commit | 404d1a3edc3873b339198ec3f3d6a09be2ddda4f (patch) | |
tree | c82f5a6d456b3eb6a7f62e2e92450fa5ecbaeb1c /include/drm/drm_utils.h | |
parent | c9e6a36492504e35f09c6a53e18ac3f76233365e (diff) | |
download | linux-404d1a3edc3873b339198ec3f3d6a09be2ddda4f.tar.xz |
drm: Add panel orientation quirks, v6.
Some x86 clamshell design devices use portrait tablet screens and a display
engine which cannot rotate in hardware, so the firmware just leaves things
as is and we cannot figure out that the display is oriented non upright
from the hardware.
So at least on x86, we need a quirk table for this. This commit adds a DMI
based quirk table which is initially populated with 5 such devices: Asus
T100HA, GPD Pocket, GPD win, I.T.Works TW891 and the VIOS LTH17.
This quirk table will be used by the drm code to let userspace know that
the display is not mounted upright inside the devices case through a new
panel orientation drm-connector property, as well as to tell fbcon to
rotate the console so that it shows the right way up.
Changes in v5:
-Add a kernel-doc comment documenting drm_get_panel_orientation_quirk()
-Remove board_* matches from the dmi-matches for the VIOS LTH17 laptop,
keeping only the (identical) sys_vendor and product_name matches.
This is necessary because an older version of the bios has
board_vendor set to VOIS instead of VIOS
Changes in v6:
-Add reference to added kernel-docs in Documentation/gpu/drm-kms-helpers.rst
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-3-hdegoede@redhat.com
Diffstat (limited to 'include/drm/drm_utils.h')
-rw-r--r-- | include/drm/drm_utils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/drm_utils.h b/include/drm/drm_utils.h new file mode 100644 index 000000000000..a803988d8579 --- /dev/null +++ b/include/drm/drm_utils.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Function prototypes for misc. drm utility functions. + * Specifically this file is for function prototypes for functions which + * may also be used outside of drm code (e.g. in fbdev drivers). + * + * Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com> + */ + +#ifndef __DRM_UTILS_H__ +#define __DRM_UTILS_H__ + +int drm_get_panel_orientation_quirk(int width, int height); + +#endif |