diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-07-25 17:40:36 +0200 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-08-10 16:05:56 +0000 |
commit | d7dcc44eb97dcf99093e64b887b9dc2296a31d21 (patch) | |
tree | 77f6a0ea002cf32df5a5dc0f846d9949e3b28733 /src/drivers/lenovo/hybrid_graphics/hybrid_graphics.h | |
parent | 0c67a66d23428151686ec25d046c4353dbdec91a (diff) |
drvs/lenovo/hybrid_graphics: Add new hybrid graphics driver
Introduce a chip_driver that uses devicetree instead of Kconfig.
The new driver has the following advantages:
* No more wasted IGD GFX stolen memory
* Can be used by T500 series
* Is even run on devices that do not have a dGPU installed
* Can disable unused PEG port on devices without dGPU (and save power)
* Use devicetree instead of Kconfig options
* Support for multiple hybrid GPIO active levels
* Support for backlight control GPIO
* Support for _ROM on Optimus capable devices
The driver is split into romstage part and ramstage part.
Every mainboard has to call the driver in romstage to get the requested
GPU state. The mainboard code then has to toggle GPU power or disable
the IGD or PEG port.
The ramstage part does handle the hygrid graphics GPIO, including
optional backlight mux GPIO. Every GPIO can have it's own active level,
as defined in devicetree. Devices are no longer disabled in ramstage.
The existing hybrid graphics driver does the same configuration and
should not interfere with this commit until it has been removed.
Change-Id: Ie467f9a18b35ab3b8a523dbf51c5575db5b374a5
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/drivers/lenovo/hybrid_graphics/hybrid_graphics.h')
-rw-r--r-- | src/drivers/lenovo/hybrid_graphics/hybrid_graphics.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.h b/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.h new file mode 100644 index 0000000000..b238440caa --- /dev/null +++ b/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.h @@ -0,0 +1,21 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2017 Patrick Rudolph <siro@das-labor.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _DRIVERS_LENOVO_HYBRID_GRAPHICS_H_ +#define _DRIVERS_LENOVO_HYBRID_GRAPHICS_H_ + +void early_hybrid_graphics(bool *enable_igd, bool *enable_peg); + +#endif /* _DRIVERS_LENOVO_HYBRID_GRAPHICS_CHIP_H_ */ |