From nobody Mon Feb 9 19:58:02 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 ARC-Seal: i=1; a=rsa-sha256; t=1562152186; cv=none; d=zoho.com; s=zohoarc; b=LsgJqC5STu6xlw/Bz9EUI/XBPOM/6btzLlNEH219aWUiCeYuARIBmj17ck0P8FYxsODNfzCwJQsnNCe03ang1okF127MwLNRS9FnpwGSr3W5/tOFbK/x65CfOWrol+5FUeFKKiIOwVtaZrhTt4640MabaPMJqytfX2zD7NmIO7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562152186; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=LwjGbyKdKcOMHj/EQXfTNHcGlG9Q1JiF9j8yag8oPxw=; b=Zv93DILmapCzRFuvulDNSPegYyg2mz5BR48XHtkmz4G9P62uZuGEpC1t2pNdpIEQ8jDeLoNReKXdHAJ3Flj2E7CWAqeammfdsYcMZXeA2dzpETLnzIZKwNuuC43VkT68XF5ehU4wZAHCBaa4bRlDU3uGj5ZAawZXuq3+LI40B70= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562152186219242.93596701806757; Wed, 3 Jul 2019 04:09:46 -0700 (PDT) Received: from localhost ([::1]:34930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hid8n-0001AL-Sx for importer@patchew.org; Wed, 03 Jul 2019 07:09:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59958) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hid1E-0000le-Gq for qemu-devel@nongnu.org; Wed, 03 Jul 2019 07:01:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hid1D-0005EF-As for qemu-devel@nongnu.org; Wed, 03 Jul 2019 07:01:44 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:44209) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hid1C-00054W-Ua for qemu-devel@nongnu.org; Wed, 03 Jul 2019 07:01:43 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 9FD097461AE; Wed, 3 Jul 2019 13:01:38 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 257447462BB; Wed, 3 Jul 2019 13:01:38 +0200 (CEST) Message-Id: <439aa85061f103446df7b42632d730971a372432.1562151410.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Date: Wed, 03 Jul 2019 12:56:50 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 Subject: [Qemu-devel] [PATCH 2/3] ati-vga: Fix frame buffer endianness for big endian target 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-Type: text/plain; charset="utf-8" The extended mode frame buffer should be little endian even when emulating big endian machine (such as PPC). This fixes color problems with MorphOS. Signed-off-by: BALATON Zoltan --- hw/display/ati.c | 1 + hw/display/ati_2d.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index c1d9d1518f..590362ea56 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -89,6 +89,7 @@ static void ati_vga_switch_mode(ATIVGAState *s) DPRINTF("Switching to %dx%d %d %d @ %x\n", h, v, stride, bpp, = offs); vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_ENABLE); vbe_ioport_write_data(&s->vga, 0, VBE_DISPI_DISABLED); + s->vga.big_endian_fb =3D false; /* reset VBE regs then set up mode */ s->vga.vbe_regs[VBE_DISPI_INDEX_XRES] =3D h; s->vga.vbe_regs[VBE_DISPI_INDEX_YRES] =3D v; diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c index c31142af6e..b09753320a 100644 --- a/hw/display/ati_2d.c +++ b/hw/display/ati_2d.c @@ -124,15 +124,15 @@ void ati_2d_blt(ATIVGAState *s) =20 switch (s->regs.dp_mix & GMC_ROP3_MASK) { case ROP3_PATCOPY: - filler =3D bswap32(s->regs.dp_brush_frgd_clr); + filler =3D s->regs.dp_brush_frgd_clr; break; case ROP3_BLACKNESS: - filler =3D rgb_to_pixel32(s->vga.palette[0], s->vga.palette[1], - s->vga.palette[2]) << 8 | 0xff; + filler =3D 0xffUL << 24 | rgb_to_pixel32(s->vga.palette[0], + s->vga.palette[1], s->vga.palette[2]); break; case ROP3_WHITENESS: - filler =3D rgb_to_pixel32(s->vga.palette[3], s->vga.palette[4], - s->vga.palette[5]) << 8 | 0xff; + filler =3D 0xffUL << 24 | rgb_to_pixel32(s->vga.palette[3], + s->vga.palette[4], s->vga.palette[5]); break; } =20 --=20 2.13.7