summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/sunffb
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/sunffb')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile70
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.c11
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c8
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_frect.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_wline.c3
9 files changed, 65 insertions, 49 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile
index 1a2d2e475..763d8916a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile
@@ -1,7 +1,7 @@
XCOMM
XCOMM This is an Imakefile for the ffb driver.
XCOMM
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile,v 1.5 2001/01/24 00:06:30 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile,v 1.6 2001/03/03 22:41:34 tsi Exp $
#define IHaveModules
#include <Server.tmpl>
@@ -19,27 +19,36 @@ VISOPTIONS = -DUSE_VIS
ASVISOPTION = AsVISOption
GCCVISOPTION = -Wa,$(ASVISOPTION)
#if AsOutputArchSize == 32
-#define FFBCObjectRule(name) @@\
-name.o: name.c @@\
- ObjectCompile(-mv8 -mtune=ultrasparc $(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES)) @@\
- dd if=/dev/zero bs=1 count=3 | dd of=$@ bs=1 count=3 seek=36 conv=notrunc @@\
- echo -e '\002' | dd of=$@ bs=1 count=1 seek=19 conv=notrunc @@\
- @@\
-name.i: name.c @@\
- CPPOnlyCompile(name.c,-mv8 $(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES)) @@\
- @@\
-CenterLoadTarget(debug_src,name.c,NullParameter,$(ALLDEFINES) -mv8 $(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES))
-#define FFBsObjectRule(name) @@\
-name.o: name.s @@\
- $(RM) $@ @@\
- $(CPP) $*.s | $(AS) $(ASVISOPTION) -o $@ - @@\
- dd if=/dev/zero bs=1 count=3 | dd of=$@ bs=1 count=3 seek=36 conv=notrunc @@\
- echo -e '\002' | dd of=$@ bs=1 count=1 seek=19 conv=notrunc
+#define FFBCObjectRule(name) @@\
+name.o: name.c @@\
+ ObjectCompile(-mv8 -mtune=ultrasparc \
+ $(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES)) @@\
+ dd if=/dev/zero bs=1 count=3 2>/dev/null | \
+ dd of=$@ bs=1 count=3 seek=36 conv=notrunc 2>/dev/null @@\
+ dd if=/dev/zero bs=1 count=1 2>/dev/null | \
+ tr '\000' '\002' | \
+ dd of=$@ bs=1 count=1 seek=19 conv=notrunc 2>/dev/null @@\
+ @@\
+name.i: name.c @@\
+ CPPOnlyCompile(name.c,-mv8 \
+ $(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES)) @@\
+ @@\
+CenterLoadTarget(debug_src,name.c,NullParameter,$(ALLDEFINES) -mv8 \
+ $(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES))
+#define FFBsObjectRule(name) @@\
+name.o: name.s @@\
+ $(RM) $@ @@\
+ $(CPP) $*.s | $(AS) $(ASVISOPTION) -o $@ - @@\
+ dd if=/dev/zero bs=1 count=3 2>/dev/null | \
+ dd of=$@ bs=1 count=3 seek=36 conv=notrunc 2>/dev/null @@\
+ dd if=/dev/zero bs=1 count=1 2>/dev/null | \
+ tr '\000' '\002' | \
+ dd of=$@ bs=1 count=1 seek=19 conv=notrunc 2>/dev/null
#else
#define FFBCObjectRule(name) SpecialCObjectRule(name,,$(GCCVISOPTION) $(VISOPTIONS) $(DRIDEFINES))
-#define FFBsObjectRule(name) @@\
-name.o: name.s @@\
- $(RM) $@ @@\
+#define FFBsObjectRule(name) @@\
+name.o: name.s @@\
+ $(RM) $@ @@\
$(CPP) $*.s | $(AS) $(ASVISOPTION) -o $@ -
#endif
#else
@@ -50,16 +59,17 @@ ASVISOPTION =
#define FFBsObjectRule(name)
#endif
-SRCS = ffb_driver.c ffb_accel.c ffb_attr.c ffb_stip.c ffb_bcopy.c ffb_cplane.c \
- ffb_fspans.c ffb_point.c ffb_seg.c ffb_plygon.c ffb_line.c ffb_glyph.c \
- ffb_frect.c ffb_circle.c ffb_checks.c ffb_stubs.c ffb_gc.c \
- ffb_gspans.c ffb_sspans.c ffb_zeroarc.c ffb_cursor.c ffb_dga.c ffb_dac.c \
- ffb_wid.c ffb_dbe.c $(DRISRCS)
-OBJS = ffb_driver.o ffb_accel.o ffb_attr.o ffb_stip.o ffb_bcopy.o ffb_cplane.o \
- ffb_fspans.o ffb_point.o ffb_seg.o ffb_plygon.o ffb_line.o ffb_glyph.o \
- ffb_frect.o ffb_circle.o ffb_checks.o ffb_stubs.o ffb_gc.o \
- ffb_gspans.o ffb_sspans.o ffb_zeroarc.o ffb_cursor.o ffb_dga.o ffb_dac.o \
- ffb_wid.o ffb_dbe.o $(VISOBJS) $(DRIOBJS)
+SRCS = ffb_driver.c ffb_accel.c ffb_attr.c ffb_stip.c ffb_bcopy.c \
+ ffb_cplane.c ffb_fspans.c ffb_point.c ffb_seg.c ffb_plygon.c \
+ ffb_line.c ffb_glyph.c ffb_frect.c ffb_circle.c ffb_checks.c \
+ ffb_stubs.c ffb_gc.c ffb_gspans.c ffb_sspans.c ffb_zeroarc.c \
+ ffb_cursor.c ffb_dga.c ffb_dac.c ffb_wid.c ffb_dbe.c $(DRISRCS)
+OBJS = ffb_driver.o ffb_accel.o ffb_attr.o ffb_stip.o ffb_bcopy.o \
+ ffb_cplane.o ffb_fspans.o ffb_point.o ffb_seg.o ffb_plygon.o \
+ ffb_line.o ffb_glyph.o ffb_frect.o ffb_circle.o ffb_checks.o \
+ ffb_stubs.o ffb_gc.o ffb_gspans.o ffb_sspans.o ffb_zeroarc.o \
+ ffb_cursor.o ffb_dga.o ffb_dac.o ffb_wid.o ffb_dbe.o $(VISOBJS) \
+ $(DRIOBJS)
#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb.h b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb.h
index 1a93ec075..5848ecb6e 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb.h
@@ -24,7 +24,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb.h,v 1.5 2000/12/01 00:24:34 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb.h,v 1.6 2001/03/03 22:41:34 tsi Exp $ */
#ifndef FFB_H
#define FFB_H
@@ -290,8 +290,6 @@ extern int CreatorWindowPrivateIndex;
#ifdef DEBUG_FFB
-#include <stdio.h>
-
extern FILE *FDEBUG_FD;
static __inline__ void FFB_DEBUG_init(void)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c
index 587debf36..b8ce88b5d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c
@@ -24,10 +24,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c,v 1.4 2000/12/01 00:24:34 dawes Exp $ */
-
-#include <asm/types.h>
-#include <math.h>
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c,v 1.5 2001/03/03 22:41:34 tsi Exp $ */
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.c
index aded7f96f..78abdf2f0 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.c
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.c,v 1.2 2000/06/30 17:15:16 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.c,v 1.3 2001/04/05 17:42:33 dawes Exp $ */
#include "ffb.h"
#include "ffb_rcache.h"
@@ -348,6 +348,9 @@ init_dac_flags(FFBPtr pFfb)
unsigned int did, manuf_rev, partnum;
char *device;
+ /* Fetch kernel WID. */
+ p->kernel_wid = *((volatile unsigned char *)pFfb->dfb8x);
+
/* For AFB, assume it is PAC2 which also implies not having
* the inverted cursor control attribute.
*/
@@ -425,7 +428,9 @@ static void
restore_kernel_xchannel(FFBPtr pFfb)
{
ffb_fbcPtr ffb = pFfb->regs;
- unsigned int fbc, ppc, ppc_mask, drawop;
+ unsigned int fbc, ppc, ppc_mask, drawop, wid;
+
+ wid = pFfb->dac_info.kernel_wid;
if (pFfb->has_double_buffer)
fbc = FFB_FBC_WB_AB;
@@ -443,7 +448,7 @@ restore_kernel_xchannel(FFBPtr pFfb)
FFB_ATTR_RAW(pFfb, ppc, ppc_mask, ~0,
(FFB_ROP_EDIT_BIT | GXcopy)|(FFB_ROP_NEW<<8),
- drawop, 0x0, fbc, 0xff);
+ drawop, 0x0, fbc, wid);
FFBFifo(pFfb, 4);
FFB_WRITE64(&ffb->by, 0, 0);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h
index cc2911b41..b6c4f5db5 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h,v 1.1 2000/05/23 04:47:44 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h,v 1.2 2001/04/05 17:42:33 dawes Exp $ */
#ifndef _FFB_DAC_H
#define _FFB_DAC_H
@@ -347,6 +347,8 @@ typedef struct ffb_dac_info {
#define FFB_DAC_PAC2 0x00000002 /* Pacifica2 DAC, BT498 */
#define FFB_DAC_ICURCTL 0x00000004 /* Inverted CUR_CTRL bits */
+ unsigned int kernel_wid;
+
/* These registers need to be modified when changing DAC
* timing state, so at init time we capture their values.
*/
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c
index f866f1a2d..a5d97167a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c,v 1.5 2000/12/21 12:22:57 alanh Exp $
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c,v 1.6 2001/03/21 17:02:25 dawes Exp $
* Acceleration for the Creator and Creator3D framebuffer - DRI/DRM support.
*
* Copyright (C) 2000 David S. Miller (davem@redhat.com)
@@ -273,6 +273,9 @@ FFBDRIScreenInit(ScreenPtr pScreen)
/* Our InitBuffers depends heavily on this setting. */
pDRIInfo->bufferRequests = DRI_3D_WINDOWS_ONLY;
+ pDRIInfo->createDummyCtx = TRUE;
+ pDRIInfo->createDummyCtxPriv = FALSE;
+
if (!DRIScreenInit(pScreen, pDRIInfo, &(pFfb->drmSubFD))) {
DRIDestroyInfoRec(pFfb->pDRIInfo);
xfree(pFfbDRI);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c
index b9bc424fc..689607ff3 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c
@@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c,v 1.7 2000/12/02 15:30:54 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c,v 1.8 2001/04/05 17:42:33 dawes Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -818,7 +818,8 @@ FFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
#ifdef XF86DRI
- if (pFfb->ffb_type != afb_m3 && pFfb->ffb_type != afb_m6) {
+ if (pFfb->ffb_type != afb_m3 && pFfb->ffb_type != afb_m6 &&
+ pFfb->NoAccel == FALSE) {
pFfb->dri_enabled = FFBDRIScreenInit(pScreen);
if (pFfb->dri_enabled == TRUE)
xf86Msg(X_INFO, "%s: DRM initialized\n",
@@ -912,7 +913,8 @@ FFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
/* Setup DGA support. */
- FFB_InitDGA(pScreen);
+ if (!pFfb->NoAccel)
+ FFB_InitDGA(pScreen);
#ifdef XF86DRI
if (pFfb->dri_enabled) {
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_frect.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_frect.c
index 4ad5f744e..340efef3b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_frect.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_frect.c
@@ -24,7 +24,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_frect.c,v 1.2 2000/05/23 04:47:44 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_frect.c,v 1.3 2001/04/05 17:42:33 dawes Exp $ */
#include "ffb.h"
#include "ffb_regs.h"
@@ -451,7 +451,7 @@ CreatorFillBoxSolid (DrawablePtr pDrawable, int nBox, BoxPtr pBox, unsigned long
CreatorBoxFillPage(pFfb, nBox, pBox);
pFfb->rp_active = 1;
- FFBSync(pFfb, ffb);
+ FFBSync(pFfb, pFfb->regs);
}
static void
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_wline.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_wline.c
index 2d194d82e..feb80346a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_wline.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_wline.c
@@ -23,11 +23,10 @@
* IN THE SOFTWARE.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_wline.c,v 1.2 2000/05/23 04:47:45 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_wline.c,v 1.3 2001/03/03 22:41:34 tsi Exp $ */
#define PSZ 32
-#include <math.h>
#include "ffb.h"
#include "ffb_regs.h"
#include "ffb_rcache.h"