From d1bfef207c6695736de171fc604b68eab0c1f1cd Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Apr 2012 00:01:34 +0000 Subject: Tue Apr 17 00:01:34 UTC 2012 --- testing/calligra/PKGBUILD | 82 ++- testing/gdk-pixbuf2/PKGBUILD | 6 +- testing/gdk-pixbuf2/gdk-pixbuf2.install | 2 +- testing/gdm/PKGBUILD | 14 +- testing/gnome-applets/PKGBUILD | 36 ++ testing/gnome-applets/gnome-applets.install | 22 + testing/gnome-screensaver/PKGBUILD | 16 +- .../gnome-screensaver/gnome-screensaver.install | 2 +- ...man-s-solid-picture-support-for-r300-r600.patch | 571 +++++++++++++++++++++ ...man-s-solid-picture-support-for-evergreen.patch | 290 +++++++++++ ...poor-man-s-solid-picture-support-for-r100.patch | 182 +++++++ ...poor-man-s-solid-picture-support-for-r200.patch | 179 +++++++ testing/xf86-video-ati/PKGBUILD | 27 +- testing/xorg-server/10-quirks.conf | 10 + ...rlier_and_more_thoroughly_from_exaGlyphsV2.diff | 116 +++++ testing/xorg-server/PKGBUILD | 201 ++++++++ testing/xorg-server/autoconfig-nvidia.patch | 28 + testing/xorg-server/autoconfig-sis.patch | 21 + testing/xorg-server/git-fixes.patch | 161 ++++++ testing/xorg-server/xvfb-run | 180 +++++++ testing/xorg-server/xvfb-run.1 | 282 ++++++++++ 21 files changed, 2354 insertions(+), 74 deletions(-) create mode 100644 testing/gnome-applets/PKGBUILD create mode 100644 testing/gnome-applets/gnome-applets.install create mode 100644 testing/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch create mode 100644 testing/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch create mode 100644 testing/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch create mode 100644 testing/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch create mode 100644 testing/xorg-server/10-quirks.conf create mode 100644 testing/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff create mode 100644 testing/xorg-server/PKGBUILD create mode 100644 testing/xorg-server/autoconfig-nvidia.patch create mode 100644 testing/xorg-server/autoconfig-sis.patch create mode 100644 testing/xorg-server/git-fixes.patch create mode 100644 testing/xorg-server/xvfb-run create mode 100644 testing/xorg-server/xvfb-run.1 (limited to 'testing') diff --git a/testing/calligra/PKGBUILD b/testing/calligra/PKGBUILD index 89a5570fc..41c4c0ee5 100644 --- a/testing/calligra/PKGBUILD +++ b/testing/calligra/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 156147 2012-04-14 12:49:49Z andrea $ +# $Id: PKGBUILD 156197 2012-04-15 16:00:02Z andrea $ # Maintainer: Ronald van Haren # Maintainer: Andrea Scarpino @@ -20,17 +20,18 @@ pkgname=('calligra-filters' 'calligra-sheets' 'calligra-words' 'calligra-handbook' - 'calligra-thesaurus-doc' 'calligra-braindump' 'calligra-flow') pkgver=2.4.0 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') -url='http://www.calligra-suite.org' +url='http://www.calligra-suite.org/' license=('FDL1.2' 'GPL2' 'LGPL') -makedepends=('kdepimlibs' 'eigen2' 'freetds' 'kdegraphics-okular' 'libgsf' - 'libwpd' 'libwpg' 'pstoedit' 'glew' 'gsl' 'cmake' 'automoc4' - 'boost' 'libkdcraw' 'libpqxx' 'fftw' 'opengtl' 'lcms2') +makedepends=('cmake' 'automoc4' 'boost ' 'eigen2' + 'kdepimlibs' 'libpqxx' 'freetds' 'xbase' + 'kdegraphics-okular' 'gsl' 'kdeedu-marble' + 'libwpd' 'libwpg' 'pstoedit' 'glew' + 'fftw' 'opengtl' 'lcms2' 'libkdcraw' 'wv2') groups=('calligra') source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2" 'do-not-build-hancomword.patch') @@ -46,24 +47,16 @@ build() { cd build cmake ../${pkgbase}-${pkgver} \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_active=OFF \ -DBUILD_mobile=OFF \ - -DBUILD_mysql=OFF \ - -DKDCRAW_LOCAL_FOUND=/usr/lib/libkdcraw.so \ - -DWITH_Marble=OFF \ -DIHAVEPATCHEDQT=1 make } package_calligra-filters() { pkgdesc="Filters for the Calligra office suite" - optdepends=('libgsf: Microsoft Word document importer' - 'libwpd: WordPerfect document importer' - 'libwpg: Corel WordPerfect Graphics image importer' - 'pstoedit: Karbon EPS import filter' - 'libkdcraw: support for raw images') + optdepends=('libwpg: Corel WordPerfect Graphics image importer') conflicts=('koffice-filters') replaces=('koffice-filters') install=calligra-filters.install @@ -94,9 +87,10 @@ package_calligra-libs() { package_calligra-plugins() { pkgdesc="Plugins for the Calligra office suite" - depends=('calligra-libs') + depends=('calligra-libs' 'calligra-filters') + optdepends=('kdeedu-marble: map shape for Calligra') conflicts=('koffice-plugins' 'koffice-kchart') - replaces=('koffice-plugins' 'koffice-kchart') + replaces=('koffice-plugins' 'koffice-kchart' 'koffice-kformula') cd "${srcdir}"/build/plugins make DESTDIR="${pkgdir}" install @@ -104,7 +98,6 @@ package_calligra-plugins() { package_calligra-pics() { pkgdesc="Icons for the Calligra office suite" - depends=('calligra-libs') conflicts=('koffice-pics') replaces=('koffice-pics') install=calligra.install @@ -143,13 +136,11 @@ package_calligra-tools() { make DESTDIR="${pkgdir}" install } -#### package common files done ##### - -#### package apps and their docs ##### - package_calligra-karbon() { pkgdesc="Create scalable vector drawings" - depends=('calligra-libs' 'calligra-templates') + depends=('calligra-libs' 'calligra-templates' 'kdebase-runtime') + optdepends=('calligra-filters: import/export filters' + 'calligra-tools: extra calligra tools') conflicts=('koffice-karbon' 'koffice-karbon-doc' 'calligra-karbon-doc') replaces=('koffice-karbon' 'koffice-karbon-doc' 'calligra-karbon-doc') install=calligra-karbon.install @@ -161,6 +152,13 @@ package_calligra-karbon() { package_calligra-kexi() { pkgdesc="Develop desktop database applications" depends=('calligra-libs' 'calligra-templates') + optdepends=('libmysqlclient: MySQL driver' + 'libpqxx: PostgreSQL driver' + 'freetds: Sybase & MS SQL driver' + 'xbase: XBase driver' + 'calligra-sheets: Spreadsheet-to-Kexi-table import plugin' + 'kdeedu-marble: map form widget' + 'calligra-plugins: extra calligra plugins') conflicts=('koffice-kexi' 'koffice-kexi-doc' 'calligra-kexi-doc') replaces=('koffice-kexi' 'koffice-kexi-doc' 'calligra-kexi-doc') install=calligra-kexi.install @@ -192,8 +190,8 @@ package_calligra-plan() { package_calligra-stage() { pkgdesc="Write presentation documents" - depends=('calligra-libs' 'calligra-templates') - optdepends=('calligra-filters: import/export filters') + depends=('calligra-libs' 'calligra-templates' 'kdebase-runtime') + optdepends=('calligra-plugins: extra calligra plugins') conflicts=('koffice-kpresenter' 'koffice-kpresenter-doc' 'calligra-stage-doc') replaces=('koffice-kpresenter' 'koffice-kpresenter-doc' 'calligra-stage-doc') install=calligra-stage.install @@ -204,9 +202,8 @@ package_calligra-stage() { package_calligra-krita() { pkgdesc="Edit and paint images" - depends=('calligra-libs' 'calligra-templates' 'calligra-plugins' 'glew' - 'qimageblitz' 'poppler-qt' 'openexr' 'opengtl') - optdepends=('calligra-filters: import/export filters') + depends=('calligra-templates' 'calligra-plugins' 'kdebase-runtime' + 'qimageblitz' 'poppler-qt' 'opengtl' 'glew' 'libkdcraw' 'fftw') conflicts=('koffice-krita' 'calligra-krita-doc') replaces=('koffice-krita' 'calligra-krita-doc') install=calligra-krita.install @@ -217,8 +214,10 @@ package_calligra-krita() { package_calligra-sheets() { pkgdesc="Write spreadsheet documents" - depends=('calligra-libs' 'calligra-templates' 'calligra-plugins' 'gsl') - optdepends=('calligra-filters: import/export filters') + depends=('calligra-templates' 'calligra-libs' 'gsl' 'kdebase-runtime') + optdepends=('calligra-filters: import/export filters' + 'calligra-plugins: extra calligra plugins' + 'calligra-tools: extra calligra tools') conflicts=('koffice-kspread' 'koffice-kspread-doc' 'calligra-tables-doc' 'calligra-tables') replaces=('koffice-kspread' 'koffice-kspread-doc' 'calligra-tables-doc' 'calligra-tables') install=calligra-sheets.install @@ -229,9 +228,9 @@ package_calligra-sheets() { package_calligra-words() { pkgdesc="Word Processor" - depends=('calligra-libs' 'calligra-templates' 'calligra-plugins' 'calligra-pics' - 'calligra-kounavail' 'kdegraphics-okular') - optdepends=('calligra-filters: import/export filters') + depends=('calligra-templates' 'calligra-pics' 'calligra-kounavail' + 'calligra-plugins' 'kdegraphics-okular') + optdepends=('calligra-tools: extra calligra tools') conflicts=('koffice-kword') replaces=('koffice-kword') install=calligra-words.install @@ -249,17 +248,9 @@ package_calligra-handbook() { make DESTDIR="${pkgdir}" install } -package_calligra-thesaurus-doc() { - pkgdesc="Documentation for Thesaurus" - conflicts=('koffice-thesaurus-doc') - replaces=('koffice-thesaurus-doc') - - cd "${srcdir}"/build/doc/thesaurus - make DESTDIR="${pkgdir}" install -} - package_calligra-braindump() { pkgdesc="Notes and idea gathering" + depends=('calligra-libs' 'kdebase-runtime') install=calligra-braindump.install cd "${srcdir}"/build/braindump @@ -268,12 +259,11 @@ package_calligra-braindump() { package_calligra-flow() { pkgdesc="Flowchart & Diagram Editing" - install=calligra-flow.install + depends=('calligra-libs' 'kdebase-runtime') conflicts=('calligra-flow-doc') replaces=('calligra-flow-doc') + install=calligra-flow.install cd "${srcdir}"/build/flow make DESTDIR="${pkgdir}" install } - -##### package apps done ##### diff --git a/testing/gdk-pixbuf2/PKGBUILD b/testing/gdk-pixbuf2/PKGBUILD index e65888711..adf34cb4c 100644 --- a/testing/gdk-pixbuf2/PKGBUILD +++ b/testing/gdk-pixbuf2/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 155074 2012-04-01 11:32:10Z heftig $ +# $Id: PKGBUILD 156170 2012-04-15 07:56:15Z ibiru $ # Maintainer: Ionut Biru pkgname=gdk-pixbuf2 -pkgver=2.26.0 +pkgver=2.26.1 pkgrel=1 pkgdesc="An image loading library" arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ makedepends=('gtk-doc' 'gobject-introspection') options=('!libtool') install=gdk-pixbuf2.install source=(http://download.gnome.org/sources/gdk-pixbuf/${pkgver%.*}/gdk-pixbuf-$pkgver.tar.xz) -sha256sums=('a5028d3a33710cbb6c6264bc561b6e252b37f067dff7b5b52473621e064f254d') +sha256sums=('a60af12b58d9cc15ba4c680c6730ce5d38e8d664af1d575a379385b94b4ec7ba') build() { cd "gdk-pixbuf-$pkgver" diff --git a/testing/gdk-pixbuf2/gdk-pixbuf2.install b/testing/gdk-pixbuf2/gdk-pixbuf2.install index 9a26e38dc..f04c0967a 100644 --- a/testing/gdk-pixbuf2/gdk-pixbuf2.install +++ b/testing/gdk-pixbuf2/gdk-pixbuf2.install @@ -1,5 +1,5 @@ post_install() { - /usr/bin/gdk-pixbuf-query-loaders --update-cache + gdk-pixbuf-query-loaders --update-cache } post_upgrade() { diff --git a/testing/gdm/PKGBUILD b/testing/gdm/PKGBUILD index 5fab71d9c..2df092e0b 100644 --- a/testing/gdm/PKGBUILD +++ b/testing/gdm/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 155078 2012-04-01 11:32:19Z heftig $ +# $Id: PKGBUILD 156172 2012-04-15 08:17:07Z ibiru $ # Maintainer: Jan de Groot pkgname=gdm -pkgver=3.4.0.1 +pkgver=3.4.1 pkgrel=1 pkgdesc="Gnome Display Manager (a reimplementation of xdm)" arch=('i686' 'x86_64') @@ -17,12 +17,12 @@ makedepends=('intltool' 'gnome-doc-utils' 'xorg-server' 'gobject-introspection') optdepends=('gnome-shell: new login interface' 'fprintd: fingerprint authentication') install=gdm.install -source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz fix_external_program_directories.patch gdm-vt-allocation-hack.patch gdm gdm-autologin.pam gdm-fingerprint.pam gdm.pam gdm-password.pam gdm-smartcard.pam gdm-welcome.pam) -sha256sums=('08686e32f35f65fc5578b48db802fc5e5ca4ca3c3adbbe0d2488ddc1c6f279cd' +sha256sums=('6292968dff5fc89877b5e1aaa3c7d1484dd3ed2d4f388e935841d053439be665' 'f68600ccf80f475deb417d58ab3306c4a1ba4622688e2901996c8549c85a9ee6' '3c8b588d4af08d94dc93bcd5e4c2a983c3f4fbbbe40833bceac2a1df4f1e8215' '272c08d8e8b50bf424d0705ac864d4c18c47ec4f6893b1af732c2efbc86c9550' @@ -34,7 +34,7 @@ sha256sums=('08686e32f35f65fc5578b48db802fc5e5ca4ca3c3adbbe0d2488ddc1c6f279cd' '39bf3824cc505043dc3136356da16dab9df9f369f1077435a324be2ac16cf834') build() { - cd "$srcdir/$pkgname-$pkgver" + cd "$pkgname-$pkgver" patch -Np1 -i "$srcdir/fix_external_program_directories.patch" patch -Np1 -i "$srcdir/gdm-vt-allocation-hack.patch" @@ -52,14 +52,14 @@ build() { } package() { - cd "$srcdir/$pkgname-$pkgver" + cd "$pkgname-$pkgver" make DESTDIR="$pkgdir" install for i in gdm-autologin.pam gdm-fingerprint.pam gdm.pam gdm-password.pam gdm-smartcard.pam gdm-welcome.pam;do install -m644 "$srcdir/$i" "$pkgdir/etc/pam.d/${i%.pam}" done - install -Dm755 "${srcdir}/gdm" "${pkgdir}/etc/rc.d/gdm" + install -Dm755 "$srcdir/gdm" "$pkgdir/etc/rc.d/gdm" chmod 1770 "$pkgdir/var/log/gdm" chmod 700 "$pkgdir/var/lib/gdm/.config/dconf" diff --git a/testing/gnome-applets/PKGBUILD b/testing/gnome-applets/PKGBUILD new file mode 100644 index 000000000..d7cff625a --- /dev/null +++ b/testing/gnome-applets/PKGBUILD @@ -0,0 +1,36 @@ +# $Id: PKGBUILD 156196 2012-04-15 15:56:32Z ibiru $ +# Maintainer: Jan de Groot + +pkgname=gnome-applets +pkgver=3.4.1 +pkgrel=1 +pkgdesc="GNOME Applets" +arch=(i686 x86_64) +license=('GPL') +depends=('gnome-panel' 'libgtop' 'gucharmap' 'libnotify' 'cpufrequtils') +makedepends=('gnome-doc-utils' 'intltool' 'gnome-settings-daemon' 'networkmanager') +options=(!emptydirs) +url="http://www.gnome.org" +groups=(gnome) +install=gnome-applets.install +source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('ec5487eb81fb29851b6336de94a329f5623e73830d61022e0e20fe3d038a415e') + +build() { + cd "$pkgname-$pkgver" + PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ + --sysconfdir=/etc --libexecdir=/usr/lib/gnome-applets \ + --localstatedir=/var --disable-static \ + --disable-scrollkeeper --disable-schemas-install \ + --without-hal + make +} + +package() { + cd "$pkgname-$pkgver" + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install + + install -m755 -d "$pkgdir/usr/share/gconf/schemas" + gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain gnome-applets-3.0 "$pkgdir"/etc/gconf/schemas/*.schemas + rm -f "$pkgdir"/etc/gconf/schemas/*.schemas +} diff --git a/testing/gnome-applets/gnome-applets.install b/testing/gnome-applets/gnome-applets.install new file mode 100644 index 000000000..dd9c34269 --- /dev/null +++ b/testing/gnome-applets/gnome-applets.install @@ -0,0 +1,22 @@ +pkgname=gnome-applets + +post_install() { + usr/sbin/gconfpkg --install ${pkgname} + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +pre_upgrade() { + pre_remove $1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall ${pkgname} +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} diff --git a/testing/gnome-screensaver/PKGBUILD b/testing/gnome-screensaver/PKGBUILD index f840750c0..9652a0c16 100644 --- a/testing/gnome-screensaver/PKGBUILD +++ b/testing/gnome-screensaver/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 155135 2012-04-01 11:33:44Z heftig $ +# $Id: PKGBUILD 156174 2012-04-15 08:25:54Z ibiru $ # Maintainer: Jan Alexander Steffens (heftig) # Contributor: Jan de Groot pkgname=gnome-screensaver -pkgver=3.4.0 +pkgver=3.4.1 pkgrel=1 pkgdesc="Screensaver designed to integrate well with the GNOME desktop." arch=('i686' 'x86_64') @@ -15,13 +15,13 @@ makedepends=('pkgconfig' 'intltool' 'libxss') groups=('gnome') options=(!emptydirs) install=gnome-screensaver.install -source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz gnome-screensaver.pam) -sha256sums=('8d73e687f41975d66ee1fa56986d901a0bbdf4094f429cdbbed4a19016a38974' +sha256sums=('d54a253f826ff6cd48eba53724339896a6dea39029848b6a8d5972c8e162069b' 'c19870c4f2d6e91ba0eea2603753a74e0c5c82ff5fa3cacb1198027a38d0a6cb') build() { - cd ${pkgname}-${pkgver} + cd $pkgname-$pkgver ./configure --prefix=/usr --sysconfdir=/etc \ --libexecdir=/usr/lib/gnome-screensaver \ --localstatedir=/var \ @@ -31,7 +31,7 @@ build() { } package() { - cd ${pkgname}-${pkgver} - make DESTDIR="${pkgdir}" install - install -Dm644 "${srcdir}/gnome-screensaver.pam" "${pkgdir}/etc/pam.d/gnome-screensaver" + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -Dm644 "$srcdir/gnome-screensaver.pam" "$pkgdir/etc/pam.d/gnome-screensaver" } diff --git a/testing/gnome-screensaver/gnome-screensaver.install b/testing/gnome-screensaver/gnome-screensaver.install index 3b0e06046..d1a42c6ce 100644 --- a/testing/gnome-screensaver/gnome-screensaver.install +++ b/testing/gnome-screensaver/gnome-screensaver.install @@ -2,6 +2,6 @@ pkgname=gnome-screensaver pre_upgrade() { if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then - usr/sbin/gconfpkg --uninstall ${pkgname} + gconfpkg --uninstall ${pkgname} fi } diff --git a/testing/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch b/testing/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch new file mode 100644 index 000000000..bcfbf94db --- /dev/null +++ b/testing/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch @@ -0,0 +1,571 @@ +From 837149c63929d7d5a8ef6f8204d396f8e6d5acd7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= +Date: Fri, 13 Apr 2012 11:12:51 +0200 +Subject: [PATCH 1/4] Poor man's acceleration of solid pictures for R3xx-R7xx + +The patch below implements basic acceleration of solid pictures via +scratch 1x1 pixmaps. It seems to at least alleviate some of the +corruption and performance issues exposed by Cairo 1.12, and should also +improve performance for other toolkits/apps using solid pictures. + +If there are no objections to this approach, maybe someone else can beat +me to extending this for Evergreen+ and R1/2xx. +--- + src/r600_exa.c | 160 ++++++++++++++++++++++++++-------------------- + src/radeon_exa_render.c | 115 ++++++++++++++++++++-------------- + src/radeon_exa_shared.c | 19 ++++++ + src/radeon_exa_shared.h | 1 + + 4 files changed, 179 insertions(+), 116 deletions(-) + +diff --git a/src/r600_exa.c b/src/r600_exa.c +index e1eb62f..c3ae553 100644 +--- a/src/r600_exa.c ++++ b/src/r600_exa.c +@@ -901,17 +901,8 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict, + int op, + int unit) + { +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; + unsigned int i; +- int max_tex_w, max_tex_h; +- +- max_tex_w = 8192; +- max_tex_h = 8192; +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) { + if (R600TexFormats[i].fmt == pPict->format) +@@ -951,9 +942,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + unsigned int i; + tex_resource_t tex_res; + tex_sampler_t tex_samp; +@@ -969,9 +958,16 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + } + + /* Texture */ ++ if (pPict->pDrawable) { ++ tex_res.w = pPict->pDrawable->width; ++ tex_res.h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ tex_res.w = 1; ++ tex_res.h = 1; ++ repeatType = RepeatNormal; ++ } + tex_res.id = unit; +- tex_res.w = w; +- tex_res.h = h; + tex_res.pitch = accel_state->src_obj[unit].pitch; + tex_res.depth = 0; + tex_res.dim = SQ_TEX_DIM_2D; +@@ -1170,24 +1166,24 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, + vs_alu_consts[0] = xFixedToFloat(pPict->transform->matrix[0][0]); + vs_alu_consts[1] = xFixedToFloat(pPict->transform->matrix[0][1]); + vs_alu_consts[2] = xFixedToFloat(pPict->transform->matrix[0][2]); +- vs_alu_consts[3] = 1.0 / w; ++ vs_alu_consts[3] = 1.0 / tex_res.w; + + vs_alu_consts[4] = xFixedToFloat(pPict->transform->matrix[1][0]); + vs_alu_consts[5] = xFixedToFloat(pPict->transform->matrix[1][1]); + vs_alu_consts[6] = xFixedToFloat(pPict->transform->matrix[1][2]); +- vs_alu_consts[7] = 1.0 / h; ++ vs_alu_consts[7] = 1.0 / tex_res.h; + } else { + accel_state->is_transform[unit] = FALSE; + + vs_alu_consts[0] = 1.0; + vs_alu_consts[1] = 0.0; + vs_alu_consts[2] = 0.0; +- vs_alu_consts[3] = 1.0 / w; ++ vs_alu_consts[3] = 1.0 / tex_res.w; + + vs_alu_consts[4] = 0.0; + vs_alu_consts[5] = 1.0; + vs_alu_consts[6] = 0.0; +- vs_alu_consts[7] = 1.0 / h; ++ vs_alu_consts[7] = 1.0 / tex_res.h; + } + + /* VS alu constants */ +@@ -1202,33 +1198,30 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + { + uint32_t tmp1; + PixmapPtr pSrcPixmap, pDstPixmap; +- int max_tex_w, max_tex_h, max_dst_w, max_dst_h; + + /* Check for unsupported compositing operations. */ + if (op >= (int) (sizeof(R600BlendOp) / sizeof(R600BlendOp[0]))) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); + +- max_tex_w = 8192; +- max_tex_h = 8192; +- max_dst_w = 8192; +- max_dst_h = 8192; ++ if (pSrcPixmap->drawable.width >= 8192 || ++ pSrcPixmap->drawable.height >= 8192) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } + +- if (pSrcPixmap->drawable.width >= max_tex_w || +- pSrcPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } ++ if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) ++ return FALSE; ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + +- if (pDstPixmap->drawable.width >= max_dst_w || +- pDstPixmap->drawable.height >= max_dst_h) { ++ if (pDstPixmap->drawable.width >= 8192 || ++ pDstPixmap->drawable.height >= 8192) { + RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", + pDstPixmap->drawable.width, + pDstPixmap->drawable.height)); +@@ -1237,38 +1230,35 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); +- +- if (pMaskPixmap->drawable.width >= max_tex_w || +- pMaskPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width >= 8192 || ++ pMaskPixmap->drawable.height >= 8192) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } + +- if (pMaskPicture->componentAlpha) { +- /* Check if it's component alpha that relies on a source alpha and +- * on the source value. We can only get one of those into the +- * single source value that we get to blend with. +- */ +- if (R600BlendOp[op].src_alpha && +- (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != +- (BLEND_ZERO << COLOR_SRCBLEND_shift)) { +- RADEON_FALLBACK(("Component alpha not supported with source " +- "alpha and source value blending.\n")); ++ if (pMaskPicture->componentAlpha) { ++ /* Check if it's component alpha that relies on a source alpha and ++ * on the source value. We can only get one of those into the ++ * single source value that we get to blend with. ++ */ ++ if (R600BlendOp[op].src_alpha && ++ (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != ++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) { ++ RADEON_FALLBACK(("Component alpha not supported with source " ++ "alpha and source value blending.\n")); ++ } + } +- } + +- if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) +- return FALSE; ++ if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) ++ return FALSE; ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + } + +- if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) +- return FALSE; +- + if (!R600GetDestFormat(pDstPicture, &tmp1)) + return FALSE; + +@@ -1280,7 +1270,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; + uint32_t dst_format; +@@ -1288,15 +1279,21 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + shader_config_t vs_conf, ps_conf; + struct r600_accel_object src_obj, mask_obj, dst_obj; + +- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8) ++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) + return FALSE; + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + #if defined(XF86DRM_MODE) + if (info->cs) { + src_obj.offset = 0; + dst_obj.offset = 0; +- src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.bo = radeon_get_pixmap_bo(pDst); ++ src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); + src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); + dst_obj.surface = radeon_get_pixmap_surface(pDst); +@@ -1322,7 +1319,16 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + dst_obj.bpp = pDst->drawable.bitsPerPixel; + dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; + +- if (pMask) { ++ if (pMaskPicture) { ++ if (!pMask) { ++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + #if defined(XF86DRM_MODE) + if (info->cs) { + mask_obj.offset = 0; +@@ -1509,11 +1515,9 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void R600DoneComposite(PixmapPtr pDst) ++static void R600FinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, ++ struct radeon_accel_state *accel_state) + { +- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; +- RADEONInfoPtr info = RADEONPTR(pScrn); +- struct radeon_accel_state *accel_state = info->accel_state; + int vtx_size; + + if (accel_state->vsync) +@@ -1527,6 +1531,22 @@ static void R600DoneComposite(PixmapPtr pDst) + r600_finish_op(pScrn, vtx_size); + } + ++static void R600DoneComposite(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ RADEONInfoPtr info = RADEONPTR(pScrn); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ R600FinishComposite(pScrn, pDst, accel_state); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} ++ + static void R600Composite(PixmapPtr pDst, + int srcX, int srcY, + int maskX, int maskY, +@@ -1543,7 +1563,7 @@ static void R600Composite(PixmapPtr pDst, + + #ifdef XF86DRM_MODE + if (info->cs && CS_FULL(info->cs)) { +- R600DoneComposite(info->accel_state->dst_pix); ++ R600FinishComposite(pScrn, pDst, info->accel_state); + radeon_cs_flush_indirect(pScrn); + R600PrepareComposite(info->accel_state->composite_op, + info->accel_state->src_pic, +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index e5c231f..b6cc9e4 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -299,8 +299,8 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict, + if (repeatType == RepeatNormal || repeatType == RepeatReflect) { + Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix); + +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; ++ int w = pPict->pDrawable ? pPict->pDrawable->width : 1; ++ int h = pPict->pDrawable ? pPict->pDrawable->height : 1; + + if (pPict->transform) { + if (badPitch) +@@ -1112,23 +1112,8 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, + ScreenPtr pScreen = pDstPict->pDrawable->pScreen; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); +- + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; +- int max_tex_w, max_tex_h; +- +- if (is_r500) { +- max_tex_w = 4096; +- max_tex_h = 4096; +- } else { +- max_tex_w = 2048; +- max_tex_h = 2048; +- } +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(R300TexFormats) / sizeof(R300TexFormats[0]); i++) + { +@@ -1139,7 +1124,7 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) { ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) { + if (info->cs) { + struct radeon_exa_pixmap_priv *driver_priv; + PixmapPtr pPix; +@@ -1181,15 +1166,23 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat0, txformat1, txoffset, txpitch, us_format = 0; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; ++ int w, h; + int i, pixel_shift, out_size = 6; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + + TRACE; + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ + txpitch = exaGetPixmapPitch(pPix); + txoffset = 0; + +@@ -1394,11 +1387,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- + if (IS_R500_3D) { + max_tex_w = 4096; + max_tex_h = 4096; +@@ -1416,13 +1404,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + } + } + +- if (pSrcPixmap->drawable.width > max_tex_w || +- pSrcPixmap->drawable.height > max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > max_dst_w || +@@ -1432,20 +1413,32 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > max_tex_w || ++ pSrcPixmap->drawable.height > max_tex_h) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); +- +- if (pMaskPixmap->drawable.width > max_tex_w || +- pMaskPixmap->drawable.height > max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > max_tex_w || ++ pMaskPixmap->drawable.height > max_tex_h) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -1479,7 +1472,8 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch; + uint32_t txenable, colorpitch; + uint32_t blendcntl, output_fmt; +@@ -1508,9 +1502,24 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, TRUE, FALSE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +@@ -2132,7 +2141,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) ++static void FUNC_NAME(RadeonFinishComposite)(PixmapPtr pDst) + { + RINFO_FROM_SCREEN(pDst->drawable.pScreen); + ACCEL_PREAMBLE(); +@@ -2179,6 +2188,20 @@ static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) + LEAVE_DRAW(0); + } + ++static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ FUNC_NAME(RadeonFinishComposite)(pDst); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} + + #ifdef ACCEL_CP + +@@ -2257,7 +2280,7 @@ static void FUNC_NAME(RadeonCompositeTile)(ScrnInfoPtr pScrn, + if ((info->cs && CS_FULL(info->cs)) || + (!info->cs && (info->cp->indirectBuffer->used + 4 * 32) > + info->cp->indirectBuffer->total)) { +- FUNC_NAME(RadeonDoneComposite)(info->accel_state->dst_pix); ++ FUNC_NAME(RadeonFinishComposite)(info->accel_state->dst_pix); + if (info->cs) + radeon_cs_flush_indirect(pScrn); + else +diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c +index be1d2fa..28dc335 100644 +--- a/src/radeon_exa_shared.c ++++ b/src/radeon_exa_shared.c +@@ -126,6 +126,25 @@ Bool RADEONCheckBPP(int bpp) + return FALSE; + } + ++PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid) ++{ ++ PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0); ++ struct radeon_bo *bo; ++ ++ exaMoveInPixmap(pPix); ++ bo = radeon_get_pixmap_bo(pPix); ++ ++ if (radeon_bo_map(bo, 1)) { ++ pScreen->DestroyPixmap(pPix); ++ return NULL; ++ } ++ ++ memcpy(bo->ptr, &solid, 4); ++ radeon_bo_unmap(bo); ++ ++ return pPix; ++} ++ + static Bool radeon_vb_get(ScrnInfoPtr pScrn) + { + RADEONInfoPtr info = RADEONPTR(pScrn); +diff --git a/src/radeon_exa_shared.h b/src/radeon_exa_shared.h +index 7b8b5ca..60a1045 100644 +--- a/src/radeon_exa_shared.h ++++ b/src/radeon_exa_shared.h +@@ -40,6 +40,7 @@ extern void RADEONVlineHelperClear(ScrnInfoPtr pScrn); + extern void RADEONVlineHelperSet(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); + extern Bool RADEONValidPM(uint32_t pm, int bpp); + extern Bool RADEONCheckBPP(int bpp); ++extern PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid); + + #define RADEON_TRACE_FALL 0 + #define RADEON_TRACE_DRAW 0 +-- +1.7.7.5 + diff --git a/testing/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch b/testing/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch new file mode 100644 index 000000000..e6b5433e1 --- /dev/null +++ b/testing/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch @@ -0,0 +1,290 @@ +From 761ef4b340e689490a76ec5ce520c858335e2106 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Sat, 14 Apr 2012 08:53:39 -0400 +Subject: [PATCH] poor man's solid picture support for evergreen + +Signed-off-by: Alex Deucher +--- + src/evergreen_exa.c | 163 ++++++++++++++++++++++++++++++--------------------- + 1 files changed, 95 insertions(+), 68 deletions(-) + +diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c +index cee3ec2..61b47a4 100644 +--- a/src/evergreen_exa.c ++++ b/src/evergreen_exa.c +@@ -748,17 +748,8 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict, + int op, + int unit) + { +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; + unsigned int i; +- int max_tex_w, max_tex_h; +- +- max_tex_w = 16384; +- max_tex_h = 16384; +- +- if ((w > max_tex_w) || (h > max_tex_h)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); + + for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) { + if (EVERGREENTexFormats[i].fmt == pPict->format) +@@ -798,9 +789,16 @@ static void EVERGREENXFormSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int const_offset = unit * 8; ++ int w, h; ++ ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ } else { ++ w = 1; ++ h = 1; ++ } + + if (pPict->transform != 0) { + accel_state->is_transform[unit] = TRUE; +@@ -837,9 +835,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, + ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ unsigned int repeatType; + unsigned int i; + tex_resource_t tex_res; + tex_sampler_t tex_samp; +@@ -854,9 +850,17 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, + } + + /* Texture */ ++ if (pPict->pDrawable) { ++ tex_res.w = pPict->pDrawable->width; ++ tex_res.h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ tex_res.w = 1; ++ tex_res.h = 1; ++ repeatType = RepeatNormal; ++ } ++ + tex_res.id = unit; +- tex_res.w = w; +- tex_res.h = h; + tex_res.pitch = accel_state->src_obj[unit].pitch; + tex_res.depth = 0; + tex_res.dim = SQ_TEX_DIM_2D; +@@ -1054,33 +1058,30 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture, + { + uint32_t tmp1; + PixmapPtr pSrcPixmap, pDstPixmap; +- int max_tex_w, max_tex_h, max_dst_w, max_dst_h; + + /* Check for unsupported compositing operations. */ + if (op >= (int) (sizeof(EVERGREENBlendOp) / sizeof(EVERGREENBlendOp[0]))) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); ++ if (pSrcPicture->pDrawable) { ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); + +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- max_tex_w = 8192; +- max_tex_h = 8192; +- max_dst_w = 8192; +- max_dst_h = 8192; ++ if (pSrcPixmap->drawable.width >= 16384 || ++ pSrcPixmap->drawable.height >= 16384) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } + +- if (pSrcPixmap->drawable.width >= max_tex_w || +- pSrcPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } ++ if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) ++ return FALSE; ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + +- if (pDstPixmap->drawable.width >= max_dst_w || +- pDstPixmap->drawable.height >= max_dst_h) { ++ if (pDstPixmap->drawable.width >= 16384 || ++ pDstPixmap->drawable.height >= 16384) { + RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", + pDstPixmap->drawable.width, + pDstPixmap->drawable.height)); +@@ -1089,38 +1090,35 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture, + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width >= max_tex_w || +- pMaskPixmap->drawable.height >= max_tex_h) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width >= 16384 || ++ pMaskPixmap->drawable.height >= 16384) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } + +- if (pMaskPicture->componentAlpha) { +- /* Check if it's component alpha that relies on a source alpha and +- * on the source value. We can only get one of those into the +- * single source value that we get to blend with. +- */ +- if (EVERGREENBlendOp[op].src_alpha && +- (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != +- (BLEND_ZERO << COLOR_SRCBLEND_shift)) { +- RADEON_FALLBACK(("Component alpha not supported with source " +- "alpha and source value blending.\n")); ++ if (pMaskPicture->componentAlpha) { ++ /* Check if it's component alpha that relies on a source alpha and ++ * on the source value. We can only get one of those into the ++ * single source value that we get to blend with. ++ */ ++ if (EVERGREENBlendOp[op].src_alpha && ++ (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != ++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) { ++ RADEON_FALLBACK(("Component alpha not supported with source " ++ "alpha and source value blending.\n")); ++ } + } +- } + +- if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) +- return FALSE; ++ if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) ++ return FALSE; ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + } + +- if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) +- return FALSE; +- + if (!EVERGREENGetDestFormat(pDstPicture, &tmp1)) + return FALSE; + +@@ -1132,7 +1130,8 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + struct radeon_accel_state *accel_state = info->accel_state; + uint32_t dst_format; +@@ -1142,13 +1141,19 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + struct r600_accel_object src_obj, mask_obj, dst_obj; + float *cbuf; + +- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8) ++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) + return FALSE; + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + src_obj.offset = 0; + dst_obj.offset = 0; +- src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.bo = radeon_get_pixmap_bo(pDst); ++ src_obj.bo = radeon_get_pixmap_bo(pSrc); + dst_obj.surface = radeon_get_pixmap_surface(pDst); + src_obj.surface = radeon_get_pixmap_surface(pSrc); + dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); +@@ -1166,7 +1171,15 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + dst_obj.bpp = pDst->drawable.bitsPerPixel; + dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; + +- if (pMask) { ++ if (pMaskPicture) { ++ if (!pMask) { ++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } + mask_obj.offset = 0; + mask_obj.bo = radeon_get_pixmap_bo(pMask); + mask_obj.tiling_flags = radeon_get_pixmap_tiling(pMask); +@@ -1363,11 +1376,9 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, + return TRUE; + } + +-static void EVERGREENDoneComposite(PixmapPtr pDst) ++static void EVERGREENFinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, ++ struct radeon_accel_state *accel_state) + { +- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; +- RADEONInfoPtr info = RADEONPTR(pScrn); +- struct radeon_accel_state *accel_state = info->accel_state; + int vtx_size; + + if (accel_state->vsync) +@@ -1381,6 +1392,22 @@ static void EVERGREENDoneComposite(PixmapPtr pDst) + evergreen_finish_op(pScrn, vtx_size); + } + ++static void EVERGREENDoneComposite(PixmapPtr pDst) ++{ ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ RADEONInfoPtr info = RADEONPTR(pScrn); ++ struct radeon_accel_state *accel_state = info->accel_state; ++ ++ EVERGREENFinishComposite(pScrn, pDst, accel_state); ++ ++ if (!accel_state->src_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->src_pix); ++ ++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) ++ pScreen->DestroyPixmap(accel_state->msk_pix); ++} ++ + static void EVERGREENComposite(PixmapPtr pDst, + int srcX, int srcY, + int maskX, int maskY, +@@ -1393,7 +1420,7 @@ static void EVERGREENComposite(PixmapPtr pDst, + float *vb; + + if (CS_FULL(info->cs)) { +- EVERGREENDoneComposite(info->accel_state->dst_pix); ++ EVERGREENFinishComposite(pScrn, pDst, info->accel_state); + radeon_cs_flush_indirect(pScrn); + EVERGREENPrepareComposite(info->accel_state->composite_op, + info->accel_state->src_pic, +-- +1.7.7.5 + diff --git a/testing/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch b/testing/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch new file mode 100644 index 000000000..3a2779446 --- /dev/null +++ b/testing/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch @@ -0,0 +1,182 @@ +From f36b911ecc31f689ddceeeb11d10eb7cb4a3428d Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 13 Apr 2012 13:24:46 -0400 +Subject: [PATCH 2/3] poor man's solid picture support for r100 + +Signed-off-by: Alex Deucher +--- + src/radeon_exa_render.c | 101 +++++++++++++++++++++++++++-------------------- + 1 files changed, 58 insertions(+), 43 deletions(-) + +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index b6cc9e4..451a625 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -338,17 +338,8 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict, + int unit) + { + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; + +- /* r100 limit should be 2048, there are issues with 2048 +- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed +- */ +- +- if ((w > 2047) || (h > 2047)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); +- + for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) { + if (R100TexFormats[i].fmt == pPict->format) + break; +@@ -357,7 +348,7 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) + return FALSE; + + if (pPict->filter != PictFilterNearest && +@@ -392,15 +383,24 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat, txoffset, txpitch; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && +- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); +- int i; ++ unsigned int repeatType; ++ Bool repeat; ++ int i, w, h; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ ++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && ++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); ++ + txpitch = exaGetPixmapPitch(pPix); + txoffset = 0; + +@@ -510,22 +510,6 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- /* r100 limit should be 2048, there are issues with 2048 +- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed +- */ +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- if (pSrcPixmap->drawable.width > 2047 || +- pSrcPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > 2047 || +@@ -535,20 +519,35 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ /* r100 limit should be 2048, there are issues with 2048 ++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed ++ */ ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > 2047 || ++ pSrcPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width > 2047 || +- pMaskPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > 2047 || ++ pMaskPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -624,7 +623,8 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, + PixmapPtr pMask, + PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch, colorpitch; + uint32_t pp_cntl, blendcntl, cblend, ablend; + int pixel_shift; +@@ -648,12 +648,27 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, + + CHECK_OFFSET(pDst, 0x0f, "destination"); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +-- +1.7.7.5 + diff --git a/testing/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch b/testing/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch new file mode 100644 index 000000000..0a448fc93 --- /dev/null +++ b/testing/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch @@ -0,0 +1,179 @@ +From c5c8310858f8018a1754f2457d7b102dc7d62b23 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 13 Apr 2012 13:28:10 -0400 +Subject: [PATCH 3/3] poor man's solid picture support for r200 + +Signed-off-by: Alex Deucher +--- + src/radeon_exa_render.c | 101 +++++++++++++++++++++++++++-------------------- + 1 files changed, 58 insertions(+), 43 deletions(-) + +diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c +index 451a625..7f1a3ff 100644 +--- a/src/radeon_exa_render.c ++++ b/src/radeon_exa_render.c +@@ -756,17 +756,8 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict, + int unit) + { + unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; + int i; + +- /* r200 limit should be 2048, there are issues with 2048 +- * see bug 19269 +- */ +- +- if ((w > 2047) || (h > 2047)) +- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); +- + for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) + { + if (R200TexFormats[i].fmt == pPict->format) +@@ -776,7 +767,7 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict, + RADEON_FALLBACK(("Unsupported picture format 0x%x\n", + (int)pPict->format)); + +- if (!RADEONCheckTexturePOT(pPict, unit == 0)) ++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) + return FALSE; + + if (pPict->filter != PictFilterNearest && +@@ -809,15 +800,24 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix, + { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + uint32_t txfilter, txformat, txoffset, txpitch; +- int w = pPict->pDrawable->width; +- int h = pPict->pDrawable->height; +- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; +- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && +- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); +- int i; ++ unsigned int repeatType; ++ Bool repeat; ++ int i, w, h; + struct radeon_exa_pixmap_priv *driver_priv; + ACCEL_PREAMBLE(); + ++ if (pPict->pDrawable) { ++ w = pPict->pDrawable->width; ++ h = pPict->pDrawable->height; ++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; ++ } else { ++ w = h = 1; ++ repeatType = RepeatNormal; ++ } ++ ++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && ++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); ++ + txpitch = exaGetPixmapPitch(pPix); + + txoffset = 0; +@@ -926,22 +926,6 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) + RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); + +- if (!pSrcPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- /* r200 limit should be 2048, there are issues with 2048 +- * see bug 19269 +- */ +- +- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); +- +- if (pSrcPixmap->drawable.width > 2047 || +- pSrcPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", +- pSrcPixmap->drawable.width, +- pSrcPixmap->drawable.height)); +- } +- + pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); + + if (pDstPixmap->drawable.width > 2047 || +@@ -951,20 +935,35 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP + pDstPixmap->drawable.height)); + } + ++ if (pSrcPicture->pDrawable) { ++ /* r200 limit should be 2048, there are issues with 2048 ++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed ++ */ ++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); ++ ++ if (pSrcPixmap->drawable.width > 2047 || ++ pSrcPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", ++ pSrcPixmap->drawable.width, ++ pSrcPixmap->drawable.height)); ++ } ++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); ++ + if (pMaskPicture) { + PixmapPtr pMaskPixmap; + +- if (!pMaskPicture->pDrawable) +- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); +- +- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); ++ if (pMaskPicture->pDrawable) { ++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + +- if (pMaskPixmap->drawable.width > 2047 || +- pMaskPixmap->drawable.height > 2047) { +- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", +- pMaskPixmap->drawable.width, +- pMaskPixmap->drawable.height)); +- } ++ if (pMaskPixmap->drawable.width > 2047 || ++ pMaskPixmap->drawable.height > 2047) { ++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", ++ pMaskPixmap->drawable.width, ++ pMaskPixmap->drawable.height)); ++ } ++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) ++ RADEON_FALLBACK(("Gradient pictures not supported yet\n")); + + if (pMaskPicture->componentAlpha) { + /* Check if it's component alpha that relies on a source alpha and +@@ -997,7 +996,8 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) + { +- RINFO_FROM_SCREEN(pDst->drawable.pScreen); ++ ScreenPtr pScreen = pDst->drawable.pScreen; ++ RINFO_FROM_SCREEN(pScreen); + uint32_t dst_format, dst_pitch; + uint32_t pp_cntl, blendcntl, cblend, ablend, colorpitch; + int pixel_shift; +@@ -1024,9 +1024,24 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, + if (((dst_pitch >> pixel_shift) & 0x7) != 0) + RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); + ++ if (!pSrc) { ++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); ++ if (!pSrc) ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) + return FALSE; + ++ if (pMaskPicture && !pMask) { ++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); ++ if (!pMask) { ++ if (!pSrcPicture->pDrawable) ++ pScreen->DestroyPixmap(pSrc); ++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n"); ++ } ++ } ++ + RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, + pSrc, pMask, pDst); + +-- +1.7.7.5 + diff --git a/testing/xf86-video-ati/PKGBUILD b/testing/xf86-video-ati/PKGBUILD index e4214bf47..62e12eb83 100644 --- a/testing/xf86-video-ati/PKGBUILD +++ b/testing/xf86-video-ati/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 156127 2012-04-14 09:33:09Z andyrtr $ +# $Id: PKGBUILD 156180 2012-04-15 10:27:42Z andyrtr $ # Maintainer: Jan de Groot # Contributor: Alexander Baldeck pkgname=xf86-video-ati pkgver=6.14.4 -pkgrel=3 +pkgrel=4 pkgdesc="X.org ati video driver" arch=('i686' 'x86_64') url="http://xorg.freedesktop.org/" @@ -15,18 +15,29 @@ conflicts=('xorg-server<1.11.99.902') groups=('xorg-drivers' 'xorg') options=('!libtool') source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 - solid_pictures_fixes.diff - git_fixes.diff) + git_fixes.diff + 0000-poor-man-s-solid-picture-support-for-r300-r600.patch + 0001-poor-man-s-solid-picture-support-for-evergreen.patch + 0002-poor-man-s-solid-picture-support-for-r100.patch + 0003-poor-man-s-solid-picture-support-for-r200.patch) sha1sums=('75ad000bc00599e1797134f2d20d3094cba6af92' - '480b7360a5e22661145430f21089ef82e3cd2d25' - '8b774e2f0310075cff2b7d874b0bed38d6245769') + '8b774e2f0310075cff2b7d874b0bed38d6245769' + '787f88c428f56ca6e96ba5eaf043a30bddfd0e23' + '69359a6623fe0f2214790c8ad40cac1a680a3825' + 'c0709ab82728e34838a8aeead7d1b79b7faf09bd' + '77a519e250c27a9fb94eeb52da655eed7c5f2eca') build() { cd "${srcdir}/${pkgname}-${pkgver}" patch -Np1 -i ${srcdir}/git_fixes.diff + # fix rendering issues with recent cairo - testing attemp taken from https://bugs.freedesktop.org/show_bug.cgi?id=47266 - # attachements 59943-59946 - patch -Np1 -i ${srcdir}/solid_pictures_fixes.diff + # and http://lists.x.org/archives/xorg-driver-ati/2012-April/022724.html + patch -Np1 -i ${srcdir}/0000-poor-man-s-solid-picture-support-for-r300-r600.patch + patch -Np1 -i ${srcdir}/0001-poor-man-s-solid-picture-support-for-evergreen.patch + patch -Np1 -i ${srcdir}/0002-poor-man-s-solid-picture-support-for-r100.patch + patch -Np1 -i ${srcdir}/0003-poor-man-s-solid-picture-support-for-r200.patch + ./configure --prefix=/usr --enable-dri make } diff --git a/testing/xorg-server/10-quirks.conf b/testing/xorg-server/10-quirks.conf new file mode 100644 index 000000000..7afad22dc --- /dev/null +++ b/testing/xorg-server/10-quirks.conf @@ -0,0 +1,10 @@ +# Collection of quirks and blacklist/whitelists for specific devices. + + +# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable +# http://bugs.freedesktop.org/show_bug.cgi?id=22442 +Section "InputClass" + Identifier "ThinkPad HDAPS accelerometer blacklist" + MatchProduct "ThinkPad HDAPS accelerometer data" + Option "Ignore" "on" +EndSection diff --git a/testing/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff b/testing/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff new file mode 100644 index 000000000..12c110151 --- /dev/null +++ b/testing/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff @@ -0,0 +1,116 @@ +--- xorg-server-1.12.1/exa/exa_glyphs.c 2012-03-30 04:57:25.000000000 +0200 ++++ xorg-server-1.12.1/exa_glyphs.c.new 2012-04-15 11:48:51.683214230 +0200 +@@ -686,6 +686,7 @@ + PixmapPtr pMaskPixmap = 0; + PicturePtr pMask = NULL; + ScreenPtr pScreen = pDst->pDrawable->pScreen; ++ ExaScreenPriv(pScreen); + int width = 0, height = 0; + int x, y; + int first_xOff = list->xOff, first_yOff = list->yOff; +@@ -697,7 +698,6 @@ + ExaGlyphBuffer buffer; + + if (maskFormat) { +- ExaScreenPriv(pScreen); + GCPtr pGC; + xRectangle rect; + +@@ -719,22 +719,20 @@ + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pMaskPixmap) +- return; ++ goto fallback; + component_alpha = NeedsComponent(maskFormat->format); + pMask = CreatePicture(0, &pMaskPixmap->drawable, + maskFormat, CPComponentAlpha, &component_alpha, + serverClient, &error); +- if (!pMask || +- (!component_alpha && pExaScr->info->CheckComposite && +- !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask))) ++ (*pScreen->DestroyPixmap) (pMaskPixmap); ++ if (!pMask) ++ goto fallback; ++ ++ if (!component_alpha && pExaScr->info->CheckComposite && ++ !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask)) + { + PictFormatPtr argbFormat; + +- (*pScreen->DestroyPixmap) (pMaskPixmap); +- +- if (!pMask) +- return; +- + /* The driver can't seem to composite to a8, let's try argb (but + * without component-alpha) */ + FreePicture((pointer) pMask, (XID) 0); +@@ -748,15 +746,25 @@ + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pMaskPixmap) +- return; ++ goto fallback; + + pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, 0, 0, + serverClient, &error); +- if (!pMask) { +- (*pScreen->DestroyPixmap) (pMaskPixmap); +- return; +- } ++ (*pScreen->DestroyPixmap) (pMaskPixmap); ++ if (!pMask) ++ goto fallback; + } ++ ++ if (pExaScr->info->CheckComposite && ++ (!(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask) || ++ (!(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst) && ++ (op != PictOpOver || ++ !(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, pMask, pDst) || ++ !(*pExaScr->info->CheckComposite) (PictOpOver, pSrc, pMask, pDst))))) { ++ FreePicture ((pointer) pMask, (XID) 0); ++ goto fallback; ++ } ++ + pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen); + ValidateGC(&pMaskPixmap->drawable, pGC); + rect.x = 0; +@@ -769,6 +777,13 @@ + y = -extents.y1; + } + else { ++ if (pExaScr->info->CheckComposite && ++ !(*pExaScr->info->CheckComposite) (op, pSrc, NULL, pDst) && ++ (op != PictOpOver || ++ !(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, NULL, pDst) || ++ !(*pExaScr->info->CheckComposite) (PictOpOver, pSrc, NULL, pDst))) ++ goto fallback; ++ + x = 0; + y = 0; + } +@@ -834,6 +849,10 @@ + xSrc + x - first_xOff, + ySrc + y - first_yOff, 0, 0, x, y, width, height); + FreePicture((pointer) pMask, (XID) 0); +- (*pScreen->DestroyPixmap) (pMaskPixmap); + } ++ ++ return; ++ ++fallback: ++ ExaCheckGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + } +--- xorg-server-1.12.1/exa/exa_render.c 2012-03-30 04:57:25.000000000 +0200 ++++ xorg-server-1.12.1/exa_render.c.new 2012-04-15 11:50:35.272482047 +0200 +@@ -878,7 +878,7 @@ + Bool saveMaskRepeat = pMask ? pMask->repeat : 0; + RegionRec region; + +- if (pExaScr->swappedOut) ++ if (pExaScr->fallback_counter || pExaScr->swappedOut) + goto fallback; + + /* Remove repeat in source if useless */ diff --git a/testing/xorg-server/PKGBUILD b/testing/xorg-server/PKGBUILD new file mode 100644 index 000000000..557f181fe --- /dev/null +++ b/testing/xorg-server/PKGBUILD @@ -0,0 +1,201 @@ +# $Id: PKGBUILD 156178 2012-04-15 10:04:10Z andyrtr $ +# 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.12.1 +pkgrel=2 +arch=('i686' 'x86_64') +license=('custom') +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' 'glproto' 'dri2proto' 'udev' 'libgcrypt') +options=('!libtool') +source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 + autoconfig-nvidia.patch + autoconfig-sis.patch + EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff + #git-fixes.patch + xvfb-run + xvfb-run.1 + 10-quirks.conf) +sha1sums=('922b963901f4711449b53fb32ce3e14f5b642766' + '63836e5cfb4ae7353fb2e31239a544409c7ead32' + '175de5630b43dbc97778adfba5563b7fdd77f11f' + '4acb39587f73bcbb9a331377d6ef99cb73eb95a8' + 'c94f742d3f9cabf958ae58e4015d9dd185aabedc' + '6838fc00ef4618c924a77e0fb03c05346080908a' + '993798f3d22ad672d769dae5f48d1fa068d5578f') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + + # Use nouveau/nv/nvidia drivers for nvidia devices + patch -Np1 -i "${srcdir}/autoconfig-nvidia.patch" + + # Use unofficial imedia SiS driver for supported SiS devices + patch -Np0 -i "${srcdir}/autoconfig-sis.patch" + + # fix glitches and crashes with EXA and cairo 1.12 + # taken from https://bugs.freedesktop.org/show_bug.cgi?id=47266 + # and reworked for 1.12.1 changes + patch -Np1 -i ${srcdir}/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff + + # Add post-release patches from 1.11 branch +# patch -Np1 -i "${srcdir}/git-fixes.patch" + + autoreconf -fi + ./configure --prefix=/usr \ + --enable-ipv6 \ + --enable-dri \ + --enable-dmx \ + --enable-xvfb \ + --enable-xnest \ + --enable-composite \ + --enable-xcsecurity \ + --enable-xorg \ + --enable-xephyr \ + --enable-glx-tls \ + --enable-kdrive \ + --enable-kdrive-evdev \ + --enable-kdrive-kbd \ + --enable-kdrive-mouse \ + --enable-install-setuid \ + --enable-config-udev \ + --disable-config-dbus \ + --enable-record \ + --disable-xfbdev \ + --disable-xfake \ + --disable-static \ + --sysconfdir=/etc/X11 \ + --localstatedir=/var \ + --with-xkb-path=/usr/share/X11/xkb \ + --with-xkb-output=/var/lib/xkb \ + --with-fontrootdir=/usr/share/fonts + make + + # Disable subdirs for make install rule to make splitting easier + sed -e 's/^DMX_SUBDIRS =.*/DMX_SUBDIRS =/' \ + -e 's/^XVFB_SUBDIRS =.*/XVFB_SUBDIRS =/' \ + -e 's/^XNEST_SUBDIRS =.*/XNEST_SUBDIRS = /' \ + -e 's/^KDRIVE_SUBDIRS =.*/KDRIVE_SUBDIRS =/' \ + -i hw/Makefile +} + +package_xorg-server-common() { + pkgdesc="Xorg server common files" + depends=('xkeyboard-config' 'xorg-xkbcomp' 'xorg-setxkbmap' 'xorg-fonts-misc') + + cd "${srcdir}/${pkgbase}-${pkgver}" + install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-common" + install -m644 COPYING "${pkgdir}/usr/share/licenses/xorg-server-common" + + make -C xkb DESTDIR="${pkgdir}" install-data + + install -m755 -d "${pkgdir}/usr/share/man/man1" + install -m644 man/Xserver.1 "${pkgdir}/usr/share/man/man1/" + + install -m755 -d "${pkgdir}/usr/lib/xorg" + install -m644 dix/protocol.txt "${pkgdir}/usr/lib/xorg/" +} + +package_xorg-server() { + pkgdesc="Xorg X server" + depends=(libxdmcp libxfont udev libpciaccess libdrm pixman libgcrypt libxau xorg-server-common xf86-input-evdev) + backup=('etc/X11/xorg.conf.d/10-evdev.conf' 'etc/X11/xorg.conf.d/10-quirks.conf') + provides=('x-server') + groups=('xorg') + conflicts=('nvidia-utils<=290.10') + + cd "${srcdir}/${pkgbase}-${pkgver}" + make DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/etc/X11" + mv "${pkgdir}/usr/share/X11/xorg.conf.d" "${pkgdir}/etc/X11/" + install -m644 "${srcdir}/10-quirks.conf" "${pkgdir}/etc/X11/xorg.conf.d/" + + rmdir "${pkgdir}/usr/share/X11" + + # Needed for non-mesa drivers, libgl will restore it + mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \ + "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg" + + rm -rf "${pkgdir}/var" + + rm -f "${pkgdir}/usr/share/man/man1/Xserver.1" + rm -f "${pkgdir}/usr/lib/xorg/protocol.txt" + + install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server" + ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server/COPYING" + + rm -rf "${pkgdir}/usr/lib/pkgconfig" + rm -rf "${pkgdir}/usr/include" + rm -rf "${pkgdir}/usr/share/aclocal" +} + +package_xorg-server-xephyr() { + pkgdesc="A nested X server that runs as an X application" + depends=(libxfont libgl libgcrypt libxv pixman xorg-server-common) + + cd "${srcdir}/${pkgbase}-${pkgver}/hw/kdrive" + make DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xephyr" + ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xephyr/COPYING" +} + +package_xorg-server-xvfb() { + pkgdesc="Virtual framebuffer X server" + depends=(libxfont libxdmcp libxau libgcrypt pixman xorg-server-common) + + cd "${srcdir}/${pkgbase}-${pkgver}/hw/vfb" + make DESTDIR="${pkgdir}" install + + install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/" + install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/" + + install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xvfb" + ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xvfb/COPYING" +} + +package_xorg-server-xnest() { + pkgdesc="A nested X server that runs as an X application" + depends=(libxfont libxext libgcrypt pixman xorg-server-common) + + cd "${srcdir}/${pkgbase}-${pkgver}/hw/xnest" + make DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xnest" + ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xnest/COPYING" +} + +package_xorg-server-xdmx() { + pkgdesc="Distributed Multihead X Server and utilities" + depends=(libxfont libxi libgcrypt libxaw libxrender libdmx libxfixes pixman xorg-server-common) + + cd "${srcdir}/${pkgbase}-${pkgver}/hw/dmx" + make DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xdmx" + ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xdmx/COPYING" +} + +package_xorg-server-devel() { + pkgdesc="Development files for the X.Org X server" + depends=(xproto randrproto renderproto xextproto inputproto kbproto fontsproto videoproto dri2proto xineramaproto xorg-util-macros pixman libpciaccess) + + cd "${srcdir}/${pkgbase}-${pkgver}" + make DESTDIR="${pkgdir}" install + + rm -rf "${pkgdir}/usr/bin" + rm -rf "${pkgdir}/usr/share/man" + rm -rf "${pkgdir}/usr/share/doc" + rm -rf "${pkgdir}/usr/share/X11" + rm -rf "${pkgdir}/usr/lib/xorg" + rm -rf "${pkgdir}/var" + + install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-devel" + ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-devel/COPYING" +} diff --git a/testing/xorg-server/autoconfig-nvidia.patch b/testing/xorg-server/autoconfig-nvidia.patch new file mode 100644 index 000000000..6d5220ac7 --- /dev/null +++ b/testing/xorg-server/autoconfig-nvidia.patch @@ -0,0 +1,28 @@ +diff -Nur xorg-server-1.11.99.902.orig/hw/xfree86/common/xf86pciBus.c xorg-server-1.11.99.902/hw/xfree86/common/xf86pciBus.c +--- xorg-server-1.11.99.902.orig/hw/xfree86/common/xf86pciBus.c 2012-02-10 10:10:37.583014924 +0000 ++++ xorg-server-1.11.99.902/hw/xfree86/common/xf86pciBus.c 2012-02-10 11:16:07.148971317 +0000 +@@ -1144,7 +1144,23 @@ + int idx = 0; + + #ifdef __linux__ +- driverList[idx++] = "nouveau"; ++ switch (dev->device_id) ++ { ++ /* NV1 */ ++ case 0x0008: ++ case 0x0009: ++ driverList[idx++] = "vesa"; ++ break; ++ /* NV3 */ ++ case 0x0018: ++ case 0x0019: ++ driverList[idx++] = "nouveau"; ++ break; ++ default: ++ driverList[idx++] = "nouveau"; ++ driverList[idx++] = "nvidia"; ++ break; ++ } + #endif + driverList[idx++] = "nv"; + break; diff --git a/testing/xorg-server/autoconfig-sis.patch b/testing/xorg-server/autoconfig-sis.patch new file mode 100644 index 000000000..0b50049db --- /dev/null +++ b/testing/xorg-server/autoconfig-sis.patch @@ -0,0 +1,21 @@ +--- hw/xfree86/common/xf86pciBus.c.orig 2011-09-24 10:53:45.421697668 +0000 ++++ hw/xfree86/common/xf86pciBus.c 2011-09-24 10:55:56.416250708 +0000 +@@ -1200,9 +1200,15 @@ + break; + } + break; +- case 0x1039: +- driverList[0] = "sis"; +- break; ++ case 0x1039: ++ switch (dev->device_id) ++ { ++ case 0x6350: case 0x6351: ++ driverList[0] = "sisimedia"; driverList[1] = "sis"; break; ++ default: ++ driverList[0] = "sis"; break; ++ } ++ break; + case 0x126f: + driverList[0] = "siliconmotion"; + break; diff --git a/testing/xorg-server/git-fixes.patch b/testing/xorg-server/git-fixes.patch new file mode 100644 index 000000000..27da61eca --- /dev/null +++ b/testing/xorg-server/git-fixes.patch @@ -0,0 +1,161 @@ +From 89626304ea1ad316c5b7145a40f09377148cff21 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Thu, 20 Oct 2011 13:43:01 +0000 +Subject: xf86Crtc: handle no outputs with no modes harder. + +If you started an X server with no connected outputs, we pick a default +1024x768 mode, however if you then ran an xvidmode using app against that +server it would segfault the server due to not finding any valid modes. + +This was due to the no output mode set code, only adding the modes to the +scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would +get called and remove all the modes and we'd end up with 0. + +This change fixes xf86SetScrnInfoModes to always report a scrn mode of at +least 1024x768, and pushes the initial configuration to just call it instead +of setting up the mode itself. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926 + +I've seen other bugs like this on other distros so it might also actually fix them. + +Signed-off-by: Dave Airlie +Reviewed-by: Keith Packard +Signed-off-by: Keith Packard +(cherry picked from commit 17416e88dcfcc584fe5f87580d5d2b719b3521c3) +--- +diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c +index d75cd77..8906806 100644 +--- a/hw/xfree86/modes/xf86Crtc.c ++++ b/hw/xfree86/modes/xf86Crtc.c +@@ -1915,19 +1915,25 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) + break; + } + +- if (scrn->modes != NULL) { +- /* For some reason, scrn->modes is circular, unlike the other mode +- * lists. How great is that? +- */ +- for (last = scrn->modes; last && last->next; last = last->next) +- ; +- last->next = scrn->modes; +- scrn->modes->prev = last; +- if (mode) { +- while (scrn->modes != mode) +- scrn->modes = scrn->modes->next; +- } ++ if (!scrn->modes) { ++ scrn->modes = xf86ModesAdd(scrn->modes, ++ xf86CVTMode(scrn->display->virtualX, ++ scrn->display->virtualY, ++ 60, 0, 0)); ++ } ++ ++ /* For some reason, scrn->modes is circular, unlike the other mode ++ * lists. How great is that? ++ */ ++ for (last = scrn->modes; last && last->next; last = last->next) ++ ; ++ last->next = scrn->modes; ++ scrn->modes->prev = last; ++ if (mode) { ++ while (scrn->modes != mode) ++ scrn->modes = scrn->modes->next; + } ++ + scrn->currentMode = scrn->modes; + #ifdef XFreeXDGA + if (scrn->pScreen) +@@ -2529,16 +2535,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) + width, height); + } + +- if (have_outputs) { +- /* Mirror output modes to scrn mode list */ +- xf86SetScrnInfoModes (scrn); +- } else { +- /* Clear any existing modes from scrn->modes */ +- while (scrn->modes != NULL) +- xf86DeleteMode(&scrn->modes, scrn->modes); +- scrn->modes = xf86ModesAdd(scrn->modes, +- xf86CVTMode(width, height, 60, 0, 0)); +- } ++ xf86SetScrnInfoModes (scrn); + + success = TRUE; + bailout: +-- +cgit v0.9.0.2-2-gbebe +From 97f2ae60fc0cc755abd8b88df826fcb1a20464fe Mon Sep 17 00:00:00 2001 +From: Christopher Yeleighton +Date: Tue, 25 Oct 2011 01:47:06 +0000 +Subject: Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2 + +https://bugs.freedesktop.org/show_bug.cgi?id=38420 + +Exit with fatal error message, not segfault. + +Signed-off-by: Alan Coopersmith +Reviewed-by: Jeremy Huddleston +Signed-off-by: Keith Packard +(cherry picked from commit 7d50211ab57a35910d79fc3f67ae89aff91fa995) +--- +diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c +index 31ed505..dce3f84 100644 +--- a/hw/vfb/InitOutput.c ++++ b/hw/vfb/InitOutput.c +@@ -864,6 +864,8 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) + (1 << DirectColor)), + 10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff); + break; ++ default: ++ return FALSE; + } + + miSetPixmapDepths (); +-- +cgit v0.9.0.2-2-gbebe +From 34bb83b9df20ff63dbb147ed661f39efb8bae8e4 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 24 Oct 2011 02:00:32 +0000 +Subject: dix: block signals when closing all devices + +When closing down all devices, we manually unset master for all attached +devices, but the device's sprite info still points to the master's sprite +info. This leaves us a window where the master is freed already but the +device isn't yet. A signal during that window causes dereference of the +already freed spriteInfo in mieqEnqueue's EnqueueScreen macro. + +Simply block signals when removing all devices. It's not like we're really +worrying about high-responsive input at this stage. + +https://bugzilla.redhat.com/show_bug.cgi?id=737031 + +Signed-off-by: Peter Hutterer +Reviewed-by: Julien Cristau +(cherry picked from commit d7c44a7c9760449bef263413ad3b20f19b1dc95a) +--- +diff --git a/dix/devices.c b/dix/devices.c +index 0ccf252..cbdd4ea 100644 +--- a/dix/devices.c ++++ b/dix/devices.c +@@ -982,6 +982,8 @@ CloseDownDevices(void) + { + DeviceIntPtr dev; + ++ OsBlockSignals(); ++ + /* Float all SDs before closing them. Note that at this point resources + * (e.g. cursors) have been freed already, so we can't just call + * AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master +@@ -1004,6 +1006,8 @@ CloseDownDevices(void) + inputInfo.keyboard = NULL; + inputInfo.pointer = NULL; + XkbDeleteRulesDflts(); ++ ++ OsReleaseSignals(); + } + + /** +-- +cgit v0.9.0.2-2-gbebe diff --git a/testing/xorg-server/xvfb-run b/testing/xorg-server/xvfb-run new file mode 100644 index 000000000..4c2f4e0d3 --- /dev/null +++ b/testing/xorg-server/xvfb-run @@ -0,0 +1,180 @@ +#!/bin/sh + +# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $ + +# This script starts an instance of Xvfb, the "fake" X server, runs a command +# with that server available, and kills the X server when done. The return +# value of the command becomes the return value of this script. +# +# If anyone is using this to build a Debian package, make sure the package +# Build-Depends on xvfb, xbase-clients, and xfonts-base. + +set -e + +PROGNAME=xvfb-run +SERVERNUM=99 +AUTHFILE= +ERRORFILE=/dev/null +STARTWAIT=3 +XVFBARGS="-screen 0 640x480x8" +LISTENTCP="-nolisten tcp" +XAUTHPROTO=. + +# Query the terminal to establish a default number of columns to use for +# displaying messages to the user. This is used only as a fallback in the event +# the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while the +# script is running, and this cannot, only being calculated once.) +DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true +if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then + DEFCOLUMNS=80 +fi + +# Display a message, wrapping lines at the terminal width. +message () { + echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} +} + +# Display an error message. +error () { + message "error: $*" >&2 +} + +# Display a usage message. +usage () { + if [ -n "$*" ]; then + message "usage error: $*" + fi + cat <>"$ERRORFILE" 2>&1 + fi + if [ -n "$XVFB_RUN_TMPDIR" ]; then + if ! rm -r "$XVFB_RUN_TMPDIR"; then + error "problem while cleaning up temporary directory" + exit 5 + fi + fi +} + +# Parse the command line. +ARGS=$(getopt --options +ae:f:hn:lp:s:w: \ + --long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \ + --name "$PROGNAME" -- "$@") +GETOPT_STATUS=$? + +if [ $GETOPT_STATUS -ne 0 ]; then + error "internal error; getopt exited with status $GETOPT_STATUS" + exit 6 +fi + +eval set -- "$ARGS" + +while :; do + case "$1" in + -a|--auto-servernum) SERVERNUM=$(find_free_servernum) ;; + -e|--error-file) ERRORFILE="$2"; shift ;; + -f|--auth-file) AUTHFILE="$2"; shift ;; + -h|--help) SHOWHELP="yes" ;; + -n|--server-num) SERVERNUM="$2"; shift ;; + -l|--listen-tcp) LISTENTCP="" ;; + -p|--xauth-protocol) XAUTHPROTO="$2"; shift ;; + -s|--server-args) XVFBARGS="$2"; shift ;; + -w|--wait) STARTWAIT="$2"; shift ;; + --) shift; break ;; + *) error "internal error; getopt permitted \"$1\" unexpectedly" + exit 6 + ;; + esac + shift +done + +if [ "$SHOWHELP" ]; then + usage + exit 0 +fi + +if [ -z "$*" ]; then + usage "need a command to run" >&2 + exit 2 +fi + +if ! which xauth >/dev/null; then + error "xauth command not found" + exit 3 +fi + +# tidy up after ourselves +trap clean_up EXIT + +# If the user did not specify an X authorization file to use, set up a temporary +# directory to house one. +if [ -z "$AUTHFILE" ]; then + XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)" + AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority" +fi + +# Start Xvfb. +MCOOKIE=$(mcookie) +XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1 +add :$SERVERNUM $XAUTHPROTO $MCOOKIE +EOF +XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \ + 2>&1 & +XVFBPID=$! +sleep "$STARTWAIT" +if ! kill -0 $XVFBPID 2>/dev/null; then + echo "Xvfb failed to start" >&2 + exit 1 +fi + +# Start the command and save its exit status. +set +e +DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 +RETVAL=$? +set -e + +# Kill Xvfb now that the command has exited. +kill $XVFBPID + +# Return the executed command's exit status. +exit $RETVAL + +# vim:set ai et sts=4 sw=4 tw=80: diff --git a/testing/xorg-server/xvfb-run.1 b/testing/xorg-server/xvfb-run.1 new file mode 100644 index 000000000..137d3a196 --- /dev/null +++ b/testing/xorg-server/xvfb-run.1 @@ -0,0 +1,282 @@ +.\" $Id: xvfb-run.1 2138 2005-01-17 23:40:27Z branden $ +.\" +.\" Copyright 1998-2004 Branden Robinson . +.\" +.\" This is free software; you may redistribute it and/or modify +.\" it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2, +.\" or (at your option) any later version. +.\" +.\" This is distributed in the hope that it will be useful, but +.\" WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License with +.\" the Debian operating system, in /usr/share/common-licenses/GPL; if +.\" not, write to the Free Software Foundation, Inc., 59 Temple Place, +.\" Suite 330, Boston, MA 02111-1307 USA +.\" +.\" We need the URL macro from groff's www macro package, but also want +.\" things to work all right for people who don't have it. So we define +.\" our own URL macro and let the www macro package override it if it's +.\" available. +.de URL +\\$2 \(laURL: \\$1 \(ra\\$3 +.. +.if \n[.g] .mso www.tmac +.TH xvfb\-run 1 "2004\-11\-12" "Debian Project" +.SH NAME +xvfb\-run \- run specified X client or command in a virtual X server environment +.SH SYNOPSIS +.B xvfb\-run +[ +.I options +] +.I command +.SH DESCRIPTION +.B xvfb\-run +is a wrapper for the +.BR Xvfb (1x) +command which simplifies the task of running commands (typically an X +client, or a script containing a list of clients to be run) within a virtual +X server environment. +.PP +.B xvfb\-run +sets up an X authority file (or uses an existing user\-specified one), +writes a cookie to it (see +.BR xauth (1x)) +and then starts the +.B Xvfb +X server as a background process. +The process ID of +.B Xvfb +is stored for later use. +The specified +.I command +is then run using the X display corresponding to the +.B Xvfb +server +just started and the X authority file created earlier. +.PP +When the +.I command +exits, its status is saved, the +.B Xvfb +server is killed (using the process ID stored earlier), the X authority +cookie removed, and the authority file deleted (if the user did not specify +one to use). +.B xvfb\-run +then exits with the exit status of +.IR command . +.PP +.B xvfb\-run +requires the +.B xauth +command to function. +.SH OPTIONS +.TP +.B \-a\fR,\fB \-\-auto\-servernum +Try to get a free server number, starting at 99, or the argument to +.BR \-\-server\-num . +.TP +.BI \-e\ file \fR,\fB\ \-\-error\-file= file +Store output from +.B xauth +and +.B Xvfb +in +.IR file . +The default is +.IR /dev/null . +.TP +.BI \-f\ file \fR,\fB\ \-\-auth\-file= file +Store X authentication data in +.IR file . +By default, a temporary directory called +.IR xvfb\-run. PID +(where PID is the process ID of +.B xvfb\-run +itself) is created in the directory specified by the environment variable +.B TMPDIR +(or +.I /tmp +if that variable is null or unset), and the +.BR tempfile (1) +command is used to create a file in that temporary directory called +.IR Xauthority . +.TP +.B \-h\fR,\fB \-\-help +Display a usage message and exit. +.TP +.BI \-n\ servernumber \fR,\fB\ \-\-server\-num= servernumber +Use +.I servernumber +as the server number (but see the +.B \-a\fR,\fB \-\-auto\-servernum +option above). +The default is 99. +.TP +.B \-l\fR,\fB \-\-listen\-tcp +Enable TCP port listening in the X server. +For security reasons (to avoid denial\-of\-service attacks or exploits), +TCP port listening is disabled by default. +.TP +.BI \-p\ protocolname \fR,\fB\ \-\-xauth\-protocol= protocolname +Use +.I protocolname +as the X authority protocol to use. +The default is \(oq.\(cq, which +.B xauth +interprets as its own default protocol, which is MIT\-MAGIC\-COOKIE\-1. +.TP +.BI \-s\ arguments \fR,\fB\ \-\-server\-args= arguments +Pass +.I arguments +to the +.B Xvfb +server. +Be careful to quote any whitespace characters that may occur within +.I arguments +to prevent them from regarded as separators for +.BR xvfb\-run 's +own arguments. +Also, note that specification of \(oq\-nolisten tcp\(cq in +.I arguments +may override the function of +.BR xvfb\-run 's +own +.B \-l\fR,\fB \-\-listen\-tcp +option, and that specification of the server number (e.g., \(oq:1\(cq) may +be ignored because of the way the X server parses its argument list. +Use the +.B xvfb\-run +option +.BI \-n\ servernumber \fR,\fB\ \-\-server\-num= servernumber +to achieve the latter function. +The default is \(oq\-screen 0 640x480x8\(cq. +.TP +.BI \-w\ delay \fR,\fB\ \-\-wait= delay +Wait +.I delay +seconds after launching +.B Xvfb +before attempting to start the specified command. +The default is 3. +.SH ENVIRONMENT +.TP +.B COLUMNS +indicates the width of the terminal device in character cells. +This value is used for formatting diagnostic messages. +If not set, the terminal is queried using +.BR stty (1) +to determine its width. +If that fails, a value of \(oq80\(cq is assumed. +.TP +.B TMPDIR +specifies the directory in which to place +.BR xvfb\-run 's +temporary directory for storage of the X authority file; only used if the +.B \-f +or +.B \-\-auth\-file +options are not specified. +.SH "OUTPUT FILES" +.PP +Unless the +.B \-f +or +.B \-\-auth\-file +options are specified, a temporary +directory and file within it are created (and deleted) to store the X +authority cookies used by the +.B Xvfb +server and client(s) run under it. +See +.BR tempfile (1). +If \-f or \-\-auth\-file are used, then the specified X authority file is +only written to, not created or deleted (though +.B xauth +creates an authority file itself if told to use use that does not already +exist). +.PP +An error file with a user\-specified name is also created if the +.B \-e +or +.B \-\-error\-file +options are specifed; see above. +.SH "EXIT STATUS" +.B xvfb\-run +uses its exit status as well as output to standard error to communicate +diagnostics. +The exit status of \(oq1\(cq is not used, and should be interpreted as failure +of the specified command. +.TP +0 +.B xvfb\-run +only uses this exit status if the +.B \-h\fR,\fB \-\-help +option is given. +In all other situations, this may be interpreted as success of the specified +command. +.TP +2 +No command to run was specified. +.TP +3 +The +.B xauth +command is not available. +.TP +4 +The temporary directory that was going to be used already exists; since +.B xvfb\-run +produces a uniquely named directory, this may indicate an attempt by another +process on the system to exploit a temporary file race condition. +.TP +5 +A problem was encountered while cleaning up the temporary directory. +.TP +6 +A problem was encountered while using +.BR getopt (1) +to parse the command\-line arguments. +.SH EXAMPLES +.TP +.B xvfb\-run \-\-auto\-servernum \-\-server\-num=1 xlogo +runs the +.BR xlogo (1x) +demonstration client inside the +.B Xvfb +X server on the first available server number greater than or equal to 1. +.TP +.B xvfb\-run \-\-server\-args="\-screen 0 1024x768x24" ico \-faces +runs the +.BR ico (1x) +demonstration client (and passes it the +.B \-faces +argument) inside the +.B Xvfb +X server, configured with a root window of 1024 by 768 pixels and a color +depth of 24 bits. +.PP +Note that the demo X clients used in the above examples will not exit on +their own, so they will have to be killed before +.B xvfb\-run +will exit. +.SH BUGS +See +.URL "http://bugs.debian.org/xvfb" "the Debian Bug Tracking System" . +If you wish to report a bug in +.BR xvfb\-run , +please use the +.BR reportbug (1) +command. +.SH AUTHOR +.B xfvb\-run +was written by Branden Robinson and Jeff Licquia with sponsorship from +Progeny Linux Systems. +.SH "SEE ALSO" +.BR Xvfb (1x), +.BR xauth (1x) +.\" vim:set et tw=80: -- cgit v1.2.3-54-g00ecf