summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Cardona <remi@gentoo.org>2009-07-16 05:11:33 +0000
committerRémi Cardona <remi@gentoo.org>2009-07-16 05:11:33 +0000
commit582b8fc41a2175fd51795aadf95d0caa0f2bb73a (patch)
tree3eb7028ca9391c38d08d7d6cf82dfdbb92d3cdc1 /x11-drivers
parentx11-libs/libdrm: bump to 2.4.12 (diff)
downloadgentoo-2-582b8fc41a2175fd51795aadf95d0caa0f2bb73a.tar.gz
gentoo-2-582b8fc41a2175fd51795aadf95d0caa0f2bb73a.tar.bz2
gentoo-2-582b8fc41a2175fd51795aadf95d0caa0f2bb73a.zip
x11-drivers/xf86-video-intel: bump to 2.7.99.902
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/xf86-video-intel/ChangeLog13
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0001-Fix-XV-scan-line-calculation-when-rotated.patch47
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0002-Reset-framebuffer-offset-when-rebinding-aperture-227.patch31
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-p.patch377
-rw-r--r--x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902.ebuild38
5 files changed, 505 insertions, 1 deletions
diff --git a/x11-drivers/xf86-video-intel/ChangeLog b/x11-drivers/xf86-video-intel/ChangeLog
index 3f380f2bf8aa..ecdeff820212 100644
--- a/x11-drivers/xf86-video-intel/ChangeLog
+++ b/x11-drivers/xf86-video-intel/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for x11-drivers/xf86-video-intel
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-intel/ChangeLog,v 1.31 2009/07/14 23:19:35 remi Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-intel/ChangeLog,v 1.32 2009/07/16 05:11:32 remi Exp $
+
+*xf86-video-intel-2.7.99.902 (16 Jul 2009)
+
+ 16 Jul 2009; Rémi Cardona <remi@gentoo.org>
+ +files/2.7.99.902-0001-Fix-XV-scan-line-calculation-when-rotated.patch,
+ +xf86-video-intel-2.7.99.902.ebuild,
+ +files/2.7.99.902-0002-Reset-framebuffer-offset-when-rebinding-aperture-22
+ 7.patch,
+ +files/2.7.99.902-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-
+ p.patch:
+ bump to 2.7.99.902
14 Jul 2009; Rémi Cardona <remi@gentoo.org>
xf86-video-intel-2.7.99.901.ebuild:
diff --git a/x11-drivers/xf86-video-intel/files/2.7.99.902-0001-Fix-XV-scan-line-calculation-when-rotated.patch b/x11-drivers/xf86-video-intel/files/2.7.99.902-0001-Fix-XV-scan-line-calculation-when-rotated.patch
new file mode 100644
index 000000000000..fec386cbef5c
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/2.7.99.902-0001-Fix-XV-scan-line-calculation-when-rotated.patch
@@ -0,0 +1,47 @@
+From b74bf3f9a65af9e72921d4e9028d9d4d023f8bc6 Mon Sep 17 00:00:00 2001
+From: Barry Scott <barry.scott@onelan.co.uk>
+Date: Mon, 13 Jul 2009 16:34:20 -0700
+Subject: [PATCH 1/3] Fix XV scan line calculation when rotated.
+
+---
+ src/i830_video.c | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/i830_video.c b/src/i830_video.c
+index 4bba902..92b6324 100644
+--- a/src/i830_video.c
++++ b/src/i830_video.c
+@@ -2539,7 +2539,7 @@ I830PutImage(ScrnInfoPtr pScrn,
+
+ if (sync) {
+ BoxPtr box;
+- int y1, y2;
++ pixman_box16_t box_in_crtc_coordinates;
+ int pipe = -1, event, load_scan_lines_pipe;
+
+ if (pixmap_is_scanout(pPixmap))
+@@ -2555,16 +2555,17 @@ I830PutImage(ScrnInfoPtr pScrn,
+ }
+
+ box = REGION_EXTENTS(unused, clipBoxes);
+- y1 = box->y1 - crtc->y;
+- y2 = box->y2 - crtc->y;
++ box_in_crtc_coordinates = *box;
++ if (crtc->transform_in_use)
++ pixman_f_transform_bounds (&crtc->f_framebuffer_to_crtc, &box_in_crtc_coordinates);
+
+ BEGIN_BATCH(5);
+ /* The documentation says that the LOAD_SCAN_LINES command
+ * always comes in pairs. Don't ask me why. */
+ OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe);
+- OUT_BATCH((y1 << 16) | y2);
++ OUT_BATCH((box_in_crtc_coordinates.y1 << 16) | box_in_crtc_coordinates.y2);
+ OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe);
+- OUT_BATCH((y1 << 16) | y2);
++ OUT_BATCH((box_in_crtc_coordinates.y1 << 16) | box_in_crtc_coordinates.y2);
+ OUT_BATCH(MI_WAIT_FOR_EVENT | event);
+ ADVANCE_BATCH();
+ }
+--
+1.6.3.3
+
diff --git a/x11-drivers/xf86-video-intel/files/2.7.99.902-0002-Reset-framebuffer-offset-when-rebinding-aperture-227.patch b/x11-drivers/xf86-video-intel/files/2.7.99.902-0002-Reset-framebuffer-offset-when-rebinding-aperture-227.patch
new file mode 100644
index 000000000000..a99a41b748b3
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/2.7.99.902-0002-Reset-framebuffer-offset-when-rebinding-aperture-227.patch
@@ -0,0 +1,31 @@
+From e386e7b14b139f15205e14b173e8222bf38d9e18 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Wed, 15 Jul 2009 09:43:04 -0700
+Subject: [PATCH 2/3] Reset framebuffer offset when rebinding aperture (22760).
+
+scrn->fbOffset may be changed when binding objects to the aperture during
+server initialization or VT enter. This was accidentally removed when the
+NoAlloc option was eliminated.
+
+Signed-off-by: Keith Packard <keithp@keithp.com>
+---
+ src/i830_memory.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/i830_memory.c b/src/i830_memory.c
+index f2f3966..cc9d376 100644
+--- a/src/i830_memory.c
++++ b/src/i830_memory.c
+@@ -1581,6 +1581,9 @@ i830_bind_all_memory(ScrnInfoPtr pScrn)
+ i830_update_cursor_offsets(pScrn);
+ i830_set_max_gtt_map_size(pScrn);
+
++ if (pI830->front_buffer)
++ pScrn->fbOffset = pI830->front_buffer->offset;
++
+ return TRUE;
+ }
+
+--
+1.6.3.3
+
diff --git a/x11-drivers/xf86-video-intel/files/2.7.99.902-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-p.patch b/x11-drivers/xf86-video-intel/files/2.7.99.902-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-p.patch
new file mode 100644
index 000000000000..d2852e4a8210
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/2.7.99.902-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-p.patch
@@ -0,0 +1,377 @@
+From a1e6abb5ca89d699144d10fdc4309b3b78f2f7a9 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Wed, 15 Jul 2009 14:15:10 -0700
+Subject: [PATCH 3/3] Use batch_start_atomic to fix batchbuffer wrapping problems with 8xx render.
+
+Bug #22483.
+---
+ src/i830.h | 9 +++
+ src/i830_driver.c | 2 +-
+ src/i830_render.c | 201 ++++++++++++++++++++++++++++++-----------------------
+ 3 files changed, 123 insertions(+), 89 deletions(-)
+
+diff --git a/src/i830.h b/src/i830.h
+index f7ca687..ec57662 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -468,6 +468,14 @@ typedef struct _I830Rec {
+ /** Transform pointers for src/mask, or NULL if identity */
+ PictTransform *transform[2];
+ float coord_adjust;
++
++ /* i830 render accel state */
++ PixmapPtr render_src, render_mask, render_dst;
++ PicturePtr render_src_picture, render_mask_picture, render_dst_picture;
++ uint32_t render_dst_format;
++ Bool needs_render_state_emit;
++ uint32_t cblend, ablend, s8_blendctl;
++
+ /* i915 render accel state */
+ uint32_t mapstate[6];
+ uint32_t samplerstate[6];
+@@ -790,6 +798,7 @@ Bool i915_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMask,
+ void i915_composite(PixmapPtr pDst, int srcX, int srcY,
+ int maskX, int maskY, int dstX, int dstY, int w, int h);
+ void i915_batch_flush_notify(ScrnInfoPtr pScrn);
++void i830_batch_flush_notify(ScrnInfoPtr scrn);
+ /* i965_render.c */
+ unsigned int gen4_render_state_size(ScrnInfoPtr pScrn);
+ void gen4_render_state_init(ScrnInfoPtr pScrn);
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index dfc2bdf..33079fe 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -2757,7 +2757,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ else if (IS_I9XX(pI830))
+ pI830->batch_flush_notify = i915_batch_flush_notify;
+ else
+- pI830->batch_flush_notify = NULL;
++ pI830->batch_flush_notify = i830_batch_flush_notify;
+
+ miInitializeBackingStore(pScreen);
+ xf86SetBackingStore(pScreen);
+diff --git a/src/i830_render.c b/src/i830_render.c
+index b1d6f50..ecee6f2 100644
+--- a/src/i830_render.c
++++ b/src/i830_render.c
+@@ -255,7 +255,7 @@ i8xx_get_card_format(PicturePtr pPict)
+ FatalError("Unsupported format type %d\n", pPict->format);
+ }
+
+-static Bool
++static void
+ i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit)
+ {
+
+@@ -299,7 +299,7 @@ i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit)
+ break;
+ default:
+ filter = 0;
+- I830FALLBACK("Bad filter 0x%x\n", pPict->filter);
++ FatalError("Bad filter 0x%x\n", pPict->filter);
+ }
+ filter |= (MIPFILTER_NONE << TM0S3_MIP_FILTER_SHIFT);
+
+@@ -344,10 +344,6 @@ i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit)
+ TEX_STREAM_MAP_IDX(unit));
+ ADVANCE_BATCH();
+ }
+-
+- i830_debug_sync(pScrn);
+-
+- return TRUE;
+ }
+
+ Bool
+@@ -391,29 +387,27 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
+ {
+ ScrnInfoPtr pScrn = xf86Screens[pSrcPicture->pDrawable->pScreen->myNum];
+ I830Ptr pI830 = I830PTR(pScrn);
+- uint32_t dst_format, dst_pitch;
+ Bool is_affine_src, is_affine_mask;
+ Bool is_nearest = FALSE;
+
++ pI830->render_src_picture = pSrcPicture;
++ pI830->render_src = pSrc;
++ pI830->render_mask_picture = pMaskPicture;
++ pI830->render_mask = pMask;
++ pI830->render_dst_picture = pDstPicture;
++ pI830->render_dst = pDst;
++
+ i830_exa_check_pitch_3d(pSrc);
+ if (pMask)
+ i830_exa_check_pitch_3d(pMask);
+ i830_exa_check_pitch_3d(pDst);
+
+- IntelEmitInvarientState(pScrn);
+- pI830->last_3d = LAST_3D_RENDER;
+-
+- if (!i830_get_dest_format(pDstPicture, &dst_format))
++ if (!i830_get_dest_format(pDstPicture, &pI830->render_dst_format))
+ return FALSE;
+- dst_pitch = intel_get_pixmap_pitch(pDst);
+
+- if (!i830_texture_setup(pSrcPicture, pSrc, 0))
+- I830FALLBACK("fail to setup src texture\n");
+ if (pSrcPicture->filter == PictFilterNearest)
+ is_nearest = TRUE;
+ if (pMask != NULL) {
+- if (!i830_texture_setup(pMaskPicture, pMask, 1))
+- I830FALLBACK("fail to setup mask texture\n");
+ if (pMaskPicture->filter == PictFilterNearest)
+ is_nearest = TRUE;
+ } else {
+@@ -434,45 +428,7 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
+ I830FALLBACK("non-affine transform unsupported on 8xx hardware\n");
+
+ {
+- uint32_t cblend, ablend, blendctl, vf2;
+-
+- BEGIN_BATCH(30);
+-
+- /* color buffer */
+- OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
+- OUT_BATCH(BUF_3D_ID_COLOR_BACK| BUF_3D_USE_FENCE |
+- BUF_3D_PITCH(dst_pitch));
+- OUT_RELOC_PIXMAP(pDst, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
+- OUT_BATCH(MI_NOOP);
+-
+- OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
+- OUT_BATCH(dst_format);
+-
+- /* defaults */
+- OUT_BATCH(_3DSTATE_DFLT_Z_CMD);
+- OUT_BATCH(0);
+-
+- OUT_BATCH(_3DSTATE_DFLT_DIFFUSE_CMD);
+- OUT_BATCH(0);
+-
+- OUT_BATCH(_3DSTATE_DFLT_SPEC_CMD);
+- OUT_BATCH(0);
+-
+- OUT_BATCH(_3DSTATE_DRAW_RECT_CMD);
+- OUT_BATCH(0);
+- OUT_BATCH(0); /* ymin, xmin */
+- OUT_BATCH(DRAW_YMAX(pDst->drawable.height - 1) |
+- DRAW_XMAX(pDst->drawable.width - 1));
+- OUT_BATCH(0); /* yorig, xorig */
+-
+- OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(2) |
+- I1_LOAD_S(3) | 1);
+- if (pMask)
+- vf2 = 2 << 12; /* 2 texture coord sets */
+- else
+- vf2 = 1 << 12;
+- OUT_BATCH(vf2); /* TEXCOORDFMT_2D */
+- OUT_BATCH(S3_CULLMODE_NONE | S3_VERTEXHAS_XY);
++ uint32_t cblend, ablend, blendctl;
+
+ /* If component alpha is active in the mask and the blend operation
+ * uses the source alpha, then we know we don't need the source
+@@ -541,36 +497,90 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
+ ablend |= TB0A_ARG2_SEL_ONE;
+ }
+
+- OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 |
+- LOAD_TEXTURE_BLEND_STAGE(0)|1);
+- OUT_BATCH(cblend);
+- OUT_BATCH(ablend);
+- OUT_BATCH(0);
+-
+ blendctl = i830_get_blend_cntl(op, pMaskPicture, pDstPicture->format);
+- OUT_BATCH(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND);
+- OUT_BATCH(MI_NOOP);
+- OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(8) | 0);
+- OUT_BATCH(S8_ENABLE_COLOR_BLEND | S8_BLENDFUNC_ADD | blendctl |
+- S8_ENABLE_COLOR_BUFFER_WRITE);
+-
+- OUT_BATCH(_3DSTATE_ENABLES_1_CMD | DISABLE_LOGIC_OP |
+- DISABLE_STENCIL_TEST | DISABLE_DEPTH_BIAS |
+- DISABLE_SPEC_ADD | DISABLE_FOG | DISABLE_ALPHA_TEST |
+- ENABLE_COLOR_BLEND | DISABLE_DEPTH_TEST);
+- /* We have to explicitly say we don't want write disabled */
+- OUT_BATCH(_3DSTATE_ENABLES_2_CMD | ENABLE_COLOR_MASK |
+- DISABLE_STENCIL_WRITE | ENABLE_TEX_CACHE |
+- DISABLE_DITHER | ENABLE_COLOR_WRITE |
+- DISABLE_DEPTH_WRITE);
+- ADVANCE_BATCH();
++
++ pI830->cblend = cblend;
++ pI830->ablend = ablend;
++ pI830->s8_blendctl = blendctl;
+ }
+
+ i830_debug_sync(pScrn);
+
++ pI830->needs_render_state_emit = TRUE;
++
+ return TRUE;
+ }
+
++static void
++i830_emit_composite_state(ScrnInfoPtr pScrn)
++{
++ I830Ptr pI830 = I830PTR(pScrn);
++ uint32_t vf2;
++
++ pI830->needs_render_state_emit = FALSE;
++
++ IntelEmitInvarientState(pScrn);
++ pI830->last_3d = LAST_3D_RENDER;
++
++ BEGIN_BATCH(24);
++
++ OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
++ OUT_BATCH(BUF_3D_ID_COLOR_BACK| BUF_3D_USE_FENCE |
++ BUF_3D_PITCH(intel_get_pixmap_pitch(pI830->render_dst)));
++ OUT_RELOC_PIXMAP(pI830->render_dst,
++ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
++ OUT_BATCH(MI_NOOP);
++
++ OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
++ OUT_BATCH(pI830->render_dst_format);
++
++ OUT_BATCH(_3DSTATE_DRAW_RECT_CMD);
++ OUT_BATCH(0);
++ OUT_BATCH(0); /* ymin, xmin */
++ OUT_BATCH(DRAW_YMAX(pI830->render_dst->drawable.height - 1) |
++ DRAW_XMAX(pI830->render_dst->drawable.width - 1));
++ OUT_BATCH(0); /* yorig, xorig */
++
++ OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
++ I1_LOAD_S(2) |
++ I1_LOAD_S(3) | 1);
++ if (pI830->render_mask)
++ vf2 = 2 << 12; /* 2 texture coord sets */
++ else
++ vf2 = 1 << 12;
++ OUT_BATCH(vf2); /* TEXCOORDFMT_2D */
++ OUT_BATCH(S3_CULLMODE_NONE | S3_VERTEXHAS_XY);
++
++ OUT_BATCH(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND);
++ OUT_BATCH(MI_NOOP);
++ OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(8) | 0);
++ OUT_BATCH(S8_ENABLE_COLOR_BLEND | S8_BLENDFUNC_ADD | pI830->s8_blendctl |
++ S8_ENABLE_COLOR_BUFFER_WRITE);
++
++ OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 |
++ LOAD_TEXTURE_BLEND_STAGE(0)|1);
++ OUT_BATCH(pI830->cblend);
++ OUT_BATCH(pI830->ablend);
++ OUT_BATCH(0);
++
++ OUT_BATCH(_3DSTATE_ENABLES_1_CMD | DISABLE_LOGIC_OP |
++ DISABLE_STENCIL_TEST | DISABLE_DEPTH_BIAS |
++ DISABLE_SPEC_ADD | DISABLE_FOG | DISABLE_ALPHA_TEST |
++ ENABLE_COLOR_BLEND | DISABLE_DEPTH_TEST);
++ /* We have to explicitly say we don't want write disabled */
++ OUT_BATCH(_3DSTATE_ENABLES_2_CMD | ENABLE_COLOR_MASK |
++ DISABLE_STENCIL_WRITE | ENABLE_TEX_CACHE |
++ DISABLE_DITHER | ENABLE_COLOR_WRITE |
++ DISABLE_DEPTH_WRITE);
++ ADVANCE_BATCH();
++
++ i830_texture_setup(pI830->render_src_picture, pI830->render_src, 0);
++ if (pI830->render_mask) {
++ i830_texture_setup(pI830->render_mask_picture,
++ pI830->render_mask, 1);
++ }
++}
++
+ /**
+ * Do a single rectangle composite operation.
+ *
+@@ -582,7 +592,6 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ {
+ ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ I830Ptr pI830 = I830PTR(pScrn);
+- Bool has_mask;
+ Bool is_affine_src, is_affine_mask;
+ int per_vertex, num_floats;
+ float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3];
+@@ -590,12 +599,6 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ is_affine_src = i830_transform_is_affine (pI830->transform[0]);
+ is_affine_mask = i830_transform_is_affine (pI830->transform[1]);
+
+- if (pI830->scale_units[1][0] == -1 || pI830->scale_units[1][1] == -1) {
+- has_mask = FALSE;
+- } else {
+- has_mask = TRUE;
+- }
+-
+ per_vertex = 2; /* dest x/y */
+ if (is_affine_src)
+ {
+@@ -630,7 +633,7 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ return;
+ per_vertex += 4; /* src x/y/z/w */
+ }
+- if (has_mask) {
++ if (pI830->render_mask) {
+ if (is_affine_mask) {
+ if (!i830_get_transformed_coordinates(maskX, maskY,
+ pI830->transform[1],
+@@ -666,6 +669,16 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ }
+
+ num_floats = 3 * per_vertex;
++
++ intel_batch_start_atomic(pScrn,
++ 58 + /* invarient */
++ 24 + /* setup */
++ 20 + /* 2 * setup_texture */
++ 6 + num_floats /* verts */);
++
++ if (pI830->needs_render_state_emit)
++ i830_emit_composite_state(pScrn);
++
+ BEGIN_BATCH(6 + num_floats);
+
+ OUT_BATCH(MI_NOOP);
+@@ -683,7 +696,7 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ OUT_BATCH_F(0.0);
+ OUT_BATCH_F(src_w[2]);
+ }
+- if (has_mask) {
++ if (pI830->render_mask) {
+ OUT_BATCH_F(mask_x[2] / pI830->scale_units[1][0]);
+ OUT_BATCH_F(mask_y[2] / pI830->scale_units[1][1]);
+ if (!is_affine_mask) {
+@@ -700,7 +713,7 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ OUT_BATCH_F(0.0);
+ OUT_BATCH_F(src_w[1]);
+ }
+- if (has_mask) {
++ if (pI830->render_mask) {
+ OUT_BATCH_F(mask_x[1] / pI830->scale_units[1][0]);
+ OUT_BATCH_F(mask_y[1] / pI830->scale_units[1][1]);
+ if (!is_affine_mask) {
+@@ -717,7 +730,7 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ OUT_BATCH_F(0.0);
+ OUT_BATCH_F(src_w[0]);
+ }
+- if (has_mask) {
++ if (pI830->render_mask) {
+ OUT_BATCH_F(mask_x[0] / pI830->scale_units[1][0]);
+ OUT_BATCH_F(mask_y[0] / pI830->scale_units[1][1]);
+ if (!is_affine_mask) {
+@@ -727,4 +740,16 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ }
+
+ ADVANCE_BATCH();
++
++ intel_batch_end_atomic(pScrn);
++
++ i830_debug_sync(pScrn);
++}
++
++void
++i830_batch_flush_notify(ScrnInfoPtr scrn)
++{
++ I830Ptr i830 = I830PTR(scrn);
++
++ i830->needs_render_state_emit = TRUE;
+ }
+--
+1.6.3.3
+
diff --git a/x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902.ebuild b/x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902.ebuild
new file mode 100644
index 000000000000..0242bfeb6a37
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902.ebuild,v 1.1 2009/07/16 05:11:32 remi Exp $
+
+# Must be before x-modular eclass is inherited
+#SNAPSHOT="yes"
+
+inherit x-modular
+
+DESCRIPTION="X.Org driver for Intel cards"
+
+KEYWORDS="~amd64 ~ia64 ~x86 ~x86-fbsd"
+IUSE="dri"
+
+RDEPEND=">=x11-base/xorg-server-1.6
+ x11-libs/libXvMC"
+DEPEND="${RDEPEND}
+ >=x11-proto/dri2proto-1.99.3
+ x11-proto/fontsproto
+ x11-proto/randrproto
+ x11-proto/renderproto
+ x11-proto/xineramaproto
+ x11-proto/glproto
+ x11-proto/xextproto
+ x11-proto/xproto
+ dri? ( x11-proto/xf86driproto
+ >=x11-libs/libdrm-2.4.11
+ x11-libs/libX11 )"
+
+PATCHES=(
+"${FILESDIR}/${PV}-0001-Fix-XV-scan-line-calculation-when-rotated.patch"
+"${FILESDIR}/${PV}-0002-Reset-framebuffer-offset-when-rebinding-aperture-227.patch"
+"${FILESDIR}/${PV}-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-p.patch"
+)
+
+pkg_setup() {
+ CONFIGURE_OPTIONS="$(use_enable dri)"
+}