NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-sgimips/60585: newport(4) graphic console black-on-black since 9.0 (silent rasops_init() failure)



>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  mkrepro%mkrepro.NetBSD.org@localhost:/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@localhost>

--- 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);




Home | Main Index | Thread Index | Old Index