acpi-vga.c 686 B

1234567891011121314151617181920212223242526
  1. #include "qemu/osdep.h"
  2. #include "hw/acpi/acpi_aml_interface.h"
  3. #include "hw/pci/pci.h"
  4. #include "vga_int.h"
  5. void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope)
  6. {
  7. int s3d = 0;
  8. Aml *method;
  9. if (object_dynamic_cast(OBJECT(adev), "qxl-vga")) {
  10. s3d = 3;
  11. }
  12. method = aml_method("_S1D", 0, AML_NOTSERIALIZED);
  13. aml_append(method, aml_return(aml_int(0)));
  14. aml_append(scope, method);
  15. method = aml_method("_S2D", 0, AML_NOTSERIALIZED);
  16. aml_append(method, aml_return(aml_int(0)));
  17. aml_append(scope, method);
  18. method = aml_method("_S3D", 0, AML_NOTSERIALIZED);
  19. aml_append(method, aml_return(aml_int(s3d)));
  20. aml_append(scope, method);
  21. }