From nobody Thu Jan 8 15:12:57 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=1767216148; cv=none; d=zohomail.com; s=zohoarc; b=PnowKh2WPekdNx0F5luEo2XASEsQoRoymFAYo490aww1DKnq5AwBb6ir/9FOzI76zkmfcr5bG0cl5BaQU8P9qH6TIQ4MxJoYDh/AcuKmxbWBKbCNTP1jNRPcuzBhK7rx5lY1ArqbV0gLBRP6FFQcbRHWuT3bjoFSMAkmcEphdM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767216148; 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=DVEcA6/vb4PpKi3BScNtdzOM0zTGfMYeT/9Yf5tvYMA=; b=V17D3R52h+BRUQQhouLYAkWUH16x3HdDScHw3e+VFywYMoCW/0Y3ZkVai6jY3OomsgAxauVh+OL4LwRZpI17tLkqh+4OyOkLsbCqKfCpb7VJgFUGC2Ij+hrTTkToDnTmUdiddSNnbJKC48pA7NlvAEb5CpkJw6vpb605NUVQN+I= 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 1767216147744275.4076179534941; Wed, 31 Dec 2025 13:22:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vb3dS-0000rT-HA; Wed, 31 Dec 2025 16:21:38 -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 1vb3dL-0000pX-3S for qemu-devel@nongnu.org; Wed, 31 Dec 2025 16:21:32 -0500 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vb3dJ-0003i3-2t for qemu-devel@nongnu.org; Wed, 31 Dec 2025 16:21:30 -0500 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 11480EC0201; Wed, 31 Dec 2025 16:21:28 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Wed, 31 Dec 2025 16:21:28 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Dec 2025 16:21:27 -0500 (EST) Received: from localhost (chomposaur [local]) by chomposaur (OpenSMTPD) with ESMTPA id 4ced2b79; Wed, 31 Dec 2025 21:21:25 +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=1767216088; x= 1767302488; bh=DVEcA6/vb4PpKi3BScNtdzOM0zTGfMYeT/9Yf5tvYMA=; b=K U5UexAeZYspw30e65UuKaiAIIrPYPtzsupMNxYyH9bifejQjxK9Byypphbd+Ls2P 7TMoot8qtC8DAzstbfUGBkd5mfDYSc60qJgsA9/Rt0aubMmmkDbJ7EzQfCe84ZGv myROLzOSRv4I63Loiyq+AT5pOStdjEmxV79ym3TA39Qao5Q1g0ZyjYKy8WZ4Xe14 gvkImqlJBz/BKOGrSSVLzPVLfCqOcMYmD5ju6Hb/4kfgOt70wKP+p3qWiEX/FPGz 7TdNIATl5TPANGycpGUyR6RRK4m/7fC+CKdOnjs3S0CbsgaJXMhWThLPwy5HzkeP MgHbOq07cynWvBx34vzyg== 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=1767216088; x=1767302488; bh=D VEcA6/vb4PpKi3BScNtdzOM0zTGfMYeT/9Yf5tvYMA=; b=iGRjUnju+Zf2i9b9n Kt/sClJsdAvDwVOfwC2wS9XY+gXwxx5Frey/f59LQYAuSW21fE8ala4rBJ+ABizj bVYJL2qrRy09o4WcZR2FsBBa9NkH+pzbecB6SEOUwMpwWg3dP1BFGj5lFxhsRvGU r/IVVMEp8wwcR8Oizr772btGU9j6P25MTvo3aAPDyBT/47xOOGLwGD1lYb3P8lbI yZFbrF6bKHiTc+ZkWU3eVxlMbYuSkTrd189TimKlt5L7hGbyCjEZOIQQmUAXyvKO Z14/YwZUfsSLHIQ+pgmfKthe/zE14/4+J+9ctu8F+PcX69qppwuY3pY9GPwId5CM 2acYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdekfeeljecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhephffvvefuff fkofgjfhgggfestdekredtredttdenucfhrhhomhepvehhrgguucflrggslhhonhhskhhi uceotghhrggusehjrggslhhonhhskhhirdighiiiqeenucggtffrrghtthgvrhhnpefgie etjefhleehfeeiteejgfeljeffhfeuffdvudeijefgueeuuedvvdekjefhleenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegthhgrugesjhgrsg hlohhnshhkihdrgiihiidpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepsggrlhgrthhonhesvghikhdrsghmvgdrhhhupdhrtghpthhtoheptg hhrggusehjrggslhhonhhskhhirdighiiipdhrtghpthhtohepqhgvmhhuqdguvghvvghl sehnohhnghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: ib26944c1:Fastmail From: Chad Jablonski To: qemu-devel@nongnu.org Cc: balaton@eik.bme.hu, Chad Jablonski Subject: [PATCH 4/7] ati-vga: Implement PM4_MICRO_CNTL register Date: Wed, 31 Dec 2025 16:21:04 -0500 Message-ID: <20251231212107.1020964-5-chad@jablonski.xyz> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251231212107.1020964-1-chad@jablonski.xyz> References: <20251231212107.1020964-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=103.168.172.150; envelope-from=chad@jablonski.xyz; helo=fout-a7-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.498, PDS_OTHER_BAD_TLD=1.997, RCVD_IN_DNSWL_LOW=-0.7, 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: 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: 1767216166955158500 Content-Type: text/plain; charset="utf-8" The PM4_MICRO_CNTL register has a single flag that is used by drivers to enable processing of CCE commands from the CCE FIFO. Reverse engineering uncovered additional debug fields, many of which have an unclear purpose. They have been omitted for now but could be added if needed. Signed-off-by: Chad Jablonski --- hw/display/ati.c | 7 +++++++ hw/display/ati_cce.h | 2 ++ hw/display/ati_regs.h | 3 +++ 3 files changed, 12 insertions(+) diff --git a/hw/display/ati.c b/hw/display/ati.c index f8e1fe2861..a9fe0cd0d2 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -565,6 +565,9 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr, = unsigned int size) (s->cce.no_update << 27) | (s->cce.buffer_size_l2qw & 0x7ffffff); break; + case PM4_MICRO_CNTL: + val =3D s->cce.freerun ? PM4_MICRO_FREERUN : 0; + break; default: break; } @@ -1110,6 +1113,10 @@ void ati_reg_write(ATIVGAState *s, hwaddr addr, s->cce.buffer_mode =3D (data >> 28) & 0xf; break; } + case PM4_MICRO_CNTL: { + s->cce.freerun =3D data & PM4_MICRO_FREERUN; + break; + } default: break; } diff --git a/hw/display/ati_cce.h b/hw/display/ati_cce.h index 25a2430c60..a6a9aa87c4 100644 --- a/hw/display/ati_cce.h +++ b/hw/display/ati_cce.h @@ -21,6 +21,8 @@ typedef struct ATIPM4MicrocodeState { =20 typedef struct ATICCEState { ATIPM4MicrocodeState microcode; + /* MicroCntl */ + bool freerun; /* BufferCntl */ uint32_t buffer_size_l2qw; bool no_update; diff --git a/hw/display/ati_regs.h b/hw/display/ati_regs.h index 94b7ed0d37..190b99184c 100644 --- a/hw/display/ati_regs.h +++ b/hw/display/ati_regs.h @@ -401,6 +401,9 @@ #define PM4_BUFFER_CNTL_64BM_64VCBM_64INDBM 0x00000008 #define PM4_BUFFER_CNTL_64PIO_64VCPIO_64INPIO 0x0000000f =20 +/* PM4_MICRO_CNTL bit constants */ +#define PM4_MICRO_FREERUN 0x40000000 + /* DP_DATATYPE bit constants */ #define DST_8BPP 0x00000002 #define DST_15BPP 0x00000003 --=20 2.51.2