From nobody Mon Feb 9 09:15:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566461265; cv=none; d=zoho.com; s=zohoarc; b=nr2kveW+FuSRV8E00Nx9iBhBRlApJpo2aTCt1n9HCHaFuTtn4vCRfPJLG5/c2K3OmbN0Q2KL9GOyo94Ipqpf9X5PJgwJtzVCsXIjTWQLQ5L41nUpTFz7uuM5d3Bx/bUreQeQ0/VZtPV8xNuwUZ42WgPHoKUiQm+j0Eob3r2Uxwk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566461265; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=3aUjE9BEO54QxU9xlIZZ68/qCLIXlB+jnmtQFRwRgJw=; b=nfFG/HdJaRsh+ZNK9+lNivJkzxvuKX/W/QxIkvWbCTgeuFln+b4fM/oenJcsmams+T+1o8dCT87eATqU+uZJNyueEPXZzIdIOY0BTL/J4zwLNhYYJajSTi+E9iwmxldS6hD8nwmQpLF9HJbamZp0d/NeKIqZEqdUjipZDU2aFvQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566461265380208.42672402007702; Thu, 22 Aug 2019 01:07:45 -0700 (PDT) Received: from localhost ([::1]:39060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0i8C-0000IZ-Nd for importer@patchew.org; Thu, 22 Aug 2019 04:07:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53924) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0i5m-0007Ly-0l for qemu-devel@nongnu.org; Thu, 22 Aug 2019 04:05:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0i5k-0005pJ-PH for qemu-devel@nongnu.org; Thu, 22 Aug 2019 04:05:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55240) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i0i5k-0005oO-JG for qemu-devel@nongnu.org; Thu, 22 Aug 2019 04:05:08 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D32EB30832C8; Thu, 22 Aug 2019 08:05:07 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D17D60605; Thu, 22 Aug 2019 08:05:07 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3365993E3; Thu, 22 Aug 2019 10:05:03 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 22 Aug 2019 10:04:59 +0200 Message-Id: <20190822080503.12063-6-kraxel@redhat.com> In-Reply-To: <20190822080503.12063-1-kraxel@redhat.com> References: <20190822080503.12063-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 22 Aug 2019 08:05:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/8] ati-vga: Fix hardware cursor image offset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan The crtc_offset is not needed, cur_offset is relative to the start of vram not the start of displayed area. This fixes broken pointer image with MacOS that uses non-0 crtc_offset. Signed-off-by: BALATON Zoltan Message-id: e6acb1fa3ca980dc948045443e5986e2aa79bf7c.1565558093.git.balaton= @eik.bme.hu Signed-off-by: Gerd Hoffmann --- hw/display/ati.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index d372e346ffd9..ff04f7eb4a2d 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -132,9 +132,8 @@ static void ati_cursor_define(ATIVGAState *s) return; /* Do not update cursor if locked or rendered by guest */ } /* FIXME handle cur_hv_offs correctly */ - src =3D s->vga.vram_ptr + (s->regs.crtc_offset & 0x07ffffff) + - s->regs.cur_offset - (s->regs.cur_hv_offs >> 16) - - (s->regs.cur_hv_offs & 0xffff) * 16; + src =3D s->vga.vram_ptr + s->regs.cur_offset - + (s->regs.cur_hv_offs >> 16) - (s->regs.cur_hv_offs & 0xffff) * 1= 6; for (i =3D 0; i < 64; i++) { for (j =3D 0; j < 8; j++, idx++) { data[idx] =3D src[i * 16 + j]; @@ -190,8 +189,7 @@ static void ati_cursor_draw_line(VGACommonState *vga, u= int8_t *d, int scr_y) return; } /* FIXME handle cur_hv_offs correctly */ - src =3D s->vga.vram_ptr + (s->regs.crtc_offset & 0x07ffffff) + - s->cursor_offset + (scr_y - vga->hw_cursor_y) * 16; + src =3D s->vga.vram_ptr + s->cursor_offset + (scr_y - vga->hw_cursor_y= ) * 16; dp =3D &dp[vga->hw_cursor_x]; h =3D ((s->regs.crtc_h_total_disp >> 16) + 1) * 8; for (i =3D 0; i < 8; i++) { --=20 2.18.1