Module Name: xsrc
Committed By: macallan
Date: Tue Oct 22 07:42:15 UTC 2024
Modified Files:
xsrc/external/mit/xf86-video-ngle/dist/src: ngle_accel.c ngle_driver.c
Log Message:
some cleanup:
- consistetly use buffer 0 - makes no difference when double buffering is
disabled ( which it should be ) but may bite us if it isn't
- add some comments on why we do what we do
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/external/mit/xf86-video-ngle/dist/src/ngle_accel.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-ngle/dist/src/ngle_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-ngle/dist/src/ngle_accel.c
diff -u xsrc/external/mit/xf86-video-ngle/dist/src/ngle_accel.c:1.1 xsrc/external/mit/xf86-video-ngle/dist/src/ngle_accel.c:1.2
--- xsrc/external/mit/xf86-video-ngle/dist/src/ngle_accel.c:1.1 Mon Oct 21 13:40:53 2024
+++ xsrc/external/mit/xf86-video-ngle/dist/src/ngle_accel.c Tue Oct 22 07:42:15 2024
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $NetBSD: ngle_accel.c,v 1.1 2024/10/21 13:40:53 macallan Exp $ */
+/* $NetBSD: ngle_accel.c,v 1.2 2024/10/22 07:42:15 macallan Exp $ */
#include <sys/types.h>
#include <dev/ic/stireg.h>
@@ -182,7 +182,7 @@ NGLEPrepareSolid(
NGLEWrite4(fPtr, NGLE_REG_14,
IBOvals(alu, 0, BitmapExtent08, 0, DataDynamic, MaskOtc, 1, 0));
- /* XXX HCRX needs ifferent values here */
+ /* XXX HCRX needs different values here */
/* dst bitmap access */
NGLEWrite4(fPtr, NGLE_REG_11,
BA(IndexedDcd, Otc32, OtsIndirect, AddrLong, 0, BINapp0I, 0));
@@ -213,6 +213,13 @@ NGLESolid(
y1 += offset >> 11;
+ /*
+ * XXX
+ * Turns out this thing always fills rectangles to the next 32 pixel
+ * boundary on te right. To get around this we split the rectangle
+ * into a multiples-of-32 part and the rest, so we can mask off the
+ * excess pixels.
+ */
rest = w & 0x1f;
wi = w & 0xffffe0;
if (wi > 0) {
@@ -227,6 +234,7 @@ NGLESolid(
if (rest > 0) {
mask = 0xffffffff << (32 - w);
/* transfer data */
+ NGLEWaitFifo(fPtr, 3);
NGLEWrite4(fPtr, NGLE_REG_8, mask);
/* dst XY */
NGLEWrite4(fPtr, NGLE_REG_6, ((x1 + wi) << 16) | y1);
Index: xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c
diff -u xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c:1.2 xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c:1.3
--- xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c:1.2 Mon Oct 21 13:40:53 2024
+++ xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c Tue Oct 22 07:42:15 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: ngle_driver.c,v 1.2 2024/10/21 13:40:53 macallan Exp $ */
+/* $NetBSD: ngle_driver.c,v 1.3 2024/10/22 07:42:15 macallan Exp $ */
/*
* Copyright (c) 2024 Michael Lorenz
* All rights reserved.
@@ -371,7 +371,7 @@ NGLEPreInit(ScrnInfoPtr pScrn, int flags
switch (gid) {
case STI_DD_EG:
- fPtr->buf = BINapp1I;
+ fPtr->buf = BINapp0I;
fPtr->fbacc = BA(IndexedDcd, Otc04, Ots08, AddrByte, 0, fPtr->buf, 0);
break;
case STI_DD_HCRX: