From nobody Tue Nov 4 21:46:14 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 1531122778675247.5819428284026; Mon, 9 Jul 2018 00:52:58 -0700 (PDT) Received: from localhost ([::1]:39751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcQyX-0003CC-GF for importer@patchew.org; Mon, 09 Jul 2018 03:52:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcQq8-000531-8E for qemu-devel@nongnu.org; Mon, 09 Jul 2018 03:44:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcQq7-0002D6-5A for qemu-devel@nongnu.org; Mon, 09 Jul 2018 03:44:08 -0400 Received: from ozlabs.org ([203.11.71.1]:51937) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcQq6-0002Aq-PH; Mon, 09 Jul 2018 03:44:07 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 41PHQS4BQlz9s29; Mon, 9 Jul 2018 17:44:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1531122240; bh=1XixQfBjF9oDe8h/dsXqCfzISjyVmavgcodWxH4zDMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pxJX7U6JORwKqGNRsxKPO6ac6MIfQXoisbZCmluoIP7To7yheRpHC8vxpTdAk0Bt9 DgYdwAJBJqGezXPWbwMDWomo0K8QlA3mUGu5zlZ776Ig9T3xEROR5QzPSZ09Wu4tyE hb+iVEbab1WP6B0My27Zai1cDOxoenzb/FLGQ6ZI= From: David Gibson To: peter.maydell@linaro.org Date: Mon, 9 Jul 2018 17:43:41 +1000 Message-Id: <20180709074350.27086-8-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180709074350.27086-1-david@gibson.dropbear.id.au> References: <20180709074350.27086-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 07/16] sm501: Log unimplemented raster operation modes 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: Sebastian Bauer , qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, 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: Sebastian Bauer The sm501 currently implements only a very limited set of raster operation modes. After this change, unknown raster operation modes are logged so these can be easily spotted. Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/display/sm501.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 0b44d95169..ebd139006e 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -706,6 +706,8 @@ static void sm501_2d_operation(SM501State *s) int format_flags =3D (s->twoD_stretch >> 20) & 0x3; int addressing =3D (s->twoD_stretch >> 16) & 0xF; int rop_mode =3D (s->twoD_control >> 15) & 0x1; /* 1 for rop2, else ro= p3 */ + /* 1 if rop2 source is the pattern, otherwise the source is the bitmap= */ + int rop2_source_is_pattern =3D (s->twoD_control >> 14) & 0x1; int rop =3D s->twoD_control & 0xFF; =20 /* get frame buffer info */ @@ -719,6 +721,27 @@ static void sm501_2d_operation(SM501State *s) abort(); } =20 + if (rop_mode =3D=3D 0) { + if (rop !=3D 0xcc) { + /* Anything other than plain copies are not supported */ + qemu_log_mask(LOG_UNIMP, "sm501: rop3 mode with rop %x is not " + "supported.\n", rop); + } + } else { + if (rop2_source_is_pattern && rop !=3D 0x5) { + /* For pattern source, we support only inverse dest */ + qemu_log_mask(LOG_UNIMP, "sm501: rop2 source being the pattern= and " + "rop %x is not supported.\n", rop); + } else { + if (rop !=3D 0x5 && rop !=3D 0xc) { + /* Anything other than plain copies or inverse dest is not + * supported */ + qemu_log_mask(LOG_UNIMP, "sm501: rop mode %x is not " + "supported.\n", rop); + } + } + } + if ((s->twoD_source_base & 0x08000000) || (s->twoD_destination_base & 0x08000000)) { printf("%s: only local memory is supported.\n", __func__); --=20 2.17.1