aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/gma/acpi.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-03-21 18:40:03 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-03-24 16:43:00 +0000
commite98f6af77bbd2060f01833559034f28b8b88abfe (patch)
tree4bf5961172d0a4013eda8652a65ffa9a95613144 /src/drivers/intel/gma/acpi.c
parentcc85ce0aa0d6a1e2a254282faf871a8f0a5ffe2f (diff)
drivers/intel/gma/acpi: Reduce display switching stubs
_DCS, _DGS and _DSS are required by specification. However, we never implemented them properly, and no OS driver com- plained yet. So we stub them out and keep the traditional behavior in case an OS driver checks for their existence. The old implementations also only returned static values as there never was any write to their GNVS variables. The TRAP() that was called in one place is actually implemented by some ThinkPad's SMI handler as docking event. However, as the call precedes these SMI handlers in coreboot history, it's most likely an accident. Change-Id: Ib0b9fcdd58df254d3b2290900e3bc206a7abd92d Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39726 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/drivers/intel/gma/acpi.c')
-rw-r--r--src/drivers/intel/gma/acpi.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/drivers/intel/gma/acpi.c b/src/drivers/intel/gma/acpi.c
index 3f71a5ea84..d3fb69dec8 100644
--- a/src/drivers/intel/gma/acpi.c
+++ b/src/drivers/intel/gma/acpi.c
@@ -102,39 +102,38 @@ drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *
}
/*
- Method(_DCS, 0)
- {
- Return (^^XDCS(<device number>))
- }
+ * _DCS, _DGS and _DSS are required by specification. However,
+ * we never implemented them properly, and no OS driver com-
+ * plained yet. So we stub them out and keep the traditional
+ * behavior in case an OS driver checks for their existence.
+ */
+
+ /*
+ Method(_DCS, 0)
+ {
+ Return (0x1d)
+ }
*/
acpigen_write_method("_DCS", 0);
- acpigen_emit_byte(0xa4); /* ReturnOp. */
- acpigen_emit_namestring("^^XDCS");
- acpigen_write_byte(i);
+ acpigen_write_return_integer(0x1d);
acpigen_pop_len();
/*
- Method(_DGS, 0)
- {
- Return (^^XDGS(<device number>))
- }
+ Method(_DGS, 0)
+ {
+ Return (0)
+ }
*/
acpigen_write_method("_DGS", 0);
- acpigen_emit_byte(0xa4); /* ReturnOp. */
- acpigen_emit_namestring("^^XDGS");
- acpigen_write_byte(i);
+ acpigen_write_return_integer(0);
acpigen_pop_len();
/*
- Method(_DSS, 1)
- {
- ^^XDSS(0x5a, Arg0)
- }
+ Method(_DSS, 1)
+ {
+ }
*/
acpigen_write_method("_DSS", 1);
- acpigen_emit_namestring("^^XDSS");
- acpigen_write_byte(i);
- acpigen_emit_byte(0x68); /* Arg0Op. */
acpigen_pop_len();
acpigen_pop_len();