11 comments:
Patch Set #10, Line 10: CONFIG_MULTIPLE_VGA_ADAPTERS
You want to handle non VGA compatible PCI devices in a similar way as VGA compatible devices. This does not have much to do with integrated or discrete.
Patch Set #10, Line 795: MULTIPLE_VGA_ADAPTERS
This name is confusing. All it does is allowing coreboot to initialize PCI_CLASS_DISPLAY_OTHER in a similar fashion to PCI_CLASS_DISLAY?
Patch Set #10, Line 830: Integrated
use a ternary operator in the printk statement. It would also be better to split off adding these debug messages into a different patch. PCI_CLASS_DISPLAY_VGA means VGA compatible, not integrated or discrete.
Patch Set #10, Line 839: Integrated
use a ternary operator in the printk statement.
run_rom = (struct rom_header *)(uintptr_t)PCI_VGA_RAM_IMAGE_START;
} else if (IS_ENABLED(CONFIG_MULTIPLE_VGA_ADAPTERS)) {
if ((dev->class >> 8) == PCI_CLASS_DISPLAY_OTHER) {
run_rom = (struct rom_header *)(uintptr_t)PCI_RAM_IMAGE_START;
}
}
use a switch statement for the PCI class.
if (run_rom == NULL)
return NULL;
isn't this captured by the next statement?
if (!IS_ENABLED(CONFIG_MULTIPLE_VGA_ADAPTERS)) {
/* Copy Integrated VGA VBIOS from CBFS to ACPI VFCT. */
printk(BIOS_DEBUG, " Copying %sVBIOS image from %p\n",
rom == (struct rom_header *)
(uintptr_t)PCI_VGA_RAM_IMAGE_START ?
"initialized " : "",
rom);
} else {
/* Copy Discrete VGA VBIOS from CBFS to ACPI VFCT. */
printk(BIOS_DEBUG, " Copying %sVBIOS image from %p\n",
rom == (struct rom_header *)
(uintptr_t)PCI_RAM_IMAGE_START ?
"initialized " : "",
rom);
/* TODO: do this also for Integrated VGA VBIOS. */
}
isn't this the same?
if (!IS_ENABLED(CONFIG_MULTIPLE_VGA_ADAPTERS)) {
if ((device->class >> 8) != PCI_CLASS_DISPLAY_VGA) {
return current;
}
} else {
/* Write ACPI VFCT only for Discrete VGA. */
if ((device->class >> 8) == PCI_CLASS_DISPLAY_OTHER) {
;
} else {
return current;
}
/* TODO: do this also for Integrated VGA. */
}
use a switch statement.
Patch Set #10, Line 230: if (!CONFIG(MULTIPLE_VGA_ADAPTERS)) {
this ought to depend on the device itself, not on Kconfig...
Patch Set #10, Line 231: /* Copy Integrated VGA VBIOS from CBFS to ACPI VFCT. */
There is just a printk statement below, no copying is yet happening.
/* Write ACPI VFCT only for Discrete VGA. */
if ((device->class >> 8) == PCI_CLASS_DISPLAY_OTHER)
;
else
return current;
invert the statement.
To view, visit change 31448. To unsubscribe, or for help writing mail filters, visit settings.