xf86-video-intel: src/i830_exa.c src/i830_video.c src/i915_video.c src/i965_video.c
Zhenyu Wang
zhen at kemper.freedesktop.org
Wed Sep 19 20:31:09 PDT 2007
src/i830_exa.c | 4 +---
src/i830_video.c | 7 ++++---
src/i915_video.c | 4 ++--
src/i965_video.c | 5 ++---
4 files changed, 9 insertions(+), 11 deletions(-)
New commits:
diff-tree b73235f40497cfb10792ba191d4f6eac3a5df009 (from bda3c69a7a044869ea63514b97f8aa9260d6b5a7)
Author: Hong Liu <hong.liu at intel.com>
Date: Thu Sep 20 11:28:52 2007 +0800
Fix pixmap offset
Use consistent interface for counting pixmap offset.
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 273c626..8850382 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -112,9 +112,7 @@ i830_pixmap_tiled(PixmapPtr pPixmap)
I830Ptr pI830 = I830PTR(pScrn);
unsigned long offset;
- /* Don't use exaGetPixmapOffset becuase we might be called from XAA code. */
- offset = (long)pPixmap->devPrivate.ptr -
- (long)pI830->FbBase;
+ offset = intel_get_pixmap_offset(pPixmap);
if (offset == pI830->front_buffer->offset &&
pI830->front_buffer->tiling != TILE_NONE)
{
diff --git a/src/i830_video.c b/src/i830_video.c
index 2128eb8..beec03e 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2402,9 +2402,10 @@ I830PutImage(ScrnInfoPtr pScrn,
}
#endif
- if (((char *)pPixmap->devPrivate.ptr < (char *)pI830->FbBase) ||
- ((char *)pPixmap->devPrivate.ptr >= (char *)pI830->FbBase +
- pI830->FbMapSize)) {
+ if (!pI830->useEXA &&
+ (((char *)pPixmap->devPrivate.ptr < (char *)pI830->FbBase) ||
+ ((char *)pPixmap->devPrivate.ptr >= (char *)pI830->FbBase +
+ pI830->FbMapSize))) {
/* If the pixmap wasn't in framebuffer, then we have no way in XAA to
* force it there. So, we simply refuse to draw and fail.
*/
diff --git a/src/i915_video.c b/src/i915_video.c
index a6447b1..00494a7 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -127,8 +127,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pSc
/* front buffer, pitch, offset */
OUT_RING(_3DSTATE_BUF_INFO_CMD);
OUT_RING(BUF_3D_ID_COLOR_BACK | BUF_3D_USE_FENCE |
- BUF_3D_PITCH(pPixmap->devKind));
- OUT_RING(BUF_3D_ADDR((long)pPixmap->devPrivate.ptr - (long)pI830->FbBase));
+ BUF_3D_PITCH(intel_get_pixmap_pitch(pPixmap)));
+ OUT_RING(BUF_3D_ADDR(intel_get_pixmap_offset(pPixmap)));
ADVANCE_LP_RING();
if (!planar) {
diff --git a/src/i965_video.c b/src/i965_video.c
index 6ed7f01..0357270 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -371,13 +371,12 @@ I965DisplayVideoTextured(ScrnInfoPtr pSc
dest_surf_state->ss0.mipmap_layout_mode = 0;
dest_surf_state->ss0.render_cache_read_mode = 0;
- dest_surf_state->ss1.base_addr = (long)pPixmap->devPrivate.ptr -
- (long)pI830->FbBase;
+ dest_surf_state->ss1.base_addr = intel_get_pixmap_offset(pPixmap);
dest_surf_state->ss2.height = pScrn->virtualY - 1;
dest_surf_state->ss2.width = pScrn->virtualX - 1;
dest_surf_state->ss2.mip_count = 0;
dest_surf_state->ss2.render_target_rotation = 0;
- dest_surf_state->ss3.pitch = pPixmap->devKind - 1;
+ dest_surf_state->ss3.pitch = intel_get_pixmap_pitch(pPixmap) - 1;
dest_surf_state->ss3.tiled_surface = i830_pixmap_tiled(pPixmap);
dest_surf_state->ss3.tile_walk = 0; /* TileX */
More information about the xorg-commit
mailing list