soc/intel/apollolake: Hook up GMA ACPI brightness controls

Add struct i915_gpu_controller_info for boards to supply info needed
to generate ACPI backlight control SSDT.

Hook into soc/common framework by implementing intel_igd_get_controller_info().

Add Kconfig entries to set the correct register offsets for backlight
frequency and duty cycle.

Change-Id: Ia62a88b58e7efd90f550000fc5b2cef0cb5fade7
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40593
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Matt DeVillier 2020-04-21 01:23:10 -05:00 committed by Michael Niewöhner
parent 95a181e432
commit d7ef450d88
3 changed files with 28 additions and 0 deletions

View File

@ -413,4 +413,22 @@ config RO_REGION_ONLY
string
default "pdpt pt"
config INTEL_GMA_PANEL_2
bool
default n
config INTEL_GMA_BCLV_OFFSET
default 0xc8358 if INTEL_GMA_PANEL_2
default 0xc8258
config INTEL_GMA_BCLV_WIDTH
default 32
config INTEL_GMA_BCLM_OFFSET
default 0xc8354 if INTEL_GMA_PANEL_2
default 0xc8254
config INTEL_GMA_BCLM_WIDTH
default 32
endif

View File

@ -41,6 +41,9 @@ struct soc_intel_apollolake_config {
*/
struct i915_gpu_panel_config panel_cfg[2];
/* i915 struct for GMA backlight control */
struct i915_gpu_controller_info gfx;
/*
* Mapping from PCIe root port to CLKREQ input on the SOC. The SOC has
* four CLKREQ inputs, but six root ports. Root ports without an

View File

@ -74,3 +74,10 @@ void graphics_soc_panel_init(struct device *const dev)
for (i = 0; i < ARRAY_SIZE(conf->panel_cfg); ++i)
graphics_configure_backlight(&conf->panel_cfg[i], mmio, i);
}
const struct i915_gpu_controller_info *
intel_igd_get_controller_info(const struct device *device)
{
struct soc_intel_apollolake_config *chip = device->chip_info;
return &chip->gfx;
}