[Xorg-commit] xc/programs/Xserver/hw/xfree86/drivers/trident blade_accel.c,1.1.4.1,1.1.4.2 image_accel.c,1.1.4.1,1.1.4.2 trident_accel.c,1.1.4.1,1.1.4.2 trident_dac.c,1.1.4.1,1.1.4.2 trident_driver.c,1.1.4.1,1.1.4.2 trident_regs.h,1.1.4.1,1.1.4.2 trident_video.c,1.1.4.1,1.1.4.2 xp_accel.c,1.1.4.1,1.1.4.2
Kaleb Keithley
xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007
Committed by: kaleb
Update of /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/programs/Xserver/hw/xfree86/drivers/trident
Modified Files:
Tag: XORG-CURRENT
blade_accel.c image_accel.c trident_accel.c trident_dac.c
trident_driver.c trident_regs.h trident_video.c xp_accel.c
Log Message:
merge most of XFree86 RC3 (4.3.99.903) from vendor branch.
bug #214
Index: blade_accel.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/blade_accel.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/blade_accel.c 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/blade_accel.c 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -23,7 +23,7 @@
*
* Trident Blade3D accelerated options.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/blade_accel.c,v 1.21 2003/10/30 13:38:01 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/blade_accel.c,v 1.22 2004/01/21 22:31:54 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -277,6 +277,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ BladeSync(pScrn);
+
pTrident->BltScanDirection = 0;
if ((xdir < 0) || (ydir < 0)) pTrident->BltScanDirection |= 1<<1;
@@ -469,6 +471,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ BladeSync(pScrn);
+
REPLICATE(color);
BLADE_OUT(0x2160, color);
BLADE_OUT(0x2148, XAACopyROP[rop]);
@@ -537,6 +541,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ BladeSync(pScrn);
+
pTrident->BltScanDirection = 0;
BLADE_OUT(0x2148, XAACopyROP[rop]);
if (bg == -1) {
@@ -677,6 +683,8 @@
){
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ BladeSync(pScrn);
+
BLADE_OUT(0x2148, XAACopyROP[rop]);
pTrident->BltScanDirection = 0;
#if 0
Index: image_accel.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/image_accel.c 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/image_accel.c 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -23,7 +23,7 @@
*
* Trident 3DImage' accelerated options.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c,v 1.26 2003/10/30 13:38:01 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c,v 1.27 2004/01/21 22:57:34 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -292,6 +292,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ ImageSync(pScrn);
+
pTrident->BltScanDirection = 0;
if ((xdir < 0) || (ydir < 0)) pTrident->BltScanDirection |= 1<<2;
@@ -352,6 +354,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ ImageSync(pScrn);
+
REPLICATE(color);
IMAGE_OUT(0x2120, 0x84000000);
IMAGE_OUT(0x2120, 0x90000000 | XAACopyROP[rop]);
@@ -404,6 +408,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ ImageSync(pScrn);
+
REPLICATE(color);
IMAGE_OUT(0x2120, 0x80000000);
IMAGE_OUT(0x2120, 0x90000000 | XAACopyROP[rop]);
@@ -468,6 +474,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ ImageSync(pScrn);
+
IMAGE_OUT(0x2120, 0x90000000 | XAAPatternROP[rop]);
if (bg == -1) {
REPLICATE(fg);
@@ -512,6 +520,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ ImageSync(pScrn);
+
IMAGE_OUT(0x2120, 0x90000000 | XAAPatternROP[rop]);
IMAGE_OUT(0x2120, 0x80000000 | 1<<26);
if (transparency_color != -1) {
@@ -547,6 +557,8 @@
){
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ ImageSync(pScrn);
+
IMAGE_OUT(0x2120, 0x80000000);
IMAGE_OUT(0x2120, 0x90000000 | XAACopyROP[rop]);
if (bg == -1) {
@@ -599,6 +611,9 @@
int bpp, int depth)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+
+ ImageSync(pScrn);
+
IMAGE_OUT(0x2120, 0x90000000 | XAACopyROP[rop]);
if (transparency_color != -1) {
IMAGE_OUT(0x2120, 0x70000000 | 1<<26 | (transparency_color&0xffffff));
Index: trident_accel.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/trident_accel.c 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/trident_accel.c 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -23,7 +23,7 @@
*
* Trident accelerated options.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c,v 1.28 2003/10/30 13:38:01 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c,v 1.29 2004/01/21 22:57:34 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -276,6 +276,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int dst = 0;
+ TridentSync(pScrn);
+
pTrident->BltScanDirection = 0;
if (xdir < 0) pTrident->BltScanDirection |= XNEG;
if (ydir < 0) pTrident->BltScanDirection |= YNEG;
@@ -322,6 +324,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ TridentSync(pScrn);
+
pTrident->BltScanDirection = 0;
REPLICATE(color);
TGUI_FMIX(XAAPatternROP[rop]);
@@ -383,6 +387,8 @@
CARD32 *DashPattern = (CARD32*)pattern;
CARD32 NiceDashPattern = DashPattern[0];
+ TridentSync(pScrn);
+
NiceDashPattern = *((CARD16 *)pattern) & ((1<<length) - 1);
switch(length) {
case 2: NiceDashPattern |= NiceDashPattern << 2;
@@ -444,6 +450,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int drawflag = 0;
+ TridentSync(pScrn);
+
REPLICATE(color);
TGUI_FMIX(XAAPatternROP[rop]);
if (pTrident->Chipset == PROVIDIA9685 ||
@@ -506,6 +514,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int drawflag = 0;
+ TridentSync(pScrn);
+
REPLICATE(fg);
if (pTrident->Chipset == PROVIDIA9685 ||
pTrident->Chipset == CYBER9388)
@@ -564,6 +574,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int drawflag = 0;
+ TridentSync(pScrn);
+
REPLICATE(transparency_color);
if (transparency_color != -1) {
if (pTrident->Chipset == PROVIDIA9685 ||
@@ -607,6 +619,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int drawflag = SRCMONO;
+ TridentSync(pScrn);
+
REPLICATE(fg);
TGUI_FCOLOUR(fg);
if (bg == -1) {
Index: trident_dac.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/trident_dac.c 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/trident_dac.c 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -21,7 +21,7 @@
*
* Author: Alan Hourihane, alanh at fairlite.demon.co.uk
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c,v 1.79 2003/11/03 05:11:42 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c,v 1.80 2004/01/21 22:31:54 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -734,6 +734,10 @@
if (pTrident->Chipset == CYBERBLADEXP4)
pReg->tridentRegs3CE[DisplayEngCont] = 0x08;
+
+ /* Avoid lockup on Blade3D, PCI Retry is permanently on */
+ if (pTrident->Chipset == BLADE3D)
+ pReg->tridentRegs3x4[PCIRetry] = 0x9F;
return(TRUE);
}
Index: trident_driver.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/trident_driver.c 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/trident_driver.c 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -28,7 +28,7 @@
* Massimiliano Ghilardi, max at Linuz.sns.it, some fixes to the
* clockchip programming code.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c,v 1.189 2003/11/06 18:38:09 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c,v 1.191 2004/01/21 22:51:19 alanh Exp $ */
#include "xf1bpp.h"
#include "xf4bpp.h"
@@ -1923,6 +1923,7 @@
chipset = "Blade3D";
pTrident->NewClockCode = TRUE;
pTrident->frequency = NTSC;
+ pTrident->UsePCIRetry = TRUE; /* To avoid lockups */
break;
case CYBERBLADEI7:
pTrident->ddc1Read = Tridentddc1Read;
@@ -2604,6 +2605,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
TRIDENTRegPtr tridentReg;
+ WAITFORVSYNC;
+
TridentFindClock(pScrn,mode->Clock);
switch (pTrident->Chipset) {
@@ -3182,6 +3185,9 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
vgaHWPtr hwp = VGAHWPTR(pScrn);
+ if (!pTrident->NoAccel)
+ pTrident->AccelInfoRec->Sync(pScrn);
+
TRIDENTRestore(pScrn);
vgaHWLock(hwp);
@@ -3205,6 +3211,9 @@
vgaHWPtr hwp = VGAHWPTR(pScrn);
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ if (!pTrident->NoAccel)
+ pTrident->AccelInfoRec->Sync(pScrn);
+
if (xf86IsPc98())
PC98TRIDENTDisable(pScrn);
Index: trident_regs.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_regs.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/trident_regs.h 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/trident_regs.h 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -21,7 +21,7 @@
*
* Author: Alan Hourihane, alanh at fairlite.demon.co.uk
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_regs.h,v 1.27 2003/09/05 22:07:29 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_regs.h,v 1.28 2004/01/21 22:51:19 alanh Exp $ */
#define DEBUG 1
@@ -200,6 +200,13 @@
#define GER_DSTCLIP_X 0x214C /* Word */
#define GER_DSTCLIP_Y 0x214E /* Word */
+/* Wait for VSync */
+#define WAITFORVSYNC \
+ { \
+ while (hwp->readST01(hwp)&0x8) {}; \
+ while (!(hwp->readST01(hwp)&0x8)) {}; \
+ }
+
/* Defines for IMAGE Graphics Engine */
#define IMAGE_GE_STATUS 0x2164
#define IMAGE_GE_DRAWENV 0x2120
Index: trident_video.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_video.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/trident_video.c 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/trident_video.c 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -21,7 +21,7 @@
*
* Author: Alan Hourihane, alanh at fairlite.demon.co.uk
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_video.c,v 1.45 2003/11/10 18:22:34 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_video.c,v 1.46 2004/01/21 22:51:19 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -884,6 +884,8 @@
pPriv->videoStatus = CLIENT_VIDEO_ON;
+ pTrident->VideoTimerCallback = TRIDENTVideoTimerCallback;
+
return Success;
}
@@ -1306,8 +1308,6 @@
* full vblank has passed.
* - Alan.
*/
- while (!(hwp->readST01(hwp)&0x8)) {};
- while (hwp->readST01(hwp)&0x8) {};
- while (!(hwp->readST01(hwp)&0x8)) {};
- while (hwp->readST01(hwp)&0x8) {};
+ WAITFORVSYNC;
+ WAITFORVSYNC;
}
Index: xp_accel.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/trident/xp_accel.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/xp_accel.c 26 Nov 2003 22:49:00 -0000 1.1.4.1
+++ b/xp_accel.c 23 Feb 2004 21:36:24 -0000 1.1.4.2
@@ -23,7 +23,7 @@
*
* BladeXP accelerated options.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/xp_accel.c,v 1.6 2003/10/30 13:38:02 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/xp_accel.c,v 1.7 2004/01/21 22:57:34 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -257,6 +257,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int dst = 0;
+ XPSync(pScrn);
+
pTrident->BltScanDirection = 0;
if (xdir < 0) pTrident->BltScanDirection |= XNEG;
if (ydir < 0) pTrident->BltScanDirection |= YNEG;
@@ -299,6 +301,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ XPSync(pScrn);
+
pTrident->BltScanDirection = 0;
REPLICATE(color);
TGUI_FMIX(XAAPatternROP[rop]);
@@ -336,6 +340,8 @@
){
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ XPSync(pScrn);
+
TGUI_DRAWFLAG(SOLIDFILL);
if (dir == DEGREES_0) {
XP_DIM_XY(len,1);
@@ -420,6 +426,8 @@
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ XPSync(pScrn);
+
REPLICATE(color);
TGUI_FMIX(XAAPatternROP[rop]);
MMIO_OUT32(pTrident->IOBase, 0x2158, color);
@@ -501,6 +509,8 @@
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int drawflag = 0;
+ XPSync(pScrn);
+
REPLICATE(fg);
MMIO_OUT32(pTrident->IOBase, 0x2158, fg);
More information about the xorg-commit
mailing list