Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/dev - use sx_wait() to avoid stalling the MBus



details:   https://anonhg.NetBSD.org/src/rev/7b68ae2b6e13
branches:  trunk
changeset: 376354:7b68ae2b6e13
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Jun 13 10:11:17 2023 +0000

description:
- use sx_wait() to avoid stalling the MBus
- request 32bit alignment for glyphcache cells

diffstat:

 sys/arch/sparc/dev/cgfourteen.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 38ce4e776d56 -r 7b68ae2b6e13 sys/arch/sparc/dev/cgfourteen.c
--- a/sys/arch/sparc/dev/cgfourteen.c   Tue Jun 13 10:09:31 2023 +0000
+++ b/sys/arch/sparc/dev/cgfourteen.c   Tue Jun 13 10:11:17 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgfourteen.c,v 1.94 2023/05/23 10:20:12 macallan Exp $ */
+/*     $NetBSD: cgfourteen.c,v 1.95 2023/06/13 10:11:17 macallan Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -173,7 +173,9 @@ static void cg14_eraserows(void *, int, 
  * issue ALU instruction:
  * sxi(OPCODE, srcA, srcB, dest, count)
  */
-#define sxi(inst, a, b, d, cnt) sx_write(sc->sc_sx, SX_INSTRUCTIONS, inst((a), (b), (d), (cnt)))
+#define sxi(inst, a, b, d, cnt) \
+       sx_wait(sc->sc_sx); \
+       sx_write(sc->sc_sx, SX_INSTRUCTIONS, inst((a), (b), (d), (cnt)))
 
 /*
  * issue memory referencing instruction:
@@ -770,13 +772,13 @@ cg14_setup_wsdisplay(struct cgfourteen_s
                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(&sc->sc_gc, sc->sc_fb.fb_type.fb_height + 5,
+               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);
+                       defattr, 4);
        if (is_cons) {
                wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, 0,
                    defattr);



Home | Main Index | Thread Index | Old Index