nb/intel/ironlake: Simplify GMA SSDT generator
Simplify generation of GMA SSDT, using updated naming convention. If acpi_fill_ssdt is being invoked, then we know the IGD device is present and enabled, so we can skip those checks. And the SSDT generator now checks that the gfx struct is populated, so we can skip that too. Change-Id: I1b6d57c091441aa7431061b1f16135d54cc97b47 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39950 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
348f9f0ad2
commit
6b059eac5e
1 changed files with 11 additions and 25 deletions
|
@ -214,25 +214,11 @@ static void gma_read_resources(struct device *dev)
|
|||
res->size = (resource_t) 0x10000000;
|
||||
}
|
||||
|
||||
const struct i915_gpu_controller_info *
|
||||
intel_gma_get_controller_info(void)
|
||||
static void gma_generate_ssdt(struct device *device)
|
||||
{
|
||||
struct device *dev = pcidev_on_root(0x2, 0);
|
||||
if (!dev) {
|
||||
return NULL;
|
||||
}
|
||||
struct northbridge_intel_ironlake_config *chip = dev->chip_info;
|
||||
return &chip->gfx;
|
||||
}
|
||||
const struct northbridge_intel_ironlake_config *chip = device->chip_info;
|
||||
|
||||
static void gma_ssdt(struct device *device)
|
||||
{
|
||||
const struct i915_gpu_controller_info *gfx = intel_gma_get_controller_info();
|
||||
if (!gfx) {
|
||||
return;
|
||||
}
|
||||
|
||||
drivers_intel_gma_displays_ssdt_generate(gfx);
|
||||
drivers_intel_gma_displays_ssdt_generate(&chip->gfx);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
|
@ -269,7 +255,7 @@ static struct device_operations gma_func0_ops = {
|
|||
.read_resources = gma_read_resources,
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.acpi_fill_ssdt = gma_ssdt,
|
||||
.acpi_fill_ssdt = gma_generate_ssdt,
|
||||
.init = gma_func0_init,
|
||||
.scan_bus = 0,
|
||||
.enable = 0,
|
||||
|
|
Loading…
Reference in a new issue