From nobody Wed Nov 5 22:43:06 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537859410548601.0519485398446; Tue, 25 Sep 2018 00:10:10 -0700 (PDT) Received: from localhost ([::1]:51292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4hTx-0005nN-Kl for importer@patchew.org; Tue, 25 Sep 2018 03:10:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4hMK-0006uH-Ef for qemu-devel@nongnu.org; Tue, 25 Sep 2018 03:02:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4hMJ-0006Q2-AG for qemu-devel@nongnu.org; Tue, 25 Sep 2018 03:02:12 -0400 Received: from ozlabs.org ([203.11.71.1]:51553) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g4hMI-0006Nj-75; Tue, 25 Sep 2018 03:02:10 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 42KBp05fjgz9sCm; Tue, 25 Sep 2018 17:02:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1537858920; bh=sypZoMskzeKJbT7ou/0eYhYDWaaXR3CpWrzZqZKvBWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g0YNbQkmhx89boCo1Usw9+ovr4EL0ihLkLO838PE2Ggz3RkovH5tPGjOWhJJ090n5 Vv1hew8zNJo0DEFKvP1Pm9eBwLZbl+L5KOW3LamvMdzOCci6WO9CoAYnYTl9eTWZsT ygdwqvDxCVn1yOmmB1SkZuiIz7u6yh76XHu2Iv6w= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 25 Sep 2018 17:01:49 +1000 Message-Id: <20180925070154.5812-10-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925070154.5812-1-david@gibson.dropbear.id.au> References: <20180925070154.5812-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 09/14] sm501: Adjust endianness of pixel value in rectangle fill X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, Marcus Comstedt , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Marcus Comstedt The value from twoD_foreground (which is in host endian format) must be converted to the endianness of the framebuffer (currently always little endian) before it can be used to perform the fill operation. Signed-off-by: Marcus Comstedt Reviewed-by: BALATON Zoltan Reviewed-by: Peter Maydell Signed-off-by: David Gibson --- hw/display/sm501.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 874260a143..4a8686f0f5 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -39,6 +39,7 @@ #include "hw/i2c/i2c-ddc.h" #include "qemu/range.h" #include "ui/pixel_ops.h" +#include "qemu/bswap.h" =20 /* * Status: 2010/05/07 @@ -812,9 +813,11 @@ static void sm501_2d_operation(SM501State *s) FILL_RECT(1, uint8_t); break; case 1: + color =3D cpu_to_le16(color); FILL_RECT(2, uint16_t); break; case 2: + color =3D cpu_to_le32(color); FILL_RECT(4, uint32_t); break; } --=20 2.17.1