diff options
author | Hans de Goede <j.w.r.degoede@gmail.com> | 2017-11-25 22:35:47 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2017-12-05 01:03:21 +0300 |
commit | c9e6a36492504e35f09c6a53e18ac3f76233365e (patch) | |
tree | 5d8417e24ec33b9b1807442a6713d2bbf981745c /include/linux/fb.h | |
parent | 7b47c66cfa203288c43851260edeeb0fae56f692 (diff) | |
download | linux-c9e6a36492504e35f09c6a53e18ac3f76233365e.tar.xz |
fbcon: Add fbcon_rotate_hint to struct fb_info
On some hardware the LCD panel is not mounted upright in the casing,
but upside-down or rotated 90 degrees. In this case we want the console
to automatically be rotated to compensate.
The fbdev-driver may know about the need to rotate. Add a new
fbcon_rotate_hint field to struct fb_info, which gets initialized to -1.
If the fbdev-driver knows that some sort of rotation is necessary then
it can set this field to a FB_ROTATE_* value to tell the fbcon console
driver to rotate the console.
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-2-hdegoede@redhat.com
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r-- | include/linux/fb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index bc24e48e396d..d1e5bed39140 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -465,6 +465,11 @@ struct fb_info { atomic_t count; int node; int flags; + /* + * -1 by default, set to a FB_ROTATE_* value by the driver, if it knows + * a lcd is not mounted upright and fbcon should rotate to compensate. + */ + int fbcon_rotate_hint; struct mutex lock; /* Lock for open/release/ioctl funcs */ struct mutex mm_lock; /* Lock for fb_mmap and smem_* fields */ struct fb_var_screeninfo var; /* Current var */ |