Module Name: src
Committed By: macallan
Date: Tue Jan 1 12:13:28 UTC 2013
Modified Files:
src/sys/dev/pci: files.pci radeonfb.c
Log Message:
add a compile option to override the fallback to software drawing of bitmap
fonts on R3xx ( options RADEONFB_ALWAYS_ACCEL_PUTCHAR ) since this works just
fine on my RV350.
Next step: don't map VRAM if we don't need it.
To generate a diff of this commit:
cvs rdiff -u -r1.361 -r1.362 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/radeonfb.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/pci/files.pci
diff -u src/sys/dev/pci/files.pci:1.361 src/sys/dev/pci/files.pci:1.362
--- src/sys/dev/pci/files.pci:1.361 Mon Dec 17 20:37:59 2012
+++ src/sys/dev/pci/files.pci Tue Jan 1 12:13:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: files.pci,v 1.361 2012/12/17 20:37:59 mbalmer Exp $
+# $NetBSD: files.pci,v 1.362 2013/01/01 12:13:28 macallan Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@@ -856,6 +856,7 @@ defflag opt_radeonfb.h RADEONFB_BIOS_INI
defflag opt_radeonfb.h RADEONFB_BIOS_DEBUG
defflag opt_radeonfb.h RADEONFB_MMAP_BARS
defflag opt_radeonfb.h RADEONFB_DEPTH_32
+defflag opt_radeonfb.h RADEONFB_ALWAYS_ACCEL_PUTCHAR
# Chelsio Terminator 3 (T3) 10 gigabit ethernet
device cxgbc { }
@@ -1050,7 +1051,7 @@ defflag opt_voyager.h VOYAGER_DEBUG
include "dev/pci/hdaudio/files.hdaudio"
# Permedia 2 / Sun PGX32 / Raptor
-device pm2fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, i2cbus, i2c_bitbang, ddc_read_edid, edid
+device pm2fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, i2cbus, i2c_bitbang, ddc_read_edid, edid, glyphcache
attach pm2fb at pci
file dev/pci/pm2fb.c pm2fb
defflag opt_pm2fb.h PM2FB_DEBUG
Index: src/sys/dev/pci/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.72 src/sys/dev/pci/radeonfb.c:1.73
--- src/sys/dev/pci/radeonfb.c:1.72 Mon Dec 31 11:11:17 2012
+++ src/sys/dev/pci/radeonfb.c Tue Jan 1 12:13:28 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: radeonfb.c,v 1.72 2012/12/31 11:11:17 macallan Exp $ */
+/* $NetBSD: radeonfb.c,v 1.73 2013/01/01 12:13:28 macallan Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.72 2012/12/31 11:11:17 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.73 2013/01/01 12:13:28 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -170,7 +170,9 @@ static void radeonfb_cursor(void *, int,
static void radeonfb_putchar(void *, int, int, unsigned, long);
static void radeonfb_putchar_aa32(void *, int, int, unsigned, long);
static void radeonfb_putchar_aa8(void *, int, int, unsigned, long);
+#ifndef RADEONFB_ALWAYS_ACCEL_PUTCHAR
static void radeonfb_putchar_wrapper(void *, int, int, unsigned, long);
+#endif
static int radeonfb_set_backlight(struct radeonfb_display *, int);
static int radeonfb_get_backlight(struct radeonfb_display *);
@@ -2396,6 +2398,7 @@ radeonfb_init_screen(void *cookie, struc
/* pick a putchar method based on font and Radeon model */
if (ri->ri_font->stride < ri->ri_font->fontwidth) {
/* got a bitmap font */
+#ifndef RADEONFB_ALWAYS_ACCEL_PUTCHAR
if (IS_R300(dp->rd_softc)) {
/*
* radeonfb_putchar() doesn't work right on some R3xx
@@ -2404,9 +2407,9 @@ radeonfb_init_screen(void *cookie, struc
* into vram
*/
ri->ri_ops.putchar = radeonfb_putchar_wrapper;
- } else {
+ } else
+#endif
ri->ri_ops.putchar = radeonfb_putchar;
- }
} else {
/* got an alpha font */
switch(ri->ri_depth) {
@@ -2965,6 +2968,7 @@ radeonfb_putchar_aa8(void *cookie, int r
* just sync the engine and call rasops*_putchar()
*/
+#ifndef RADEONFB_ALWAYS_ACCEL_PUTCHAR
static void
radeonfb_putchar_wrapper(void *cookie, int row, int col, u_int c, long attr)
{
@@ -2975,6 +2979,7 @@ radeonfb_putchar_wrapper(void *cookie, i
radeonfb_engine_idle(dp->rd_softc);
dp->rd_putchar(ri, row, col, c, attr);
}
+#endif
static void
radeonfb_eraserows(void *cookie, int row, int nrows, long fillattr)