Module Name:    src
Committed By:   macallan
Date:           Wed Jun 28 08:53:43 UTC 2023

Modified Files:
        src/sys/dev/sbus: mgx.c

Log Message:
wait for the engine to go idle before issuing rectfill commands
we get occasional overlap with blit commands if we just wait for fifo slots
needs further investigation, it is possible that not all writes to drawing
engine registers are pipelined and of course we don't have docs


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/sbus/mgx.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/sbus/mgx.c
diff -u src/sys/dev/sbus/mgx.c:1.21 src/sys/dev/sbus/mgx.c:1.22
--- src/sys/dev/sbus/mgx.c:1.21	Wed Jun 28 08:11:52 2023
+++ src/sys/dev/sbus/mgx.c	Wed Jun 28 08:53:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mgx.c,v 1.21 2023/06/28 08:11:52 macallan Exp $ */
+/*	$NetBSD: mgx.c,v 1.22 2023/06/28 08:53:43 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -29,7 +29,7 @@
 /* a console driver for the SSB 4096V-MGX graphics card */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mgx.c,v 1.21 2023/06/28 08:11:52 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mgx.c,v 1.22 2023/06/28 08:53:43 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -666,7 +666,8 @@ mgx_rectfill(void *cookie, int x, int y,
 	dec = sc->sc_dec;
 	dec |= (DEC_COMMAND_RECT << DEC_COMMAND_SHIFT) |
 	       (DEC_START_DIMX << DEC_START_SHIFT);
-	mgx_wait_fifo(sc, 5);
+	//mgx_wait_fifo(sc, 5);
+	mgx_wait_engine(sc);
 	mgx_write_1(sc, ATR_ROP, ROP_SRC);
 	mgx_write_4(sc, ATR_FG, col);
 	mgx_write_4(sc, ATR_DEC, dec);

Reply via email to