[PATCH 2/4] ati-vga: Also switch mode on HW cursor enable bit change

BALATON Zoltan posted 4 patches 3 weeks, 1 day ago
There is a newer version of this series
[PATCH 2/4] ati-vga: Also switch mode on HW cursor enable bit change
Posted by BALATON Zoltan 3 weeks, 1 day ago
This does nothing for most drivers but works around issue and fixes
output with the Solaris R128 driver that only sets display parameters
after enabling CRT controller which we would miss otherwise.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/display/ati.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/ati.c b/hw/display/ati.c
index 05cf507bd4..1a6a5ad4fd 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -617,6 +617,7 @@ static void ati_mm_write(void *opaque, hwaddr addr,
         ati_reg_write_offs(&s->regs.crtc_gen_cntl,
                            addr - CRTC_GEN_CNTL, data, size);
         if ((val & CRTC2_CUR_EN) != (s->regs.crtc_gen_cntl & CRTC2_CUR_EN)) {
+            ati_vga_switch_mode(s);
             if (s->cursor_guest_mode) {
                 s->vga.force_shadow = !!(s->regs.crtc_gen_cntl & CRTC2_CUR_EN);
             } else {
-- 
2.41.3
Re: [PATCH 2/4] ati-vga: Also switch mode on HW cursor enable bit change
Posted by Chad Jablonski 2 weeks, 6 days ago
Tested this on x86_64 Solaris 10. Prior to the patch xterm under XOrg is
drawn incorrectly. It looks like scanlines are drawn every other line.
After, xterm is drawn correctly.

Tested-by: Chad Jablonski <chad@jablonski.xyz>
Reviewed-by: Chad Jablonski <chad@jablonski.xyz>