summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Cardona <remi@gentoo.org>2009-07-20 21:29:02 +0000
committerRémi Cardona <remi@gentoo.org>2009-07-20 21:29:02 +0000
commit0cb09953ece8f2a472abe31dbc10c8ff3cc26ac3 (patch)
treedeaf6cce675adfc670725b9b4220542a7aa6f868 /x11-drivers
parentSanitize for libtool 1.x, thanks to EvaSDK. (diff)
downloadgentoo-2-0cb09953ece8f2a472abe31dbc10c8ff3cc26ac3.tar.gz
gentoo-2-0cb09953ece8f2a472abe31dbc10c8ff3cc26ac3.tar.bz2
gentoo-2-0cb09953ece8f2a472abe31dbc10c8ff3cc26ac3.zip
x11-drivers/xf86-video-intel: backport another 4 patches from git master
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/xf86-video-intel/ChangeLog18
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0001-Fix-XV-scan-line-calculation-when-rotated.patch2
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0002-Reset-framebuffer-offset-when-rebinding-aperture-227.patch2
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-p.patch2
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0004-Fix-915-class-Render-after-the-8xx-class-Render-fix.patch116
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0005-Really-fix-i915-render.-Fail-at-commit-amend.patch76
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0006-accessing-a-pixmap-if-prepare_access-fails-is-verbot.patch34
-rw-r--r--x11-drivers/xf86-video-intel/files/2.7.99.902-0007-Update-to-xextproto-7.1-support.patch184
-rw-r--r--x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902-r1.ebuild42
9 files changed, 472 insertions, 4 deletions
diff --git a/x11-drivers/xf86-video-intel/ChangeLog b/x11-drivers/xf86-video-intel/ChangeLog
index ecdeff820212..aec482f94b67 100644
--- a/x11-drivers/xf86-video-intel/ChangeLog
+++ b/x11-drivers/xf86-video-intel/ChangeLog
@@ -1,6 +1,22 @@
# 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.32 2009/07/16 05:11:32 remi Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-intel/ChangeLog,v 1.33 2009/07/20 21:29:02 remi Exp $
+
+*xf86-video-intel-2.7.99.902-r1 (20 Jul 2009)
+
+ 20 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-r1.ebuild,
+ files/2.7.99.902-0002-Reset-framebuffer-offset-when-rebinding-aperture-227
+ .patch,
+ files/2.7.99.902-0003-Use-batch_start_atomic-to-fix-batchbuffer-wrapping-p
+ .patch,
+ +files/2.7.99.902-0004-Fix-915-class-Render-after-the-8xx-class-Render-fix
+ .patch,
+ +files/2.7.99.902-0005-Really-fix-i915-render.-Fail-at-commit-amend.patch,
+ +files/2.7.99.902-0006-accessing-a-pixmap-if-prepare_access-fails-is-verbo
+ t.patch, +files/2.7.99.902-0007-Update-to-xextproto-7.1-support.patch:
+ backport another 4 patches from git master
*xf86-video-intel-2.7.99.902 (16 Jul 2009)
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
index fec386cbef5c..fcf38da59624 100644
--- 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
@@ -1,7 +1,7 @@
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.
+Subject: [PATCH 1/7] Fix XV scan line calculation when rotated.
---
src/i830_video.c | 11 ++++++-----
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
index a99a41b748b3..72d34c568e43 100644
--- 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
@@ -1,7 +1,7 @@
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).
+Subject: [PATCH 2/7] 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
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
index d2852e4a8210..5ed5fbc8982c 100644
--- 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
@@ -1,7 +1,7 @@
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.
+Subject: [PATCH 3/7] Use batch_start_atomic to fix batchbuffer wrapping problems with 8xx render.
Bug #22483.
---
diff --git a/x11-drivers/xf86-video-intel/files/2.7.99.902-0004-Fix-915-class-Render-after-the-8xx-class-Render-fix.patch b/x11-drivers/xf86-video-intel/files/2.7.99.902-0004-Fix-915-class-Render-after-the-8xx-class-Render-fix.patch
new file mode 100644
index 000000000000..8d457c1d7530
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/2.7.99.902-0004-Fix-915-class-Render-after-the-8xx-class-Render-fix.patch
@@ -0,0 +1,116 @@
+From 8dd7ccf37e2de6d80b556e6d18af244cefc1e417 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 16 Jul 2009 11:40:51 -0700
+Subject: [PATCH 4/7] Fix 915-class Render after the 8xx-class Render fix.
+
+The two shared i830_composite.c, so giving i830 atomic batch support
+triggered anger about starting i830's atomic area while in i915's atomic
+area. Instead, split the emit-a-primitive stuff from the state emission.
+---
+ src/i830.h | 3 +++
+ src/i830_render.c | 45 +++++++++++++++++++++++++++++----------------
+ src/i915_render.c | 3 ++-
+ 3 files changed, 34 insertions(+), 17 deletions(-)
+
+diff --git a/src/i830.h b/src/i830.h
+index ec57662..54dddd8 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -788,6 +788,9 @@ i830_transform_is_affine (PictTransformPtr t);
+
+ void i830_composite(PixmapPtr pDst, int srcX, int srcY,
+ int maskX, int maskY, int dstX, int dstY, int w, int h);
++void i830_emit_composite_primitive(PixmapPtr pDst, int srcX, int srcY,
++ int maskX, int maskY, int dstX, int dstY,
++ int w, int h);
+ void i830_done_composite(PixmapPtr pDst);
+ /* i915_render.c */
+ Bool i915_check_composite(int op, PicturePtr pSrc, PicturePtr pMask,
+diff --git a/src/i830_render.c b/src/i830_render.c
+index ecee6f2..c5196cc 100644
+--- a/src/i830_render.c
++++ b/src/i830_render.c
+@@ -581,14 +581,10 @@ i830_emit_composite_state(ScrnInfoPtr pScrn)
+ }
+ }
+
+-/**
+- * Do a single rectangle composite operation.
+- *
+- * This function is shared between i830 and i915 generation code.
+- */
+ void
+-i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+- int dstX, int dstY, int w, int h)
++i830_emit_composite_primitive(PixmapPtr pDst, int srcX, int srcY,
++ int maskX, int maskY,
++ int dstX, int dstY, int w, int h)
+ {
+ ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ I830Ptr pI830 = I830PTR(pScrn);
+@@ -670,15 +666,6 @@ 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);
+@@ -740,6 +727,32 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ }
+
+ ADVANCE_BATCH();
++}
++
++
++/**
++ * Do a single rectangle composite operation.
++ *
++ * This function is shared between i830 and i915 generation code.
++ */
++void
++i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
++ int dstX, int dstY, int w, int h)
++{
++ ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
++ I830Ptr pI830 = I830PTR(pScrn);
++
++ intel_batch_start_atomic(pScrn,
++ 58 + /* invarient */
++ 24 + /* setup */
++ 20 + /* 2 * setup_texture */
++ 6 + 30 /* verts */);
++
++ if (pI830->needs_render_state_emit)
++ i830_emit_composite_state(pScrn);
++
++ i830_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY,
++ w, h);
+
+ intel_batch_end_atomic(pScrn);
+
+diff --git a/src/i915_render.c b/src/i915_render.c
+index ab04e9c..2d11986 100644
+--- a/src/i915_render.c
++++ b/src/i915_render.c
+@@ -556,7 +556,8 @@ i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+ if (pI830->i915_render_state.needs_emit)
+ i915_emit_composite_setup(pScrn);
+
+- i830_composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, w, h);
++ i830_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY,
++ w, h);
+
+ intel_batch_end_atomic(pScrn);
+ }
+--
+1.6.3.3
+
diff --git a/x11-drivers/xf86-video-intel/files/2.7.99.902-0005-Really-fix-i915-render.-Fail-at-commit-amend.patch b/x11-drivers/xf86-video-intel/files/2.7.99.902-0005-Really-fix-i915-render.-Fail-at-commit-amend.patch
new file mode 100644
index 000000000000..38263027a980
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/2.7.99.902-0005-Really-fix-i915-render.-Fail-at-commit-amend.patch
@@ -0,0 +1,76 @@
+From bb3007384298cb57625ec0b3868dff9b23568f3e Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 16 Jul 2009 12:56:07 -0700
+Subject: [PATCH 5/7] Really fix i915 render. Fail at commit --amend.
+
+---
+ src/i830.h | 2 --
+ src/i915_render.c | 25 +++++++++++++------------
+ 2 files changed, 13 insertions(+), 14 deletions(-)
+
+diff --git a/src/i830.h b/src/i830.h
+index 54dddd8..21c98f5 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -482,8 +482,6 @@ typedef struct _I830Rec {
+
+ struct {
+ int op;
+- PicturePtr pSrcPicture, pMaskPicture, pDstPicture;
+- PixmapPtr pSrc, pMask, pDst;
+ uint32_t dst_format;
+ Bool is_nearest;
+ Bool needs_emit;
+diff --git a/src/i915_render.c b/src/i915_render.c
+index 2d11986..c81366a 100644
+--- a/src/i915_render.c
++++ b/src/i915_render.c
+@@ -322,6 +322,13 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
+ i830_get_pixmap_bo(pDst),
+ };
+
++ 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);
+@@ -351,12 +358,6 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
+ }
+
+ pI830->i915_render_state.op = op;
+- pI830->i915_render_state.pSrcPicture = pSrcPicture;
+- pI830->i915_render_state.pMaskPicture = pMaskPicture;
+- pI830->i915_render_state.pDstPicture = pDstPicture;
+- pI830->i915_render_state.pSrc = pSrc;
+- pI830->i915_render_state.pMask = pMask;
+- pI830->i915_render_state.pDst = pDst;
+ pI830->i915_render_state.needs_emit = TRUE;
+
+ return TRUE;
+@@ -367,12 +368,12 @@ i915_emit_composite_setup(ScrnInfoPtr pScrn)
+ {
+ I830Ptr pI830 = I830PTR(pScrn);
+ int op = pI830->i915_render_state.op;
+- PicturePtr pSrcPicture = pI830->i915_render_state.pSrcPicture;
+- PicturePtr pMaskPicture = pI830->i915_render_state.pMaskPicture;
+- PicturePtr pDstPicture = pI830->i915_render_state.pDstPicture;
+- PixmapPtr pSrc = pI830->i915_render_state.pSrc;
+- PixmapPtr pMask = pI830->i915_render_state.pMask;
+- PixmapPtr pDst = pI830->i915_render_state.pDst;
++ PicturePtr pSrcPicture = pI830->render_src_picture;
++ PicturePtr pMaskPicture = pI830->render_mask_picture;
++ PicturePtr pDstPicture = pI830->render_dst_picture;
++ PixmapPtr pSrc = pI830->render_src;
++ PixmapPtr pMask = pI830->render_mask;
++ PixmapPtr pDst = pI830->render_dst;
+ uint32_t dst_format = pI830->i915_render_state.dst_format, dst_pitch;
+ uint32_t blendctl;
+ int out_reg = FS_OC;
+--
+1.6.3.3
+
diff --git a/x11-drivers/xf86-video-intel/files/2.7.99.902-0006-accessing-a-pixmap-if-prepare_access-fails-is-verbot.patch b/x11-drivers/xf86-video-intel/files/2.7.99.902-0006-accessing-a-pixmap-if-prepare_access-fails-is-verbot.patch
new file mode 100644
index 000000000000..cceab079830d
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/2.7.99.902-0006-accessing-a-pixmap-if-prepare_access-fails-is-verbot.patch
@@ -0,0 +1,34 @@
+From 57c7cbade9556e7b21867e61353f0928fd553616 Mon Sep 17 00:00:00 2001
+From: Owain Ainsworth <zerooa@googlemail.com>
+Date: Thu, 16 Jul 2009 20:38:43 +0100
+Subject: [PATCH 6/7] accessing a pixmap if prepare_access fails is verboten.
+
+Don't do it, treat this the same as every other prepare access call in uxa.
+
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Signed-off-by: Owain Ainsworth <zerooa@googlemail.com>
+---
+ uxa/uxa.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/uxa/uxa.c b/uxa/uxa.c
+index 1f2d75b..22c7c40 100644
+--- a/uxa/uxa.c
++++ b/uxa/uxa.c
+@@ -244,9 +244,10 @@ uxa_validate_gc (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
+ /* We can't inline stipple handling like we do for GCTile because it sets
+ * fbgc privates.
+ */
+- uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RW);
+- fbValidateGC (pGC, changes, pDrawable);
+- uxa_finish_access(&pGC->stipple->drawable);
++ if (uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RW)) {
++ fbValidateGC (pGC, changes, pDrawable);
++ uxa_finish_access(&pGC->stipple->drawable);
++ }
+ } else {
+ fbValidateGC (pGC, changes, pDrawable);
+ }
+--
+1.6.3.3
+
diff --git a/x11-drivers/xf86-video-intel/files/2.7.99.902-0007-Update-to-xextproto-7.1-support.patch b/x11-drivers/xf86-video-intel/files/2.7.99.902-0007-Update-to-xextproto-7.1-support.patch
new file mode 100644
index 000000000000..d3df598d89da
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/2.7.99.902-0007-Update-to-xextproto-7.1-support.patch
@@ -0,0 +1,184 @@
+From 0a4c4c5fe8ebad2dd13f5770bd90a194eebb2890 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 16 Jul 2009 11:40:15 +1000
+Subject: [PATCH 7/7] Update to xextproto 7.1 support.
+
+DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers
+need to include dpmsconst.h if xextproto 7.1 is available.
+
+SHM is now shm.h instead of shmstr. Requires definition of ShmFuncs that's
+not exported by the server.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ configure.ac | 4 ++++
+ src/ch7017/ch7017.c | 5 +++++
+ src/ch7xxx/ch7xxx.c | 5 +++++
+ src/ivch/ivch.c | 5 +++++
+ src/sil164/sil164.c | 5 +++++
+ src/tfp410/tfp410.c | 5 +++++
+ uxa/uxa-priv.h | 31 ++++++++++++++++++++++++++++++-
+ 7 files changed, 59 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 077c1ff..3857470 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -101,6 +101,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
+
+ # Checks for pkg-config packages
+ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6 xproto fontsproto $REQUIRED_MODULES])
++PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
++ HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
++ HAVE_XEXTPROTO_71="no")
++AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
+
+ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+ drm_cflags=$(pkg-config --cflags libdrm)
+diff --git a/src/ch7017/ch7017.c b/src/ch7017/ch7017.c
+index 759fc24..01e414f 100644
+--- a/src/ch7017/ch7017.c
++++ b/src/ch7017/ch7017.c
+@@ -39,8 +39,13 @@
+ #include "miscstruct.h"
+ #include "xf86i2c.h"
+ #include "xf86Crtc.h"
++#ifdef HAVE_XEXTPROTO_71
++#include <X11/extensions/dpmsconst.h>
++#else
+ #define DPMS_SERVER
+ #include <X11/extensions/dpms.h>
++#endif
++
+
+ #include "../i2c_vid.h"
+ #include "ch7017_reg.h"
+diff --git a/src/ch7xxx/ch7xxx.c b/src/ch7xxx/ch7xxx.c
+index 8a439e4..13ba102 100644
+--- a/src/ch7xxx/ch7xxx.c
++++ b/src/ch7xxx/ch7xxx.c
+@@ -39,8 +39,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include "miscstruct.h"
+ #include "xf86i2c.h"
+ #include "xf86Crtc.h"
++#ifdef HAVE_XEXTPROTO_71
++#include <X11/extensions/dpmsconst.h>
++#else
+ #define DPMS_SERVER
+ #include <X11/extensions/dpms.h>
++#endif
++
+
+ #include "../i2c_vid.h"
+ #include "ch7xxx.h"
+diff --git a/src/ivch/ivch.c b/src/ivch/ivch.c
+index 873afcc..dffe334 100644
+--- a/src/ivch/ivch.c
++++ b/src/ivch/ivch.c
+@@ -36,8 +36,13 @@
+ #include "miscstruct.h"
+ #include "xf86i2c.h"
+ #include "xf86Crtc.h"
++#ifdef HAVE_XEXTPROTO_71
++#include <X11/extensions/dpmsconst.h>
++#else
+ #define DPMS_SERVER
+ #include <X11/extensions/dpms.h>
++#endif
++
+ #include <unistd.h>
+
+ #include "../i2c_vid.h"
+diff --git a/src/sil164/sil164.c b/src/sil164/sil164.c
+index 410a681..c90bed3 100644
+--- a/src/sil164/sil164.c
++++ b/src/sil164/sil164.c
+@@ -40,8 +40,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include "miscstruct.h"
+ #include "xf86i2c.h"
+ #include "xf86Crtc.h"
++#ifdef HAVE_XEXTPROTO_71
++#include <X11/extensions/dpmsconst.h>
++#else
+ #define DPMS_SERVER
+ #include <X11/extensions/dpms.h>
++#endif
++
+
+ #include "../i2c_vid.h"
+ #include "sil164.h"
+diff --git a/src/tfp410/tfp410.c b/src/tfp410/tfp410.c
+index c2c4fc3..4d3bb8a 100644
+--- a/src/tfp410/tfp410.c
++++ b/src/tfp410/tfp410.c
+@@ -39,8 +39,13 @@
+ #include "miscstruct.h"
+ #include "xf86i2c.h"
+ #include "xf86Crtc.h"
++#ifdef HAVE_XEXTPROTO_71
++#include <X11/extensions/dpmsconst.h>
++#else
+ #define DPMS_SERVER
+ #include <X11/extensions/dpms.h>
++#endif
++
+
+ #include "../i2c_vid.h"
+ #include "tfp410.h"
+diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
+index 3d2b776..d469474 100644
+--- a/uxa/uxa-priv.h
++++ b/uxa/uxa-priv.h
+@@ -42,9 +42,13 @@
+ #define NEED_EVENTS
+ #include <X11/Xproto.h>
+ #ifdef MITSHM
++#ifdef HAVE_XEXTPROTO_71
++#include <X11/extensions/shm.h>
++#else
+ #define _XSHM_SERVER_
+ #include <X11/extensions/shmstr.h>
+ #endif
++#endif
+ #include "scrnintstr.h"
+ #include "pixmapstr.h"
+ #include "windowstr.h"
+@@ -321,9 +325,34 @@ uxa_get_image (DrawablePtr pDrawable, int x, int y, int w, int h,
+ extern const GCOps uxa_ops;
+
+ #ifdef MITSHM
++/* XXX these come from shmint.h, which isn't exported by the server */
++
++#ifdef HAVE_XEXTPROTO_71
++/* Up to xextproto 7.1, these were provided in shmstr.h */
++typedef struct _ShmFuncs {
++ PixmapPtr (* CreatePixmap)(ScreenPtr pScreen,
++ int width,
++ int height,
++ int depth,
++ char *addr);
++ void (* PutImage)(DrawablePtr dst,
++ GCPtr pGC,
++ int depth,
++ unsigned int format,
++ int w,
++ int h,
++ int sx,
++ int sy,
++ int sw,
++ int sh,
++ int dx,
++ int dy,
++ char *data);
++} ShmFuncs, *ShmFuncsPtr;
++#endif
++
+ extern ShmFuncs uxa_shm_funcs;
+
+-/* XXX these come from shmint.h, which isn't exported by the server */
+ void
+ ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
+
+--
+1.6.3.3
+
diff --git a/x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902-r1.ebuild b/x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902-r1.ebuild
new file mode 100644
index 000000000000..64753b9c5c65
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/xf86-video-intel-2.7.99.902-r1.ebuild
@@ -0,0 +1,42 @@
+# 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-r1.ebuild,v 1.1 2009/07/20 21:29:02 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"
+"${FILESDIR}/${PV}-0004-Fix-915-class-Render-after-the-8xx-class-Render-fix.patch"
+"${FILESDIR}/${PV}-0005-Really-fix-i915-render.-Fail-at-commit-amend.patch"
+"${FILESDIR}/${PV}-0006-accessing-a-pixmap-if-prepare_access-fails-is-verbot.patch"
+"${FILESDIR}/${PV}-0007-Update-to-xextproto-7.1-support.patch"
+)
+
+pkg_setup() {
+ CONFIGURE_OPTIONS="$(use_enable dri)"
+}