From 020f2b88971bd3939fec81644f816d9c760e6557 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 29 Dec 2020 11:15:18 -0700 Subject: [PATCH] soc/intel/tigerlake: Add i915_gpu_controller_info Change-Id: Iadb530d7113a48549779ea3baa499f9f7a772f32 --- src/soc/intel/tigerlake/Makefile.inc | 1 + src/soc/intel/tigerlake/chip.h | 5 +++++ src/soc/intel/tigerlake/graphics.c | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 src/soc/intel/tigerlake/graphics.c diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc index 4a41812324..94ecaa20a9 100644 --- a/src/soc/intel/tigerlake/Makefile.inc +++ b/src/soc/intel/tigerlake/Makefile.inc @@ -37,6 +37,7 @@ ramstage-y += espi.c ramstage-y += finalize.c ramstage-y += fsp_params.c ramstage-y += gpio.c +ramstage-y += graphics.c ramstage-y += lockdown.c ramstage-y += p2sb.c ramstage-y += pmc.c diff --git a/src/soc/intel/tigerlake/chip.h b/src/soc/intel/tigerlake/chip.h index 86e77da972..580f71f90b 100644 --- a/src/soc/intel/tigerlake/chip.h +++ b/src/soc/intel/tigerlake/chip.h @@ -4,6 +4,7 @@ #define _SOC_CHIP_H_ #include +#include #include #include #include @@ -500,6 +501,10 @@ struct soc_intel_tigerlake_config { * - PM_CFG.SLP_LAN_MIN_ASST_WDTH */ uint8_t PchPmPwrCycDur; + + + /* i915 struct for GMA backlight control */ + struct i915_gpu_controller_info gfx; }; typedef struct soc_intel_tigerlake_config config_t; diff --git a/src/soc/intel/tigerlake/graphics.c b/src/soc/intel/tigerlake/graphics.c new file mode 100644 index 0000000000..82fbe3be8c --- /dev/null +++ b/src/soc/intel/tigerlake/graphics.c @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +const struct i915_gpu_controller_info * +intel_igd_get_controller_info(const struct device *device) +{ + struct soc_intel_tigerlake_config *chip = device->chip_info; + return &chip->gfx; +}