NetBSD Problem Report #60866
From www@netbsd.org Sun Oct 11 06:42:10 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 "YR1" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 3197E1A923B
for <gnats-bugs@gnats.NetBSD.org>; Sun, 11 Oct 2026 06:42:10 +0000 (UTC)
Message-Id: <20261011064209.53C901A923C@mollari.NetBSD.org>
Date: Sun, 11 Oct 2026 06:42:09 +0000 (UTC)
From: nathanialsloss@yahoo.com.au
Reply-To: nathanialsloss@yahoo.com.au
To: gnats-bugs@NetBSD.org
Subject: wsfb/genfb is too fat...
X-Send-Pr-Version: www-1.0
X-From4GNATS: "nathanialsloss@yahoo.com.au via gnats" <gnats-admin@NetBSD.org>
>Number: 60866
>Category: kern
>Synopsis: wsfb/genfb is too fat...
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 11 06:45:00 +0000 2026
>Last-Modified: Tue Oct 13 00:15:01 +0000 2026
>Originator: Nat Sloss
>Release: NetBSD-current 11,99.1
>Organization:
>Environment:
NetBSD animal 11.99.1 NetBSD 11.99.1 (PHIL2025) #276: Wed Feb 4 10:00:08 AEDT 2026 build@microrusty:/home/build/nbsd-x86-64/sys/arch/amd64/compile/PHIL2025 amd64
>Description:
When the kernel attaches genfb it pulls in rasops1-32 and splash.
On some machines (ie mac68k) rasops15-32 and splash are never used.
Conversely rasops1-4 probably will never be used on amd64 either.
>How-To-Repeat:
Build a kernel notice that unusable rasops bit depths are included.
>Fix:
I tried changing define genfb.... to defflag in files.wsfb.
But my make foo is not very good and this would mean adding options genfb to all kernel configs using wsfb and removing the unused rasops
with no options rasops...
I'm hoping there is a better way.
Best regards,
Nat
>Audit-Trail:
From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/60866: wsfb/genfb is too fat...
Date: Mon, 12 Oct 2026 00:49:38 +0300
It's a bit of a chore as the rasops$n selection happens at run time
based on the ri_depth passed by the video driver, while config(5)
expresses compile time dependencies.
>From a very quick look (and bear in mind that my config(5) is very
rusty), the way to tackle this is probably something like the
following. Every video driver needs its config line to list which
depth values it supports. E.g.
device hd64461video: hpcfbif
in files.hpcsh should become
device hd64461video: hpcfbif rasops8 rasops16
to tell config that it ever only sets depth to 8 and 16.
The abstraction layer it plugs into (that actually calls rasops)
should change from:
device hpcfb: wsemuldisplaydev, rasops1, rasops2, rasops4, rasops8, rasops15, rasops16
to just
device hpcfb: wsemuldisplaydev
and ditto for genfb and any other superstructures that should drop
their current "make me one with everything" attribute lists that list
all rasops1, ..., rasops32. Then config will only pick up the
rasops$n.c files that the video drivers compiled into the kernel will
ever need.
So if this idea works, the challenge will be to go over all the video
device drivers, look for the ri->ri_depth = N; they do and tweak their
config lines in files.*.
-uwe
From: Rin Okuyama <rokuyama.rk@gmail.com>
To: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc:
Subject: Re: kern/60866: wsfb/genfb is too fat...
Date: Tue, 13 Oct 2026 09:11:55 +0900
Hi,
On 2026/10/11 15:45, nathanialsloss@yahoo.com.au via gnats wrote:
> On some machines (ie mac68k) rasops15-32 and splash are never used.
Even for mac68k, it depends on H/W. Quadra 840AV supports
1, 4, 8, 16, and 32-bpp.
Thanks,
rin
(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.