summaryrefslogtreecommitdiff
path: root/src/i830_accel.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-01-31 12:15:38 -0800
committerEric Anholt <eric@anholt.net>2007-01-31 12:15:38 -0800
commite62751db8b1a631c22ba0f77c932be4ab39ba741 (patch)
tree1dc92c929dbb6afe91af1952826e6b1240b5831b /src/i830_accel.c
parent4cd552e8f4851e029e43bf778cd8340f6c2c4881 (diff)
Add an accelerated path for rotation Render operations in XAA.
The now-generic (kind of) EXA code will be cleaned up and moved to generic files in a later commit.
Diffstat (limited to 'src/i830_accel.c')
-rw-r--r--src/i830_accel.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 5fdd1012..db3168a8 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -60,6 +60,36 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i810_reg.h"
#include "i830_debug.h"
+unsigned long
+intel_get_pixmap_offset(PixmapPtr pPix)
+{
+ ScreenPtr pScreen = pPix->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ I830Ptr pI830 = I830PTR(pScrn);
+
+#ifdef I830_USE_EXA
+ if (pI830->useEXA)
+ return exaGetPixmapOffset(pPix);
+#endif
+ return (unsigned long)pPix->devPrivate.ptr - (unsigned long)pI830->FbBase;
+}
+
+unsigned long
+intel_get_pixmap_pitch(PixmapPtr pPix)
+{
+ ScreenPtr pScreen = pPix->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ I830Ptr pI830 = I830PTR(pScrn);
+
+#ifdef I830_USE_EXA
+ if (pI830->useEXA)
+ return exaGetPixmapPitch(pPix);
+#endif
+#ifdef I830_USE_XAA
+ return (unsigned long)pPix->devKind;
+#endif
+}
+
int
I830WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis)
{