Message ID | 1462958546-22492-1-git-send-email-wangxinxin.wang@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mi, 2016-05-11 at 17:22 +0800, Wang Xin wrote: > Commit bfa0f15 add vbe_enabled() helper, while it forget to replace > the code in vbe_ioport_write_data(). > case VBE_DISPI_INDEX_ENABLE: > - if ((val & VBE_DISPI_ENABLED) && > - !(s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED)) { I left it there as-is intentionally, because that is the place where VBE is actually enabled and I think the code is easier to read if the logic at that location isn't hidden by the helper. cheers, Gerd
diff --git a/hw/display/vga.c b/hw/display/vga.c index 4a55ec6..455ef51 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -778,8 +778,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val) vga_update_memory_access(s); break; case VBE_DISPI_INDEX_ENABLE: - if ((val & VBE_DISPI_ENABLED) && - !(s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED)) { + if ((val & VBE_DISPI_ENABLED) && !vbe_enabled(s)) { s->vbe_regs[VBE_DISPI_INDEX_VIRT_WIDTH] = 0; s->vbe_regs[VBE_DISPI_INDEX_X_OFFSET] = 0;
Commit bfa0f15 add vbe_enabled() helper, while it forget to replace the code in vbe_ioport_write_data(). Signed-off-by: Wang Xin <wangxinxin.wang@huawei.com> --- hw/display/vga.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)