* [Qemu-devel] [PATCH] vga: use vbe_enabled() helper
@ 2016-05-11 9:22 Wang Xin
2016-05-11 9:59 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Wang Xin @ 2016-05-11 9:22 UTC (permalink / raw)
To: kraxel, wangxinxin.wang; +Cc: qemu-devel
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(-)
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;
--
2.8.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] vga: use vbe_enabled() helper
2016-05-11 9:22 [Qemu-devel] [PATCH] vga: use vbe_enabled() helper Wang Xin
@ 2016-05-11 9:59 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2016-05-11 9:59 UTC (permalink / raw)
To: Wang Xin; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-11 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 9:22 [Qemu-devel] [PATCH] vga: use vbe_enabled() helper Wang Xin
2016-05-11 9:59 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).