Tim Crawford has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69076 )
Change subject: soc/intel/alderlake: Hook up GMA ACPI brightness controls ......................................................................
soc/intel/alderlake: Hook up GMA ACPI brightness controls
Add function needed to generate ACPI backlight control SSDT, along with Kconfig values for accessing the registers.
Tested by adding gfx register on system76/lemp11. Backlight controls work on Windows 10 and Linux 6.1.
Change-Id: I1cc33bf0121ff44aea68a7e3615c5e58e2ab6ce2 Signed-off-by: Tim Crawford tcrawford@system76.com --- M src/soc/intel/alderlake/Kconfig M src/soc/intel/alderlake/Makefile.inc M src/soc/intel/alderlake/chip.h A src/soc/intel/alderlake/graphics.c 4 files changed, 42 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/69076/1
diff --git a/src/soc/intel/alderlake/Kconfig b/src/soc/intel/alderlake/Kconfig index cbc02e7..08d4132 100644 --- a/src/soc/intel/alderlake/Kconfig +++ b/src/soc/intel/alderlake/Kconfig @@ -484,4 +484,16 @@ help Set this option if debug build of FSP is used.
+config INTEL_GMA_BCLV_OFFSET + default 0xc8258 + +config INTEL_GMA_BCLV_WIDTH + default 32 + +config INTEL_GMA_BCLM_OFFSET + default 0xc8254 + +config INTEL_GMA_BCLM_WIDTH + default 32 + endif diff --git a/src/soc/intel/alderlake/Makefile.inc b/src/soc/intel/alderlake/Makefile.inc index a4c6336..7f808ff 100644 --- a/src/soc/intel/alderlake/Makefile.inc +++ b/src/soc/intel/alderlake/Makefile.inc @@ -32,6 +32,7 @@ ramstage-y += espi.c ramstage-y += finalize.c ramstage-y += fsp_params.c +ramstage-y += graphics.c ramstage-y += hsphy.c ramstage-y += lockdown.c ramstage-y += me.c diff --git a/src/soc/intel/alderlake/chip.h b/src/soc/intel/alderlake/chip.h index a1a8fb3..46721b0 100644 --- a/src/soc/intel/alderlake/chip.h +++ b/src/soc/intel/alderlake/chip.h @@ -4,6 +4,7 @@ #define _SOC_CHIP_H_
#include <drivers/i2c/designware/dw_i2c.h> +#include <drivers/intel/gma/gma.h> #include <device/pci_ids.h> #include <intelblocks/cfg.h> #include <intelblocks/gpio.h> @@ -647,6 +648,9 @@ * Default is set to 0 and set to 1 to skip the MBP HOB. */ bool skip_mbp_hob; + + /* i915 struct for GMA backlight control */ + struct i915_gpu_controller_info gfx; };
typedef struct soc_intel_alderlake_config config_t; diff --git a/src/soc/intel/alderlake/graphics.c b/src/soc/intel/alderlake/graphics.c new file mode 100644 index 0000000..5cd1538 --- /dev/null +++ b/src/soc/intel/alderlake/graphics.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include <intelblocks/graphics.h> +#include <soc/ramstage.h> +const struct i915_gpu_controller_info * +intel_igd_get_controller_info(const struct device *const dev) +{ + const struct soc_intel_alderlake_config *const chip = dev->chip_info; + return &chip->gfx; +}