From nobody Tue Feb 10 09:57:51 2026 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; 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 1530698077230803.0179388084247; Wed, 4 Jul 2018 02:54:37 -0700 (PDT) Received: from localhost ([::1]:44965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faeUe-0003sO-KX for importer@patchew.org; Wed, 04 Jul 2018 05:54:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faeOo-0008D6-AG for qemu-devel@nongnu.org; Wed, 04 Jul 2018 05:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faeOj-0003ux-Cs for qemu-devel@nongnu.org; Wed, 04 Jul 2018 05:48:34 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:46735) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1faeOj-0003uR-5B for qemu-devel@nongnu.org; Wed, 04 Jul 2018 05:48:29 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id AD6BB7456B8; Wed, 4 Jul 2018 11:48:27 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 6BC7F7456C7; Wed, 4 Jul 2018 11:48:27 +0200 (CEST) Message-Id: <8412fd970b69ee1e3313d27590c90b31acc64e4c.1530697258.git.balaton@eik.bme.hu> In-Reply-To: References: From: Sebastian Bauer Date: Wed, 04 Jul 2018 11:40:58 +0200 To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH v3 5/7] 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: Peter Maydell , Sebastian Bauer , Magnus Damm , Philippe Mathieu-Daude , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- hw/display/sm501.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 0b44d95..ebd1390 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.7.6