CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Oct 1 07:44:22 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: simplify putchar() a bit, use 16bit accesses for fonts that are more than 8 pixels wide To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Oct 1 07:44:22 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: simplify putchar() a bit, use 16bit accesses for fonts that are more than 8 pixels wide To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.16 src/sys/arch/hppa/dev/hyperfb.c:1.17 --- src/sys/arch/hppa/dev/hyperfb.c:1.16 Tue Oct 1 06:21:10 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Tue Oct 1 07:44:22 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.16 2024/10/01 06:21:10 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.17 2024/10/01 07:44:22 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.16 2024/10/01 06:21:10 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.17 2024/10/01 07:44:22 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -1120,7 +1120,7 @@ hyperfb_putchar(void *cookie, int row, i struct wsdisplay_font *font = PICK_FONT(ri, c); struct vcons_screen *scr = ri->ri_hw; struct hyperfb_softc *sc = scr->scr_cookie; - uint8_t *data; + void *data; int i, x, y, wi, he/*, rv = GC_NOPE*/; uint32_t bg, fg, mask; @@ -1171,22 +1171,22 @@ hyperfb_putchar(void *cookie, int row, i * character */ if (ri->ri_font->stride == 1) { + uint8_t *data8 = data; for (i = 0; i < he; i++) { hyperfb_wait_fifo(sc, 2); - mask = ((uint32_t)*data) << 24; - hyperfb_write4(sc, NGLE_REG_8, mask); + mask = *data8; + hyperfb_write4(sc, NGLE_REG_8, mask << 24); hyperfb_write4(sc, NGLE_REG_9, (wi << 16) | 1); - data++; + data8++; } } else { + uint16_t *data16 = data; for (i = 0; i < he; i++) { hyperfb_wait_fifo(sc, 2); - mask = ((uint32_t)*data) << 8; - data++; - mask |= *data; - data++; + mask = *data16; hyperfb_write4(sc, NGLE_REG_8, mask << 16); hyperfb_write4(sc, NGLE_REG_9, (wi << 16) | 1); + data16++; } } #if 0
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Oct 1 07:02:15 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: use HW to draw bitmap fonts To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.21 src/sys/arch/hppa/dev/gftfb.c:1.22 --- src/sys/arch/hppa/dev/gftfb.c:1.21 Mon Sep 30 15:54:42 2024 +++ src/sys/arch/hppa/dev/gftfb.c Tue Oct 1 07:02:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.21 2024/09/30 15:54:42 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.22 2024/10/01 07:02:14 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -137,6 +137,7 @@ static void gftfb_bitblt(void *, int, in static void gftfb_cursor(void *, int, int, int); static void gftfb_putchar(void *, int, int, u_int, long); +static void gftfb_putchar_aa(void *, int, int, u_int, long); static void gftfb_copycols(void *, int, int, int, int); static void gftfb_erasecols(void *, int, int, int, long); static void gftfb_copyrows(void *, int, int, int); @@ -482,9 +483,7 @@ gftfb_check_rom(struct gftfb_softc *spc, break; #endif default: -#ifdef GFTFB_DEBUG DPRINTF((" (wrong architecture)")); -#endif break; } DPRINTF(("%s\n", selected == offs ? " -> SELECTED" : "")); @@ -943,7 +942,10 @@ gftfb_init_screen(void *cookie, struct v ri->ri_ops.eraserows = gftfb_eraserows; ri->ri_ops.erasecols = gftfb_erasecols; ri->ri_ops.cursor = gftfb_cursor; - ri->ri_ops.putchar = gftfb_putchar; + if (FONT_IS_ALPHA(ri->ri_font)) { + ri->ri_ops.putchar = gftfb_putchar_aa; + } else + ri->ri_ops.putchar = gftfb_putchar; } static int @@ -1162,6 +1164,89 @@ gftfb_putchar(void *cookie, int row, int struct wsdisplay_font *font = PICK_FONT(ri, c); struct vcons_screen *scr = ri->ri_hw; struct gftfb_softc *sc = scr->scr_cookie; + void *data; + int i, x, y, wi, he, rv = GC_NOPE; + uint32_t bg, fg, mask; + + if (sc->sc_mode != WSDISPLAYIO_MODE_EMUL) + return; + + if (!CHAR_IN_FONT(c, font)) + return; + + if (row == ri->ri_crow && col == ri->ri_ccol) { + ri->ri_flg &= ~RI_CURSOR; + } + + wi = font->fontwidth; + he = font->fontheight; + + x = ri->ri_xorigin + col * wi; + y = ri->ri_yorigin + row * he; + + bg = ri->ri_devcmap[(attr >> 16) & 0xf]; + + /* if we're drawing a space we're done here */ + if (c == 0x20) { + gftfb_rectfill(sc, x, y, wi, he, bg); + return; + } + + fg = ri->ri_devcmap[(attr >> 24) & 0x0f]; + + rv = glyphcache_try(&sc->sc_gc, c, x, y, attr); + if (rv == GC_OK) + return; + + /* clear the character cell */ + gftfb_rectfill(sc, x, y, wi, he, bg); + + data = WSFONT_GLYPH(c, font); + + /* + * we're in rectangle mode with transparency enabled from the call to + * gftfb_rectfill() above, so all we need to do is reset the starting + * cordinates, then hammer mask and size/start. Starting coordinates + * will automatically move down the y-axis + */ + gftfb_wait_fifo(sc, 2); + + /* character colour */ + gftfb_write4(sc, NGLE_REG_35, fg); + /* dst XY */ + gftfb_write4(sc, NGLE_REG_6, (x << 16) | y); + + if (ri->ri_font->stride == 1) { + uint8_t *data8 = data; + for (i = 0; i < he; i++) { + gftfb_wait_fifo(sc, 2); + mask = *data8; + gftfb_write4(sc, NGLE_REG_8, mask << 24); + gftfb_write4(sc, NGLE_REG_9, (wi << 16) | 1); + data8++; + } + } else { + uint16_t *data16 = data; + for (i = 0; i < he; i++) { + gftfb_wait_fifo(sc, 2); + mask = *data16; + gftfb_write4(sc, NGLE_REG_8, mask << 16); + gftfb_write4(sc, NGLE_REG_9, (wi << 16) | 1); + data16++; + } + } + + if (rv == GC_ADD) + glyphcache_add(&sc->sc_gc, c, x, y); +} + +static void +gftfb_putchar_aa(void *cookie, int row, int col, u_int c, long attr) +{ + struct rasops_info *ri = cookie; + struct wsdisplay_font *font = PICK_FONT(ri, c); + struct vcons_screen *scr = ri->ri_hw; + struct gftfb_softc *sc = scr->scr_cookie; int x, y, wi, he, rv = GC_NOPE; uint32_t bg;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Oct 1 07:02:15 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: use HW to draw bitmap fonts To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Oct 1 06:21:10 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: remove sc_putchar - don't need it anymore To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.15 src/sys/arch/hppa/dev/hyperfb.c:1.16 --- src/sys/arch/hppa/dev/hyperfb.c:1.15 Wed Sep 11 13:31:13 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Tue Oct 1 06:21:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.15 2024/09/11 13:31:13 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.16 2024/10/01 06:21:10 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.15 2024/09/11 13:31:13 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.16 2024/10/01 06:21:10 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -92,7 +92,6 @@ struct hyperfb_softc { struct wsscreen_list sc_screenlist; struct vcons_data vd; int sc_mode; - void (*sc_putchar)(void *, int, int, u_int, long); u_char sc_cmap_red[256]; u_char sc_cmap_green[256]; u_char sc_cmap_blue[256]; @@ -554,7 +553,6 @@ hyperfb_init_screen(void *cookie, struct ri->ri_hw = scr; - sc->sc_putchar = ri->ri_ops.putchar; ri->ri_ops.copyrows = hyperfb_copyrows; ri->ri_ops.copycols = hyperfb_copycols; ri->ri_ops.eraserows = hyperfb_eraserows;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Oct 1 06:21:10 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: remove sc_putchar - don't need it anymore To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Sep 30 15:54:42 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: use wrappers for bus_space_*() - makes things shorter, less annoying to read and reduces unnecessary differences to hyperfb To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.20 src/sys/arch/hppa/dev/gftfb.c:1.21 --- src/sys/arch/hppa/dev/gftfb.c:1.20 Tue Sep 10 08:49:33 2024 +++ src/sys/arch/hppa/dev/gftfb.c Mon Sep 30 15:54:42 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.20 2024/09/10 08:49:33 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.21 2024/09/30 15:54:42 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -174,6 +174,42 @@ gftfb_match(device_t parent, cfdata_t cf return 0; } +static inline uint32_t +gftfb_read4(struct gftfb_softc *sc, uint32_t offset) +{ + struct sti_rom *rom = sc->sc_base.sc_rom; + bus_space_tag_t memt = rom->memt; + bus_space_handle_t memh = rom->regh[2]; + return bus_space_read_stream_4(memt, memh, offset); +} + +static inline void +gftfb_write4(struct gftfb_softc *sc, uint32_t offset, uint32_t val) +{ + struct sti_rom *rom = sc->sc_base.sc_rom; + bus_space_tag_t memt = rom->memt; + bus_space_handle_t memh = rom->regh[2]; + bus_space_write_stream_4(memt, memh, offset, val); +} + +static inline uint8_t +gftfb_read1(struct gftfb_softc *sc, uint32_t offset) +{ + struct sti_rom *rom = sc->sc_base.sc_rom; + bus_space_tag_t memt = rom->memt; + bus_space_handle_t memh = rom->regh[2]; + return bus_space_read_1(memt, memh, offset); +} + +static inline void +gftfb_write1(struct gftfb_softc *sc, uint32_t offset, uint8_t val) +{ + struct sti_rom *rom = sc->sc_base.sc_rom; + bus_space_tag_t memt = rom->memt; + bus_space_handle_t memh = rom->regh[2]; + bus_space_write_1(memt, memh, offset, val); +} + void gftfb_attach(device_t parent, device_t self, void *aux) { @@ -227,6 +263,10 @@ gftfb_attach(device_t parent, device_t s sc->sc_width, sc->sc_height); gftfb_setup(sc); +#ifdef GFTFB_DEBUG + sc->sc_height -= 200; +#endif + sc->sc_defaultscreen_descr = (struct wsscreen_descr){ "default", 0, 0, @@ -610,30 +650,23 @@ gftfb_disable_rom(struct sti_softc *sc) static inline void gftfb_wait(struct gftfb_softc *sc) { - struct sti_rom *rom = sc->sc_base.sc_rom; - bus_space_tag_t memt = rom->memt; - bus_space_handle_t memh = rom->regh[2]; uint8_t stat; do { - stat = bus_space_read_1(memt, memh, NGLE_REG_15b0); + stat = gftfb_read1(sc, NGLE_REG_15b0); if (stat == 0) - stat = bus_space_read_1(memt, memh, NGLE_REG_15b0); + stat = gftfb_read1(sc, NGLE_REG_15b0); } while (stat != 0); } static inline void gftfb_setup_fb(struct gftfb_softc *sc) { - struct sti_rom *rom = sc->sc_base.sc_rom; - bus_space_tag_t memt = rom->memt; - bus_space_handle_t memh = rom->regh[2]; - gftfb_wait(sc); - bus_space_write_stream_4(memt, memh, NGLE_REG_10, 0x13601000); - bus_space_write_stream_4(memt, memh, NGLE_REG_14, 0x83000300); + gftfb_write4(sc, NGLE_REG_10, 0x13601000); + gftfb_write4(sc, NGLE_REG_14, 0x83000300); gftfb_wait(sc); - bus_space_write_1(memt, memh, NGLE_REG_16b1, 1); + gftfb_write1(sc, NGLE_REG_16b1, 1); sc->sc_hwmode = HW_FB; } @@ -661,73 +694,73 @@ gftfb_setup(struct gftfb_softc *sc) /* attr. planes */ gftfb_wait(sc); - bus_space_write_stream_4(memt, memh, NGLE_REG_11, 0x2ea0d000); - bus_space_write_stream_4(memt, memh, NGLE_REG_14, 0x23000302); - bus_space_write_stream_4(memt, memh, NGLE_REG_12, NGLE_ARTIST_CMAP0); - bus_space_write_stream_4(memt, memh, NGLE_REG_8, 0x); + gftfb_write4(sc, NGLE_REG_11, 0x2ea0d000); + gftfb_write4(sc, NGLE_REG_14, 0x23000302); + gftfb_write4(sc, NGLE_REG_12, NGLE_ARTIST_CMAP0); + gftfb_write4(sc, NGLE_REG_8, 0x); gftfb_wait(sc); - bus_space_write_stream_4(memt, memh, NGLE_REG_6, 0x); - bus_space_write_stream_4(memt, memh, NGLE_REG_9, + gftfb_write4(sc, NGLE_REG_6, 0x); + gftfb_write4(sc, NGLE_REG_9, (sc->sc_scr.scr_cfg.scr_width << 16) | sc->sc_scr.scr_cfg.scr_height); /* * blit into offscreen memory to force flush previous - apparently * some chips have a bug this works around */ - bus_space_write_stream_4(memt, memh, NGLE_REG_6, 0x0500); - bus_space_write_stream_4(memt, memh, NGLE_REG_9, 0x00040001); + gftfb_write4(sc, NGLE_REG_6, 0x0500); + gftfb_write4(sc, NGLE_REG_9, 0x00040001); gftfb_wait(sc); - bus_space_write_stream_4(memt, memh, NGLE_REG_12, 0x); + gftfb_write4(sc, NGLE_REG_12, 0x); gftfb_setup_fb(sc); /* make sure video output is enabled */ gftfb_wait(sc); - bus_space_write_stream_4(memt, memh, NGLE_REG_21, - bus_space_read_stream_4(memt, memh, NGLE_REG_21) | 0x0a00)
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Sep 30 15:54:42 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: use wrappers for bus_space_*() - makes things shorter, less annoying to read and reduces unnecessary differences to hyperfb To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Wed Sep 25 10:06:15 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: some minor nits: - clarify 16bit colour table construction a bit - print some more hw info - fix WSDISPLAYIO_GVIDEO To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/dev/cgfourteen.c diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.98 src/sys/arch/sparc/dev/cgfourteen.c:1.99 --- src/sys/arch/sparc/dev/cgfourteen.c:1.98 Sun May 12 11:48:05 2024 +++ src/sys/arch/sparc/dev/cgfourteen.c Wed Sep 25 10:06:15 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteen.c,v 1.98 2024/05/12 11:48:05 macallan Exp $ */ +/* $NetBSD: cgfourteen.c,v 1.99 2024/09/25 10:06:15 macallan Exp $ */ /* * Copyright (c) 1996 @@ -243,6 +243,7 @@ cgfourteenattach(device_t parent, device int i, isconsole, items; uint32_t fbva[2] = {0, 0}; uint32_t *ptr = fbva; + int ver, impl; #if NSX > 0 device_t dv; deviter_t di; @@ -354,6 +355,12 @@ cgfourteenattach(device_t parent, device else printf("\n"); + ver = sc->sc_ctl->ctl_rsr & CG14_RSR_REVMASK; + impl = sc->sc_ctl->ctl_rsr & CG14_RSR_IMPLMASK; + aprint_normal_dev(sc->sc_dev, "rev %d, %d CLUTs\n", + ver == 0 ? 1 : 2, + (impl & 1) == 0 ? 2 : 3); + sc->sc_depth = 8; #if NSX > 0 @@ -475,7 +482,8 @@ cgfourteenioctl(dev_t dev, u_long cmd, v return (error); /* now blast them into the chip */ /* XXX should use retrace interrupt */ - cg14_load_hwcmap(sc, p->index, p->count); + if (sc->sc_depth == 8) + cg14_load_hwcmap(sc, p->index, p->count); #undef p break; @@ -810,7 +818,7 @@ cg14_init_cmap(struct cgfourteen_softc * { struct rasops_info *ri = &sc->sc_console_screen.scr_ri; int i, j = 0; - uint32_t r, g, b, c; + uint32_t r, g, b, c, cc; uint8_t cmap[768]; if (sc->sc_depth == 16) { @@ -821,17 +829,17 @@ cg14_init_cmap(struct cgfourteen_softc * r |= r >> 5; /* fill lower bits so 0xf8 */ c = 0x4000 | r; /* becomes 0xff */ g = i & 0x7; /* upper 3 bits of green */ - g |= g << 3; + g |= g << 3; /* 0x003f */ c |= ((g << 10) & 0xf000); /* make it 4 */ sc->sc_clut1->clut_lut[i] = c; /* lower byte */ g = i & 0xe0; /* lower half of green */ g |= g >> 3; - c = 0x4000 | ((g << 4) & 0x0f00); + cc = 0x4000 | ((g << 4) & 0x0f00); b = i & 0x1f; /* and blue */ b = (b << 3) | (b >> 2); - c |= (b << 16); - sc->sc_clut2->clut_lut[i] = c; + cc |= (b << 16); + sc->sc_clut2->clut_lut[i] = cc; } /* @@ -908,7 +916,10 @@ cg14_putcmap(struct cgfourteen_softc *sc index++; } - cg14_load_hwcmap(sc, 0, 256); + + if (sc->sc_depth == 8) + cg14_load_hwcmap(sc, 0, 256); + return 0; } @@ -1008,8 +1019,9 @@ cg14_ioctl(void *v, void *vs, u_long cmd cg14_set_video(sc, *(int *)data); return 0; case WSDISPLAYIO_GVIDEO: - return cg14_get_video(sc) ? + *(int *)data = cg14_get_video(sc) ? WSDISPLAYIO_VIDEO_ON : WSDISPLAYIO_VIDEO_OFF; + return 0; case WSDISPLAYIO_GCURPOS: { struct wsdisplay_curpos *cp = (void *)data;
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Wed Sep 25 10:06:15 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: some minor nits: - clarify 16bit colour table construction a bit - print some more hw info - fix WSDISPLAYIO_GVIDEO To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: macallan Date: Mon Sep 16 23:37:13 UTC 2024 Modified Files: src/sys/arch/arm/sunxi: sunxi_ccu.h Log Message: set CLK_SET_RATE_PARENT for mux type clocks so clk_set_rate() can work with this my pinebook can change cpu speed again ok jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/sunxi/sunxi_ccu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_ccu.h diff -u src/sys/arch/arm/sunxi/sunxi_ccu.h:1.23 src/sys/arch/arm/sunxi/sunxi_ccu.h:1.24 --- src/sys/arch/arm/sunxi/sunxi_ccu.h:1.23 Sun Nov 7 17:13:12 2021 +++ src/sys/arch/arm/sunxi/sunxi_ccu.h Mon Sep 16 23:37:13 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_ccu.h,v 1.23 2021/11/07 17:13:12 jmcneill Exp $ */ +/* $NetBSD: sunxi_ccu.h,v 1.24 2024/09/16 23:37:13 macallan Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -432,6 +432,7 @@ const char *sunxi_ccu_mux_get_parent(str [_id] = { \ .type = SUNXI_CCU_MUX,\ .base.name = (_name),\ + .base.flags = CLK_SET_RATE_PARENT, \ .u.mux.reg = (_reg),\ .u.mux.parents = (_parents), \ .u.mux.nparents = __arraycount(_parents), \
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: macallan Date: Mon Sep 16 23:37:13 UTC 2024 Modified Files: src/sys/arch/arm/sunxi: sunxi_ccu.h Log Message: set CLK_SET_RATE_PARENT for mux type clocks so clk_set_rate() can work with this my pinebook can change cpu speed again ok jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/sunxi/sunxi_ccu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Sep 11 13:31:13 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: now that we know how, draw characters by hardware To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.14 src/sys/arch/hppa/dev/hyperfb.c:1.15 --- src/sys/arch/hppa/dev/hyperfb.c:1.14 Wed Sep 4 10:35:43 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Sep 11 13:31:13 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.14 2024/09/04 10:35:43 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.15 2024/09/11 13:31:13 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.14 2024/09/04 10:35:43 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.15 2024/09/11 13:31:13 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -1122,8 +1122,9 @@ hyperfb_putchar(void *cookie, int row, i struct wsdisplay_font *font = PICK_FONT(ri, c); struct vcons_screen *scr = ri->ri_hw; struct hyperfb_softc *sc = scr->scr_cookie; - int x, y, wi, he/*, rv = GC_NOPE*/; - uint32_t bg; + uint8_t *data; + int i, x, y, wi, he/*, rv = GC_NOPE*/; + uint32_t bg, fg, mask; if (sc->sc_mode != WSDISPLAYIO_MODE_EMUL) return; @@ -1142,19 +1143,54 @@ hyperfb_putchar(void *cookie, int row, i y = ri->ri_yorigin + row * he; bg = ri->ri_devcmap[(attr >> 16) & 0xf]; + fg = ri->ri_devcmap[(attr >> 24) & 0x0f]; - if (c == 0x20) { - hyperfb_rectfill(sc, x, y, wi, he, bg); + /* clear the character cell */ + hyperfb_rectfill(sc, x, y, wi, he, bg); + + /* if we're drawing a space we're done here */ + if (c == 0x20) return; - } #if 0 rv = glyphcache_try(&sc->sc_gc, c, x, y, attr); if (rv == GC_OK) return; #endif - if (sc->sc_hwmode != HW_FB) hyperfb_setup_fb(sc); - sc->sc_putchar(cookie, row, col, c, attr); + + data = WSFONT_GLYPH(c, font); + + hyperfb_wait_fifo(sc, 2); + + /* character colour */ + hyperfb_write4(sc, NGLE_REG_35, fg); + /* dst XY */ + hyperfb_write4(sc, NGLE_REG_6, (x << 16) | y); + + /* + * drawing a rectangle moves the starting coordinates down the + * y-axis so we can just hammer the wi/he register to draw a full + * character + */ + if (ri->ri_font->stride == 1) { + for (i = 0; i < he; i++) { + hyperfb_wait_fifo(sc, 2); + mask = ((uint32_t)*data) << 24; + hyperfb_write4(sc, NGLE_REG_8, mask); + hyperfb_write4(sc, NGLE_REG_9, (wi << 16) | 1); + data++; + } + } else { + for (i = 0; i < he; i++) { + hyperfb_wait_fifo(sc, 2); + mask = ((uint32_t)*data) << 8; + data++; + mask |= *data; + data++; + hyperfb_write4(sc, NGLE_REG_8, mask << 16); + hyperfb_write4(sc, NGLE_REG_9, (wi << 16) | 1); + } + } #if 0 if (rv == GC_ADD) glyphcache_add(&sc->sc_gc, c, x, y);
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Sep 11 13:31:13 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: now that we know how, draw characters by hardware To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Sep 10 08:49:33 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: as suspected the Visualize EG's rectangle fill function works exactly the same as HCRX's, so apply the same trick to draw less than 32 pixel wide rectangles and get rid of the workaround To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.19 src/sys/arch/hppa/dev/gftfb.c:1.20 --- src/sys/arch/hppa/dev/gftfb.c:1.19 Wed Aug 28 06:20:30 2024 +++ src/sys/arch/hppa/dev/gftfb.c Tue Sep 10 08:49:33 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.19 2024/08/28 06:20:30 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.20 2024/09/10 08:49:33 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -85,7 +85,6 @@ struct gftfb_softc { #define HW_FB 0 #define HW_FILL 1 #define HW_BLIT 2 - uint32_t sc_rect_colour, sc_rect_height; /* cursor stuff */ int sc_cursor_x, sc_cursor_y; int sc_hot_x, sc_hot_y, sc_enabled; @@ -223,8 +222,6 @@ gftfb_attach(device_t parent, device_t s sc->sc_width = sc->sc_scr.scr_cfg.scr_width; sc->sc_height = sc->sc_scr.scr_cfg.scr_height; - sc->sc_rect_colour = 0xf000; - sc->sc_rect_height = 0; aprint_normal_dev(sc->sc_dev, "%s at %dx%d\n", sc->sc_scr.name, sc->sc_width, sc->sc_height); @@ -654,8 +651,6 @@ gftfb_setup(struct gftfb_softc *sc) sc->sc_enabled = 0; sc->sc_video_on = 1; - sc->sc_rect_colour = 0xf000; - sc->sc_rect_height = 0; /* set Bt458 read mask register to all planes */ gftfb_wait(sc); @@ -869,7 +864,6 @@ gftfb_mmap(void *v, void *vs, off_t offs struct sti_rom *rom = sc->sc_base.sc_rom; paddr_t pa = -1; - if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) return -1; @@ -1038,28 +1032,32 @@ gftfb_wait_fifo(struct gftfb_softc *sc, } static void -gftfb_real_rectfill(struct gftfb_softc *sc, int x, int y, int wi, int he, +gftfb_rectfill(struct gftfb_softc *sc, int x, int y, int wi, int he, uint32_t bg) { struct sti_rom *rom = sc->sc_base.sc_rom; bus_space_tag_t memt = rom->memt; bus_space_handle_t memh = rom->regh[2]; + uint32_t mask = 0x; if (sc->sc_hwmode != HW_FILL) { - gftfb_wait_fifo(sc, 4); - /* transfer data */ - bus_space_write_stream_4(memt, memh, NGLE_REG_8, 0x); + gftfb_wait_fifo(sc, 3); /* plane mask */ bus_space_write_stream_4(memt, memh, NGLE_REG_13, 0xff); /* bitmap op */ bus_space_write_stream_4(memt, memh, NGLE_REG_14, - IBOvals(RopSrc, 0, BitmapExtent08, 0, DataDynamic, MaskOtc, 0, 0)); + IBOvals(RopSrc, 0, BitmapExtent08, 0, DataDynamic, MaskOtc, 1, 0)); /* dst bitmap access */ bus_space_write_stream_4(memt, memh, NGLE_REG_11, BA(IndexedDcd, Otc32, OtsIndirect, AddrLong, 0, BINapp0I, 0)); sc->sc_hwmode = HW_FILL; } - gftfb_wait_fifo(sc, 3); + gftfb_wait_fifo(sc, 4); + + if (wi < 32) + mask = 0x << (32 - wi); + /* transfer data */ + bus_space_write_stream_4(memt, memh, NGLE_REG_8, mask); bus_space_write_stream_4(memt, memh, NGLE_REG_35, bg); /* dst XY */ bus_space_write_stream_4(memt, memh, NGLE_REG_6, (x << 16) | y); @@ -1069,31 +1067,6 @@ gftfb_real_rectfill(struct gftfb_softc * } static void -gftfb_rectfill(struct gftfb_softc *sc, int x, int y, int wi, int he, - uint32_t bg) -{ - /* - * For some reason my 4MB VisEG always draws rectangles at least 32 - * pixels wide - no idea why, the bitblt command doesn't have this - * problem. - * So, as a workaround, we draw a 50xFontHeight rectangle to the right - * of the visible fb, keep track of the colour so we don't need to - * redraw every time, and bitblt the portion we need - */ - if (wi < 50) { - if ((bg != sc->sc_rect_colour) || - (he > sc->sc_rect_height)) { - gftfb_real_rectfill(sc, sc->sc_width + 10, 0, 50, - he, bg); - sc->sc_rect_colour = bg; - sc->sc_rect_height = he; - } - gftfb_bitblt(sc, sc->sc_width + 10, 0, x, y, wi, he, RopSrc); - } else - gftfb_real_rectfill(sc, x, y, wi, he, bg); -} - -static void gftfb_bitblt(void *cookie, int xs, int ys, int xd, int yd, int wi, int he, int rop) {
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Sep 10 08:49:33 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: as suspected the Visualize EG's rectangle fill function works exactly the same as HCRX's, so apply the same trick to draw less than 32 pixel wide rectangles and get rid of the workaround To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Sep 4 10:45:50 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: more annotations: - 'transfer data' is actually a pixel mask - transparency - bg colour register confirmed all found by experiment To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Sep 4 10:45:50 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: more annotations: - 'transfer data' is actually a pixel mask - transparency - bg colour register confirmed all found by experiment To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.13 src/sys/dev/ic/stireg.h:1.14 --- src/sys/dev/ic/stireg.h:1.13 Mon Aug 19 10:57:32 2024 +++ src/sys/dev/ic/stireg.h Wed Sep 4 10:45:50 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.13 2024/08/19 10:57:32 macallan Exp $ */ +/* $NetBSD: stireg.h,v 1.14 2024/09/04 10:45:50 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -650,6 +650,8 @@ STI_DEP(util); (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) /* LSSD ??BF */ +/* B = 1 -> background transparency for masked fills */ + #define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ #define FractDcd 1 /* Pixel data is Fractional 8-8-8 */ #define Otc04 2 /* Pixels in each longword transfer (4) */ @@ -687,7 +689,8 @@ STI_DEP(util); #define NGLE_REG_6 0x000800 /* rectfill XY */ #define NGLE_REG_7 0x000804 /* bitblt size WH */ #define NGLE_REG_24 0x000808 /* bitblt src XY */ -#define NGLE_REG_8 0x000820 /* transfer data */ +#define NGLE_REG_8 0x000820 /* 'transfer data' - this is */ + /* a pixel mask on fills */ #define NGLE_REG_37 0x000944 /* HCRX fast rect fill, size */ #define NGLE_REG_9 0x000a04 /* rect fill size, start */ #define NGLE_REG_25 0x000b00 /* bitblt dst XY, start */ @@ -695,8 +698,8 @@ STI_DEP(util); #define NGLE_REG_10 0x018000 /* buffer ctl */ #define NGLE_REG_11 0x018004 /* dest bitmap access */ #define NGLE_REG_12 0x01800c /* control plane register */ -#define NGLE_REG_35 0x018010 /* fg color */ -#define NGLE_REG_36 0x018014 /* bg colour? */ +#define NGLE_REG_35 0x018010 /* fg colour */ +#define NGLE_REG_36 0x018014 /* bg colour */ #define NGLE_REG_13 0x018018 /* image planemask */ #define NGLE_REG_14 0x01801c /* raster op */ #define NGLE_REG_15 0x20 /* 'busy dodger' idle */
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Sep 4 10:35:43 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: get rid of the workarounds to draw rectangles less than 32 pixels wide turns out the hardware applies a bit mask to all rectangle fills, and we can turn the background transparent. With that we just mask off the pixels we don't need in the less than 32 pixels wide case. Next step - figure out how to abuse that to draw characters I bet Visualize EG works exactly the same way in that regard. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.13 src/sys/arch/hppa/dev/hyperfb.c:1.14 --- src/sys/arch/hppa/dev/hyperfb.c:1.13 Wed Aug 28 06:20:30 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Sep 4 10:35:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.13 2024/08/28 06:20:30 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.14 2024/09/04 10:35:43 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.13 2024/08/28 06:20:30 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.14 2024/09/04 10:35:43 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -493,6 +493,36 @@ hyperfb_attach(device_t parent, device_t config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARGS_NONE); hyperfb_setup_fb(sc); + +#ifdef HYPERFB_DEBUG + int i; + + hyperfb_wait_fifo(sc, 4); + /* transfer data */ + hyperfb_write4(sc, NGLE_REG_8, 0xff00ff00); + /* plane mask */ + hyperfb_write4(sc, NGLE_REG_13, 0xff); + /* bitmap op */ + hyperfb_write4(sc, NGLE_REG_14, + IBOvals(RopSrc, 0, BitmapExtent08, 0, DataDynamic, MaskOtc, 1, 0)); + /* dst bitmap access */ + hyperfb_write4(sc, NGLE_REG_11, + BA(IndexedDcd, Otc32, OtsIndirect, AddrLong, 0, BINovly, 0)); + + hyperfb_wait_fifo(sc, 3); + hyperfb_write4(sc, NGLE_REG_35, 0xe0); + hyperfb_write4(sc, NGLE_REG_36, 0x1c); + /* dst XY */ + hyperfb_write4(sc, NGLE_REG_6, (2 << 16) | 902); + /* len XY start */ + hyperfb_write4(sc, NGLE_REG_9, (28 << 16) | 32); + + for (i = 0; i < 32; i++) + hyperfb_write4(sc, NGLE_REG_8, (i & 4) ? 0xff00ff00 : 0x00ff00ff); + + hyperfb_rectfill(sc, 70, 902, 16, 32, 0xe0); + hyperfb_rectfill(sc, 50, 902, 16, 32, 0x1c); +#endif } static void @@ -504,7 +534,11 @@ hyperfb_init_screen(void *cookie, struct ri->ri_depth = 8; ri->ri_width = 1280; +#ifdef HYPERFB_DEBUG + ri->ri_height = 900; +#else ri->ri_height = 1024; +#endif ri->ri_stride = 2048; ri->ri_flg = RI_CENTER | RI_8BIT_IS_RGB /*| RI_ENABLE_ALPHA | RI_PREFER_ALPHA*/; @@ -973,79 +1007,39 @@ static void hyperfb_rectfill(struct hyperfb_softc *sc, int x, int y, int wi, int he, uint32_t bg) { + uint32_t mask = 0x; + /* * XXX - * HCRX has the same problem as VisEG drawing rectangles less than 32 - * pixels wide, but here we don't seem to have any usable offscreen - * memory, at least not as long as we're using the overlay planes. - * As a workaround, fall back to memset()-based fills for rectangles - * less than 32 pixels wide + * HCRX and EG both always draw rectangles at least 32 pixels wide + * for anything narrower we need to set a bit mask and enable + * transparency */ - if (wi < 32) { -#if 0 - int i; - uint8_t *ptr = (uint8_t *)sc->sc_fb + (y << 11) + x; - if (sc->sc_hwmode != HW_FB) - hyperfb_setup_fb(sc); - - for (i = 0; i < he; i++) { - memset(ptr, bg, wi); - ptr += 2048; - } -#else - /* - * instead of memset() we abuse the blitter - set / clear the - * planes we want, select colour by planemask, do two passes - * where necessary ( as in, anything not black or white ) - */ - if (sc->sc_hwmode != HW_SFILL) { - hyperfb_wait(sc); - hyperfb_write4(sc, NGLE_REG_10, - BA(IndexedDcd, Otc04, Ots08, AddrLong, 0, BINovly, 0)); - sc->sc_hwmode = HW_SFILL; - } - bg &= 0xff; - hyperfb_wait_fifo(sc, 2); - hyperfb_write4(sc, NGLE_REG_24, (x << 16) | y); - if (bg != 0) { - hyperfb_wait_fifo(sc, 4); - hyperfb_write4(sc, NGLE_REG_14, - IBOvals(RopSet, 0, BitmapExtent08, 1, DataDynamic, -MaskOtc, 0, 0)); - hyperfb_write4(sc, NGLE_REG_13, bg); - hyperfb_write4(sc, NGLE_REG_7, (wi << 16) | he); - hyperfb_write4(sc, NGLE_REG_25, (x << 16) | y); - } - if (bg != 0xff) { - hyperfb_wait_fifo(sc, 4); - hyperfb_write4(sc, NGLE_REG_14, - IBOvals(RopClr, 0, BitmapExtent08, 1, DataDynamic, -MaskOtc, 0, 0)); - hyperfb_write4(sc, NGLE_REG_13, bg ^ 0xff); - hyperfb_write4(sc, NGLE_REG_7, (wi << 16) | he); - hyperfb
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Sep 4 10:35:43 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: get rid of the workarounds to draw rectangles less than 32 pixels wide turns out the hardware applies a bit mask to all rectangle fills, and we can turn the background transparent. With that we just mask off the pixels we don't need in the less than 32 pixels wide case. Next step - figure out how to abuse that to draw characters I bet Visualize EG works exactly the same way in that regard. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xf86-video-nv/dist/src
Module Name:xsrc Committed By: macallan Date: Mon Sep 2 07:09:57 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-nv/dist/src: nv_xaa.c Log Message: we need NVDMA*() even when building without XAA support To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xf86-video-nv/dist/src/nv_xaa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-nv/dist/src/nv_xaa.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/nv_xaa.c:1.4 xsrc/external/mit/xf86-video-nv/dist/src/nv_xaa.c:1.5 --- xsrc/external/mit/xf86-video-nv/dist/src/nv_xaa.c:1.4 Thu Jul 4 06:40:39 2024 +++ xsrc/external/mit/xf86-video-nv/dist/src/nv_xaa.c Mon Sep 2 07:09:57 2024 @@ -307,8 +307,7 @@ crap: NVResetGraphics(pScrn); } -#ifdef HAVE_XAA_H -static void +void NVDMAKickoffCallback (ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); @@ -317,6 +316,7 @@ NVDMAKickoffCallback (ScrnInfoPtr pScrn) pNv->DMAKickoffCallback = NULL; } +#ifdef HAVE_XAA_H static void NVSetupForScreenToScreenCopy( ScrnInfoPtr pScrn,
CVS commit: xsrc/external/mit/xf86-video-nv/dist/src
Module Name:xsrc Committed By: macallan Date: Mon Sep 2 07:09:57 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-nv/dist/src: nv_xaa.c Log Message: we need NVDMA*() even when building without XAA support To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xf86-video-nv/dist/src/nv_xaa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Aug 28 06:20:30 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: properly return status info in ioctl(WSDISPLAYIO_GVIDEO) To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Aug 28 06:20:30 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: properly return status info in ioctl(WSDISPLAYIO_GVIDEO) To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.18 src/sys/arch/hppa/dev/gftfb.c:1.19 --- src/sys/arch/hppa/dev/gftfb.c:1.18 Mon Aug 19 10:58:43 2024 +++ src/sys/arch/hppa/dev/gftfb.c Wed Aug 28 06:20:30 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.18 2024/08/19 10:58:43 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.19 2024/08/28 06:20:30 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -854,8 +854,9 @@ gftfb_ioctl(void *v, void *vs, u_long cm gftfb_set_video(sc, *(int *)data); return 0; case WSDISPLAYIO_GVIDEO: - return sc->sc_video_on ? + *(u_int *)data = sc->sc_video_on ? WSDISPLAYIO_VIDEO_ON : WSDISPLAYIO_VIDEO_OFF; + return 0; } return EPASSTHROUGH; } Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.12 src/sys/arch/hppa/dev/hyperfb.c:1.13 --- src/sys/arch/hppa/dev/hyperfb.c:1.12 Mon Aug 19 10:58:43 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Aug 28 06:20:30 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.12 2024/08/19 10:58:43 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.13 2024/08/28 06:20:30 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.12 2024/08/19 10:58:43 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.13 2024/08/28 06:20:30 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -649,8 +649,9 @@ hyperfb_ioctl(void *v, void *vs, u_long hyperfb_set_video(sc, *(int *)data); return 0; case WSDISPLAYIO_GVIDEO: - return sc->sc_video_on ? + *(u_int *)data = sc->sc_video_on ? WSDISPLAYIO_VIDEO_ON : WSDISPLAYIO_VIDEO_OFF; + return 0; } return EPASSTHROUGH; }
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Aug 19 10:58:43 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: implement ioctl(GCID) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.17 src/sys/arch/hppa/dev/gftfb.c:1.18 --- src/sys/arch/hppa/dev/gftfb.c:1.17 Thu Aug 1 00:20:22 2024 +++ src/sys/arch/hppa/dev/gftfb.c Mon Aug 19 10:58:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.17 2024/08/01 00:20:22 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.18 2024/08/19 10:58:43 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -753,6 +753,10 @@ gftfb_ioctl(void *v, void *vs, u_long cm *(u_int *)data = WSDISPLAY_TYPE_STI; return 0; + case GCID: + *(u_int *)data = STI_DD_EG; + return 0; + /* PCI config read/write passthrough. */ case PCI_IOC_CFGREAD: case PCI_IOC_CFGWRITE: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.11 src/sys/arch/hppa/dev/hyperfb.c:1.12 --- src/sys/arch/hppa/dev/hyperfb.c:1.11 Wed Aug 7 00:47:34 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Mon Aug 19 10:58:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.11 2024/08/07 00:47:34 riastradh Exp $ */ +/* $NetBSD: hyperfb.c,v 1.12 2024/08/19 10:58:43 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.11 2024/08/07 00:47:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.12 2024/08/19 10:58:43 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -543,6 +543,10 @@ hyperfb_ioctl(void *v, void *vs, u_long *(u_int *)data = WSDISPLAY_TYPE_STI; return 0; + case GCID: + *(u_int *)data = STI_DD_HCRX; + return 0; + case WSDISPLAYIO_GINFO: if (ms == NULL) return ENODEV;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Aug 19 10:58:43 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: implement ioctl(GCID) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Mon Aug 19 10:57:32 UTC 2024 Modified Files: src/sys/dev/ic: sti.c stireg.h Log Message: add an ioctl() to read a device's graphics ID, mimic HP/UX's GCID that way an xorg driver can identify which WSDISPLAY_TYPE_STI it's talking to without having to setup its own STI To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ic/sti.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/sti.c diff -u src/sys/dev/ic/sti.c:1.37 src/sys/dev/ic/sti.c:1.38 --- src/sys/dev/ic/sti.c:1.37 Wed Jul 3 13:08:36 2024 +++ src/sys/dev/ic/sti.c Mon Aug 19 10:57:32 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.37 2024/07/03 13:08:36 macallan Exp $ */ +/* $NetBSD: sti.c,v 1.38 2024/08/19 10:57:32 macallan Exp $ */ /* $OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.37 2024/07/03 13:08:36 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.38 2024/08/19 10:57:32 macallan Exp $"); #include "wsdisplay.h" @@ -1073,6 +1073,7 @@ int sti_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct sti_screen *scr = (struct sti_screen *)v; + struct sti_rom *rom = scr->scr_rom; struct wsdisplay_fbinfo *wdf; struct wsdisplay_cmap *cmapp; u_int mode, idx, count; @@ -1080,6 +1081,10 @@ sti_ioctl(void *v, void *vs, u_long cmd, ret = 0; switch (cmd) { + case GCID: + *(u_int *) data = rom->rom_dd.dd_grid[0]; + break; + case WSDISPLAYIO_GMODE: *(u_int *)data = scr->scr_wsmode; break; @@ -1117,6 +1122,7 @@ sti_ioctl(void *v, void *vs, u_long cmd, *(u_int *)data = WSDISPLAY_TYPE_STI; break; + case WSDISPLAYIO_GINFO: wdf = (struct wsdisplay_fbinfo *)data; wdf->height = scr->scr_cfg.scr_height; Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.12 src/sys/dev/ic/stireg.h:1.13 --- src/sys/dev/ic/stireg.h:1.12 Tue Aug 6 07:26:56 2024 +++ src/sys/dev/ic/stireg.h Mon Aug 19 10:57:32 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.12 2024/08/06 07:26:56 macallan Exp $ */ +/* $NetBSD: stireg.h,v 1.13 2024/08/19 10:57:32 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -747,4 +747,7 @@ STI_DEP(util); #define NGLE_BUFF1_CMAP3 0x0c001e02 #define NGLE_ARTIST_CMAP0 0x0102 +/* mimic HP/UX, this will return the device's graphics ID */ +#define GCID _IOR('G', 40, u_int) + #endif /* _IC_STIREG_H_ */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Mon Aug 19 10:57:32 UTC 2024 Modified Files: src/sys/dev/ic: sti.c stireg.h Log Message: add an ioctl() to read a device's graphics ID, mimic HP/UX's GCID that way an xorg driver can identify which WSDISPLAY_TYPE_STI it's talking to without having to setup its own STI To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ic/sti.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Aug 14 12:11:48 UTC 2024 Modified Files: src/sys/dev/pci: pm3fb.c Log Message: initialize a screen even if we're not the console To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/pm3fb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pm3fb.c diff -u src/sys/dev/pci/pm3fb.c:1.9 src/sys/dev/pci/pm3fb.c:1.10 --- src/sys/dev/pci/pm3fb.c:1.9 Sun Sep 25 17:52:25 2022 +++ src/sys/dev/pci/pm3fb.c Wed Aug 14 12:11:48 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: pm3fb.c,v 1.9 2022/09/25 17:52:25 thorpej Exp $ */ +/* $NetBSD: pm3fb.c,v 1.10 2024/08/14 12:11:48 macallan Exp $ */ /* * Copyright (c) 2015 Naruaki Etomi @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pm3fb.c,v 1.9 2022/09/25 17:52:25 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm3fb.c,v 1.10 2024/08/14 12:11:48 macallan Exp $"); #include #include @@ -306,30 +306,25 @@ pm3fb_attach(device_t parent, device_t s ri = &sc->sc_console_screen.scr_ri; + vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1, &defattr); + sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC; + + pm3fb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height, + ri->ri_devcmap[(defattr >> 16) & 0xff]); + pm3fb_init_palette(sc); + + sc->sc_defaultscreen_descr.textops = &ri->ri_ops; + sc->sc_defaultscreen_descr.capabilities = ri->ri_caps; + sc->sc_defaultscreen_descr.nrows = ri->ri_rows; + sc->sc_defaultscreen_descr.ncols = ri->ri_cols; + if (is_console) { - vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1, - &defattr); - sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC; - - pm3fb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height, - ri->ri_devcmap[(defattr >> 16) & 0xff]); - sc->sc_defaultscreen_descr.textops = &ri->ri_ops; - sc->sc_defaultscreen_descr.capabilities = ri->ri_caps; - sc->sc_defaultscreen_descr.nrows = ri->ri_rows; - sc->sc_defaultscreen_descr.ncols = ri->ri_cols; wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, 0, defattr); vcons_replay_msgbuf(&sc->sc_console_screen); - } else { - if (sc->sc_console_screen.scr_ri.ri_rows == 0) { - /* do some minimal setup to avoid weirdnesses later */ - vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1, - &defattr); - } } - pm3fb_init_palette(sc); aa.console = is_console; aa.scrdata = &sc->sc_screenlist;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Aug 14 12:11:48 UTC 2024 Modified Files: src/sys/dev/pci: pm3fb.c Log Message: initialize a screen even if we're not the console To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/pm3fb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Aug 6 07:34:23 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: magic number reduction, NFC To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.9 src/sys/arch/hppa/dev/hyperfb.c:1.10 --- src/sys/arch/hppa/dev/hyperfb.c:1.9 Mon Aug 5 09:45:05 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Tue Aug 6 07:34:23 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.9 2024/08/05 09:45:05 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.10 2024/08/06 07:34:23 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.9 2024/08/05 09:45:05 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.10 2024/08/06 07:34:23 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -220,10 +220,12 @@ hyperfb_setup_fb(struct hyperfb_softc *s */ hyperfb_wait(sc); if ((sc->sc_mode != WSDISPLAYIO_MODE_EMUL) && sc->sc_24bit) { - hyperfb_write4(sc, NGLE_REG_10, 0xBBA0A000); /* 24bit */ + hyperfb_write4(sc, NGLE_REG_10, + BA(FractDcd, Otc24, Ots08, AddrLong, 0, BINapp0F8, 0)); hyperfb_write4(sc, NGLE_REG_13, 0x); } else { - hyperfb_write4(sc, NGLE_REG_10, 0x13602000); /* 8bit */ + hyperfb_write4(sc, NGLE_REG_10, + BA(IndexedDcd, Otc04, Ots08, AddrByte, 0, BINovly, 0)); hyperfb_write4(sc, NGLE_REG_13, 0xff); } hyperfb_write4(sc, NGLE_REG_14, 0x83000300); @@ -237,7 +239,8 @@ hyperfb_setup_fb24(struct hyperfb_softc { hyperfb_wait(sc); - hyperfb_write4(sc, NGLE_REG_10, 0xBBA0A000); /* 24bit */ + hyperfb_write4(sc, NGLE_REG_10, + BA(FractDcd, Otc24, Ots08, AddrLong, 0, BINapp0F8, 0)); hyperfb_write4(sc, NGLE_REG_13, 0x); hyperfb_write4(sc, NGLE_REG_14, 0x83000300); //IBOvals(RopSrc,0,BitmapExtent08,0,DataDynamic,MaskDynamic,0,0) @@ -852,7 +855,8 @@ hyperfb_setup(struct hyperfb_softc *sc) if (sc->sc_24bit) { /* overlay transparency */ hyperfb_wait_fifo(sc, 7); - hyperfb_write4(sc, NGLE_REG_11, 0x13a02000); + hyperfb_write4(sc, NGLE_REG_11, + BA(IndexedDcd, Otc04, Ots08, AddrLong, 0, BINovly, 0)); hyperfb_write4(sc, NGLE_REG_14, 0x03000300); hyperfb_write4(sc, NGLE_REG_3, 0x17f0); hyperfb_write4(sc, NGLE_REG_13, 0x); @@ -992,7 +996,8 @@ hyperfb_rectfill(struct hyperfb_softc *s */ if (sc->sc_hwmode != HW_SFILL) { hyperfb_wait(sc); - hyperfb_write4(sc, NGLE_REG_10, 0x13a02000); + hyperfb_write4(sc, NGLE_REG_10, + BA(IndexedDcd, Otc04, Ots08, AddrLong, 0, BINovly, 0)); sc->sc_hwmode = HW_SFILL; } bg &= 0xff; @@ -1051,7 +1056,8 @@ hyperfb_bitblt(void *cookie, int xs, int if (sc->sc_hwmode != HW_BLIT) { hyperfb_wait(sc); - hyperfb_write4(sc, NGLE_REG_10, 0x13a02000); + hyperfb_write4(sc, NGLE_REG_10, + BA(IndexedDcd, Otc04, Ots08, AddrLong, 0, BINovly, 0)); hyperfb_write4(sc, NGLE_REG_13, 0xff); sc->sc_hwmode = HW_BLIT; }
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Tue Aug 6 07:34:23 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: magic number reduction, NFC To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Tue Aug 6 07:26:56 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: moar bits & pieces To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.11 src/sys/dev/ic/stireg.h:1.12 --- src/sys/dev/ic/stireg.h:1.11 Mon Aug 5 09:43:37 2024 +++ src/sys/dev/ic/stireg.h Tue Aug 6 07:26:56 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.11 2024/08/05 09:43:37 macallan Exp $ */ +/* $NetBSD: stireg.h,v 1.12 2024/08/06 07:26:56 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -644,23 +644,28 @@ STI_DEP(util); #define BA(F,C,S,A,J,B,I) \ (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I)) - /* FSSSAAAJ */ + /* FCCC CSSS AAAJ */ #define IBOvals(R,M,X,S,D,L,B,F) \ (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) - /* LSSD??BF */ + /* LSSD ??BF */ #define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ +#define FractDcd 1 /* Pixel data is Fractional 8-8-8 */ #define Otc04 2 /* Pixels in each longword transfer (4) */ #define Otc32 5 /* Pixels in each longword transfer (32) */ +#define Otc24 7 /* NGLE uses this for 24bit blits */ #define Ots08 3 /* Each pixel is size (8)d transfer (1) */ #define OtsIndirect 6 /* Each bit goes through FG/BG color(8) */ +#define AddrByte 3 /* byte access? Used by NGLE for direct fb */ #define AddrLong 5 /* FB address is Long aligned (pixel) */ -#define BINovly 0x2 /* 8 bit overlay */ #define BINapp0I 0x0 /* Application Buffer 0, Indexed */ #define BINapp1I 0x1 /* Application Buffer 1, Indexed */ +#define BINovly 0x2 /* 8 bit overlay */ +#define BINcursor 0x7 /* cursor bitmap on EG */ #define BINapp0F8 0xa /* Application Buffer 0, Fractional 8-8-8 */ #define BINattr 0xd /* Attribute Bitmap */ +#define BINcmap 0xf /* colour map(s) */ #define RopClr 0x0 #define RopSrc 0x3 #define RopInv 0xc
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Tue Aug 6 07:26:56 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: moar bits & pieces To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Aug 5 09:45:05 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: do cursor position updated the way NGLE does - poke reg 28 and wait_fifo instead of waiting for the whole thing to go idle To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.8 src/sys/arch/hppa/dev/hyperfb.c:1.9 --- src/sys/arch/hppa/dev/hyperfb.c:1.8 Thu Aug 1 00:20:22 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Mon Aug 5 09:45:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.8 2024/08/01 00:20:22 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.9 2024/08/05 09:45:05 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.8 2024/08/01 00:20:22 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.9 2024/08/05 09:45:05 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -1268,7 +1268,8 @@ hyperfb_move_cursor(struct hyperfb_softc if (y < 0) y = 0x1000 - y; pos = (x << 16) | y; if (sc->sc_enabled) pos |= HCRX_ENABLE_CURSOR; - hyperfb_wait(sc); + hyperfb_wait_fifo(sc, 2); + hyperfb_write4(sc, NGLE_REG_28, 0); hyperfb_write4(sc, NGLE_REG_29, pos); }
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Aug 5 09:45:05 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: do cursor position updated the way NGLE does - poke reg 28 and wait_fifo instead of waiting for the whole thing to go idle To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Mon Aug 5 09:43:38 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: describe more register functions To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.10 src/sys/dev/ic/stireg.h:1.11 --- src/sys/dev/ic/stireg.h:1.10 Wed Jul 31 09:54:13 2024 +++ src/sys/dev/ic/stireg.h Mon Aug 5 09:43:37 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.10 2024/07/31 09:54:13 macallan Exp $ */ +/* $NetBSD: stireg.h,v 1.11 2024/08/05 09:43:37 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -672,11 +672,11 @@ STI_DEP(util); #define MaskOtc 0 /* Mask contains Object Count valid bits */ #define NGLE_REG_1 0x000118 /* Artist LUT blt ctrl */ -#define NGLE_REG_28 0x000420 -#define NGLE_REG_2 0x000480 /* LUT blt src? */ -#define NGLE_REG_3 0x0004a0 /* palette index */ -#define NGLE_REG_22 0x0005a0 -#define NGLE_REG_23 0x0005c0 +#define NGLE_REG_28 0x000420 /* HCRX video bus access */ +#define NGLE_REG_2 0x000480 /* BINC src */ +#define NGLE_REG_3 0x0004a0 /* BINC dst */ +#define NGLE_REG_22 0x0005a0 /* BINC dst mask */ +#define NGLE_REG_23 0x0005c0 /* BINC data */ #define NGLE_REG_4 0x000600 /* palette data */ #define NGLE_REG_5 0x0006a0 /* cursor data */ #define NGLE_REG_6 0x000800 /* rectfill XY */ @@ -691,19 +691,20 @@ STI_DEP(util); #define NGLE_REG_11 0x018004 /* dest bitmap access */ #define NGLE_REG_12 0x01800c /* control plane register */ #define NGLE_REG_35 0x018010 /* fg color */ -#define NGLE_REG_36 0x018014 +#define NGLE_REG_36 0x018014 /* bg colour? */ #define NGLE_REG_13 0x018018 /* image planemask */ #define NGLE_REG_14 0x01801c /* raster op */ -#define NGLE_REG_15 0x20 +#define NGLE_REG_15 0x20 /* 'busy dodger' idle */ + #define DODGER_IDLE 0x1000 /* or 0x1, likely tpyo */ #define NGLE_REG_15b0 0x20 /* busy register */ #define NGLE_REG_16 0x24 -#define NGLE_REG_16b1 0x25 -#define NGLE_REG_16b3 0x27 +#define NGLE_REG_16b1 0x25 /* setup copyarea */ +#define NGLE_REG_16b3 0x27 /* ROM table index on CRX */ #define NGLE_REG_34 0x28 /* # of fifo slots */ #define NGLE_REG_17 0x200100 /* cursor coordinates */ #define NGLE_REG_18 0x200104 /* cursor enable */ #define NGLE_REG_26 0x200118 /* EG LUT blt ctrl */ -#define NGLE_REG_19 0x200200 +#define NGLE_REG_19 0x200200 /* artist sprite size */ #define NGLE_REG_20 0x200208 /* cursor geometry */ #define NGLE_REG_21 0x200218 /* Artist misc video */ #define NGLE_REG_27 0x200308 /* Artist misc ctrl */ @@ -722,11 +723,11 @@ STI_DEP(util); #define LBC_TYPE_OVERLAY 0xc000 #define LBC_LENGTH_SHIFT 0 #define NGLE_REG_41 0x210024 -#define NGLE_REG_42 0x210028 -#define NGLE_REG_43 0x21002c -#define NGLE_REG_44 0x210030 -#define NGLE_REG_45 0x210034 -#define NGLE_REG_32 0x21003c +#define NGLE_REG_42 0x210028 /* these seem to control */ +#define NGLE_REG_43 0x21002c /* how the 24bit planes */ +#define NGLE_REG_44 0x210030 /* are displayed on HCRX - */ +#define NGLE_REG_45 0x210034 /* no info on bits */ +#define NGLE_REG_32 0x21003c /* HCRX plane enable */ #define NGLE_REG_33 0x210040 /* HCRX misc video */ #define HCRX_VIDEO_ENABLE 0x0A00 #define NGLE_REG_39 0x210120 /* HCRX 'hyperbowl' mode 2 */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Mon Aug 5 09:43:38 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: describe more register functions To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Thu Aug 1 00:20:22 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: fix tpyo and properly limit what we can mmap() To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.16 src/sys/arch/hppa/dev/gftfb.c:1.17 --- src/sys/arch/hppa/dev/gftfb.c:1.16 Wed Jul 17 08:30:28 2024 +++ src/sys/arch/hppa/dev/gftfb.c Thu Aug 1 00:20:22 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.16 2024/07/17 08:30:28 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.17 2024/08/01 00:20:22 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -868,7 +868,7 @@ gftfb_mmap(void *v, void *vs, off_t offs if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) return -1; - if (offset >= 0 || offset < sc->sc_scr.fblen) { + if (offset >= 0 && offset < sc->sc_scr.fblen) { /* framebuffer */ pa = bus_space_mmap(rom->memt, sc->sc_scr.fbaddr, offset, prot, BUS_SPACE_MAP_LINEAR); Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.7 src/sys/arch/hppa/dev/hyperfb.c:1.8 --- src/sys/arch/hppa/dev/hyperfb.c:1.7 Wed Jul 31 16:38:00 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Thu Aug 1 00:20:22 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.7 2024/07/31 16:38:00 riastradh Exp $ */ +/* $NetBSD: hyperfb.c,v 1.8 2024/08/01 00:20:22 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.7 2024/07/31 16:38:00 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.8 2024/08/01 00:20:22 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -659,7 +659,8 @@ hyperfb_mmap(void *v, void *vs, off_t of if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) return -1; - if (offset >= 0 || offset < 2048 * 1024) { + /* GSC framebuffer space is 16MB */ + if (offset >= 0 && offset < 0x100) { /* framebuffer */ pa = bus_space_mmap(sc->sc_iot, sc->sc_base + HCRX_FBOFFSET, offset, prot,
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Thu Aug 1 00:20:22 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: fix tpyo and properly limit what we can mmap() To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 31 09:56:04 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: use the blitter to draw small rectangles as well by abusing set/clear ops and the plane mask To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.5 src/sys/arch/hppa/dev/hyperfb.c:1.6 --- src/sys/arch/hppa/dev/hyperfb.c:1.5 Wed Jul 24 08:34:03 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Jul 31 09:56:04 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.5 2024/07/24 08:34:03 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.6 2024/07/31 09:56:04 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.5 2024/07/24 08:34:03 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.6 2024/07/31 09:56:04 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -98,9 +98,10 @@ struct hyperfb_softc { u_char sc_cmap_blue[256]; kmutex_t sc_hwlock; uint32_t sc_hwmode; -#define HW_FB 0 -#define HW_FILL 1 -#define HW_BLIT 2 +#define HW_FB 0 +#define HW_FILL 1 +#define HW_BLIT 2 +#define HW_SFILL 3 /* cursor stuff */ int sc_cursor_x, sc_cursor_y; int sc_hot_x, sc_hot_y, sc_enabled; @@ -210,12 +211,18 @@ static inline void hyperfb_setup_fb(struct hyperfb_softc *sc) { + /* + * turns out the plane mask is applied to everything, including + * direct framebuffer writes, so make sure we always set it + */ hyperfb_wait(sc); if ((sc->sc_mode != WSDISPLAYIO_MODE_EMUL) && sc->sc_24bit) { hyperfb_write4(sc, NGLE_REG_10, 0xBBA0A000); /* 24bit */ hyperfb_write4(sc, NGLE_REG_13, 0x); - } else + } else { hyperfb_write4(sc, NGLE_REG_10, 0x13602000); /* 8bit */ + hyperfb_write4(sc, NGLE_REG_13, 0xff); + } hyperfb_write4(sc, NGLE_REG_14, 0x83000300); hyperfb_wait(sc); hyperfb_write1(sc, NGLE_REG_16b1, 1); @@ -479,7 +486,6 @@ hyperfb_attach(device_t parent, device_t config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARGS_NONE); hyperfb_setup_fb(sc); - } static void @@ -957,6 +963,7 @@ hyperfb_rectfill(struct hyperfb_softc *s * less than 32 pixels wide */ if (wi < 32) { +#if 0 int i; uint8_t *ptr = (uint8_t *)sc->sc_fb + (y << 11) + x; @@ -967,6 +974,37 @@ hyperfb_rectfill(struct hyperfb_softc *s memset(ptr, bg, wi); ptr += 2048; } +#else + /* + * instead of memset() we abuse the blitter - set / clear the + * planes we want, select colour by planemask, do two passes + * where necessary ( as in, anything not black or white ) + */ + if (sc->sc_hwmode != HW_SFILL) { + hyperfb_wait(sc); + hyperfb_write4(sc, NGLE_REG_10, 0x13a02000); + sc->sc_hwmode = HW_SFILL; + } + bg &= 0xff; + hyperfb_wait_fifo(sc, 2); + hyperfb_write4(sc, NGLE_REG_24, (x << 16) | y); + if (bg != 0) { + hyperfb_wait_fifo(sc, 4); + hyperfb_write4(sc, NGLE_REG_14, + IBOvals(RopSet, 0, BitmapExtent08, 1, DataDynamic, MaskOtc, 0, 0)); + hyperfb_write4(sc, NGLE_REG_13, bg); + hyperfb_write4(sc, NGLE_REG_7, (wi << 16) | he); + hyperfb_write4(sc, NGLE_REG_25, (x << 16) | y); + } + if (bg != 0xff) { + hyperfb_wait_fifo(sc, 4); + hyperfb_write4(sc, NGLE_REG_14, + IBOvals(RopClr, 0, BitmapExtent08, 1, DataDynamic, MaskOtc, 0, 0)); + hyperfb_write4(sc, NGLE_REG_13, bg ^ 0xff); + hyperfb_write4(sc, NGLE_REG_7, (wi << 16) | he); + hyperfb_write4(sc, NGLE_REG_25, (x << 16) | y); + } +#endif return; } if (sc->sc_hwmode != HW_FILL) {
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 31 09:56:04 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: use the blitter to draw small rectangles as well by abusing set/clear ops and the plane mask To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 31 09:54:13 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: moar ROPs To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 31 09:54:13 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: moar ROPs To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.9 src/sys/dev/ic/stireg.h:1.10 --- src/sys/dev/ic/stireg.h:1.9 Wed Jul 17 08:28:22 2024 +++ src/sys/dev/ic/stireg.h Wed Jul 31 09:54:13 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.9 2024/07/17 08:28:22 macallan Exp $ */ +/* $NetBSD: stireg.h,v 1.10 2024/07/31 09:54:13 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -648,7 +648,7 @@ STI_DEP(util); #define IBOvals(R,M,X,S,D,L,B,F) \ (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) - /* LSSDBBBF */ + /* LSSD??BF */ #define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ #define Otc04 2 /* Pixels in each longword transfer (4) */ @@ -661,8 +661,10 @@ STI_DEP(util); #define BINapp1I 0x1 /* Application Buffer 1, Indexed */ #define BINapp0F8 0xa /* Application Buffer 0, Fractional 8-8-8 */ #define BINattr 0xd /* Attribute Bitmap */ +#define RopClr 0x0 #define RopSrc 0x3 #define RopInv 0xc +#define RopSet 0xf #define BitmapExtent08 3 /* Each write hits ( 8) bits in depth */ #define BitmapExtent32 5 /* Each write hits (32) bits in depth */ #define DataDynamic 0 /* Data register reloaded by direct access */
CVS commit: src/libexec/ld.elf_so/arch/hppa
Module Name:src Committed By: macallan Date: Mon Jul 29 05:32:39 UTC 2024 Modified Files: src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c Log Message: skip R_PARISC_NONE reloc entries instead of segfaulting on them now windowmaker runs on my C360 To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c diff -u src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.51 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.52 --- src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.51 Mon Jul 22 23:10:46 2024 +++ src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Mon Jul 29 05:32:39 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hppa_reloc.c,v 1.51 2024/07/22 23:10:46 riastradh Exp $ */ +/* $NetBSD: hppa_reloc.c,v 1.52 2024/07/29 05:32:39 macallan Exp $ */ /*- * Copyright (c) 2002, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hppa_reloc.c,v 1.51 2024/07/22 23:10:46 riastradh Exp $"); +__RCSID("$NetBSD: hppa_reloc.c,v 1.52 2024/07/29 05:32:39 macallan Exp $"); #endif /* not lint */ #include @@ -625,6 +625,9 @@ _rtld_relocate_plt_lazy(Obj_Entry *obj) Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset); Elf_Addr func_pc, func_sl; + /* skip R_PARISC_NONE entries */ + if (ELF_R_TYPE(rela->r_info) == R_TYPE(NONE)) continue; + assert(ELF_R_TYPE(rela->r_info) == R_TYPE(IPLT)); /*
CVS commit: src/libexec/ld.elf_so/arch/hppa
Module Name:src Committed By: macallan Date: Mon Jul 29 05:32:39 UTC 2024 Modified Files: src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c Log Message: skip R_PARISC_NONE reloc entries instead of segfaulting on them now windowmaker runs on my C360 To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 24 08:34:03 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: hand X a 24bit framebuffer if the hardware supports it To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 24 08:34:03 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: hand X a 24bit framebuffer if the hardware supports it To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.4 src/sys/arch/hppa/dev/hyperfb.c:1.5 --- src/sys/arch/hppa/dev/hyperfb.c:1.4 Wed Jul 17 08:30:28 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Jul 24 08:34:03 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.4 2024/07/17 08:30:28 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.5 2024/07/24 08:34:03 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.4 2024/07/17 08:30:28 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.5 2024/07/24 08:34:03 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -113,7 +113,8 @@ extern struct cfdriver hyperfb_cd; CFATTACH_DECL_NEW(hyperfb, sizeof(struct hyperfb_softc), hyperfb_match, hyperfb_attach, NULL, NULL); -void hyperfb_setup_fb(struct hyperfb_softc *); +static inline void hyperfb_setup_fb(struct hyperfb_softc *); +static inline void hyperfb_setup_fb24(struct hyperfb_softc *); static void hyperfb_init_screen(void *, struct vcons_screen *, int, long *); static int hyperfb_ioctl(void *, void *, u_long, void *, int, @@ -205,13 +206,31 @@ hyperfb_wait_fifo(struct hyperfb_softc * } while (reg < slots); } -void +static inline void hyperfb_setup_fb(struct hyperfb_softc *sc) { hyperfb_wait(sc); - hyperfb_write4(sc, NGLE_REG_10, 0x13602000); /* 8bit */ + if ((sc->sc_mode != WSDISPLAYIO_MODE_EMUL) && sc->sc_24bit) { + hyperfb_write4(sc, NGLE_REG_10, 0xBBA0A000); /* 24bit */ + hyperfb_write4(sc, NGLE_REG_13, 0x); + } else + hyperfb_write4(sc, NGLE_REG_10, 0x13602000); /* 8bit */ + hyperfb_write4(sc, NGLE_REG_14, 0x83000300); + hyperfb_wait(sc); + hyperfb_write1(sc, NGLE_REG_16b1, 1); + sc->sc_hwmode = HW_FB; +} + +static inline void +hyperfb_setup_fb24(struct hyperfb_softc *sc) +{ + + hyperfb_wait(sc); + hyperfb_write4(sc, NGLE_REG_10, 0xBBA0A000); /* 24bit */ + hyperfb_write4(sc, NGLE_REG_13, 0x); hyperfb_write4(sc, NGLE_REG_14, 0x83000300); + //IBOvals(RopSrc,0,BitmapExtent08,0,DataDynamic,MaskDynamic,0,0) hyperfb_wait(sc); hyperfb_write1(sc, NGLE_REG_16b1, 1); sc->sc_hwmode = HW_FB; @@ -367,6 +386,9 @@ hyperfb_attach(device_t parent, device_t eaio_l2(PCXL2_ACCEL_IO_ADDR2MASK(ca->ca_hpa)); #endif /* HP7300LC_CPU */ + sc->sc_mode = WSDISPLAYIO_MODE_EMUL; + sc->sc_locked = 0; + hyperfb_setup(sc); hyperfb_setup_fb(sc); @@ -382,8 +404,6 @@ hyperfb_attach(device_t parent, device_t sc->sc_screens[0] = &sc->sc_defaultscreen_descr; sc->sc_screenlist = (struct wsscreen_list){1, sc->sc_screens}; - sc->sc_mode = WSDISPLAYIO_MODE_EMUL; - sc->sc_locked = 0; vcons_init(&sc->vd, sc, &sc->sc_defaultscreen_descr, &hyperfb_accessops); @@ -458,6 +478,8 @@ hyperfb_attach(device_t parent, device_t config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARGS_NONE); + hyperfb_setup_fb(sc); + } static void @@ -513,7 +535,7 @@ hyperfb_ioctl(void *v, void *vs, u_long return ENODEV; wdf = (void *)data; wdf->height = ms->scr_ri.ri_height; - wdf->width = ms->scr_ri.ri_width; + wdf->width = sc->sc_24bit ? ms->scr_ri.ri_width << 2 : ms->scr_ri.ri_width; wdf->depth = ms->scr_ri.ri_depth; wdf->cmsize = 256; return 0; @@ -526,7 +548,7 @@ hyperfb_ioctl(void *v, void *vs, u_long return hyperfb_putcmap(sc, (struct wsdisplay_cmap *)data); case WSDISPLAYIO_LINEBYTES: - *(u_int *)data = 2048; + *(u_int *)data = sc->sc_24bit ? 8192 : 2048; return 0; case WSDISPLAYIO_SMODE: { @@ -544,6 +566,11 @@ hyperfb_ioctl(void *v, void *vs, u_long (ms->scr_defattr >> 16) & 0xff]); vcons_redraw_screen(ms); hyperfb_set_video(sc, 1); + } else { +hyperfb_setup(sc); +hyperfb_rectfill(sc, 0, 0, sc->sc_width, +sc->sc_height, 0xff); +hyperfb_setup_fb24(sc); } } } @@ -556,6 +583,19 @@ hyperfb_ioctl(void *v, void *vs, u_long ret = wsdisplayio_get_fbinfo(&ms->scr_ri, fbi); fbi->fbi_fbsize = sc->sc_height * 2048; + if (sc->sc_24bit) { +fbi->fbi_stride = 8192; +fbi->fbi_bitsperpixel = 32; +fbi->fbi_pixeltype = WSFB_RGB; +fbi->fbi_subtype.fbi_rgbmasks.red_offset = 16; +fbi->fbi_subtype.fbi_rgbmasks.red_size = 8; +fbi->fbi_subtype.fbi_rgbmasks.green_offset = 8; +fbi->fb
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 17 08:30:28 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: remove a bunch of #defines that have been moved to stireg.h To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.15 src/sys/arch/hppa/dev/gftfb.c:1.16 --- src/sys/arch/hppa/dev/gftfb.c:1.15 Fri Jul 12 08:45:05 2024 +++ src/sys/arch/hppa/dev/gftfb.c Wed Jul 17 08:30:28 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.15 2024/07/12 08:45:05 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.16 2024/07/17 08:30:28 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -159,31 +159,6 @@ struct wsdisplay_accessops gftfb_accesso NULL /* scroll */ }; -#define BA(F,C,S,A,J,B,I) \ - (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I)) - -#define IBOvals(R,M,X,S,D,L,B,F) \ - (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) - -#define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ -#define Otc04 2 /* Pixels in each longword transfer (4) */ -#define Otc32 5 /* Pixels in each longword transfer (32) */ -#define Ots08 3 /* Each pixel is size (8)d transfer (1) */ -#define OtsIndirect 6 /* Each bit goes through FG/BG color(8) */ -#define AddrLong 5 /* FB address is Long aligned (pixel) */ -#define BINovly 0x2 /* 8 bit overlay */ -#define BINapp0I 0x0 /* Application Buffer 0, Indexed */ -#define BINapp1I 0x1 /* Application Buffer 1, Indexed */ -#define BINapp0F8 0xa /* Application Buffer 0, Fractional 8-8-8 */ -#define BINattr 0xd /* Attribute Bitmap */ -#define RopSrc 0x3 -#define RopInv 0xc -#define BitmapExtent08 3 /* Each write hits ( 8) bits in depth */ -#define BitmapExtent32 5 /* Each write hits (32) bits in depth */ -#define DataDynamic 0 /* Data register reloaded by direct access */ -#define MaskDynamic 1 /* Mask register reloaded by direct access */ -#define MaskOtc 0 /* Mask contains Object Count valid bits */ - static inline void gftfb_wait_fifo(struct gftfb_softc *, uint32_t); int Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.3 src/sys/arch/hppa/dev/hyperfb.c:1.4 --- src/sys/arch/hppa/dev/hyperfb.c:1.3 Wed Jul 17 07:11:01 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Jul 17 08:30:28 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.3 2024/07/17 07:11:01 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.4 2024/07/17 08:30:28 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -28,10 +28,11 @@ /* * a native driver for HCRX / hyperdrive cards + * tested on a HCRX24Z in a C360 only so far */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.3 2024/07/17 07:11:01 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.4 2024/07/17 08:30:28 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -73,11 +74,6 @@ __KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v #define HCRX_CONFIG_24BIT 0x100 -#define HYPERBOWL_MODE_FOR_8_OVER_88_LUT0_NO_TRANSPARENCIES 4 -#define HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE 8 -#define HYPERBOWL_MODE01_8_24_LUT0_OPAQUE_LUT1_OPAQUE 10 -#define HYPERBOWL_MODE2_8_24 15 - int hyperfb_match(device_t, cfdata_t, void *); void hyperfb_attach(device_t, device_t, void *); @@ -105,7 +101,6 @@ struct hyperfb_softc { #define HW_FB 0 #define HW_FILL 1 #define HW_BLIT 2 - uint32_t sc_rect_colour, sc_rect_height; /* cursor stuff */ int sc_cursor_x, sc_cursor_y; int sc_hot_x, sc_hot_y, sc_enabled; @@ -148,33 +143,6 @@ static void hyperfb_eraserows(void *, in static void hyperfb_move_cursor(struct hyperfb_softc *, int, int); static int hyperfb_do_cursor(struct hyperfb_softc *, struct wsdisplay_cursor *); -#define BA(F,C,S,A,J,B,I) \ - (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I)) - /* FSSSAAAJ */ - -#define IBOvals(R,M,X,S,D,L,B,F) \ - (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) - /* LSSDBBBF */ - -#define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ -#define Otc04 2 /* Pixels in each longword transfer (4) */ -#define Otc32 5 /* Pixels in each longword transfer (32) */ -#define Ots08 3 /* Each pixel is size (8)d transfer (1) */ -#define OtsIndirect 6 /* Each bit goes through FG/BG color(8) */ -#define AddrLong 5 /* FB
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 17 08:30:28 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c hyperfb.c Log Message: remove a bunch of #defines that have been moved to stireg.h To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hppa/dev/gftfb.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 17 08:28:22 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: moar bits these should probably go into their own header since they don't actually have anything to do with STI To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.8 src/sys/dev/ic/stireg.h:1.9 --- src/sys/dev/ic/stireg.h:1.8 Wed Jul 17 07:06:21 2024 +++ src/sys/dev/ic/stireg.h Wed Jul 17 08:28:22 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.8 2024/07/17 07:06:21 macallan Exp $ */ +/* $NetBSD: stireg.h,v 1.9 2024/07/17 08:28:22 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -641,6 +641,34 @@ STI_DEP(util); * NGLE register layout. * Based upon xc/programs/Xserver/hw/hp/ngle/dregs.h */ + +#define BA(F,C,S,A,J,B,I) \ + (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I)) + /* FSSSAAAJ */ + +#define IBOvals(R,M,X,S,D,L,B,F) \ + (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) + /* LSSDBBBF */ + +#define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ +#define Otc04 2 /* Pixels in each longword transfer (4) */ +#define Otc32 5 /* Pixels in each longword transfer (32) */ +#define Ots08 3 /* Each pixel is size (8)d transfer (1) */ +#define OtsIndirect 6 /* Each bit goes through FG/BG color(8) */ +#define AddrLong 5 /* FB address is Long aligned (pixel) */ +#define BINovly 0x2 /* 8 bit overlay */ +#define BINapp0I 0x0 /* Application Buffer 0, Indexed */ +#define BINapp1I 0x1 /* Application Buffer 1, Indexed */ +#define BINapp0F8 0xa /* Application Buffer 0, Fractional 8-8-8 */ +#define BINattr 0xd /* Attribute Bitmap */ +#define RopSrc 0x3 +#define RopInv 0xc +#define BitmapExtent08 3 /* Each write hits ( 8) bits in depth */ +#define BitmapExtent32 5 /* Each write hits (32) bits in depth */ +#define DataDynamic 0 /* Data register reloaded by direct access */ +#define MaskDynamic 1 /* Mask register reloaded by direct access */ +#define MaskOtc 0 /* Mask contains Object Count valid bits */ + #define NGLE_REG_1 0x000118 /* Artist LUT blt ctrl */ #define NGLE_REG_28 0x000420 #define NGLE_REG_2 0x000480 /* LUT blt src? */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 17 08:28:22 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: moar bits these should probably go into their own header since they don't actually have anything to do with STI To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: macallan Date: Wed Jul 17 08:19:56 UTC 2024 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: add hyperfb at uturn This is a native driver for HCRX cards, with full wscons support ( as in, virtual consoles, fonts, colours, X with hw cursor ) needs testing on anything that isn't a GSC HCRS24Z To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: macallan Date: Wed Jul 17 08:19:56 UTC 2024 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: add hyperfb at uturn This is a native driver for HCRX cards, with full wscons support ( as in, virtual consoles, fonts, colours, X with hw cursor ) needs testing on anything that isn't a GSC HCRS24Z To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/GENERIC diff -u src/sys/arch/hppa/conf/GENERIC:1.44 src/sys/arch/hppa/conf/GENERIC:1.45 --- src/sys/arch/hppa/conf/GENERIC:1.44 Thu Mar 14 13:18:35 2024 +++ src/sys/arch/hppa/conf/GENERIC Wed Jul 17 08:19:56 2024 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.44 2024/03/14 13:18:35 macallan Exp $ +# $NetBSD: GENERIC,v 1.45 2024/07/17 08:19:56 macallan Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.44 $" +#ident "GENERIC-$Revision: 1.45 $" maxusers 32 # estimated number of users @@ -283,7 +283,10 @@ sti* at mainbus0 # [H]CRX-{8,24,48}[Z] sti* at phantomas? # [H]CRX-{8,24,48}[Z] and Visualize graphics sti* at uturn? sti* at pci? # EG-PCI, FX* -gftfb* at pci? # PCI Visualize EG + +# graphics with native drivers +hyperfb* at uturn? # hyperdrive / HCRX +gftfb* at pci? # PCI Visualize EG # Human Interface Loop hil* at gsc? irq 1 # Human Interface Loop, kbd and mouse
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 17 07:11:01 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: add cursor sprite support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.2 src/sys/arch/hppa/dev/hyperfb.c:1.3 --- src/sys/arch/hppa/dev/hyperfb.c:1.2 Mon Jul 15 10:26:09 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Jul 17 07:11:01 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.2 2024/07/15 10:26:09 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.3 2024/07/17 07:11:01 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.2 2024/07/15 10:26:09 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.3 2024/07/17 07:11:01 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -145,10 +145,8 @@ static void hyperfb_erasecols(void *, in static void hyperfb_copyrows(void *, int, int, int); static void hyperfb_eraserows(void *, int, int, long); -#if 0 static void hyperfb_move_cursor(struct hyperfb_softc *, int, int); static int hyperfb_do_cursor(struct hyperfb_softc *, struct wsdisplay_cursor *); -#endif #define BA(F,C,S,A,J,B,I) \ (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I)) @@ -593,7 +591,6 @@ hyperfb_ioctl(void *v, void *vs, u_long return ret; } -#if 0 case WSDISPLAYIO_GCURPOS: { struct wsdisplay_curpos *cp = (void *)data; @@ -626,7 +623,6 @@ hyperfb_ioctl(void *v, void *vs, u_long return hyperfb_do_cursor(sc, cursor); } -#endif case WSDISPLAYIO_SVIDEO: hyperfb_set_video(sc, *(int *)data); @@ -860,18 +856,14 @@ hyperfb_setup(struct hyperfb_softc *sc) hyperfb_write4(sc, NGLE_REG_13, 0x); hyperfb_wait(sc); hyperfb_write4(sc, NGLE_REG_3, 0); - hyperfb_write4(sc, NGLE_REG_4, 0); - hyperfb_write4(sc, NGLE_REG_4, 0); hyperfb_write4(sc, NGLE_REG_4, 0x00ff); /* BG */ hyperfb_write4(sc, NGLE_REG_4, 0x00ff); /* FG */ hyperfb_wait(sc); hyperfb_write4(sc, NGLE_REG_2, 0); - hyperfb_write4(sc, NGLE_REG_1, 0x80008004); + hyperfb_write4(sc, NGLE_REG_38, LBC_ENABLE | LBC_TYPE_CURSOR | 4); hyperfb_setup_fb(sc); - //hyperfb_write4(sc, NGLE_REG_29, 0x80200020); - - //hyperfb_move_cursor(sc, 100, 100); + hyperfb_move_cursor(sc, 100, 100); } @@ -889,9 +881,9 @@ hyperfb_set_video(struct hyperfb_softc * reg = hyperfb_read4(sc, NGLE_REG_33); if (on) { - hyperfb_write4(sc, NGLE_REG_33, reg | 0x0a00); + hyperfb_write4(sc, NGLE_REG_33, reg | HCRX_VIDEO_ENABLE); } else { - hyperfb_write4(sc, NGLE_REG_33, reg & ~0x0a00); + hyperfb_write4(sc, NGLE_REG_33, reg & ~HCRX_VIDEO_ENABLE); } } @@ -1151,3 +1143,158 @@ hyperfb_eraserows(void *cookie, int row, ri->ri_flg &= ~RI_CURSOR; } } + +static void +hyperfb_move_cursor(struct hyperfb_softc *sc, int x, int y) +{ + uint32_t pos; + + sc->sc_cursor_x = x; + x -= sc->sc_hot_x; + sc->sc_cursor_y = y; + y -= sc->sc_hot_y; + + if (x < 0) x = 0x1000 - x; + if (y < 0) y = 0x1000 - y; + pos = (x << 16) | y; + if (sc->sc_enabled) pos |= HCRX_ENABLE_CURSOR; + hyperfb_wait(sc); + hyperfb_write4(sc, NGLE_REG_29, pos); +} + +static int +hyperfb_do_cursor(struct hyperfb_softc *sc, struct wsdisplay_cursor *cur) +{ + + if (cur->which & WSDISPLAY_CURSOR_DOCUR) { + + sc->sc_enabled = cur->enable; + cur->which |= WSDISPLAY_CURSOR_DOPOS; + } + if (cur->which & WSDISPLAY_CURSOR_DOHOT) { + + sc->sc_hot_x = cur->hot.x; + sc->sc_hot_y = cur->hot.y; + cur->which |= WSDISPLAY_CURSOR_DOPOS; + } + if (cur->which & WSDISPLAY_CURSOR_DOPOS) { + + hyperfb_move_cursor(sc, cur->pos.x, cur->pos.y); + } + if (cur->which & WSDISPLAY_CURSOR_DOCMAP) { + uint32_t rgb; + uint8_t r[2], g[2], b[2]; + + copyin(cur->cmap.blue, b, 2); + copyin(cur->cmap.green, g, 2); + copyin(cur->cmap.red, r, 2); + mutex_enter(&sc->sc_hwlock); + hyperfb_wait(sc); + hyperfb_write4(sc, NGLE_REG_10, 0xBBE0F000); + hyperfb_write4(sc, NGLE_REG_14, 0x03000300); + hyperfb_write4(sc, NGLE_REG_13, 0x); + hyperfb_wait(sc); + hyperfb_write4(sc, NGLE_REG_3, 0); + rgb = (r[0] << 16) | (g[0] << 8) | b[0]; + hyperfb_write4(sc, NGLE_REG_4, rgb); /* BG */ + rgb = (r[1] << 16) | (g[1] << 8) | b[1]; + hyperfb_write4(sc, NGLE_REG_4, rgb); /* FG */ + hyperfb_write4(sc, NGLE_REG_2, 0); + hyperfb_write4(sc, NGLE_REG_38, LBC_ENABLE | LBC_TYPE_CURSOR | 4); + + hyperfb_setup_fb(sc); + mutex_exit(&sc->sc_hwlock); + + } + if (cur->which & WSDISPLAY_CURSOR_DOSHAP
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Jul 17 07:11:01 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: add cursor sprite support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 17 07:06:22 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: document a few more registers & bits To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.7 src/sys/dev/ic/stireg.h:1.8 --- src/sys/dev/ic/stireg.h:1.7 Mon Jul 15 10:30:42 2024 +++ src/sys/dev/ic/stireg.h Wed Jul 17 07:06:21 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.7 2024/07/15 10:30:42 macallan Exp $ */ +/* $NetBSD: stireg.h,v 1.8 2024/07/17 07:06:21 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -641,9 +641,9 @@ STI_DEP(util); * NGLE register layout. * Based upon xc/programs/Xserver/hw/hp/ngle/dregs.h */ -#define NGLE_REG_1 0x000118 +#define NGLE_REG_1 0x000118 /* Artist LUT blt ctrl */ #define NGLE_REG_28 0x000420 -#define NGLE_REG_2 0x000480 +#define NGLE_REG_2 0x000480 /* LUT blt src? */ #define NGLE_REG_3 0x0004a0 /* palette index */ #define NGLE_REG_22 0x0005a0 #define NGLE_REG_23 0x0005c0 @@ -672,15 +672,25 @@ STI_DEP(util); #define NGLE_REG_34 0x28 /* # of fifo slots */ #define NGLE_REG_17 0x200100 /* cursor coordinates */ #define NGLE_REG_18 0x200104 /* cursor enable */ -#define NGLE_REG_26 0x200118 +#define NGLE_REG_26 0x200118 /* EG LUT blt ctrl */ #define NGLE_REG_19 0x200200 #define NGLE_REG_20 0x200208 /* cursor geometry */ #define NGLE_REG_21 0x200218 /* Artist misc video */ #define NGLE_REG_27 0x200308 /* Artist misc ctrl */ #define NGLE_REG_29 0x21 /* HCRX cursor coord & enable */ + #define HCRX_ENABLE_CURSOR 0x8000 #define NGLE_REG_30 0x210004 /* HCRX cursor address */ #define NGLE_REG_31 0x210008 /* HCRX cursor data */ -#define NGLE_REG_38 0x210020 /* colormap data */ +#define NGLE_REG_38 0x210020 /* HCRX LUT blt ctrl */ + /* EWOO TTLL */ + #define LBC_ENABLE 0x8000 + #define LBC_WAIT_BLANK 0x4000 + #define LBS_OFFSET_SHIFT 16 + #define LBC_TYPE_MASK 0xc000 + #define LBC_TYPE_CMAP 0 + #define LBC_TYPE_CURSOR 0x8000 + #define LBC_TYPE_OVERLAY 0xc000 + #define LBC_LENGTH_SHIFT 0 #define NGLE_REG_41 0x210024 #define NGLE_REG_42 0x210028 #define NGLE_REG_43 0x21002c @@ -688,8 +698,13 @@ STI_DEP(util); #define NGLE_REG_45 0x210034 #define NGLE_REG_32 0x21003c #define NGLE_REG_33 0x210040 /* HCRX misc video */ -#define NGLE_REG_39 0x210120 -#define NGLE_REG_40 0x210130 + #define HCRX_VIDEO_ENABLE 0x0A00 +#define NGLE_REG_39 0x210120 /* HCRX 'hyperbowl' mode 2 */ + #define HYPERBOWL_MODE2_8_24 15 +#define NGLE_REG_40 0x210130 /* HCRX 'hyperbowl' */ + #define HYPERBOWL_MODE_FOR_8_OVER_88_LUT0_NO_TRANSPARENCIES 4 + #define HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE 8 + #define HYPERBOWL_MODE01_8_24_LUT0_OPAQUE_LUT1_OPAQUE 10 #define NGLE_BUFF0_CMAP0 0x1e02 #define NGLE_BUFF1_CMAP0 0x02001e02
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 17 07:06:22 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: document a few more registers & bits To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Mon Jul 15 10:30:42 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: annotate (some) registers if we know what they do fix a tpyo while there To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/stireg.h diff -u src/sys/dev/ic/stireg.h:1.6 src/sys/dev/ic/stireg.h:1.7 --- src/sys/dev/ic/stireg.h:1.6 Wed Sep 9 11:56:53 2015 +++ src/sys/dev/ic/stireg.h Mon Jul 15 10:30:42 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stireg.h,v 1.6 2015/09/09 11:56:53 skrll Exp $ */ +/* $NetBSD: stireg.h,v 1.7 2024/07/15 10:30:42 macallan Exp $ */ /* $OpenBSD: stireg.h,v 1.14 2015/04/05 23:25:57 miod Exp $ */ @@ -649,16 +649,16 @@ STI_DEP(util); #define NGLE_REG_23 0x0005c0 #define NGLE_REG_4 0x000600 /* palette data */ #define NGLE_REG_5 0x0006a0 /* cursor data */ -#define NGLE_REG_6 0x000800 -#define NGLE_REG_7 0x000804 -#define NGLE_REG_24 0x000808 -#define NGLE_REG_8 0x000820 -#define NGLE_REG_73 0x000944 -#define NGLE_REG_9 0x000a04 -#define NGLE_REG_25 0x000b00 +#define NGLE_REG_6 0x000800 /* rectfill XY */ +#define NGLE_REG_7 0x000804 /* bitblt size WH */ +#define NGLE_REG_24 0x000808 /* bitblt src XY */ +#define NGLE_REG_8 0x000820 /* transfer data */ +#define NGLE_REG_37 0x000944 /* HCRX fast rect fill, size */ +#define NGLE_REG_9 0x000a04 /* rect fill size, start */ +#define NGLE_REG_25 0x000b00 /* bitblt dst XY, start */ #define NGLE_REG_RAMDAC 0x001000 -#define NGLE_REG_10 0x018000 -#define NGLE_REG_11 0x018004 /* dest coords */ +#define NGLE_REG_10 0x018000 /* buffer ctl */ +#define NGLE_REG_11 0x018004 /* dest bitmap access */ #define NGLE_REG_12 0x01800c /* control plane register */ #define NGLE_REG_35 0x018010 /* fg color */ #define NGLE_REG_36 0x018014
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Mon Jul 15 10:30:42 UTC 2024 Modified Files: src/sys/dev/ic: stireg.h Log Message: annotate (some) registers if we know what they do fix a tpyo while there To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/stireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Jul 15 10:26:09 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: we have a blitter - use it To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u src/sys/arch/hppa/dev/hyperfb.c:1.1 src/sys/arch/hppa/dev/hyperfb.c:1.2 --- src/sys/arch/hppa/dev/hyperfb.c:1.1 Fri Jul 12 08:43:08 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Mon Jul 15 10:26:09 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.1 2024/07/12 08:43:08 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.2 2024/07/15 10:26:09 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.1 2024/07/12 08:43:08 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.2 2024/07/15 10:26:09 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -133,6 +133,52 @@ static int hyperfb_putpalreg(struct hyp void hyperfb_setup(struct hyperfb_softc *); static void hyperfb_set_video(struct hyperfb_softc *, int); +static void hyperfb_rectfill(struct hyperfb_softc *, int, int, int, int, + uint32_t); +static void hyperfb_bitblt(void *, int, int, int, int, int, + int, int); + +static void hyperfb_cursor(void *, int, int, int); +static void hyperfb_putchar(void *, int, int, u_int, long); +static void hyperfb_copycols(void *, int, int, int, int); +static void hyperfb_erasecols(void *, int, int, int, long); +static void hyperfb_copyrows(void *, int, int, int); +static void hyperfb_eraserows(void *, int, int, long); + +#if 0 +static void hyperfb_move_cursor(struct hyperfb_softc *, int, int); +static int hyperfb_do_cursor(struct hyperfb_softc *, struct wsdisplay_cursor *); +#endif + +#define BA(F,C,S,A,J,B,I) \ + (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I)) + /* FSSSAAAJ */ + +#define IBOvals(R,M,X,S,D,L,B,F) \ + (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) + /* LSSDBBBF */ + +#define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ +#define Otc04 2 /* Pixels in each longword transfer (4) */ +#define Otc32 5 /* Pixels in each longword transfer (32) */ +#define Ots08 3 /* Each pixel is size (8)d transfer (1) */ +#define OtsIndirect 6 /* Each bit goes through FG/BG color(8) */ +#define AddrLong 5 /* FB address is Long aligned (pixel) */ +#define BINovly 0x2 /* 8 bit overlay */ +#define BINapp0I 0x0 /* Application Buffer 0, Indexed */ +#define BINapp1I 0x1 /* Application Buffer 1, Indexed */ +#define BINapp0F8 0xa /* Application Buffer 0, Fractional 8-8-8 */ +#define BINattr 0xd /* Attribute Bitmap */ +#define RopSrc 0x3 +#define RopInv 0xc +#define BitmapExtent08 3 /* Each write hits ( 8) bits in depth */ +#define BitmapExtent32 5 /* Each write hits (32) bits in depth */ +#define DataDynamic 0 /* Data register reloaded by direct access */ +#define MaskDynamic 1 /* Mask register reloaded by direct access */ +#define MaskOtc 0 /* Mask contains Object Count valid bits */ + +static inline void hyperfb_wait_fifo(struct hyperfb_softc *, uint32_t); + #define ngle_bt458_write(sc, r, v) \ hyperfb_write4(sc, NGLE_REG_RAMDAC + ((r) << 2), (v) << 24) @@ -183,6 +229,16 @@ hyperfb_wait(struct hyperfb_softc *sc) } while (stat != 0); } +static inline void +hyperfb_wait_fifo(struct hyperfb_softc *sc, uint32_t slots) +{ + uint32_t reg; + + do { + reg = hyperfb_read4(sc, NGLE_REG_34); + } while (reg < slots); +} + void hyperfb_setup_fb(struct hyperfb_softc *sc) { @@ -395,10 +451,10 @@ hyperfb_attach(device_t parent, device_t #endif wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, 0, defattr); -#if 0 + hyperfb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height, ri->ri_devcmap[(defattr >> 16) & 0xff]); -#endif + vcons_replay_msgbuf(&sc->sc_console_screen); } else { /* @@ -456,21 +512,20 @@ hyperfb_init_screen(void *cookie, struct rasops_init(ri, 0, 0); ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE | WSSCREEN_RESIZE; - scr->scr_flags |= VCONS_LOADFONT | VCONS_DONT_READ; + scr->scr_flags |= VCONS_LOADFONT; rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight, sc->sc_width / ri->ri_font->fontwidth); ri->ri_hw = scr; -#if 0 + sc->sc_putchar = ri->ri_ops.putchar; - ri->ri_ops.copyrows = gftfb_copyrows; - ri->ri_ops.copycols = gftfb_copycols; - ri->ri_ops.erase
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Jul 15 10:26:09 UTC 2024 Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: we have a blitter - use it To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Fri Jul 12 08:45:05 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: STIDEBUG -> GFTFB_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.14 src/sys/arch/hppa/dev/gftfb.c:1.15 --- src/sys/arch/hppa/dev/gftfb.c:1.14 Thu Apr 18 04:52:43 2024 +++ src/sys/arch/hppa/dev/gftfb.c Fri Jul 12 08:45:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.14 2024/04/18 04:52:43 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.15 2024/07/12 08:45:05 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -47,15 +47,12 @@ #include #include -#ifdef STIDEBUG -#define DPRINTF(s) do { \ - if (stidebug) \ - printf s; \ -} while(0) +#include "opt_gftfb.h" -extern int stidebug; +#ifdef GFTFB_DEBUG +#define DPRINTF(s) printf(s) #else -#define DPRINTF(s) /* */ +#define DPRINTF(s) /* */ #endif int gftfb_match(device_t, cfdata_t, void *); @@ -425,7 +422,7 @@ gftfb_check_rom(struct gftfb_softc *spc, offs + 0x0c); subsize <<= 9; -#ifdef STIDEBUG +#ifdef GFTFB_DEBUG gftfb_disable_rom_internal(spc); DPRINTF(("ROM offset %08x size %08x type %08x", (u_int)offs, (u_int)subsize, tmp)); @@ -473,7 +470,7 @@ gftfb_check_rom(struct gftfb_softc *spc, break; #endif default: -#ifdef STIDEBUG +#ifdef GFTFB_DEBUG DPRINTF((" (wrong architecture)")); #endif break;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Fri Jul 12 08:45:05 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: STIDEBUG -> GFTFB_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: macallan Date: Fri Jul 12 08:43:08 UTC 2024 Modified Files: src/sys/arch/hppa/conf: files.hppa Added Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: first shot at a native driver for HCRX cards this will give you a fully working wsdisplay in 8bit colour living in the overlay planes, X/wsfb will also work. No acceleration or cursor sprite support yet. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hppa/conf/files.hppa cvs rdiff -u -r0 -r1.1 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/files.hppa diff -u src/sys/arch/hppa/conf/files.hppa:1.25 src/sys/arch/hppa/conf/files.hppa:1.26 --- src/sys/arch/hppa/conf/files.hppa:1.25 Tue Feb 13 13:40:13 2024 +++ src/sys/arch/hppa/conf/files.hppa Fri Jul 12 08:43:08 2024 @@ -1,4 +1,4 @@ -# $NetBSD: files.hppa,v 1.25 2024/02/13 13:40:13 macallan Exp $ +# $NetBSD: files.hppa,v 1.26 2024/07/12 08:43:08 macallan Exp $ # # $OpenBSD: files.hppa,v 1.31 2001/06/26 02:41:25 mickey Exp $ # @@ -275,6 +275,13 @@ file arch/hppa/gsc/com_harmony.c com_har device gftfb: wsemuldisplaydev, rasops8, vcons, glyphcache, sti_pci, sti attach gftfb at pci file arch/hppa/dev/gftfb.c gftfb +defflag opt_gftfb.h GFTFB_DEBUG + +# hyperdrive, aka HCRX +device hyperfb: wsemuldisplaydev, rasops8, vcons, glyphcache, sti +attach hyperfb at gedoens +file arch/hppa/dev/hyperfb.c hyperfb +defflag opt_hyperfb.h HYPERFB_DEBUG # Memory Disk file dev/md_root.c memory_disk_hooks Added files: Index: src/sys/arch/hppa/dev/hyperfb.c diff -u /dev/null src/sys/arch/hppa/dev/hyperfb.c:1.1 --- /dev/null Fri Jul 12 08:43:09 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Fri Jul 12 08:43:08 2024 @@ -0,0 +1,843 @@ +/* $NetBSD: hyperfb.c,v 1.1 2024/07/12 08:43:08 macallan Exp $ */ + +/* + * Copyright (c) 2024 Michael Lorenz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * a native driver for HCRX / hyperdrive cards + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.1 2024/07/12 08:43:08 macallan Exp $"); + +#include "opt_cputype.h" +#include "opt_hyperfb.h" + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#ifdef HYPERFB_DEBUG +#define DPRINTF printf +#else +#define DPRINTF if (0) printf +#endif + +#define STI_ROMSIZE (sizeof(struct sti_dd) * 4) + +#define HCRX_FBOFFSET 0x0100 +#define HCRX_FBLEN 0x0100 +#define HCRX_REGOFFSET 0x0010 +#define HCRX_REGLEN 0x0028 + +#define HCRX_CONFIG_24BIT 0x100 + +#define HYPERBOWL_MODE_FOR_8_OVER_88_LUT0_NO_TRANSPARENCIES 4 +#define HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE 8 +#define HYPERBOWL_MODE01_8_24_LUT0_OPAQUE_LUT1_OPAQUE 10 +#define HYPERBOWL_MODE2_8_24 15 + +int hyperfb_match(device_t, cfdata_t, void *); +void hyperfb_attach(device_t, device_t, void *); + +struct hyperfb_softc { + device_t sc_dev; + bus_space_tag_t sc_iot; + bus_addr_t sc_base; + bus_space_handle_t sc_hfb, sc_hreg; + void *sc_fb; + + int sc_width, sc_height; + int sc_locked, sc_is_console, sc_24bit; + struct vcons_screen sc_console_screen; + struct wsscreen_descr sc_defaultscreen_descr; + const struct wsscreen_descr *sc_screens[1]; + struct wsscreen_list sc_screenlist; + struct vcons_data vd; + int sc_mode; + void (*sc_putchar)(void *, int, int, u_int, long); + u_char sc_cmap_red[256]; + u_char sc_cmap_green[256]; + u_char sc_cmap_blue[256]; + kmutex_t sc_hwlock
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: macallan Date: Fri Jul 12 08:43:08 UTC 2024 Modified Files: src/sys/arch/hppa/conf: files.hppa Added Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: first shot at a native driver for HCRX cards this will give you a fully working wsdisplay in 8bit colour living in the overlay planes, X/wsfb will also work. No acceleration or cursor sprite support yet. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hppa/conf/files.hppa cvs rdiff -u -r0 -r1.1 src/sys/arch/hppa/dev/hyperfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 3 13:08:36 UTC 2024 Modified Files: src/sys/dev/ic: sti.c Log Message: fix HXRC colour map handling With this we can run X in 8bit with correct colours. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/sti.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/sti.c diff -u src/sys/dev/ic/sti.c:1.36 src/sys/dev/ic/sti.c:1.37 --- src/sys/dev/ic/sti.c:1.36 Tue Jun 25 11:52:11 2024 +++ src/sys/dev/ic/sti.c Wed Jul 3 13:08:36 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.36 2024/06/25 11:52:11 macallan Exp $ */ +/* $NetBSD: sti.c,v 1.37 2024/07/03 13:08:36 macallan Exp $ */ /* $OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.36 2024/06/25 11:52:11 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.37 2024/07/03 13:08:36 macallan Exp $"); #include "wsdisplay.h" @@ -133,6 +133,7 @@ void ngle_artist_setupfb(struct sti_scre void ngle_elk_setupfb(struct sti_screen *); void ngle_timber_setupfb(struct sti_screen *); int ngle_putcmap(struct sti_screen *, u_int, u_int); +int ngle_hcrx_putcmap(struct sti_screen *, u_int, u_int); #endif #define STI_ENABLE_ROM(sc) \ @@ -685,7 +686,7 @@ sti_screen_setup(struct sti_screen *scr, case STI_DD_HCRX: scr->setupfb = ngle_elk_setupfb; - scr->putcmap = ngle_putcmap; + scr->putcmap = ngle_hcrx_putcmap; if (scr->scr_bpp > 8) { scr->reg12_value = NGLE_BUFF1_CMAP3; @@ -694,7 +695,7 @@ sti_screen_setup(struct sti_screen *scr, scr->reg12_value = NGLE_BUFF1_CMAP0; scr->reg10_value = 0x13602000; } - scr->cmap_finish_register = NGLE_REG_1; + scr->cmap_finish_register = NGLE_REG_38; break; case STI_DD_GRX: @@ -1649,6 +1650,7 @@ ngle_putcmap(struct sti_screen *scr, u_i r++, g++, b++; } + bus_space_write_stream_4(memt, memh, NGLE_REG_2, 0x400); bus_space_write_stream_4(memt, memh, scr->cmap_finish_register, cmap_finish); @@ -1658,6 +1660,49 @@ ngle_putcmap(struct sti_screen *scr, u_i return 0; } +int +ngle_hcrx_putcmap(struct sti_screen *scr, u_int idx, u_int count) +{ + struct sti_rom *rom = scr->scr_rom; + bus_space_tag_t memt = rom->memt; + bus_space_handle_t memh = rom->regh[2]; + uint8_t *r, *g, *b; + uint32_t cmap_finish; + + if (scr->scr_bpp > 8) + cmap_finish = 0x8100; + else + cmap_finish = 0x82000100; + + r = scr->scr_rcmap + idx; + g = scr->scr_gcmap + idx; + b = scr->scr_bcmap + idx; + + ngle_setup_hw(memt, memh); + bus_space_write_stream_4(memt, memh, NGLE_REG_10, 0xbbe0f000); + bus_space_write_stream_4(memt, memh, NGLE_REG_14, 0x03000300); + bus_space_write_stream_4(memt, memh, NGLE_REG_13, 0x); + + while (count-- != 0) { + ngle_setup_hw(memt, memh); + bus_space_write_stream_4(memt, memh, NGLE_REG_3, + 0x400 | (idx << 2)); + bus_space_write_stream_4(memt, memh, NGLE_REG_4, + (*r << 16) | (*g << 8) | *b); + + idx++; + r++, g++, b++; + } + + + bus_space_write_stream_4(memt, memh, NGLE_REG_2, 0x400); + bus_space_write_stream_4(memt, memh, NGLE_REG_38, cmap_finish); + ngle_setup_fb(memt, memh, scr->reg10_value); + + + return 0; +} + void ngle_setup_hw(bus_space_tag_t memt, bus_space_handle_t memh) {
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Wed Jul 3 13:08:36 UTC 2024 Modified Files: src/sys/dev/ic: sti.c Log Message: fix HXRC colour map handling With this we can run X in 8bit with correct colours. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/sti.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Tue Jun 25 11:52:12 UTC 2024 Modified Files: src/sys/dev/ic: sti.c Log Message: first step to HCRX support this gets us an 8bit framebuffer with wrong colours, as opposed to X just erroring out To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/sti.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/sti.c diff -u src/sys/dev/ic/sti.c:1.35 src/sys/dev/ic/sti.c:1.36 --- src/sys/dev/ic/sti.c:1.35 Tue Feb 13 13:17:51 2024 +++ src/sys/dev/ic/sti.c Tue Jun 25 11:52:11 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.35 2024/02/13 13:17:51 macallan Exp $ */ +/* $NetBSD: sti.c,v 1.36 2024/06/25 11:52:11 macallan Exp $ */ /* $OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.35 2024/02/13 13:17:51 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.36 2024/06/25 11:52:11 macallan Exp $"); #include "wsdisplay.h" @@ -683,12 +683,25 @@ sti_screen_setup(struct sti_screen *scr, } break; + case STI_DD_HCRX: + scr->setupfb = ngle_elk_setupfb; + scr->putcmap = ngle_putcmap; + + if (scr->scr_bpp > 8) { + scr->reg12_value = NGLE_BUFF1_CMAP3; + scr->reg10_value = 0xBBA0A000; + } else { + scr->reg12_value = NGLE_BUFF1_CMAP0; + scr->reg10_value = 0x13602000; + } + scr->cmap_finish_register = NGLE_REG_1; + break; + case STI_DD_GRX: case STI_DD_CRX24: case STI_DD_EVRX: case STI_DD_3X2V: case STI_DD_DUAL_CRX: - case STI_DD_HCRX: case STI_DD_LEGO: case STI_DD_SUMMIT: case STI_DD_PINNACLE:
CVS commit: src/sys/dev/ic
Module Name:src Committed By: macallan Date: Tue Jun 25 11:52:12 UTC 2024 Modified Files: src/sys/dev/ic: sti.c Log Message: first step to HCRX support this gets us an 8bit framebuffer with wrong colours, as opposed to X just erroring out To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/sti.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes
Module Name:xsrc Committed By: macallan Date: Mon Jun 10 22:51:01 UTC 2024 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes: xf86Modes.c Log Message: make sure we fill in the name field in generated / converted modes fixes PR 58321, tested by tsutsui@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.8 -r1.2 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c:1.1.1.8 xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c:1.2 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c:1.1.1.8 Fri Jul 15 02:12:51 2022 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c Mon Jun 10 22:51:01 2024 @@ -818,6 +818,7 @@ xf86CVTMode(int HDisplay, int VDisplay, Mode->VTotal = libxcvt_mode_info->vtotal; Mode->VRefresh = libxcvt_mode_info->vrefresh; Mode->Flags = libxcvt_mode_info->mode_flags; +xf86SetModeDefaultName(Mode); free(libxcvt_mode_info);
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes
Module Name:xsrc Committed By: macallan Date: Mon Jun 10 22:51:01 UTC 2024 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes: xf86Modes.c Log Message: make sure we fill in the name field in generated / converted modes fixes PR 58321, tested by tsutsui@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.8 -r1.2 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: macallan Date: Tue May 28 11:06:07 UTC 2024 Modified Files: src/sys/arch/powerpc/oea: ofwoea_machdep.c Log Message: - initialize bootpath - if we don't get anything useful from args, check /chosen now my G5 finds its boot device even when netbooting a kernel directly To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/powerpc/oea/ofwoea_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.63 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.64 --- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.63 Sat Sep 23 21:26:16 2023 +++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Tue May 28 11:06:07 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ofwoea_machdep.c,v 1.63 2023/09/23 21:26:16 andvar Exp $ */ +/* $NetBSD: ofwoea_machdep.c,v 1.64 2024/05/28 11:06:07 macallan Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.63 2023/09/23 21:26:16 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.64 2024/05/28 11:06:07 macallan Exp $"); #include "ksyms.h" #include "wsdisplay.h" @@ -113,7 +113,7 @@ struct OF_translation ofw_translations[O struct pmap ofw_pmap; struct bat ofw_battable[BAT_VA2IDX(0x)+1]; -char bootpath[256]; +char bootpath[256] = ""; char model_name[64]; #if NKSYMS || defined(DDB) || defined(MODULAR) void *startsym, *endsym; @@ -165,7 +165,10 @@ ofwoea_initppc(u_int startkernel, u_int while (*args) BOOT_FLAG(*args++, boothowto); } - } else { + } + + /* if bootpath is still empty, get it from /chosen */ + if (bootpath[0] == 0) { int chs = OF_finddevice("/chosen"); int len;
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: macallan Date: Tue May 28 11:06:07 UTC 2024 Modified Files: src/sys/arch/powerpc/oea: ofwoea_machdep.c Log Message: - initialize bootpath - if we don't get anything useful from args, check /chosen now my G5 finds its boot device even when netbooting a kernel directly To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/powerpc/oea/ofwoea_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Mon May 13 10:13:11 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c cg14_driver.c Log Message: support 16bit colour This requires kernel support, which was committed yesterday. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c cvs rdiff -u -r1.21 -r1.22 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.32 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.33 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.32 Wed May 11 21:13:13 2022 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c Mon May 13 10:13:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cg14_accel.c,v 1.32 2022/05/11 21:13:13 macallan Exp $ */ +/* $NetBSD: cg14_accel.c,v 1.33 2024/05/13 10:13:10 macallan Exp $ */ /* * Copyright (c) 2013 Michael Lorenz * All rights reserved. @@ -68,6 +68,7 @@ int src_formats[] = {PICT_a8r8g8b8, PICT int tex_formats[] = {PICT_a8r8g8b8, PICT_a8b8g8r8, PICT_a8}; static void CG14Copy32(PixmapPtr, int, int, int, int, int, int); +static void CG14Copy16(PixmapPtr, int, int, int, int, int, int); static void CG14Copy8(PixmapPtr, int, int, int, int, int, int); static inline void @@ -121,6 +122,9 @@ CG14PrepareCopy(PixmapPtr pSrcPixmap, Pi case 8: p->pExa->Copy = CG14Copy8; break; + case 16: + p->pExa->Copy = CG14Copy16; + break; case 32: p->pExa->Copy = CG14Copy32; break; @@ -610,6 +614,13 @@ CG14Copy8_short_norop(Cg14Ptr p, int src } static void +CG14Copy16(PixmapPtr pDstPixmap, + int srcX, int srcY, int dstX, int dstY, int w, int h) +{ + CG14Copy8(pDstPixmap, srcX << 1, srcY, dstX << 1, dstY, w << 1, h); +} + +static void CG14Copy8(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY, int w, int h) { @@ -896,10 +907,12 @@ CG14PrepareSolid(PixmapPtr pPixmap, int fg = 0x; break; } - /* repeat the colour in every sub byte if we're in 8 bit */ + /* repeat the colour in every sub byte if we're in 8 or 16 bit */ if (pPixmap->drawable.bitsPerPixel == 8) { fg |= fg << 8; fg |= fg << 16; + } else if (pPixmap->drawable.bitsPerPixel == 16) { + fg |= fg << 16; } write_sx_reg(p, SX_QUEUED(8), fg); write_sx_reg(p, SX_QUEUED(9), fg); @@ -974,6 +987,90 @@ CG14Solid32(Cg14Ptr p, uint32_t start, u } static void +CG14Solid16(Cg14Ptr p, uint32_t start, uint32_t pitch, int w, int h) +{ + int line, num, pre, cnt; + uint32_t ptr; + + ENTER; + pre = start & 2; + if (pre != 0) pre = 1; + + if (p->last_rop == 0xcc) { + /* simple fill */ + for (line = 0; line < h; line++) { + ptr = start; + cnt = w; + if (pre) { +sxm(SX_STW, ptr, 8, 0); +ptr += 2; +cnt -= 1; +if (cnt == 0) goto next; + } + /* now do the aligned pixels in 32bit chunks */ + if (ptr & 3) xf86Msg(X_ERROR, "%s %x\n", __func__, ptr); + while(cnt > 1) { +num = min(32, cnt >> 1); +sxm(SX_STS, ptr, 8, num - 1); +ptr += num << 2; +cnt -= num << 1; + } + if (cnt > 1) xf86Msg(X_ERROR, "%s cnt %d\n", __func__, cnt); + if (cnt > 0) { +sxm(SX_STW, ptr, 8, 0); + } +next: + start += pitch; + } + } else if (p->last_rop == 0xaa) { + /* nothing to do here */ + return; + } else { + /* alright, let's do actual ROP stuff */ + + /* first repeat the fill colour into 16 registers */ + sxi(SX_SELECT_S, 8, 8, 10, 15); + + for (line = 0; line < h; line++) { + ptr = start; + cnt = w; + pre = min(pre, cnt); + if (pre) { +sxm(SX_LDW, ptr, 26, 0); +sxi(SX_ROP, 10, 26, 42, 0); +sxm(SX_STW, ptr, 42, 0); +ptr += 2; +cnt -= 1; +if (cnt == 0) goto next2; + } + /* now do the aligned pixels in 32bit chunks */ + if (ptr & 3) xf86Msg(X_ERROR, "%s %x\n", __func__, ptr); + while(cnt > 1) { +num = min(32, cnt >> 1); +sxm(SX_LD, ptr, 26, num - 1); +if (num <= 16) { + sxi(SX_ROP, 10, 26, 58, num - 1); +} else { + sxi(SX_ROP, 10, 26, 58, 15); + sxi(SX_ROP, 10, 42, 74, num - 17); +} +sxm(SX_ST, ptr, 58, num - 1); +ptr += num << 2; +cnt -= num << 1; + } + if (cnt > 1) xf86Msg(X_ERROR, "%s cnt %d\n", __func__, cnt); + if (cnt > 0) { +sxm(SX_LDW, ptr, 26, 0); +sxi(SX_ROP, 10, 26, 42, 0); +sxm(SX_STW, ptr, 42, 0); + } +next2: + start += pitch; + } + } +} + +static void CG14Solid8(Cg14Ptr p, uint32_t start, uint32_t pitch, int w, int h) { int line, num, pre
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Mon May 13 10:13:11 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c cg14_driver.c Log Message: support 16bit colour This requires kernel support, which was committed yesterday. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c cvs rdiff -u -r1.21 -r1.22 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Sun May 12 13:43:27 UTC 2024 Modified Files: src/sys/arch/sparc/dev: sxreg.h Log Message: add simple 16bit load and store ops To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sparc/dev/sxreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/dev/sxreg.h diff -u src/sys/arch/sparc/dev/sxreg.h:1.21 src/sys/arch/sparc/dev/sxreg.h:1.22 --- src/sys/arch/sparc/dev/sxreg.h:1.21 Fri Dec 10 20:36:03 2021 +++ src/sys/arch/sparc/dev/sxreg.h Sun May 12 13:43:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sxreg.h,v 1.21 2021/12/10 20:36:03 andvar Exp $ */ +/* $NetBSD: sxreg.h,v 1.22 2024/05/12 13:43:27 macallan Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -195,6 +195,8 @@ SX_LONG | (dreg << 7) | (o)) #define SX_LDB(dreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_LOAD | \ SX_UBYTE_0 | (dreg << 7) | (o)) +#define SX_LDW(dreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_LOAD | \ +SX_USHORT_0 | (dreg << 7) | (o)) #define SX_LDP(dreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_LOAD | \ SX_PACKED | (dreg << 7) | (o)) #define SX_LDUQ0(dreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_LOAD | \ @@ -223,6 +225,8 @@ SX_UBYTE_0 | (sreg << 7) | (o)) #define SX_STBC(sreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE_CLAMP | \ SX_UBYTE_0 | (sreg << 7) | (o)) +#define SX_STW(sreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE | \ +SX_USHORT_0 | (sreg << 7) | (o)) #define SX_STP(sreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE | \ SX_PACKED | (sreg << 7) | (o)) #define SX_STPS(sreg, cnt, o) (0x8000 | ((cnt) << 23) | SX_STORE_SELECT | \
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Sun May 12 13:43:27 UTC 2024 Modified Files: src/sys/arch/sparc/dev: sxreg.h Log Message: add simple 16bit load and store ops To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sparc/dev/sxreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Sun May 12 11:48:05 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: support 16bit / RGB565 colour To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/dev/cgfourteen.c diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.97 src/sys/arch/sparc/dev/cgfourteen.c:1.98 --- src/sys/arch/sparc/dev/cgfourteen.c:1.97 Wed Apr 24 11:49:58 2024 +++ src/sys/arch/sparc/dev/cgfourteen.c Sun May 12 11:48:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteen.c,v 1.97 2024/04/24 11:49:58 macallan Exp $ */ +/* $NetBSD: cgfourteen.c,v 1.98 2024/05/12 11:48:05 macallan Exp $ */ /* * Copyright (c) 1996 @@ -385,6 +385,7 @@ cgfourteenattach(device_t parent, device /* Attach to /dev/fb */ fb_attach(&sc->sc_fb, isconsole); + } /* @@ -493,6 +494,7 @@ cgfourteenioctl(dev_t dev, u_long cmd, v return EINVAL; cg14_set_depth(sc, depth); + cg14_init_cmap(sc); } break; default: @@ -608,7 +610,8 @@ cgfourteenpoll(dev_t dev, int events, st static void cg14_init(struct cgfourteen_softc *sc) { - cg14_set_depth(sc, 32); + cg14_set_depth(sc, 32); + cg14_init_cmap(sc); } static void @@ -616,6 +619,7 @@ static void cg14_reset(struct cgfourteen_softc *sc) { cg14_set_depth(sc, 8); + cg14_init_cmap(sc); } /* Enable/disable video display; power down monitor if DPMS-capable */ @@ -736,7 +740,9 @@ cg14_setup_wsdisplay(struct cgfourteen_s WSSCREEN_RESIZE, NULL }; + cg14_set_depth(sc, 8); + sc->sc_screens[0] = &sc->sc_defaultscreen_descr; sc->sc_screenlist = (struct wsscreen_list){1, sc->sc_screens}; sc->sc_mode = WSDISPLAYIO_MODE_EMUL; @@ -753,45 +759,50 @@ cg14_setup_wsdisplay(struct cgfourteen_s sc->sc_gc.gc_rectfill = cg14_rectfill_a; sc->sc_gc.gc_rop = 0xc; - vcons_init_screen(&sc->sc_vd, &sc->sc_console_screen, 1, - &defattr); + vcons_init_screen(&sc->sc_vd, &sc->sc_console_screen, 1, + &defattr); + + /* clear the screen with the default background colour */ + if (sc->sc_sx != NULL) { + cg14_rectfill(sc, 0, 0, ri->ri_width, ri->ri_height, + ri->ri_devcmap[(defattr >> 16) & 0xf]); + } else { + memset(sc->sc_fb.fb_pixels, + ri->ri_devcmap[(defattr >> 16) & 0xf], + ri->ri_stride * ri->ri_height); + } + sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC; + + sc->sc_defaultscreen_descr.textops = &ri->ri_ops; + sc->sc_defaultscreen_descr.capabilities = ri->ri_caps; + sc->sc_defaultscreen_descr.nrows = ri->ri_rows; + sc->sc_defaultscreen_descr.ncols = ri->ri_cols; + glyphcache_init_align(&sc->sc_gc, sc->sc_fb.fb_type.fb_height + 5, + (sc->sc_vramsize / sc->sc_fb.fb_type.fb_width) - + sc->sc_fb.fb_type.fb_height - 5, + sc->sc_fb.fb_type.fb_width, + ri->ri_font->fontwidth, + ri->ri_font->fontheight, + defattr, 4); - /* clear the screen with the default background colour */ - if (sc->sc_sx != NULL) { - cg14_rectfill(sc, 0, 0, ri->ri_width, ri->ri_height, -ri->ri_devcmap[(defattr >> 16) & 0xf]); - } else { - memset(sc->sc_fb.fb_pixels, - ri->ri_devcmap[(defattr >> 16) & 0xf], - ri->ri_stride * ri->ri_height); - } - sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC; - - sc->sc_defaultscreen_descr.textops = &ri->ri_ops; - sc->sc_defaultscreen_descr.capabilities = ri->ri_caps; - sc->sc_defaultscreen_descr.nrows = ri->ri_rows; - sc->sc_defaultscreen_descr.ncols = ri->ri_cols; - glyphcache_init_align(&sc->sc_gc, sc->sc_fb.fb_type.fb_height + 5, - (sc->sc_vramsize / sc->sc_fb.fb_type.fb_width) - - sc->sc_fb.fb_type.fb_height - 5, - sc->sc_fb.fb_type.fb_width, - ri->ri_font->fontwidth, - ri->ri_font->fontheight, - defattr, 4); if (is_cons) { wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, 0, defattr); vcons_replay_msgbuf(&sc->sc_console_screen); } - cg14_init_cmap(sc); - aa.console = is_cons; aa.scrdata = &sc->sc_screenlist; aa.accessops = &cg14_accessops; aa.accesscookie = &sc->sc_vd; config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARGS_NONE); + + /* + * do this here since any output through firmware calls will mess + * with XLUT settings + */ + cg14_init_cmap(sc); } static void @@ -799,18 +810,74 @@ cg14_init_cmap(struct cgfourteen_softc * { struct rasops_info *ri = &sc->sc_console_screen.scr_ri; int i, j = 0; + uint32_t r, g, b, c; uint8_t cmap[768]; - rasops_get_cmap(ri, cmap, sizeof(cmap)); - - for (i = 0; i < 256; i++) { - - sc->sc_cmap.cm_map[i][3] = cmap[j]; - sc->sc_cmap.cm_map[i][2] = cmap[j + 1]; - sc->sc_cmap.cm_map[i][1] = cmap[j + 2]; - j += 3; + if (sc->sc_depth == 16) { + /* construct an R5G6B5 palette in CLUT1/2 */ + for (i = 0; i < 0x100; i++) { + /* upper byte first */ + r = (i & 0xf8); /* red component */ + r |= r >> 5;
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Sun May 12 11:48:05 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: support 16bit / RGB565 colour To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Sun May 12 07:22:13 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteenreg.h Log Message: moar registers in particular, document XLUT bits To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/dev/cgfourteenreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/dev/cgfourteenreg.h diff -u src/sys/arch/sparc/dev/cgfourteenreg.h:1.7 src/sys/arch/sparc/dev/cgfourteenreg.h:1.8 --- src/sys/arch/sparc/dev/cgfourteenreg.h:1.7 Sat Jun 12 21:25:56 2010 +++ src/sys/arch/sparc/dev/cgfourteenreg.h Sun May 12 07:22:13 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteenreg.h,v 1.7 2010/06/12 21:25:56 macallan Exp $ */ +/* $NetBSD: cgfourteenreg.h,v 1.8 2024/05/12 07:22:13 macallan Exp $ */ /* * Copyright (c) 1996 @@ -91,6 +91,39 @@ struct cg14ctl { #define CG14_RSR_REVMASK 0xf0 /* mask to get revision */ #define CG14_RSR_IMPLMASK 0x0f /* mask to get impl. code */ volatile uint8_t ctl_ccr; /* clock control register */ +#define CCR_SCL 0x01 +#define CCR_SDA 0x02 +#define CCR_SDA_DIR 0x04 +#define CCR_ASXSEL 0x08 /* the ICS1562 has 4 data/address lines and a */ +#define CCR_DATA 0xf0 /* toggle input - I suspect this is it */ + volatile uint32_t ctl_tmr; /* test mode readback */ + volatile uint8_t ctl_mod; /* monitor data register */ + /* reads 0x4 on mine, other bits in the lower half can be written with + no obvious effect ( I suspect monitor ID ), upper half is hard zero + */ + volatile uint8_t ctl_acr; /* aux control register */ +#define ACR_BYTE_PIXEL 0x01 /* if unset pixels are 32bit */ +/* other bits are hard zero */ +uint8_t m_pad0[6]; /* Reserved */ +uint16_t m_hct; /* Horizontal Counter */ +uint16_t m_vct; /* Vertical Counter */ +uint16_t m_hbs; /* Horizontal Blank Start */ +uint16_t m_hbc; /* Horizontal Blank Clear */ +uint16_t m_hss; /* Horizontal Sync Set */ +uint16_t m_hsc; /* Horizontal Sync Set */ +uint16_t m_csc; /* Composite sync clear */ +uint16_t m_vbs; /* Vertical blank start */ +uint16_t m_vbc; /* Vertical Blank Clear */ +uint16_t m_vss; /* Verical Sync Set */ +uint16_t m_vsc; /* Verical Sync Clear */ +uint16_t m_xcs; /* XXX Gone in VSIMM 2 */ +uint16_t m_xcc; /* XXX Gone in VSIMM 2 */ +uint16_t m_fsa; /* Fault status address */ +uint16_t m_adr; /* Address register (autoincrements) */ +uint8_t m_pad2[0xce]; /* Reserved */ + +/* PCG registers */ +uint8_t m_pcg[0x100]; /* Pixel Clock generator regs */ /* XXX etc. */ }; @@ -134,6 +167,35 @@ struct cg14xlut { volatile uint8_t xlut_lutincd[CG14_CLUT_SIZE]; }; +/* + * The XLUT and ctl_ppr bits are the same - in 8bit ppr is used, in 16bit and + * 24bit XLUT + * here we select two colours, either RGB or a component passed through a + * CLUT, and blend them together. The alpha value is taken from the right + * source's CLUT's upper byte, with 0x80 being 1.0 and 0x00 being 0.0 +*/ + +#define CG14_LEFT_PASSTHROUGH 0x00 +#define CG14_LEFT_CLUT1 0x40 +#define CG14_LEFT_CLUT2 0x80 +#define CG14_LEFT_CLUT3 0xc0 + +#define CG14_RIGHT_PASSTHROUGH 0x00 +#define CG14_RIGHT_CLUT1 0x10 +#define CG14_RIGHT_CLUT2 0x20 +#define CG14_RIGHT_CLUT3 0x30 + +/* 0 is passthrough again */ +#define CG14_LEFT_B 0x04 +#define CG14_LEFT_G 0x08 +#define CG14_LEFT_R 0x0c + +/* except here 0 selects the X channel */ +#define CG14_RIGHT_X 0x00 +#define CG14_RIGHT_B 0x01 +#define CG14_RIGHT_G 0x02 +#define CG14_RIGHT_R 0x03 + /* Color Look-Up Table (CLUT) */ struct cg14clut { volatile uint32_t clut_lut[CG14_CLUT_SIZE]; /* the LUT */
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Sun May 12 07:22:13 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteenreg.h Log Message: moar registers in particular, document XLUT bits To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/dev/cgfourteenreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/base32
Module Name:src Committed By: macallan Date: Mon May 6 06:06:41 UTC 2024 Modified Files: src/distrib/sets/lists/base32: md.sparc64 Log Message: sprinkle rump, gcc=12 etc. Now sparc64 with HAVE_GCC=12 and MKRUMP=no builds again To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/base32/md.sparc64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base32/md.sparc64 diff -u src/distrib/sets/lists/base32/md.sparc64:1.3 src/distrib/sets/lists/base32/md.sparc64:1.4 --- src/distrib/sets/lists/base32/md.sparc64:1.3 Tue Apr 16 19:15:36 2024 +++ src/distrib/sets/lists/base32/md.sparc64 Mon May 6 06:06:40 2024 @@ -1,4 +1,4 @@ -# $NetBSD: md.sparc64,v 1.3 2024/04/16 19:15:36 christos Exp $ +# $NetBSD: md.sparc64,v 1.4 2024/05/06 06:06:40 macallan Exp $ ./lib/sparc base-compat-shlib compat ./lib/sparc/npf base-compat-shlib compat,npf ./lib/sparc/npf/ext_log.so base-compat-shlib compat,npf @@ -88,8 +88,10 @@ ./usr/lib/sparc/libarchive.so.5 base-compat-shlib compat ./usr/lib/sparc/libarchive.so.5.0 base-compat-shlib compat ./usr/lib/sparc/libasan.so base-compat-shlib compat,gcc,cxx -./usr/lib/sparc/libasan.so.5 base-compat-shlib compat,gcc,cxx -./usr/lib/sparc/libasan.so.5.0 base-compat-shlib compat,gcc,cxx +./usr/lib/sparc/libasan.so.5 base-compat-shlib compat,gcc=10,cxx +./usr/lib/sparc/libasan.so.5.0 base-compat-shlib compat,gcc=10,cxx +./usr/lib/sparc/libasan.so.6 base-compat-shlib compat,gcc=12,cxx +./usr/lib/sparc/libasan.so.6.0 base-compat-shlib compat,gcc=12,cxx ./usr/lib/sparc/libasn1.so base-compat-shlib compat,kerberos ./usr/lib/sparc/libasn1.so.10 base-compat-shlib compat,kerberos ./usr/lib/sparc/libasn1.so.10.0 base-compat-shlib compat,kerberos @@ -199,7 +201,8 @@ ./usr/lib/sparc/libgnumalloc.so.1.0 base-compat-shlib compat ./usr/lib/sparc/libgomp.so base-compat-shlib compat,gcc ./usr/lib/sparc/libgomp.so.2 base-compat-shlib compat,gcc -./usr/lib/sparc/libgomp.so.2.1 base-compat-shlib compat,gcc +./usr/lib/sparc/libgomp.so.2.1 base-compat-shlib compat,gcc=10 +./usr/lib/sparc/libgomp.so.2.2 base-compat-shlib compat,gcc=12 ./usr/lib/sparc/libgssapi.so base-compat-shlib compat,kerberos ./usr/lib/sparc/libgssapi.so.12 base-compat-shlib compat,kerberos ./usr/lib/sparc/libgssapi.so.12.0 base-compat-shlib compat,kerberos @@ -270,8 +273,10 @@ ./usr/lib/sparc/libldap_r.so.6 base-compat-shlib compat,ldap ./usr/lib/sparc/libldap_r.so.6.0 base-compat-shlib compat,ldap ./usr/lib/sparc/liblsan.so base-compat-shlib compat,cxx,gcc -./usr/lib/sparc/liblsan.so.2 base-compat-shlib compat,cxx,gcc -./usr/lib/sparc/liblsan.so.2.0 base-compat-shlib compat,cxx,gcc +./usr/lib/sparc/liblsan.so.2 base-compat-shlib compat,cxx,gcc=10 +./usr/lib/sparc/liblsan.so.2.0 base-compat-shlib compat,cxx,gcc=10 +./usr/lib/sparc/liblsan.so.3 base-compat-shlib compat,cxx,gcc=12 +./usr/lib/sparc/liblsan.so.3.0 base-compat-shlib compat,cxx,gcc=12 ./usr/lib/sparc/liblua.so base-compat-shlib compat ./usr/lib/sparc/liblua.so.6 base-compat-shlib compat ./usr/lib/sparc/liblua.so.6.1 base-compat-shlib compat @@ -314,9 +319,9 @@ ./usr/lib/sparc/libossaudio.so base-compat-shlib compat ./usr/lib/sparc/libossaudio.so.1 base-compat-shlib compat ./usr/lib/sparc/libossaudio.so.1.1 base-compat-shlib compat -./usr/lib/sparc/libp2k.so base-compat-shlib compat -./usr/lib/sparc/libp2k.so.2 base-compat-shlib compat -./usr/lib/sparc/libp2k.so.2.0 base-compat-shlib compat +./usr/lib/sparc/libp2k.so base-compat-shlib compat,rump +./usr/lib/sparc/libp2k.so.2 base-compat-shlib compat,rump +./usr/lib/sparc/libp2k.so.2.0 base-compat-shlib compat,rump ./usr/lib/sparc/libpam.so base-compat-shlib compat ./usr/lib/sparc/libpam.so.4 base-compat-shlib compat ./usr/lib/sparc/libpam.so.4.1 base-compat-shlib compat @@ -418,7 +423,8 @@ ./usr/lib/sparc/libssl.so.15.0 base-compat-shlib compat ./usr/lib/sparc/libstdc++.so base-compat-shlib compat,gcc,cxx,libstdcxx ./usr/lib/sparc/libstdc++.so.9 base-compat-shlib compat,gcc,cxx,libstdcxx -./usr/lib/sparc/libstdc++.so.9.0 base-compat-shlib compat,gcc,cxx,libstdcxx +./usr/lib/sparc/libstdc++.so.9.0 base-compat-shlib compat,gcc=10,cxx,libstdcxx +./usr/lib/sparc/libstdc++.so.9.1 base-compat-shlib compat,gcc=12,cxx,libstdcxx ./usr/lib/sparc/libtermcap.so base-compat-shlib compat ./usr/lib/sparc/libtermcap.so.0 base-compat-shlib compat ./usr/lib/sparc/libtermcap.so.0.6 base-compat-shlib compat @@ -432,11 +438,13 @@ ./usr/lib/sparc/libtre.so.0 base-compat-shlib compat ./usr/lib/sparc/libtre.so.0.8 base-compat-shlib compat ./usr/lib/sparc/libubsan.so base-compat-shlib compat,gcc,cxx -./usr/lib/sparc/libubsan.so.4 base-compat-shlib compat,gcc,cxx -./usr/lib/sparc/libubsan.so.4.0 base-compat-shlib compat,gcc,cxx -./usr/lib/sparc/lib
CVS commit: src/distrib/sets/lists/base32
Module Name:src Committed By: macallan Date: Mon May 6 06:06:41 UTC 2024 Modified Files: src/distrib/sets/lists/base32: md.sparc64 Log Message: sprinkle rump, gcc=12 etc. Now sparc64 with HAVE_GCC=12 and MKRUMP=no builds again To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/base32/md.sparc64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/base32
Module Name:src Committed By: macallan Date: Tue Apr 30 01:18:40 UTC 2024 Modified Files: src/distrib/sets/lists/base32: md.amd64 Log Message: sprinkle gcc=12 and rump attributes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/md.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base32/md.amd64 diff -u src/distrib/sets/lists/base32/md.amd64:1.5 src/distrib/sets/lists/base32/md.amd64:1.6 --- src/distrib/sets/lists/base32/md.amd64:1.5 Tue Apr 16 19:15:36 2024 +++ src/distrib/sets/lists/base32/md.amd64 Tue Apr 30 01:18:40 2024 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.5 2024/04/16 19:15:36 christos Exp $ +# $NetBSD: md.amd64,v 1.6 2024/04/30 01:18:40 macallan Exp $ ./lib/i386 base-compat-shlib compat ./lib/i386/npf base-compat-shlib compat,npf ./lib/i386/npf/ext_log.so base-compat-shlib compat,npf @@ -88,8 +88,10 @@ ./usr/lib/i386/libarchive.so.5 base-compat-shlib compat ./usr/lib/i386/libarchive.so.5.0 base-compat-shlib compat ./usr/lib/i386/libasan.so base-compat-shlib compat,gcc,cxx -./usr/lib/i386/libasan.so.5 base-compat-shlib compat,gcc,cxx -./usr/lib/i386/libasan.so.5.0 base-compat-shlib compat,gcc,cxx +./usr/lib/i386/libasan.so.5 base-compat-shlib compat,gcc=10,cxx +./usr/lib/i386/libasan.so.5.0 base-compat-shlib compat,gcc=10,cxx +./usr/lib/i386/libasan.so.6 base-compat-shlib compat,gcc=12,cxx +./usr/lib/i386/libasan.so.6.0 base-compat-shlib compat,gcc=12,cxx ./usr/lib/i386/libasn1.so base-compat-shlib compat,kerberos ./usr/lib/i386/libasn1.so.10 base-compat-shlib compat,kerberos ./usr/lib/i386/libasn1.so.10.0 base-compat-shlib compat,kerberos @@ -205,7 +207,8 @@ ./usr/lib/i386/libgnumalloc.so.1.0 base-compat-shlib compat ./usr/lib/i386/libgomp.so base-compat-shlib compat,gcc ./usr/lib/i386/libgomp.so.2 base-compat-shlib compat,gcc -./usr/lib/i386/libgomp.so.2.1 base-compat-shlib compat,gcc +./usr/lib/i386/libgomp.so.2.1 base-compat-shlib compat,gcc=10 +./usr/lib/i386/libgomp.so.2.2 base-compat-shlib compat,gcc=12 ./usr/lib/i386/libgssapi.so base-compat-shlib compat,kerberos ./usr/lib/i386/libgssapi.so.12 base-compat-shlib compat,kerberos ./usr/lib/i386/libgssapi.so.12.0 base-compat-shlib compat,kerberos @@ -280,8 +283,10 @@ ./usr/lib/i386/libldap_r.so.6 base-compat-shlib compat,ldap ./usr/lib/i386/libldap_r.so.6.0 base-compat-shlib compat,ldap ./usr/lib/i386/liblsan.so base-compat-shlib compat,cxx,gcc -./usr/lib/i386/liblsan.so.2 base-compat-shlib compat,cxx,gcc -./usr/lib/i386/liblsan.so.2.0 base-compat-shlib compat,cxx,gcc +./usr/lib/i386/liblsan.so.2 base-compat-shlib compat,cxx,gcc=10 +./usr/lib/i386/liblsan.so.2.0 base-compat-shlib compat,cxx,gcc=10 +./usr/lib/i386/liblsan.so.3 base-compat-shlib compat,cxx,gcc=12 +./usr/lib/i386/liblsan.so.3.0 base-compat-shlib compat,cxx,gcc=12 ./usr/lib/i386/liblua.so base-compat-shlib compat ./usr/lib/i386/liblua.so.6 base-compat-shlib compat ./usr/lib/i386/liblua.so.6.1 base-compat-shlib compat @@ -324,9 +329,9 @@ ./usr/lib/i386/libossaudio.so base-compat-shlib compat ./usr/lib/i386/libossaudio.so.1 base-compat-shlib compat ./usr/lib/i386/libossaudio.so.1.1 base-compat-shlib compat -./usr/lib/i386/libp2k.so base-compat-shlib compat -./usr/lib/i386/libp2k.so.2 base-compat-shlib compat -./usr/lib/i386/libp2k.so.2.0 base-compat-shlib compat +./usr/lib/i386/libp2k.so base-compat-shlib compat,rump +./usr/lib/i386/libp2k.so.2 base-compat-shlib compat,rump +./usr/lib/i386/libp2k.so.2.0 base-compat-shlib compat,rump ./usr/lib/i386/libpam.so base-compat-shlib compat ./usr/lib/i386/libpam.so.4 base-compat-shlib compat ./usr/lib/i386/libpam.so.4.1 base-compat-shlib compat @@ -428,7 +433,8 @@ ./usr/lib/i386/libssl.so.15.0 base-compat-shlib compat ./usr/lib/i386/libstdc++.so base-compat-shlib compat,gcc,cxx,libstdcxx ./usr/lib/i386/libstdc++.so.9 base-compat-shlib compat,gcc,cxx,libstdcxx -./usr/lib/i386/libstdc++.so.9.0 base-compat-shlib compat,gcc,cxx,libstdcxx +./usr/lib/i386/libstdc++.so.9.0 base-compat-shlib compat,gcc=10,cxx,libstdcxx +./usr/lib/i386/libstdc++.so.9.1 base-compat-shlib compat,gcc=12,cxx,libstdcxx ./usr/lib/i386/libtermcap.so base-compat-shlib compat ./usr/lib/i386/libtermcap.so.0 base-compat-shlib compat ./usr/lib/i386/libtermcap.so.0.6 base-compat-shlib compat @@ -442,11 +448,13 @@ ./usr/lib/i386/libtre.so.0 base-compat-shlib compat ./usr/lib/i386/libtre.so.0.8 base-compat-shlib compat ./usr/lib/i386/libubsan.so base-compat-shlib compat,gcc,cxx -./usr/lib/i386/libubsan.so.4 base-compat-shlib compat,gcc,cxx -./usr/lib/i386/libubsan.so.4.0 base-compat-shlib compat,gcc,cxx -./usr/lib/i386/libukfs.so base-compat-shlib compat -./usr/lib/i386/libukfs.so.1 base-compat-shlib compat -./usr/lib/i386/libukfs.so.1.0
CVS commit: src/distrib/sets/lists/base32
Module Name:src Committed By: macallan Date: Tue Apr 30 01:18:40 UTC 2024 Modified Files: src/distrib/sets/lists/base32: md.amd64 Log Message: sprinkle gcc=12 and rump attributes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/md.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Wed Apr 24 11:49:58 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: allow userland to switch to 16bit colour To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/dev/cgfourteen.c diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.96 src/sys/arch/sparc/dev/cgfourteen.c:1.97 --- src/sys/arch/sparc/dev/cgfourteen.c:1.96 Wed Dec 20 05:33:18 2023 +++ src/sys/arch/sparc/dev/cgfourteen.c Wed Apr 24 11:49:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteen.c,v 1.96 2023/12/20 05:33:18 thorpej Exp $ */ +/* $NetBSD: cgfourteen.c,v 1.97 2024/04/24 11:49:58 macallan Exp $ */ /* * Copyright (c) 1996 @@ -1072,22 +1072,28 @@ cg14_set_depth(struct cgfourteen_softc * CG14_MCTL, CG14_MCTL_ENABLEVID | CG14_MCTL_PIXMODE_8 | CG14_MCTL_POWERCTL); sc->sc_depth = 8; - /* everything is CLUT1 */ - for (i = 0; i < CG14_CLUT_SIZE; i++) - sc->sc_xlut->xlut_lut[i] = 0; + break; + case 16: + bus_space_write_1(sc->sc_bustag, sc->sc_regh, + CG14_MCTL, CG14_MCTL_ENABLEVID | + CG14_MCTL_PIXMODE_16 | CG14_MCTL_POWERCTL); + sc->sc_depth = 16; break; case 32: bus_space_write_1(sc->sc_bustag, sc->sc_regh, CG14_MCTL, CG14_MCTL_ENABLEVID | CG14_MCTL_PIXMODE_32 | CG14_MCTL_POWERCTL); sc->sc_depth = 32; - for (i = 0; i < CG14_CLUT_SIZE; i++) - sc->sc_xlut->xlut_lut[i] = 0; break; default: printf("%s: can't change to depth %d\n", device_xname(sc->sc_dev), depth); + return; } + /* everything is CLUT1 */ + for (i = 0; i < CG14_CLUT_SIZE; i++) + sc->sc_xlut->xlut_lut[i] = 0; + } static void @@ -1432,7 +1438,7 @@ cg14_bitblt_gc(void *cookie, int xs, int saddr = sc->sc_fb_paddr + xs + stride * ys; daddr = sc->sc_fb_paddr + xd + stride * yd; - + if (saddr & 3) { swi += saddr & 3; dreg += saddr & 3;
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Wed Apr 24 11:49:58 UTC 2024 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: allow userland to switch to 16bit colour To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Wed Apr 24 11:42:06 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_driver.c Log Message: don't enable xrender support unless we have 24bit colour To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.20 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.21 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.20 Sun Jan 8 22:03:02 2023 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Wed Apr 24 11:42:06 2024 @@ -395,6 +395,12 @@ CG14PreInit(ScrnInfoPtr pScrn, int flags pCg14->use_xrender = xf86ReturnOptValBool(pCg14->Options, OPTION_XRENDER, FALSE); +if (pScrn->depth < 24) { + if (pCg14->use_xrender) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disabling xrender on depth < 24\n"); + pCg14->use_xrender = FALSE; +} + /* * This must happen after pScrn->display has been set because * xf86SetWeight references it.
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Wed Apr 24 11:42:06 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_driver.c Log Message: don't enable xrender support unless we have 24bit colour To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Thu Apr 18 04:52:43 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: allow mapping of blitter registers To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.13 src/sys/arch/hppa/dev/gftfb.c:1.14 --- src/sys/arch/hppa/dev/gftfb.c:1.13 Mon Apr 1 09:48:58 2024 +++ src/sys/arch/hppa/dev/gftfb.c Thu Apr 18 04:52:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.13 2024/04/01 09:48:58 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.14 2024/04/18 04:52:43 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -237,7 +237,8 @@ gftfb_attach(device_t parent, device_t s } rom = (struct sti_rom *)kmem_zalloc(sizeof(*rom), KM_SLEEP); rom->rom_softc = &sc->sc_base; - ret = sti_rom_setup(rom, paa->pa_iot, paa->pa_memt, sc->sc_romh, sc->sc_base.bases, STI_CODEBASE_MAIN); + ret = sti_rom_setup(rom, paa->pa_iot, paa->pa_memt, sc->sc_romh, + sc->sc_base.bases, STI_CODEBASE_MAIN); if (ret != 0) { kmem_free(rom, sizeof(*rom)); return; @@ -889,16 +890,22 @@ gftfb_mmap(void *v, void *vs, off_t offs struct vcons_data *vd = v; struct gftfb_softc *sc = vd->cookie; struct sti_rom *rom = sc->sc_base.sc_rom; - paddr_t pa; + paddr_t pa = -1; - if (offset < 0 || offset >= sc->sc_scr.fblen) - return -1; - if (sc->sc_mode != WSDISPLAYIO_MODE_DUMBFB) + if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) return -1; - pa = bus_space_mmap(rom->memt, sc->sc_scr.fbaddr, offset, prot, - BUS_SPACE_MAP_LINEAR); + if (offset >= 0 || offset < sc->sc_scr.fblen) { + /* framebuffer */ + pa = bus_space_mmap(rom->memt, sc->sc_scr.fbaddr, offset, + prot, BUS_SPACE_MAP_LINEAR); + } else if (offset >= 0x8000 && offset < 0x804) { + /* blitter registers etc. */ + pa = bus_space_mmap(rom->memt, rom->regh[2], + offset - 0x8000, prot, BUS_SPACE_MAP_LINEAR); + } + return pa; }
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Thu Apr 18 04:52:43 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: allow mapping of blitter registers To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: macallan Date: Wed Apr 17 07:47:48 UTC 2024 Modified Files: src/sys/arch/hppa/hppa: machdep.c Log Message: turn LEDs off when shutting down To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/machdep.c diff -u src/sys/arch/hppa/hppa/machdep.c:1.20 src/sys/arch/hppa/hppa/machdep.c:1.21 --- src/sys/arch/hppa/hppa/machdep.c:1.20 Tue Mar 5 14:15:32 2024 +++ src/sys/arch/hppa/hppa/machdep.c Wed Apr 17 07:47:48 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.20 2024/03/05 14:15:32 thorpej Exp $ */ +/* $NetBSD: machdep.c,v 1.21 2024/04/17 07:47:48 macallan Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2024/03/05 14:15:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2024/04/17 07:47:48 macallan Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -1415,6 +1415,8 @@ cpu_reboot(int howto, char *user_boot_st if (cold_hook) (*cold_hook)(HPPA_COLD_COLD); + hppa_led_ctl(0xf, 0, 0); + if (howto & RB_HALT) { if ((howto & RB_POWERDOWN) == RB_POWERDOWN && cold_hook) { printf("Powering off...");
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: macallan Date: Wed Apr 17 07:47:48 UTC 2024 Modified Files: src/sys/arch/hppa/hppa: machdep.c Log Message: turn LEDs off when shutting down To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Apr 1 09:48:58 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: make gftfb_restore_palette() grab the default colour map from rasops instead of just writing the driver's map into the hardware ( which may have been modified by the likes of wsfb ) With this we get a readable console even when exiting X in a less than graceful manner. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.12 src/sys/arch/hppa/dev/gftfb.c:1.13 --- src/sys/arch/hppa/dev/gftfb.c:1.12 Thu Mar 28 12:50:31 2024 +++ src/sys/arch/hppa/dev/gftfb.c Mon Apr 1 09:48:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.12 2024/03/28 12:50:31 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.13 2024/04/01 09:48:58 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -212,8 +212,7 @@ gftfb_attach(device_t parent, device_t s struct rasops_info *ri; struct wsemuldisplaydev_attach_args aa; unsigned long defattr = 0; - int ret, is_console = 0, i, j; - uint8_t cmap[768]; + int ret, is_console = 0; sc->sc_dev = self; @@ -329,15 +328,7 @@ gftfb_attach(device_t parent, device_t s defattr); } - j = 0; - rasops_get_cmap(ri, cmap, sizeof(cmap)); - for (i = 0; i < 256; i++) { - sc->sc_cmap_red[i] = cmap[j]; - sc->sc_cmap_green[i] = cmap[j + 1]; - sc->sc_cmap_blue[i] = cmap[j + 2]; - gftfb_putpalreg(sc, i, cmap[j], cmap[j + 1], cmap[j + 2]); - j += 3; - } + gftfb_restore_palette(sc); /* no suspend/resume support yet */ if (!pmf_device_register(sc->sc_dev, NULL, NULL)) @@ -1008,11 +999,17 @@ gftfb_getcmap(struct gftfb_softc *sc, st static void gftfb_restore_palette(struct gftfb_softc *sc) { - int i; + uint8_t cmap[768]; + int i, j; + j = 0; + rasops_get_cmap(&sc->sc_console_screen.scr_ri, cmap, sizeof(cmap)); for (i = 0; i < 256; i++) { - gftfb_putpalreg(sc, i, sc->sc_cmap_red[i], - sc->sc_cmap_green[i], sc->sc_cmap_blue[i]); + sc->sc_cmap_red[i] = cmap[j]; + sc->sc_cmap_green[i] = cmap[j + 1]; + sc->sc_cmap_blue[i] = cmap[j + 2]; + gftfb_putpalreg(sc, i, cmap[j], cmap[j + 1], cmap[j + 2]); + j += 3; } }
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Mon Apr 1 09:48:58 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: make gftfb_restore_palette() grab the default colour map from rasops instead of just writing the driver's map into the hardware ( which may have been modified by the likes of wsfb ) With this we get a readable console even when exiting X in a less than graceful manner. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Thu Mar 28 12:50:31 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: For some reason the drawing engine occasionally scribbles past the right boundary when filling rectangles, especially annoying when we draw whitespaces As a workaround we draw all rectangles less than 50 pixels wide by drawing a 50 pixel rectangle into off-screen memory to the right of the visible fb and then copy the portion we want. Keeps track of the colour and size of the off-screen rectangle so we can avoid redrawing it whenever possible. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Thu Mar 28 12:50:31 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: For some reason the drawing engine occasionally scribbles past the right boundary when filling rectangles, especially annoying when we draw whitespaces As a workaround we draw all rectangles less than 50 pixels wide by drawing a 50 pixel rectangle into off-screen memory to the right of the visible fb and then copy the portion we want. Keeps track of the colour and size of the off-screen rectangle so we can avoid redrawing it whenever possible. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.11 src/sys/arch/hppa/dev/gftfb.c:1.12 --- src/sys/arch/hppa/dev/gftfb.c:1.11 Wed Mar 27 09:08:38 2024 +++ src/sys/arch/hppa/dev/gftfb.c Thu Mar 28 12:50:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.11 2024/03/27 09:08:38 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.12 2024/03/28 12:50:31 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -88,6 +88,7 @@ struct gftfb_softc { #define HW_FB 0 #define HW_FILL 1 #define HW_BLIT 2 + uint32_t sc_rect_colour, sc_rect_height; /* cursor stuff */ int sc_cursor_x, sc_cursor_y; int sc_hot_x, sc_hot_y, sc_enabled; @@ -250,7 +251,9 @@ gftfb_attach(device_t parent, device_t s sc->sc_width = sc->sc_scr.scr_cfg.scr_width; sc->sc_height = sc->sc_scr.scr_cfg.scr_height; - + sc->sc_rect_colour = 0xf000; + sc->sc_rect_height = 0; + aprint_normal_dev(sc->sc_dev, "%s at %dx%d\n", sc->sc_scr.name, sc->sc_width, sc->sc_height); gftfb_setup(sc); @@ -687,6 +690,9 @@ gftfb_setup(struct gftfb_softc *sc) sc->sc_enabled = 0; sc->sc_video_on = 1; + sc->sc_rect_colour = 0xf000; + sc->sc_rect_height = 0; + /* set Bt458 read mask register to all planes */ gftfb_wait(sc); ngle_bt458_write(memt, memh, 0x08, 0x04); @@ -1051,7 +1057,7 @@ gftfb_wait_fifo(struct gftfb_softc *sc, } static void -gftfb_rectfill(struct gftfb_softc *sc, int x, int y, int wi, int he, +gftfb_real_rectfill(struct gftfb_softc *sc, int x, int y, int wi, int he, uint32_t bg) { struct sti_rom *rom = sc->sc_base.sc_rom; @@ -1081,6 +1087,30 @@ gftfb_rectfill(struct gftfb_softc *sc, i } +static void +gftfb_rectfill(struct gftfb_softc *sc, int x, int y, int wi, int he, + uint32_t bg) +{ + /* + * For some reason my 4MB VisEG always draws rectangles at least 32 + * pixels wide - no idea why, the bitblt command doesn't have this + * problem. + * So, as a workaround, we draw a 50xFontHeight rectangle to the right + * of the visible fb, keep track of the colour so we don't need to + * redraw every time, and bitblt the portion we need + */ + if (wi < 50) { + if ((bg != sc->sc_rect_colour) || + (he > sc->sc_rect_height)) { + gftfb_real_rectfill(sc, sc->sc_width + 10, 0, 50, + he, bg); + sc->sc_rect_colour = bg; + sc->sc_rect_height = he; + } + gftfb_bitblt(sc, sc->sc_width + 10, 0, x, y, wi, he, RopSrc); + } else + gftfb_real_rectfill(sc, x, y, wi, he, bg); +} static void gftfb_bitblt(void *cookie, int xs, int ys, int xd, int yd, int wi, @@ -1161,9 +1191,8 @@ gftfb_putchar(void *cookie, int row, int struct vcons_screen *scr = ri->ri_hw; struct gftfb_softc *sc = scr->scr_cookie; int x, y, wi, he, rv = GC_NOPE; -#if 0 uint32_t bg; -#endif + if (sc->sc_mode != WSDISPLAYIO_MODE_EMUL) return; @@ -1179,20 +1208,14 @@ gftfb_putchar(void *cookie, int row, int x = ri->ri_xorigin + col * wi; y = ri->ri_yorigin + row * he; -#if 0 + bg = ri->ri_devcmap[(attr >> 16) & 0xf]; - /* XXX - * rectfill currently draws rectangles less than 32 pixels wide as - * 32 pixels wide, no idea why. So until I figure that one out we - * draw blanks by software - * bitblt doesn't seem to have this problem - */ if (c == 0x20) { gftfb_rectfill(sc, x, y, wi, he, bg); return; } -#endif + rv = glyphcache_try(&sc->sc_gc, c, x, y, attr); if (rv == GC_OK) return;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Mar 27 09:08:38 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: fix brainfart - only update fbi_fbsize, not the size of the visible fb... To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Wed Mar 27 09:08:38 UTC 2024 Modified Files: src/sys/arch/hppa/dev: gftfb.c Log Message: fix brainfart - only update fbi_fbsize, not the size of the visible fb... To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hppa/dev/gftfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/gftfb.c diff -u src/sys/arch/hppa/dev/gftfb.c:1.10 src/sys/arch/hppa/dev/gftfb.c:1.11 --- src/sys/arch/hppa/dev/gftfb.c:1.10 Wed Mar 27 06:52:03 2024 +++ src/sys/arch/hppa/dev/gftfb.c Wed Mar 27 09:08:38 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gftfb.c,v 1.10 2024/03/27 06:52:03 macallan Exp $ */ +/* $NetBSD: gftfb.c,v 1.11 2024/03/27 09:08:38 macallan Exp $ */ /* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */ @@ -839,7 +839,6 @@ gftfb_ioctl(void *v, void *vs, u_long cm int ret; ret = wsdisplayio_get_fbinfo(&ms->scr_ri, fbi); - fbi->fbi_height = sc->sc_scr.fbheight; fbi->fbi_fbsize = sc->sc_scr.fbheight * 2048; return ret; }