diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-03-02 14:11:54 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-03-02 14:11:54 +0000 |
commit | c81acb643a61db199b9198add7972d8a8496b27c (patch) | |
tree | 7a5cdd2ff70472014d414a14c4fcb9571113e9c2 /hw | |
parent | 9f1750ed68911bef069b5d9ba5cef8150972bcf1 (diff) | |
parent | 44b5c1ebfa5db337714180e9d4a8d525da5595d6 (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200302-pull-request' into staging
vga: bugfixes for qxl and edid generator.
# gpg: Signature made Mon 02 Mar 2020 09:16:28 GMT
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/vga-20200302-pull-request:
qxl: map rom r/o
Arithmetic error in EDID generation fixed
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/edid-generate.c | 4 | ||||
-rw-r--r-- | hw/display/qxl.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 75c945a948..e58472fde5 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -360,8 +360,8 @@ void qemu_edid_generate(uint8_t *edid, size_t size, edid[20] = 0xa5; /* screen size: undefined */ - edid[21] = info->prefx * info->dpi / 2540; - edid[22] = info->prefy * info->dpi / 2540; + edid[21] = info->prefx * 254 / 100 / info->dpi; + edid[22] = info->prefy * 254 / 100 / info->dpi; /* display gamma: 2.2 */ edid[23] = 220 - 100; diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 21a43a1d5e..227da69a50 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2136,7 +2136,7 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error **errp) pci_set_byte(&config[PCI_INTERRUPT_PIN], 1); qxl->rom_size = qxl_rom_size(); - memory_region_init_ram(&qxl->rom_bar, OBJECT(qxl), "qxl.vrom", + memory_region_init_rom(&qxl->rom_bar, OBJECT(qxl), "qxl.vrom", qxl->rom_size, &error_fatal); init_qxl_rom(qxl); init_qxl_ram(qxl); |