Module Name: src Committed By: macallan Date: Wed Mar 5 04:36:59 UTC 2025
Modified Files: src/sys/arch/hppa/dev: hyperfb.c Log Message: finally figured out how to automatically mask off pixels at the right when drawing rectangles so we can drop the workaround To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 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.19 src/sys/arch/hppa/dev/hyperfb.c:1.20 --- src/sys/arch/hppa/dev/hyperfb.c:1.19 Wed Nov 13 08:21:16 2024 +++ src/sys/arch/hppa/dev/hyperfb.c Wed Mar 5 04:36:59 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperfb.c,v 1.19 2024/11/13 08:21:16 macallan Exp $ */ +/* $NetBSD: hyperfb.c,v 1.20 2025/03/05 04:36:59 macallan Exp $ */ /* * Copyright (c) 2024 Michael Lorenz @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.19 2024/11/13 08:21:16 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v 1.20 2025/03/05 04:36:59 macallan Exp $"); #include "opt_cputype.h" #include "opt_hyperfb.h" @@ -42,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: hyperfb.c,v #include <sys/device.h> #include <sys/bus.h> -#include <machine/cpu.h> #include <machine/iomod.h> #include <machine/autoconf.h> @@ -100,7 +99,6 @@ struct hyperfb_softc { #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; @@ -984,14 +982,6 @@ static void hyperfb_rectfill(struct hyperfb_softc *sc, int x, int y, int wi, int he, uint32_t bg) { - uint32_t mask = 0xffffffff; - - /* - * XXX - * 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 (sc->sc_hwmode != HW_FILL) { hyperfb_wait_fifo(sc, 3); @@ -999,7 +989,7 @@ hyperfb_rectfill(struct hyperfb_softc *s hyperfb_write4(sc, NGLE_REG_13, 0xff); /* bitmap op */ hyperfb_write4(sc, NGLE_REG_14, - IBOvals(RopSrc, 0, BitmapExtent08, 0, DataDynamic, MaskOtc, + IBOvals(RopSrc, 0, BitmapExtent08, 1, DataDynamic, 0, 1 /* bg transparent */, 0)); /* dst bitmap access */ hyperfb_write4(sc, NGLE_REG_11, @@ -1008,14 +998,13 @@ hyperfb_rectfill(struct hyperfb_softc *s sc->sc_hwmode = HW_FILL; } hyperfb_wait_fifo(sc, 4); - if (wi < 32) - mask = 0xffffffff << (32 - wi); + /* * XXX - the NGLE code calls this 'transfer data' * in reality it's a bit mask applied per pixel, * foreground colour in reg 35, bg in 36 */ - hyperfb_write4(sc, NGLE_REG_8, mask); + hyperfb_write4(sc, NGLE_REG_8, 0xffffffff); hyperfb_write4(sc, NGLE_REG_35, bg); /* dst XY */