vga: enable virtio test, fix ddc oob read

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJcOKD0AAoJEEy22O7T6HE40JQP/RrwVqSvaFDu/13tbtkLcJPs
 v7BVCw0YmlOq5xagvtyoWhClxghHGkJNjQr+VGjLKhi03sgTIiE7BxcGz5qVXfwn
 KgZyrvgtgYHsGdRuC48UmsjRt0E0hR5exdaCVY73lpXyngxBJj5iMlr1E2sMePD7
 j03zsc5fsGVi+bQ1zsKd9LWQRrBQYzzAxnRuPWlXC9U4iTwUV2HltYQhT3bpsbLR
 Gc8YgQ0mikgGXFXXlSZ/4Wu1pIiCNVdLPhjOBiUlQrVmD1ukcMS6AQyZ8KeWf10B
 e+GBEd7O5rIDvsxYBg745CXZWTb+OMWRW63GybXNyLbmBSqOFRafYyZLJ5o5vjnf
 omrl1CJhfVl68wgwLBvcPIgFUZk9Gj5X25FW4vpjCkkaFELruCVxOUl6Gq6/jyPU
 XPRAmdpPsAm5qnHrzn1vKwen/bj4+872Qtj97g1DqRkMyXFBz8E8y7DAPRzRfGUh
 kZh4Z6AijG8sEpBY9O+WKaEU8D0nFXi88tahv3NsGYT+rsPGyNXqRwcFbV61H8Cn
 jtWT7iL0LzgykJcTP4WmkGBIApRRuLj0/YSNrVJSttVuRWq77p9f1X28MVta0zE/
 1kBDvPM6JJJBYxd4LJxQDymIaXTKdFFwHTUkXBKPrvRsWAZ8rCzaTts8oK/l+y+k
 XWkx59vOLH13fi/EoRfz
 =MxNk
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/vga-20190111-pull-request' into staging

vga: enable virtio test, fix ddc oob read

# gpg: Signature made Fri 11 Jan 2019 13:58:12 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/vga-20190111-pull-request:
  i2c-ddc: fix oob read
  tests/display-vga: Enable virtio-vga test

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2019-01-11 19:09:13 +00:00
commit 1fa404b60f
3 changed files with 11 additions and 6 deletions

View File

@ -56,7 +56,7 @@ static int i2c_ddc_rx(I2CSlave *i2c)
I2CDDCState *s = I2CDDC(i2c); I2CDDCState *s = I2CDDC(i2c);
int value; int value;
value = s->edid_blob[s->reg]; value = s->edid_blob[s->reg % sizeof(s->edid_blob)];
s->reg++; s->reg++;
return value; return value;
} }

View File

@ -222,18 +222,23 @@ check-qtest-x86_64-y += $(check-qtest-i386-y)
check-qtest-x86_64-$(CONFIG_SDHCI) += tests/sdhci-test$(EXESUF) check-qtest-x86_64-$(CONFIG_SDHCI) += tests/sdhci-test$(EXESUF)
check-qtest-alpha-y += tests/boot-serial-test$(EXESUF) check-qtest-alpha-y += tests/boot-serial-test$(EXESUF)
check-qtest-alpha-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
check-qtest-hppa-y += tests/boot-serial-test$(EXESUF) check-qtest-hppa-y += tests/boot-serial-test$(EXESUF)
check-qtest-hppa-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
check-qtest-m68k-y = tests/boot-serial-test$(EXESUF) check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
check-qtest-microblaze-y += tests/boot-serial-test$(EXESUF) check-qtest-microblaze-y += tests/boot-serial-test$(EXESUF)
check-qtest-mips-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF) check-qtest-mips-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
check-qtest-mips-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF) check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
check-qtest-mips64-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF) check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
check-qtest-mips64el-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
check-qtest-moxie-y += tests/boot-serial-test$(EXESUF) check-qtest-moxie-y += tests/boot-serial-test$(EXESUF)

View File

@ -40,13 +40,11 @@ static void pci_virtio_gpu(void)
qtest_end(); qtest_end();
} }
#ifdef CONFIG_VIRTIO_VGA
static void pci_virtio_vga(void) static void pci_virtio_vga(void)
{ {
qtest_start("-vga none -device virtio-vga"); qtest_start("-vga none -device virtio-vga");
qtest_end(); qtest_end();
} }
#endif
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@ -62,8 +60,10 @@ int main(int argc, char **argv)
qtest_add_func("/display/pci/secondary", pci_secondary); qtest_add_func("/display/pci/secondary", pci_secondary);
qtest_add_func("/display/pci/multihead", pci_multihead); qtest_add_func("/display/pci/multihead", pci_multihead);
qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu); qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
#ifdef CONFIG_VIRTIO_VGA if (g_str_equal(arch, "i386") || g_str_equal(arch, "x86_64") ||
qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga); g_str_equal(arch, "hppa") || g_str_equal(arch, "ppc64")) {
#endif qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
}
return g_test_run(); return g_test_run();
} }