From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1Foe-0007MZ-Nk for qemu-devel@nongnu.org; Wed, 17 Dec 2014 09:43:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1FoY-0000tv-6i for qemu-devel@nongnu.org; Wed, 17 Dec 2014 09:43:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1FoX-0000tf-Uh for qemu-devel@nongnu.org; Wed, 17 Dec 2014 09:42:58 -0500 From: Gerd Hoffmann Date: Wed, 17 Dec 2014 15:42:42 +0100 Message-Id: <1418827364-25054-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1418827364-25054-1-git-send-email-kraxel@redhat.com> References: <1418827364-25054-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 2/4] cirrus: Force use of shadow pixmap when HW cursor is enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann From: Benjamin Herrenschmidt The HW cursor cannot be painted on a shared surface. This fixes HW cursor display in Windows NT 4.0 and Windows 98. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 2725264..686b062 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -1351,7 +1351,6 @@ static void cirrus_vga_write_sr(CirrusVGAState * s, uint32_t val) case 0x0d: // VCLK 2 case 0x0e: // VCLK 3 case 0x0f: // DRAM Control - case 0x12: // Graphics Cursor Attribute case 0x13: // Graphics Cursor Pattern Address case 0x14: // Scratch Register 2 case 0x15: // Scratch Register 3 @@ -1370,6 +1369,14 @@ static void cirrus_vga_write_sr(CirrusVGAState * s, uint32_t val) s->vga.sr_index, val); #endif break; + case 0x12: // Graphics Cursor Attribute + s->vga.sr[0x12] = val; + s->vga.force_shadow = !!(val & CIRRUS_CURSOR_SHOW); +#ifdef DEBUG_CIRRUS + printf("cirrus: cursor ctl SR12=%02x (force shadow: %d)\n", + val, s->vga.force_shadow); +#endif + break; case 0x17: // Configuration Readback and Extended Control s->vga.sr[s->vga.sr_index] = (s->vga.sr[s->vga.sr_index] & 0x38) | (val & 0xc7); -- 1.8.3.1