Subject: [PATCH] [acpi video] Add storage for array of enumerated video devices - Define struct acpi_video_enum to match the devices referenced by _DOD to the real ACPI devices - Add an array size ACPI_VIDEO_MAX (8, based on the fact the spec reserves 3 bits for the "head/pipe ID" Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/video/bus-driver.c | 1 + drivers/acpi/drivers/video/video.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-) applies-to: 3c1f7db9cfbc81b401d7a6af7f37193dc54469e6 fde76a4df1ac10c9235be7bb3b9f199c77e728b6 diff --git a/drivers/acpi/drivers/video/bus-driver.c b/drivers/acpi/drivers/video/bus-driver.c index e3b9dff..9e36607 100644 --- a/drivers/acpi/drivers/video/bus-driver.c +++ b/drivers/acpi/drivers/video/bus-driver.c @@ -27,6 +27,7 @@ static int video_bus_add(struct acpi_dev return -ENOMEM; av->v_ad = ad; + av->v_dev_num = VIDEO_DEVICE_MAX; ret = video_bus_init(av); if (ret) { diff --git a/drivers/acpi/drivers/video/video.h b/drivers/acpi/drivers/video/video.h index 90fbb57..fcb3b4c 100644 --- a/drivers/acpi/drivers/video/video.h +++ b/drivers/acpi/drivers/video/video.h @@ -24,6 +24,31 @@ ACPI_MODULE_NAME("acpi_video"); #define VIDEO_DOS_LCD_AUTO 0x00 #define VIDEO_DOS_LCD_NO_AUTO 0x01 +struct acpi_video_enum { + union { + struct { + union { + u32 v_device_id:16; + struct { + u32 v_index:4; + u32 v_port:4; + u32 v_type:4; + u32 v_specific:4; + } __attribute__((packed)); + } __attribute__((packed)); + + u32 v_bios_detect:1; + u32 v_non_vga:1; + u32 v_head_id:3; + u32 v_reserved:10; + u32 v_standard:1; + } __attribute__((packed)); + u32 v_attrib; + } __attribute__((packed)); +}; + +#define VIDEO_DEVICE_MAX 8 + struct acpi_video_bus { int v_can_switch; @@ -35,6 +60,9 @@ struct acpi_video_bus { u32 v_dos; + struct acpi_video_enum v_dev[VIDEO_DEVICE_MAX]; + u32 v_dev_num; + struct acpi_dev * v_ad; }; --- 0.99.9.GIT