diff options
Diffstat (limited to 'src/i830_accel.c')
-rw-r--r-- | src/i830_accel.c | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/src/i830_accel.c b/src/i830_accel.c index 64cf365a..63dce22d 100644 --- a/src/i830_accel.c +++ b/src/i830_accel.c @@ -55,10 +55,48 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xf86_ansic.h" #include "xf86.h" -#include "xaarop.h" + #include "i830.h" #include "i810_reg.h" +static unsigned int i810Rop[16] = { + 0x00, /* GXclear */ + 0x88, /* GXand */ + 0x44, /* GXandReverse */ + 0xCC, /* GXcopy */ + 0x22, /* GXandInvert */ + 0xAA, /* GXnoop */ + 0x66, /* GXxor */ + 0xEE, /* GXor */ + 0x11, /* GXnor */ + 0x99, /* GXequiv */ + 0x55, /* GXinvert */ + 0xDD, /* GXorReverse */ + 0x33, /* GXcopyInvert */ + 0xBB, /* GXorInverted */ + 0x77, /* GXnand */ + 0xFF /* GXset */ +}; + +static unsigned int i810PatternRop[16] = { + 0x00, /* GXclear */ + 0xA0, /* GXand */ + 0x50, /* GXandReverse */ + 0xF0, /* GXcopy */ + 0x0A, /* GXandInvert */ + 0xAA, /* GXnoop */ + 0x5A, /* GXxor */ + 0xFA, /* GXor */ + 0x05, /* GXnor */ + 0xA5, /* GXequiv */ + 0x55, /* GXinvert */ + 0xF5, /* GXorReverse */ + 0x0F, /* GXcopyInvert */ + 0xAF, /* GXorInverted */ + 0x5F, /* GXnand */ + 0xFF /* GXset */ +}; + int I830WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis) { @@ -359,7 +397,7 @@ I830SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, ErrorF("I830SetupForFillRectSolid color: %x rop: %x mask: %x\n", color, rop, planemask); - pI830->BR[13] = ((XAAPatternROP[rop] << 16) | + pI830->BR[13] = ((i810PatternRop[rop] << 16) | (pScrn->displayWidth * pI830->cpp)); pI830->BR[16] = color; @@ -415,7 +453,7 @@ I830SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop, xdir, ydir, rop, planemask, transparency_color); pI830->BR[13] = (pScrn->displayWidth * pI830->cpp); - pI830->BR[13] |= XAACopyROP[rop] << 16; + pI830->BR[13] |= i810Rop[rop] << 16; switch (pScrn->bitsPerPixel) { case 8: @@ -481,7 +519,7 @@ I830SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int pattx, int patty, pI830->BR[19] = fg; pI830->BR[13] = (pScrn->displayWidth * pI830->cpp); /* In bytes */ - pI830->BR[13] |= XAAPatternROP[rop] << 16; + pI830->BR[13] |= i810PatternRop[rop] << 16; if (bg == -1) pI830->BR[13] |= (1 << 28); @@ -570,7 +608,7 @@ I830SetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, /* Fill out register values */ pI830->BR[13] = (pScrn->displayWidth * pI830->cpp); - pI830->BR[13] |= XAACopyROP[rop] << 16; + pI830->BR[13] |= i810Rop[rop] << 16; if (bg == -1) pI830->BR[13] |= (1 << 29); @@ -659,7 +697,7 @@ I830SetupForScanlineImageWrite(ScrnInfoPtr pScrn, int rop, /* Fill out register values */ pI830->BR[13] = (pScrn->displayWidth * pI830->cpp); - pI830->BR[13] |= XAACopyROP[rop] << 16; + pI830->BR[13] |= i810Rop[rop] << 16; switch (pScrn->bitsPerPixel) { case 8: |