summaryrefslogtreecommitdiff
path: root/src/legacy
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-17 22:09:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-17 22:12:49 +0100
commit77520641a332a622c0b5378bd254ed5cb46a5f0a (patch)
tree82fc2fe6d7444e92f5cafff8305e50c4ab34f175 /src/legacy
parentcaef63e0268e59e439b030a9a338e81d5cf8e311 (diff)
i810: Replace XAAGet.*ROP() with local tables
The XAAGetPatternROP() and XAAGetCopyROP() functions were removed along with the rest of XAA so we need to implement those tables locally. Reported-by: Knut Petersen <Knut_Petersen@t-online.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/legacy')
-rw-r--r--src/legacy/i810/i810.h3
-rw-r--r--src/legacy/i810/i810_accel.c42
-rw-r--r--src/legacy/i810/i810_xaa.c4
3 files changed, 45 insertions, 4 deletions
diff --git a/src/legacy/i810/i810.h b/src/legacy/i810/i810.h
index a96c504f..823631fa 100644
--- a/src/legacy/i810/i810.h
+++ b/src/legacy/i810/i810.h
@@ -318,4 +318,7 @@ extern void I810InitMC(ScreenPtr pScreen);
extern const OptionInfoRec *I810AvailableOptions(int chipid, int busid);
+extern const int I810CopyROP[16];
+const int I810PatternROP[16];
+
#endif /* _I810_H_ */
diff --git a/src/legacy/i810/i810_accel.c b/src/legacy/i810/i810_accel.c
index c079bfd2..aa2c4df3 100644
--- a/src/legacy/i810/i810_accel.c
+++ b/src/legacy/i810/i810_accel.c
@@ -40,6 +40,44 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xaarop.h"
#include "i810.h"
+const int I810CopyROP[16] = {
+ ROP_0, /* GXclear */
+ ROP_DSa, /* GXand */
+ ROP_SDna, /* GXandReverse */
+ ROP_S, /* GXcopy */
+ ROP_DSna, /* GXandInverted */
+ ROP_D, /* GXnoop */
+ ROP_DSx, /* GXxor */
+ ROP_DSo, /* GXor */
+ ROP_DSon, /* GXnor */
+ ROP_DSxn, /* GXequiv */
+ ROP_Dn, /* GXinvert */
+ ROP_SDno, /* GXorReverse */
+ ROP_Sn, /* GXcopyInverted */
+ ROP_DSno, /* GXorInverted */
+ ROP_DSan, /* GXnand */
+ ROP_1 /* GXset */
+};
+
+const int I810PatternROP[16] = {
+ ROP_0,
+ ROP_DPa,
+ ROP_PDna,
+ ROP_P,
+ ROP_DPna,
+ ROP_D,
+ ROP_DPx,
+ ROP_DPo,
+ ROP_DPon,
+ ROP_PDxn,
+ ROP_Dn,
+ ROP_PDno,
+ ROP_Pn,
+ ROP_DPno,
+ ROP_DPan,
+ ROP_1
+};
+
int
I810WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis)
{
@@ -153,7 +191,7 @@ I810SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
/* Color blit, p166 */
pI810->BR[13] = (BR13_SOLID_PATTERN |
- (XAAGetPatternROP(rop) << 16) |
+ (I810PatternROP[rop] << 16) |
(pScrn->displayWidth * pI810->cpp));
pI810->BR[16] = color;
}
@@ -199,7 +237,7 @@ I810SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop,
if (xdir == -1)
pI810->BR[13] |= BR13_RIGHT_TO_LEFT;
- pI810->BR[13] |= XAAGetCopyROP(rop) << 16;
+ pI810->BR[13] |= I810CopyROP[rop] << 16;
pI810->BR[18] = 0;
}
diff --git a/src/legacy/i810/i810_xaa.c b/src/legacy/i810/i810_xaa.c
index 600b631d..13f0dc2a 100644
--- a/src/legacy/i810/i810_xaa.c
+++ b/src/legacy/i810/i810_xaa.c
@@ -55,7 +55,7 @@ I810SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int pattx, int patty,
pI810->BR[18] = bg;
pI810->BR[19] = fg;
pI810->BR[13] = (pScrn->displayWidth * pI810->cpp);
- pI810->BR[13] |= XAAGetPatternROP(rop) << 16;
+ pI810->BR[13] |= I810PatternROP[rop] << 16;
if (bg == -1)
pI810->BR[13] |= BR13_MONO_PATN_TRANS;
}
@@ -119,7 +119,7 @@ I810SetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
fg, bg, rop, planemask);
pI810->BR[13] = (pScrn->displayWidth * pI810->cpp);
- pI810->BR[13] |= XAAGetCopyROP(rop) << 16;
+ pI810->BR[13] |= I810CopyROP[rop] << 16;
pI810->BR[13] |= (1 << 27);
if (bg == -1)
pI810->BR[13] |= BR13_MONO_TRANSPCY;