NetBSD Problem Report #60585
From www@netbsd.org Fri Aug 14 17:22:33 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 6A76E1A923B
for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 Aug 2026 17:22:33 +0000 (UTC)
Message-Id: <20260814172232.2276F1A923C@mollari.NetBSD.org>
Date: Fri, 14 Aug 2026 17:22:32 +0000 (UTC)
From: kaloz@dune.hu
Reply-To: kaloz@dune.hu
To: gnats-bugs@NetBSD.org
Subject: newport(4) graphic console black-on-black since 9.0 (silent rasops_init() failure)
X-Send-Pr-Version: www-1.0
X-From4GNATS: "kaloz@dune.hu via gnats" <gnats-admin@NetBSD.org>
>Number: 60585
>Category: port-sgimips
>Synopsis: newport(4) graphic console black-on-black since 9.0 (silent rasops_init() failure)
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-sgimips-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 14 17:25:00 +0000 2026
>Last-Modified: Tue Aug 18 21:30:02 +0000 2026
>Originator: Imre Kaloz
>Release: 9.0 through HEAD
>Organization:
>Environment:
NetBSD netbsd 11.0 NetBSD 11.0 (GENERIC32_IP2x) #0: Thu Jul 30 15:23:12 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sgimips/compile/GENERIC32_IP2x sgimips
>Description:
newport_init_screen() (sys/arch/sgimips/gio/newport.c) sets ri_stride directly from dc_xres, the VC2-derived horizontal resolution (1282, not a multiple of 4), then calls rasops_init(), which rejects unaligned ri_stride and returns -1 before populating ri_devcmap[] - unchecked by newport_init_screen() or newport_cnattach(). ri_devcmap[] stays all-zero, so every COLORI/COLORBACK resolves to the same color as its background regardless of the correct attribute reaching newport_putchar(): black text on black, only the cursor visible.
Unconditional since sys/dev/rasops/rasops.c r1.89 (2019-07-26, four days before netbsd-9-base); NetBSD 8.x compiles the same check only under DEBUG
>How-To-Repeat:
boot NetBSD/sgimips >= 9.0 on an Indy with the graphical console
>Fix:
Signed-off-by: Imre Kaloz <kaloz@dune.hu>
--- a/sys/arch/sgimips/gio/newport.c
+++ b/sys/arch/sgimips/gio/newport.c
@@ -691,7 +691,14 @@ newport_init_screen(void *cookie, struct vcons_screen *scr,
ri->ri_depth = 8;
ri->ri_width = dc->dc_xres;
ri->ri_height = dc->dc_yres;
- ri->ri_stride = dc->dc_xres; /* XXX */
+ /*
+ * rasops_init() requires ri_stride to be a multiple of 4;
+ * dc_xres comes from the VC2 video timing table and is not
+ * guaranteed to be one (the Indy's table yields 1282).
+ * newport does all drawing through REX3 register blits, with
+ * no linear framebuffer, so the stride is not otherwise used.
+ */
+ ri->ri_stride = roundup(dc->dc_xres, 4);
ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_8BIT_IS_RGB;
rasops_init(ri, 0, 0);
>Audit-Trail:
From: "Adrian Chadd" <adrian@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60585 CVS commit: src/sys/arch/sgimips/gio
Date: Tue, 18 Aug 2026 21:27:30 +0000
Module Name: src
Committed By: adrian
Date: Tue Aug 18 21:27:29 UTC 2026
Modified Files:
src/sys/arch/sgimips/gio: newport.c
Log Message:
newport: ensure a valid ri_stride is provided to rasops_init()
The x resolution is calculated by timings programmed into VC2, rather
than some kind of hard coded width/height from the framebuffer.
Newport always supports up to 1280x1024 regardless of what your monitor
resolution is.
However for some monitor detection timings, the resulting geometry
is not ENTIRELY correct for rasops to work with. So just round it up
to a multiple of four so a newport console will always show up regardless
of said monitor timing.
Submitted by Imre Kaloz <kaloz@dune.hu> .
Fixes PR port-sgimips/60585 .
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sgimips/gio/newport.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.