Jeremy Soller has uploaded this change for review.

View Change

soc/intel/cannonlake: Add i915_gpu_controller_info

This adds the i915_gpu_controller_info struct to chip.h and
implements intel_igd_get_controller_info. Due to conflicts with
the GMA driver ACPI, gfx.asl had to be commented out. I believe
gfx.asl should be removed, but would like to hear alternatives.

Tested on system76/lemp9 - ACPI backlight control was verified.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I027b5fc37527fbfcf985262c8a1a048e0363410e
---
M src/soc/intel/cannonlake/Makefile.inc
M src/soc/intel/cannonlake/acpi/southbridge.asl
M src/soc/intel/cannonlake/chip.h
A src/soc/intel/cannonlake/graphics.c
4 files changed, 17 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/43616/1
diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc
index 96f1f97..e6d330a 100644
--- a/src/soc/intel/cannonlake/Makefile.inc
+++ b/src/soc/intel/cannonlake/Makefile.inc
@@ -38,6 +38,7 @@
ramstage-y += fsp_params.c
ramstage-y += gspi.c
ramstage-y += i2c.c
+ramstage-y += graphics.c
ramstage-y += lockdown.c
ramstage-y += lpc.c
ramstage-y += me.c
diff --git a/src/soc/intel/cannonlake/acpi/southbridge.asl b/src/soc/intel/cannonlake/acpi/southbridge.asl
index 12269d3..9cdd3b5 100644
--- a/src/soc/intel/cannonlake/acpi/southbridge.asl
+++ b/src/soc/intel/cannonlake/acpi/southbridge.asl
@@ -17,7 +17,7 @@
#endif

/* GFX 00:02.0 */
-#include "gfx.asl"
+//TODO: fix inclusion when using gma ACPI #include "gfx.asl"

/* LPC 0:1f.0 */
#include <soc/intel/common/block/acpi/acpi/lpc.asl>
diff --git a/src/soc/intel/cannonlake/chip.h b/src/soc/intel/cannonlake/chip.h
index 2923efc..3457f4d 100644
--- a/src/soc/intel/cannonlake/chip.h
+++ b/src/soc/intel/cannonlake/chip.h
@@ -5,6 +5,7 @@

#include <intelblocks/cfg.h>
#include <drivers/i2c/designware/dw_i2c.h>
+#include <drivers/intel/gma/gma.h>
#include <intelblocks/gpio.h>
#include <intelblocks/gspi.h>
#include <intelblocks/lpc_lib.h>
@@ -478,6 +479,9 @@
* Only override CPU flex ratio if don't want to boot with non-turbo max.
*/
uint8_t cpu_ratio_override;
+
+ /* i915 struct for GMA backlight control */
+ struct i915_gpu_controller_info gfx;
};

typedef struct soc_intel_cannonlake_config config_t;
diff --git a/src/soc/intel/cannonlake/graphics.c b/src/soc/intel/cannonlake/graphics.c
new file mode 100644
index 0000000..fda4998
--- /dev/null
+++ b/src/soc/intel/cannonlake/graphics.c
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <intelblocks/graphics.h>
+#include <soc/ramstage.h>
+
+const struct i915_gpu_controller_info *
+intel_igd_get_controller_info(const struct device *device)
+{
+ struct soc_intel_cannonlake_config *chip = device->chip_info;
+ return &chip->gfx;
+}

To view, visit change 43616. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I027b5fc37527fbfcf985262c8a1a048e0363410e
Gerrit-Change-Number: 43616
Gerrit-PatchSet: 1
Gerrit-Owner: Jeremy Soller <jeremy@system76.com>
Gerrit-MessageType: newchange