Commit ecdac443 authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] Extensions for Display Adapters (Bruno Ducrot)

http://bugme.osdl.org/show_bug.cgi?id=1944Signed-off-by: default avatarLuming Yu <luming.yu@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 452d9fd5
This driver implement the ACPI Extensions For Display Adapters
for integrated graphics devices on motherboard, as specified in
ACPI 2.0 Specification, Appendix B, allowing to perform some basic
control like defining the video POST device, retrieving EDID information
or to setup a video output, etc. Note that this is an ref. implementation only.
It may or may not work for your integrated video device.
Interfaces exposed to userland through /proc/acpi/video:
VGA/info : display the supported video bus device capability like ,Video ROM, CRT/LCD/TV.
VGA/ROM : Used to get a copy of the display devices' ROM data (up to 4k).
VGA/POST_info : Used to determine what options are implemented.
VGA/POST : Used to get/set POST device.
VGA/DOS : Used to get/set ownership of output switching:
Please refer ACPI spec B.4.1 _DOS
VGA/CRT : CRT output
VGA/LCD : LCD output
VGA/TV : TV output
VGA/*/brightness : Used to get/set brightness of output device
Notify event through /proc/acpi/event:
#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
#define ACPI_VIDEO_NOTIFY_PROBE 0x81
#define ACPI_VIDEO_NOTIFY_CYCLE 0x82
#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83
#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84
#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82
#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83
#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84
#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85
#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86
...@@ -110,6 +110,20 @@ config ACPI_BUTTON ...@@ -110,6 +110,20 @@ config ACPI_BUTTON
down the system. Until then, you can cat it, and see output when down the system. Until then, you can cat it, and see output when
a button is pressed. a button is pressed.
config ACPI_VIDEO
tristate "Video"
depends on ACPI_INTERPRETER
depends on !IA64_SGI_SN
default m
help
This driver implement the ACPI Extensions For Display Adapters
for integrated graphics devices on motherboard, as specified in
ACPI 2.0 Specification, Appendix B, allowing to perform some basic
control like defining the video POST device, retrieving EDID information
or to setup a video output, etc.
Note that this is an ref. implementation only. It may or may not work
for your integrated video device.
config ACPI_FAN config ACPI_FAN
tristate "Fan" tristate "Fan"
depends on ACPI_INTERPRETER depends on ACPI_INTERPRETER
......
...@@ -38,6 +38,7 @@ obj-$(CONFIG_ACPI_BATTERY) += battery.o ...@@ -38,6 +38,7 @@ obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_BUTTON) += button.o
obj-$(CONFIG_ACPI_EC) += ec.o obj-$(CONFIG_ACPI_EC) += ec.o
obj-$(CONFIG_ACPI_FAN) += fan.o obj-$(CONFIG_ACPI_FAN) += fan.o
obj-$(CONFIG_ACPI_VIDEO) += video.o
obj-$(CONFIG_ACPI_PCI) += pci_root.o pci_link.o pci_irq.o pci_bind.o obj-$(CONFIG_ACPI_PCI) += pci_root.o pci_link.o pci_irq.o pci_bind.o
obj-$(CONFIG_ACPI_POWER) += power.o obj-$(CONFIG_ACPI_POWER) += power.o
obj-$(CONFIG_ACPI_PROCESSOR) += processor.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
......
...@@ -312,7 +312,12 @@ acpi_bus_match ( ...@@ -312,7 +312,12 @@ acpi_bus_match (
struct acpi_device *device, struct acpi_device *device,
struct acpi_driver *driver) struct acpi_driver *driver)
{ {
return acpi_match_ids(device, driver->ids); int error = 0;
error = driver->ops.match ? driver->ops.match(device, driver) :
acpi_match_ids(device, driver->ids) ;
return error;
} }
......
This diff is collapsed.
...@@ -104,6 +104,7 @@ typedef int (*acpi_op_suspend) (struct acpi_device *device, int state); ...@@ -104,6 +104,7 @@ typedef int (*acpi_op_suspend) (struct acpi_device *device, int state);
typedef int (*acpi_op_resume) (struct acpi_device *device, int state); typedef int (*acpi_op_resume) (struct acpi_device *device, int state);
typedef int (*acpi_op_scan) (struct acpi_device *device); typedef int (*acpi_op_scan) (struct acpi_device *device);
typedef int (*acpi_op_bind) (struct acpi_device *device); typedef int (*acpi_op_bind) (struct acpi_device *device);
typedef int (*acpi_op_match) (struct acpi_device *device, struct acpi_driver *driver);
struct acpi_device_ops { struct acpi_device_ops {
acpi_op_add add; acpi_op_add add;
...@@ -115,6 +116,7 @@ struct acpi_device_ops { ...@@ -115,6 +116,7 @@ struct acpi_device_ops {
acpi_op_resume resume; acpi_op_resume resume;
acpi_op_scan scan; acpi_op_scan scan;
acpi_op_bind bind; acpi_op_bind bind;
acpi_op_match match;
}; };
struct acpi_driver { struct acpi_driver {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment