xf86-video-intel: src/legacy/i810

Chris Wilson ickle at kemper.freedesktop.org
Tue Jul 17 14:14:29 PDT 2012


 src/legacy/i810/i810.h       |    3 +++
 src/legacy/i810/i810_accel.c |   42 ++++++++++++++++++++++++++++++++++++++++--
 src/legacy/i810/i810_xaa.c   |    4 ++--
 3 files changed, 45 insertions(+), 4 deletions(-)

New commits:
commit 77520641a332a622c0b5378bd254ed5cb46a5f0a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jul 17 22:09:33 2012 +0100

    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 at t-online.de>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/legacy/i810/i810.h b/src/legacy/i810/i810.h
index a96c504..823631f 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 c079bfd..aa2c4df 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 600b631..13f0dc2 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;


More information about the xorg-commit mailing list