Port-sparc archive

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

Re: Panic at boot on 4/330 with cgfour and cgsix



mouse@ wrote:

> > AFAIK cgfour(4) is a simple 8 bpp dumb framebuffer,
> 
> Maybe that's part of the problem, then, in that cgfour(4) is supporting
> only part of the hardware?  IIRC the cg4 has ten bits per pixel, eight
> of them organized as a cg3-style 8bpp colour framebuffer, one as a 1bpp
> framebuffer (rather like a bw2 except with a two-entry colourmap), and
> the tenth bit looks from the CPU's point of view like another 1bpp
> framebuffer, except instead of getting displayed directly it controls,
> per-pixel, whether the 8bpp or 1bpp framebuffer gets displayed.  IIRC
> the intended use was for the 1bpp framebuffer to be used for window
> decorations and 1bpp applications, with the 8bpp framebuffer used for
> more colour-demanding applications.  It's not that hard to handle in X;
> I did something similar for the cg14, supporting 24bpp and 8bpp at the
> same time....

Maybe you mean this:

 https://github.com/NetBSD/xsrc/blob/netbsd-10/external/mit/xorg-server/dist/hw/sun/sunCfb.c#L485-L502

---
#define	CG4_HEIGHT	900
#define	CG4_WIDTH	1152

#define	CG4_MELEN	    (128*1024)

typedef struct {
    u_char mpixel[CG4_MELEN];		/* bit-per-pixel memory */
    u_char epixel[CG4_MELEN];		/* enable plane */
    u_char cpixel[CG4_HEIGHT][CG4_WIDTH];	/* byte-per-pixel memory */
} *CG4Ptr, CG4Rec;

static void
CG4Switch(ScreenPtr pScreen, int select)
{
    CG4Ptr	fb = (CG4Ptr) sunFbs[pScreen->myNum].fb;

    (void) memset ((char *)fb->epixel, select ? ~0 : 0, CG4_MELEN);
}
---

> Is wscons capable of representing such a thing?  If not, perhaps that's
> part of the problem?

For console text support, they are attached as bwtwo and cgfour
independently and using only cgfour part with rasops is enough
to putchar ops, I guess.

For bitmap ops, our X.org'fied ancient Xsun server
(with old sun fb(4) APIs, not MI wscons) is enough..
 https://x.com/tsutsuii/status/1296479465753780230 

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index