Re: X problem on PMAGB-B
Michael <[email protected]> Sat, 15 Nov 2025 07:09:46 -0500
| Newsgroups | gmane.os.netbsd.ports.mips.devel |
|---|---|
| Message-ID | <20251115070941.79bd2129@bushmills> |
Hello, On Wed, 12 Nov 2025 16:20:29 -0800 Jason Thorpe <[email protected]> wrote: > +macallan > Oh, c’mon, give them a bit of a break. The X.org server NetBSD ships > with supports lots of dumb linear frame buffers (some dumber than > others!), largely because NetBSD people put in the effort. It’s > probably something fairly minor, or perhaps some bit-rot in the > “wscons-ification” of the PMAGB-B driver (“sfb”, I think). ENOHW, so can't reproduce, but from what I gathered from reading the thread: - the working Xserver was a specialized server with built-in support for DEC hardware? - someone switched to Xorg and now we're broken? The monitor losing sync is odd though, with hw like that we usually don't switch video modes. Colour depth maybe, or image planes vs. overlay. The hw/dec code in xf86 3.3.6 seems to do just that. Since nobody mentioned which kernel driver attached, I have to guess dev/tc/sfb.c or sfbplus.c. Neither does any video mode programming, just restoring stuff when switching back to terminal emulation. looking at sfbmmap() though: if (offset >= 0x1000000 || offset < 0) /* XXX 16MB XXX */ return (-1); return machine_btop(sc->sc_vaddr + offset); ... a whole 16MB chunk, apparently expecting VRAM at the beginning. Looking at sfbreg.h: #define SFB_ASIC_OFFSET 0x0100000 /* SFB ASIC Control Registers */ #define SFB_ASIC_SIZE 0x0020000 #define SFB_RAMDAC_OFFSET 0x01c0000 /* BrookTree RAMDAC */ #define SFB_RAMDAC_SIZE 0x0040000 ... this here: #define SFB_FB_OFFSET 0x0200000 /* Frame buffer */ #define SFB_FB_SIZE 0x0200000 ... seems to indicate 2MB FB space at 2MB into the slot's space. With registers in the first 2MB. If we hand that to wsfb it will assume VRAM starts at 0 and happily trample over a bunch of registers which may well make the hw freak out and the monitor lose sync. At the very least sfbmmap should return machine_btop(sc->sc_vaddr + SFB_FB_OFFSET + offset); when in dumb fb mode. Disclaimer: I am completely unfamiliar with the hardware, this is purely guesswork based on experience with a lot of other hardware of similar vintage. have fun Michael