Module Name:    src
Committed By:   macallan
Date:           Fri Sep 11 22:27:18 UTC 2015

Modified Files:
        src/sys/arch/sparc64/dev: ffb.c

Log Message:
- initialize sc_bg_cache and FFB_FBC_BG along with everything else so things
  get redrawn properly when exiting X
- fix off by one in ffb_ras_erasecols(), no more artifacts when the screen
  is redrawn


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sparc64/dev/ffb.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/sparc64/dev/ffb.c
diff -u src/sys/arch/sparc64/dev/ffb.c:1.55 src/sys/arch/sparc64/dev/ffb.c:1.56
--- src/sys/arch/sparc64/dev/ffb.c:1.55	Wed Oct  9 17:21:39 2013
+++ src/sys/arch/sparc64/dev/ffb.c	Fri Sep 11 22:27:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffb.c,v 1.55 2013/10/09 17:21:39 macallan Exp $	*/
+/*	$NetBSD: ffb.c,v 1.56 2015/09/11 22:27:17 macallan Exp $	*/
 /*	$OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $	*/
 
 /*
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.55 2013/10/09 17:21:39 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.56 2015/09/11 22:27:17 macallan Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -640,7 +640,7 @@ ffb_ras_init(struct ffb_softc *sc)
 	DPRINTF(("ffb_ras_init: standard resolution.\n"));
 		fbc = FFB_FBC_XE_OFF;
 	}
-	ffb_ras_fifo_wait(sc, 11);
+	ffb_ras_fifo_wait(sc, 7);
 	DPRINTF(("WID: %08x\n", FBC_READ(sc, FFB_FBC_WID)));
 	FBC_WRITE(sc, FFB_FBC_WID, 0x0);
 	FBC_WRITE(sc, FFB_FBC_PPC,
@@ -656,8 +656,11 @@ ffb_ras_init(struct ffb_softc *sc)
 	FBC_WRITE(sc, FFB_FBC_DRAWOP, FBC_DRAWOP_RECTANGLE);
 	FBC_WRITE(sc, FFB_FBC_PMASK, 0xffffffff);
 	FBC_WRITE(sc, FFB_FBC_FONTINC, 0x10000);
+	ffb_ras_fifo_wait(sc, 5);
 	sc->sc_fg_cache = 0;
 	FBC_WRITE(sc, FFB_FBC_FG, sc->sc_fg_cache);
+	sc->sc_bg_cache = 0;
+	FBC_WRITE(sc, FFB_FBC_BG, sc->sc_bg_cache);
 	FBC_WRITE(sc, FFB_FBC_BLENDC, FFB_BLENDC_FORCE_ONE |
 				      FFB_BLENDC_DF_ONE_M_A |
 				      FFB_BLENDC_SF_A);
@@ -727,7 +730,7 @@ ffb_ras_erasecols(void *cookie, int row,
 	FBC_WRITE(sc, FFB_FBC_BY, ri->ri_yorigin + row);
 	FBC_WRITE(sc, FFB_FBC_BX, ri->ri_xorigin + col);
 	FBC_WRITE(sc, FFB_FBC_BH, ri->ri_font->fontheight);
-	FBC_WRITE(sc, FFB_FBC_BW, n - 1);
+	FBC_WRITE(sc, FFB_FBC_BW, n);
 	SYNC;
 }
 

Reply via email to