From nobody Mon Feb 9 15:55:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=jablonski.xyz ARC-Seal: i=1; a=rsa-sha256; t=1768531496; cv=none; d=zohomail.com; s=zohoarc; b=MfsovB6mIYEJcPfIRT8bTqkQQuqjqHMcK8u/+XH2M+rcES3SxmpfTk7wudtKW3b2rCqDpY7Jp7PVqzYAt8NUQjM/Ej4IIhz7MrT52DOvREZPWs3jGfzmcczLHgG+3rPIkrpdVlCRMkzy0KY/qLN3Q9mi4xsmsNKjIDpNE4LN+qQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768531496; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xXARdxSoThdAoSgU0MiSr+42Qqr3VDhiqVj+t/lO+Og=; b=CMZsXS1LfqRNFdPLGdFO02ucgDo9Z2BsCw0q6fyQxePpN+v0e48l6tUbwDLQwkrFL9MjcqLEUUeQNiXAA2BZW85D4YIuMO9duSwEb8Y/SqrTGvrZBO0pDGNzZfZ9QFIPdBo03bXKXEnANoB26nAhug3J67jlSIO/Tpbei4wYXE4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768531496875830.8417173371598; Thu, 15 Jan 2026 18:44:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vgZoU-0005zI-1t; Thu, 15 Jan 2026 21:43:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vgZo0-0005qW-OG for qemu-devel@nongnu.org; Thu, 15 Jan 2026 21:43:22 -0500 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vgZnt-0002QM-VF for qemu-devel@nongnu.org; Thu, 15 Jan 2026 21:43:17 -0500 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id EA7BE1D0007A; Thu, 15 Jan 2026 21:43:10 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Thu, 15 Jan 2026 21:43:11 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Jan 2026 21:43:10 -0500 (EST) Received: from localhost (chomposaur [local]) by chomposaur (OpenSMTPD) with ESMTPA id 4f7071b3; Fri, 16 Jan 2026 02:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jablonski.xyz; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1768531390; x= 1768617790; bh=xXARdxSoThdAoSgU0MiSr+42Qqr3VDhiqVj+t/lO+Og=; b=I 3atU2UJ9lJIyyGXC9f2RzKvSTlJyIwMQXyPUgJct6qPHZWWyJBuhUyzUhGYEx5n2 HiZt2lnPL15iwhTUQLqqMbNuoVJ8frwdw29fy0DBRb9hNyvMyOKou5S4sAk+/35Z CjNnd/cLlp0LgnieFcPcmu9KCtltgWtBuhJAqWA1+J3khT2tHfmzwzzizujIlD6P 0e5XyLNssMDdS2C+pExcZ1mNTGR1Y4yno4djnJh5mLvvp4O2jk4nnKeuc++HPUV2 +0z4NLd5OQJ6dYhyROmm0mrI384X3YS8F97ThB5SqleArdXodtpSzYoF9yIbuoSU 3FrpMwRxjUzEeLf9WJDRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1768531390; x=1768617790; bh=x XARdxSoThdAoSgU0MiSr+42Qqr3VDhiqVj+t/lO+Og=; b=pkG3eoagc6qpNbzEf FdizzNpy3n6NP5ZbKWAMWIi/5G2sL3slFQiVDsmY72qa4PYl3YfpVKSHBaofkNFQ uQ0u8irEA1n0vRc6EphzgMtRQLjVt2+Z/05OfD/QzPM63bpWHYKSoykp1OMlvkES srGbbDN524Jq1RBpLbDbQGLPg6sNh9v+GzU8uParr2z2FJSrc7Ev3BGuZpss5xjV y7e/g9Ha93zkq+UEisJLoXCkGgM3C5PsSOOWVO/KDZw28Mf6EJ/IpXUwgTH/KneU hMGum8jgSBXQ64ie/SjezDVTIn3hVUzSwhRw+O/Um67zsp/IKVs04QQLlqC3Gjny z21Wg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduvdejjeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvfevuf ffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeevhhgrugculfgrsghlohhnshhk ihcuoegthhgrugesjhgrsghlohhnshhkihdrgiihiieqnecuggftrfgrthhtvghrnhepgf eiteejhfelheefieetjefgleejfffhueffvdduieejgfeuueeuvddvkeejhfelnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptghhrggusehjrg gslhhonhhskhhirdighiiipdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopegthhgrugesjhgrsghlohhnshhkihdrgiihiidprhgtphhtthhope hqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgpdhrtghpthhtohepsggrlhgrthho nhesvghikhdrsghmvgdrhhhu X-ME-Proxy: Feedback-ID: ib26944c1:Fastmail From: Chad Jablonski To: qemu-devel@nongnu.org Cc: balaton@eik.bme.hu, Chad Jablonski Subject: [PATCH v5 02/12] ati-vga: Read aliased values from DP_GUI_MASTER_CNTL Date: Thu, 15 Jan 2026 21:42:48 -0500 Message-ID: <20260116024258.1487173-3-chad@jablonski.xyz> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20260116024258.1487173-1-chad@jablonski.xyz> References: <20260116024258.1487173-1-chad@jablonski.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=202.12.124.151; envelope-from=chad@jablonski.xyz; helo=fout-b8-smtp.messagingengine.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, PDS_OTHER_BAD_TLD=1.999, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @jablonski.xyz) X-ZM-MESSAGEID: 1768531497299158500 Content-Type: text/plain; charset="utf-8" DP_GUI_MASTER_CNTL aliases several fields from DP_DATATYPE and DP_MIX. These were being written correctly but not returned on a read of GP_GUI_MASTER_CNTL. Signed-off-by: Chad Jablonski --- hw/display/ati.c | 17 +++++++++++++++-- hw/display/ati_regs.h | 5 +++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 6967cc0ad9..b0c87f9f80 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -459,9 +459,22 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr,= unsigned int size) case DST_Y: val =3D s->regs.dst_y; break; - case DP_GUI_MASTER_CNTL: - val =3D s->regs.dp_gui_master_cntl; + case DP_GUI_MASTER_CNTL: { + /* DP_GUI_MASTER_CNTL aliases fields from DP_MIX and DP_DATATYPE */ + uint32_t dst_datatype =3D s->regs.dp_datatype & DP_DST_DATATYPE; + uint32_t brush_datatype =3D (s->regs.dp_datatype & + DP_BRUSH_DATATYPE) >> 8; + uint32_t src_datatype =3D (s->regs.dp_datatype & DP_SRC_DATATYPE) = >> 16; + uint32_t src_source =3D (s->regs.dp_mix & DP_SRC_SOURCE) >> 8; + uint32_t rop3 =3D (s->regs.dp_mix & DP_ROP3) >> 16; + val =3D s->regs.dp_gui_master_cntl | + (brush_datatype << 4) | + (dst_datatype << 8) | + (src_datatype << 12) | + (rop3 << 16) | + (src_source << 24); break; + } case SRC_OFFSET: val =3D s->regs.src_offset; break; diff --git a/hw/display/ati_regs.h b/hw/display/ati_regs.h index d7127748ff..0a0825db04 100644 --- a/hw/display/ati_regs.h +++ b/hw/display/ati_regs.h @@ -386,6 +386,9 @@ #define DST_16BPP 0x00000004 #define DST_24BPP 0x00000005 #define DST_32BPP 0x00000006 +#define DP_DST_DATATYPE 0x0000000f +#define DP_BRUSH_DATATYPE 0x00000f00 +#define DP_SRC_DATATYPE 0x00030000 =20 #define BRUSH_SOLIDCOLOR 0x00000d00 =20 @@ -437,6 +440,8 @@ #define DP_SRC_RECT 0x00000200 #define DP_SRC_HOST 0x00000300 #define DP_SRC_HOST_BYTEALIGN 0x00000400 +#define DP_SRC_SOURCE 0x00000700 +#define DP_ROP3 0x00ff0000 =20 /* LVDS_GEN_CNTL constants */ #define LVDS_BL_MOD_LEVEL_MASK 0x0000ff00 --=20 2.51.2