Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39958 )
Change subject: nb/intel/i945: Simplify GMA SSDT generator ......................................................................
nb/intel/i945: Simplify GMA SSDT generator
Simplify generation of GMA SSDT, using updated naming convention. If acpi_fill_ssdt_generator is being invoked, then we know the IGD device is present and enabled, so we can skip those checks. Only check we need is if a given board has supplied the i915 controller info to populate the SSDT.
Change-Id: I68848516fab2058d4aa96ac0342c883fd1df2d6d Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/northbridge/intel/i945/gma.c 1 file changed, 6 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/39958/1
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index f4d6aaf..98648c0 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -755,25 +755,13 @@ pci_write_config8(dev, 0xf4, 0xff); }
-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_i945_config *chip = dev->chip_info; - if (!chip) - return NULL; - return &chip->gfx; -} + const struct northbridge_intel_i945_config *chip = device->chip_info; + const struct i915_gpu_controller_info *gfx = &chip->gfx;
-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); + if (gfx) + drivers_intel_gma_displays_ssdt_generate(gfx); }
static void gma_func0_read_resources(struct device *dev) @@ -829,7 +817,7 @@ .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = gma_func0_init, - .acpi_fill_ssdt_generator = gma_ssdt, + .acpi_fill_ssdt_generator = gma_generate_ssdt, .scan_bus = 0, .enable = 0, .disable = gma_func0_disable,
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39958 )
Change subject: nb/intel/i945: Simplify GMA SSDT generator ......................................................................
Patch Set 2: Code-Review+1
(2 comments)
https://review.coreboot.org/c/coreboot/+/39958/2/src/northbridge/intel/i945/... File src/northbridge/intel/i945/gma.c:
https://review.coreboot.org/c/coreboot/+/39958/2/src/northbridge/intel/i945/... PS2, Line 758: device dev
https://review.coreboot.org/c/coreboot/+/39958/2/src/northbridge/intel/i945/... PS2, Line 761: chip is this null?
Hello build bot (Jenkins), Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39958
to look at the new patch set (#3).
Change subject: nb/intel/i945: Simplify GMA SSDT generator ......................................................................
nb/intel/i945: 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: I68848516fab2058d4aa96ac0342c883fd1df2d6d Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/northbridge/intel/i945/gma.c 1 file changed, 4 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/39958/3
Matt DeVillier has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39958 )
Change subject: nb/intel/i945: Simplify GMA SSDT generator ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39958/2/src/northbridge/intel/i945/... File src/northbridge/intel/i945/gma.c:
https://review.coreboot.org/c/coreboot/+/39958/2/src/northbridge/intel/i945/... PS2, Line 758: device
dev
Done
https://review.coreboot.org/c/coreboot/+/39958/2/src/northbridge/intel/i945/... PS2, Line 761: chip
is this null?
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39958 )
Change subject: nb/intel/i945: Simplify GMA SSDT generator ......................................................................
Patch Set 3: Code-Review+2
Matt DeVillier has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39958 )
Change subject: nb/intel/i945: Simplify GMA SSDT generator ......................................................................
nb/intel/i945: 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: I68848516fab2058d4aa96ac0342c883fd1df2d6d Signed-off-by: Matt DeVillier matt.devillier@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/39958 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/northbridge/intel/i945/gma.c 1 file changed, 4 insertions(+), 18 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index c26ffb4..f5a964a 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -755,25 +755,11 @@ pci_write_config8(dev, 0xf4, 0xff); }
-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_i945_config *chip = dev->chip_info; - if (!chip) - return NULL; - return &chip->gfx; -} + const struct northbridge_intel_i945_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 void gma_func0_read_resources(struct device *dev) @@ -829,7 +815,7 @@ .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = gma_func0_init, - .acpi_fill_ssdt = gma_ssdt, + .acpi_fill_ssdt = gma_generate_ssdt, .scan_bus = 0, .enable = 0, .disable = gma_func0_disable,