soc/intel/braswell: add ACPI backlight support

Add hook to generate ACPI methods in SSDT for screen backlight control.

To make use of this, individual boards will need to
include default_brightness_levels.asl in their dsdt, as
well as add 'register "gfx" = "GMA_STATIC_DISPLAYS(0)"' to
their devicetree.

Change-Id: I0adccc6c8bee71d3c1b7840518308c8dc8ea2d81
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39943
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/src/soc/intel/braswell/gfx.c b/src/soc/intel/braswell/gfx.c
index ff73955..12fe642 100644
--- a/src/soc/intel/braswell/gfx.c
+++ b/src/soc/intel/braswell/gfx.c
@@ -18,6 +18,7 @@
 #include <device/pci.h>
 #include <device/pci_ids.h>
 #include <drivers/intel/gma/opregion.h>
+#include <drivers/intel/gma/i915.h>
 #include <reg_script.h>
 #include <soc/gfx.h>
 #include <soc/nvs.h>
@@ -87,12 +88,20 @@
 		gnvs_ptr->aslb = aslb;
 }
 
+static void gma_generate_ssdt(struct device *dev)
+{
+	const struct soc_intel_braswell_config *chip = dev->chip_info;
+
+	drivers_intel_gma_displays_ssdt_generate(&chip->gfx);
+}
+
 static struct device_operations gfx_device_ops = {
 	.read_resources		= pci_dev_read_resources,
 	.set_resources		= pci_dev_set_resources,
 	.enable_resources	= pci_dev_enable_resources,
 	.init			= gfx_init,
 	.ops_pci		= &soc_pci_ops,
+	.acpi_fill_ssdt		= gma_generate_ssdt,
 };
 
 static const struct pci_driver gfx_driver __pci_driver = {