drivers/intel/gma/acpi: Refine some cosmetics
TEST=Booted ThinkPad X201s, backlight control still works. Change-Id: Ie3b00daedc9de05abef0cae9cea99dc7acf1ff62 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39727 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
e98f6af77b
commit
53c1717dc1
|
@ -39,29 +39,35 @@ drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
acpigen_write_method("_DOD", 0);
|
acpigen_write_method("_DOD", 0);
|
||||||
acpigen_emit_byte(0xa4); /* ReturnOp. */
|
|
||||||
acpigen_write_package(conf->ndid);
|
|
||||||
|
|
||||||
|
acpigen_emit_byte(RETURN_OP);
|
||||||
|
acpigen_write_package(conf->ndid);
|
||||||
for (i = 0; i < conf->ndid; i++) {
|
for (i = 0; i < conf->ndid; i++) {
|
||||||
acpigen_write_dword (conf->did[i] | 0x80010000);
|
acpigen_write_dword (conf->did[i] | 0x80010000);
|
||||||
}
|
}
|
||||||
acpigen_pop_len(); /* End Package. */
|
acpigen_pop_len(); /* End Package. */
|
||||||
|
|
||||||
acpigen_pop_len(); /* End Method. */
|
acpigen_pop_len(); /* End Method. */
|
||||||
|
|
||||||
for (i = 0; i < conf->ndid; i++) {
|
for (i = 0; i < conf->ndid; i++) {
|
||||||
char name[10];
|
char name[10];
|
||||||
char *ptr;
|
char *ptr;
|
||||||
int kind;
|
int kind;
|
||||||
|
|
||||||
kind = (conf->did[i] >> 8) & 0xf;
|
kind = (conf->did[i] >> 8) & 0xf;
|
||||||
if (kind >= ARRAY_SIZE(names)) {
|
if (kind >= ARRAY_SIZE(names)) {
|
||||||
kind = 0;
|
kind = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(name, names[kind]);
|
strcpy(name, names[kind]);
|
||||||
for (ptr = name; *ptr; ptr++);
|
for (ptr = name; *ptr; ptr++);
|
||||||
*ptr++ = counters[kind] + '0';
|
*ptr++ = counters[kind] + '0';
|
||||||
*ptr++ = '\0';
|
*ptr++ = '\0';
|
||||||
counters[kind]++;
|
counters[kind]++;
|
||||||
|
|
||||||
|
/* Device (LCD0) */
|
||||||
acpigen_write_device(name);
|
acpigen_write_device(name);
|
||||||
|
|
||||||
/* Name (_ADR, 0x0410) */
|
/* Name (_ADR, 0x0410) */
|
||||||
acpigen_write_name_dword("_ADR", conf->did[i] & 0xffff);
|
acpigen_write_name_dword("_ADR", conf->did[i] & 0xffff);
|
||||||
|
|
||||||
|
@ -74,7 +80,7 @@ drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
acpigen_write_method("_BCL", 0);
|
acpigen_write_method("_BCL", 0);
|
||||||
acpigen_emit_byte(0xa4); /* ReturnOp. */
|
acpigen_emit_byte(RETURN_OP);
|
||||||
acpigen_emit_namestring("^^XBCL");
|
acpigen_emit_namestring("^^XBCL");
|
||||||
acpigen_pop_len();
|
acpigen_pop_len();
|
||||||
|
|
||||||
|
@ -86,7 +92,7 @@ drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *
|
||||||
*/
|
*/
|
||||||
acpigen_write_method("_BCM", 1);
|
acpigen_write_method("_BCM", 1);
|
||||||
acpigen_emit_namestring("^^XBCM");
|
acpigen_emit_namestring("^^XBCM");
|
||||||
acpigen_emit_byte(0x68); /* Arg0Op. */
|
acpigen_emit_byte(ARG0_OP);
|
||||||
acpigen_pop_len();
|
acpigen_pop_len();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -96,7 +102,7 @@ drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
acpigen_write_method("_BQC", 0);
|
acpigen_write_method("_BQC", 0);
|
||||||
acpigen_emit_byte(0xa4); /* ReturnOp. */
|
acpigen_emit_byte(RETURN_OP);
|
||||||
acpigen_emit_namestring("^^XBQC");
|
acpigen_emit_namestring("^^XBQC");
|
||||||
acpigen_pop_len();
|
acpigen_pop_len();
|
||||||
}
|
}
|
||||||
|
@ -136,8 +142,8 @@ drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *
|
||||||
acpigen_write_method("_DSS", 1);
|
acpigen_write_method("_DSS", 1);
|
||||||
acpigen_pop_len();
|
acpigen_pop_len();
|
||||||
|
|
||||||
acpigen_pop_len();
|
acpigen_pop_len(); /* End Device. */
|
||||||
}
|
}
|
||||||
|
|
||||||
acpigen_pop_len();
|
acpigen_pop_len(); /* End Scope. */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue