Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci add a compile option to override the fallback to...
details: https://anonhg.NetBSD.org/src/rev/2f17c3196248
branches: trunk
changeset: 783618:2f17c3196248
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Jan 01 12:13:28 2013 +0000
description:
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.
diffstat:
sys/dev/pci/files.pci | 5 +++--
sys/dev/pci/radeonfb.c | 13 +++++++++----
2 files changed, 12 insertions(+), 6 deletions(-)
diffs (90 lines):
diff -r 462a6e8cff23 -r 2f17c3196248 sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci Tue Jan 01 11:53:28 2013 +0000
+++ b/sys/dev/pci/files.pci Tue Jan 01 12:13:28 2013 +0000
@@ -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_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 @@
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
diff -r 462a6e8cff23 -r 2f17c3196248 sys/dev/pci/radeonfb.c
--- a/sys/dev/pci/radeonfb.c Tue Jan 01 11:53:28 2013 +0000
+++ b/sys/dev/pci/radeonfb.c Tue Jan 01 12:13:28 2013 +0000
@@ -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_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 @@
/* 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 @@
* 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 @@
* 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_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)
Home |
Main Index |
Thread Index |
Old Index