Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sbus wait for the engine to go idle before issuing r...



details:   https://anonhg.NetBSD.org/src/rev/2bb619114037
branches:  trunk
changeset: 376677:2bb619114037
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Jun 28 08:53:43 2023 +0000

description:
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

diffstat:

 sys/dev/sbus/mgx.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 0d771dc0f72c -r 2bb619114037 sys/dev/sbus/mgx.c
--- a/sys/dev/sbus/mgx.c        Wed Jun 28 08:11:52 2023 +0000
+++ b/sys/dev/sbus/mgx.c        Wed Jun 28 08:53:43 2023 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index