drivers/gfx/generic: Add support for non-VGA devices

Add support for non-VGA devices (e.g., Intel IPU) in the generic
graphics driver by:

- Adding DOD_NONVGA bit definition per ACPI spec 6.5 table B-2
- Adding non_vga_device boolean field to device config structure
- Increasing device array size from 6 to 7 to accommodate IPU
- Updating ACPI _DOD generation to use DOD_NONVGA flag for non-VGA
  devices instead of DOD_FW_DETECT

This allows proper ACPI enumeration of non-VGA devices whose power
is related to the VGA device, such as Intel Image Processing Units.

TEST=tested with rest of patch train on screebo, redrix, and others.

Change-Id: I60472e1232959fe407f63b4b8e6bffba995e7f79
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90516
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
This commit is contained in:
Matt DeVillier 2025-12-04 19:16:08 -06:00
commit 0f1ae4ae5f
2 changed files with 9 additions and 3 deletions

View file

@ -8,6 +8,7 @@
/* ACPI spec 6.5 table B-2, Display Output Device */
#define DOD_FW_DETECT BIT(16) /* Platform boot firmware can detect the device. */
#define DOD_NONVGA BIT(17) /* Non-VGA device whose power is related to the VGA device */
#define DOD_DID_STD BIT(31) /* DID Scheme: Use standard bit-field definitions */
enum display_type {
other = 0,
@ -53,6 +54,8 @@ struct drivers_gfx_generic_device_config {
/* Physical location of connection point */
bool use_pld;
struct acpi_pld pld;
/* Non-VGA device (e.g. Intel IPU) */
bool non_vga_device;
};
/* Config for an ACPI video device defined in Appendix A of the ACPI spec */
@ -65,8 +68,8 @@ struct drivers_gfx_generic_config {
/* The number of output devices defined */
int device_count;
/* Config for output devices */
/* 1 DDIA + 1 DDIB + max 4 TCP = up to 6 GFX devices */
struct drivers_gfx_generic_device_config device[6];
/* 1 DDIA + 1 DDIB + max 4 TCP + IPU = up to 7 (6 GFX + 1 non-GFX) devices */
struct drivers_gfx_generic_device_config device[7];
};
#endif /* __DRIVERS_GFX_GENERIC_CHIP_H__ */

View file

@ -120,7 +120,10 @@ static void gfx_fill_ssdt_generator(const struct device *dev)
/* Though not strictly necessary, set the display index and
port attachment to the device index, to ensure uniqueness */
config->device[i].addr = (config->device[i].type << 8) | (i << 4) | (i);
acpigen_write_dword(DOD_DID_STD | DOD_FW_DETECT | config->device[i].addr);
if (config->device[i].non_vga_device)
acpigen_write_dword(DOD_DID_STD | DOD_NONVGA | config->device[i].addr);
else
acpigen_write_dword(DOD_DID_STD | DOD_FW_DETECT | config->device[i].addr);
}
acpigen_pop_len(); /* End Package. */
acpigen_pop_len(); /* End Method. */