>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
>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 [email protected]:/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 <[email protected]>
--- 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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.