summaryrefslogtreecommitdiff
path: root/src/savage_accel.c
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-07-30 21:25:26 +0000
committerEgbert Eich <eich@suse.de>2004-07-30 21:25:26 +0000
commitc18f5801a555b1c1651a9d9cfb4ed141e210effa (patch)
tree0710668373cdcf8d1b2f9880819f74d90e12aa8d /src/savage_accel.c
parent81760d382c4921a270715fe9e6b348699353ee01 (diff)
Add pseudocolor overlay mode. Leave streams engine running at all times to
prevent artefacts during video playback. Fixed VBE mode list code to work together with reading DDC data using VBE functions. Fixed data types to muffle compiler. Fixed requested size of FIFO for image writes. Fixes temporary lockups.
Diffstat (limited to 'src/savage_accel.c')
-rw-r--r--src/savage_accel.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/savage_accel.c b/src/savage_accel.c
index 9cf3fdc..680ae1e 100644
--- a/src/savage_accel.c
+++ b/src/savage_accel.c
@@ -23,6 +23,7 @@
#include "savage_driver.h"
#include "savage_regs.h"
#include "savage_bci.h"
+#include "savage_streams.h"
/* Forward declaration of functions used in the driver */
@@ -47,7 +48,7 @@ static void SavageSetupForSolidFill(
ScrnInfoPtr pScrn,
int color,
int rop,
- unsigned planemask);
+ unsigned int planemask);
static void SavageSubsequentSolidFillRect(
ScrnInfoPtr pScrn,
@@ -82,7 +83,7 @@ static void SavageSetupForScreenToScreenColorExpand(
int bg,
int fg,
int rop,
- unsigned planemask);
+ unsigned int planemask);
static void SavageSubsequentScreenToScreenColorExpand(
ScrnInfoPtr pScrn,
@@ -98,7 +99,7 @@ static void SavageSetupForCPUToScreenColorExpandFill(
int fg,
int bg,
int rop,
- unsigned planemask);
+ unsigned int planemask);
static void SavageSubsequentScanlineCPUToScreenColorExpandFill(
ScrnInfoPtr pScrn,
@@ -119,7 +120,7 @@ static void SavageSetupForMono8x8PatternFill(
int fg,
int bg,
int rop,
- unsigned planemask);
+ unsigned int planemask);
static void SavageSubsequentMono8x8PatternFillRect(
ScrnInfoPtr pScrn,
@@ -421,7 +422,10 @@ SavageInitAccel(ScreenPtr pScreen)
#if 1
xaaptr->SetupForScreenToScreenCopy = SavageSetupForScreenToScreenCopy;
xaaptr->SubsequentScreenToScreenCopy = SavageSubsequentScreenToScreenCopy;
- xaaptr->ScreenToScreenCopyFlags = NO_TRANSPARENCY | NO_PLANEMASK | ROP_NEEDS_SOURCE;
+ xaaptr->ScreenToScreenCopyFlags = 0
+ | NO_TRANSPARENCY
+ | NO_PLANEMASK
+ | ROP_NEEDS_SOURCE;
#endif
@@ -492,7 +496,7 @@ SavageInitAccel(ScreenPtr pScreen)
xaaptr->SubsequentSolidFillTrap = SavageSubsequentSolidFillTrap;
#endif
- xaaptr->SolidBresenhamLineErrorTermBits = 14;
+ xaaptr->SolidBresenhamLineErrorTermBits = 13;
#endif
/* ImageWrite */
@@ -594,7 +598,7 @@ SavageAccelSync(ScrnInfoPtr pScrn)
*/
static int
-SavageHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop)
+SavageHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, unsigned int pm, int *rop)
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
int ret = 0;
@@ -629,7 +633,7 @@ SavageHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop)
static int
-SavageHelpSolidROP(ScrnInfoPtr pScrn, int *fg, int pm, int *rop)
+SavageHelpSolidROP(ScrnInfoPtr pScrn, int *fg, unsigned int pm, int *rop)
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
int ret = 0;
@@ -722,7 +726,7 @@ SavageSubsequentScreenToScreenCopy(
psav->WaitQueue(psav,6);
BCI_SEND(psav->SavedBciCmd);
- if (psav->SavedBgColor != -1)
+ if (psav->SavedBgColor != 0xffffffff)
BCI_SEND(psav->SavedBgColor);
BCI_SEND(BCI_X_Y(x1, y1));
BCI_SEND(BCI_X_Y(x2, y2));
@@ -739,7 +743,7 @@ SavageSetupForSolidFill(
ScrnInfoPtr pScrn,
int color,
int rop,
- unsigned planemask)
+ unsigned int planemask)
{
SavagePtr psav = SAVPTR(pScrn);
XAAInfoRecPtr xaaptr = GET_XAAINFORECPTR_FROM_SCRNINFOPTR( pScrn );
@@ -756,7 +760,7 @@ SavageSetupForSolidFill(
{
if( color == 0 )
rop = GXclear;
- else if( color == xaaptr->FullPlanemask )
+ else if( (unsigned int)color == xaaptr->FullPlanemask )
rop = GXset;
}
@@ -802,7 +806,7 @@ SavageSetupForScreenToScreenColorExpand(
int bg,
int fg,
int rop,
- unsigned planemask)
+ unsigned int planemask)
{
/* SavagePtr psav = SAVPTR(pScrn); */
}
@@ -827,7 +831,7 @@ SavageSetupForCPUToScreenColorExpandFill(
int fg,
int bg,
int rop,
- unsigned planemask)
+ unsigned int planemask)
{
SavagePtr psav = SAVPTR(pScrn);
int cmd;
@@ -877,7 +881,7 @@ SavageSubsequentScanlineCPUToScreenColorExpandFill(
w = (w + 31) & ~31;
if( psav->SavedBciCmd & BCI_CMD_SEND_COLOR )
BCI_SEND(psav->SavedFgColor);
- if( psav->SavedBgColor != -1 )
+ if( psav->SavedBgColor != 0xffffffff )
BCI_SEND(psav->SavedBgColor);
BCI_SEND(BCI_X_Y(x, y));
BCI_SEND(BCI_W_H(w, 1));
@@ -929,7 +933,7 @@ SavageSetupForMono8x8PatternFill(
int fg,
int bg,
int rop,
- unsigned planemask)
+ unsigned int planemask)
{
SavagePtr psav = SAVPTR(pScrn);
int cmd;
@@ -980,7 +984,7 @@ SavageSubsequentMono8x8PatternFillRect(
BCI_SEND(psav->SavedBciCmd);
if( psav->SavedBciCmd & BCI_CMD_SEND_COLOR )
BCI_SEND(psav->SavedFgColor);
- if( psav->SavedBgColor != -1 )
+ if( psav->SavedBgColor != 0xffffffff )
BCI_SEND(psav->SavedBgColor);
BCI_SEND(BCI_X_Y(x, y));
BCI_SEND(BCI_W_H(w, h));