libgfxinit: Allow to configure screen rotation
This allows to configure a default screen rotation in 90-degree steps. The framebuffer contents will then be displayed rotated, by the same amount in the other direction; i.e. if you turn the screen to the left, the picture has to be rotated to the right to accommodate. This is only supported by libgfxinit from Skylake / Apollo Lake on (earlier GPUs didn't support the 90-degree steps anyway) and it only works with the linear-framebuffer option. Change-Id: Iac75cefbd34f28c55ec20ee152fe67351cc48653 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38922 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
ec7e41dd75
commit
520f20ef52
2 changed files with 59 additions and 4 deletions
|
|
@ -519,6 +519,39 @@ config LINEAR_FRAMEBUFFER_MAX_HEIGHT
|
|||
Set the maximum height of the framebuffer. This may help with
|
||||
default fonts too tiny for high-resolution displays.
|
||||
|
||||
choice DEFAULT_SCREEN_ROTATION
|
||||
prompt "Default screen orientation"
|
||||
depends on LINEAR_FRAMEBUFFER && MAINBOARD_USE_LIBGFXINIT
|
||||
depends on GFX_GMA_GENERATION = "Broxton" || GFX_GMA_GENERATION = "Skylake"
|
||||
default DEFAULT_SCREEN_ROTATION_NONE
|
||||
help
|
||||
This allows to configure how the physical screen is mounted in
|
||||
90 degree steps (counter-clockwise). The framebuffer contents
|
||||
will then be displayed rotated by the same amount in the other
|
||||
direction; i.e. if you turn the screen to the left, the picture
|
||||
has to be rotated to the right to accommodate.
|
||||
|
||||
config DEFAULT_SCREEN_ROTATION_NONE
|
||||
bool "Non-rotated"
|
||||
|
||||
config DEFAULT_SCREEN_ROTATION_90
|
||||
bool "Rotated 90 degrees (rotate framebuffer to the right)"
|
||||
|
||||
config DEFAULT_SCREEN_ROTATION_180
|
||||
bool "Rotated 180 degrees"
|
||||
|
||||
config DEFAULT_SCREEN_ROTATION_270
|
||||
bool "Rotated 270 degrees (rotate framebuffer to the left)"
|
||||
|
||||
endchoice
|
||||
|
||||
config DEFAULT_SCREEN_ROTATION_INT
|
||||
int
|
||||
default 90 if DEFAULT_SCREEN_ROTATION_90
|
||||
default 180 if DEFAULT_SCREEN_ROTATION_180
|
||||
default 270 if DEFAULT_SCREEN_ROTATION_270
|
||||
default 0
|
||||
|
||||
endmenu # "Display"
|
||||
|
||||
config PCI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue