From c40a217db5f63be3aa88a32ad77ec93efb40d95c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 May 2011 22:46:59 +0000 Subject: Tue May 31 22:46:59 UTC 2011 --- extra/apache/PKGBUILD | 11 +- extra/apr-util/PKGBUILD | 19 +- extra/apr/PKGBUILD | 15 +- extra/ccache/PKGBUILD | 18 +- extra/libgadu/PKGBUILD | 12 +- extra/network-manager-applet/PKGBUILD | 6 +- extra/networkmanager/PKGBUILD | 6 +- extra/xf86-video-intel/PKGBUILD | 13 +- extra/xf86-video-intel/git-fixes.patch | 1050 +++++++++++++++++++++++++++++ extra/xorg-server/PKGBUILD | 19 +- extra/xorg-server/autoconfig-nvidia.patch | 104 +++ extra/xorg-server/git-fixes.patch | 318 +++++++++ 12 files changed, 1540 insertions(+), 51 deletions(-) create mode 100644 extra/xf86-video-intel/git-fixes.patch create mode 100644 extra/xorg-server/autoconfig-nvidia.patch create mode 100644 extra/xorg-server/git-fixes.patch (limited to 'extra') diff --git a/extra/apache/PKGBUILD b/extra/apache/PKGBUILD index 41b26cd97..15820f05f 100644 --- a/extra/apache/PKGBUILD +++ b/extra/apache/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 123392 2011-05-10 21:15:00Z foutrelis $ +# $Id: PKGBUILD 125827 2011-05-30 09:46:57Z jgc $ # Maintainer: Jan de Groot # Contributor: Andrea Scarpino # Contributor: Pierre Schmitz pkgname=apache -pkgver=2.2.17 -pkgrel=3 +pkgver=2.2.19 +pkgrel=1 pkgdesc='A high performance Unix-based HTTP server' arch=('i686' 'x86_64') options=('!libtool') @@ -35,7 +35,7 @@ source=(http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2 httpd.logrotate httpd arch.layout) -md5sums=('16eadc59ea6b38af33874d300973202e' +md5sums=('832f96a6ec4b8fc7cf49b9efd4e89060' 'f1d9d41360908ceb2374da55ae99197a' 'cdfa04985a0efa850976aef01c2a0c40' '0930d2d0612eb0a53a0d00aea7e8687f' @@ -66,6 +66,9 @@ build() { for mpm in prefork worker itk; do if [ "${mpm}" = "itk" ]; then + # Fix patch to apply with latest Apache version + sed -i -e 's/mpmt_os2}/mpmt_os2|winnt}/g' "${srcdir}/03-add-mpm-to-build-system.patch" + mkdir -p server/mpm/experimental/itk cp -r server/mpm/prefork/* server/mpm/experimental/itk/ mv server/mpm/experimental/itk/prefork.c server/mpm/experimental/itk/itk.c diff --git a/extra/apr-util/PKGBUILD b/extra/apr-util/PKGBUILD index c40bdaf6c..e9f8b7189 100644 --- a/extra/apr-util/PKGBUILD +++ b/extra/apr-util/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 123397 2011-05-10 22:24:40Z foutrelis $ +# $Id: PKGBUILD 125819 2011-05-30 09:26:18Z jgc $ # Maintainer: Jan de Groot # Maintainer: Pierre Schmitz pkgname=apr-util -pkgver=1.3.11 +pkgver=1.3.12 pkgrel=1 pkgdesc="The Apache Portable Runtime" arch=('i686' 'x86_64') @@ -12,14 +12,13 @@ depends=('apr' 'gdbm' 'expat' 'db' 'libldap' 'unixodbc') options=('!libtool') license=('APACHE') source=("http://www.apache.org/dist/apr/apr-util-${pkgver}.tar.bz2") -md5sums=('2aeddb384b03f3f73107770724d5c97b') +md5sums=('0f671b037ca62751a8a7005578085560') build() { - cd "${srcdir}/apr-util-${pkgver}" - - ./configure --prefix=/usr --with-apr=/usr \ - --without-pgsql --without-mysql --without-sqlite2 --without-sqlite3 \ - --with-berkeley-db=/usr --with-gdbm=/usr --with-ldap - make - make DESTDIR="${pkgdir}" install + cd "${srcdir}/apr-util-${pkgver}" + ./configure --prefix=/usr --with-apr=/usr \ + --without-pgsql --without-mysql --without-sqlite2 --without-sqlite3 \ + --with-berkeley-db=/usr --with-gdbm=/usr --with-ldap + make + make DESTDIR="${pkgdir}" install } diff --git a/extra/apr/PKGBUILD b/extra/apr/PKGBUILD index 4bd4ae012..3f18110f0 100644 --- a/extra/apr/PKGBUILD +++ b/extra/apr/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 123387 2011-05-10 21:11:03Z foutrelis $ +# $Id: PKGBUILD 125814 2011-05-30 09:11:42Z jgc $ # Maintainer: Jan de Groot # Contributor: Andrea Scarpino # Contributor: Pierre Schmitz pkgname=apr -pkgver=1.4.4 +pkgver=1.4.5 pkgrel=1 pkgdesc="The Apache Portable Runtime" arch=('i686' 'x86_64') @@ -13,19 +13,16 @@ depends=('util-linux-ng>=2.16') options=('!libtool') license=('APACHE') source=(http://www.apache.org/dist/apr/apr-${pkgver}.tar.bz2) -md5sums=('daf5487c82dd7bec9c005c96f8cb01b1') +md5sums=('8b53f5a5669d0597f2da889a2f576eb6') build() { cd "${srcdir}/apr-${pkgver}" - export apr_cv_epoll_create1=no - export apr_cv_dup3=no export apr_cv_accept4=no - export apr_cv_sock_cloexec=no ./configure --prefix=/usr --includedir=/usr/include/apr-1 \ --with-installbuilddir=/usr/share/apr-1/build \ --enable-nonportable-atomics \ - --with-devrandom=/dev/urandom || return 1 - make || return 1 - make DESTDIR="${pkgdir}" install || return 1 + --with-devrandom=/dev/urandom + make + make DESTDIR="${pkgdir}" install } diff --git a/extra/ccache/PKGBUILD b/extra/ccache/PKGBUILD index 09a7487fb..7fd538159 100644 --- a/extra/ccache/PKGBUILD +++ b/extra/ccache/PKGBUILD @@ -1,26 +1,32 @@ -# $Id: PKGBUILD 105538 2011-01-10 11:06:14Z giovanni $ +# $Id: PKGBUILD 125865 2011-05-30 17:15:51Z giovanni $ # Maintainer: Giovanni Scafora # Contributor: Tom Newsom pkgname=ccache -pkgver=3.1.4 +pkgver=3.1.5 pkgrel=1 pkgdesc="A compiler cache" url="http://ccache.samba.org/" -source=(http://samba.org/ftp/${pkgname}/$pkgname-$pkgver.tar.bz2) +source=("http://samba.org/ftp/${pkgname}/$pkgname-$pkgver.tar.bz2") license=('GPL') arch=('i686' 'x86_64') depends=('zlib') -md5sums=('676fda8a9a5e02574435c32b22942abd') +md5sums=('f652bd20253bb4aa1440ae50bea3c9e3') build() { cd ${srcdir}/${pkgname}-${pkgver} ./configure --prefix=/usr - make || return 1 + + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + install -Dm 755 ccache ${pkgdir}/usr/bin/ccache install -Dm 644 ccache.1 ${pkgdir}/usr/share/man/man1/ccache.1 - mkdir -p ${pkgdir}/usr/lib/ccache/bin + install -d ${pkgdir}/usr/lib/ccache/bin ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/cc ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/gcc ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/g++ diff --git a/extra/libgadu/PKGBUILD b/extra/libgadu/PKGBUILD index da245d5d6..eb86b103d 100644 --- a/extra/libgadu/PKGBUILD +++ b/extra/libgadu/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 114618 2011-03-14 16:59:52Z andrea $ +# $Id: PKGBUILD 125846 2011-05-30 12:25:37Z andrea $ # Maintainer: Andrea Scarpino # Contributor: Mateusz Herych pkgname=libgadu -pkgver=1.10.1 +pkgver=1.11.0 pkgrel=1 pkgdesc="This library implements the client side of the Gadu-Gadu protocol" arch=('i686' 'x86_64') @@ -12,10 +12,10 @@ license=('GPL') depends=('openssl') options=('!libtool') source=("http://toxygen.net/${pkgname}/files/${pkgname}-${pkgver}.tar.gz") -md5sums=('4dd528bc0627e4bd59f79b07f0e8cdbc') +md5sums=('c779891298ce5d081c1e871e1e5b256d') build() { - cd ${srcdir}/${pkgname}-${pkgver} + cd "${srcdir}"/${pkgname}-${pkgver} ./configure --prefix=/usr \ --disable-static \ --enable-shared \ @@ -24,6 +24,6 @@ build() { } package() { - cd ${srcdir}/${pkgname}-${pkgver} - make DESTDIR=${pkgdir} install + cd "${srcdir}"/${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install } diff --git a/extra/network-manager-applet/PKGBUILD b/extra/network-manager-applet/PKGBUILD index 5d2be4407..60394a46b 100644 --- a/extra/network-manager-applet/PKGBUILD +++ b/extra/network-manager-applet/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 122476 2011-05-04 09:08:28Z ibiru $ +# $Id: PKGBUILD 125653 2011-05-27 18:09:01Z ibiru $ # Maintainer: Jan de Groot # Contributor: Arjan Timmerman # Contributor: Wael Nasreddine @@ -6,7 +6,7 @@ # Contributor: Will Rea pkgname=network-manager-applet -pkgver=0.8.999 +pkgver=0.8.9997 pkgrel=1 pkgdesc="GNOME frontends to NetWorkmanager" arch=('i686' 'x86_64') @@ -20,7 +20,7 @@ optdepends=('gnome-bluetooth: for PAN/DUN support') options=('!libtool') install=network-manager-applet.install source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2) -sha256sums=('95249953fad924240fbe85ae7742405622c7edc3c6391dcb823346d5c37fd63b') +sha256sums=('1620e52bfdba18f3640e57a3d450e913ad73a6e529dd0bad895d4c07700018ab') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/networkmanager/PKGBUILD b/extra/networkmanager/PKGBUILD index 3cb0ddabf..ecfc88f0a 100644 --- a/extra/networkmanager/PKGBUILD +++ b/extra/networkmanager/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 122462 2011-05-04 08:30:18Z ibiru $ +# $Id: PKGBUILD 125645 2011-05-27 17:39:58Z ibiru $ # Maintainer: Jan de Groot # Contri-butor: Wael Nasreddine # Contributor: Tor Krill @@ -6,7 +6,7 @@ # Contributor: Valentine Sinitsyn pkgname=networkmanager -pkgver=0.8.999 +pkgver=0.8.9997 pkgrel=1 pkgdesc="Network Management daemon" arch=('i686' 'x86_64') @@ -24,7 +24,7 @@ backup=('etc/NetworkManager/NetworkManager.conf') install=networkmanager.install source=(http://ftp.gnome.org/pub/gnome/sources/NetworkManager/0.8/NetworkManager-${pkgver}.tar.bz2 NetworkManager.conf disable_set_hostname.patch) -sha256sums=('fc2430e4babe1f53ac071746cd3f662f064a7d338f0e324f42f82fe9512968cd' +sha256sums=('af2e08546cfcd51731be8f4d944b77876ba2eca93cf4f15509caf5572cac6596' '44b048804c7c0b8b3b0c29b8632b6ad613c397d0a1635ec918e10c0fbcdadf21' '1e4586991bc96ef004dc520c794047a336c54433e0bd4edc3879fb6e7ab0e553') diff --git a/extra/xf86-video-intel/PKGBUILD b/extra/xf86-video-intel/PKGBUILD index 333096f8f..2f845c4d8 100644 --- a/extra/xf86-video-intel/PKGBUILD +++ b/extra/xf86-video-intel/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 119757 2011-04-14 20:01:07Z andyrtr $ +# $Id: PKGBUILD 125851 2011-05-30 12:49:55Z jgc $ # Maintainer: Jan de Groot pkgname=xf86-video-intel pkgver=2.15.0 -pkgrel=1 +pkgrel=2 pkgdesc="X.org Intel i810/i830/i915/945G/G965+ video drivers" arch=(i686 x86_64) url="http://xorg.freedesktop.org/" @@ -13,11 +13,16 @@ makedepends=('xorg-server-devel' 'libx11' 'libdrm' 'xf86driproto' 'glproto' 'mes conflicts=('xorg-server<1.10.0' 'xf86-video-i810' 'xf86-video-intel-legacy') options=('!libtool') groups=('xorg-drivers' 'xorg') -source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) -sha1sums=('78ec39a4470cfc0bf13d269fb915f6c5a498ee62') +source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 + git-fixes.patch) +sha1sums=('78ec39a4470cfc0bf13d269fb915f6c5a498ee62' + 'd7a9102e58c1d6c1bcb99ff6836146bd54a18161') build() { cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/git-fixes.patch" + + autoreconf ./configure --prefix=/usr --enable-dri make } diff --git a/extra/xf86-video-intel/git-fixes.patch b/extra/xf86-video-intel/git-fixes.patch new file mode 100644 index 000000000..7ee0d50bb --- /dev/null +++ b/extra/xf86-video-intel/git-fixes.patch @@ -0,0 +1,1050 @@ +diff --git a/NEWS b/NEWS +index ea92bcf..61866b0 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,9 +2,9 @@ Release 2.15.0 (2011-04-14) + ============================== + We are pleased to announce this major release of the xf86-video-intel + driver, roughly on schedule at 3 months since 2.14.0. With the many bug +-fixes in this release, we encourage everyone to upgrade to 2.14. ++fixes in this release, we encourage everyone to upgrade to 2.15. + +-The priority for this quarter has been simply to unexciting and stabilise ++The priority for this quarter has been simply to be unexciting and stabilise + the driver further, seeking to capitalise upon the improvements elsewhere + in the stack. + +diff --git a/configure.ac b/configure.ac +index fd5a3cf..9449e56 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -77,9 +77,7 @@ AC_ARG_WITH(xorg-module-dir, + [moduledir="$libdir/xorg/modules"]) + + AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], +- [Disable DRI support [[default=auto]]]), +- [DRI="$enableval"], +- [DRI=auto]) ++ [Disable DRI support [[default=auto]]])) + + AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], + [Disable XvMC support [[default=yes]]]), +@@ -106,40 +104,48 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) + # Obtain compiler/linker options for the driver dependencies + PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6 xproto fontsproto $REQUIRED_MODULES]) + PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.23]) ++PKG_CHECK_MODULES(DRI, [xf86driproto], , DRI=no) + PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) + + sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` + +-save_CFLAGS="$CFLAGS" +-CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" +-CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" +-AC_MSG_CHECKING([whether to include DRI support]) +-if test x$DRI != xno; then +- AC_CHECK_FILE([${sdkdir}/dri.h], +- [have_dri_h="yes"], [have_dri_h="no"]) +- AC_CHECK_FILE([${sdkdir}/sarea.h], +- [have_sarea_h="yes"], [have_sarea_h="no"]) +- AC_CHECK_FILE([${sdkdir}/dristruct.h], +- [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++if test "x$enable_dri" != "xno"; then ++ save_CFLAGS="$CFLAGS" ++ save_CPPFLAGS="$CPPFLAGS" ++ CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" ++ CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" ++ AC_CHECK_HEADERS([dri.h sarea.h dristruct.h],, [DRI=no], ++ [/* for dri.h */ ++ #include ++ /* for dristruct.h */ ++ #include ++ #ifdef HAVE_DRI_H ++ # include ++ #endif ++ #ifdef HAVE_SAREA_H ++ # include ++ #endif ++ ]) ++ CFLAGS="$save_CFLAGS $DEBUGFLAGS" ++ CPPFLAGS="$save_CPPFLAGS" ++else ++ DRI=no + fi ++ + AC_MSG_CHECKING([whether to include DRI support]) +-if test x$DRI = xauto; then +- if test "$have_dri_h" = yes -a \ +- "$have_sarea_h" = yes -a \ +- "$have_dristruct_h" = yes; then +- DRI="yes" +- else +- DRI="no" +- fi +-fi +-AC_MSG_RESULT([$DRI]) +-CFLAGS="$save_CFLAGS $DEBUGFLAGS" ++AC_MSG_RESULT([${DRI-yes}]) + +-AM_CONDITIONAL(DRI, test x$DRI = xyes) +-if test "$DRI" = yes; then +- PKG_CHECK_MODULES(DRI, [xf86driproto]) ++AM_CONDITIONAL(DRI, test x$DRI != xno) ++if test "x$DRI" != "xno"; then + AC_DEFINE(XF86DRI,1,[Enable DRI driver support]) + AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) ++else ++ DRI_CFLAGS="" ++ DRI_LIBS="" ++ ++ if test "x$enable_dri" = "xyes"; then ++ AC_MSG_ERROR([DRI requested but prerequisites not found]) ++ fi + fi + + if test "$XVMC" = yes; then +diff --git a/src/i965_render.c b/src/i965_render.c +index bfcd3f2..b76107d 100644 +--- a/src/i965_render.c ++++ b/src/i965_render.c +@@ -182,6 +182,10 @@ i965_check_composite(int op, + int width, int height) + { + ScrnInfoPtr scrn = xf86Screens[dest_picture->pDrawable->pScreen->myNum]; ++ intel_screen_private *intel = intel_get_screen_private(scrn); ++ ++ if (IS_GEN7(intel)) ++ return FALSE; + + /* Check for unsupported compositing operations. */ + if (op >= sizeof(i965_blend_op) / sizeof(i965_blend_op[0])) { +diff --git a/src/i965_video.c b/src/i965_video.c +index c757681..53a9394 100644 +--- a/src/i965_video.c ++++ b/src/i965_video.c +@@ -1210,7 +1210,7 @@ I965DisplayVideoTextured(ScrnInfoPtr scrn, + intel_batch_submit(scrn); + } + +- intel_batch_start_atomic(scrn, 100); ++ intel_batch_start_atomic(scrn, 150); + + i965_emit_video_setup(scrn, surface_state_binding_table_bo, n_src_surf, pixmap); + +diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c +index 289ed2b..d0a41aa 100644 +--- a/src/intel_batchbuffer.c ++++ b/src/intel_batchbuffer.c +@@ -175,13 +175,6 @@ void intel_batch_emit_flush(ScrnInfoPtr scrn) + intel_batch_do_flush(scrn); + } + +-static Bool intel_batch_needs_flush(intel_screen_private *intel) +-{ +- ScreenPtr screen = intel->scrn->pScreen; +- PixmapPtr pixmap = screen->GetScreenPixmap(screen); +- return intel_get_pixmap_private(pixmap)->batch_write; +-} +- + void intel_batch_submit(ScrnInfoPtr scrn) + { + intel_screen_private *intel = intel_get_screen_private(scrn); +@@ -218,7 +211,9 @@ void intel_batch_submit(ScrnInfoPtr scrn) + ret = drm_intel_bo_mrb_exec(intel->batch_bo, + intel->batch_used*4, + NULL, 0, 0xffffffff, +- IS_GEN6(intel) ? intel->current_batch: I915_EXEC_DEFAULT); ++ (HAS_BLT(intel) ? ++ intel->current_batch: ++ I915_EXEC_DEFAULT)); + } + + if (ret != 0) { +@@ -241,8 +236,6 @@ void intel_batch_submit(ScrnInfoPtr scrn) + } + } + +- intel->needs_flush |= intel_batch_needs_flush(intel); +- + while (!list_is_empty(&intel->batch_pixmaps)) { + struct intel_pixmap *entry; + +diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h +index 605932a..f5f118e 100644 +--- a/src/intel_batchbuffer.h ++++ b/src/intel_batchbuffer.h +@@ -50,14 +50,14 @@ static inline int intel_vertex_space(intel_screen_private *intel) + } + + static inline void +-intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, unsigned int sz) ++intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, int sz) + { + assert(sz < intel->batch_bo->size - 8); + if (intel_batch_space(intel) < sz) + intel_batch_submit(scrn); + } + +-static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, unsigned int sz) ++static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, int sz) + { + intel_screen_private *intel = intel_get_screen_private(scrn); + +@@ -137,6 +137,8 @@ intel_batch_mark_pixmap_domains(intel_screen_private *intel, + + priv->batch_write |= write_domain != 0; + priv->busy = 1; ++ ++ intel->needs_flush |= write_domain != 0; + } + + static inline void +diff --git a/src/intel_display.c b/src/intel_display.c +index b6592c4..b55b110 100644 +--- a/src/intel_display.c ++++ b/src/intel_display.c +@@ -1607,7 +1607,7 @@ Bool intel_mode_pre_init(ScrnInfoPtr scrn, int fd, int cpp) + gp.value = &has_flipping; + (void)drmCommandWriteRead(intel->drmSubFD, DRM_I915_GETPARAM, &gp, + sizeof(gp)); +- if (has_flipping) { ++ if (has_flipping && intel->swapbuffers_wait) { + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "Kernel page flipping support detected, enabling\n"); + intel->use_pageflipping = TRUE; +diff --git a/src/intel_dri.c b/src/intel_dri.c +index a39b512..48d0f56 100644 +--- a/src/intel_dri.c ++++ b/src/intel_dri.c +@@ -182,6 +182,8 @@ static PixmapPtr fixup_shadow(DrawablePtr drawable, PixmapPtr pixmap) + /* And redirect the pixmap to the new bo (for 3D). */ + intel_set_pixmap_private(old, priv); + old->refcnt++; ++ ++ intel_get_screen_private(xf86Screens[screen->myNum])->needs_flush = TRUE; + return old; + } + +@@ -425,7 +427,7 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion, + + /* Wait for the scanline to be outside the region to be copied */ + if (pixmap_is_scanout(get_drawable_pixmap(dst)) && +- intel->swapbuffers_wait) { ++ intel->swapbuffers_wait && INTEL_INFO(intel)->gen < 60) { + BoxPtr box; + BoxRec crtcbox; + int y1, y2; +diff --git a/src/intel_driver.c b/src/intel_driver.c +index e867351..8666421 100644 +--- a/src/intel_driver.c ++++ b/src/intel_driver.c +@@ -84,7 +84,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + typedef enum { +- OPTION_ACCELMETHOD, + OPTION_DRI, + OPTION_VIDEO_KEY, + OPTION_COLOR_KEY, +@@ -105,7 +104,6 @@ typedef enum { + } I830Opts; + + static OptionInfoRec I830Options[] = { +- {OPTION_ACCELMETHOD, "AccelMethod", OPTV_ANYSTR, {0}, FALSE}, + {OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, TRUE}, + {OPTION_COLOR_KEY, "ColorKey", OPTV_INTEGER, {0}, FALSE}, + {OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE}, +@@ -328,10 +326,10 @@ static void intel_check_dri_option(ScrnInfoPtr scrn) + if (!xf86ReturnOptValBool(intel->Options, OPTION_DRI, TRUE)) + intel->directRenderingType = DRI_DISABLED; + +- if (scrn->depth != 16 && scrn->depth != 24) { ++ if (scrn->depth != 16 && scrn->depth != 24 && scrn->depth != 30) { + xf86DrvMsg(scrn->scrnIndex, X_CONFIG, + "DRI is disabled because it " +- "runs only at depths 16 and 24.\n"); ++ "runs only at depths 16, 24, and 30.\n"); + intel->directRenderingType = DRI_DISABLED; + } + } +@@ -586,6 +584,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) + case 15: + case 16: + case 24: ++ case 30: + break; + default: + xf86DrvMsg(scrn->scrnIndex, X_ERROR, +@@ -658,8 +657,6 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) + intel->swapbuffers_wait = xf86ReturnOptValBool(intel->Options, + OPTION_SWAPBUFFERS_WAIT, + TRUE); +- if (IS_GEN6(intel)) +- intel->swapbuffers_wait = FALSE; + + xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Framebuffer %s\n", + intel->tiling & INTEL_TILING_FB ? "tiled" : "linear"); +diff --git a/src/intel_driver.h b/src/intel_driver.h +index 2e72177..4a584fe 100644 +--- a/src/intel_driver.h ++++ b/src/intel_driver.h +@@ -184,6 +184,13 @@ + #define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126 + #define PCI_CHIP_SANDYBRIDGE_BRIDGE_S 0x0108 /* Server */ + #define PCI_CHIP_SANDYBRIDGE_S_GT 0x010A ++ ++#define PCI_CHIP_IVYBRIDGE_M_GT1 0x0156 ++#define PCI_CHIP_IVYBRIDGE_M_GT2 0x0166 ++#define PCI_CHIP_IVYBRIDGE_D_GT1 0x0152 ++#define PCI_CHIP_IVYBRIDGE_D_GT2 0x0162 ++#define PCI_CHIP_IVYBRIDGE_S_GT1 0x015a ++ + #endif + + #define I85X_CAPID 0x44 +@@ -209,6 +216,7 @@ + #define IS_GEN4(intel) IS_GENx(intel, 4) + #define IS_GEN5(intel) IS_GENx(intel, 5) + #define IS_GEN6(intel) IS_GENx(intel, 6) ++#define IS_GEN7(intel) IS_GENx(intel, 7) + + /* Some chips have specific errata (or limits) that we need to workaround. */ + #define IS_I830(intel) (DEVICE_ID((intel)->PciInfo) == PCI_CHIP_I830_M) +@@ -222,6 +230,7 @@ + + /* supports Y tiled surfaces (pre-965 Mesa isn't ready yet) */ + #define SUPPORTS_YTILING(pI810) (INTEL_INFO(intel)->gen >= 40) ++#define HAS_BLT(pI810) (INTEL_INFO(intel)->gen >= 60) + + extern SymTabRec *intel_chipsets; + +diff --git a/src/intel_module.c b/src/intel_module.c +index 8416544..9468e72 100644 +--- a/src/intel_module.c ++++ b/src/intel_module.c +@@ -39,6 +39,8 @@ + + #include + ++static struct intel_device_info *chipset_info; ++ + static const struct intel_device_info intel_i81x_info = { + .gen = 10, + }; +@@ -71,329 +73,148 @@ static const struct intel_device_info intel_sandybridge_info = { + .gen = 60, + }; + ++static const struct intel_device_info intel_ivybridge_info = { ++ .gen = 70, ++}; ++ + static const SymTabRec _intel_chipsets[] = { +- {PCI_CHIP_I810, "i810"}, +- {PCI_CHIP_I810_DC100, "i810-dc100"}, +- {PCI_CHIP_I810_E, "i810e"}, +- {PCI_CHIP_I815, "i815"}, +- {PCI_CHIP_I830_M, "i830M"}, +- {PCI_CHIP_845_G, "845G"}, +- {PCI_CHIP_I854, "854"}, +- {PCI_CHIP_I855_GM, "852GM/855GM"}, +- {PCI_CHIP_I865_G, "865G"}, +- {PCI_CHIP_I915_G, "915G"}, +- {PCI_CHIP_E7221_G, "E7221 (i915)"}, +- {PCI_CHIP_I915_GM, "915GM"}, +- {PCI_CHIP_I945_G, "945G"}, +- {PCI_CHIP_I945_GM, "945GM"}, +- {PCI_CHIP_I945_GME, "945GME"}, +- {PCI_CHIP_PINEVIEW_M, "Pineview GM"}, +- {PCI_CHIP_PINEVIEW_G, "Pineview G"}, +- {PCI_CHIP_I965_G, "965G"}, +- {PCI_CHIP_G35_G, "G35"}, +- {PCI_CHIP_I965_Q, "965Q"}, +- {PCI_CHIP_I946_GZ, "946GZ"}, +- {PCI_CHIP_I965_GM, "965GM"}, +- {PCI_CHIP_I965_GME, "965GME/GLE"}, +- {PCI_CHIP_G33_G, "G33"}, +- {PCI_CHIP_Q35_G, "Q35"}, +- {PCI_CHIP_Q33_G, "Q33"}, +- {PCI_CHIP_GM45_GM, "GM45"}, +- {PCI_CHIP_G45_E_G, "4 Series"}, +- {PCI_CHIP_G45_G, "G45/G43"}, +- {PCI_CHIP_Q45_G, "Q45/Q43"}, +- {PCI_CHIP_G41_G, "G41"}, +- {PCI_CHIP_B43_G, "B43"}, +- {PCI_CHIP_B43_G1, "B43"}, +- {PCI_CHIP_IRONLAKE_D_G, "Clarkdale"}, +- {PCI_CHIP_IRONLAKE_M_G, "Arrandale"}, +- {PCI_CHIP_SANDYBRIDGE_GT1, "Sandybridge" }, +- {PCI_CHIP_SANDYBRIDGE_GT2, "Sandybridge" }, +- {PCI_CHIP_SANDYBRIDGE_GT2_PLUS, "Sandybridge" }, +- {PCI_CHIP_SANDYBRIDGE_M_GT1, "Sandybridge" }, +- {PCI_CHIP_SANDYBRIDGE_M_GT2, "Sandybridge" }, +- {PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, "Sandybridge" }, +- {PCI_CHIP_SANDYBRIDGE_S_GT, "Sandybridge" }, +- {-1, NULL} ++ {PCI_CHIP_I810, "i810"}, ++ {PCI_CHIP_I810_DC100, "i810-dc100"}, ++ {PCI_CHIP_I810_E, "i810e"}, ++ {PCI_CHIP_I815, "i815"}, ++ {PCI_CHIP_I830_M, "i830M"}, ++ {PCI_CHIP_845_G, "845G"}, ++ {PCI_CHIP_I854, "854"}, ++ {PCI_CHIP_I855_GM, "852GM/855GM"}, ++ {PCI_CHIP_I865_G, "865G"}, ++ {PCI_CHIP_I915_G, "915G"}, ++ {PCI_CHIP_E7221_G, "E7221 (i915)"}, ++ {PCI_CHIP_I915_GM, "915GM"}, ++ {PCI_CHIP_I945_G, "945G"}, ++ {PCI_CHIP_I945_GM, "945GM"}, ++ {PCI_CHIP_I945_GME, "945GME"}, ++ {PCI_CHIP_PINEVIEW_M, "Pineview GM"}, ++ {PCI_CHIP_PINEVIEW_G, "Pineview G"}, ++ {PCI_CHIP_I965_G, "965G"}, ++ {PCI_CHIP_G35_G, "G35"}, ++ {PCI_CHIP_I965_Q, "965Q"}, ++ {PCI_CHIP_I946_GZ, "946GZ"}, ++ {PCI_CHIP_I965_GM, "965GM"}, ++ {PCI_CHIP_I965_GME, "965GME/GLE"}, ++ {PCI_CHIP_G33_G, "G33"}, ++ {PCI_CHIP_Q35_G, "Q35"}, ++ {PCI_CHIP_Q33_G, "Q33"}, ++ {PCI_CHIP_GM45_GM, "GM45"}, ++ {PCI_CHIP_G45_E_G, "4 Series"}, ++ {PCI_CHIP_G45_G, "G45/G43"}, ++ {PCI_CHIP_Q45_G, "Q45/Q43"}, ++ {PCI_CHIP_G41_G, "G41"}, ++ {PCI_CHIP_B43_G, "B43"}, ++ {PCI_CHIP_B43_G1, "B43"}, ++ {PCI_CHIP_IRONLAKE_D_G, "Clarkdale"}, ++ {PCI_CHIP_IRONLAKE_M_G, "Arrandale"}, ++ {PCI_CHIP_SANDYBRIDGE_GT1, "Sandybridge Desktop (GT1)" }, ++ {PCI_CHIP_SANDYBRIDGE_GT2, "Sandybridge Desktop (GT2)" }, ++ {PCI_CHIP_SANDYBRIDGE_GT2_PLUS, "Sandybridge Desktop (GT2+)" }, ++ {PCI_CHIP_SANDYBRIDGE_M_GT1, "Sandybridge Mobile (GT1)" }, ++ {PCI_CHIP_SANDYBRIDGE_M_GT2, "Sandybridge Mobile (GT2)" }, ++ {PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, "Sandybridge Mobile (GT2+)" }, ++ {PCI_CHIP_SANDYBRIDGE_S_GT, "Sandybridge Server" }, ++ {PCI_CHIP_IVYBRIDGE_M_GT1, "Ivybridge Mobile (GT1)" }, ++ {PCI_CHIP_IVYBRIDGE_M_GT2, "Ivybridge Mobile (GT2)" }, ++ {PCI_CHIP_IVYBRIDGE_D_GT1, "Ivybridge Desktop (GT1)" }, ++ {PCI_CHIP_IVYBRIDGE_D_GT2, "Ivybridge Desktop (GT2)" }, ++ {PCI_CHIP_IVYBRIDGE_S_GT1, "Ivybridge Server" }, ++ {-1, NULL} + }; + SymTabRec *intel_chipsets = (SymTabRec *) _intel_chipsets; + + #define INTEL_DEVICE_MATCH(d,i) \ +-{ 0x8086, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } ++ { 0x8086, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (intptr_t)(i) } + + static const struct pci_id_match intel_device_match[] = { +- INTEL_DEVICE_MATCH (PCI_CHIP_I810, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I810_DC100, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I810_E, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I815, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I830_M, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_845_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I854, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I855_GM, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I865_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I915_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_E7221_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I915_GM, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I945_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I945_GM, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I945_GME, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_PINEVIEW_M, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_PINEVIEW_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I965_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_G35_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I965_Q, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I946_GZ, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I965_GM, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_I965_GME, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_G33_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_Q35_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_Q33_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_GM45_GM, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_G45_E_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_G45_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_Q45_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_G41_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_B43_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_IRONLAKE_D_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_IRONLAKE_M_G, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_GT1, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_GT2, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_GT2_PLUS, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT1, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT2, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, 0 ), +- INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_S_GT, 0 ), +- { 0, 0, 0 }, +-}; +- +-static PciChipsets intel_pci_chipsets[] = { +- {PCI_CHIP_I810, PCI_CHIP_I810, NULL}, +- {PCI_CHIP_I810_DC100, PCI_CHIP_I810_DC100, NULL}, +- {PCI_CHIP_I810_E, PCI_CHIP_I810_E, NULL}, +- {PCI_CHIP_I815, PCI_CHIP_I815, NULL}, +- {PCI_CHIP_I830_M, PCI_CHIP_I830_M, NULL}, +- {PCI_CHIP_845_G, PCI_CHIP_845_G, NULL}, +- {PCI_CHIP_I854, PCI_CHIP_I854, NULL}, +- {PCI_CHIP_I855_GM, PCI_CHIP_I855_GM, NULL}, +- {PCI_CHIP_I865_G, PCI_CHIP_I865_G, NULL}, +- {PCI_CHIP_I915_G, PCI_CHIP_I915_G, NULL}, +- {PCI_CHIP_E7221_G, PCI_CHIP_E7221_G, NULL}, +- {PCI_CHIP_I915_GM, PCI_CHIP_I915_GM, NULL}, +- {PCI_CHIP_I945_G, PCI_CHIP_I945_G, NULL}, +- {PCI_CHIP_I945_GM, PCI_CHIP_I945_GM, NULL}, +- {PCI_CHIP_I945_GME, PCI_CHIP_I945_GME, NULL}, +- {PCI_CHIP_PINEVIEW_M, PCI_CHIP_PINEVIEW_M, NULL}, +- {PCI_CHIP_PINEVIEW_G, PCI_CHIP_PINEVIEW_G, NULL}, +- {PCI_CHIP_I965_G, PCI_CHIP_I965_G, NULL}, +- {PCI_CHIP_G35_G, PCI_CHIP_G35_G, NULL}, +- {PCI_CHIP_I965_Q, PCI_CHIP_I965_Q, NULL}, +- {PCI_CHIP_I946_GZ, PCI_CHIP_I946_GZ, NULL}, +- {PCI_CHIP_I965_GM, PCI_CHIP_I965_GM, NULL}, +- {PCI_CHIP_I965_GME, PCI_CHIP_I965_GME, NULL}, +- {PCI_CHIP_G33_G, PCI_CHIP_G33_G, NULL}, +- {PCI_CHIP_Q35_G, PCI_CHIP_Q35_G, NULL}, +- {PCI_CHIP_Q33_G, PCI_CHIP_Q33_G, NULL}, +- {PCI_CHIP_GM45_GM, PCI_CHIP_GM45_GM, NULL}, +- {PCI_CHIP_G45_E_G, PCI_CHIP_G45_E_G, NULL}, +- {PCI_CHIP_G45_G, PCI_CHIP_G45_G, NULL}, +- {PCI_CHIP_Q45_G, PCI_CHIP_Q45_G, NULL}, +- {PCI_CHIP_G41_G, PCI_CHIP_G41_G, NULL}, +- {PCI_CHIP_B43_G, PCI_CHIP_B43_G, NULL}, +- {PCI_CHIP_IRONLAKE_D_G, PCI_CHIP_IRONLAKE_D_G, NULL}, +- {PCI_CHIP_IRONLAKE_M_G, PCI_CHIP_IRONLAKE_M_G, NULL}, +- {PCI_CHIP_SANDYBRIDGE_GT1, PCI_CHIP_SANDYBRIDGE_GT1, NULL}, +- {PCI_CHIP_SANDYBRIDGE_GT2, PCI_CHIP_SANDYBRIDGE_GT2, NULL}, +- {PCI_CHIP_SANDYBRIDGE_GT2_PLUS, PCI_CHIP_SANDYBRIDGE_GT2_PLUS, NULL}, +- {PCI_CHIP_SANDYBRIDGE_M_GT1, PCI_CHIP_SANDYBRIDGE_M_GT1, NULL}, +- {PCI_CHIP_SANDYBRIDGE_M_GT2, PCI_CHIP_SANDYBRIDGE_M_GT2, NULL}, +- {PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, NULL}, +- {PCI_CHIP_SANDYBRIDGE_S_GT, PCI_CHIP_SANDYBRIDGE_S_GT, NULL}, +- {-1, -1, NULL } ++ INTEL_DEVICE_MATCH (PCI_CHIP_I810, &intel_i81x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I810_DC100, &intel_i81x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I810_E, &intel_i81x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I815, &intel_i81x_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_I830_M, &intel_i8xx_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_845_G, &intel_i8xx_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I854, &intel_i8xx_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I855_GM, &intel_i8xx_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I865_G, &intel_i8xx_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_I915_G, &intel_i915_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_E7221_G, &intel_i915_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I915_GM, &intel_i915_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I945_G, &intel_i915_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I945_GM, &intel_i915_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I945_GME, &intel_i915_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_PINEVIEW_M, &intel_g33_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_PINEVIEW_G, &intel_g33_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_G33_G, &intel_g33_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_Q33_G, &intel_g33_info ), ++ /* Another marketing win: Q35 is another g33 device not a gen4 part ++ * like its G35 brethren. ++ */ ++ INTEL_DEVICE_MATCH (PCI_CHIP_Q35_G, &intel_g33_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_I965_G, &intel_i965_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_G35_G, &intel_i965_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I965_Q, &intel_i965_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I946_GZ, &intel_i965_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I965_GM, &intel_i965_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_I965_GME, &intel_i965_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_GM45_GM, &intel_g4x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_G45_E_G, &intel_g4x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_G45_G, &intel_g4x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_Q45_G, &intel_g4x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_G41_G, &intel_g4x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_B43_G, &intel_g4x_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_B43_G1, &intel_g4x_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_IRONLAKE_D_G, &intel_ironlake_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_IRONLAKE_M_G, &intel_ironlake_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_GT1, &intel_sandybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_GT2, &intel_sandybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_GT2_PLUS, &intel_sandybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT1, &intel_sandybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT2, &intel_sandybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, &intel_sandybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_S_GT, &intel_sandybridge_info ), ++ ++ INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_M_GT1, &intel_ivybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_M_GT2, &intel_ivybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_D_GT1, &intel_ivybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_D_GT2, &intel_ivybridge_info ), ++ INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_S_GT1, &intel_ivybridge_info ), ++ ++ { 0, 0, 0 }, + }; + + void intel_detect_chipset(ScrnInfoPtr scrn, + struct pci_device *pci, + struct intel_chipset *chipset) + { +- uint32_t capid; +- +- switch (DEVICE_ID(pci)) { +- case PCI_CHIP_I810: +- chipset->name = "i810"; +- chipset->info = &intel_i81x_info; +- break; +- case PCI_CHIP_I810_DC100: +- chipset->name = "i810-dc100"; +- chipset->info = &intel_i81x_info; +- break; +- case PCI_CHIP_I810_E: +- chipset->name = "i810e"; +- chipset->info = &intel_i81x_info; +- break; +- case PCI_CHIP_I815: +- chipset->name = "i815"; +- chipset->info = &intel_i81x_info; +- break; +- case PCI_CHIP_I830_M: +- chipset->name = "830M"; +- chipset->info = &intel_i8xx_info; +- break; +- case PCI_CHIP_845_G: +- chipset->name = "845G"; +- chipset->info = &intel_i8xx_info; +- break; +- case PCI_CHIP_I854: +- chipset->name = "854"; +- chipset->info = &intel_i8xx_info; +- break; +- case PCI_CHIP_I855_GM: +- /* Check capid register to find the chipset variant */ +- pci_device_cfg_read_u32(pci, &capid, I85X_CAPID); +- chipset->variant = +- (capid >> I85X_VARIANT_SHIFT) & I85X_VARIANT_MASK; +- switch (chipset->variant) { +- case I855_GM: +- chipset->name = "855GM"; +- break; +- case I855_GME: +- chipset->name = "855GME"; +- break; +- case I852_GM: +- chipset->name = "852GM"; +- break; +- case I852_GME: +- chipset->name = "852GME"; +- break; +- default: +- xf86DrvMsg(scrn->scrnIndex, X_INFO, +- "Unknown 852GM/855GM variant: 0x%x)\n", +- chipset->variant); +- chipset->name = "852GM/855GM (unknown variant)"; +- break; ++ int i; ++ ++ chipset->info = chipset_info; ++ ++ for (i = 0; intel_chipsets[i].name != NULL; i++) { ++ if (DEVICE_ID(pci) == intel_chipsets[i].token) { ++ chipset->name = intel_chipsets[i].name; ++ break; ++ } ++ } ++ if (intel_chipsets[i].name == NULL) { ++ chipset->name = "unknown chipset"; + } +- chipset->info = &intel_i8xx_info; +- break; +- case PCI_CHIP_I865_G: +- chipset->name = "865G"; +- chipset->info = &intel_i8xx_info; +- break; +- case PCI_CHIP_I915_G: +- chipset->name = "915G"; +- chipset->info = &intel_i915_info; +- break; +- case PCI_CHIP_E7221_G: +- chipset->name = "E7221 (i915)"; +- chipset->info = &intel_i915_info; +- break; +- case PCI_CHIP_I915_GM: +- chipset->name = "915GM"; +- chipset->info = &intel_i915_info; +- break; +- case PCI_CHIP_I945_G: +- chipset->name = "945G"; +- chipset->info = &intel_i915_info; +- break; +- case PCI_CHIP_I945_GM: +- chipset->name = "945GM"; +- chipset->info = &intel_i915_info; +- break; +- case PCI_CHIP_I945_GME: +- chipset->name = "945GME"; +- chipset->info = &intel_i915_info; +- break; +- case PCI_CHIP_PINEVIEW_M: +- chipset->name = "Pineview GM"; +- chipset->info = &intel_g33_info; +- break; +- case PCI_CHIP_PINEVIEW_G: +- chipset->name = "Pineview G"; +- chipset->info = &intel_g33_info; +- break; +- case PCI_CHIP_I965_G: +- chipset->name = "965G"; +- chipset->info = &intel_i965_info; +- break; +- case PCI_CHIP_G35_G: +- chipset->name = "G35"; +- chipset->info = &intel_i965_info; +- break; +- case PCI_CHIP_I965_Q: +- chipset->name = "965Q"; +- chipset->info = &intel_i965_info; +- break; +- case PCI_CHIP_I946_GZ: +- chipset->name = "946GZ"; +- chipset->info = &intel_i965_info; +- break; +- case PCI_CHIP_I965_GM: +- chipset->name = "965GM"; +- chipset->info = &intel_i965_info; +- break; +- case PCI_CHIP_I965_GME: +- chipset->name = "965GME/GLE"; +- chipset->info = &intel_i965_info; +- break; +- case PCI_CHIP_G33_G: +- chipset->name = "G33"; +- chipset->info = &intel_g33_info; +- break; +- case PCI_CHIP_Q35_G: +- chipset->name = "Q35"; +- chipset->info = &intel_g33_info; +- break; +- case PCI_CHIP_Q33_G: +- chipset->name = "Q33"; +- chipset->info = &intel_g33_info; +- break; +- case PCI_CHIP_GM45_GM: +- chipset->name = "GM45"; +- chipset->info = &intel_g4x_info; +- break; +- case PCI_CHIP_G45_E_G: +- chipset->name = "4 Series"; +- chipset->info = &intel_g4x_info; +- break; +- case PCI_CHIP_G45_G: +- chipset->name = "G45/G43"; +- chipset->info = &intel_g4x_info; +- break; +- case PCI_CHIP_Q45_G: +- chipset->name = "Q45/Q43"; +- chipset->info = &intel_g4x_info; +- break; +- case PCI_CHIP_G41_G: +- chipset->name = "G41"; +- chipset->info = &intel_g4x_info; +- break; +- case PCI_CHIP_B43_G: +- chipset->name = "B43"; +- chipset->info = &intel_g4x_info; +- break; +- case PCI_CHIP_IRONLAKE_D_G: +- chipset->name = "Clarkdale"; +- chipset->info = &intel_ironlake_info; +- break; +- case PCI_CHIP_IRONLAKE_M_G: +- chipset->name = "Arrandale"; +- chipset->info = &intel_ironlake_info; +- break; +- case PCI_CHIP_SANDYBRIDGE_GT1: +- case PCI_CHIP_SANDYBRIDGE_GT2: +- case PCI_CHIP_SANDYBRIDGE_GT2_PLUS: +- case PCI_CHIP_SANDYBRIDGE_M_GT1: +- case PCI_CHIP_SANDYBRIDGE_M_GT2: +- case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS: +- case PCI_CHIP_SANDYBRIDGE_S_GT: +- chipset->name = "Sandybridge"; +- chipset->info = &intel_sandybridge_info; +- break; +- default: +- chipset->name = "unknown chipset"; +- break; +- } +- +- xf86DrvMsg(scrn->scrnIndex, X_INFO, +- "Integrated Graphics Chipset: Intel(R) %s\n", chipset->name); ++ ++ xf86DrvMsg(scrn->scrnIndex, X_INFO, ++ "Integrated Graphics Chipset: Intel(R) %s\n", chipset->name); + } + + /* +@@ -404,30 +225,30 @@ void intel_detect_chipset(ScrnInfoPtr scrn, + */ + static void intel_identify(int flags) + { +- xf86PrintChipsets(INTEL_NAME, +- "Driver for Intel Integrated Graphics Chipsets", +- intel_chipsets); ++ xf86PrintChipsets(INTEL_NAME, ++ "Driver for Intel Integrated Graphics Chipsets", ++ intel_chipsets); + } + + static Bool intel_driver_func(ScrnInfoPtr pScrn, + xorgDriverFuncOp op, + pointer ptr) + { +- xorgHWFlags *flag; ++ xorgHWFlags *flag; + +- switch (op) { +- case GET_REQUIRED_HW_INTERFACES: +- flag = (CARD32*)ptr; ++ switch (op) { ++ case GET_REQUIRED_HW_INTERFACES: ++ flag = (CARD32*)ptr; + #ifdef KMS_ONLY +- (*flag) = 0; ++ (*flag) = 0; + #else +- (*flag) = HW_IO | HW_MMIO; ++ (*flag) = HW_IO | HW_MMIO; + #endif +- return TRUE; +- default: +- /* Unknown or deprecated function */ +- return FALSE; +- } ++ return TRUE; ++ default: ++ /* Unknown or deprecated function */ ++ return FALSE; ++ } + } + + static Bool has_kernel_mode_setting(struct pci_device *dev) +@@ -458,55 +279,65 @@ static Bool has_kernel_mode_setting(struct pci_device *dev) + * Setup the dispatch table for the rest of the driver functions. + * + */ +-static Bool intel_pci_probe (DriverPtr driver, +- int entity_num, +- struct pci_device *device, +- intptr_t match_data) ++static Bool intel_pci_probe(DriverPtr driver, ++ int entity_num, ++ struct pci_device *device, ++ intptr_t match_data) + { +- ScrnInfoPtr scrn; ++ ScrnInfoPtr scrn; ++ PciChipsets intel_pci_chipsets[ARRAY_SIZE(intel_chipsets)]; ++ int i; ++ ++ chipset_info = (void *)match_data; + +- if (!has_kernel_mode_setting(device)) { ++ if (!has_kernel_mode_setting(device)) { + #if KMS_ONLY +- return FALSE; ++ return FALSE; + #else +- switch (DEVICE_ID(device)) { +- case PCI_CHIP_I810: +- case PCI_CHIP_I810_DC100: +- case PCI_CHIP_I810_E: +- case PCI_CHIP_I815: +- break; +- default: +- return FALSE; +- } ++ switch (DEVICE_ID(device)) { ++ case PCI_CHIP_I810: ++ case PCI_CHIP_I810_DC100: ++ case PCI_CHIP_I810_E: ++ case PCI_CHIP_I815: ++ break; ++ default: ++ return FALSE; ++ } + #endif +- } ++ } + +- scrn = xf86ConfigPciEntity(NULL, 0, entity_num, intel_pci_chipsets, +- NULL, NULL, NULL, NULL, NULL); +- if (scrn != NULL) { +- scrn->driverVersion = INTEL_VERSION; +- scrn->driverName = INTEL_DRIVER_NAME; +- scrn->name = INTEL_NAME; +- scrn->Probe = NULL; ++ for (i = 0; i < ARRAY_SIZE(intel_chipsets); i++) { ++ intel_pci_chipsets[i].numChipset = intel_chipsets[i].token; ++ intel_pci_chipsets[i].PCIid = intel_chipsets[i].token; ++ intel_pci_chipsets[i].dummy = NULL; ++ } ++ ++ scrn = xf86ConfigPciEntity(NULL, 0, entity_num, intel_pci_chipsets, ++ NULL, NULL, NULL, NULL, NULL); ++ if (scrn != NULL) { ++ scrn->driverVersion = INTEL_VERSION; ++ scrn->driverName = INTEL_DRIVER_NAME; ++ scrn->name = INTEL_NAME; ++ scrn->Probe = NULL; + + #if KMS_ONLY +- intel_init_scrn(scrn); ++ intel_init_scrn(scrn); + #else +- switch (DEVICE_ID(device)) { +- case PCI_CHIP_I810: +- case PCI_CHIP_I810_DC100: +- case PCI_CHIP_I810_E: +- case PCI_CHIP_I815: +- lg_i810_init(scrn); +- break; +- +- default: +- intel_init_scrn(scrn); +- break; +- } ++ switch (DEVICE_ID(device)) { ++ case PCI_CHIP_I810: ++ case PCI_CHIP_I810_DC100: ++ case PCI_CHIP_I810_E: ++ case PCI_CHIP_I815: ++ lg_i810_init(scrn); ++ break; ++ ++ default: ++ intel_init_scrn(scrn); ++ break; ++ } + #endif +- } +- return scrn != NULL; ++ } ++ return scrn != NULL; + } + + #ifdef XFree86LOADER +@@ -514,16 +345,16 @@ static Bool intel_pci_probe (DriverPtr driver, + static MODULESETUPPROTO(intel_setup); + + static XF86ModuleVersionInfo intel_version = { +- "intel", +- MODULEVENDORSTRING, +- MODINFOSTRING1, +- MODINFOSTRING2, +- XORG_VERSION_CURRENT, +- INTEL_VERSION_MAJOR, INTEL_VERSION_MINOR, INTEL_VERSION_PATCH, +- ABI_CLASS_VIDEODRV, +- ABI_VIDEODRV_VERSION, +- MOD_CLASS_VIDEODRV, +- {0, 0, 0, 0} ++ "intel", ++ MODULEVENDORSTRING, ++ MODINFOSTRING1, ++ MODINFOSTRING2, ++ XORG_VERSION_CURRENT, ++ INTEL_VERSION_MAJOR, INTEL_VERSION_MINOR, INTEL_VERSION_PATCH, ++ ABI_CLASS_VIDEODRV, ++ ABI_VIDEODRV_VERSION, ++ MOD_CLASS_VIDEODRV, ++ {0, 0, 0, 0} + }; + + static const OptionInfoRec * +@@ -546,16 +377,16 @@ intel_available_options(int chipid, int busid) + } + + static DriverRec intel = { +- INTEL_VERSION, +- INTEL_DRIVER_NAME, +- intel_identify, +- NULL, +- intel_available_options, +- NULL, +- 0, +- intel_driver_func, +- intel_device_match, +- intel_pci_probe ++ INTEL_VERSION, ++ INTEL_DRIVER_NAME, ++ intel_identify, ++ NULL, ++ intel_available_options, ++ NULL, ++ 0, ++ intel_driver_func, ++ intel_device_match, ++ intel_pci_probe + }; + + static pointer intel_setup(pointer module, +@@ -563,24 +394,24 @@ static pointer intel_setup(pointer module, + int *errmaj, + int *errmin) + { +- static Bool setupDone = 0; +- +- /* This module should be loaded only once, but check to be sure. +- */ +- if (!setupDone) { +- setupDone = 1; +- xf86AddDriver(&intel, module, HaveDriverFuncs); +- +- /* +- * The return value must be non-NULL on success even though there +- * is no TearDownProc. +- */ +- return (pointer) 1; +- } else { +- if (errmaj) +- *errmaj = LDR_ONCEONLY; +- return NULL; +- } ++ static Bool setupDone = 0; ++ ++ /* This module should be loaded only once, but check to be sure. ++ */ ++ if (!setupDone) { ++ setupDone = 1; ++ xf86AddDriver(&intel, module, HaveDriverFuncs); ++ ++ /* ++ * The return value must be non-NULL on success even though there ++ * is no TearDownProc. ++ */ ++ return (pointer) 1; ++ } else { ++ if (errmaj) ++ *errmaj = LDR_ONCEONLY; ++ return NULL; ++ } + } + + _X_EXPORT XF86ModuleData intelModuleData = { &intel_version, intel_setup, NULL }; +diff --git a/src/intel_video.c b/src/intel_video.c +index 499614f..021ca5f 100644 +--- a/src/intel_video.c ++++ b/src/intel_video.c +@@ -1599,6 +1599,7 @@ I830PutImageTextured(ScrnInfoPtr scrn, + pixmap); + } + ++ intel_get_screen_private(scrn)->needs_flush = TRUE; + DamageDamageRegion(drawable, clipBoxes); + + return Success; diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index b48bbea7f..7448e3fb5 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 119887 2011-04-16 12:07:45Z andyrtr $ +# $Id: PKGBUILD 125806 2011-05-30 08:22:14Z jgc $ # Maintainer: Jan de Groot pkgbase=xorg-server pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel') -pkgver=1.10.1 +pkgver=1.10.2 pkgrel=1 arch=('i686' 'x86_64') license=('custom') @@ -11,18 +11,20 @@ url="http://xorg.freedesktop.org" makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util') options=('!libtool') source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 + git-fixes.patch bg-none-revert.patch - glx-pixmap-crash.patch xserver-1.10-pointer-barriers.patch xorg-redhat-die-ugly-pattern-die-die-die.patch + autoconfig-nvidia.patch xvfb-run xvfb-run.1 10-quirks.conf) -sha1sums=('59ada4c9a59f7f1eb4b68c359e9cd58272aa4809' +sha1sums=('fd831b3c6297d1a68830c602d767752d87b9ca54' + '6dd2bcd9d8b17d1a50ed8c15eb1cba480558e695' '629c6d8d52126eab81ee1b72a9e4209535f8cb81' - '19e7164dcf9814ad64231b50a46f651b0e68a27a' '1b95e91384a57d966428c7db98ed06f4cc562f91' '0efcdf61bde3c0cd813072b94e2b30ab922775b9' + 'f9328fd7bc931bb02c8909ecfcef35403de33782' 'c94f742d3f9cabf958ae58e4015d9dd185aabedc' '6838fc00ef4618c924a77e0fb03c05346080908a' '993798f3d22ad672d769dae5f48d1fa068d5578f') @@ -37,7 +39,12 @@ build() { # Patches from ~ajax/xserver xserver-next branch patch -Np1 -i "${srcdir}/bg-none-revert.patch" - patch -Np1 -i "${srcdir}/glx-pixmap-crash.patch" + + # Upstream fixes from 1.10 branch + patch -Np1 -i "${srcdir}/git-fixes.patch" + + # Use nouveau/nv/nvidia drivers for nvidia devices + patch -Np1 -i "${srcdir}/autoconfig-nvidia.patch" autoreconf ./configure --prefix=/usr \ diff --git a/extra/xorg-server/autoconfig-nvidia.patch b/extra/xorg-server/autoconfig-nvidia.patch new file mode 100644 index 000000000..c56586d54 --- /dev/null +++ b/extra/xorg-server/autoconfig-nvidia.patch @@ -0,0 +1,104 @@ +From a685b5cf34532cef96fc9b05f735088ac0c0c7ad Mon Sep 17 00:00:00 2001 +From: Fedora X Ninjas +Date: Tue, 16 Feb 2010 11:38:17 +1000 +Subject: [PATCH 08/17] autoconfig: select nouveau by default for NVIDIA GPUs + +Also, don't treat DRI setup failure as an error for nouveau. + +Modified by Archlinux: +Append nvidia driver to the list of prefered drivers +--- + glx/glxdri.c | 7 +++++-- + glx/glxdri2.c | 7 +++++-- + hw/xfree86/common/xf86AutoConfig.c | 19 ++++++++++++++++++- + 3 files changed, 28 insertions(+), 5 deletions(-) + +--- a/glx/glxdri.c ++++ b/glx/glxdri.c +@@ -978,6 +978,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) + const __DRIconfig **driConfigs; + const __DRIextension **extensions; + int i; ++ int from = X_ERROR; + + if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") || + !DRIQueryDirectRenderingCapable(pScreen, &isCapable) || +@@ -1057,7 +1058,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) + + screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (screen->driver == NULL) { +- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", ++ if (!strcmp(driverName, "nouveau")) ++ from = X_INFO; ++ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto handle_error; + } +@@ -1193,7 +1196,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) + + free(screen); + +- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); ++ LogMessage(from, "AIGLX: reverting to software rendering\n"); + + return NULL; + } +--- a/glx/glxdri2.c ++++ b/glx/glxdri2.c +@@ -708,6 +708,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) + const __DRIextension **extensions; + const __DRIconfig **driConfigs; + int i; ++ int from = X_ERROR; + + screen = calloc(1, sizeof *screen); + if (screen == NULL) +@@ -734,7 +735,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) + + screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (screen->driver == NULL) { +- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", ++ if (!strcmp(driverName, "nouveau")) ++ from = X_INFO; ++ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto handle_error; + } +@@ -826,7 +829,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) + + free(screen); + +- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); ++ LogMessage(from, "AIGLX: reverting to software rendering\n"); + + return NULL; + } +--- a/hw/xfree86/common/xf86pciBus.c ++++ b/hw/xfree86/common/xf86pciBus.c +@@ -1123,7 +1123,25 @@ videoPtrToDriverList(struct pci_device * + break; + case 0x102b: driverList[0] = "mga"; break; + case 0x10c8: driverList[0] = "neomagic"; break; +- case 0x10de: case 0x12d2: driverList[0] = "nv"; break; ++ case 0x10de: case 0x12d2: ++ switch (dev->device_id) { ++ /* NV1 */ ++ case 0x0008: ++ case 0x0009: ++ driverList[0] = "vesa"; ++ break; ++ /* NV3 */ ++ case 0x0018: ++ case 0x0019: ++ driverList[0] = "nv"; ++ break; ++ default: ++ driverList[0] = "nouveau"; ++ driverList[1] = "nv"; ++ driverList[2] = "nvidia"; ++ break; ++ } ++ break; + case 0x1106: driverList[0] = "openchrome"; break; + case 0x1b36: driverList[0] = "qxl"; break; + case 0x1163: driverList[0] = "rendition"; break; diff --git a/extra/xorg-server/git-fixes.patch b/extra/xorg-server/git-fixes.patch new file mode 100644 index 000000000..3eadd81ba --- /dev/null +++ b/extra/xorg-server/git-fixes.patch @@ -0,0 +1,318 @@ +From 613e0e9ef74c4542ed458200165adbcdfdf3cd17 Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston +Date: Wed, 13 Apr 2011 18:51:30 +0000 +Subject: Send events that were missing from RRSelectInput + +The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out +events corresponding to the event mask, if there have been changes to +CRTCs or outputs. Only screen events were being generated, however. + +Fixes http://bugs.freedesktop.org/21760 + +Signed-off-by: Federico Mena Quintero +Reviewd-by: Keith Packard +Signed-off-by: Keith Packard +(cherry picked from commit b2997431fd426ab318bc5dfd2cd43956d733ebec) +--- +diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c +index ac4d2ac..2135504 100644 +--- a/randr/rrdispatch.c ++++ b/randr/rrdispatch.c +@@ -146,7 +146,7 @@ ProcRRSelectInput (ClientPtr client) + /* + * Now see if the client needs an event + */ +- if (pScrPriv && (pRREvent->mask & RRScreenChangeNotifyMask)) ++ if (pScrPriv) + { + pTimes = &((RRTimesPtr) (pRRClient + 1))[pScreen->myNum]; + if (CompareTimeStamps (pTimes->setTime, +@@ -154,7 +154,35 @@ ProcRRSelectInput (ClientPtr client) + CompareTimeStamps (pTimes->configTime, + pScrPriv->lastConfigTime) != 0) + { +- RRDeliverScreenEvent (client, pWin, pScreen); ++ if (pRREvent->mask & RRScreenChangeNotifyMask) ++ { ++ RRDeliverScreenEvent (client, pWin, pScreen); ++ } ++ ++ if (pRREvent->mask & RRCrtcChangeNotifyMask) ++ { ++ int i; ++ ++ for (i = 0; i < pScrPriv->numCrtcs; i++) ++ { ++ RRDeliverCrtcEvent (client, pWin, pScrPriv->crtcs[i]); ++ } ++ } ++ ++ if (pRREvent->mask & RROutputChangeNotifyMask) ++ { ++ int i; ++ ++ for (i = 0; i < pScrPriv->numOutputs; i++) ++ { ++ RRDeliverOutputEvent (client, pWin, pScrPriv->outputs[i]); ++ } ++ } ++ ++ /* We don't check for RROutputPropertyNotifyMask, as randrproto.txt doesn't ++ * say if there ought to be notifications of changes to output properties ++ * if those changes occurred before the time RRSelectInput is called. ++ */ + } + } + } +-- +cgit v0.8.3-6-g21f6 +From 50b9d3142ff90af2f7fa35b7b1bf9e5a07723dbd Mon Sep 17 00:00:00 2001 +From: Aaron Plattner +Date: Tue, 24 May 2011 23:02:42 +0000 +Subject: randr: check rotated virtual size limits correctly + +Commit d1107918d4626268803b54033a07405122278e7f introduced checks to +the RandR path that cause RRSetScreenConfig requests to fail if the +size is too large. Unfortunately, when RandR 1.1 rotation is enabled +it compares the rotated screen dimensions to the unrotated limits, +which causes 90- and 270-degree rotation to fail unless your screen +happens to be square: + + X Error of failed request: BadValue (integer parameter out of range for operation) + Major opcode of failed request: 153 (RANDR) + Minor opcode of failed request: 2 (RRSetScreenConfig) + Value in failed request: 0x780 + Serial number of failed request: 14 + Current serial number in output stream: 14 + +Fix this by moving the check above the code that swaps the dimensions +based on the rotation. + +Signed-off-by: Aaron Plattner +Reviewed-by: Jeremy Huddleston +Tested-by: Robert Hooker +Tested-by: Kent Baxley +Signed-off-by: Keith Packard +(cherry picked from commit b6c7b9b2f39e970cedb6bc1e073f901e28cb0fa3) +--- +diff --git a/randr/rrscreen.c b/randr/rrscreen.c +index 1bc1a9e..da6d48d 100644 +--- a/randr/rrscreen.c ++++ b/randr/rrscreen.c +@@ -910,12 +910,6 @@ ProcRRSetScreenConfig (ClientPtr client) + */ + width = mode->mode.width; + height = mode->mode.height; +- if (rotation & (RR_Rotate_90|RR_Rotate_270)) +- { +- width = mode->mode.height; +- height = mode->mode.width; +- } +- + if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) { + client->errorValue = width; + free(pData); +@@ -927,6 +921,12 @@ ProcRRSetScreenConfig (ClientPtr client) + return BadValue; + } + ++ if (rotation & (RR_Rotate_90|RR_Rotate_270)) ++ { ++ width = mode->mode.height; ++ height = mode->mode.width; ++ } ++ + if (width != pScreen->width || height != pScreen->height) + { + int c; +-- +cgit v0.8.3-6-g21f6 +From 4bfb22e7667c4cd55da5e7a31af29ce5769ecc65 Mon Sep 17 00:00:00 2001 +From: Aaron Plattner +Date: Mon, 18 Apr 2011 15:23:48 +0000 +Subject: linux: Retry VT ioctls while errno == EINTR + +When the smart scheduler is enabled, the VT ioctls (particularly +VT_WAITACTIVE) can be interrupted by the smart scheduler's SIGALRMs. +Previously, this caused the server to immediately continue on to +ScreenInit, almost certainly causing a crash or failure because the X +server that owned the VT hadn't finished cleaning up. As of commit +7ee965a300c9eddcc1acacf9414cfe3e589222a8, it causes a FatalError +instead. + +Retrying the ioctl as long as it fails with errno == EINTR fixes the +problem and allows server regenerations to trigger VT switches that +actually succeed. + +Signed-off-by: Aaron Plattner +Reviewed-by: Peter Hutterer +Reviewed-by: Cyril Brulebois +Signed-off-by: Keith Packard +(cherry picked from commit 88c4622b594a1725d0cee86bc82ad640d241c520) +--- +diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c +index 9c71a42..77dfb2f 100644 +--- a/hw/xfree86/os-support/linux/lnx_init.c ++++ b/hw/xfree86/os-support/linux/lnx_init.c +@@ -62,17 +62,21 @@ drain_console(int fd, void *closure) + static void + switch_to(int vt, const char *from) + { +- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt) < 0) +- FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno)); ++ int ret; + +- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt) < 0) +- FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno)); ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt)); ++ if (ret < 0) ++ FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno)); ++ ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt)); ++ if (ret < 0) ++ FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno)); + } + + void + xf86OpenConsole(void) + { +- int i, fd = -1; ++ int i, fd = -1, ret; + struct vt_mode VT; + struct vt_stat vts; + MessageType from = X_PROBED; +@@ -107,17 +111,19 @@ xf86OpenConsole(void) + + if (ShareVTs) + { +- if (ioctl(fd, VT_GETSTATE, &vts) == 0) +- xf86Info.vtno = vts.v_active; +- else +- FatalError("xf86OpenConsole: Cannot find the current" +- " VT (%s)\n", strerror(errno)); ++ SYSCALL(ret = ioctl(fd, VT_GETSTATE, &vts)); ++ if (ret < 0) ++ FatalError("xf86OpenConsole: Cannot find the current" ++ " VT (%s)\n", strerror(errno)); ++ xf86Info.vtno = vts.v_active; + } else { +- if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || +- (xf86Info.vtno == -1)) +- FatalError("xf86OpenConsole: Cannot find a free VT: %s\n", +- strerror(errno)); +- } ++ SYSCALL(ret = ioctl(fd, VT_OPENQRY, &xf86Info.vtno)); ++ if (ret < 0) ++ FatalError("xf86OpenConsole: Cannot find a free VT: " ++ "%s\n", strerror(errno)); ++ if (xf86Info.vtno == -1) ++ FatalError("xf86OpenConsole: Cannot find a free VT\n"); ++ } + close(fd); + } + +@@ -159,7 +165,8 @@ xf86OpenConsole(void) + * Linux doesn't switch to an active vt after the last close of a vt, + * so we do this ourselves by remembering which is active now. + */ +- if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts) < 0) ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts)); ++ if (ret < 0) + xf86Msg(X_WARNING,"xf86OpenConsole: VT_GETSTATE failed: %s\n", + strerror(errno)); + else +@@ -171,7 +178,7 @@ xf86OpenConsole(void) + * Detach from the controlling tty to avoid char loss + */ + if ((i = open("/dev/tty",O_RDWR)) >= 0) { +- ioctl(i, TIOCNOTTY, 0); ++ SYSCALL(ioctl(i, TIOCNOTTY, 0)); + close(i); + } + } +@@ -186,9 +193,10 @@ xf86OpenConsole(void) + */ + switch_to(xf86Info.vtno, "xf86OpenConsole"); + +- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) +- FatalError("xf86OpenConsole: VT_GETMODE failed %s\n", +- strerror(errno)); ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT)); ++ if (ret < 0) ++ FatalError("xf86OpenConsole: VT_GETMODE failed %s\n", ++ strerror(errno)); + + signal(SIGUSR1, xf86VTRequest); + +@@ -196,20 +204,23 @@ xf86OpenConsole(void) + VT.relsig = SIGUSR1; + VT.acqsig = SIGUSR1; + +- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) +- FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed: %s\n", ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT)); ++ if (ret < 0) ++ FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed: %s\n", + strerror(errno)); +- +- if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) +- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n", +- strerror(errno)); ++ ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS)); ++ if (ret < 0) ++ FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n", ++ strerror(errno)); + + tcgetattr(xf86Info.consoleFd, &tty_attr); +- ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode); ++ SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode)); + +- if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0) +- FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", +- strerror(errno)); ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW)); ++ if (ret < 0) ++ FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", ++ strerror(errno)); + + nTty = tty_attr; + nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); +@@ -241,6 +252,7 @@ void + xf86CloseConsole(void) + { + struct vt_mode VT; ++ int ret; + + if (ShareVTs) { + close(xf86Info.consoleFd); +@@ -253,20 +265,23 @@ xf86CloseConsole(void) + }; + + /* Back to text mode ... */ +- if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT) < 0) ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT)); ++ if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n", + strerror(errno)); + +- ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode); ++ SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode)); + tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); + +- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT)); ++ if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n", + strerror(errno)); + else { + /* set dflt vt handling */ + VT.mode = VT_AUTO; +- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT)); ++ if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n", + strerror(errno)); + } +-- +cgit v0.8.3-6-g21f6 -- cgit v1.2.3-54-g00ecf