Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/82729?usp=email )
Change subject: soc/intel/mtl: Hook up GMA ACPI brightness controls ......................................................................
soc/intel/mtl: Hook up GMA ACPI brightness controls
Add function needed to generate ACPI backlight control SSDT, along with Kconfig values for accessing the registers.
Change-Id: Ied08e5e9fe4913bd60474ed7dcf88b945172558d Signed-off-by: Jeremy Soller jeremy@sysetm76.com Signed-off-by: Tim Crawford tcrawford@system76.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/82729 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/soc/intel/meteorlake/Kconfig M src/soc/intel/meteorlake/Makefile.mk M src/soc/intel/meteorlake/chip.h A src/soc/intel/meteorlake/graphics.c 4 files changed, 28 insertions(+), 0 deletions(-)
Approvals: Nico Huber: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/soc/intel/meteorlake/Kconfig b/src/soc/intel/meteorlake/Kconfig index b5c0bcf..955b8bf 100644 --- a/src/soc/intel/meteorlake/Kconfig +++ b/src/soc/intel/meteorlake/Kconfig @@ -380,6 +380,18 @@ hex default 0x800000
+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 + config DROP_CPU_FEATURE_PROGRAM_IN_FSP bool default y if MP_SERVICES_PPI_V2_NOOP || CHROMEOS diff --git a/src/soc/intel/meteorlake/Makefile.mk b/src/soc/intel/meteorlake/Makefile.mk index 495ea5b..f3dce87 100644 --- a/src/soc/intel/meteorlake/Makefile.mk +++ b/src/soc/intel/meteorlake/Makefile.mk @@ -36,6 +36,7 @@ ramstage-y += espi.c ramstage-y += finalize.c ramstage-y += fsp_params.c +ramstage-y += graphics.c ramstage-y += lockdown.c ramstage-y += p2sb.c ramstage-y += pcie_rp.c diff --git a/src/soc/intel/meteorlake/chip.h b/src/soc/intel/meteorlake/chip.h index bf7bd36..fa65773 100644 --- a/src/soc/intel/meteorlake/chip.h +++ b/src/soc/intel/meteorlake/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 <gpio.h> #include <intelblocks/cfg.h> @@ -528,6 +529,9 @@ * as per `enum slew_rate` data type. */ uint8_t slow_slew_rate_config[NUM_VR_DOMAINS]; + + /* i915 struct for GMA backlight control */ + struct i915_gpu_controller_info gfx; };
typedef struct soc_intel_meteorlake_config config_t; diff --git a/src/soc/intel/meteorlake/graphics.c b/src/soc/intel/meteorlake/graphics.c new file mode 100644 index 0000000..0ce4442 --- /dev/null +++ b/src/soc/intel/meteorlake/graphics.c @@ -0,0 +1,11 @@ +/* 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_meteorlake_config *const chip = dev->chip_info; + return &chip->gfx; +}