diff --git a/config/graphic b/config/graphic new file mode 100644 index 0000000000..26485bad04 --- /dev/null +++ b/config/graphic @@ -0,0 +1,79 @@ +get_graphicdrivers() { + if [ "$GRAPHIC_DRIVERS" = "all" ]; then + GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 fglrx nvidia vmware" + fi + + for drv in $GRAPHIC_DRIVERS; do + if [ "$drv" = "fglrx" ]; then + DRI_DRIVERS="$DRI_DRIVERS" + GALLIUM_DRIVERS="$GALLIUM_DRIVERS" + XORG_DRIVERS="$XORG_DRIVERS fglrx" + COMPOSITE_SUPPORT="yes" + XINERAMA_SUPPORT="yes" +# LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "i915" ]; then + DRI_DRIVERS="$DRI_DRIVERS,i915" +# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,i915" + XORG_DRIVERS="$XORG_DRIVERS intel" +# LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "i965" ]; then + DRI_DRIVERS="$DRI_DRIVERS,i965" +# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,i965" + XORG_DRIVERS="$XORG_DRIVERS intel" +# LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "nouveau" ]; then +# DRI_DRIVERS="$DRI_DRIVERS,nouveau" + GALLIUM_DRIVERS="$GALLIUM_DRIVERS,nouveau" + XORG_DRIVERS="$XORG_DRIVERS nouveau" + LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "nvidia" ]; then + DRI_DRIVERS="$DRI_DRIVERS" + GALLIUM_DRIVERS="$GALLIUM_DRIVERS" + XORG_DRIVERS="$XORG_DRIVERS nvidia" + XINERAMA_SUPPORT="yes" +# LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "omapfb" ]; then + DRI_DRIVERS="$DRI_DRIVERS,swrast" +# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swrast" + XORG_DRIVERS="$XORG_DRIVERS ompafb" +# LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "r200" ]; then + DRI_DRIVERS="$DRI_DRIVERS,r200" +# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r200" + XORG_DRIVERS="$XORG_DRIVERS ati" +# LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "r300" ]; then +# DRI_DRIVERS="$DRI_DRIVERS,r300" + GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r300" + XORG_DRIVERS="$XORG_DRIVERS ati" + LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "r600" ]; then +# DRI_DRIVERS="$DRI_DRIVERS,r600" + GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r600" + XORG_DRIVERS="$XORG_DRIVERS ati" + LLVM_SUPPORT="yes" + fi + + if [ "$drv" = "vmware" ]; then + XINERAMA_SUPPORT="yes" +# LLVM_SUPPORT="yes" + fi + + done +} diff --git a/config/options b/config/options index 90cd75b3fb..d2a955d098 100644 --- a/config/options +++ b/config/options @@ -75,57 +75,5 @@ fi . $HOME/.openelec/$PROJECT/options fi -get_graphicdrivers() { - if [ "$GRAPHIC_DRIVERS" = "all" ]; then - GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 radeon nvidia vmware" - fi - - for drv in $GRAPHIC_DRIVERS; do - [ "$drv" = "i915" ] && MESA_DRIVERS="$MESA_DRIVERS,i915" - [ "$drv" = "i965" ] && MESA_DRIVERS="$MESA_DRIVERS,i965" - [ "$drv" = "r200" ] && MESA_DRIVERS="$MESA_DRIVERS,r200" -# [ "$drv" = "r300" ] && MESA_DRIVERS="$MESA_DRIVERS,r300" -# [ "$drv" = "r600" ] && MESA_DRIVERS="$MESA_DRIVERS,r600" - [ "$drv" = "radeon" ] && MESA_DRIVERS="$MESA_DRIVERS,radeon" -# [ "$drv" = "nouveau" ] && MESA_DRIVERS="$MESA_DRIVERS,nouveau" - [ "$drv" = "omapfb" ] && MESA_DRIVERS="$MESA_DRIVERS,swrast" - - if [ "$drv" = "i915" -o "$drv" = "i965" ]; then - XORG_DRIVERS="$XORG_DRIVERS intel" -# LLVM_SUPPORT="yes" - fi - - if [ "$drv" = "r200" -o "$drv" = "r300" -o "$drv" = "r600" -o "$drv" = "radeon" ]; then - XORG_DRIVERS="$XORG_DRIVERS ati" -# LLVM_SUPPORT="yes" - fi - - if [ "$drv" = "nouveau" ]; then - XORG_DRIVERS="$XORG_DRIVERS nouveau" -# LLVM_SUPPORT="yes" - fi - - if [ "$drv" = "nvidia" ]; then - XORG_DRIVERS="$XORG_DRIVERS nvidia" - XINERAMA_SUPPORT="yes" - fi - - if [ "$drv" = "fglrx" ]; then - XORG_DRIVERS="$XORG_DRIVERS fglrx" - COMPOSITE_SUPPORT="yes" - XINERAMA_SUPPORT="yes" - fi - - if [ "$drv" = "omapfb" ]; then - XORG_DRIVERS="$XORG_DRIVERS ompafb" -# LLVM_SUPPORT="yes" - fi - - if [ "$drv" = "vmware" ]; then - XINERAMA_SUPPORT="yes" -# LLVM_SUPPORT="yes" - fi - done -} - +. config/graphic . config/path $1 diff --git a/create_tar.sh b/create_tar.sh new file mode 100755 index 0000000000..0802d9d04e --- /dev/null +++ b/create_tar.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +git archive --format=tar --prefix=OpenELEC-source-$1/ tags/$1 | bzip2 > OpenELEC-source-$1.tar.bz2 diff --git a/packages/addons/multimedia/libav/changelog.txt b/packages/addons/multimedia/libav/changelog.txt index 39b3bbb7b3..019076164d 100644 --- a/packages/addons/multimedia/libav/changelog.txt +++ b/packages/addons/multimedia/libav/changelog.txt @@ -1,3 +1,6 @@ +0.99.3 +- update to libav-0.7 (final) + 0.99.2 - change icon diff --git a/packages/addons/multimedia/libav/meta b/packages/addons/multimedia/libav/meta index fdd410d858..67991f0694 100644 --- a/packages/addons/multimedia/libav/meta +++ b/packages/addons/multimedia/libav/meta @@ -19,12 +19,12 @@ ################################################################################ PKG_NAME="libav" -PKG_VERSION="0.7_beta2" -PKG_REV="2" +PKG_VERSION="0.7" +PKG_REV="3" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.libav.org" -PKG_URL="http://libav.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_URL="http://libav.org/releases/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain alsa-lib zlib bzip2" PKG_PRIORITY="optional" diff --git a/packages/databases/sqlite/meta b/packages/databases/sqlite/meta index aba6fe9ad6..59f584093c 100644 --- a/packages/databases/sqlite/meta +++ b/packages/databases/sqlite/meta @@ -19,12 +19,12 @@ ################################################################################ PKG_NAME="sqlite" -PKG_VERSION="autoconf-3070603" +PKG_VERSION="autoconf-3070701" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="PublicDomain" PKG_SITE="http://www.sqlite.org/" -PKG_URL="http://www.hwaci.com/sw/sqlite/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_URL="http://sqlite.org/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" diff --git a/packages/devel/libevent/meta b/packages/devel/libevent/meta index 14572571fa..1bea224424 100644 --- a/packages/devel/libevent/meta +++ b/packages/devel/libevent/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libevent" -PKG_VERSION="2.0.10-stable" +PKG_VERSION="2.0.12-stable" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="BSD" diff --git a/packages/graphics/Mesa/build b/packages/graphics/Mesa/build index 1fa5ad7532..a897c51231 100755 --- a/packages/graphics/Mesa/build +++ b/packages/graphics/Mesa/build @@ -29,51 +29,13 @@ get_graphicdrivers strip_linker_plugin strip_lto # Mesa fails to build with LTO optimization -# TODO: - LDFLAGS="" - -MESA_CONFIG=" --disable-gallium --disable-gallium-nouveau --disable-gallium-i915 --disable-gallium-i965" -MESA_CONFIG="$MESA_CONFIG --disable-gallium-radeon --disable-gallium-r300 --disable-gallium-r600" -MESA_CONFIG="$MESA_CONFIG --disable-gallium-svga --disable-gallium-swrast" - if [ "$LLVM_SUPPORT" = "yes" ]; then export LLVM_CONFIG="$SYSROOT_PREFIX/usr/bin/llvm-config" - MESA_CONFIG="$MESA_CONFIG --enable-gallium --enable-gallium-llvm" + MESA_GALLIUM_LLVM="--enable-gallium-llvm" +else + MESA_GALLIUM_LLVM="--disable-gallium-llvm" fi -for drv in $GRAPHIC_DRIVERS; do - if [ "$drv" = i915 ]; then - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-i915/disable-gallium-i915/'` - # MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx --enable-gallium" - fi - - if [ "$drv" = i965 ]; then - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-i965/disable-gallium-i965/'` - # MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx --enable-gallium" - fi - - if [ "$drv" = r300 -o "$drv" = radeon ]; then - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-radeon/enable-gallium-radeon/'` - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-r300/enable-gallium-r300/'` - MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx --enable-gallium" - fi - - if [ "$drv" = r600 ]; then - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-r600/enable-gallium-r600/'` - MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx --enable-gallium" - fi - - if [ "$drv" = nouveau ]; then - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-nouveau/enable-gallium-nouveau/'` - MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx --enable-gallium" - fi - - if [ "$drv" = vmware ]; then - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-svga/enable-gallium-svga/'` - MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx --enable-gallium" - fi -done - cd $PKG_BUILD HOST_CC="$HOST_CC" \ @@ -88,6 +50,7 @@ DRI_DRIVER_SEARCH_DIR="$XORG_PATH_DRI" \ --localstatedir=/var \ --disable-static \ --enable-shared \ + --enable-shared-dricore \ --disable-debug \ --disable-selinux \ --enable-xcb \ @@ -99,11 +62,24 @@ DRI_DRIVER_SEARCH_DIR="$XORG_PATH_DRI" \ --disable-glut \ --disable-glw \ --disable-motif \ - $MESA_CONFIG \ + --with-gallium-drivers="$GALLIUM_DRIVERS" \ + $MESA_GALLIUM_LLVM \ --with-driver="dri" \ - --with-dri-drivers="$MESA_DRIVERS" \ + --with-dri-drivers="$DRI_DRIVERS" \ --with-xorg-driver-dir="$XORG_PATH_DRIVERS" \ +make CC="$HOST_CC" \ + CXX="$HOST_CXX" \ + CFLAGS="$HOST_CFLAGS" \ + CXXFLAGS="$HOST_CXXFLAGS" \ + LDFLAGS="$HOST_LDFLAGS" \ + -C src/glsl builtin_compiler + +cp src/glsl/builtin_compiler $ROOT/$TOOLCHAIN/bin +make -C src/glsl clean + +sed -e "s#\.\/builtin_compiler#$ROOT/$TOOLCHAIN/bin/builtin_compiler#g" -i src/glsl/Makefile + make $MAKEINSTALL -C src/mesa diff --git a/packages/graphics/Mesa/install b/packages/graphics/Mesa/install index 99fbcde653..bbaa1750e2 100755 --- a/packages/graphics/Mesa/install +++ b/packages/graphics/Mesa/install @@ -27,6 +27,8 @@ mkdir -p $INSTALL/usr/lib ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so ln -sf /var/lib/libGL.so $INSTALL/usr/lib/libGL.so.1 cp -P $PKG_BUILD/lib/libGLU.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/libdricore.so $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/libglsl.so $INSTALL/usr/lib mkdir -p $INSTALL/usr/lib/dri cp -P $PKG_BUILD/lib/*_dri.so $INSTALL/usr/lib/dri || true diff --git a/packages/graphics/Mesa/meta b/packages/graphics/Mesa/meta index d4fb4d2537..3ab1ac090d 100644 --- a/packages/graphics/Mesa/meta +++ b/packages/graphics/Mesa/meta @@ -19,12 +19,13 @@ ################################################################################ PKG_NAME="Mesa" -PKG_VERSION="7.10.3" +PKG_VERSION="7.11-b90c710" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.mesa3d.org/" -PKG_URL="ftp://ftp.freedesktop.org/pub/mesa/$PKG_VERSION/MesaLib-$PKG_VERSION.tar.bz2" +#PKG_URL="ftp://ftp.freedesktop.org/pub/mesa/$PKG_VERSION/MesaLib-$PKG_VERSION.tar.bz2" +PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libXxf86vm libxcb libX11" PKG_BUILD_DEPENDS="toolchain Python makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" PKG_PRIORITY="optional" @@ -39,10 +40,6 @@ get_graphicdrivers if [ "$LLVM_SUPPORT" = "yes" ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS llvm" - PKG_DEPENDS="$PKG_DEPENDS llvm" -fi - -if [ "$MESA_MASTER" = "yes" ]; then - PKG_VERSION="7.11-git2812b60" - PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" +# actually we dont need llvm installed because its linked statically +# PKG_DEPENDS="$PKG_DEPENDS llvm" fi diff --git a/packages/graphics/Mesa/patches/Mesa-7.10.3-__atom.patch b/packages/graphics/Mesa/patches/Mesa-7.10.3-__atom.patch deleted file mode 100644 index 1787a37369..0000000000 --- a/packages/graphics/Mesa/patches/Mesa-7.10.3-__atom.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/r200/r200_cmdbuf.c Mesa-7.10.1-new/src/mesa/drivers/dri/r200/r200_cmdbuf.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/r200/r200_cmdbuf.c 2011-03-02 17:30:39.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/r200/r200_cmdbuf.c 2011-03-02 17:31:59.000000000 -0800 -@@ -47,9 +47,8 @@ - */ - #define insert_at_tail_if(atom_list, atom) \ - do { \ -- struct radeon_state_atom* __atom = (atom); \ -- if (__atom->check) \ -- insert_at_tail((atom_list), __atom); \ -+ if ((atom)->check) \ -+ insert_at_tail((atom_list), (atom)); \ - } while(0) - - void r200SetUpAtomList( r200ContextPtr rmesa ) diff --git a/packages/graphics/Mesa/patches/Mesa-7.10.3-libdrm_nouveau.patch b/packages/graphics/Mesa/patches/Mesa-7.10.3-libdrm_nouveau.patch deleted file mode 100644 index 445e9170b3..0000000000 --- a/packages/graphics/Mesa/patches/Mesa-7.10.3-libdrm_nouveau.patch +++ /dev/null @@ -1,208 +0,0 @@ -diff -Naur Mesa-7.10.1-old/src/gallium/drivers/nv50/nv50_context.h Mesa-7.10.1-new/src/gallium/drivers/nv50/nv50_context.h ---- Mesa-7.10.1-old/src/gallium/drivers/nv50/nv50_context.h 2010-12-15 15:02:44.000000000 -0800 -+++ Mesa-7.10.1-new/src/gallium/drivers/nv50/nv50_context.h 2011-03-02 17:31:09.000000000 -0800 -@@ -15,6 +15,8 @@ - - #include "nouveau/nouveau_winsys.h" - #include "nouveau/nouveau_gldefs.h" -+/* Hack to silence warnings caused by nouveau/nouveau_stateobj.h using BEGIN_BIND marcro */ -+#include - #include "nouveau/nouveau_stateobj.h" - #include "nv50_reg.h" - -diff -Naur Mesa-7.10.1-old/src/gallium/drivers/nvfx/nv04_2d.c Mesa-7.10.1-new/src/gallium/drivers/nvfx/nv04_2d.c ---- Mesa-7.10.1-old/src/gallium/drivers/nvfx/nv04_2d.c 2011-01-25 15:52:45.000000000 -0800 -+++ Mesa-7.10.1-new/src/gallium/drivers/nvfx/nv04_2d.c 2011-03-02 17:31:09.000000000 -0800 -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - #include "nv04_2d.h" - - #include "nouveau/nv_object.xml.h" -diff -Naur Mesa-7.10.1-old/src/gallium/drivers/nvfx/nvfx_buffer.c Mesa-7.10.1-new/src/gallium/drivers/nvfx/nvfx_buffer.c ---- Mesa-7.10.1-old/src/gallium/drivers/nvfx/nvfx_buffer.c 2010-12-15 15:02:44.000000000 -0800 -+++ Mesa-7.10.1-new/src/gallium/drivers/nvfx/nvfx_buffer.c 2011-03-02 17:31:09.000000000 -0800 -@@ -1,4 +1,3 @@ -- - #include "util/u_inlines.h" - #include "util/u_memory.h" - #include "util/u_math.h" -diff -Naur Mesa-7.10.1-old/src/gallium/drivers/nvfx/nvfx_screen.c Mesa-7.10.1-new/src/gallium/drivers/nvfx/nvfx_screen.c ---- Mesa-7.10.1-old/src/gallium/drivers/nvfx/nvfx_screen.c 2011-01-25 15:52:45.000000000 -0800 -+++ Mesa-7.10.1-new/src/gallium/drivers/nvfx/nvfx_screen.c 2011-03-02 17:31:09.000000000 -0800 -@@ -10,6 +10,8 @@ - #include "nvfx_resource.h" - #include "nvfx_tex.h" - -+#include "nouveau/nv04_pushbuf.h" -+ - #define NV30_3D_CHIPSET_3X_MASK 0x00000003 - #define NV34_3D_CHIPSET_3X_MASK 0x00000010 - #define NV35_3D_CHIPSET_3X_MASK 0x000001e0 -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv04_driver.h Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv04_driver.h ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv04_driver.h 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv04_driver.h 2011-03-02 17:31:09.000000000 -0800 -@@ -28,6 +28,7 @@ - #define __NV04_DRIVER_H__ - - #include "nv04_context.h" -+#include "nv04_pushbuf.h" - - enum { - NOUVEAU_STATE_BLEND = NUM_NOUVEAU_STATE, -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_render.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_render.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_render.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_render.c 2011-03-02 17:31:09.000000000 -0800 -@@ -27,6 +27,7 @@ - #include "nouveau_driver.h" - #include "nouveau_context.h" - #include "nv10_3d.xml.h" -+#include "nv04_driver.h" - #include "nv10_driver.h" - - #define NUM_VERTEX_ATTRS 8 -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_fb.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_fb.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_fb.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_fb.c 2011-03-02 17:31:09.000000000 -0800 -@@ -30,6 +30,7 @@ - #include "nouveau_util.h" - #include "nv_object.xml.h" - #include "nv10_3d.xml.h" -+#include "nv04_driver.h" - #include "nv10_driver.h" - - static inline unsigned -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_frag.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_frag.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_frag.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_frag.c 2011-03-02 17:31:09.000000000 -0800 -@@ -30,6 +30,7 @@ - #include "nv10_3d.xml.h" - #include "nouveau_util.h" - #include "nv10_driver.h" -+#include "nv04_driver.h" - #include "nv20_driver.h" - - #define RC_IN_SHIFT_A 24 -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c 2011-03-02 17:31:09.000000000 -0800 -@@ -29,6 +29,7 @@ - #include "nouveau_gldefs.h" - #include "nouveau_util.h" - #include "nv10_3d.xml.h" -+#include "nv04_driver.h" - #include "nv10_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_raster.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_raster.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_raster.c 2011-01-25 15:52:45.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_raster.c 2011-03-02 17:31:09.000000000 -0800 -@@ -29,6 +29,7 @@ - #include "nouveau_gldefs.h" - #include "nouveau_util.h" - #include "nv10_3d.xml.h" -+#include "nv04_driver.h" - #include "nv10_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_tex.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_tex.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_tex.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_tex.c 2011-03-02 17:31:09.000000000 -0800 -@@ -30,6 +30,7 @@ - #include "nouveau_texture.h" - #include "nv10_3d.xml.h" - #include "nouveau_util.h" -+#include "nv04_driver.h" - #include "nv10_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c 2011-03-02 17:31:09.000000000 -0800 -@@ -29,6 +29,7 @@ - #include "nouveau_gldefs.h" - #include "nouveau_util.h" - #include "nv10_3d.xml.h" -+#include "nv04_driver.h" - #include "nv10_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_render.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_render.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_render.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_render.c 2011-03-02 17:31:09.000000000 -0800 -@@ -27,6 +27,7 @@ - #include "nouveau_driver.h" - #include "nouveau_context.h" - #include "nv20_3d.xml.h" -+#include "nv04_driver.h" - #include "nv20_driver.h" - - #define NUM_VERTEX_ATTRS 16 -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_fb.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_fb.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_fb.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_fb.c 2011-03-02 17:31:09.000000000 -0800 -@@ -30,6 +30,7 @@ - #include "nouveau_gldefs.h" - #include "nouveau_util.h" - #include "nv20_3d.xml.h" -+#include "nv04_driver.h" - #include "nv20_driver.h" - - static inline unsigned -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_frag.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_frag.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_frag.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_frag.c 2011-03-02 17:31:09.000000000 -0800 -@@ -28,6 +28,7 @@ - #include "nouveau_context.h" - #include "nv20_3d.xml.h" - #include "nv10_driver.h" -+#include "nv04_driver.h" - #include "nv20_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c 2011-03-02 17:31:09.000000000 -0800 -@@ -28,6 +28,7 @@ - #include "nouveau_context.h" - #include "nouveau_gldefs.h" - #include "nv20_3d.xml.h" -+#include "nv04_driver.h" - #include "nv20_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_raster.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_raster.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_raster.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_raster.c 2011-03-02 17:31:09.000000000 -0800 -@@ -29,6 +29,7 @@ - #include "nouveau_gldefs.h" - #include "nouveau_util.h" - #include "nv20_3d.xml.h" -+#include "nv04_driver.h" - #include "nv20_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_tex.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_tex.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_tex.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_tex.c 2011-03-02 17:31:09.000000000 -0800 -@@ -30,6 +30,7 @@ - #include "nouveau_texture.h" - #include "nv20_3d.xml.h" - #include "nouveau_util.h" -+#include "nv04_driver.h" - #include "nv20_driver.h" - - void -diff -Naur Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c ---- Mesa-7.10.1-old/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c 2010-12-14 13:43:15.000000000 -0800 -+++ Mesa-7.10.1-new/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c 2011-03-02 17:31:09.000000000 -0800 -@@ -29,6 +29,7 @@ - #include "nouveau_gldefs.h" - #include "nouveau_util.h" - #include "nv20_3d.xml.h" -+#include "nv04_driver.h" - #include "nv10_driver.h" - #include "nv20_driver.h" - diff --git a/packages/graphics/Mesa/patches/Mesa-7.10.3-llvm_so.patch b/packages/graphics/Mesa/patches/Mesa-7.10.3-llvm_so.patch deleted file mode 100644 index 8a924662ca..0000000000 --- a/packages/graphics/Mesa/patches/Mesa-7.10.3-llvm_so.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Mesa-7.10.2-old/configure.ac Mesa-7.10.2-new/configure.ac ---- Mesa-7.10.2-old/configure.ac 2011-02-11 14:49:47.000000000 -0800 -+++ Mesa-7.10.2-new/configure.ac 2011-05-05 16:31:18.000000000 -0700 -@@ -1551,7 +1551,7 @@ - if test "x$LLVM_CONFIG" != xno; then - LLVM_VERSION=`$LLVM_CONFIG --version` - LLVM_CFLAGS=`$LLVM_CONFIG --cppflags` -- LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen bitwriter` -lstdc++" -+ LLVM_LIBS="-lLLVM-$LLVM_VERSION -lstdc++" - - if test "x$HAS_UDIS86" != xno; then - LLVM_LIBS="$LLVM_LIBS -ludis86" diff --git a/packages/graphics/Mesa/patches/Mesa-7.10.3-llvmpipe_ld.patch b/packages/graphics/Mesa/patches/Mesa-7.10.3-llvmpipe_ld.patch deleted file mode 100644 index 1fa972db2e..0000000000 --- a/packages/graphics/Mesa/patches/Mesa-7.10.3-llvmpipe_ld.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Mesa-7.10.2-old/src/gallium/drivers/llvmpipe/Makefile Mesa-7.10.2-new/src/gallium/drivers/llvmpipe/Makefile ---- Mesa-7.10.2-old/src/gallium/drivers/llvmpipe/Makefile 2011-01-04 09:44:17.000000000 -0800 -+++ Mesa-7.10.2-new/src/gallium/drivers/llvmpipe/Makefile 2011-05-05 15:48:06.000000000 -0700 -@@ -71,7 +71,7 @@ - - LDFLAGS += $(LLVM_LDFLAGS) - LIBS += -L../../auxiliary/ -lgallium libllvmpipe.a $(LLVM_LIBS) $(GL_LIB_DEPS) --LD=g++ -+LD = $(CXX) - - $(PROGS): lp_test_main.o libllvmpipe.a - diff --git a/packages/graphics/libdrm/meta b/packages/graphics/libdrm/meta index 0d6f1acc8b..33f5a84839 100644 --- a/packages/graphics/libdrm/meta +++ b/packages/graphics/libdrm/meta @@ -25,8 +25,8 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://dri.freedesktop.org" PKG_URL="http://dri.freedesktop.org/libdrm/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="udev" -PKG_BUILD_DEPENDS="toolchain libpthread-stubs udev" +PKG_DEPENDS="udev libpciaccess" +PKG_BUILD_DEPENDS="toolchain libpthread-stubs udev libpciaccess" PKG_PRIORITY="optional" PKG_SECTION="graphics" PKG_SHORTDESC="libdrm: Userspace interface to kernel DRM services" diff --git a/packages/linux-firmware/wlan-firmware/meta b/packages/linux-firmware/wlan-firmware/meta index 2d624d1725..2020a2162a 100644 --- a/packages/linux-firmware/wlan-firmware/meta +++ b/packages/linux-firmware/wlan-firmware/meta @@ -19,12 +19,12 @@ ################################################################################ PKG_NAME="wlan-firmware" -PKG_VERSION="0.0.4" +PKG_VERSION="0.0.5" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="Free-to-use" PKG_SITE="https://github.com/OpenELEC/wlan-firmware" -PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" diff --git a/packages/linux/meta b/packages/linux/meta index 2a6561b383..f20af6dd52 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="linux" -PKG_VERSION="3.0-rc4" +PKG_VERSION="3.0-rc5" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/linux/patches/linux-3.0-rc4-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch b/packages/linux/patches/linux-3.0-rc4-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch deleted file mode 100644 index 60fecc3968..0000000000 --- a/packages/linux/patches/linux-3.0-rc4-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur linux-2.6.39-rc6/drivers/ata/libata-core.c linux-2.6.39-rc6.patch/drivers/ata/libata-core.c ---- linux-2.6.39-rc6/drivers/ata/libata-core.c 2011-05-04 04:59:13.000000000 +0200 -+++ linux-2.6.39-rc6.patch/drivers/ata/libata-core.c 2011-05-04 19:59:38.952317088 +0200 -@@ -4139,6 +4139,7 @@ - */ - { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER }, - { "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER }, -+ { "PIONEER DVD-RW DVR-216D", "1.07", ATA_HORKAGE_NOSETXFER }, - { "PIONEER DVD-RW DVR-216D", "1.08", ATA_HORKAGE_NOSETXFER }, - - /* End Marker */ diff --git a/packages/linux/patches/linux-3.0-rc4-000_crosscompile.patch b/packages/linux/patches/linux-3.0-rc5-000_crosscompile.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-000_crosscompile.patch rename to packages/linux/patches/linux-3.0-rc5-000_crosscompile.patch diff --git a/packages/linux/patches/linux-3.0-rc4-003-no_dev_console.patch b/packages/linux/patches/linux-3.0-rc5-003-no_dev_console.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-003-no_dev_console.patch rename to packages/linux/patches/linux-3.0-rc5-003-no_dev_console.patch diff --git a/packages/linux/patches/linux-3.0-rc4-004_lower_undefined_mode_timeout.patch b/packages/linux/patches/linux-3.0-rc5-004_lower_undefined_mode_timeout.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-004_lower_undefined_mode_timeout.patch rename to packages/linux/patches/linux-3.0-rc5-004_lower_undefined_mode_timeout.patch diff --git a/packages/linux/patches/linux-3.0-rc4-006_enable_utf8.patch b/packages/linux/patches/linux-3.0-rc5-006_enable_utf8.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-006_enable_utf8.patch rename to packages/linux/patches/linux-3.0-rc5-006_enable_utf8.patch diff --git a/packages/linux/patches/linux-3.0-rc4-007_die_floppy_die.patch b/packages/linux/patches/linux-3.0-rc5-007_die_floppy_die.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-007_die_floppy_die.patch rename to packages/linux/patches/linux-3.0-rc5-007_die_floppy_die.patch diff --git a/packages/linux/patches/linux-3.0-rc4-008-hda_intel_prealloc_4mb_dmabuffer.patch b/packages/linux/patches/linux-3.0-rc5-008-hda_intel_prealloc_4mb_dmabuffer.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-008-hda_intel_prealloc_4mb_dmabuffer.patch rename to packages/linux/patches/linux-3.0-rc5-008-hda_intel_prealloc_4mb_dmabuffer.patch diff --git a/packages/linux/patches/linux-3.0-rc4-009_disable_i8042_check_on_apple_mac.patch b/packages/linux/patches/linux-3.0-rc5-009_disable_i8042_check_on_apple_mac.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-009_disable_i8042_check_on_apple_mac.patch rename to packages/linux/patches/linux-3.0-rc5-009_disable_i8042_check_on_apple_mac.patch diff --git a/packages/linux/patches/linux-3.0-rc4-050_add_appleir_usb_driver.patch b/packages/linux/patches/linux-3.0-rc5-050_add_appleir_usb_driver.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-050_add_appleir_usb_driver.patch rename to packages/linux/patches/linux-3.0-rc5-050_add_appleir_usb_driver.patch diff --git a/packages/linux/patches/linux-3.0-rc4-051-call_input_sync_after_scancode_reports.patch b/packages/linux/patches/linux-3.0-rc5-051-call_input_sync_after_scancode_reports.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-051-call_input_sync_after_scancode_reports.patch rename to packages/linux/patches/linux-3.0-rc5-051-call_input_sync_after_scancode_reports.patch diff --git a/packages/linux/patches/linux-3.0-rc4-052-aureal_remote_quirk-0.1.patch b/packages/linux/patches/linux-3.0-rc5-052-aureal_remote_quirk-0.1.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-052-aureal_remote_quirk-0.1.patch rename to packages/linux/patches/linux-3.0-rc5-052-aureal_remote_quirk-0.1.patch diff --git a/packages/linux/patches/linux-3.0-rc4-053_ati-remote_all_keys_and_keychange-0.1.patch b/packages/linux/patches/linux-3.0-rc5-053_ati-remote_all_keys_and_keychange-0.1.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-053_ati-remote_all_keys_and_keychange-0.1.patch rename to packages/linux/patches/linux-3.0-rc5-053_ati-remote_all_keys_and_keychange-0.1.patch diff --git a/packages/linux/patches/linux-3.0-rc4-058-add_rtl2832u_dvb-usb_driver-0.1.patch b/packages/linux/patches/linux-3.0-rc5-058-add_rtl2832u_dvb-usb_driver-0.1.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-058-add_rtl2832u_dvb-usb_driver-0.1.patch rename to packages/linux/patches/linux-3.0-rc5-058-add_rtl2832u_dvb-usb_driver-0.1.patch diff --git a/packages/linux/patches/linux-3.0-rc4-059-rtl2832u_change_value_of_USB_PID_GTEK_WARM-0.1.patch b/packages/linux/patches/linux-3.0-rc5-059-rtl2832u_change_value_of_USB_PID_GTEK_WARM-0.1.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-059-rtl2832u_change_value_of_USB_PID_GTEK_WARM-0.1.patch rename to packages/linux/patches/linux-3.0-rc5-059-rtl2832u_change_value_of_USB_PID_GTEK_WARM-0.1.patch diff --git a/packages/linux/patches/linux-3.0-rc4-071-silence_i915_agp-module-0.1.patch b/packages/linux/patches/linux-3.0-rc5-071-silence_i915_agp-module-0.1.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-071-silence_i915_agp-module-0.1.patch rename to packages/linux/patches/linux-3.0-rc5-071-silence_i915_agp-module-0.1.patch diff --git a/packages/linux/patches/linux-3.0-rc5-110-drm_nouveau_upstream-20110626.1.patch b/packages/linux/patches/linux-3.0-rc5-110-drm_nouveau_upstream-20110626.1.patch new file mode 100644 index 0000000000..10f3895146 --- /dev/null +++ b/packages/linux/patches/linux-3.0-rc5-110-drm_nouveau_upstream-20110626.1.patch @@ -0,0 +1,8765 @@ +diff -Naur linux-3.0-rc4/drivers/gpu/drm/drm_gem.c linux-3.0-rc4.nouveau/drivers/gpu/drm/drm_gem.c +--- linux-3.0-rc4/drivers/gpu/drm/drm_gem.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/drm_gem.c 2011-06-26 07:59:23.000000000 +0200 +@@ -210,6 +210,8 @@ + idr_remove(&filp->object_idr, handle); + spin_unlock(&filp->table_lock); + ++ if (dev->driver->gem_close_object) ++ dev->driver->gem_close_object(obj, filp); + drm_gem_object_handle_unreference_unlocked(obj); + + return 0; +@@ -226,7 +228,8 @@ + struct drm_gem_object *obj, + u32 *handlep) + { +- int ret; ++ struct drm_device *dev = obj->dev; ++ int ret; + + /* + * Get the user-visible handle using idr. +@@ -247,6 +250,15 @@ + return ret; + + drm_gem_object_handle_reference(obj); ++ ++ if (dev->driver->gem_open_object) { ++ ret = dev->driver->gem_open_object(obj, file_priv); ++ if (ret) { ++ drm_gem_handle_delete(file_priv, *handlep); ++ return ret; ++ } ++ } ++ + return 0; + } + EXPORT_SYMBOL(drm_gem_handle_create); +@@ -401,7 +413,12 @@ + static int + drm_gem_object_release_handle(int id, void *ptr, void *data) + { ++ struct drm_file *file_priv = data; + struct drm_gem_object *obj = ptr; ++ struct drm_device *dev = obj->dev; ++ ++ if (dev->driver->gem_close_object) ++ dev->driver->gem_close_object(obj, file_priv); + + drm_gem_object_handle_unreference_unlocked(obj); + +@@ -417,7 +434,7 @@ + drm_gem_release(struct drm_device *dev, struct drm_file *file_private) + { + idr_for_each(&file_private->object_idr, +- &drm_gem_object_release_handle, NULL); ++ &drm_gem_object_release_handle, file_private); + + idr_remove_all(&file_private->object_idr); + idr_destroy(&file_private->object_idr); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/Makefile linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/Makefile +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/Makefile 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/Makefile 2011-06-26 07:59:23.000000000 +0200 +@@ -21,7 +21,7 @@ + nv40_grctx.o nv50_grctx.o nvc0_grctx.o \ + nv84_crypt.o \ + nva3_copy.o nvc0_copy.o \ +- nv40_mpeg.o nv50_mpeg.o \ ++ nv31_mpeg.o nv50_mpeg.o \ + nv04_instmem.o nv50_instmem.o nvc0_instmem.o \ + nv50_evo.o nv50_crtc.o nv50_dac.o nv50_sor.o \ + nv50_cursor.o nv50_display.o \ +@@ -30,7 +30,7 @@ + nv04_fbcon.o nv50_fbcon.o nvc0_fbcon.o \ + nv10_gpio.o nv50_gpio.o \ + nv50_calc.o \ +- nv04_pm.o nv50_pm.o nva3_pm.o \ ++ nv04_pm.o nv50_pm.o nva3_pm.o nvc0_pm.o \ + nv50_vram.o nvc0_vram.o \ + nv50_vm.o nvc0_vm.o + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_bios.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-06-26 07:59:23.000000000 +0200 +@@ -135,13 +135,14 @@ + int i; + + if (dev_priv->card_type >= NV_50) { +- uint32_t vbios_vram = (nv_rd32(dev, 0x619f04) & ~0xff) << 8; +- +- if (!vbios_vram) +- vbios_vram = (nv_rd32(dev, 0x1700) << 16) + 0xf0000; ++ u64 addr = (u64)(nv_rd32(dev, 0x619f04) & 0xffffff00) << 8; ++ if (!addr) { ++ addr = (u64)nv_rd32(dev, 0x1700) << 16; ++ addr += 0xf0000; ++ } + + old_bar0_pramin = nv_rd32(dev, 0x1700); +- nv_wr32(dev, 0x1700, vbios_vram >> 16); ++ nv_wr32(dev, 0x1700, addr >> 16); + } + + /* bail if no rom signature */ +@@ -5186,7 +5187,7 @@ + load_table_ptr = ROM16(bios->data[bitentry->offset]); + + if (load_table_ptr == 0x0) { +- NV_ERROR(dev, "Pointer to BIT loadval table invalid\n"); ++ NV_DEBUG(dev, "Pointer to BIT loadval table invalid\n"); + return -EINVAL; + } + +@@ -6377,6 +6378,37 @@ + } + } + ++ /* Some other twisted XFX board (rhbz#694914) ++ * ++ * The DVI/VGA encoder combo that's supposed to represent the ++ * DVI-I connector actually point at two different ones, and ++ * the HDMI connector ends up paired with the VGA instead. ++ * ++ * Connector table is missing anything for VGA at all, pointing it ++ * an invalid conntab entry 2 so we figure it out ourself. ++ */ ++ if (nv_match_device(dev, 0x0615, 0x1682, 0x2605)) { ++ if (idx == 0) { ++ *conn = 0x02002300; /* VGA, connector 2 */ ++ *conf = 0x00000028; ++ } else ++ if (idx == 1) { ++ *conn = 0x01010312; /* DVI, connector 0 */ ++ *conf = 0x00020030; ++ } else ++ if (idx == 2) { ++ *conn = 0x04020310; /* VGA, connector 0 */ ++ *conf = 0x00000028; ++ } else ++ if (idx == 3) { ++ *conn = 0x02021322; /* HDMI, connector 1 */ ++ *conf = 0x00020010; ++ } else { ++ *conn = 0x0000000e; /* EOL */ ++ *conf = 0x00000000; ++ } ++ } ++ + return true; + } + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_bo.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_bo.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2011-06-26 07:59:23.000000000 +0200 +@@ -49,16 +49,12 @@ + DRM_ERROR("bo %p still attached to GEM object\n", bo); + + nv10_mem_put_tile_region(dev, nvbo->tile, NULL); +- if (nvbo->vma.node) { +- nouveau_vm_unmap(&nvbo->vma); +- nouveau_vm_put(&nvbo->vma); +- } + kfree(nvbo); + } + + static void + nouveau_bo_fixup_align(struct nouveau_bo *nvbo, u32 flags, +- int *align, int *size, int *page_shift) ++ int *align, int *size) + { + struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); + +@@ -82,67 +78,51 @@ + } + } + } else { +- if (likely(dev_priv->chan_vm)) { +- if (!(flags & TTM_PL_FLAG_TT) && *size > 256 * 1024) +- *page_shift = dev_priv->chan_vm->lpg_shift; +- else +- *page_shift = dev_priv->chan_vm->spg_shift; +- } else { +- *page_shift = 12; +- } +- +- *size = roundup(*size, (1 << *page_shift)); +- *align = max((1 << *page_shift), *align); ++ *size = roundup(*size, (1 << nvbo->page_shift)); ++ *align = max((1 << nvbo->page_shift), *align); + } + + *size = roundup(*size, PAGE_SIZE); + } + + int +-nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, +- int size, int align, uint32_t flags, uint32_t tile_mode, +- uint32_t tile_flags, struct nouveau_bo **pnvbo) ++nouveau_bo_new(struct drm_device *dev, int size, int align, ++ uint32_t flags, uint32_t tile_mode, uint32_t tile_flags, ++ struct nouveau_bo **pnvbo) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_bo *nvbo; +- int ret = 0, page_shift = 0; ++ int ret; + + nvbo = kzalloc(sizeof(struct nouveau_bo), GFP_KERNEL); + if (!nvbo) + return -ENOMEM; + INIT_LIST_HEAD(&nvbo->head); + INIT_LIST_HEAD(&nvbo->entry); ++ INIT_LIST_HEAD(&nvbo->vma_list); + nvbo->tile_mode = tile_mode; + nvbo->tile_flags = tile_flags; + nvbo->bo.bdev = &dev_priv->ttm.bdev; + +- nouveau_bo_fixup_align(nvbo, flags, &align, &size, &page_shift); +- align >>= PAGE_SHIFT; +- +- if (dev_priv->chan_vm) { +- ret = nouveau_vm_get(dev_priv->chan_vm, size, page_shift, +- NV_MEM_ACCESS_RW, &nvbo->vma); +- if (ret) { +- kfree(nvbo); +- return ret; +- } ++ nvbo->page_shift = 12; ++ if (dev_priv->bar1_vm) { ++ if (!(flags & TTM_PL_FLAG_TT) && size > 256 * 1024) ++ nvbo->page_shift = dev_priv->bar1_vm->lpg_shift; + } + ++ nouveau_bo_fixup_align(nvbo, flags, &align, &size); + nvbo->bo.mem.num_pages = size >> PAGE_SHIFT; + nouveau_bo_placement_set(nvbo, flags, 0); + +- nvbo->channel = chan; + ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, +- ttm_bo_type_device, &nvbo->placement, align, 0, +- false, NULL, size, nouveau_bo_del_ttm); ++ ttm_bo_type_device, &nvbo->placement, ++ align >> PAGE_SHIFT, 0, false, NULL, size, ++ nouveau_bo_del_ttm); + if (ret) { + /* ttm will call nouveau_bo_del_ttm if it fails.. */ + return ret; + } +- nvbo->channel = NULL; + +- if (nvbo->vma.node) +- nvbo->bo.offset = nvbo->vma.offset; + *pnvbo = nvbo; + return 0; + } +@@ -312,8 +292,6 @@ + if (ret) + return ret; + +- if (nvbo->vma.node) +- nvbo->bo.offset = nvbo->vma.offset; + return 0; + } + +@@ -440,7 +418,6 @@ + TTM_MEMTYPE_FLAG_CMA; + man->available_caching = TTM_PL_MASK_CACHING; + man->default_caching = TTM_PL_FLAG_CACHED; +- man->gpu_offset = dev_priv->gart_info.aper_base; + break; + default: + NV_ERROR(dev, "Unknown GART type: %d\n", +@@ -501,19 +478,12 @@ + nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, + struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) + { +- struct nouveau_mem *old_node = old_mem->mm_node; +- struct nouveau_mem *new_node = new_mem->mm_node; +- struct nouveau_bo *nvbo = nouveau_bo(bo); ++ struct nouveau_mem *node = old_mem->mm_node; ++ u64 src_offset = node->vma[0].offset; ++ u64 dst_offset = node->vma[1].offset; + u32 page_count = new_mem->num_pages; +- u64 src_offset, dst_offset; + int ret; + +- src_offset = old_node->tmp_vma.offset; +- if (new_node->tmp_vma.node) +- dst_offset = new_node->tmp_vma.offset; +- else +- dst_offset = nvbo->vma.offset; +- + page_count = new_mem->num_pages; + while (page_count) { + int line_count = (page_count > 2047) ? 2047 : page_count; +@@ -547,19 +517,13 @@ + nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, + struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) + { +- struct nouveau_mem *old_node = old_mem->mm_node; +- struct nouveau_mem *new_node = new_mem->mm_node; ++ struct nouveau_mem *node = old_mem->mm_node; + struct nouveau_bo *nvbo = nouveau_bo(bo); + u64 length = (new_mem->num_pages << PAGE_SHIFT); +- u64 src_offset, dst_offset; ++ u64 src_offset = node->vma[0].offset; ++ u64 dst_offset = node->vma[1].offset; + int ret; + +- src_offset = old_node->tmp_vma.offset; +- if (new_node->tmp_vma.node) +- dst_offset = new_node->tmp_vma.offset; +- else +- dst_offset = nvbo->vma.offset; +- + while (length) { + u32 amount, stride, height; + +@@ -695,6 +659,27 @@ + } + + static int ++nouveau_vma_getmap(struct nouveau_channel *chan, struct nouveau_bo *nvbo, ++ struct ttm_mem_reg *mem, struct nouveau_vma *vma) ++{ ++ struct nouveau_mem *node = mem->mm_node; ++ int ret; ++ ++ ret = nouveau_vm_get(chan->vm, mem->num_pages << PAGE_SHIFT, ++ node->page_shift, NV_MEM_ACCESS_RO, vma); ++ if (ret) ++ return ret; ++ ++ if (mem->mem_type == TTM_PL_VRAM) ++ nouveau_vm_map(vma, node); ++ else ++ nouveau_vm_map_sg(vma, 0, mem->num_pages << PAGE_SHIFT, ++ node, node->pages); ++ ++ return 0; ++} ++ ++static int + nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr, + bool no_wait_reserve, bool no_wait_gpu, + struct ttm_mem_reg *new_mem) +@@ -711,31 +696,20 @@ + mutex_lock_nested(&chan->mutex, NOUVEAU_KCHANNEL_MUTEX); + } + +- /* create temporary vma for old memory, this will get cleaned +- * up after ttm destroys the ttm_mem_reg ++ /* create temporary vmas for the transfer and attach them to the ++ * old nouveau_mem node, these will get cleaned up after ttm has ++ * destroyed the ttm_mem_reg + */ + if (dev_priv->card_type >= NV_50) { + struct nouveau_mem *node = old_mem->mm_node; +- if (!node->tmp_vma.node) { +- u32 page_shift = nvbo->vma.node->type; +- if (old_mem->mem_type == TTM_PL_TT) +- page_shift = nvbo->vma.vm->spg_shift; +- +- ret = nouveau_vm_get(chan->vm, +- old_mem->num_pages << PAGE_SHIFT, +- page_shift, NV_MEM_ACCESS_RO, +- &node->tmp_vma); +- if (ret) +- goto out; +- } + +- if (old_mem->mem_type == TTM_PL_VRAM) +- nouveau_vm_map(&node->tmp_vma, node); +- else { +- nouveau_vm_map_sg(&node->tmp_vma, 0, +- old_mem->num_pages << PAGE_SHIFT, +- node, node->pages); +- } ++ ret = nouveau_vma_getmap(chan, nvbo, old_mem, &node->vma[0]); ++ if (ret) ++ goto out; ++ ++ ret = nouveau_vma_getmap(chan, nvbo, new_mem, &node->vma[1]); ++ if (ret) ++ goto out; + } + + if (dev_priv->card_type < NV_50) +@@ -762,7 +736,6 @@ + bool no_wait_reserve, bool no_wait_gpu, + struct ttm_mem_reg *new_mem) + { +- struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); + u32 placement_memtype = TTM_PL_FLAG_TT | TTM_PL_MASK_CACHING; + struct ttm_placement placement; + struct ttm_mem_reg tmp_mem; +@@ -782,23 +755,7 @@ + if (ret) + goto out; + +- if (dev_priv->card_type >= NV_50) { +- struct nouveau_bo *nvbo = nouveau_bo(bo); +- struct nouveau_mem *node = tmp_mem.mm_node; +- struct nouveau_vma *vma = &nvbo->vma; +- if (vma->node->type != vma->vm->spg_shift) +- vma = &node->tmp_vma; +- nouveau_vm_map_sg(vma, 0, tmp_mem.num_pages << PAGE_SHIFT, +- node, node->pages); +- } +- + ret = nouveau_bo_move_m2mf(bo, true, intr, no_wait_reserve, no_wait_gpu, &tmp_mem); +- +- if (dev_priv->card_type >= NV_50) { +- struct nouveau_bo *nvbo = nouveau_bo(bo); +- nouveau_vm_unmap(&nvbo->vma); +- } +- + if (ret) + goto out; + +@@ -844,30 +801,22 @@ + static void + nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) + { +- struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); + struct nouveau_mem *node = new_mem->mm_node; + struct nouveau_bo *nvbo = nouveau_bo(bo); +- struct nouveau_vma *vma = &nvbo->vma; +- struct nouveau_vm *vm = vma->vm; ++ struct nouveau_vma *vma; + +- if (dev_priv->card_type < NV_50) +- return; +- +- switch (new_mem->mem_type) { +- case TTM_PL_VRAM: +- nouveau_vm_map(vma, node); +- break; +- case TTM_PL_TT: +- if (vma->node->type != vm->spg_shift) { ++ list_for_each_entry(vma, &nvbo->vma_list, head) { ++ if (new_mem->mem_type == TTM_PL_VRAM) { ++ nouveau_vm_map(vma, new_mem->mm_node); ++ } else ++ if (new_mem->mem_type == TTM_PL_TT && ++ nvbo->page_shift == vma->vm->spg_shift) { ++ nouveau_vm_map_sg(vma, 0, new_mem-> ++ num_pages << PAGE_SHIFT, ++ node, node->pages); ++ } else { + nouveau_vm_unmap(vma); +- vma = &node->tmp_vma; + } +- nouveau_vm_map_sg(vma, 0, new_mem->num_pages << PAGE_SHIFT, +- node, node->pages); +- break; +- default: +- nouveau_vm_unmap(&nvbo->vma); +- break; + } + } + +@@ -1113,3 +1062,54 @@ + .io_mem_free = &nouveau_ttm_io_mem_free, + }; + ++struct nouveau_vma * ++nouveau_bo_vma_find(struct nouveau_bo *nvbo, struct nouveau_vm *vm) ++{ ++ struct nouveau_vma *vma; ++ list_for_each_entry(vma, &nvbo->vma_list, head) { ++ if (vma->vm == vm) ++ return vma; ++ } ++ ++ return NULL; ++} ++ ++int ++nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, ++ struct nouveau_vma *vma) ++{ ++ const u32 size = nvbo->bo.mem.num_pages << PAGE_SHIFT; ++ struct nouveau_mem *node = nvbo->bo.mem.mm_node; ++ int ret; ++ ++ ret = nouveau_vm_get(vm, size, nvbo->page_shift, ++ NV_MEM_ACCESS_RW, vma); ++ if (ret) ++ return ret; ++ ++ if (nvbo->bo.mem.mem_type == TTM_PL_VRAM) ++ nouveau_vm_map(vma, nvbo->bo.mem.mm_node); ++ else ++ if (nvbo->bo.mem.mem_type == TTM_PL_TT) ++ nouveau_vm_map_sg(vma, 0, size, node, node->pages); ++ ++ list_add_tail(&vma->head, &nvbo->vma_list); ++ vma->refcount = 1; ++ return 0; ++} ++ ++void ++nouveau_bo_vma_del(struct nouveau_bo *nvbo, struct nouveau_vma *vma) ++{ ++ if (vma->node) { ++ if (nvbo->bo.mem.mem_type != TTM_PL_SYSTEM) { ++ spin_lock(&nvbo->bo.bdev->fence_lock); ++ ttm_bo_wait(&nvbo->bo, false, false, false); ++ spin_unlock(&nvbo->bo.bdev->fence_lock); ++ nouveau_vm_unmap(vma); ++ } ++ ++ nouveau_vm_put(vma); ++ list_del(&vma->head); ++ } ++} +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_channel.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_channel.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2011-06-26 07:59:23.000000000 +0200 +@@ -27,40 +27,63 @@ + #include "nouveau_drv.h" + #include "nouveau_drm.h" + #include "nouveau_dma.h" ++#include "nouveau_ramht.h" + + static int +-nouveau_channel_pushbuf_ctxdma_init(struct nouveau_channel *chan) ++nouveau_channel_pushbuf_init(struct nouveau_channel *chan) + { ++ u32 mem = nouveau_vram_pushbuf ? TTM_PL_FLAG_VRAM : TTM_PL_FLAG_TT; + struct drm_device *dev = chan->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_bo *pb = chan->pushbuf_bo; +- struct nouveau_gpuobj *pushbuf = NULL; +- int ret = 0; ++ int ret; ++ ++ /* allocate buffer object */ ++ ret = nouveau_bo_new(dev, 65536, 0, mem, 0, 0, &chan->pushbuf_bo); ++ if (ret) ++ goto out; ++ ++ ret = nouveau_bo_pin(chan->pushbuf_bo, mem); ++ if (ret) ++ goto out; ++ ++ ret = nouveau_bo_map(chan->pushbuf_bo); ++ if (ret) ++ goto out; + ++ /* create DMA object covering the entire memtype where the push ++ * buffer resides, userspace can submit its own push buffers from ++ * anywhere within the same memtype. ++ */ ++ chan->pushbuf_base = chan->pushbuf_bo->bo.offset; + if (dev_priv->card_type >= NV_50) { ++ ret = nouveau_bo_vma_add(chan->pushbuf_bo, chan->vm, ++ &chan->pushbuf_vma); ++ if (ret) ++ goto out; ++ + if (dev_priv->card_type < NV_C0) { + ret = nouveau_gpuobj_dma_new(chan, + NV_CLASS_DMA_IN_MEMORY, 0, + (1ULL << 40), + NV_MEM_ACCESS_RO, + NV_MEM_TARGET_VM, +- &pushbuf); ++ &chan->pushbuf); + } +- chan->pushbuf_base = pb->bo.offset; ++ chan->pushbuf_base = chan->pushbuf_vma.offset; + } else +- if (pb->bo.mem.mem_type == TTM_PL_TT) { ++ if (chan->pushbuf_bo->bo.mem.mem_type == TTM_PL_TT) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, + dev_priv->gart_info.aper_size, + NV_MEM_ACCESS_RO, +- NV_MEM_TARGET_GART, &pushbuf); +- chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; ++ NV_MEM_TARGET_GART, ++ &chan->pushbuf); + } else + if (dev_priv->card_type != NV_04) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, + dev_priv->fb_available_size, + NV_MEM_ACCESS_RO, +- NV_MEM_TARGET_VRAM, &pushbuf); +- chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; ++ NV_MEM_TARGET_VRAM, ++ &chan->pushbuf); + } else { + /* NV04 cmdbuf hack, from original ddx.. not sure of it's + * exact reason for existing :) PCI access to cmdbuf in +@@ -70,47 +93,22 @@ + pci_resource_start(dev->pdev, 1), + dev_priv->fb_available_size, + NV_MEM_ACCESS_RO, +- NV_MEM_TARGET_PCI, &pushbuf); +- chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; ++ NV_MEM_TARGET_PCI, ++ &chan->pushbuf); + } + +- nouveau_gpuobj_ref(pushbuf, &chan->pushbuf); +- nouveau_gpuobj_ref(NULL, &pushbuf); +- return ret; +-} +- +-static struct nouveau_bo * +-nouveau_channel_user_pushbuf_alloc(struct drm_device *dev) +-{ +- struct nouveau_bo *pushbuf = NULL; +- int location, ret; +- +- if (nouveau_vram_pushbuf) +- location = TTM_PL_FLAG_VRAM; +- else +- location = TTM_PL_FLAG_TT; +- +- ret = nouveau_bo_new(dev, NULL, 65536, 0, location, 0, 0x0000, &pushbuf); +- if (ret) { +- NV_ERROR(dev, "error allocating DMA push buffer: %d\n", ret); +- return NULL; +- } +- +- ret = nouveau_bo_pin(pushbuf, location); +- if (ret) { +- NV_ERROR(dev, "error pinning DMA push buffer: %d\n", ret); +- nouveau_bo_ref(NULL, &pushbuf); +- return NULL; +- } +- +- ret = nouveau_bo_map(pushbuf); ++out: + if (ret) { +- nouveau_bo_unpin(pushbuf); +- nouveau_bo_ref(NULL, &pushbuf); +- return NULL; ++ NV_ERROR(dev, "error initialising pushbuf: %d\n", ret); ++ nouveau_bo_vma_del(chan->pushbuf_bo, &chan->pushbuf_vma); ++ nouveau_gpuobj_ref(NULL, &chan->pushbuf); ++ if (chan->pushbuf_bo) { ++ nouveau_bo_unmap(chan->pushbuf_bo); ++ nouveau_bo_ref(NULL, &chan->pushbuf_bo); ++ } + } + +- return pushbuf; ++ return 0; + } + + /* allocates and initializes a fifo for user space consumption */ +@@ -121,6 +119,7 @@ + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; ++ struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv); + struct nouveau_channel *chan; + unsigned long flags; + int ret; +@@ -160,19 +159,14 @@ + INIT_LIST_HEAD(&chan->nvsw.flip); + INIT_LIST_HEAD(&chan->fence.pending); + +- /* Allocate DMA push buffer */ +- chan->pushbuf_bo = nouveau_channel_user_pushbuf_alloc(dev); +- if (!chan->pushbuf_bo) { +- ret = -ENOMEM; +- NV_ERROR(dev, "pushbuf %d\n", ret); ++ /* setup channel's memory and vm */ ++ ret = nouveau_gpuobj_channel_init(chan, vram_handle, gart_handle); ++ if (ret) { ++ NV_ERROR(dev, "gpuobj %d\n", ret); + nouveau_channel_put(&chan); + return ret; + } + +- nouveau_dma_pre_init(chan); +- chan->user_put = 0x40; +- chan->user_get = 0x44; +- + /* Allocate space for per-channel fixed notifier memory */ + ret = nouveau_notifier_init_channel(chan); + if (ret) { +@@ -181,21 +175,17 @@ + return ret; + } + +- /* Setup channel's default objects */ +- ret = nouveau_gpuobj_channel_init(chan, vram_handle, gart_handle); ++ /* Allocate DMA push buffer */ ++ ret = nouveau_channel_pushbuf_init(chan); + if (ret) { +- NV_ERROR(dev, "gpuobj %d\n", ret); ++ NV_ERROR(dev, "pushbuf %d\n", ret); + nouveau_channel_put(&chan); + return ret; + } + +- /* Create a dma object for the push buffer */ +- ret = nouveau_channel_pushbuf_ctxdma_init(chan); +- if (ret) { +- NV_ERROR(dev, "pbctxdma %d\n", ret); +- nouveau_channel_put(&chan); +- return ret; +- } ++ nouveau_dma_pre_init(chan); ++ chan->user_put = 0x40; ++ chan->user_get = 0x44; + + /* disable the fifo caches */ + pfifo->reassign(dev, false); +@@ -220,6 +210,11 @@ + nouveau_debugfs_channel_init(chan); + + NV_DEBUG(dev, "channel %d initialised\n", chan->id); ++ if (fpriv) { ++ spin_lock(&fpriv->lock); ++ list_add(&chan->list, &fpriv->channels); ++ spin_unlock(&fpriv->lock); ++ } + *chan_ret = chan; + return 0; + } +@@ -236,29 +231,23 @@ + } + + struct nouveau_channel * +-nouveau_channel_get(struct drm_device *dev, struct drm_file *file_priv, int id) ++nouveau_channel_get(struct drm_file *file_priv, int id) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv); + struct nouveau_channel *chan; +- unsigned long flags; +- +- if (unlikely(id < 0 || id >= NOUVEAU_MAX_CHANNEL_NR)) +- return ERR_PTR(-EINVAL); +- +- spin_lock_irqsave(&dev_priv->channels.lock, flags); +- chan = nouveau_channel_get_unlocked(dev_priv->channels.ptr[id]); +- spin_unlock_irqrestore(&dev_priv->channels.lock, flags); +- +- if (unlikely(!chan)) +- return ERR_PTR(-EINVAL); + +- if (unlikely(file_priv && chan->file_priv != file_priv)) { +- nouveau_channel_put_unlocked(&chan); +- return ERR_PTR(-EINVAL); ++ spin_lock(&fpriv->lock); ++ list_for_each_entry(chan, &fpriv->channels, list) { ++ if (chan->id == id) { ++ chan = nouveau_channel_get_unlocked(chan); ++ spin_unlock(&fpriv->lock); ++ mutex_lock(&chan->mutex); ++ return chan; ++ } + } ++ spin_unlock(&fpriv->lock); + +- mutex_lock(&chan->mutex); +- return chan; ++ return ERR_PTR(-EINVAL); + } + + void +@@ -312,12 +301,14 @@ + /* destroy any resources the channel owned */ + nouveau_gpuobj_ref(NULL, &chan->pushbuf); + if (chan->pushbuf_bo) { ++ nouveau_bo_vma_del(chan->pushbuf_bo, &chan->pushbuf_vma); + nouveau_bo_unmap(chan->pushbuf_bo); + nouveau_bo_unpin(chan->pushbuf_bo); + nouveau_bo_ref(NULL, &chan->pushbuf_bo); + } +- nouveau_gpuobj_channel_takedown(chan); ++ nouveau_ramht_ref(NULL, &chan->ramht, chan); + nouveau_notifier_takedown_channel(chan); ++ nouveau_gpuobj_channel_takedown(chan); + + nouveau_channel_ref(NULL, pchan); + } +@@ -383,10 +374,11 @@ + + NV_DEBUG(dev, "clearing FIFO enables from file_priv\n"); + for (i = 0; i < engine->fifo.channels; i++) { +- chan = nouveau_channel_get(dev, file_priv, i); ++ chan = nouveau_channel_get(file_priv, i); + if (IS_ERR(chan)) + continue; + ++ list_del(&chan->list); + atomic_dec(&chan->users); + nouveau_channel_put(&chan); + } +@@ -459,10 +451,11 @@ + struct drm_nouveau_channel_free *req = data; + struct nouveau_channel *chan; + +- chan = nouveau_channel_get(dev, file_priv, req->channel); ++ chan = nouveau_channel_get(file_priv, req->channel); + if (IS_ERR(chan)) + return PTR_ERR(chan); + ++ list_del(&chan->list); + atomic_dec(&chan->users); + nouveau_channel_put(&chan); + return 0; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_dma.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_dma.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c 2011-06-26 07:59:23.000000000 +0200 +@@ -167,8 +167,13 @@ + int delta, int length) + { + struct nouveau_bo *pb = chan->pushbuf_bo; +- uint64_t offset = bo->bo.offset + delta; ++ struct nouveau_vma *vma; + int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base; ++ u64 offset; ++ ++ vma = nouveau_bo_vma_find(bo, chan->vm); ++ BUG_ON(!vma); ++ offset = vma->offset + delta; + + BUG_ON(chan->dma.ib_free < 1); + nouveau_bo_wr32(pb, ip++, lower_32_bits(offset)); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_drv.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_drv.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c 2011-06-26 07:59:23.000000000 +0200 +@@ -73,7 +73,7 @@ + module_param_named(ignorelid, nouveau_ignorelid, int, 0400); + + MODULE_PARM_DESC(noaccel, "Disable all acceleration"); +-int nouveau_noaccel = 0; ++int nouveau_noaccel = -1; + module_param_named(noaccel, nouveau_noaccel, int, 0400); + + MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration"); +@@ -119,6 +119,10 @@ + int nouveau_msi; + module_param_named(msi, nouveau_msi, int, 0400); + ++MODULE_PARM_DESC(ctxfw, "Use external HUB/GPC ucode (fermi)\n"); ++int nouveau_ctxfw; ++module_param_named(ctxfw, nouveau_ctxfw, int, 0400); ++ + int nouveau_fbpercrtc; + #if 0 + module_param_named(fbpercrtc, nouveau_fbpercrtc, int, 0400); +@@ -354,7 +358,7 @@ + + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { + struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); +- u32 offset = nv_crtc->cursor.nvbo->bo.mem.start << PAGE_SHIFT; ++ u32 offset = nv_crtc->cursor.nvbo->bo.offset; + + nv_crtc->cursor.set_offset(nv_crtc, offset); + nv_crtc->cursor.set_pos(nv_crtc, nv_crtc->cursor_saved_x, +@@ -389,7 +393,9 @@ + .firstopen = nouveau_firstopen, + .lastclose = nouveau_lastclose, + .unload = nouveau_unload, ++ .open = nouveau_open, + .preclose = nouveau_preclose, ++ .postclose = nouveau_postclose, + #if defined(CONFIG_DRM_NOUVEAU_DEBUG) + .debugfs_init = nouveau_debugfs_init, + .debugfs_cleanup = nouveau_debugfs_takedown, +@@ -420,6 +426,8 @@ + + .gem_init_object = nouveau_gem_object_new, + .gem_free_object = nouveau_gem_object_del, ++ .gem_open_object = nouveau_gem_object_open, ++ .gem_close_object = nouveau_gem_object_close, + + .name = DRIVER_NAME, + .desc = DRIVER_DESC, +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_drv.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-06-26 07:59:23.000000000 +0200 +@@ -46,9 +46,17 @@ + #include "ttm/ttm_module.h" + + struct nouveau_fpriv { +- struct ttm_object_file *tfile; ++ spinlock_t lock; ++ struct list_head channels; ++ struct nouveau_vm *vm; + }; + ++static inline struct nouveau_fpriv * ++nouveau_fpriv(struct drm_file *file_priv) ++{ ++ return file_priv ? file_priv->driver_priv : NULL; ++} ++ + #define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT) + + #include "nouveau_drm.h" +@@ -69,7 +77,7 @@ + struct drm_device *dev; + + struct nouveau_vma bar_vma; +- struct nouveau_vma tmp_vma; ++ struct nouveau_vma vma[2]; + u8 page_shift; + + struct drm_mm_node *tag; +@@ -107,7 +115,8 @@ + + struct nouveau_channel *channel; + +- struct nouveau_vma vma; ++ struct list_head vma_list; ++ unsigned page_shift; + + uint32_t tile_mode; + uint32_t tile_flags; +@@ -176,9 +185,10 @@ + uint32_t flags; + + u32 size; +- u32 pinst; +- u32 cinst; +- u64 vinst; ++ u32 pinst; /* PRAMIN BAR offset */ ++ u32 cinst; /* Channel offset */ ++ u64 vinst; /* VRAM address */ ++ u64 linst; /* VM address */ + + uint32_t engine; + uint32_t class; +@@ -201,6 +211,7 @@ + + struct nouveau_channel { + struct drm_device *dev; ++ struct list_head list; + int id; + + /* references to the channel data structure */ +@@ -228,15 +239,18 @@ + uint32_t sequence; + uint32_t sequence_ack; + atomic_t last_sequence_irq; ++ struct nouveau_vma vma; + } fence; + + /* DMA push buffer */ + struct nouveau_gpuobj *pushbuf; + struct nouveau_bo *pushbuf_bo; ++ struct nouveau_vma pushbuf_vma; + uint32_t pushbuf_base; + + /* Notifier memory */ + struct nouveau_bo *notifier_bo; ++ struct nouveau_vma notifier_vma; + struct drm_mm notifier_heap; + + /* PFIFO context */ +@@ -278,6 +292,7 @@ + + uint32_t sw_subchannel[8]; + ++ struct nouveau_vma dispc_vma[2]; + struct { + struct nouveau_gpuobj *vblsem; + uint32_t vblsem_head; +@@ -314,7 +329,8 @@ + int (*suspend)(struct drm_device *dev); + void (*resume)(struct drm_device *dev); + +- int (*get)(struct nouveau_gpuobj *, u32 size, u32 align); ++ int (*get)(struct nouveau_gpuobj *, struct nouveau_channel *, ++ u32 size, u32 align); + void (*put)(struct nouveau_gpuobj *); + int (*map)(struct nouveau_gpuobj *); + void (*unmap)(struct nouveau_gpuobj *); +@@ -398,12 +414,13 @@ + }; + + struct nouveau_pm_voltage_level { +- u8 voltage; +- u8 vid; ++ u32 voltage; /* microvolts */ ++ u8 vid; + }; + + struct nouveau_pm_voltage { + bool supported; ++ u8 version; + u8 vid_mask; + + struct nouveau_pm_voltage_level *level; +@@ -432,11 +449,19 @@ + u32 core; + u32 memory; + u32 shader; +- u32 unk05; +- u32 unk0a; +- +- u8 voltage; +- u8 fanspeed; ++ u32 rop; ++ u32 copy; ++ u32 daemon; ++ u32 vdec; ++ u32 unk05; /* nv50:nva3, roughly.. */ ++ u32 unka0; /* nva3:nvc0 */ ++ u32 hub01; /* nvc0- */ ++ u32 hub06; /* nvc0- */ ++ u32 hub07; /* nvc0- */ ++ ++ u32 volt_min; /* microvolts */ ++ u32 volt_max; ++ u8 fanspeed; + + u16 memscript; + struct nouveau_pm_memtiming *timing; +@@ -445,9 +470,9 @@ + struct nouveau_pm_temp_sensor_constants { + u16 offset_constant; + s16 offset_mult; +- u16 offset_div; +- u16 slope_mult; +- u16 slope_div; ++ s16 offset_div; ++ s16 slope_mult; ++ s16 slope_div; + }; + + struct nouveau_pm_threshold_temp { +@@ -480,6 +505,11 @@ + void *(*clock_pre)(struct drm_device *, struct nouveau_pm_level *, + u32 id, int khz); + void (*clock_set)(struct drm_device *, void *); ++ ++ int (*clocks_get)(struct drm_device *, struct nouveau_pm_level *); ++ void *(*clocks_pre)(struct drm_device *, struct nouveau_pm_level *); ++ void (*clocks_set)(struct drm_device *, void *); ++ + int (*voltage_get)(struct drm_device *); + int (*voltage_set)(struct drm_device *, int voltage); + int (*fanspeed_get)(struct drm_device *); +@@ -488,7 +518,10 @@ + }; + + struct nouveau_vram_engine { ++ struct nouveau_mm *mm; ++ + int (*init)(struct drm_device *); ++ void (*takedown)(struct drm_device *dev); + int (*get)(struct drm_device *, u64, u32 align, u32 size_nc, + u32 type, struct nouveau_mem **); + void (*put)(struct drm_device *, struct nouveau_mem **); +@@ -608,6 +641,7 @@ + + struct drm_nouveau_private { + struct drm_device *dev; ++ bool noaccel; + + /* the card type, takes NV_* as values */ + enum nouveau_card_type card_type; +@@ -700,7 +734,6 @@ + /* VRAM/fb configuration */ + uint64_t vram_size; + uint64_t vram_sys_base; +- u32 vram_rblock_size; + + uint64_t fb_phys; + uint64_t fb_available_size; +@@ -784,12 +817,15 @@ + extern char *nouveau_perflvl; + extern int nouveau_perflvl_wr; + extern int nouveau_msi; ++extern int nouveau_ctxfw; + + extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); + extern int nouveau_pci_resume(struct pci_dev *pdev); + + /* nouveau_state.c */ ++extern int nouveau_open(struct drm_device *, struct drm_file *); + extern void nouveau_preclose(struct drm_device *dev, struct drm_file *); ++extern void nouveau_postclose(struct drm_device *, struct drm_file *); + extern int nouveau_load(struct drm_device *, unsigned long flags); + extern int nouveau_firstopen(struct drm_device *); + extern void nouveau_lastclose(struct drm_device *); +@@ -802,6 +838,8 @@ + uint32_t reg, uint32_t mask, uint32_t val); + extern bool nouveau_wait_ne(struct drm_device *, uint64_t timeout, + uint32_t reg, uint32_t mask, uint32_t val); ++extern bool nouveau_wait_cb(struct drm_device *, u64 timeout, ++ bool (*cond)(void *), void *); + extern bool nouveau_wait_for_idle(struct drm_device *); + extern int nouveau_card_init(struct drm_device *); + +@@ -847,7 +885,7 @@ + extern struct nouveau_channel * + nouveau_channel_get_unlocked(struct nouveau_channel *); + extern struct nouveau_channel * +-nouveau_channel_get(struct drm_device *, struct drm_file *, int id); ++nouveau_channel_get(struct drm_file *, int id); + extern void nouveau_channel_put_unlocked(struct nouveau_channel **); + extern void nouveau_channel_put(struct nouveau_channel **); + extern void nouveau_channel_ref(struct nouveau_channel *chan, +@@ -1158,8 +1196,8 @@ + /* nvc0_copy.c */ + extern int nvc0_copy_create(struct drm_device *dev, int engine); + +-/* nv40_mpeg.c */ +-extern int nv40_mpeg_create(struct drm_device *dev); ++/* nv31_mpeg.c */ ++extern int nv31_mpeg_create(struct drm_device *dev); + + /* nv50_mpeg.c */ + extern int nv50_mpeg_create(struct drm_device *dev); +@@ -1169,7 +1207,8 @@ + extern void nv04_instmem_takedown(struct drm_device *); + extern int nv04_instmem_suspend(struct drm_device *); + extern void nv04_instmem_resume(struct drm_device *); +-extern int nv04_instmem_get(struct nouveau_gpuobj *, u32 size, u32 align); ++extern int nv04_instmem_get(struct nouveau_gpuobj *, struct nouveau_channel *, ++ u32 size, u32 align); + extern void nv04_instmem_put(struct nouveau_gpuobj *); + extern int nv04_instmem_map(struct nouveau_gpuobj *); + extern void nv04_instmem_unmap(struct nouveau_gpuobj *); +@@ -1180,7 +1219,8 @@ + extern void nv50_instmem_takedown(struct drm_device *); + extern int nv50_instmem_suspend(struct drm_device *); + extern void nv50_instmem_resume(struct drm_device *); +-extern int nv50_instmem_get(struct nouveau_gpuobj *, u32 size, u32 align); ++extern int nv50_instmem_get(struct nouveau_gpuobj *, struct nouveau_channel *, ++ u32 size, u32 align); + extern void nv50_instmem_put(struct nouveau_gpuobj *); + extern int nv50_instmem_map(struct nouveau_gpuobj *); + extern void nv50_instmem_unmap(struct nouveau_gpuobj *); +@@ -1247,10 +1287,9 @@ + + /* nouveau_bo.c */ + extern struct ttm_bo_driver nouveau_bo_driver; +-extern int nouveau_bo_new(struct drm_device *, struct nouveau_channel *, +- int size, int align, uint32_t flags, +- uint32_t tile_mode, uint32_t tile_flags, +- struct nouveau_bo **); ++extern int nouveau_bo_new(struct drm_device *, int size, int align, ++ uint32_t flags, uint32_t tile_mode, ++ uint32_t tile_flags, struct nouveau_bo **); + extern int nouveau_bo_pin(struct nouveau_bo *, uint32_t flags); + extern int nouveau_bo_unpin(struct nouveau_bo *); + extern int nouveau_bo_map(struct nouveau_bo *); +@@ -1265,6 +1304,12 @@ + extern int nouveau_bo_validate(struct nouveau_bo *, bool interruptible, + bool no_wait_reserve, bool no_wait_gpu); + ++extern struct nouveau_vma * ++nouveau_bo_vma_find(struct nouveau_bo *, struct nouveau_vm *); ++extern int nouveau_bo_vma_add(struct nouveau_bo *, struct nouveau_vm *, ++ struct nouveau_vma *); ++extern void nouveau_bo_vma_del(struct nouveau_bo *, struct nouveau_vma *); ++ + /* nouveau_fence.c */ + struct nouveau_fence; + extern int nouveau_fence_init(struct drm_device *); +@@ -1310,12 +1355,14 @@ + } + + /* nouveau_gem.c */ +-extern int nouveau_gem_new(struct drm_device *, struct nouveau_channel *, +- int size, int align, uint32_t domain, +- uint32_t tile_mode, uint32_t tile_flags, +- struct nouveau_bo **); ++extern int nouveau_gem_new(struct drm_device *, int size, int align, ++ uint32_t domain, uint32_t tile_mode, ++ uint32_t tile_flags, struct nouveau_bo **); + extern int nouveau_gem_object_new(struct drm_gem_object *); + extern void nouveau_gem_object_del(struct drm_gem_object *); ++extern int nouveau_gem_object_open(struct drm_gem_object *, struct drm_file *); ++extern void nouveau_gem_object_close(struct drm_gem_object *, ++ struct drm_file *); + extern int nouveau_gem_ioctl_new(struct drm_device *, void *, + struct drm_file *); + extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *, +@@ -1418,6 +1465,8 @@ + nouveau_wait_eq(dev, 2000000000ULL, (reg), (mask), (val)) + #define nv_wait_ne(dev, reg, mask, val) \ + nouveau_wait_ne(dev, 2000000000ULL, (reg), (mask), (val)) ++#define nv_wait_cb(dev, func, data) \ ++ nouveau_wait_cb(dev, 2000000000ULL, (func), (data)) + + /* PRAMIN access */ + static inline u32 nv_ri32(struct drm_device *dev, unsigned offset) +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2011-06-26 07:59:23.000000000 +0200 +@@ -279,6 +279,7 @@ + struct fb_info *info; + struct drm_framebuffer *fb; + struct nouveau_framebuffer *nouveau_fb; ++ struct nouveau_channel *chan; + struct nouveau_bo *nvbo; + struct drm_mode_fb_cmd mode_cmd; + struct pci_dev *pdev = dev->pdev; +@@ -296,8 +297,8 @@ + size = mode_cmd.pitch * mode_cmd.height; + size = roundup(size, PAGE_SIZE); + +- ret = nouveau_gem_new(dev, dev_priv->channel, size, 0, +- NOUVEAU_GEM_DOMAIN_VRAM, 0, 0x0000, &nvbo); ++ ret = nouveau_gem_new(dev, size, 0, NOUVEAU_GEM_DOMAIN_VRAM, ++ 0, 0x0000, &nvbo); + if (ret) { + NV_ERROR(dev, "failed to allocate framebuffer\n"); + goto out; +@@ -318,6 +319,15 @@ + goto out; + } + ++ chan = nouveau_nofbaccel ? NULL : dev_priv->channel; ++ if (chan && dev_priv->card_type >= NV_50) { ++ ret = nouveau_bo_vma_add(nvbo, chan->vm, &nfbdev->nouveau_fb.vma); ++ if (ret) { ++ NV_ERROR(dev, "failed to map fb into chan: %d\n", ret); ++ chan = NULL; ++ } ++ } ++ + mutex_lock(&dev->struct_mutex); + + info = framebuffer_alloc(0, device); +@@ -448,6 +458,7 @@ + + if (nouveau_fb->nvbo) { + nouveau_bo_unmap(nouveau_fb->nvbo); ++ nouveau_bo_vma_del(nouveau_fb->nvbo, &nouveau_fb->vma); + drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->gem); + nouveau_fb->nvbo = NULL; + } +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_fb.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_fb.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_fb.h 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_fb.h 2011-06-26 07:59:23.000000000 +0200 +@@ -30,6 +30,7 @@ + struct nouveau_framebuffer { + struct drm_framebuffer base; + struct nouveau_bo *nvbo; ++ struct nouveau_vma vma; + u32 r_dma; + u32 r_format; + u32 r_pitch; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_fence.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-06-26 07:59:23.000000000 +0200 +@@ -336,6 +336,7 @@ + { + struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct nouveau_fence *fence = NULL; ++ u64 offset = chan->fence.vma.offset + sema->mem->start; + int ret; + + if (dev_priv->chipset < 0x84) { +@@ -345,13 +346,10 @@ + + BEGIN_RING(chan, NvSubSw, NV_SW_DMA_SEMAPHORE, 3); + OUT_RING (chan, NvSema); +- OUT_RING (chan, sema->mem->start); ++ OUT_RING (chan, offset); + OUT_RING (chan, 1); + } else + if (dev_priv->chipset < 0xc0) { +- struct nouveau_vma *vma = &dev_priv->fence.bo->vma; +- u64 offset = vma->offset + sema->mem->start; +- + ret = RING_SPACE(chan, 7); + if (ret) + return ret; +@@ -364,9 +362,6 @@ + OUT_RING (chan, 1); + OUT_RING (chan, 1); /* ACQUIRE_EQ */ + } else { +- struct nouveau_vma *vma = &dev_priv->fence.bo->vma; +- u64 offset = vma->offset + sema->mem->start; +- + ret = RING_SPACE(chan, 5); + if (ret) + return ret; +@@ -394,6 +389,7 @@ + { + struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct nouveau_fence *fence = NULL; ++ u64 offset = chan->fence.vma.offset + sema->mem->start; + int ret; + + if (dev_priv->chipset < 0x84) { +@@ -403,14 +399,11 @@ + + BEGIN_RING(chan, NvSubSw, NV_SW_DMA_SEMAPHORE, 2); + OUT_RING (chan, NvSema); +- OUT_RING (chan, sema->mem->start); ++ OUT_RING (chan, offset); + BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_RELEASE, 1); + OUT_RING (chan, 1); + } else + if (dev_priv->chipset < 0xc0) { +- struct nouveau_vma *vma = &dev_priv->fence.bo->vma; +- u64 offset = vma->offset + sema->mem->start; +- + ret = RING_SPACE(chan, 7); + if (ret) + return ret; +@@ -423,9 +416,6 @@ + OUT_RING (chan, 1); + OUT_RING (chan, 2); /* RELEASE */ + } else { +- struct nouveau_vma *vma = &dev_priv->fence.bo->vma; +- u64 offset = vma->offset + sema->mem->start; +- + ret = RING_SPACE(chan, 5); + if (ret) + return ret; +@@ -540,6 +530,12 @@ + nouveau_gpuobj_ref(NULL, &obj); + if (ret) + return ret; ++ } else { ++ /* map fence bo into channel's vm */ ++ ret = nouveau_bo_vma_add(dev_priv->fence.bo, chan->vm, ++ &chan->fence.vma); ++ if (ret) ++ return ret; + } + + INIT_LIST_HEAD(&chan->fence.pending); +@@ -551,10 +547,10 @@ + void + nouveau_fence_channel_fini(struct nouveau_channel *chan) + { ++ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct nouveau_fence *tmp, *fence; + + spin_lock(&chan->fence.lock); +- + list_for_each_entry_safe(fence, tmp, &chan->fence.pending, entry) { + fence->signalled = true; + list_del(&fence->entry); +@@ -564,8 +560,9 @@ + + kref_put(&fence->refcount, nouveau_fence_del); + } +- + spin_unlock(&chan->fence.lock); ++ ++ nouveau_bo_vma_del(dev_priv->fence.bo, &chan->fence.vma); + } + + int +@@ -577,7 +574,7 @@ + + /* Create a shared VRAM heap for cross-channel sync. */ + if (USE_SEMA(dev)) { +- ret = nouveau_bo_new(dev, NULL, size, 0, TTM_PL_FLAG_VRAM, ++ ret = nouveau_bo_new(dev, size, 0, TTM_PL_FLAG_VRAM, + 0, 0, &dev_priv->fence.bo); + if (ret) + return ret; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_gem.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-06-26 07:59:23.000000000 +0200 +@@ -60,9 +60,71 @@ + } + + int +-nouveau_gem_new(struct drm_device *dev, struct nouveau_channel *chan, +- int size, int align, uint32_t domain, uint32_t tile_mode, +- uint32_t tile_flags, struct nouveau_bo **pnvbo) ++nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) ++{ ++ struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv); ++ struct nouveau_bo *nvbo = nouveau_gem_object(gem); ++ struct nouveau_vma *vma; ++ int ret; ++ ++ if (!fpriv->vm) ++ return 0; ++ ++ ret = ttm_bo_reserve(&nvbo->bo, false, false, false, 0); ++ if (ret) ++ return ret; ++ ++ vma = nouveau_bo_vma_find(nvbo, fpriv->vm); ++ if (!vma) { ++ vma = kzalloc(sizeof(*vma), GFP_KERNEL); ++ if (!vma) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ ++ ret = nouveau_bo_vma_add(nvbo, fpriv->vm, vma); ++ if (ret) { ++ kfree(vma); ++ goto out; ++ } ++ } else { ++ vma->refcount++; ++ } ++ ++out: ++ ttm_bo_unreserve(&nvbo->bo); ++ return ret; ++} ++ ++void ++nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) ++{ ++ struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv); ++ struct nouveau_bo *nvbo = nouveau_gem_object(gem); ++ struct nouveau_vma *vma; ++ int ret; ++ ++ if (!fpriv->vm) ++ return; ++ ++ ret = ttm_bo_reserve(&nvbo->bo, false, false, false, 0); ++ if (ret) ++ return; ++ ++ vma = nouveau_bo_vma_find(nvbo, fpriv->vm); ++ if (vma) { ++ if (--vma->refcount == 0) { ++ nouveau_bo_vma_del(nvbo, vma); ++ kfree(vma); ++ } ++ } ++ ttm_bo_unreserve(&nvbo->bo); ++} ++ ++int ++nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain, ++ uint32_t tile_mode, uint32_t tile_flags, ++ struct nouveau_bo **pnvbo) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_bo *nvbo; +@@ -76,7 +138,7 @@ + if (!flags || domain & NOUVEAU_GEM_DOMAIN_CPU) + flags |= TTM_PL_FLAG_SYSTEM; + +- ret = nouveau_bo_new(dev, chan, size, align, flags, tile_mode, ++ ret = nouveau_bo_new(dev, size, align, flags, tile_mode, + tile_flags, pnvbo); + if (ret) + return ret; +@@ -103,17 +165,28 @@ + } + + static int +-nouveau_gem_info(struct drm_gem_object *gem, struct drm_nouveau_gem_info *rep) ++nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem, ++ struct drm_nouveau_gem_info *rep) + { ++ struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv); + struct nouveau_bo *nvbo = nouveau_gem_object(gem); ++ struct nouveau_vma *vma; + + if (nvbo->bo.mem.mem_type == TTM_PL_TT) + rep->domain = NOUVEAU_GEM_DOMAIN_GART; + else + rep->domain = NOUVEAU_GEM_DOMAIN_VRAM; + +- rep->size = nvbo->bo.mem.num_pages << PAGE_SHIFT; + rep->offset = nvbo->bo.offset; ++ if (fpriv->vm) { ++ vma = nouveau_bo_vma_find(nvbo, fpriv->vm); ++ if (!vma) ++ return -EINVAL; ++ ++ rep->offset = vma->offset; ++ } ++ ++ rep->size = nvbo->bo.mem.num_pages << PAGE_SHIFT; + rep->map_handle = nvbo->bo.addr_space_offset; + rep->tile_mode = nvbo->tile_mode; + rep->tile_flags = nvbo->tile_flags; +@@ -127,7 +200,6 @@ + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct drm_nouveau_gem_new *req = data; + struct nouveau_bo *nvbo = NULL; +- struct nouveau_channel *chan = NULL; + int ret = 0; + + if (unlikely(dev_priv->ttm.bdev.dev_mapping == NULL)) +@@ -138,28 +210,21 @@ + return -EINVAL; + } + +- if (req->channel_hint) { +- chan = nouveau_channel_get(dev, file_priv, req->channel_hint); +- if (IS_ERR(chan)) +- return PTR_ERR(chan); +- } +- +- ret = nouveau_gem_new(dev, chan, req->info.size, req->align, ++ ret = nouveau_gem_new(dev, req->info.size, req->align, + req->info.domain, req->info.tile_mode, + req->info.tile_flags, &nvbo); +- if (chan) +- nouveau_channel_put(&chan); + if (ret) + return ret; + +- ret = nouveau_gem_info(nvbo->gem, &req->info); +- if (ret) +- goto out; +- + ret = drm_gem_handle_create(file_priv, nvbo->gem, &req->info.handle); ++ if (ret == 0) { ++ ret = nouveau_gem_info(file_priv, nvbo->gem, &req->info); ++ if (ret) ++ drm_gem_handle_delete(file_priv, req->info.handle); ++ } ++ + /* drop reference from allocate - handle holds it now */ + drm_gem_object_unreference_unlocked(nvbo->gem); +-out: + return ret; + } + +@@ -318,6 +383,7 @@ + validate_list(struct nouveau_channel *chan, struct list_head *list, + struct drm_nouveau_gem_pushbuf_bo *pbbo, uint64_t user_pbbo_ptr) + { ++ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct drm_nouveau_gem_pushbuf_bo __user *upbbo = + (void __force __user *)(uintptr_t)user_pbbo_ptr; + struct drm_device *dev = chan->dev; +@@ -356,24 +422,26 @@ + return ret; + } + +- if (nvbo->bo.offset == b->presumed.offset && +- ((nvbo->bo.mem.mem_type == TTM_PL_VRAM && +- b->presumed.domain & NOUVEAU_GEM_DOMAIN_VRAM) || +- (nvbo->bo.mem.mem_type == TTM_PL_TT && +- b->presumed.domain & NOUVEAU_GEM_DOMAIN_GART))) +- continue; ++ if (dev_priv->card_type < NV_50) { ++ if (nvbo->bo.offset == b->presumed.offset && ++ ((nvbo->bo.mem.mem_type == TTM_PL_VRAM && ++ b->presumed.domain & NOUVEAU_GEM_DOMAIN_VRAM) || ++ (nvbo->bo.mem.mem_type == TTM_PL_TT && ++ b->presumed.domain & NOUVEAU_GEM_DOMAIN_GART))) ++ continue; + +- if (nvbo->bo.mem.mem_type == TTM_PL_TT) +- b->presumed.domain = NOUVEAU_GEM_DOMAIN_GART; +- else +- b->presumed.domain = NOUVEAU_GEM_DOMAIN_VRAM; +- b->presumed.offset = nvbo->bo.offset; +- b->presumed.valid = 0; +- relocs++; +- +- if (DRM_COPY_TO_USER(&upbbo[nvbo->pbbo_index].presumed, +- &b->presumed, sizeof(b->presumed))) +- return -EFAULT; ++ if (nvbo->bo.mem.mem_type == TTM_PL_TT) ++ b->presumed.domain = NOUVEAU_GEM_DOMAIN_GART; ++ else ++ b->presumed.domain = NOUVEAU_GEM_DOMAIN_VRAM; ++ b->presumed.offset = nvbo->bo.offset; ++ b->presumed.valid = 0; ++ relocs++; ++ ++ if (DRM_COPY_TO_USER(&upbbo[nvbo->pbbo_index].presumed, ++ &b->presumed, sizeof(b->presumed))) ++ return -EFAULT; ++ } + } + + return relocs; +@@ -548,7 +616,7 @@ + struct nouveau_fence *fence = NULL; + int i, j, ret = 0, do_reloc = 0; + +- chan = nouveau_channel_get(dev, file_priv, req->channel); ++ chan = nouveau_channel_get(file_priv, req->channel); + if (IS_ERR(chan)) + return PTR_ERR(chan); + +@@ -782,7 +850,7 @@ + if (!gem) + return -ENOENT; + +- ret = nouveau_gem_info(gem, req); ++ ret = nouveau_gem_info(file_priv, gem, req); + drm_gem_object_unreference_unlocked(gem); + return ret; + } +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_mem.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_mem.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2011-06-26 07:59:23.000000000 +0200 +@@ -423,38 +423,6 @@ + return ret; + } + +- /* reserve space at end of VRAM for PRAMIN */ +- if (dev_priv->card_type >= NV_50) { +- dev_priv->ramin_rsvd_vram = 1 * 1024 * 1024; +- } else +- if (dev_priv->card_type >= NV_40) { +- u32 vs = hweight8((nv_rd32(dev, 0x001540) & 0x0000ff00) >> 8); +- u32 rsvd; +- +- /* estimate grctx size, the magics come from nv40_grctx.c */ +- if (dev_priv->chipset == 0x40) rsvd = 0x6aa0 * vs; +- else if (dev_priv->chipset < 0x43) rsvd = 0x4f00 * vs; +- else if (nv44_graph_class(dev)) rsvd = 0x4980 * vs; +- else rsvd = 0x4a40 * vs; +- rsvd += 16 * 1024; +- rsvd *= dev_priv->engine.fifo.channels; +- +- /* pciegart table */ +- if (drm_pci_device_is_pcie(dev)) +- rsvd += 512 * 1024; +- +- /* object storage */ +- rsvd += 512 * 1024; +- +- dev_priv->ramin_rsvd_vram = round_up(rsvd, 4096); +- } else { +- dev_priv->ramin_rsvd_vram = 512 * 1024; +- } +- +- ret = dev_priv->engine.vram.init(dev); +- if (ret) +- return ret; +- + NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20)); + if (dev_priv->vram_sys_base) { + NV_INFO(dev, "Stolen system memory at: 0x%010llx\n", +@@ -479,7 +447,7 @@ + } + + if (dev_priv->card_type < NV_50) { +- ret = nouveau_bo_new(dev, NULL, 256*1024, 0, TTM_PL_FLAG_VRAM, ++ ret = nouveau_bo_new(dev, 256*1024, 0, TTM_PL_FLAG_VRAM, + 0, 0, &dev_priv->vga_ram); + if (ret == 0) + ret = nouveau_bo_pin(dev_priv->vga_ram, +@@ -729,37 +697,31 @@ + } + + static int +-nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long p_size) ++nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize) + { +- struct drm_nouveau_private *dev_priv = nouveau_bdev(man->bdev); +- struct nouveau_mm *mm; +- u64 size, block, rsvd; +- int ret; +- +- rsvd = (256 * 1024); /* vga memory */ +- size = (p_size << PAGE_SHIFT) - rsvd; +- block = dev_priv->vram_rblock_size; +- +- ret = nouveau_mm_init(&mm, rsvd >> 12, size >> 12, block >> 12); +- if (ret) +- return ret; +- +- man->priv = mm; ++ /* nothing to do */ + return 0; + } + + static int + nouveau_vram_manager_fini(struct ttm_mem_type_manager *man) + { +- struct nouveau_mm *mm = man->priv; +- int ret; ++ /* nothing to do */ ++ return 0; ++} + +- ret = nouveau_mm_fini(&mm); +- if (ret) +- return ret; ++static inline void ++nouveau_mem_node_cleanup(struct nouveau_mem *node) ++{ ++ if (node->vma[0].node) { ++ nouveau_vm_unmap(&node->vma[0]); ++ nouveau_vm_put(&node->vma[0]); ++ } + +- man->priv = NULL; +- return 0; ++ if (node->vma[1].node) { ++ nouveau_vm_unmap(&node->vma[1]); ++ nouveau_vm_put(&node->vma[1]); ++ } + } + + static void +@@ -768,14 +730,9 @@ + { + struct drm_nouveau_private *dev_priv = nouveau_bdev(man->bdev); + struct nouveau_vram_engine *vram = &dev_priv->engine.vram; +- struct nouveau_mem *node = mem->mm_node; + struct drm_device *dev = dev_priv->dev; + +- if (node->tmp_vma.node) { +- nouveau_vm_unmap(&node->tmp_vma); +- nouveau_vm_put(&node->tmp_vma); +- } +- ++ nouveau_mem_node_cleanup(mem->mm_node); + vram->put(dev, (struct nouveau_mem **)&mem->mm_node); + } + +@@ -794,7 +751,7 @@ + int ret; + + if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) +- size_nc = 1 << nvbo->vma.node->type; ++ size_nc = 1 << nvbo->page_shift; + + ret = vram->get(dev, mem->num_pages << PAGE_SHIFT, + mem->page_alignment << PAGE_SHIFT, size_nc, +@@ -804,9 +761,7 @@ + return (ret == -ENOSPC) ? 0 : ret; + } + +- node->page_shift = 12; +- if (nvbo->vma.node) +- node->page_shift = nvbo->vma.node->type; ++ node->page_shift = nvbo->page_shift; + + mem->mm_node = node; + mem->start = node->offset >> PAGE_SHIFT; +@@ -862,15 +817,9 @@ + nouveau_gart_manager_del(struct ttm_mem_type_manager *man, + struct ttm_mem_reg *mem) + { +- struct nouveau_mem *node = mem->mm_node; +- +- if (node->tmp_vma.node) { +- nouveau_vm_unmap(&node->tmp_vma); +- nouveau_vm_put(&node->tmp_vma); +- } +- ++ nouveau_mem_node_cleanup(mem->mm_node); ++ kfree(mem->mm_node); + mem->mm_node = NULL; +- kfree(node); + } + + static int +@@ -880,11 +829,7 @@ + struct ttm_mem_reg *mem) + { + struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); +- struct nouveau_bo *nvbo = nouveau_bo(bo); +- struct nouveau_vma *vma = &nvbo->vma; +- struct nouveau_vm *vm = vma->vm; + struct nouveau_mem *node; +- int ret; + + if (unlikely((mem->num_pages << PAGE_SHIFT) >= + dev_priv->gart_info.aper_size)) +@@ -893,24 +838,8 @@ + node = kzalloc(sizeof(*node), GFP_KERNEL); + if (!node) + return -ENOMEM; ++ node->page_shift = 12; + +- /* This node must be for evicting large-paged VRAM +- * to system memory. Due to a nv50 limitation of +- * not being able to mix large/small pages within +- * the same PDE, we need to create a temporary +- * small-paged VMA for the eviction. +- */ +- if (vma->node->type != vm->spg_shift) { +- ret = nouveau_vm_get(vm, (u64)vma->node->length << 12, +- vm->spg_shift, NV_MEM_ACCESS_RW, +- &node->tmp_vma); +- if (ret) { +- kfree(node); +- return ret; +- } +- } +- +- node->page_shift = nvbo->vma.node->type; + mem->mm_node = node; + mem->start = 0; + return 0; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_mm.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_mm.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_mm.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_mm.c 2011-06-26 07:59:23.000000000 +0200 +@@ -158,11 +158,18 @@ + nouveau_mm_fini(struct nouveau_mm **prmm) + { + struct nouveau_mm *rmm = *prmm; +- struct nouveau_mm_node *heap = ++ struct nouveau_mm_node *node, *heap = + list_first_entry(&rmm->nodes, struct nouveau_mm_node, nl_entry); + +- if (!list_is_singular(&rmm->nodes)) ++ if (!list_is_singular(&rmm->nodes)) { ++ printk(KERN_ERR "nouveau_mm not empty at destroy time!\n"); ++ list_for_each_entry(node, &rmm->nodes, nl_entry) { ++ printk(KERN_ERR "0x%02x: 0x%08x 0x%08x\n", ++ node->type, node->offset, node->length); ++ } ++ WARN_ON(1); + return -EBUSY; ++ } + + kfree(heap); + kfree(rmm); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_mm.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_mm.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_mm.h 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_mm.h 2011-06-26 07:59:23.000000000 +0200 +@@ -52,6 +52,7 @@ + void nouveau_mm_put(struct nouveau_mm *, struct nouveau_mm_node *); + + int nv50_vram_init(struct drm_device *); ++void nv50_vram_fini(struct drm_device *); + int nv50_vram_new(struct drm_device *, u64 size, u32 align, u32 size_nc, + u32 memtype, struct nouveau_mem **); + void nv50_vram_del(struct drm_device *, struct nouveau_mem **); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_notifier.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2011-06-26 07:59:23.000000000 +0200 +@@ -34,6 +34,7 @@ + nouveau_notifier_init_channel(struct nouveau_channel *chan) + { + struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_bo *ntfy = NULL; + uint32_t flags, ttmpl; + int ret; +@@ -46,7 +47,7 @@ + ttmpl = TTM_PL_FLAG_TT; + } + +- ret = nouveau_gem_new(dev, NULL, PAGE_SIZE, 0, flags, 0, 0, &ntfy); ++ ret = nouveau_gem_new(dev, PAGE_SIZE, 0, flags, 0, 0, &ntfy); + if (ret) + return ret; + +@@ -58,14 +59,22 @@ + if (ret) + goto out_err; + ++ if (dev_priv->card_type >= NV_50) { ++ ret = nouveau_bo_vma_add(ntfy, chan->vm, &chan->notifier_vma); ++ if (ret) ++ goto out_err; ++ } ++ + ret = drm_mm_init(&chan->notifier_heap, 0, ntfy->bo.mem.size); + if (ret) + goto out_err; + + chan->notifier_bo = ntfy; + out_err: +- if (ret) ++ if (ret) { ++ nouveau_bo_vma_del(ntfy, &chan->notifier_vma); + drm_gem_object_unreference_unlocked(ntfy->gem); ++ } + + return ret; + } +@@ -78,6 +87,7 @@ + if (!chan->notifier_bo) + return; + ++ nouveau_bo_vma_del(chan->notifier_bo, &chan->notifier_vma); + nouveau_bo_unmap(chan->notifier_bo); + mutex_lock(&dev->struct_mutex); + nouveau_bo_unpin(chan->notifier_bo); +@@ -122,10 +132,10 @@ + target = NV_MEM_TARGET_VRAM; + else + target = NV_MEM_TARGET_GART; +- offset = chan->notifier_bo->bo.mem.start << PAGE_SHIFT; ++ offset = chan->notifier_bo->bo.offset; + } else { + target = NV_MEM_TARGET_VM; +- offset = chan->notifier_bo->vma.offset; ++ offset = chan->notifier_vma.offset; + } + offset += mem->start; + +@@ -183,7 +193,7 @@ + if (unlikely(dev_priv->card_type >= NV_C0)) + return -EINVAL; + +- chan = nouveau_channel_get(dev, file_priv, na->channel); ++ chan = nouveau_channel_get(file_priv, na->channel); + if (IS_ERR(chan)) + return PTR_ERR(chan); + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_object.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_object.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2011-06-26 07:59:23.000000000 +0200 +@@ -125,7 +125,7 @@ + int ret = -EINVAL; + + spin_lock_irqsave(&dev_priv->channels.lock, flags); +- if (chid > 0 && chid < dev_priv->engine.fifo.channels) ++ if (chid >= 0 && chid < dev_priv->engine.fifo.channels) + chan = dev_priv->channels.ptr[chid]; + if (chan) + ret = nouveau_gpuobj_mthd_call(chan, class, mthd, data); +@@ -191,7 +191,7 @@ + list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); + spin_unlock(&dev_priv->ramin_lock); + +- if (chan) { ++ if (!(flags & NVOBJ_FLAG_VM) && chan) { + ramin = drm_mm_search_free(&chan->ramin_heap, size, align, 0); + if (ramin) + ramin = drm_mm_get_block(ramin, size, align); +@@ -208,7 +208,7 @@ + gpuobj->vinst = ramin->start + chan->ramin->vinst; + gpuobj->node = ramin; + } else { +- ret = instmem->get(gpuobj, size, align); ++ ret = instmem->get(gpuobj, chan, size, align); + if (ret) { + nouveau_gpuobj_ref(NULL, &gpuobj); + return ret; +@@ -690,36 +690,65 @@ + return 0; + } + +-int +-nouveau_gpuobj_channel_init(struct nouveau_channel *chan, +- uint32_t vram_h, uint32_t tt_h) ++static int ++nvc0_gpuobj_channel_init(struct nouveau_channel *chan, struct nouveau_vm *vm) + { + struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_gpuobj *vram = NULL, *tt = NULL; ++ struct nouveau_gpuobj *pgd = NULL; ++ struct nouveau_vm_pgd *vpgd; + int ret, i; + +- NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h); +- +- if (dev_priv->card_type == NV_C0) { +- struct nouveau_vm *vm = dev_priv->chan_vm; +- struct nouveau_vm_pgd *vpgd; ++ ret = nouveau_gpuobj_new(dev, NULL, 4096, 0x1000, 0, &chan->ramin); ++ if (ret) ++ return ret; + +- ret = nouveau_gpuobj_new(dev, NULL, 4096, 0x1000, 0, +- &chan->ramin); ++ /* create page directory for this vm if none currently exists, ++ * will be destroyed automagically when last reference to the ++ * vm is removed ++ */ ++ if (list_empty(&vm->pgd_list)) { ++ ret = nouveau_gpuobj_new(dev, NULL, 65536, 0x1000, 0, &pgd); + if (ret) + return ret; ++ } ++ nouveau_vm_ref(vm, &chan->vm, pgd); ++ nouveau_gpuobj_ref(NULL, &pgd); + +- nouveau_vm_ref(vm, &chan->vm, NULL); ++ /* point channel at vm's page directory */ ++ vpgd = list_first_entry(&vm->pgd_list, struct nouveau_vm_pgd, head); ++ nv_wo32(chan->ramin, 0x0200, lower_32_bits(vpgd->obj->vinst)); ++ nv_wo32(chan->ramin, 0x0204, upper_32_bits(vpgd->obj->vinst)); ++ nv_wo32(chan->ramin, 0x0208, 0xffffffff); ++ nv_wo32(chan->ramin, 0x020c, 0x000000ff); ++ ++ /* map display semaphore buffers into channel's vm */ ++ for (i = 0; i < 2; i++) { ++ struct nv50_display_crtc *dispc = &nv50_display(dev)->crtc[i]; + +- vpgd = list_first_entry(&vm->pgd_list, struct nouveau_vm_pgd, head); +- nv_wo32(chan->ramin, 0x0200, lower_32_bits(vpgd->obj->vinst)); +- nv_wo32(chan->ramin, 0x0204, upper_32_bits(vpgd->obj->vinst)); +- nv_wo32(chan->ramin, 0x0208, 0xffffffff); +- nv_wo32(chan->ramin, 0x020c, 0x000000ff); +- return 0; ++ ret = nouveau_bo_vma_add(dispc->sem.bo, chan->vm, ++ &chan->dispc_vma[i]); ++ if (ret) ++ return ret; + } + ++ return 0; ++} ++ ++int ++nouveau_gpuobj_channel_init(struct nouveau_channel *chan, ++ uint32_t vram_h, uint32_t tt_h) ++{ ++ struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fpriv *fpriv = nouveau_fpriv(chan->file_priv); ++ struct nouveau_vm *vm = fpriv ? fpriv->vm : dev_priv->chan_vm; ++ struct nouveau_gpuobj *vram = NULL, *tt = NULL; ++ int ret, i; ++ ++ NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h); ++ if (dev_priv->card_type == NV_C0) ++ return nvc0_gpuobj_channel_init(chan, vm); ++ + /* Allocate a chunk of memory for per-channel object storage */ + ret = nouveau_gpuobj_channel_init_pramin(chan); + if (ret) { +@@ -731,7 +760,7 @@ + * - Allocate per-channel page-directory + * - Link with shared channel VM + */ +- if (dev_priv->chan_vm) { ++ if (vm) { + u32 pgd_offs = (dev_priv->chipset == 0x50) ? 0x1400 : 0x0200; + u64 vm_vinst = chan->ramin->vinst + pgd_offs; + u32 vm_pinst = chan->ramin->pinst; +@@ -744,7 +773,7 @@ + if (ret) + return ret; + +- nouveau_vm_ref(dev_priv->chan_vm, &chan->vm, chan->vm_pd); ++ nouveau_vm_ref(vm, &chan->vm, chan->vm_pd); + } + + /* RAMHT */ +@@ -768,7 +797,7 @@ + struct nouveau_gpuobj *sem = NULL; + struct nv50_display_crtc *dispc = + &nv50_display(dev)->crtc[i]; +- u64 offset = dispc->sem.bo->bo.mem.start << PAGE_SHIFT; ++ u64 offset = dispc->sem.bo->bo.offset; + + ret = nouveau_gpuobj_dma_new(chan, 0x3d, offset, 0xfff, + NV_MEM_ACCESS_RW, +@@ -841,13 +870,22 @@ + nouveau_gpuobj_channel_takedown(struct nouveau_channel *chan) + { + struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int i; + + NV_DEBUG(dev, "ch%d\n", chan->id); + +- nouveau_ramht_ref(NULL, &chan->ramht, chan); ++ if (dev_priv->card_type >= NV_50) { ++ struct nv50_display *disp = nv50_display(dev); ++ ++ for (i = 0; i < 2; i++) { ++ struct nv50_display_crtc *dispc = &disp->crtc[i]; ++ nouveau_bo_vma_del(dispc->sem.bo, &chan->dispc_vma[i]); ++ } + +- nouveau_vm_ref(NULL, &chan->vm, chan->vm_pd); +- nouveau_gpuobj_ref(NULL, &chan->vm_pd); ++ nouveau_vm_ref(NULL, &chan->vm, chan->vm_pd); ++ nouveau_gpuobj_ref(NULL, &chan->vm_pd); ++ } + + if (drm_mm_initialized(&chan->ramin_heap)) + drm_mm_takedown(&chan->ramin_heap); +@@ -909,7 +947,7 @@ + if (init->handle == ~0) + return -EINVAL; + +- chan = nouveau_channel_get(dev, file_priv, init->channel); ++ chan = nouveau_channel_get(file_priv, init->channel); + if (IS_ERR(chan)) + return PTR_ERR(chan); + +@@ -936,7 +974,7 @@ + struct nouveau_channel *chan; + int ret; + +- chan = nouveau_channel_get(dev, file_priv, objfree->channel); ++ chan = nouveau_channel_get(file_priv, objfree->channel); + if (IS_ERR(chan)) + return PTR_ERR(chan); + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_perf.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_perf.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_perf.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_perf.c 2011-06-26 07:59:23.000000000 +0200 +@@ -134,6 +134,49 @@ + return &pm->memtimings.timing[entry[1]]; + } + ++static void ++nouveau_perf_voltage(struct drm_device *dev, struct bit_entry *P, ++ struct nouveau_pm_level *perflvl) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nvbios *bios = &dev_priv->vbios; ++ u8 *vmap; ++ int id; ++ ++ id = perflvl->volt_min; ++ perflvl->volt_min = 0; ++ ++ /* boards using voltage table version <0x40 store the voltage ++ * level directly in the perflvl entry as a multiple of 10mV ++ */ ++ if (dev_priv->engine.pm.voltage.version < 0x40) { ++ perflvl->volt_min = id * 10000; ++ perflvl->volt_max = perflvl->volt_min; ++ return; ++ } ++ ++ /* on newer ones, the perflvl stores an index into yet another ++ * vbios table containing a min/max voltage value for the perflvl ++ */ ++ if (P->version != 2 || P->length < 34) { ++ NV_DEBUG(dev, "where's our volt map table ptr? %d %d\n", ++ P->version, P->length); ++ return; ++ } ++ ++ vmap = ROMPTR(bios, P->data[32]); ++ if (!vmap) { ++ NV_DEBUG(dev, "volt map table pointer invalid\n"); ++ return; ++ } ++ ++ if (id < vmap[3]) { ++ vmap += vmap[1] + (vmap[2] * id); ++ perflvl->volt_min = ROM32(vmap[0]); ++ perflvl->volt_max = ROM32(vmap[4]); ++ } ++} ++ + void + nouveau_perf_init(struct drm_device *dev) + { +@@ -203,7 +246,8 @@ + case 0x13: + case 0x15: + perflvl->fanspeed = entry[55]; +- perflvl->voltage = (recordlen > 56) ? entry[56] : 0; ++ if (recordlen > 56) ++ perflvl->volt_min = entry[56]; + perflvl->core = ROM32(entry[1]) * 10; + perflvl->memory = ROM32(entry[5]) * 20; + break; +@@ -211,7 +255,7 @@ + case 0x23: + case 0x24: + perflvl->fanspeed = entry[4]; +- perflvl->voltage = entry[5]; ++ perflvl->volt_min = entry[5]; + perflvl->core = ROM16(entry[6]) * 1000; + + if (dev_priv->chipset == 0x49 || +@@ -223,7 +267,7 @@ + break; + case 0x25: + perflvl->fanspeed = entry[4]; +- perflvl->voltage = entry[5]; ++ perflvl->volt_min = entry[5]; + perflvl->core = ROM16(entry[6]) * 1000; + perflvl->shader = ROM16(entry[10]) * 1000; + perflvl->memory = ROM16(entry[12]) * 1000; +@@ -232,7 +276,7 @@ + perflvl->memscript = ROM16(entry[2]); + case 0x35: + perflvl->fanspeed = entry[6]; +- perflvl->voltage = entry[7]; ++ perflvl->volt_min = entry[7]; + perflvl->core = ROM16(entry[8]) * 1000; + perflvl->shader = ROM16(entry[10]) * 1000; + perflvl->memory = ROM16(entry[12]) * 1000; +@@ -240,30 +284,34 @@ + perflvl->unk05 = ROM16(entry[16]) * 1000; + break; + case 0x40: +-#define subent(n) entry[perf[2] + ((n) * perf[3])] ++#define subent(n) (ROM16(entry[perf[2] + ((n) * perf[3])]) & 0xfff) * 1000 + perflvl->fanspeed = 0; /*XXX*/ +- perflvl->voltage = entry[2]; ++ perflvl->volt_min = entry[2]; + if (dev_priv->card_type == NV_50) { +- perflvl->core = ROM16(subent(0)) & 0xfff; +- perflvl->shader = ROM16(subent(1)) & 0xfff; +- perflvl->memory = ROM16(subent(2)) & 0xfff; ++ perflvl->core = subent(0); ++ perflvl->shader = subent(1); ++ perflvl->memory = subent(2); ++ perflvl->vdec = subent(3); ++ perflvl->unka0 = subent(4); + } else { +- perflvl->shader = ROM16(subent(3)) & 0xfff; ++ perflvl->hub06 = subent(0); ++ perflvl->hub01 = subent(1); ++ perflvl->copy = subent(2); ++ perflvl->shader = subent(3); ++ perflvl->rop = subent(4); ++ perflvl->memory = subent(5); ++ perflvl->vdec = subent(6); ++ perflvl->daemon = subent(10); ++ perflvl->hub07 = subent(11); + perflvl->core = perflvl->shader / 2; +- perflvl->unk0a = ROM16(subent(4)) & 0xfff; +- perflvl->memory = ROM16(subent(5)) & 0xfff; + } +- +- perflvl->core *= 1000; +- perflvl->shader *= 1000; +- perflvl->memory *= 1000; +- perflvl->unk0a *= 1000; + break; + } + + /* make sure vid is valid */ +- if (pm->voltage.supported && perflvl->voltage) { +- vid = nouveau_volt_vid_lookup(dev, perflvl->voltage); ++ nouveau_perf_voltage(dev, &P, perflvl); ++ if (pm->voltage.supported && perflvl->volt_min) { ++ vid = nouveau_volt_vid_lookup(dev, perflvl->volt_min); + if (vid < 0) { + NV_DEBUG(dev, "drop perflvl %d, bad vid\n", i); + entry += recordlen; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_pm.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_pm.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c 2011-06-26 07:59:23.000000000 +0200 +@@ -64,18 +64,26 @@ + if (perflvl == pm->cur) + return 0; + +- if (pm->voltage.supported && pm->voltage_set && perflvl->voltage) { +- ret = pm->voltage_set(dev, perflvl->voltage); ++ if (pm->voltage.supported && pm->voltage_set && perflvl->volt_min) { ++ ret = pm->voltage_set(dev, perflvl->volt_min); + if (ret) { + NV_ERROR(dev, "voltage_set %d failed: %d\n", +- perflvl->voltage, ret); ++ perflvl->volt_min, ret); + } + } + +- nouveau_pm_clock_set(dev, perflvl, PLL_CORE, perflvl->core); +- nouveau_pm_clock_set(dev, perflvl, PLL_SHADER, perflvl->shader); +- nouveau_pm_clock_set(dev, perflvl, PLL_MEMORY, perflvl->memory); +- nouveau_pm_clock_set(dev, perflvl, PLL_UNK05, perflvl->unk05); ++ if (pm->clocks_pre) { ++ void *state = pm->clocks_pre(dev, perflvl); ++ if (IS_ERR(state)) ++ return PTR_ERR(state); ++ pm->clocks_set(dev, state); ++ } else ++ if (pm->clock_set) { ++ nouveau_pm_clock_set(dev, perflvl, PLL_CORE, perflvl->core); ++ nouveau_pm_clock_set(dev, perflvl, PLL_SHADER, perflvl->shader); ++ nouveau_pm_clock_set(dev, perflvl, PLL_MEMORY, perflvl->memory); ++ nouveau_pm_clock_set(dev, perflvl, PLL_UNK05, perflvl->unk05); ++ } + + pm->cur = perflvl; + return 0; +@@ -92,9 +100,6 @@ + if (nouveau_perflvl_wr != 7777) + return -EPERM; + +- if (!pm->clock_set) +- return -EINVAL; +- + if (!strncmp(profile, "boot", 4)) + perflvl = &pm->boot; + else { +@@ -123,31 +128,37 @@ + struct nouveau_pm_engine *pm = &dev_priv->engine.pm; + int ret; + +- if (!pm->clock_get) +- return -EINVAL; +- + memset(perflvl, 0, sizeof(*perflvl)); + +- ret = pm->clock_get(dev, PLL_CORE); +- if (ret > 0) +- perflvl->core = ret; +- +- ret = pm->clock_get(dev, PLL_MEMORY); +- if (ret > 0) +- perflvl->memory = ret; +- +- ret = pm->clock_get(dev, PLL_SHADER); +- if (ret > 0) +- perflvl->shader = ret; +- +- ret = pm->clock_get(dev, PLL_UNK05); +- if (ret > 0) +- perflvl->unk05 = ret; ++ if (pm->clocks_get) { ++ ret = pm->clocks_get(dev, perflvl); ++ if (ret) ++ return ret; ++ } else ++ if (pm->clock_get) { ++ ret = pm->clock_get(dev, PLL_CORE); ++ if (ret > 0) ++ perflvl->core = ret; ++ ++ ret = pm->clock_get(dev, PLL_MEMORY); ++ if (ret > 0) ++ perflvl->memory = ret; ++ ++ ret = pm->clock_get(dev, PLL_SHADER); ++ if (ret > 0) ++ perflvl->shader = ret; ++ ++ ret = pm->clock_get(dev, PLL_UNK05); ++ if (ret > 0) ++ perflvl->unk05 = ret; ++ } + + if (pm->voltage.supported && pm->voltage_get) { + ret = pm->voltage_get(dev); +- if (ret > 0) +- perflvl->voltage = ret; ++ if (ret > 0) { ++ perflvl->volt_min = ret; ++ perflvl->volt_max = ret; ++ } + } + + return 0; +@@ -156,7 +167,7 @@ + static void + nouveau_pm_perflvl_info(struct nouveau_pm_level *perflvl, char *ptr, int len) + { +- char c[16], s[16], v[16], f[16], t[16]; ++ char c[16], s[16], v[32], f[16], t[16], m[16]; + + c[0] = '\0'; + if (perflvl->core) +@@ -166,9 +177,19 @@ + if (perflvl->shader) + snprintf(s, sizeof(s), " shader %dMHz", perflvl->shader / 1000); + ++ m[0] = '\0'; ++ if (perflvl->memory) ++ snprintf(m, sizeof(m), " memory %dMHz", perflvl->memory / 1000); ++ + v[0] = '\0'; +- if (perflvl->voltage) +- snprintf(v, sizeof(v), " voltage %dmV", perflvl->voltage * 10); ++ if (perflvl->volt_min && perflvl->volt_min != perflvl->volt_max) { ++ snprintf(v, sizeof(v), " voltage %dmV-%dmV", ++ perflvl->volt_min / 1000, perflvl->volt_max / 1000); ++ } else ++ if (perflvl->volt_min) { ++ snprintf(v, sizeof(v), " voltage %dmV", ++ perflvl->volt_min / 1000); ++ } + + f[0] = '\0'; + if (perflvl->fanspeed) +@@ -178,8 +199,7 @@ + if (perflvl->timing) + snprintf(t, sizeof(t), " timing %d", perflvl->timing->id); + +- snprintf(ptr, len, "memory %dMHz%s%s%s%s%s\n", perflvl->memory / 1000, +- c, s, v, f, t); ++ snprintf(ptr, len, "%s%s%s%s%s%s\n", c, s, m, t, v, f); + } + + static ssize_t +@@ -190,7 +210,7 @@ + char *ptr = buf; + int len = PAGE_SIZE; + +- snprintf(ptr, len, "%d: ", perflvl->id); ++ snprintf(ptr, len, "%d:", perflvl->id); + ptr += strlen(buf); + len -= strlen(buf); + +@@ -211,9 +231,9 @@ + if (!pm->cur) + snprintf(ptr, len, "setting: boot\n"); + else if (pm->cur == &pm->boot) +- snprintf(ptr, len, "setting: boot\nc: "); ++ snprintf(ptr, len, "setting: boot\nc:"); + else +- snprintf(ptr, len, "setting: static %d\nc: ", pm->cur->id); ++ snprintf(ptr, len, "setting: static %d\nc:", pm->cur->id); + ptr += strlen(buf); + len -= strlen(buf); + +@@ -488,7 +508,7 @@ + NV_INFO(dev, "%d available performance level(s)\n", pm->nr_perflvl); + for (i = 0; i < pm->nr_perflvl; i++) { + nouveau_pm_perflvl_info(&pm->perflvl[i], info, sizeof(info)); +- NV_INFO(dev, "%d: %s", pm->perflvl[i].id, info); ++ NV_INFO(dev, "%d:%s", pm->perflvl[i].id, info); + } + + /* determine current ("boot") performance level */ +@@ -498,7 +518,7 @@ + pm->cur = &pm->boot; + + nouveau_pm_perflvl_info(&pm->boot, info, sizeof(info)); +- NV_INFO(dev, "c: %s", info); ++ NV_INFO(dev, "c:%s", info); + } + + /* switch performance levels now if requested */ +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_pm.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_pm.h 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.h 2011-06-26 07:59:23.000000000 +0200 +@@ -59,10 +59,12 @@ + void nv50_pm_clock_set(struct drm_device *, void *); + + /* nva3_pm.c */ +-int nva3_pm_clock_get(struct drm_device *, u32 id); +-void *nva3_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *, +- u32 id, int khz); +-void nva3_pm_clock_set(struct drm_device *, void *); ++int nva3_pm_clocks_get(struct drm_device *, struct nouveau_pm_level *); ++void *nva3_pm_clocks_pre(struct drm_device *, struct nouveau_pm_level *); ++void nva3_pm_clocks_set(struct drm_device *, void *); ++ ++/* nvc0_pm.c */ ++int nvc0_pm_clocks_get(struct drm_device *, struct nouveau_pm_level *); + + /* nouveau_temp.c */ + void nouveau_temp_init(struct drm_device *dev); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_state.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_state.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2011-06-26 07:59:23.000000000 +0200 +@@ -91,6 +91,7 @@ + engine->pm.clock_pre = nv04_pm_clock_pre; + engine->pm.clock_set = nv04_pm_clock_set; + engine->vram.init = nouveau_mem_detect; ++ engine->vram.takedown = nouveau_stub_takedown; + engine->vram.flags_valid = nouveau_mem_flags_valid; + break; + case 0x10: +@@ -139,6 +140,7 @@ + engine->pm.clock_pre = nv04_pm_clock_pre; + engine->pm.clock_set = nv04_pm_clock_set; + engine->vram.init = nouveau_mem_detect; ++ engine->vram.takedown = nouveau_stub_takedown; + engine->vram.flags_valid = nouveau_mem_flags_valid; + break; + case 0x20: +@@ -187,6 +189,7 @@ + engine->pm.clock_pre = nv04_pm_clock_pre; + engine->pm.clock_set = nv04_pm_clock_set; + engine->vram.init = nouveau_mem_detect; ++ engine->vram.takedown = nouveau_stub_takedown; + engine->vram.flags_valid = nouveau_mem_flags_valid; + break; + case 0x30: +@@ -237,6 +240,7 @@ + engine->pm.voltage_get = nouveau_voltage_gpio_get; + engine->pm.voltage_set = nouveau_voltage_gpio_set; + engine->vram.init = nouveau_mem_detect; ++ engine->vram.takedown = nouveau_stub_takedown; + engine->vram.flags_valid = nouveau_mem_flags_valid; + break; + case 0x40: +@@ -289,6 +293,7 @@ + engine->pm.voltage_set = nouveau_voltage_gpio_set; + engine->pm.temp_get = nv40_temp_get; + engine->vram.init = nouveau_mem_detect; ++ engine->vram.takedown = nouveau_stub_takedown; + engine->vram.flags_valid = nouveau_mem_flags_valid; + break; + case 0x50: +@@ -354,9 +359,9 @@ + engine->pm.clock_set = nv50_pm_clock_set; + break; + default: +- engine->pm.clock_get = nva3_pm_clock_get; +- engine->pm.clock_pre = nva3_pm_clock_pre; +- engine->pm.clock_set = nva3_pm_clock_set; ++ engine->pm.clocks_get = nva3_pm_clocks_get; ++ engine->pm.clocks_pre = nva3_pm_clocks_pre; ++ engine->pm.clocks_set = nva3_pm_clocks_set; + break; + } + engine->pm.voltage_get = nouveau_voltage_gpio_get; +@@ -366,6 +371,7 @@ + else + engine->pm.temp_get = nv40_temp_get; + engine->vram.init = nv50_vram_init; ++ engine->vram.takedown = nv50_vram_fini; + engine->vram.get = nv50_vram_new; + engine->vram.put = nv50_vram_del; + engine->vram.flags_valid = nv50_vram_flags_valid; +@@ -412,9 +418,14 @@ + engine->gpio.irq_unregister = nv50_gpio_irq_unregister; + engine->gpio.irq_enable = nv50_gpio_irq_enable; + engine->vram.init = nvc0_vram_init; ++ engine->vram.takedown = nv50_vram_fini; + engine->vram.get = nvc0_vram_new; + engine->vram.put = nv50_vram_del; + engine->vram.flags_valid = nvc0_vram_flags_valid; ++ engine->pm.temp_get = nv84_temp_get; ++ engine->pm.clocks_get = nvc0_pm_clocks_get; ++ engine->pm.voltage_get = nouveau_voltage_gpio_get; ++ engine->pm.voltage_set = nouveau_voltage_gpio_set; + break; + default: + NV_ERROR(dev, "NV%02x unsupported\n", dev_priv->chipset); +@@ -448,8 +459,8 @@ + struct drm_nouveau_private *dev_priv = dev->dev_private; + int ret; + +- ret = nouveau_channel_alloc(dev, &dev_priv->channel, +- (struct drm_file *)-2, NvDmaFB, NvDmaTT); ++ ret = nouveau_channel_alloc(dev, &dev_priv->channel, NULL, ++ NvDmaFB, NvDmaTT); + if (ret) + return ret; + +@@ -528,7 +539,7 @@ + + nouveau_pm_init(dev); + +- ret = nouveau_mem_vram_init(dev); ++ ret = engine->vram.init(dev); + if (ret) + goto out_bios; + +@@ -540,10 +551,14 @@ + if (ret) + goto out_gpuobj; + +- ret = nouveau_mem_gart_init(dev); ++ ret = nouveau_mem_vram_init(dev); + if (ret) + goto out_instmem; + ++ ret = nouveau_mem_gart_init(dev); ++ if (ret) ++ goto out_ttmvram; ++ + /* PMC */ + ret = engine->mc.init(dev); + if (ret) +@@ -564,7 +579,7 @@ + if (ret) + goto out_timer; + +- if (!nouveau_noaccel) { ++ if (!dev_priv->noaccel) { + switch (dev_priv->card_type) { + case NV_04: + nv04_graph_create(dev); +@@ -619,8 +634,11 @@ + break; + } + +- if (dev_priv->card_type == NV_40) +- nv40_mpeg_create(dev); ++ if (dev_priv->card_type == NV_40 || ++ dev_priv->chipset == 0x31 || ++ dev_priv->chipset == 0x34 || ++ dev_priv->chipset == 0x36) ++ nv31_mpeg_create(dev); + else + if (dev_priv->card_type == NV_50 && + (dev_priv->chipset < 0x98 || dev_priv->chipset == 0xa0)) +@@ -676,10 +694,10 @@ + drm_vblank_cleanup(dev); + engine->display.destroy(dev); + out_fifo: +- if (!nouveau_noaccel) ++ if (!dev_priv->noaccel) + engine->fifo.takedown(dev); + out_engine: +- if (!nouveau_noaccel) { ++ if (!dev_priv->noaccel) { + for (e = e - 1; e >= 0; e--) { + if (!dev_priv->eng[e]) + continue; +@@ -697,12 +715,14 @@ + engine->mc.takedown(dev); + out_gart: + nouveau_mem_gart_fini(dev); ++out_ttmvram: ++ nouveau_mem_vram_fini(dev); + out_instmem: + engine->instmem.takedown(dev); + out_gpuobj: + nouveau_gpuobj_takedown(dev); + out_vram: +- nouveau_mem_vram_fini(dev); ++ engine->vram.takedown(dev); + out_bios: + nouveau_pm_fini(dev); + nouveau_bios_takedown(dev); +@@ -719,12 +739,17 @@ + struct nouveau_engine *engine = &dev_priv->engine; + int e; + ++ drm_kms_helper_poll_fini(dev); ++ nouveau_fbcon_fini(dev); ++ + if (dev_priv->channel) { +- nouveau_fence_fini(dev); + nouveau_channel_put_unlocked(&dev_priv->channel); ++ nouveau_fence_fini(dev); + } + +- if (!nouveau_noaccel) { ++ engine->display.destroy(dev); ++ ++ if (!dev_priv->noaccel) { + engine->fifo.takedown(dev); + for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) { + if (dev_priv->eng[e]) { +@@ -749,10 +774,11 @@ + ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_TT); + mutex_unlock(&dev->struct_mutex); + nouveau_mem_gart_fini(dev); ++ nouveau_mem_vram_fini(dev); + + engine->instmem.takedown(dev); + nouveau_gpuobj_takedown(dev); +- nouveau_mem_vram_fini(dev); ++ engine->vram.takedown(dev); + + nouveau_irq_fini(dev); + drm_vblank_cleanup(dev); +@@ -763,6 +789,41 @@ + vga_client_register(dev->pdev, NULL, NULL, NULL); + } + ++int ++nouveau_open(struct drm_device *dev, struct drm_file *file_priv) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fpriv *fpriv; ++ int ret; ++ ++ fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); ++ if (unlikely(!fpriv)) ++ return -ENOMEM; ++ ++ spin_lock_init(&fpriv->lock); ++ INIT_LIST_HEAD(&fpriv->channels); ++ ++ if (dev_priv->card_type == NV_50) { ++ ret = nouveau_vm_new(dev, 0, (1ULL << 40), 0x0020000000ULL, ++ &fpriv->vm); ++ if (ret) { ++ kfree(fpriv); ++ return ret; ++ } ++ } else ++ if (dev_priv->card_type >= NV_C0) { ++ ret = nouveau_vm_new(dev, 0, (1ULL << 40), 0x0008000000ULL, ++ &fpriv->vm); ++ if (ret) { ++ kfree(fpriv); ++ return ret; ++ } ++ } ++ ++ file_priv->driver_priv = fpriv; ++ return 0; ++} ++ + /* here a client dies, release the stuff that was allocated for its + * file_priv */ + void nouveau_preclose(struct drm_device *dev, struct drm_file *file_priv) +@@ -770,6 +831,14 @@ + nouveau_channel_cleanup(dev, file_priv); + } + ++void ++nouveau_postclose(struct drm_device *dev, struct drm_file *file_priv) ++{ ++ struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv); ++ nouveau_vm_ref(NULL, &fpriv->vm, NULL); ++ kfree(fpriv); ++} ++ + /* first module load, setup the mmio/fb mapping */ + /* KMS: we need mmio at load time, not when the first drm client opens. */ + int nouveau_firstopen(struct drm_device *dev) +@@ -935,6 +1004,25 @@ + NV_INFO(dev, "Detected an NV%2x generation card (0x%08x)\n", + dev_priv->card_type, reg0); + ++ /* Determine whether we'll attempt acceleration or not, some ++ * cards are disabled by default here due to them being known ++ * non-functional, or never been tested due to lack of hw. ++ */ ++ dev_priv->noaccel = !!nouveau_noaccel; ++ if (nouveau_noaccel == -1) { ++ switch (dev_priv->chipset) { ++ case 0xc1: /* known broken */ ++ case 0xc8: /* never tested */ ++ NV_INFO(dev, "acceleration disabled by default, pass " ++ "noaccel=0 to force enable\n"); ++ dev_priv->noaccel = true; ++ break; ++ default: ++ dev_priv->noaccel = false; ++ break; ++ } ++ } ++ + ret = nouveau_remove_conflicting_drivers(dev); + if (ret) + goto err_mmio; +@@ -999,11 +1087,7 @@ + int nouveau_unload(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_engine *engine = &dev_priv->engine; + +- drm_kms_helper_poll_fini(dev); +- nouveau_fbcon_fini(dev); +- engine->display.destroy(dev); + nouveau_card_takedown(dev); + + iounmap(dev_priv->mmio); +@@ -1122,6 +1206,23 @@ + return false; + } + ++/* Wait until cond(data) == true, up until timeout has hit */ ++bool ++nouveau_wait_cb(struct drm_device *dev, u64 timeout, ++ bool (*cond)(void *), void *data) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; ++ u64 start = ptimer->read(dev); ++ ++ do { ++ if (cond(data) == true) ++ return true; ++ } while (ptimer->read(dev) - start < timeout); ++ ++ return false; ++} ++ + /* Waits for PGRAPH to go completely idle */ + bool nouveau_wait_for_idle(struct drm_device *dev) + { +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_temp.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_temp.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c 2011-06-26 07:59:23.000000000 +0200 +@@ -43,7 +43,7 @@ + + /* Set the default sensor's contants */ + sensor->offset_constant = 0; +- sensor->offset_mult = 1; ++ sensor->offset_mult = 0; + sensor->offset_div = 1; + sensor->slope_mult = 1; + sensor->slope_div = 1; +@@ -99,6 +99,13 @@ + sensor->slope_mult = 431; + sensor->slope_div = 10000; + break; ++ ++ case 0x67: ++ sensor->offset_mult = -26149; ++ sensor->offset_div = 100; ++ sensor->slope_mult = 484; ++ sensor->slope_div = 10000; ++ break; + } + } + +@@ -109,7 +116,7 @@ + + /* Read the entries from the table */ + for (i = 0; i < entries; i++) { +- u16 value = ROM16(temp[1]); ++ s16 value = ROM16(temp[1]); + + switch (temp[0]) { + case 0x01: +@@ -160,8 +167,8 @@ + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_pm_engine *pm = &dev_priv->engine.pm; + struct nouveau_pm_temp_sensor_constants *sensor = &pm->sensor_constants; +- u32 offset = sensor->offset_mult / sensor->offset_div; +- u32 sensor_calibration; ++ s32 offset = sensor->offset_mult / sensor->offset_div; ++ s32 sensor_calibration; + + /* set up the sensors */ + sensor_calibration = 120 - offset - sensor->offset_constant; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_vm.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_vm.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.c 2011-06-26 07:59:23.000000000 +0200 +@@ -369,23 +369,26 @@ + } + + static void +-nouveau_vm_unlink(struct nouveau_vm *vm, struct nouveau_gpuobj *pgd) ++nouveau_vm_unlink(struct nouveau_vm *vm, struct nouveau_gpuobj *mpgd) + { + struct nouveau_vm_pgd *vpgd, *tmp; ++ struct nouveau_gpuobj *pgd = NULL; + +- if (!pgd) ++ if (!mpgd) + return; + + mutex_lock(&vm->mm->mutex); + list_for_each_entry_safe(vpgd, tmp, &vm->pgd_list, head) { +- if (vpgd->obj != pgd) +- continue; +- +- list_del(&vpgd->head); +- nouveau_gpuobj_ref(NULL, &vpgd->obj); +- kfree(vpgd); ++ if (vpgd->obj == mpgd) { ++ pgd = vpgd->obj; ++ list_del(&vpgd->head); ++ kfree(vpgd); ++ break; ++ } + } + mutex_unlock(&vm->mm->mutex); ++ ++ nouveau_gpuobj_ref(NULL, &pgd); + } + + static void +@@ -396,8 +399,8 @@ + list_for_each_entry_safe(vpgd, tmp, &vm->pgd_list, head) { + nouveau_vm_unlink(vm, vpgd->obj); + } +- WARN_ON(nouveau_mm_fini(&vm->mm) != 0); + ++ nouveau_mm_fini(&vm->mm); + kfree(vm->pgt); + kfree(vm); + } +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_vm.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_vm.h 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.h 2011-06-26 07:59:23.000000000 +0200 +@@ -41,6 +41,8 @@ + }; + + struct nouveau_vma { ++ struct list_head head; ++ int refcount; + struct nouveau_vm *vm; + struct nouveau_mm_node *node; + u64 offset; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_volt.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_volt.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nouveau_volt.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nouveau_volt.c 2011-06-26 07:59:23.000000000 +0200 +@@ -27,7 +27,7 @@ + #include "nouveau_drv.h" + #include "nouveau_pm.h" + +-static const enum dcb_gpio_tag vidtag[] = { 0x04, 0x05, 0x06, 0x1a }; ++static const enum dcb_gpio_tag vidtag[] = { 0x04, 0x05, 0x06, 0x1a, 0x73 }; + static int nr_vidtag = sizeof(vidtag) / sizeof(vidtag[0]); + + int +@@ -170,6 +170,13 @@ + */ + vidshift = 2; + break; ++ case 0x40: ++ headerlen = volt[1]; ++ recordlen = volt[2]; ++ entries = volt[3]; /* not a clue what the entries are for.. */ ++ vidmask = volt[11]; /* guess.. */ ++ vidshift = 0; ++ break; + default: + NV_WARN(dev, "voltage table 0x%02x unknown\n", volt[0]); + return; +@@ -197,16 +204,37 @@ + } + + /* parse vbios entries into common format */ +- voltage->level = kcalloc(entries, sizeof(*voltage->level), GFP_KERNEL); +- if (!voltage->level) +- return; ++ voltage->version = volt[0]; ++ if (voltage->version < 0x40) { ++ voltage->nr_level = entries; ++ voltage->level = ++ kcalloc(entries, sizeof(*voltage->level), GFP_KERNEL); ++ if (!voltage->level) ++ return; + +- entry = volt + headerlen; +- for (i = 0; i < entries; i++, entry += recordlen) { +- voltage->level[i].voltage = entry[0]; +- voltage->level[i].vid = entry[1] >> vidshift; ++ entry = volt + headerlen; ++ for (i = 0; i < entries; i++, entry += recordlen) { ++ voltage->level[i].voltage = entry[0] * 10000; ++ voltage->level[i].vid = entry[1] >> vidshift; ++ } ++ } else { ++ u32 volt_uv = ROM32(volt[4]); ++ s16 step_uv = ROM16(volt[8]); ++ u8 vid; ++ ++ voltage->nr_level = voltage->vid_mask + 1; ++ voltage->level = kcalloc(voltage->nr_level, ++ sizeof(*voltage->level), GFP_KERNEL); ++ if (!voltage->level) ++ return; ++ ++ for (vid = 0; vid <= voltage->vid_mask; vid++) { ++ voltage->level[vid].voltage = volt_uv; ++ voltage->level[vid].vid = vid; ++ volt_uv += step_uv; ++ } + } +- voltage->nr_level = entries; ++ + voltage->supported = true; + } + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv04_crtc.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv04_crtc.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2011-06-26 07:59:23.000000000 +0200 +@@ -1035,7 +1035,7 @@ + drm_crtc_helper_add(&nv_crtc->base, &nv04_crtc_helper_funcs); + drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); + +- ret = nouveau_bo_new(dev, NULL, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, ++ ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, + 0, 0x0000, &nv_crtc->cursor.nvbo); + if (!ret) { + ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv04_instmem.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv04_instmem.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c 2011-06-26 07:59:23.000000000 +0200 +@@ -28,6 +28,31 @@ + /* RAMIN always available */ + dev_priv->ramin_available = true; + ++ /* Reserve space at end of VRAM for PRAMIN */ ++ if (dev_priv->card_type >= NV_40) { ++ u32 vs = hweight8((nv_rd32(dev, 0x001540) & 0x0000ff00) >> 8); ++ u32 rsvd; ++ ++ /* estimate grctx size, the magics come from nv40_grctx.c */ ++ if (dev_priv->chipset == 0x40) rsvd = 0x6aa0 * vs; ++ else if (dev_priv->chipset < 0x43) rsvd = 0x4f00 * vs; ++ else if (nv44_graph_class(dev)) rsvd = 0x4980 * vs; ++ else rsvd = 0x4a40 * vs; ++ rsvd += 16 * 1024; ++ rsvd *= dev_priv->engine.fifo.channels; ++ ++ /* pciegart table */ ++ if (drm_pci_device_is_pcie(dev)) ++ rsvd += 512 * 1024; ++ ++ /* object storage */ ++ rsvd += 512 * 1024; ++ ++ dev_priv->ramin_rsvd_vram = round_up(rsvd, 4096); ++ } else { ++ dev_priv->ramin_rsvd_vram = 512 * 1024; ++ } ++ + /* Setup shared RAMHT */ + ret = nouveau_gpuobj_new_fake(dev, 0x10000, ~0, 4096, + NVOBJ_FLAG_ZERO_ALLOC, &ramht); +@@ -112,7 +137,8 @@ + } + + int +-nv04_instmem_get(struct nouveau_gpuobj *gpuobj, u32 size, u32 align) ++nv04_instmem_get(struct nouveau_gpuobj *gpuobj, struct nouveau_channel *chan, ++ u32 size, u32 align) + { + struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; + struct drm_mm_node *ramin = NULL; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv31_mpeg.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv31_mpeg.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv31_mpeg.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv31_mpeg.c 2011-06-26 07:59:23.000000000 +0200 +@@ -0,0 +1,344 @@ ++/* ++ * Copyright 2011 Red Hat Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: Ben Skeggs ++ */ ++ ++#include "drmP.h" ++#include "nouveau_drv.h" ++#include "nouveau_ramht.h" ++ ++struct nv31_mpeg_engine { ++ struct nouveau_exec_engine base; ++ atomic_t refcount; ++}; ++ ++ ++static int ++nv31_mpeg_context_new(struct nouveau_channel *chan, int engine) ++{ ++ struct nv31_mpeg_engine *pmpeg = nv_engine(chan->dev, engine); ++ ++ if (!atomic_add_unless(&pmpeg->refcount, 1, 1)) ++ return -EBUSY; ++ ++ chan->engctx[engine] = (void *)0xdeadcafe; ++ return 0; ++} ++ ++static void ++nv31_mpeg_context_del(struct nouveau_channel *chan, int engine) ++{ ++ struct nv31_mpeg_engine *pmpeg = nv_engine(chan->dev, engine); ++ atomic_dec(&pmpeg->refcount); ++ chan->engctx[engine] = NULL; ++} ++ ++static int ++nv40_mpeg_context_new(struct nouveau_channel *chan, int engine) ++{ ++ struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj *ctx = NULL; ++ unsigned long flags; ++ int ret; ++ ++ NV_DEBUG(dev, "ch%d\n", chan->id); ++ ++ ret = nouveau_gpuobj_new(dev, NULL, 264 * 4, 16, NVOBJ_FLAG_ZERO_ALLOC | ++ NVOBJ_FLAG_ZERO_FREE, &ctx); ++ if (ret) ++ return ret; ++ ++ nv_wo32(ctx, 0x78, 0x02001ec1); ++ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ nv_mask(dev, 0x002500, 0x00000001, 0x00000000); ++ if ((nv_rd32(dev, 0x003204) & 0x1f) == chan->id) ++ nv_wr32(dev, 0x00330c, ctx->pinst >> 4); ++ nv_wo32(chan->ramfc, 0x54, ctx->pinst >> 4); ++ nv_mask(dev, 0x002500, 0x00000001, 0x00000001); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ ++ chan->engctx[engine] = ctx; ++ return 0; ++} ++ ++static void ++nv40_mpeg_context_del(struct nouveau_channel *chan, int engine) ++{ ++ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; ++ struct nouveau_gpuobj *ctx = chan->engctx[engine]; ++ struct drm_device *dev = chan->dev; ++ unsigned long flags; ++ u32 inst = 0x80000000 | (ctx->pinst >> 4); ++ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000); ++ if (nv_rd32(dev, 0x00b318) == inst) ++ nv_mask(dev, 0x00b318, 0x80000000, 0x00000000); ++ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ ++ nouveau_gpuobj_ref(NULL, &ctx); ++ chan->engctx[engine] = NULL; ++} ++ ++static int ++nv31_mpeg_object_new(struct nouveau_channel *chan, int engine, ++ u32 handle, u16 class) ++{ ++ struct drm_device *dev = chan->dev; ++ struct nouveau_gpuobj *obj = NULL; ++ int ret; ++ ++ ret = nouveau_gpuobj_new(dev, chan, 20, 16, NVOBJ_FLAG_ZERO_ALLOC | ++ NVOBJ_FLAG_ZERO_FREE, &obj); ++ if (ret) ++ return ret; ++ obj->engine = 2; ++ obj->class = class; ++ ++ nv_wo32(obj, 0x00, class); ++ ++ ret = nouveau_ramht_insert(chan, handle, obj); ++ nouveau_gpuobj_ref(NULL, &obj); ++ return ret; ++} ++ ++static int ++nv31_mpeg_init(struct drm_device *dev, int engine) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv31_mpeg_engine *pmpeg = nv_engine(dev, engine); ++ int i; ++ ++ /* VPE init */ ++ nv_mask(dev, 0x000200, 0x00000002, 0x00000000); ++ nv_mask(dev, 0x000200, 0x00000002, 0x00000002); ++ nv_wr32(dev, 0x00b0e0, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */ ++ nv_wr32(dev, 0x00b0e8, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */ ++ ++ for (i = 0; i < dev_priv->engine.fb.num_tiles; i++) ++ pmpeg->base.set_tile_region(dev, i); ++ ++ /* PMPEG init */ ++ nv_wr32(dev, 0x00b32c, 0x00000000); ++ nv_wr32(dev, 0x00b314, 0x00000100); ++ nv_wr32(dev, 0x00b220, nv44_graph_class(dev) ? 0x00000044 : 0x00000031); ++ nv_wr32(dev, 0x00b300, 0x02001ec1); ++ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001); ++ ++ nv_wr32(dev, 0x00b100, 0xffffffff); ++ nv_wr32(dev, 0x00b140, 0xffffffff); ++ ++ if (!nv_wait(dev, 0x00b200, 0x00000001, 0x00000000)) { ++ NV_ERROR(dev, "PMPEG init: 0x%08x\n", nv_rd32(dev, 0x00b200)); ++ return -EBUSY; ++ } ++ ++ return 0; ++} ++ ++static int ++nv31_mpeg_fini(struct drm_device *dev, int engine) ++{ ++ /*XXX: context save? */ ++ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000); ++ nv_wr32(dev, 0x00b140, 0x00000000); ++ return 0; ++} ++ ++static int ++nv31_mpeg_mthd_dma(struct nouveau_channel *chan, u32 class, u32 mthd, u32 data) ++{ ++ struct drm_device *dev = chan->dev; ++ u32 inst = data << 4; ++ u32 dma0 = nv_ri32(dev, inst + 0); ++ u32 dma1 = nv_ri32(dev, inst + 4); ++ u32 dma2 = nv_ri32(dev, inst + 8); ++ u32 base = (dma2 & 0xfffff000) | (dma0 >> 20); ++ u32 size = dma1 + 1; ++ ++ /* only allow linear DMA objects */ ++ if (!(dma0 & 0x00002000)) ++ return -EINVAL; ++ ++ if (mthd == 0x0190) { ++ /* DMA_CMD */ ++ nv_mask(dev, 0x00b300, 0x00030000, (dma0 & 0x00030000)); ++ nv_wr32(dev, 0x00b334, base); ++ nv_wr32(dev, 0x00b324, size); ++ } else ++ if (mthd == 0x01a0) { ++ /* DMA_DATA */ ++ nv_mask(dev, 0x00b300, 0x000c0000, (dma0 & 0x00030000) << 2); ++ nv_wr32(dev, 0x00b360, base); ++ nv_wr32(dev, 0x00b364, size); ++ } else { ++ /* DMA_IMAGE, VRAM only */ ++ if (dma0 & 0x000c0000) ++ return -EINVAL; ++ ++ nv_wr32(dev, 0x00b370, base); ++ nv_wr32(dev, 0x00b374, size); ++ } ++ ++ return 0; ++} ++ ++static int ++nv31_mpeg_isr_chid(struct drm_device *dev, u32 inst) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj *ctx; ++ unsigned long flags; ++ int i; ++ ++ /* hardcode drm channel id on nv3x, so swmthd lookup works */ ++ if (dev_priv->card_type < NV_40) ++ return 0; ++ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ for (i = 0; i < dev_priv->engine.fifo.channels; i++) { ++ if (!dev_priv->channels.ptr[i]) ++ continue; ++ ++ ctx = dev_priv->channels.ptr[i]->engctx[NVOBJ_ENGINE_MPEG]; ++ if (ctx && ctx->pinst == inst) ++ break; ++ } ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); ++ return i; ++} ++ ++static void ++nv31_vpe_set_tile_region(struct drm_device *dev, int i) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; ++ ++ nv_wr32(dev, 0x00b008 + (i * 0x10), tile->pitch); ++ nv_wr32(dev, 0x00b004 + (i * 0x10), tile->limit); ++ nv_wr32(dev, 0x00b000 + (i * 0x10), tile->addr); ++} ++ ++static void ++nv31_mpeg_isr(struct drm_device *dev) ++{ ++ u32 inst = (nv_rd32(dev, 0x00b318) & 0x000fffff) << 4; ++ u32 chid = nv31_mpeg_isr_chid(dev, inst); ++ u32 stat = nv_rd32(dev, 0x00b100); ++ u32 type = nv_rd32(dev, 0x00b230); ++ u32 mthd = nv_rd32(dev, 0x00b234); ++ u32 data = nv_rd32(dev, 0x00b238); ++ u32 show = stat; ++ ++ if (stat & 0x01000000) { ++ /* happens on initial binding of the object */ ++ if (type == 0x00000020 && mthd == 0x0000) { ++ nv_mask(dev, 0x00b308, 0x00000000, 0x00000000); ++ show &= ~0x01000000; ++ } ++ ++ if (type == 0x00000010) { ++ if (!nouveau_gpuobj_mthd_call2(dev, chid, 0x3174, mthd, data)) ++ show &= ~0x01000000; ++ } ++ } ++ ++ nv_wr32(dev, 0x00b100, stat); ++ nv_wr32(dev, 0x00b230, 0x00000001); ++ ++ if (show && nouveau_ratelimit()) { ++ NV_INFO(dev, "PMPEG: Ch %d [0x%08x] 0x%08x 0x%08x 0x%08x 0x%08x\n", ++ chid, inst, stat, type, mthd, data); ++ } ++} ++ ++static void ++nv31_vpe_isr(struct drm_device *dev) ++{ ++ if (nv_rd32(dev, 0x00b100)) ++ nv31_mpeg_isr(dev); ++ ++ if (nv_rd32(dev, 0x00b800)) { ++ u32 stat = nv_rd32(dev, 0x00b800); ++ NV_INFO(dev, "PMSRCH: 0x%08x\n", stat); ++ nv_wr32(dev, 0xb800, stat); ++ } ++} ++ ++static void ++nv31_mpeg_destroy(struct drm_device *dev, int engine) ++{ ++ struct nv31_mpeg_engine *pmpeg = nv_engine(dev, engine); ++ ++ nouveau_irq_unregister(dev, 0); ++ ++ NVOBJ_ENGINE_DEL(dev, MPEG); ++ kfree(pmpeg); ++} ++ ++int ++nv31_mpeg_create(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv31_mpeg_engine *pmpeg; ++ ++ pmpeg = kzalloc(sizeof(*pmpeg), GFP_KERNEL); ++ if (!pmpeg) ++ return -ENOMEM; ++ atomic_set(&pmpeg->refcount, 0); ++ ++ pmpeg->base.destroy = nv31_mpeg_destroy; ++ pmpeg->base.init = nv31_mpeg_init; ++ pmpeg->base.fini = nv31_mpeg_fini; ++ if (dev_priv->card_type < NV_40) { ++ pmpeg->base.context_new = nv31_mpeg_context_new; ++ pmpeg->base.context_del = nv31_mpeg_context_del; ++ } else { ++ pmpeg->base.context_new = nv40_mpeg_context_new; ++ pmpeg->base.context_del = nv40_mpeg_context_del; ++ } ++ pmpeg->base.object_new = nv31_mpeg_object_new; ++ ++ /* ISR vector, PMC_ENABLE bit, and TILE regs are shared between ++ * all VPE engines, for this driver's purposes the PMPEG engine ++ * will be treated as the "master" and handle the global VPE ++ * bits too ++ */ ++ pmpeg->base.set_tile_region = nv31_vpe_set_tile_region; ++ nouveau_irq_register(dev, 0, nv31_vpe_isr); ++ ++ NVOBJ_ENGINE_ADD(dev, MPEG, &pmpeg->base); ++ NVOBJ_CLASS(dev, 0x3174, MPEG); ++ NVOBJ_MTHD (dev, 0x3174, 0x0190, nv31_mpeg_mthd_dma); ++ NVOBJ_MTHD (dev, 0x3174, 0x01a0, nv31_mpeg_mthd_dma); ++ NVOBJ_MTHD (dev, 0x3174, 0x01b0, nv31_mpeg_mthd_dma); ++ ++#if 0 ++ NVOBJ_ENGINE_ADD(dev, ME, &pme->base); ++ NVOBJ_CLASS(dev, 0x4075, ME); ++#endif ++ return 0; ++ ++} +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv40_mpeg.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv40_mpeg.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv40_mpeg.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv40_mpeg.c 1970-01-01 01:00:00.000000000 +0100 +@@ -1,311 +0,0 @@ +-/* +- * Copyright 2011 Red Hat Inc. +- * +- * Permission is hereby granted, free of charge, to any person obtaining a +- * copy of this software and associated documentation files (the "Software"), +- * to deal in the Software without restriction, including without limitation +- * the rights to use, copy, modify, merge, publish, distribute, sublicense, +- * and/or sell copies of the Software, and to permit persons to whom the +- * Software is furnished to do so, subject to the following conditions: +- * +- * The above copyright notice and this permission notice shall be included in +- * all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +- * OTHER DEALINGS IN THE SOFTWARE. +- * +- * Authors: Ben Skeggs +- */ +- +-#include "drmP.h" +-#include "nouveau_drv.h" +-#include "nouveau_ramht.h" +- +-struct nv40_mpeg_engine { +- struct nouveau_exec_engine base; +-}; +- +-static int +-nv40_mpeg_context_new(struct nouveau_channel *chan, int engine) +-{ +- struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_gpuobj *ctx = NULL; +- unsigned long flags; +- int ret; +- +- NV_DEBUG(dev, "ch%d\n", chan->id); +- +- ret = nouveau_gpuobj_new(dev, NULL, 264 * 4, 16, NVOBJ_FLAG_ZERO_ALLOC | +- NVOBJ_FLAG_ZERO_FREE, &ctx); +- if (ret) +- return ret; +- +- nv_wo32(ctx, 0x78, 0x02001ec1); +- +- spin_lock_irqsave(&dev_priv->context_switch_lock, flags); +- nv_mask(dev, 0x002500, 0x00000001, 0x00000000); +- if ((nv_rd32(dev, 0x003204) & 0x1f) == chan->id) +- nv_wr32(dev, 0x00330c, ctx->pinst >> 4); +- nv_wo32(chan->ramfc, 0x54, ctx->pinst >> 4); +- nv_mask(dev, 0x002500, 0x00000001, 0x00000001); +- spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); +- +- chan->engctx[engine] = ctx; +- return 0; +-} +- +-static void +-nv40_mpeg_context_del(struct nouveau_channel *chan, int engine) +-{ +- struct drm_nouveau_private *dev_priv = chan->dev->dev_private; +- struct nouveau_gpuobj *ctx = chan->engctx[engine]; +- struct drm_device *dev = chan->dev; +- unsigned long flags; +- u32 inst = 0x80000000 | (ctx->pinst >> 4); +- +- spin_lock_irqsave(&dev_priv->context_switch_lock, flags); +- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000); +- if (nv_rd32(dev, 0x00b318) == inst) +- nv_mask(dev, 0x00b318, 0x80000000, 0x00000000); +- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001); +- spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); +- +- nouveau_gpuobj_ref(NULL, &ctx); +- chan->engctx[engine] = NULL; +-} +- +-static int +-nv40_mpeg_object_new(struct nouveau_channel *chan, int engine, +- u32 handle, u16 class) +-{ +- struct drm_device *dev = chan->dev; +- struct nouveau_gpuobj *obj = NULL; +- int ret; +- +- ret = nouveau_gpuobj_new(dev, chan, 20, 16, NVOBJ_FLAG_ZERO_ALLOC | +- NVOBJ_FLAG_ZERO_FREE, &obj); +- if (ret) +- return ret; +- obj->engine = 2; +- obj->class = class; +- +- nv_wo32(obj, 0x00, class); +- +- ret = nouveau_ramht_insert(chan, handle, obj); +- nouveau_gpuobj_ref(NULL, &obj); +- return ret; +-} +- +-static int +-nv40_mpeg_init(struct drm_device *dev, int engine) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nv40_mpeg_engine *pmpeg = nv_engine(dev, engine); +- int i; +- +- /* VPE init */ +- nv_mask(dev, 0x000200, 0x00000002, 0x00000000); +- nv_mask(dev, 0x000200, 0x00000002, 0x00000002); +- nv_wr32(dev, 0x00b0e0, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */ +- nv_wr32(dev, 0x00b0e8, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */ +- +- for (i = 0; i < dev_priv->engine.fb.num_tiles; i++) +- pmpeg->base.set_tile_region(dev, i); +- +- /* PMPEG init */ +- nv_wr32(dev, 0x00b32c, 0x00000000); +- nv_wr32(dev, 0x00b314, 0x00000100); +- nv_wr32(dev, 0x00b220, 0x00000044); +- nv_wr32(dev, 0x00b300, 0x02001ec1); +- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001); +- +- nv_wr32(dev, 0x00b100, 0xffffffff); +- nv_wr32(dev, 0x00b140, 0xffffffff); +- +- if (!nv_wait(dev, 0x00b200, 0x00000001, 0x00000000)) { +- NV_ERROR(dev, "PMPEG init: 0x%08x\n", nv_rd32(dev, 0x00b200)); +- return -EBUSY; +- } +- +- return 0; +-} +- +-static int +-nv40_mpeg_fini(struct drm_device *dev, int engine) +-{ +- /*XXX: context save? */ +- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000); +- nv_wr32(dev, 0x00b140, 0x00000000); +- return 0; +-} +- +-static int +-nv40_mpeg_mthd_dma(struct nouveau_channel *chan, u32 class, u32 mthd, u32 data) +-{ +- struct drm_device *dev = chan->dev; +- u32 inst = data << 4; +- u32 dma0 = nv_ri32(dev, inst + 0); +- u32 dma1 = nv_ri32(dev, inst + 4); +- u32 dma2 = nv_ri32(dev, inst + 8); +- u32 base = (dma2 & 0xfffff000) | (dma0 >> 20); +- u32 size = dma1 + 1; +- +- /* only allow linear DMA objects */ +- if (!(dma0 & 0x00002000)) +- return -EINVAL; +- +- if (mthd == 0x0190) { +- /* DMA_CMD */ +- nv_mask(dev, 0x00b300, 0x00030000, (dma0 & 0x00030000)); +- nv_wr32(dev, 0x00b334, base); +- nv_wr32(dev, 0x00b324, size); +- } else +- if (mthd == 0x01a0) { +- /* DMA_DATA */ +- nv_mask(dev, 0x00b300, 0x000c0000, (dma0 & 0x00030000) << 2); +- nv_wr32(dev, 0x00b360, base); +- nv_wr32(dev, 0x00b364, size); +- } else { +- /* DMA_IMAGE, VRAM only */ +- if (dma0 & 0x000c0000) +- return -EINVAL; +- +- nv_wr32(dev, 0x00b370, base); +- nv_wr32(dev, 0x00b374, size); +- } +- +- return 0; +-} +- +-static int +-nv40_mpeg_isr_chid(struct drm_device *dev, u32 inst) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_gpuobj *ctx; +- unsigned long flags; +- int i; +- +- spin_lock_irqsave(&dev_priv->channels.lock, flags); +- for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- if (!dev_priv->channels.ptr[i]) +- continue; +- +- ctx = dev_priv->channels.ptr[i]->engctx[NVOBJ_ENGINE_MPEG]; +- if (ctx && ctx->pinst == inst) +- break; +- } +- spin_unlock_irqrestore(&dev_priv->channels.lock, flags); +- return i; +-} +- +-static void +-nv40_vpe_set_tile_region(struct drm_device *dev, int i) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; +- +- nv_wr32(dev, 0x00b008 + (i * 0x10), tile->pitch); +- nv_wr32(dev, 0x00b004 + (i * 0x10), tile->limit); +- nv_wr32(dev, 0x00b000 + (i * 0x10), tile->addr); +-} +- +-static void +-nv40_mpeg_isr(struct drm_device *dev) +-{ +- u32 inst = (nv_rd32(dev, 0x00b318) & 0x000fffff) << 4; +- u32 chid = nv40_mpeg_isr_chid(dev, inst); +- u32 stat = nv_rd32(dev, 0x00b100); +- u32 type = nv_rd32(dev, 0x00b230); +- u32 mthd = nv_rd32(dev, 0x00b234); +- u32 data = nv_rd32(dev, 0x00b238); +- u32 show = stat; +- +- if (stat & 0x01000000) { +- /* happens on initial binding of the object */ +- if (type == 0x00000020 && mthd == 0x0000) { +- nv_mask(dev, 0x00b308, 0x00000000, 0x00000000); +- show &= ~0x01000000; +- } +- +- if (type == 0x00000010) { +- if (!nouveau_gpuobj_mthd_call2(dev, chid, 0x3174, mthd, data)) +- show &= ~0x01000000; +- } +- } +- +- nv_wr32(dev, 0x00b100, stat); +- nv_wr32(dev, 0x00b230, 0x00000001); +- +- if (show && nouveau_ratelimit()) { +- NV_INFO(dev, "PMPEG: Ch %d [0x%08x] 0x%08x 0x%08x 0x%08x 0x%08x\n", +- chid, inst, stat, type, mthd, data); +- } +-} +- +-static void +-nv40_vpe_isr(struct drm_device *dev) +-{ +- if (nv_rd32(dev, 0x00b100)) +- nv40_mpeg_isr(dev); +- +- if (nv_rd32(dev, 0x00b800)) { +- u32 stat = nv_rd32(dev, 0x00b800); +- NV_INFO(dev, "PMSRCH: 0x%08x\n", stat); +- nv_wr32(dev, 0xb800, stat); +- } +-} +- +-static void +-nv40_mpeg_destroy(struct drm_device *dev, int engine) +-{ +- struct nv40_mpeg_engine *pmpeg = nv_engine(dev, engine); +- +- nouveau_irq_unregister(dev, 0); +- +- NVOBJ_ENGINE_DEL(dev, MPEG); +- kfree(pmpeg); +-} +- +-int +-nv40_mpeg_create(struct drm_device *dev) +-{ +- struct nv40_mpeg_engine *pmpeg; +- +- pmpeg = kzalloc(sizeof(*pmpeg), GFP_KERNEL); +- if (!pmpeg) +- return -ENOMEM; +- +- pmpeg->base.destroy = nv40_mpeg_destroy; +- pmpeg->base.init = nv40_mpeg_init; +- pmpeg->base.fini = nv40_mpeg_fini; +- pmpeg->base.context_new = nv40_mpeg_context_new; +- pmpeg->base.context_del = nv40_mpeg_context_del; +- pmpeg->base.object_new = nv40_mpeg_object_new; +- +- /* ISR vector, PMC_ENABLE bit, and TILE regs are shared between +- * all VPE engines, for this driver's purposes the PMPEG engine +- * will be treated as the "master" and handle the global VPE +- * bits too +- */ +- pmpeg->base.set_tile_region = nv40_vpe_set_tile_region; +- nouveau_irq_register(dev, 0, nv40_vpe_isr); +- +- NVOBJ_ENGINE_ADD(dev, MPEG, &pmpeg->base); +- NVOBJ_CLASS(dev, 0x3174, MPEG); +- NVOBJ_MTHD (dev, 0x3174, 0x0190, nv40_mpeg_mthd_dma); +- NVOBJ_MTHD (dev, 0x3174, 0x01a0, nv40_mpeg_mthd_dma); +- NVOBJ_MTHD (dev, 0x3174, 0x01b0, nv40_mpeg_mthd_dma); +- +-#if 0 +- NVOBJ_ENGINE_ADD(dev, ME, &pme->base); +- NVOBJ_CLASS(dev, 0x4075, ME); +-#endif +- return 0; +- +-} +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_crtc.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_crtc.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2011-06-26 07:59:23.000000000 +0200 +@@ -104,7 +104,7 @@ + OUT_RING(evo, nv_crtc->lut.depth == 8 ? + NV50_EVO_CRTC_CLUT_MODE_OFF : + NV50_EVO_CRTC_CLUT_MODE_ON); +- OUT_RING(evo, (nv_crtc->lut.nvbo->bo.mem.start << PAGE_SHIFT) >> 8); ++ OUT_RING(evo, nv_crtc->lut.nvbo->bo.offset >> 8); + if (dev_priv->chipset != 0x50) { + BEGIN_RING(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1); + OUT_RING(evo, NvEvoVRAM); +@@ -372,7 +372,7 @@ + + nouveau_bo_unmap(cursor); + +- nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.mem.start << PAGE_SHIFT); ++ nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.offset); + nv_crtc->cursor.show(nv_crtc, true); + + out: +@@ -546,7 +546,7 @@ + } + } + +- nv_crtc->fb.offset = fb->nvbo->bo.mem.start << PAGE_SHIFT; ++ nv_crtc->fb.offset = fb->nvbo->bo.offset; + nv_crtc->fb.tile_flags = nouveau_bo_tile_layout(fb->nvbo); + nv_crtc->fb.cpp = drm_fb->bits_per_pixel / 8; + if (!nv_crtc->fb.blanked && dev_priv->chipset != 0x50) { +@@ -747,7 +747,7 @@ + } + nv_crtc->lut.depth = 0; + +- ret = nouveau_bo_new(dev, NULL, 4096, 0x100, TTM_PL_FLAG_VRAM, ++ ret = nouveau_bo_new(dev, 4096, 0x100, TTM_PL_FLAG_VRAM, + 0, 0x0000, &nv_crtc->lut.nvbo); + if (!ret) { + ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); +@@ -773,7 +773,7 @@ + drm_crtc_helper_add(&nv_crtc->base, &nv50_crtc_helper_funcs); + drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); + +- ret = nouveau_bo_new(dev, NULL, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, ++ ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, + 0, 0x0000, &nv_crtc->cursor.nvbo); + if (!ret) { + ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_display.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_display.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_display.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2011-06-26 07:59:23.000000000 +0200 +@@ -415,8 +415,6 @@ + + /* synchronise with the rendering channel, if necessary */ + if (likely(chan)) { +- u64 offset = dispc->sem.bo->vma.offset + dispc->sem.offset; +- + ret = RING_SPACE(chan, 10); + if (ret) { + WIND_RING(evo); +@@ -438,6 +436,8 @@ + else + OUT_RING (chan, chan->vram_handle); + } else { ++ u64 offset = chan->dispc_vma[nv_crtc->index].offset; ++ offset += dispc->sem.offset; + BEGIN_NVC0(chan, 2, NvSubM2MF, 0x0010, 4); + OUT_RING (chan, upper_32_bits(offset)); + OUT_RING (chan, lower_32_bits(offset)); +@@ -484,7 +484,7 @@ + OUT_RING (evo, 0x00000000); + OUT_RING (evo, 0x00000000); + BEGIN_RING(evo, 0, 0x0800, 5); +- OUT_RING (evo, (nv_fb->nvbo->bo.mem.start << PAGE_SHIFT) >> 8); ++ OUT_RING (evo, nv_fb->nvbo->bo.offset >> 8); + OUT_RING (evo, 0); + OUT_RING (evo, (fb->height << 16) | fb->width); + OUT_RING (evo, nv_fb->r_pitch); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_evo.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_evo.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2011-06-26 07:59:23.000000000 +0200 +@@ -38,6 +38,7 @@ + return; + *pevo = NULL; + ++ nouveau_ramht_ref(NULL, &evo->ramht, evo); + nouveau_gpuobj_channel_takedown(evo); + nouveau_bo_unmap(evo->pushbuf_bo); + nouveau_bo_ref(NULL, &evo->pushbuf_bo); +@@ -116,7 +117,7 @@ + evo->user_get = 4; + evo->user_put = 0; + +- ret = nouveau_bo_new(dev, NULL, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, ++ ret = nouveau_bo_new(dev, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, + &evo->pushbuf_bo); + if (ret == 0) + ret = nouveau_bo_pin(evo->pushbuf_bo, TTM_PL_FLAG_VRAM); +@@ -153,7 +154,7 @@ + { + struct drm_device *dev = evo->dev; + int id = evo->id, ret, i; +- u64 pushbuf = evo->pushbuf_bo->bo.mem.start << PAGE_SHIFT; ++ u64 pushbuf = evo->pushbuf_bo->bo.offset; + u32 tmp; + + tmp = nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id)); +@@ -331,16 +332,15 @@ + if (ret) + goto err; + +- ret = nouveau_bo_new(dev, NULL, 4096, 0x1000, TTM_PL_FLAG_VRAM, ++ ret = nouveau_bo_new(dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, + 0, 0x0000, &dispc->sem.bo); + if (!ret) { +- offset = dispc->sem.bo->bo.mem.start << PAGE_SHIFT; +- + ret = nouveau_bo_pin(dispc->sem.bo, TTM_PL_FLAG_VRAM); + if (!ret) + ret = nouveau_bo_map(dispc->sem.bo); + if (ret) + nouveau_bo_ref(NULL, &dispc->sem.bo); ++ offset = dispc->sem.bo->bo.offset; + } + + if (ret) +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_fbcon.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c 2011-06-26 07:59:23.000000000 +0200 +@@ -159,7 +159,7 @@ + struct drm_device *dev = nfbdev->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_channel *chan = dev_priv->channel; +- struct nouveau_bo *nvbo = nfbdev->nouveau_fb.nvbo; ++ struct nouveau_framebuffer *fb = &nfbdev->nouveau_fb; + int ret, format; + + switch (info->var.bits_per_pixel) { +@@ -247,8 +247,8 @@ + OUT_RING(chan, info->fix.line_length); + OUT_RING(chan, info->var.xres_virtual); + OUT_RING(chan, info->var.yres_virtual); +- OUT_RING(chan, upper_32_bits(nvbo->vma.offset)); +- OUT_RING(chan, lower_32_bits(nvbo->vma.offset)); ++ OUT_RING(chan, upper_32_bits(fb->vma.offset)); ++ OUT_RING(chan, lower_32_bits(fb->vma.offset)); + BEGIN_RING(chan, NvSub2D, 0x0230, 2); + OUT_RING(chan, format); + OUT_RING(chan, 1); +@@ -256,8 +256,8 @@ + OUT_RING(chan, info->fix.line_length); + OUT_RING(chan, info->var.xres_virtual); + OUT_RING(chan, info->var.yres_virtual); +- OUT_RING(chan, upper_32_bits(nvbo->vma.offset)); +- OUT_RING(chan, lower_32_bits(nvbo->vma.offset)); ++ OUT_RING(chan, upper_32_bits(fb->vma.offset)); ++ OUT_RING(chan, lower_32_bits(fb->vma.offset)); + + return 0; + } +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_grctx.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_grctx.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_grctx.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_grctx.c 2011-06-26 07:59:23.000000000 +0200 +@@ -40,6 +40,9 @@ + #define CP_FLAG_UNK0B ((0 * 32) + 0xb) + #define CP_FLAG_UNK0B_CLEAR 0 + #define CP_FLAG_UNK0B_SET 1 ++#define CP_FLAG_STATE ((0 * 32) + 0x1c) ++#define CP_FLAG_STATE_STOPPED 0 ++#define CP_FLAG_STATE_RUNNING 1 + #define CP_FLAG_UNK1D ((0 * 32) + 0x1d) + #define CP_FLAG_UNK1D_CLEAR 0 + #define CP_FLAG_UNK1D_SET 1 +@@ -194,6 +197,8 @@ + "the devs.\n"); + return -ENOSYS; + } ++ ++ cp_set (ctx, STATE, RUNNING); + /* decide whether we're loading/unloading the context */ + cp_bra (ctx, AUTO_SAVE, PENDING, cp_setup_save); + cp_bra (ctx, USER_SAVE, PENDING, cp_setup_save); +@@ -260,6 +265,7 @@ + cp_name(ctx, cp_exit); + cp_set (ctx, USER_SAVE, NOT_PENDING); + cp_set (ctx, USER_LOAD, NOT_PENDING); ++ cp_set (ctx, STATE, STOPPED); + cp_out (ctx, CP_END); + ctx->ctxvals_pos += 0x400; /* padding... no idea why you need it */ + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_instmem.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_instmem.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2011-06-26 07:59:23.000000000 +0200 +@@ -305,9 +305,9 @@ + u32 align; + }; + +- + int +-nv50_instmem_get(struct nouveau_gpuobj *gpuobj, u32 size, u32 align) ++nv50_instmem_get(struct nouveau_gpuobj *gpuobj, struct nouveau_channel *chan, ++ u32 size, u32 align) + { + struct drm_device *dev = gpuobj->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; +@@ -336,7 +336,7 @@ + if (!(gpuobj->flags & NVOBJ_FLAG_VM_USER)) + flags |= NV_MEM_ACCESS_SYS; + +- ret = nouveau_vm_get(dev_priv->chan_vm, size, 12, flags, ++ ret = nouveau_vm_get(chan->vm, size, 12, flags, + &node->chan_vma); + if (ret) { + vram->put(dev, &node->vram); +@@ -345,7 +345,7 @@ + } + + nouveau_vm_map(&node->chan_vma, node->vram); +- gpuobj->vinst = node->chan_vma.offset; ++ gpuobj->linst = node->chan_vma.offset; + } + + gpuobj->size = size; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_vm.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_vm.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_vm.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_vm.c 2011-06-26 07:59:23.000000000 +0200 +@@ -156,7 +156,7 @@ + pinstmem->flush(vm->dev); + + /* BAR */ +- if (vm != dev_priv->chan_vm) { ++ if (vm == dev_priv->bar1_vm || vm == dev_priv->bar3_vm) { + nv50_vm_flush_engine(vm->dev, 6); + return; + } +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_vram.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_vram.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nv50_vram.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nv50_vram.c 2011-06-26 07:59:23.000000000 +0200 +@@ -51,9 +51,7 @@ + nv50_vram_del(struct drm_device *dev, struct nouveau_mem **pmem) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct ttm_bo_device *bdev = &dev_priv->ttm.bdev; +- struct ttm_mem_type_manager *man = &bdev->man[TTM_PL_VRAM]; +- struct nouveau_mm *mm = man->priv; ++ struct nouveau_mm *mm = dev_priv->engine.vram.mm; + struct nouveau_mm_node *this; + struct nouveau_mem *mem; + +@@ -84,9 +82,7 @@ + u32 memtype, struct nouveau_mem **pmem) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct ttm_bo_device *bdev = &dev_priv->ttm.bdev; +- struct ttm_mem_type_manager *man = &bdev->man[TTM_PL_VRAM]; +- struct nouveau_mm *mm = man->priv; ++ struct nouveau_mm *mm = dev_priv->engine.vram.mm; + struct nouveau_mm_node *r; + struct nouveau_mem *mem; + int comp = (memtype & 0x300) >> 8; +@@ -190,22 +186,35 @@ + nv50_vram_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_vram_engine *vram = &dev_priv->engine.vram; ++ const u32 rsvd_head = ( 256 * 1024) >> 12; /* vga memory */ ++ const u32 rsvd_tail = (1024 * 1024) >> 12; /* vbios etc */ ++ u32 rblock, length; + + dev_priv->vram_size = nv_rd32(dev, 0x10020c); + dev_priv->vram_size |= (dev_priv->vram_size & 0xff) << 32; + dev_priv->vram_size &= 0xffffffff00ULL; + +- switch (dev_priv->chipset) { +- case 0xaa: +- case 0xac: +- case 0xaf: ++ /* IGPs, no funky reordering happens here, they don't have VRAM */ ++ if (dev_priv->chipset == 0xaa || ++ dev_priv->chipset == 0xac || ++ dev_priv->chipset == 0xaf) { + dev_priv->vram_sys_base = (u64)nv_rd32(dev, 0x100e10) << 12; +- dev_priv->vram_rblock_size = 4096; +- break; +- default: +- dev_priv->vram_rblock_size = nv50_vram_rblock(dev); +- break; ++ rblock = 4096 >> 12; ++ } else { ++ rblock = nv50_vram_rblock(dev) >> 12; + } + +- return 0; ++ length = (dev_priv->vram_size >> 12) - rsvd_head - rsvd_tail; ++ ++ return nouveau_mm_init(&vram->mm, rsvd_head, length, rblock); ++} ++ ++void ++nv50_vram_fini(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_vram_engine *vram = &dev_priv->engine.vram; ++ ++ nouveau_mm_fini(&vram->mm); + } +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nva3_pm.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nva3_pm.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nva3_pm.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nva3_pm.c 2011-06-26 07:59:23.000000000 +0200 +@@ -27,178 +27,305 @@ + #include "nouveau_bios.h" + #include "nouveau_pm.h" + +-/* This is actually a lot more complex than it appears here, but hopefully +- * this should be able to deal with what the VBIOS leaves for us.. +- * +- * If not, well, I'll jump off that bridge when I come to it. +- */ ++static u32 read_clk(struct drm_device *, int, bool); ++static u32 read_pll(struct drm_device *, int, u32); + +-struct nva3_pm_state { +- enum pll_types type; +- u32 src0; +- u32 src1; +- u32 ctrl; +- u32 coef; +- u32 old_pnm; +- u32 new_pnm; +- u32 new_div; +-}; ++static u32 ++read_vco(struct drm_device *dev, int clk) ++{ ++ u32 sctl = nv_rd32(dev, 0x4120 + (clk * 4)); ++ if ((sctl & 0x00000030) != 0x00000030) ++ return read_pll(dev, 0x41, 0x00e820); ++ return read_pll(dev, 0x42, 0x00e8a0); ++} + +-static int +-nva3_pm_pll_offset(u32 id) ++static u32 ++read_clk(struct drm_device *dev, int clk, bool ignore_en) + { +- static const u32 pll_map[] = { +- 0x00, PLL_CORE, +- 0x01, PLL_SHADER, +- 0x02, PLL_MEMORY, +- 0x00, 0x00 +- }; +- const u32 *map = pll_map; +- +- while (map[1]) { +- if (id == map[1]) +- return map[0]; +- map += 2; ++ u32 sctl, sdiv, sclk; ++ ++ /* refclk for the 0xe8xx plls always 27KHz */ ++ if (clk >= 0x40) ++ return 27000; ++ ++ sctl = nv_rd32(dev, 0x4120 + (clk * 4)); ++ if (!ignore_en && !(sctl & 0x00000100)) ++ return 0; ++ ++ switch (sctl & 0x00003000) { ++ case 0x00000000: ++ return 27000; ++ case 0x00002000: ++ if (sctl & 0x00000040) ++ return 108000; ++ return 100000; ++ case 0x00003000: ++ sclk = read_vco(dev, clk); ++ sdiv = ((sctl & 0x003f0000) >> 16) + 2; ++ return (sclk * 2) / sdiv; ++ default: ++ return 0; + } ++} + +- return -ENOENT; ++static u32 ++read_pll(struct drm_device *dev, int clk, u32 pll) ++{ ++ u32 ctrl = nv_rd32(dev, pll + 0); ++ u32 sclk, P = 1, N = 1, M = 1; ++ ++ if (!(ctrl & 0x00000008)) { ++ u32 coef = nv_rd32(dev, pll + 4); ++ M = (coef & 0x000000ff) >> 0; ++ N = (coef & 0x0000ff00) >> 8; ++ P = (coef & 0x003f0000) >> 16; ++ ++ /* not post-divider on these.. */ ++ if ((pll & 0x00ff00) == 0x00e800) ++ P = 1; ++ ++ sclk = read_clk(dev, 0x00 + clk, false); ++ } else { ++ sclk = read_clk(dev, 0x10 + clk, false); ++ } ++ ++ return sclk * N / (M * P); + } + +-int +-nva3_pm_clock_get(struct drm_device *dev, u32 id) ++struct creg { ++ u32 clk; ++ u32 pll; ++}; ++ ++static int ++calc_clk(struct drm_device *dev, int clk, u32 pll, u32 khz, struct creg *reg) + { +- u32 src0, src1, ctrl, coef; +- struct pll_lims pll; +- int ret, off; +- int P, N, M; ++ struct pll_lims limits; ++ u32 oclk, sclk, sdiv; ++ int P, N, M, diff; ++ int ret; ++ ++ reg->pll = 0; ++ reg->clk = 0; ++ if (!khz) { ++ NV_DEBUG(dev, "no clock for 0x%04x/0x%02x\n", pll, clk); ++ return 0; ++ } + +- ret = get_pll_limits(dev, id, &pll); ++ switch (khz) { ++ case 27000: ++ reg->clk = 0x00000100; ++ return khz; ++ case 100000: ++ reg->clk = 0x00002100; ++ return khz; ++ case 108000: ++ reg->clk = 0x00002140; ++ return khz; ++ default: ++ sclk = read_vco(dev, clk); ++ sdiv = min((sclk * 2) / (khz - 2999), (u32)65); ++ /* if the clock has a PLL attached, and we can get a within ++ * [-2, 3) MHz of a divider, we'll disable the PLL and use ++ * the divider instead. ++ * ++ * divider can go as low as 2, limited here because NVIDIA ++ * and the VBIOS on my NVA8 seem to prefer using the PLL ++ * for 810MHz - is there a good reason? ++ */ ++ if (sdiv > 4) { ++ oclk = (sclk * 2) / sdiv; ++ diff = khz - oclk; ++ if (!pll || (diff >= -2000 && diff < 3000)) { ++ reg->clk = (((sdiv - 2) << 16) | 0x00003100); ++ return oclk; ++ } ++ } ++ ++ if (!pll) { ++ NV_ERROR(dev, "bad freq %02x: %d %d\n", clk, khz, sclk); ++ return -ERANGE; ++ } ++ ++ break; ++ } ++ ++ ret = get_pll_limits(dev, pll, &limits); + if (ret) + return ret; + +- off = nva3_pm_pll_offset(id); +- if (off < 0) +- return off; +- +- src0 = nv_rd32(dev, 0x4120 + (off * 4)); +- src1 = nv_rd32(dev, 0x4160 + (off * 4)); +- ctrl = nv_rd32(dev, pll.reg + 0); +- coef = nv_rd32(dev, pll.reg + 4); +- NV_DEBUG(dev, "PLL %02x: 0x%08x 0x%08x 0x%08x 0x%08x\n", +- id, src0, src1, ctrl, coef); +- +- if (ctrl & 0x00000008) { +- u32 div = ((src1 & 0x003c0000) >> 18) + 1; +- return (pll.refclk * 2) / div; +- } +- +- P = (coef & 0x003f0000) >> 16; +- N = (coef & 0x0000ff00) >> 8; +- M = (coef & 0x000000ff); +- return pll.refclk * N / M / P; ++ limits.refclk = read_clk(dev, clk - 0x10, true); ++ if (!limits.refclk) ++ return -EINVAL; ++ ++ ret = nva3_calc_pll(dev, &limits, khz, &N, NULL, &M, &P); ++ if (ret >= 0) { ++ reg->clk = nv_rd32(dev, 0x4120 + (clk * 4)); ++ reg->pll = (P << 16) | (N << 8) | M; ++ } ++ return ret; ++} ++ ++static void ++prog_pll(struct drm_device *dev, int clk, u32 pll, struct creg *reg) ++{ ++ const u32 src0 = 0x004120 + (clk * 4); ++ const u32 src1 = 0x004160 + (clk * 4); ++ const u32 ctrl = pll + 0; ++ const u32 coef = pll + 4; ++ u32 cntl; ++ ++ if (!reg->clk && !reg->pll) { ++ NV_DEBUG(dev, "no clock for %02x\n", clk); ++ return; ++ } ++ ++ cntl = nv_rd32(dev, ctrl) & 0xfffffff2; ++ if (reg->pll) { ++ nv_mask(dev, src0, 0x00000101, 0x00000101); ++ nv_wr32(dev, coef, reg->pll); ++ nv_wr32(dev, ctrl, cntl | 0x00000015); ++ nv_mask(dev, src1, 0x00000100, 0x00000000); ++ nv_mask(dev, src1, 0x00000001, 0x00000000); ++ } else { ++ nv_mask(dev, src1, 0x003f3141, 0x00000101 | reg->clk); ++ nv_wr32(dev, ctrl, cntl | 0x0000001d); ++ nv_mask(dev, ctrl, 0x00000001, 0x00000000); ++ nv_mask(dev, src0, 0x00000100, 0x00000000); ++ nv_mask(dev, src0, 0x00000001, 0x00000000); ++ } + } + ++static void ++prog_clk(struct drm_device *dev, int clk, struct creg *reg) ++{ ++ if (!reg->clk) { ++ NV_DEBUG(dev, "no clock for %02x\n", clk); ++ return; ++ } ++ ++ nv_mask(dev, 0x004120 + (clk * 4), 0x003f3141, 0x00000101 | reg->clk); ++} ++ ++int ++nva3_pm_clocks_get(struct drm_device *dev, struct nouveau_pm_level *perflvl) ++{ ++ perflvl->core = read_pll(dev, 0x00, 0x4200); ++ perflvl->shader = read_pll(dev, 0x01, 0x4220); ++ perflvl->memory = read_pll(dev, 0x02, 0x4000); ++ perflvl->unka0 = read_clk(dev, 0x20, false); ++ perflvl->vdec = read_clk(dev, 0x21, false); ++ perflvl->daemon = read_clk(dev, 0x25, false); ++ perflvl->copy = perflvl->core; ++ return 0; ++} ++ ++struct nva3_pm_state { ++ struct creg nclk; ++ struct creg sclk; ++ struct creg mclk; ++ struct creg vdec; ++ struct creg unka0; ++}; ++ + void * +-nva3_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl, +- u32 id, int khz) ++nva3_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl) + { +- struct nva3_pm_state *pll; +- struct pll_lims limits; +- int N, M, P, diff; +- int ret, off; ++ struct nva3_pm_state *info; ++ int ret; ++ ++ info = kzalloc(sizeof(*info), GFP_KERNEL); ++ if (!info) ++ return ERR_PTR(-ENOMEM); + +- ret = get_pll_limits(dev, id, &limits); ++ ret = calc_clk(dev, 0x10, 0x4200, perflvl->core, &info->nclk); + if (ret < 0) +- return (ret == -ENOENT) ? NULL : ERR_PTR(ret); ++ goto out; + +- off = nva3_pm_pll_offset(id); +- if (id < 0) +- return ERR_PTR(-EINVAL); ++ ret = calc_clk(dev, 0x11, 0x4220, perflvl->shader, &info->sclk); ++ if (ret < 0) ++ goto out; + ++ ret = calc_clk(dev, 0x12, 0x4000, perflvl->memory, &info->mclk); ++ if (ret < 0) ++ goto out; + +- pll = kzalloc(sizeof(*pll), GFP_KERNEL); +- if (!pll) +- return ERR_PTR(-ENOMEM); +- pll->type = id; +- pll->src0 = 0x004120 + (off * 4); +- pll->src1 = 0x004160 + (off * 4); +- pll->ctrl = limits.reg + 0; +- pll->coef = limits.reg + 4; +- +- /* If target clock is within [-2, 3) MHz of a divisor, we'll +- * use that instead of calculating MNP values +- */ +- pll->new_div = min((limits.refclk * 2) / (khz - 2999), 16); +- if (pll->new_div) { +- diff = khz - ((limits.refclk * 2) / pll->new_div); +- if (diff < -2000 || diff >= 3000) +- pll->new_div = 0; +- } +- +- if (!pll->new_div) { +- ret = nva3_calc_pll(dev, &limits, khz, &N, NULL, &M, &P); +- if (ret < 0) +- return ERR_PTR(ret); ++ ret = calc_clk(dev, 0x20, 0x0000, perflvl->unka0, &info->unka0); ++ if (ret < 0) ++ goto out; + +- pll->new_pnm = (P << 16) | (N << 8) | M; +- pll->new_div = 2 - 1; +- } else { +- pll->new_pnm = 0; +- pll->new_div--; ++ ret = calc_clk(dev, 0x21, 0x0000, perflvl->vdec, &info->vdec); ++ if (ret < 0) ++ goto out; ++ ++out: ++ if (ret < 0) { ++ kfree(info); ++ info = ERR_PTR(ret); + } ++ return info; ++} ++ ++static bool ++nva3_pm_grcp_idle(void *data) ++{ ++ struct drm_device *dev = data; + +- if ((nv_rd32(dev, pll->src1) & 0x00000101) != 0x00000101) +- pll->old_pnm = nv_rd32(dev, pll->coef); +- return pll; ++ if (!(nv_rd32(dev, 0x400304) & 0x00000001)) ++ return true; ++ if (nv_rd32(dev, 0x400308) == 0x0050001c) ++ return true; ++ return false; + } + + void +-nva3_pm_clock_set(struct drm_device *dev, void *pre_state) ++nva3_pm_clocks_set(struct drm_device *dev, void *pre_state) + { +- struct nva3_pm_state *pll = pre_state; +- u32 ctrl = 0; +- +- /* For the memory clock, NVIDIA will build a "script" describing +- * the reclocking process and ask PDAEMON to execute it. +- */ +- if (pll->type == PLL_MEMORY) { +- nv_wr32(dev, 0x100210, 0); +- nv_wr32(dev, 0x1002dc, 1); +- nv_wr32(dev, 0x004018, 0x00001000); +- ctrl = 0x18000100; +- } +- +- if (pll->old_pnm || !pll->new_pnm) { +- nv_mask(dev, pll->src1, 0x003c0101, 0x00000101 | +- (pll->new_div << 18)); +- nv_wr32(dev, pll->ctrl, 0x0001001d | ctrl); +- nv_mask(dev, pll->ctrl, 0x00000001, 0x00000000); +- } +- +- if (pll->new_pnm) { +- nv_mask(dev, pll->src0, 0x00000101, 0x00000101); +- nv_wr32(dev, pll->coef, pll->new_pnm); +- nv_wr32(dev, pll->ctrl, 0x0001001d | ctrl); +- nv_mask(dev, pll->ctrl, 0x00000010, 0x00000000); +- nv_mask(dev, pll->ctrl, 0x00020010, 0x00020010); +- nv_wr32(dev, pll->ctrl, 0x00010015 | ctrl); +- nv_mask(dev, pll->src1, 0x00000100, 0x00000000); +- nv_mask(dev, pll->src1, 0x00000001, 0x00000000); +- if (pll->type == PLL_MEMORY) +- nv_wr32(dev, 0x4018, 0x10005000); +- } else { +- nv_mask(dev, pll->ctrl, 0x00000001, 0x00000000); +- nv_mask(dev, pll->src0, 0x00000100, 0x00000000); +- nv_mask(dev, pll->src0, 0x00000001, 0x00000000); +- if (pll->type == PLL_MEMORY) +- nv_wr32(dev, 0x4018, 0x1000d000); ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nva3_pm_state *info = pre_state; ++ unsigned long flags; ++ ++ /* prevent any new grctx switches from starting */ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ nv_wr32(dev, 0x400324, 0x00000000); ++ nv_wr32(dev, 0x400328, 0x0050001c); /* wait flag 0x1c */ ++ /* wait for any pending grctx switches to complete */ ++ if (!nv_wait_cb(dev, nva3_pm_grcp_idle, dev)) { ++ NV_ERROR(dev, "pm: ctxprog didn't go idle\n"); ++ goto cleanup; + } +- +- if (pll->type == PLL_MEMORY) { +- nv_wr32(dev, 0x1002dc, 0); +- nv_wr32(dev, 0x100210, 0x80000000); ++ /* freeze PFIFO */ ++ nv_mask(dev, 0x002504, 0x00000001, 0x00000001); ++ if (!nv_wait(dev, 0x002504, 0x00000010, 0x00000010)) { ++ NV_ERROR(dev, "pm: fifo didn't go idle\n"); ++ goto cleanup; + } + +- kfree(pll); ++ prog_pll(dev, 0x00, 0x004200, &info->nclk); ++ prog_pll(dev, 0x01, 0x004220, &info->sclk); ++ prog_clk(dev, 0x20, &info->unka0); ++ prog_clk(dev, 0x21, &info->vdec); ++ ++ nv_wr32(dev, 0x100210, 0); ++ nv_wr32(dev, 0x1002dc, 1); ++ nv_wr32(dev, 0x004018, 0x00001000); ++ prog_pll(dev, 0x02, 0x004000, &info->mclk); ++ if (nv_rd32(dev, 0x4000) & 0x00000008) ++ nv_wr32(dev, 0x004018, 0x1000d000); ++ else ++ nv_wr32(dev, 0x004018, 0x10005000); ++ nv_wr32(dev, 0x1002dc, 0); ++ nv_wr32(dev, 0x100210, 0x80000000); ++ ++cleanup: ++ /* unfreeze PFIFO */ ++ nv_mask(dev, 0x002504, 0x00000001, 0x00000000); ++ /* restore ctxprog to normal */ ++ nv_wr32(dev, 0x400324, 0x00000000); ++ nv_wr32(dev, 0x400328, 0x0070009c); /* set flag 0x1c */ ++ /* unblock it if necessary */ ++ if (nv_rd32(dev, 0x400308) == 0x0050001c) ++ nv_mask(dev, 0x400824, 0x10000000, 0x10000000); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ kfree(info); + } +- +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_copy.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_copy.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_copy.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_copy.c 2011-06-26 07:59:23.000000000 +0200 +@@ -48,14 +48,14 @@ + struct nouveau_gpuobj *ctx = NULL; + int ret; + +- ret = nouveau_gpuobj_new(dev, NULL, 256, 256, ++ ret = nouveau_gpuobj_new(dev, chan, 256, 256, + NVOBJ_FLAG_VM | NVOBJ_FLAG_VM_USER | + NVOBJ_FLAG_ZERO_ALLOC, &ctx); + if (ret) + return ret; + +- nv_wo32(ramin, pcopy->ctx + 0, lower_32_bits(ctx->vinst)); +- nv_wo32(ramin, pcopy->ctx + 4, upper_32_bits(ctx->vinst)); ++ nv_wo32(ramin, pcopy->ctx + 0, lower_32_bits(ctx->linst)); ++ nv_wo32(ramin, pcopy->ctx + 4, upper_32_bits(ctx->linst)); + dev_priv->engine.instmem.flush(dev); + + chan->engctx[engine] = ctx; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_fb.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_fb.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_fb.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_fb.c 2011-06-26 07:59:23.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2010 Red Hat Inc. ++ * Copyright 2011 Red Hat Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), +@@ -23,16 +23,80 @@ + */ + + #include "drmP.h" +- ++#include "drm.h" + #include "nouveau_drv.h" ++#include "nouveau_drm.h" ++ ++struct nvc0_fb_priv { ++ struct page *r100c10_page; ++ dma_addr_t r100c10; ++}; ++ ++static void ++nvc0_fb_destroy(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; ++ struct nvc0_fb_priv *priv = pfb->priv; ++ ++ if (priv->r100c10_page) { ++ pci_unmap_page(dev->pdev, priv->r100c10, PAGE_SIZE, ++ PCI_DMA_BIDIRECTIONAL); ++ __free_page(priv->r100c10_page); ++ } ++ ++ kfree(priv); ++ pfb->priv = NULL; ++} ++ ++static int ++nvc0_fb_create(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; ++ struct nvc0_fb_priv *priv; ++ ++ priv = kzalloc(sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ pfb->priv = priv; ++ ++ priv->r100c10_page = alloc_page(GFP_KERNEL | __GFP_ZERO); ++ if (!priv->r100c10_page) { ++ nvc0_fb_destroy(dev); ++ return -ENOMEM; ++ } ++ ++ priv->r100c10 = pci_map_page(dev->pdev, priv->r100c10_page, 0, ++ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); ++ if (pci_dma_mapping_error(dev->pdev, priv->r100c10)) { ++ nvc0_fb_destroy(dev); ++ return -EFAULT; ++ } ++ ++ return 0; ++} + + int + nvc0_fb_init(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nvc0_fb_priv *priv; ++ int ret; ++ ++ if (!dev_priv->engine.fb.priv) { ++ ret = nvc0_fb_create(dev); ++ if (ret) ++ return ret; ++ } ++ priv = dev_priv->engine.fb.priv; ++ ++ nv_wr32(dev, 0x100c10, priv->r100c10 >> 8); + return 0; + } + + void + nvc0_fb_takedown(struct drm_device *dev) + { ++ nvc0_fb_destroy(dev); + } +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_fbcon.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_fbcon.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_fbcon.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_fbcon.c 2011-06-26 07:59:23.000000000 +0200 +@@ -159,7 +159,7 @@ + struct drm_device *dev = nfbdev->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_channel *chan = dev_priv->channel; +- struct nouveau_bo *nvbo = nfbdev->nouveau_fb.nvbo; ++ struct nouveau_framebuffer *fb = &nfbdev->nouveau_fb; + int ret, format; + + ret = nouveau_gpuobj_gr_new(chan, 0x902d, 0x902d); +@@ -203,8 +203,8 @@ + BEGIN_NVC0(chan, 2, NvSub2D, 0x0000, 1); + OUT_RING (chan, 0x0000902d); + BEGIN_NVC0(chan, 2, NvSub2D, 0x0104, 2); +- OUT_RING (chan, upper_32_bits(chan->notifier_bo->bo.offset)); +- OUT_RING (chan, lower_32_bits(chan->notifier_bo->bo.offset)); ++ OUT_RING (chan, upper_32_bits(chan->notifier_vma.offset)); ++ OUT_RING (chan, lower_32_bits(chan->notifier_vma.offset)); + BEGIN_NVC0(chan, 2, NvSub2D, 0x0290, 1); + OUT_RING (chan, 0); + BEGIN_NVC0(chan, 2, NvSub2D, 0x0888, 1); +@@ -249,8 +249,8 @@ + OUT_RING (chan, info->fix.line_length); + OUT_RING (chan, info->var.xres_virtual); + OUT_RING (chan, info->var.yres_virtual); +- OUT_RING (chan, upper_32_bits(nvbo->vma.offset)); +- OUT_RING (chan, lower_32_bits(nvbo->vma.offset)); ++ OUT_RING (chan, upper_32_bits(fb->vma.offset)); ++ OUT_RING (chan, lower_32_bits(fb->vma.offset)); + BEGIN_NVC0(chan, 2, NvSub2D, 0x0230, 10); + OUT_RING (chan, format); + OUT_RING (chan, 1); +@@ -260,8 +260,8 @@ + OUT_RING (chan, info->fix.line_length); + OUT_RING (chan, info->var.xres_virtual); + OUT_RING (chan, info->var.yres_virtual); +- OUT_RING (chan, upper_32_bits(nvbo->vma.offset)); +- OUT_RING (chan, lower_32_bits(nvbo->vma.offset)); ++ OUT_RING (chan, upper_32_bits(fb->vma.offset)); ++ OUT_RING (chan, lower_32_bits(fb->vma.offset)); + FIRE_RING (chan); + + return 0; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_fifo.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_fifo.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c 2011-06-26 07:59:23.000000000 +0200 +@@ -210,10 +210,10 @@ + int i; + + for (i = 0; i < 128; i++) { +- if (!(nv_rd32(dev, 0x003004 + (i * 4)) & 1)) ++ if (!(nv_rd32(dev, 0x003004 + (i * 8)) & 1)) + continue; + +- nv_mask(dev, 0x003004 + (i * 4), 0x00000001, 0x00000000); ++ nv_mask(dev, 0x003004 + (i * 8), 0x00000001, 0x00000000); + nv_wr32(dev, 0x002634, i); + if (!nv_wait(dev, 0x002634, 0xffffffff, i)) { + NV_INFO(dev, "PFIFO: kick ch %d failed: 0x%08x\n", +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_graph.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_graph.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.c 2011-06-26 07:59:23.000000000 +0200 +@@ -28,7 +28,34 @@ + + #include "nouveau_drv.h" + #include "nouveau_mm.h" ++ + #include "nvc0_graph.h" ++#include "nvc0_grhub.fuc.h" ++#include "nvc0_grgpc.fuc.h" ++ ++static void ++nvc0_graph_ctxctl_debug_unit(struct drm_device *dev, u32 base) ++{ ++ NV_INFO(dev, "PGRAPH: %06x - done 0x%08x\n", base, ++ nv_rd32(dev, base + 0x400)); ++ NV_INFO(dev, "PGRAPH: %06x - stat 0x%08x 0x%08x 0x%08x 0x%08x\n", base, ++ nv_rd32(dev, base + 0x800), nv_rd32(dev, base + 0x804), ++ nv_rd32(dev, base + 0x808), nv_rd32(dev, base + 0x80c)); ++ NV_INFO(dev, "PGRAPH: %06x - stat 0x%08x 0x%08x 0x%08x 0x%08x\n", base, ++ nv_rd32(dev, base + 0x810), nv_rd32(dev, base + 0x814), ++ nv_rd32(dev, base + 0x818), nv_rd32(dev, base + 0x81c)); ++} ++ ++static void ++nvc0_graph_ctxctl_debug(struct drm_device *dev) ++{ ++ u32 gpcnr = nv_rd32(dev, 0x409604) & 0xffff; ++ u32 gpc; ++ ++ nvc0_graph_ctxctl_debug_unit(dev, 0x409000); ++ for (gpc = 0; gpc < gpcnr; gpc++) ++ nvc0_graph_ctxctl_debug_unit(dev, 0x502000 + (gpc * 0x8000)); ++} + + static int + nvc0_graph_load_context(struct nouveau_channel *chan) +@@ -72,24 +99,44 @@ + if (!ctx) + return -ENOMEM; + +- nvc0_graph_load_context(chan); ++ if (!nouveau_ctxfw) { ++ nv_wr32(dev, 0x409840, 0x80000000); ++ nv_wr32(dev, 0x409500, 0x80000000 | chan->ramin->vinst >> 12); ++ nv_wr32(dev, 0x409504, 0x00000001); ++ if (!nv_wait(dev, 0x409800, 0x80000000, 0x80000000)) { ++ NV_ERROR(dev, "PGRAPH: HUB_SET_CHAN timeout\n"); ++ nvc0_graph_ctxctl_debug(dev); ++ ret = -EBUSY; ++ goto err; ++ } ++ } else { ++ nvc0_graph_load_context(chan); + +- nv_wo32(grch->grctx, 0x1c, 1); +- nv_wo32(grch->grctx, 0x20, 0); +- nv_wo32(grch->grctx, 0x28, 0); +- nv_wo32(grch->grctx, 0x2c, 0); +- dev_priv->engine.instmem.flush(dev); ++ nv_wo32(grch->grctx, 0x1c, 1); ++ nv_wo32(grch->grctx, 0x20, 0); ++ nv_wo32(grch->grctx, 0x28, 0); ++ nv_wo32(grch->grctx, 0x2c, 0); ++ dev_priv->engine.instmem.flush(dev); ++ } + + ret = nvc0_grctx_generate(chan); +- if (ret) { +- kfree(ctx); +- return ret; +- } ++ if (ret) ++ goto err; + +- ret = nvc0_graph_unload_context_to(dev, chan->ramin->vinst); +- if (ret) { +- kfree(ctx); +- return ret; ++ if (!nouveau_ctxfw) { ++ nv_wr32(dev, 0x409840, 0x80000000); ++ nv_wr32(dev, 0x409500, 0x80000000 | chan->ramin->vinst >> 12); ++ nv_wr32(dev, 0x409504, 0x00000002); ++ if (!nv_wait(dev, 0x409800, 0x80000000, 0x80000000)) { ++ NV_ERROR(dev, "PGRAPH: HUB_CTX_SAVE timeout\n"); ++ nvc0_graph_ctxctl_debug(dev); ++ ret = -EBUSY; ++ goto err; ++ } ++ } else { ++ ret = nvc0_graph_unload_context_to(dev, chan->ramin->vinst); ++ if (ret) ++ goto err; + } + + for (i = 0; i < priv->grctx_size; i += 4) +@@ -97,6 +144,10 @@ + + priv->grctx_vals = ctx; + return 0; ++ ++err: ++ kfree(ctx); ++ return ret; + } + + static int +@@ -108,50 +159,50 @@ + int i = 0, gpc, tp, ret; + u32 magic; + +- ret = nouveau_gpuobj_new(dev, NULL, 0x2000, 256, NVOBJ_FLAG_VM, ++ ret = nouveau_gpuobj_new(dev, chan, 0x2000, 256, NVOBJ_FLAG_VM, + &grch->unk408004); + if (ret) + return ret; + +- ret = nouveau_gpuobj_new(dev, NULL, 0x8000, 256, NVOBJ_FLAG_VM, ++ ret = nouveau_gpuobj_new(dev, chan, 0x8000, 256, NVOBJ_FLAG_VM, + &grch->unk40800c); + if (ret) + return ret; + +- ret = nouveau_gpuobj_new(dev, NULL, 384 * 1024, 4096, ++ ret = nouveau_gpuobj_new(dev, chan, 384 * 1024, 4096, + NVOBJ_FLAG_VM | NVOBJ_FLAG_VM_USER, + &grch->unk418810); + if (ret) + return ret; + +- ret = nouveau_gpuobj_new(dev, NULL, 0x1000, 0, NVOBJ_FLAG_VM, ++ ret = nouveau_gpuobj_new(dev, chan, 0x1000, 0, NVOBJ_FLAG_VM, + &grch->mmio); + if (ret) + return ret; + + + nv_wo32(grch->mmio, i++ * 4, 0x00408004); +- nv_wo32(grch->mmio, i++ * 4, grch->unk408004->vinst >> 8); ++ nv_wo32(grch->mmio, i++ * 4, grch->unk408004->linst >> 8); + nv_wo32(grch->mmio, i++ * 4, 0x00408008); + nv_wo32(grch->mmio, i++ * 4, 0x80000018); + + nv_wo32(grch->mmio, i++ * 4, 0x0040800c); +- nv_wo32(grch->mmio, i++ * 4, grch->unk40800c->vinst >> 8); ++ nv_wo32(grch->mmio, i++ * 4, grch->unk40800c->linst >> 8); + nv_wo32(grch->mmio, i++ * 4, 0x00408010); + nv_wo32(grch->mmio, i++ * 4, 0x80000000); + + nv_wo32(grch->mmio, i++ * 4, 0x00418810); +- nv_wo32(grch->mmio, i++ * 4, 0x80000000 | grch->unk418810->vinst >> 12); ++ nv_wo32(grch->mmio, i++ * 4, 0x80000000 | grch->unk418810->linst >> 12); + nv_wo32(grch->mmio, i++ * 4, 0x00419848); +- nv_wo32(grch->mmio, i++ * 4, 0x10000000 | grch->unk418810->vinst >> 12); ++ nv_wo32(grch->mmio, i++ * 4, 0x10000000 | grch->unk418810->linst >> 12); + + nv_wo32(grch->mmio, i++ * 4, 0x00419004); +- nv_wo32(grch->mmio, i++ * 4, grch->unk40800c->vinst >> 8); ++ nv_wo32(grch->mmio, i++ * 4, grch->unk40800c->linst >> 8); + nv_wo32(grch->mmio, i++ * 4, 0x00419008); + nv_wo32(grch->mmio, i++ * 4, 0x00000000); + + nv_wo32(grch->mmio, i++ * 4, 0x00418808); +- nv_wo32(grch->mmio, i++ * 4, grch->unk408004->vinst >> 8); ++ nv_wo32(grch->mmio, i++ * 4, grch->unk408004->linst >> 8); + nv_wo32(grch->mmio, i++ * 4, 0x0041880c); + nv_wo32(grch->mmio, i++ * 4, 0x80000018); + +@@ -159,7 +210,7 @@ + nv_wo32(grch->mmio, i++ * 4, 0x00405830); + nv_wo32(grch->mmio, i++ * 4, magic); + for (gpc = 0; gpc < priv->gpc_nr; gpc++) { +- for (tp = 0; tp < priv->tp_nr[gpc]; tp++, magic += 0x02fc) { ++ for (tp = 0; tp < priv->tp_nr[gpc]; tp++, magic += 0x0324) { + u32 reg = 0x504520 + (gpc * 0x8000) + (tp * 0x0800); + nv_wo32(grch->mmio, i++ * 4, reg); + nv_wo32(grch->mmio, i++ * 4, magic); +@@ -186,7 +237,7 @@ + return -ENOMEM; + chan->engctx[NVOBJ_ENGINE_GR] = grch; + +- ret = nouveau_gpuobj_new(dev, NULL, priv->grctx_size, 256, ++ ret = nouveau_gpuobj_new(dev, chan, priv->grctx_size, 256, + NVOBJ_FLAG_VM | NVOBJ_FLAG_ZERO_ALLOC, + &grch->grctx); + if (ret) +@@ -197,8 +248,8 @@ + if (ret) + goto error; + +- nv_wo32(chan->ramin, 0x0210, lower_32_bits(grctx->vinst) | 4); +- nv_wo32(chan->ramin, 0x0214, upper_32_bits(grctx->vinst)); ++ nv_wo32(chan->ramin, 0x0210, lower_32_bits(grctx->linst) | 4); ++ nv_wo32(chan->ramin, 0x0214, upper_32_bits(grctx->linst)); + pinstmem->flush(dev); + + if (!priv->grctx_vals) { +@@ -210,15 +261,20 @@ + for (i = 0; i < priv->grctx_size; i += 4) + nv_wo32(grctx, i, priv->grctx_vals[i / 4]); + +- nv_wo32(grctx, 0xf4, 0); +- nv_wo32(grctx, 0xf8, 0); +- nv_wo32(grctx, 0x10, grch->mmio_nr); +- nv_wo32(grctx, 0x14, lower_32_bits(grch->mmio->vinst)); +- nv_wo32(grctx, 0x18, upper_32_bits(grch->mmio->vinst)); +- nv_wo32(grctx, 0x1c, 1); +- nv_wo32(grctx, 0x20, 0); +- nv_wo32(grctx, 0x28, 0); +- nv_wo32(grctx, 0x2c, 0); ++ if (!nouveau_ctxfw) { ++ nv_wo32(grctx, 0x00, grch->mmio_nr); ++ nv_wo32(grctx, 0x04, grch->mmio->linst >> 8); ++ } else { ++ nv_wo32(grctx, 0xf4, 0); ++ nv_wo32(grctx, 0xf8, 0); ++ nv_wo32(grctx, 0x10, grch->mmio_nr); ++ nv_wo32(grctx, 0x14, lower_32_bits(grch->mmio->linst)); ++ nv_wo32(grctx, 0x18, upper_32_bits(grch->mmio->linst)); ++ nv_wo32(grctx, 0x1c, 1); ++ nv_wo32(grctx, 0x20, 0); ++ nv_wo32(grctx, 0x28, 0); ++ nv_wo32(grctx, 0x2c, 0); ++ } + pinstmem->flush(dev); + return 0; + +@@ -296,6 +352,7 @@ + nvc0_graph_init_gpc_0(struct drm_device *dev) + { + struct nvc0_graph_priv *priv = nv_engine(dev, NVOBJ_ENGINE_GR); ++ const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tp_total); + u32 data[TP_MAX / 8]; + u8 tpnr[GPC_MAX]; + int i, gpc, tpc; +@@ -307,13 +364,6 @@ + * 465: 3/4/4/0 4 7 + * 470: 3/3/4/4 5 5 + * 480: 3/4/4/4 6 6 +- * +- * magicgpc918 +- * 450: 00200000 00000000001000000000000000000000 +- * 460: 00124925 00000000000100100100100100100101 +- * 465: 000ba2e9 00000000000010111010001011101001 +- * 470: 00092493 00000000000010010010010010010011 +- * 480: 00088889 00000000000010001000100010001001 + */ + + memset(data, 0x00, sizeof(data)); +@@ -336,10 +386,10 @@ + nv_wr32(dev, GPC_UNIT(gpc, 0x0914), priv->magic_not_rop_nr << 8 | + priv->tp_nr[gpc]); + nv_wr32(dev, GPC_UNIT(gpc, 0x0910), 0x00040000 | priv->tp_total); +- nv_wr32(dev, GPC_UNIT(gpc, 0x0918), priv->magicgpc918); ++ nv_wr32(dev, GPC_UNIT(gpc, 0x0918), magicgpc918); + } + +- nv_wr32(dev, GPC_BCAST(0x1bd4), priv->magicgpc918); ++ nv_wr32(dev, GPC_BCAST(0x1bd4), magicgpc918); + nv_wr32(dev, GPC_BCAST(0x08ac), priv->rop_nr); + } + +@@ -419,8 +469,51 @@ + static int + nvc0_graph_init_ctxctl(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nvc0_graph_priv *priv = nv_engine(dev, NVOBJ_ENGINE_GR); + u32 r000260; ++ int i; ++ ++ if (!nouveau_ctxfw) { ++ /* load HUB microcode */ ++ r000260 = nv_mask(dev, 0x000260, 0x00000001, 0x00000000); ++ nv_wr32(dev, 0x4091c0, 0x01000000); ++ for (i = 0; i < sizeof(nvc0_grhub_data) / 4; i++) ++ nv_wr32(dev, 0x4091c4, nvc0_grhub_data[i]); ++ ++ nv_wr32(dev, 0x409180, 0x01000000); ++ for (i = 0; i < sizeof(nvc0_grhub_code) / 4; i++) { ++ if ((i & 0x3f) == 0) ++ nv_wr32(dev, 0x409188, i >> 6); ++ nv_wr32(dev, 0x409184, nvc0_grhub_code[i]); ++ } ++ ++ /* load GPC microcode */ ++ nv_wr32(dev, 0x41a1c0, 0x01000000); ++ for (i = 0; i < sizeof(nvc0_grgpc_data) / 4; i++) ++ nv_wr32(dev, 0x41a1c4, nvc0_grgpc_data[i]); ++ ++ nv_wr32(dev, 0x41a180, 0x01000000); ++ for (i = 0; i < sizeof(nvc0_grgpc_code) / 4; i++) { ++ if ((i & 0x3f) == 0) ++ nv_wr32(dev, 0x41a188, i >> 6); ++ nv_wr32(dev, 0x41a184, nvc0_grgpc_code[i]); ++ } ++ nv_wr32(dev, 0x000260, r000260); ++ ++ /* start HUB ucode running, it'll init the GPCs */ ++ nv_wr32(dev, 0x409800, dev_priv->chipset); ++ nv_wr32(dev, 0x40910c, 0x00000000); ++ nv_wr32(dev, 0x409100, 0x00000002); ++ if (!nv_wait(dev, 0x409800, 0x80000000, 0x80000000)) { ++ NV_ERROR(dev, "PGRAPH: HUB_INIT timed out\n"); ++ nvc0_graph_ctxctl_debug(dev); ++ return -EBUSY; ++ } ++ ++ priv->grctx_size = nv_rd32(dev, 0x409804); ++ return 0; ++ } + + /* load fuc microcode */ + r000260 = nv_mask(dev, 0x000260, 0x00000001, 0x00000000); +@@ -528,6 +621,22 @@ + } + + static void ++nvc0_graph_ctxctl_isr(struct drm_device *dev) ++{ ++ u32 ustat = nv_rd32(dev, 0x409c18); ++ ++ if (ustat & 0x00000001) ++ NV_INFO(dev, "PGRAPH: CTXCTRL ucode error\n"); ++ if (ustat & 0x00080000) ++ NV_INFO(dev, "PGRAPH: CTXCTRL watchdog timeout\n"); ++ if (ustat & ~0x00080001) ++ NV_INFO(dev, "PGRAPH: CTXCTRL 0x%08x\n", ustat); ++ ++ nvc0_graph_ctxctl_debug(dev); ++ nv_wr32(dev, 0x409c20, ustat); ++} ++ ++static void + nvc0_graph_isr(struct drm_device *dev) + { + u64 inst = (u64)(nv_rd32(dev, 0x409b00) & 0x0fffffff) << 12; +@@ -578,11 +687,7 @@ + } + + if (stat & 0x00080000) { +- u32 ustat = nv_rd32(dev, 0x409c18); +- +- NV_INFO(dev, "PGRAPH: CTXCTRL ustat 0x%08x\n", ustat); +- +- nv_wr32(dev, 0x409c20, ustat); ++ nvc0_graph_ctxctl_isr(dev); + nv_wr32(dev, 0x400100, 0x00080000); + stat &= ~0x00080000; + } +@@ -606,7 +711,7 @@ + u32 st0 = nv_mask(dev, reg + 0x1020, 0, 0); + u32 st1 = nv_mask(dev, reg + 0x1420, 0, 0); + +- NV_INFO(dev, "PRUNK140: %d 0x%08x 0x%08x\n", unit, st0, st1); ++ NV_DEBUG(dev, "PRUNK140: %d 0x%08x 0x%08x\n", unit, st0, st1); + units &= ~(1 << unit); + } + } +@@ -651,10 +756,12 @@ + { + struct nvc0_graph_priv *priv = nv_engine(dev, engine); + +- nvc0_graph_destroy_fw(&priv->fuc409c); +- nvc0_graph_destroy_fw(&priv->fuc409d); +- nvc0_graph_destroy_fw(&priv->fuc41ac); +- nvc0_graph_destroy_fw(&priv->fuc41ad); ++ if (nouveau_ctxfw) { ++ nvc0_graph_destroy_fw(&priv->fuc409c); ++ nvc0_graph_destroy_fw(&priv->fuc409d); ++ nvc0_graph_destroy_fw(&priv->fuc41ac); ++ nvc0_graph_destroy_fw(&priv->fuc41ad); ++ } + + nouveau_irq_unregister(dev, 12); + nouveau_irq_unregister(dev, 25); +@@ -675,13 +782,10 @@ + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nvc0_graph_priv *priv; + int ret, gpc, i; ++ u32 fermi; + +- switch (dev_priv->chipset) { +- case 0xc0: +- case 0xc3: +- case 0xc4: +- break; +- default: ++ fermi = nvc0_graph_class(dev); ++ if (!fermi) { + NV_ERROR(dev, "PGRAPH: unsupported chipset, please report!\n"); + return 0; + } +@@ -701,15 +805,17 @@ + nouveau_irq_register(dev, 12, nvc0_graph_isr); + nouveau_irq_register(dev, 25, nvc0_runk140_isr); + +- if (nvc0_graph_create_fw(dev, "fuc409c", &priv->fuc409c) || +- nvc0_graph_create_fw(dev, "fuc409d", &priv->fuc409d) || +- nvc0_graph_create_fw(dev, "fuc41ac", &priv->fuc41ac) || +- nvc0_graph_create_fw(dev, "fuc41ad", &priv->fuc41ad)) { +- ret = 0; +- goto error; ++ if (nouveau_ctxfw) { ++ NV_INFO(dev, "PGRAPH: using external firmware\n"); ++ if (nvc0_graph_create_fw(dev, "fuc409c", &priv->fuc409c) || ++ nvc0_graph_create_fw(dev, "fuc409d", &priv->fuc409d) || ++ nvc0_graph_create_fw(dev, "fuc41ac", &priv->fuc41ac) || ++ nvc0_graph_create_fw(dev, "fuc41ad", &priv->fuc41ad)) { ++ ret = 0; ++ goto error; ++ } + } + +- + ret = nouveau_gpuobj_new(dev, NULL, 0x1000, 256, 0, &priv->unk4188b4); + if (ret) + goto error; +@@ -735,25 +841,28 @@ + case 0xc0: + if (priv->tp_total == 11) { /* 465, 3/4/4/0, 4 */ + priv->magic_not_rop_nr = 0x07; +- /* filled values up to tp_total, the rest 0 */ +- priv->magicgpc918 = 0x000ba2e9; + } else + if (priv->tp_total == 14) { /* 470, 3/3/4/4, 5 */ + priv->magic_not_rop_nr = 0x05; +- priv->magicgpc918 = 0x00092493; + } else + if (priv->tp_total == 15) { /* 480, 3/4/4/4, 6 */ + priv->magic_not_rop_nr = 0x06; +- priv->magicgpc918 = 0x00088889; + } + break; + case 0xc3: /* 450, 4/0/0/0, 2 */ + priv->magic_not_rop_nr = 0x03; +- priv->magicgpc918 = 0x00200000; + break; + case 0xc4: /* 460, 3/4/0/0, 4 */ + priv->magic_not_rop_nr = 0x01; +- priv->magicgpc918 = 0x00124925; ++ break; ++ case 0xc1: /* 2/0/0/0, 1 */ ++ priv->magic_not_rop_nr = 0x01; ++ break; ++ case 0xc8: /* 4/4/3/4, 5 */ ++ priv->magic_not_rop_nr = 0x06; ++ break; ++ case 0xce: /* 4/4/0/0, 4 */ ++ priv->magic_not_rop_nr = 0x03; + break; + } + +@@ -763,13 +872,16 @@ + priv->tp_nr[3], priv->rop_nr); + /* use 0xc3's values... */ + priv->magic_not_rop_nr = 0x03; +- priv->magicgpc918 = 0x00200000; + } + + NVOBJ_CLASS(dev, 0x902d, GR); /* 2D */ + NVOBJ_CLASS(dev, 0x9039, GR); /* M2MF */ + NVOBJ_MTHD (dev, 0x9039, 0x0500, nvc0_graph_mthd_page_flip); + NVOBJ_CLASS(dev, 0x9097, GR); /* 3D */ ++ if (fermi >= 0x9197) ++ NVOBJ_CLASS(dev, 0x9197, GR); /* 3D (NVC1-) */ ++ if (fermi >= 0x9297) ++ NVOBJ_CLASS(dev, 0x9297, GR); /* 3D (NVC8-) */ + NVOBJ_CLASS(dev, 0x90c0, GR); /* COMPUTE */ + return 0; + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_graph.fuc linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.fuc +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_graph.fuc 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.fuc 2011-06-26 07:59:23.000000000 +0200 +@@ -0,0 +1,400 @@ ++/* fuc microcode util functions for nvc0 PGRAPH ++ * ++ * Copyright 2011 Red Hat Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: Ben Skeggs ++ */ ++ ++define(`mmctx_data', `.b32 eval((($2 - 1) << 26) | $1)') ++define(`queue_init', `.skip eval((2 * 4) + ((8 * 4) * 2))') ++ ++ifdef(`include_code', ` ++// Error codes ++define(`E_BAD_COMMAND', 0x01) ++define(`E_CMD_OVERFLOW', 0x02) ++ ++// Util macros to help with debugging ucode hangs etc ++define(`T_WAIT', 0) ++define(`T_MMCTX', 1) ++define(`T_STRWAIT', 2) ++define(`T_STRINIT', 3) ++define(`T_AUTO', 4) ++define(`T_CHAN', 5) ++define(`T_LOAD', 6) ++define(`T_SAVE', 7) ++define(`T_LCHAN', 8) ++define(`T_LCTXH', 9) ++ ++define(`trace_set', ` ++ mov $r8 0x83c ++ shl b32 $r8 6 ++ clear b32 $r9 ++ bset $r9 $1 ++ iowr I[$r8 + 0x000] $r9 // CC_SCRATCH[7] ++') ++ ++define(`trace_clr', ` ++ mov $r8 0x85c ++ shl b32 $r8 6 ++ clear b32 $r9 ++ bset $r9 $1 ++ iowr I[$r8 + 0x000] $r9 // CC_SCRATCH[7] ++') ++ ++// queue_put - add request to queue ++// ++// In : $r13 queue pointer ++// $r14 command ++// $r15 data ++// ++queue_put: ++ // make sure we have space.. ++ ld b32 $r8 D[$r13 + 0x0] // GET ++ ld b32 $r9 D[$r13 + 0x4] // PUT ++ xor $r8 8 ++ cmpu b32 $r8 $r9 ++ bra ne queue_put_next ++ mov $r15 E_CMD_OVERFLOW ++ call error ++ ret ++ ++ // store cmd/data on queue ++ queue_put_next: ++ and $r8 $r9 7 ++ shl b32 $r8 3 ++ add b32 $r8 $r13 ++ add b32 $r8 8 ++ st b32 D[$r8 + 0x0] $r14 ++ st b32 D[$r8 + 0x4] $r15 ++ ++ // update PUT ++ add b32 $r9 1 ++ and $r9 0xf ++ st b32 D[$r13 + 0x4] $r9 ++ ret ++ ++// queue_get - fetch request from queue ++// ++// In : $r13 queue pointer ++// ++// Out: $p1 clear on success (data available) ++// $r14 command ++// $r15 data ++// ++queue_get: ++ bset $flags $p1 ++ ld b32 $r8 D[$r13 + 0x0] // GET ++ ld b32 $r9 D[$r13 + 0x4] // PUT ++ cmpu b32 $r8 $r9 ++ bra e queue_get_done ++ // fetch first cmd/data pair ++ and $r9 $r8 7 ++ shl b32 $r9 3 ++ add b32 $r9 $r13 ++ add b32 $r9 8 ++ ld b32 $r14 D[$r9 + 0x0] ++ ld b32 $r15 D[$r9 + 0x4] ++ ++ // update GET ++ add b32 $r8 1 ++ and $r8 0xf ++ st b32 D[$r13 + 0x0] $r8 ++ bclr $flags $p1 ++queue_get_done: ++ ret ++ ++// nv_rd32 - read 32-bit value from nv register ++// ++// In : $r14 register ++// Out: $r15 value ++// ++nv_rd32: ++ mov $r11 0x728 ++ shl b32 $r11 6 ++ mov b32 $r12 $r14 ++ bset $r12 31 // MMIO_CTRL_PENDING ++ iowr I[$r11 + 0x000] $r12 // MMIO_CTRL ++ nv_rd32_wait: ++ iord $r12 I[$r11 + 0x000] ++ xbit $r12 $r12 31 ++ bra ne nv_rd32_wait ++ mov $r10 6 // DONE_MMIO_RD ++ call wait_doneo ++ iord $r15 I[$r11 + 0x100] // MMIO_RDVAL ++ ret ++ ++// nv_wr32 - write 32-bit value to nv register ++// ++// In : $r14 register ++// $r15 value ++// ++nv_wr32: ++ mov $r11 0x728 ++ shl b32 $r11 6 ++ iowr I[$r11 + 0x200] $r15 // MMIO_WRVAL ++ mov b32 $r12 $r14 ++ bset $r12 31 // MMIO_CTRL_PENDING ++ bset $r12 30 // MMIO_CTRL_WRITE ++ iowr I[$r11 + 0x000] $r12 // MMIO_CTRL ++ nv_wr32_wait: ++ iord $r12 I[$r11 + 0x000] ++ xbit $r12 $r12 31 ++ bra ne nv_wr32_wait ++ ret ++ ++// (re)set watchdog timer ++// ++// In : $r15 timeout ++// ++watchdog_reset: ++ mov $r8 0x430 ++ shl b32 $r8 6 ++ bset $r15 31 ++ iowr I[$r8 + 0x000] $r15 ++ ret ++ ++// clear watchdog timer ++watchdog_clear: ++ mov $r8 0x430 ++ shl b32 $r8 6 ++ iowr I[$r8 + 0x000] $r0 ++ ret ++ ++// wait_done{z,o} - wait on FUC_DONE bit to become clear/set ++// ++// In : $r10 bit to wait on ++// ++define(`wait_done', ` ++$1: ++ trace_set(T_WAIT); ++ mov $r8 0x818 ++ shl b32 $r8 6 ++ iowr I[$r8 + 0x000] $r10 // CC_SCRATCH[6] = wait bit ++ wait_done_$1: ++ mov $r8 0x400 ++ shl b32 $r8 6 ++ iord $r8 I[$r8 + 0x000] // DONE ++ xbit $r8 $r8 $r10 ++ bra $2 wait_done_$1 ++ trace_clr(T_WAIT) ++ ret ++') ++wait_done(wait_donez, ne) ++wait_done(wait_doneo, e) ++ ++// mmctx_size - determine size of a mmio list transfer ++// ++// In : $r14 mmio list head ++// $r15 mmio list tail ++// Out: $r15 transfer size (in bytes) ++// ++mmctx_size: ++ clear b32 $r9 ++ nv_mmctx_size_loop: ++ ld b32 $r8 D[$r14] ++ shr b32 $r8 26 ++ add b32 $r8 1 ++ shl b32 $r8 2 ++ add b32 $r9 $r8 ++ add b32 $r14 4 ++ cmpu b32 $r14 $r15 ++ bra ne nv_mmctx_size_loop ++ mov b32 $r15 $r9 ++ ret ++ ++// mmctx_xfer - execute a list of mmio transfers ++// ++// In : $r10 flags ++// bit 0: direction (0 = save, 1 = load) ++// bit 1: set if first transfer ++// bit 2: set if last transfer ++// $r11 base ++// $r12 mmio list head ++// $r13 mmio list tail ++// $r14 multi_stride ++// $r15 multi_mask ++// ++mmctx_xfer: ++ trace_set(T_MMCTX) ++ mov $r8 0x710 ++ shl b32 $r8 6 ++ clear b32 $r9 ++ or $r11 $r11 ++ bra e mmctx_base_disabled ++ iowr I[$r8 + 0x000] $r11 // MMCTX_BASE ++ bset $r9 0 // BASE_EN ++ mmctx_base_disabled: ++ or $r14 $r14 ++ bra e mmctx_multi_disabled ++ iowr I[$r8 + 0x200] $r14 // MMCTX_MULTI_STRIDE ++ iowr I[$r8 + 0x300] $r15 // MMCTX_MULTI_MASK ++ bset $r9 1 // MULTI_EN ++ mmctx_multi_disabled: ++ add b32 $r8 0x100 ++ ++ xbit $r11 $r10 0 ++ shl b32 $r11 16 // DIR ++ bset $r11 12 // QLIMIT = 0x10 ++ xbit $r14 $r10 1 ++ shl b32 $r14 17 ++ or $r11 $r14 // START_TRIGGER ++ iowr I[$r8 + 0x000] $r11 // MMCTX_CTRL ++ ++ // loop over the mmio list, and send requests to the hw ++ mmctx_exec_loop: ++ // wait for space in mmctx queue ++ mmctx_wait_free: ++ iord $r14 I[$r8 + 0x000] // MMCTX_CTRL ++ and $r14 0x1f ++ bra e mmctx_wait_free ++ ++ // queue up an entry ++ ld b32 $r14 D[$r12] ++ or $r14 $r9 ++ iowr I[$r8 + 0x300] $r14 ++ add b32 $r12 4 ++ cmpu b32 $r12 $r13 ++ bra ne mmctx_exec_loop ++ ++ xbit $r11 $r10 2 ++ bra ne mmctx_stop ++ // wait for queue to empty ++ mmctx_fini_wait: ++ iord $r11 I[$r8 + 0x000] // MMCTX_CTRL ++ and $r11 0x1f ++ cmpu b32 $r11 0x10 ++ bra ne mmctx_fini_wait ++ mov $r10 2 // DONE_MMCTX ++ call wait_donez ++ bra mmctx_done ++ mmctx_stop: ++ xbit $r11 $r10 0 ++ shl b32 $r11 16 // DIR ++ bset $r11 12 // QLIMIT = 0x10 ++ bset $r11 18 // STOP_TRIGGER ++ iowr I[$r8 + 0x000] $r11 // MMCTX_CTRL ++ mmctx_stop_wait: ++ // wait for STOP_TRIGGER to clear ++ iord $r11 I[$r8 + 0x000] // MMCTX_CTRL ++ xbit $r11 $r11 18 ++ bra ne mmctx_stop_wait ++ mmctx_done: ++ trace_clr(T_MMCTX) ++ ret ++ ++// Wait for DONE_STRAND ++// ++strand_wait: ++ push $r10 ++ mov $r10 2 ++ call wait_donez ++ pop $r10 ++ ret ++ ++// unknown - call before issuing strand commands ++// ++strand_pre: ++ mov $r8 0x4afc ++ sethi $r8 0x20000 ++ mov $r9 0xc ++ iowr I[$r8] $r9 ++ call strand_wait ++ ret ++ ++// unknown - call after issuing strand commands ++// ++strand_post: ++ mov $r8 0x4afc ++ sethi $r8 0x20000 ++ mov $r9 0xd ++ iowr I[$r8] $r9 ++ call strand_wait ++ ret ++ ++// Selects strand set?! ++// ++// In: $r14 id ++// ++strand_set: ++ mov $r10 0x4ffc ++ sethi $r10 0x20000 ++ sub b32 $r11 $r10 0x500 ++ mov $r12 0xf ++ iowr I[$r10 + 0x000] $r12 // 0x93c = 0xf ++ mov $r12 0xb ++ iowr I[$r11 + 0x000] $r12 // 0x928 = 0xb ++ call strand_wait ++ iowr I[$r10 + 0x000] $r14 // 0x93c = ++ mov $r12 0xa ++ iowr I[$r11 + 0x000] $r12 // 0x928 = 0xa ++ call strand_wait ++ ret ++ ++// Initialise strand context data ++// ++// In : $r15 context base ++// Out: $r15 context size (in bytes) ++// ++// Strandset(?) 3 hardcoded currently ++// ++strand_ctx_init: ++ trace_set(T_STRINIT) ++ call strand_pre ++ mov $r14 3 ++ call strand_set ++ mov $r10 0x46fc ++ sethi $r10 0x20000 ++ add b32 $r11 $r10 0x400 ++ iowr I[$r10 + 0x100] $r0 // STRAND_FIRST_GENE = 0 ++ mov $r12 1 ++ iowr I[$r11 + 0x000] $r12 // STRAND_CMD = LATCH_FIRST_GENE ++ call strand_wait ++ sub b32 $r12 $r0 1 ++ iowr I[$r10 + 0x000] $r12 // STRAND_GENE_CNT = 0xffffffff ++ mov $r12 2 ++ iowr I[$r11 + 0x000] $r12 // STRAND_CMD = LATCH_GENE_CNT ++ call strand_wait ++ call strand_post ++ ++ // read the size of each strand, poke the context offset of ++ // each into STRAND_{SAVE,LOAD}_SWBASE now, no need to worry ++ // about it later then. ++ mov $r8 0x880 ++ shl b32 $r8 6 ++ iord $r9 I[$r8 + 0x000] // STRANDS ++ add b32 $r8 0x2200 ++ shr b32 $r14 $r15 8 ++ ctx_init_strand_loop: ++ iowr I[$r8 + 0x000] $r14 // STRAND_SAVE_SWBASE ++ iowr I[$r8 + 0x100] $r14 // STRAND_LOAD_SWBASE ++ iord $r10 I[$r8 + 0x200] // STRAND_SIZE ++ shr b32 $r10 6 ++ add b32 $r10 1 ++ add b32 $r14 $r10 ++ add b32 $r8 4 ++ sub b32 $r9 1 ++ bra ne ctx_init_strand_loop ++ ++ shl b32 $r14 8 ++ sub b32 $r15 $r14 $r15 ++ trace_clr(T_STRINIT) ++ ret ++') +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_graph.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_graph.h 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.h 2011-06-26 07:59:23.000000000 +0200 +@@ -57,8 +57,7 @@ + struct nouveau_gpuobj *unk4188b4; + struct nouveau_gpuobj *unk4188b8; + +- u8 magic_not_rop_nr; +- u32 magicgpc918; ++ u8 magic_not_rop_nr; + }; + + struct nvc0_graph_chan { +@@ -72,4 +71,25 @@ + + int nvc0_grctx_generate(struct nouveau_channel *); + ++/* nvc0_graph.c uses this also to determine supported chipsets */ ++static inline u32 ++nvc0_graph_class(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ switch (dev_priv->chipset) { ++ case 0xc0: ++ case 0xc3: ++ case 0xc4: ++ case 0xce: /* guess, mmio trace shows only 0x9097 state */ ++ return 0x9097; ++ case 0xc1: ++ return 0x9197; ++ case 0xc8: ++ return 0x9297; ++ default: ++ return 0; ++ } ++} ++ + #endif +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grctx.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grctx.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grctx.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grctx.c 2011-06-26 07:59:23.000000000 +0200 +@@ -45,6 +45,9 @@ + static void + nvc0_grctx_generate_9097(struct drm_device *dev) + { ++ u32 fermi = nvc0_graph_class(dev); ++ u32 mthd; ++ + nv_mthd(dev, 0x9097, 0x0800, 0x00000000); + nv_mthd(dev, 0x9097, 0x0840, 0x00000000); + nv_mthd(dev, 0x9097, 0x0880, 0x00000000); +@@ -824,134 +827,10 @@ + nv_mthd(dev, 0x9097, 0x1eb8, 0x00000001); + nv_mthd(dev, 0x9097, 0x1ed8, 0x00000001); + nv_mthd(dev, 0x9097, 0x1ef8, 0x00000001); +- nv_mthd(dev, 0x9097, 0x3400, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3404, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3408, 0x00000000); +- nv_mthd(dev, 0x9097, 0x340c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3410, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3414, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3418, 0x00000000); +- nv_mthd(dev, 0x9097, 0x341c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3420, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3424, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3428, 0x00000000); +- nv_mthd(dev, 0x9097, 0x342c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3430, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3434, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3438, 0x00000000); +- nv_mthd(dev, 0x9097, 0x343c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3440, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3444, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3448, 0x00000000); +- nv_mthd(dev, 0x9097, 0x344c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3450, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3454, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3458, 0x00000000); +- nv_mthd(dev, 0x9097, 0x345c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3460, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3464, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3468, 0x00000000); +- nv_mthd(dev, 0x9097, 0x346c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3470, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3474, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3478, 0x00000000); +- nv_mthd(dev, 0x9097, 0x347c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3480, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3484, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3488, 0x00000000); +- nv_mthd(dev, 0x9097, 0x348c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3490, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3494, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3498, 0x00000000); +- nv_mthd(dev, 0x9097, 0x349c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34a0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34a4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34a8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34ac, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34b0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34b4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34b8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34bc, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34c0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34c4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34c8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34cc, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34d0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34d4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34d8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34dc, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34e0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34e4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34e8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34ec, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34f0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34f4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34f8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x34fc, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3500, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3504, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3508, 0x00000000); +- nv_mthd(dev, 0x9097, 0x350c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3510, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3514, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3518, 0x00000000); +- nv_mthd(dev, 0x9097, 0x351c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3520, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3524, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3528, 0x00000000); +- nv_mthd(dev, 0x9097, 0x352c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3530, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3534, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3538, 0x00000000); +- nv_mthd(dev, 0x9097, 0x353c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3540, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3544, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3548, 0x00000000); +- nv_mthd(dev, 0x9097, 0x354c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3550, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3554, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3558, 0x00000000); +- nv_mthd(dev, 0x9097, 0x355c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3560, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3564, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3568, 0x00000000); +- nv_mthd(dev, 0x9097, 0x356c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3570, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3574, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3578, 0x00000000); +- nv_mthd(dev, 0x9097, 0x357c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3580, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3584, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3588, 0x00000000); +- nv_mthd(dev, 0x9097, 0x358c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3590, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3594, 0x00000000); +- nv_mthd(dev, 0x9097, 0x3598, 0x00000000); +- nv_mthd(dev, 0x9097, 0x359c, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35a0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35a4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35a8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35ac, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35b0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35b4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35b8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35bc, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35c0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35c4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35c8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35cc, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35d0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35d4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35d8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35dc, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35e0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35e4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35e8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35ec, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35f0, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35f4, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35f8, 0x00000000); +- nv_mthd(dev, 0x9097, 0x35fc, 0x00000000); ++ if (fermi == 0x9097) { ++ for (mthd = 0x3400; mthd <= 0x35fc; mthd += 4) ++ nv_mthd(dev, 0x9097, mthd, 0x00000000); ++ } + nv_mthd(dev, 0x9097, 0x030c, 0x00000001); + nv_mthd(dev, 0x9097, 0x1944, 0x00000000); + nv_mthd(dev, 0x9097, 0x1514, 0x00000000); +@@ -1321,6 +1200,37 @@ + } + + static void ++nvc0_grctx_generate_9197(struct drm_device *dev) ++{ ++ u32 fermi = nvc0_graph_class(dev); ++ u32 mthd; ++ ++ if (fermi == 0x9197) { ++ for (mthd = 0x3400; mthd <= 0x35fc; mthd += 4) ++ nv_mthd(dev, 0x9197, mthd, 0x00000000); ++ } ++ nv_mthd(dev, 0x9197, 0x02e4, 0x0000b001); ++} ++ ++static void ++nvc0_grctx_generate_9297(struct drm_device *dev) ++{ ++ u32 fermi = nvc0_graph_class(dev); ++ u32 mthd; ++ ++ if (fermi == 0x9297) { ++ for (mthd = 0x3400; mthd <= 0x35fc; mthd += 4) ++ nv_mthd(dev, 0x9297, mthd, 0x00000000); ++ } ++ nv_mthd(dev, 0x9297, 0x036c, 0x00000000); ++ nv_mthd(dev, 0x9297, 0x0370, 0x00000000); ++ nv_mthd(dev, 0x9297, 0x07a4, 0x00000000); ++ nv_mthd(dev, 0x9297, 0x07a8, 0x00000000); ++ nv_mthd(dev, 0x9297, 0x0374, 0x00000000); ++ nv_mthd(dev, 0x9297, 0x0378, 0x00000020); ++} ++ ++static void + nvc0_grctx_generate_902d(struct drm_device *dev) + { + nv_mthd(dev, 0x902d, 0x0200, 0x000000cf); +@@ -1559,8 +1469,15 @@ + static void + nvc0_grctx_generate_shaders(struct drm_device *dev) + { +- nv_wr32(dev, 0x405800, 0x078000bf); +- nv_wr32(dev, 0x405830, 0x02180000); ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->chipset != 0xc1) { ++ nv_wr32(dev, 0x405800, 0x078000bf); ++ nv_wr32(dev, 0x405830, 0x02180000); ++ } else { ++ nv_wr32(dev, 0x405800, 0x0f8000bf); ++ nv_wr32(dev, 0x405830, 0x02180218); ++ } + nv_wr32(dev, 0x405834, 0x00000000); + nv_wr32(dev, 0x405838, 0x00000000); + nv_wr32(dev, 0x405854, 0x00000000); +@@ -1586,10 +1503,16 @@ + static void + nvc0_grctx_generate_unk64xx(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ + nv_wr32(dev, 0x4064a8, 0x00000000); + nv_wr32(dev, 0x4064ac, 0x00003fff); + nv_wr32(dev, 0x4064b4, 0x00000000); + nv_wr32(dev, 0x4064b8, 0x00000000); ++ if (dev_priv->chipset == 0xc1) { ++ nv_wr32(dev, 0x4064c0, 0x80140078); ++ nv_wr32(dev, 0x4064c4, 0x0086ffff); ++ } + } + + static void +@@ -1622,21 +1545,14 @@ + nvc0_grctx_generate_rop(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int chipset = dev_priv->chipset; + + /* ROPC_BROADCAST */ + nv_wr32(dev, 0x408800, 0x02802a3c); + nv_wr32(dev, 0x408804, 0x00000040); +- nv_wr32(dev, 0x408808, 0x0003e00d); +- switch (dev_priv->chipset) { +- case 0xc0: +- nv_wr32(dev, 0x408900, 0x0080b801); +- break; +- case 0xc3: +- case 0xc4: +- nv_wr32(dev, 0x408900, 0x3080b801); +- break; +- } +- nv_wr32(dev, 0x408904, 0x02000001); ++ nv_wr32(dev, 0x408808, chipset != 0xc1 ? 0x0003e00d : 0x1003e005); ++ nv_wr32(dev, 0x408900, 0x3080b801); ++ nv_wr32(dev, 0x408904, chipset != 0xc1 ? 0x02000001 : 0x62000001); + nv_wr32(dev, 0x408908, 0x00c80929); + nv_wr32(dev, 0x40890c, 0x00000000); + nv_wr32(dev, 0x408980, 0x0000011d); +@@ -1645,6 +1561,8 @@ + static void + nvc0_grctx_generate_gpc(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int chipset = dev_priv->chipset; + int i; + + /* GPC_BROADCAST */ +@@ -1676,7 +1594,7 @@ + nv_wr32(dev, 0x41880c, 0x00000000); + nv_wr32(dev, 0x418810, 0x00000000); + nv_wr32(dev, 0x418828, 0x00008442); +- nv_wr32(dev, 0x418830, 0x00000001); ++ nv_wr32(dev, 0x418830, chipset != 0xc1 ? 0x00000001 : 0x10000001); + nv_wr32(dev, 0x4188d8, 0x00000008); + nv_wr32(dev, 0x4188e0, 0x01000000); + nv_wr32(dev, 0x4188e8, 0x00000000); +@@ -1684,7 +1602,7 @@ + nv_wr32(dev, 0x4188f0, 0x00000000); + nv_wr32(dev, 0x4188f4, 0x00000000); + nv_wr32(dev, 0x4188f8, 0x00000000); +- nv_wr32(dev, 0x4188fc, 0x00100000); ++ nv_wr32(dev, 0x4188fc, chipset != 0xc1 ? 0x00100000 : 0x00100018); + nv_wr32(dev, 0x41891c, 0x00ff00ff); + nv_wr32(dev, 0x418924, 0x00000000); + nv_wr32(dev, 0x418928, 0x00ffff00); +@@ -1715,6 +1633,8 @@ + nv_wr32(dev, 0x418c24, 0x00000000); + nv_wr32(dev, 0x418c28, 0x00000000); + nv_wr32(dev, 0x418c2c, 0x00000000); ++ if (chipset == 0xc1) ++ nv_wr32(dev, 0x418c6c, 0x00000001); + nv_wr32(dev, 0x418c80, 0x20200004); + nv_wr32(dev, 0x418c8c, 0x00000001); + nv_wr32(dev, 0x419000, 0x00000780); +@@ -1727,10 +1647,13 @@ + nvc0_grctx_generate_tp(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int chipset = dev_priv->chipset; + + /* GPC_BROADCAST.TP_BROADCAST */ ++ nv_wr32(dev, 0x419818, 0x00000000); ++ nv_wr32(dev, 0x41983c, 0x00038bc7); + nv_wr32(dev, 0x419848, 0x00000000); +- nv_wr32(dev, 0x419864, 0x0000012a); ++ nv_wr32(dev, 0x419864, chipset != 0xc1 ? 0x0000012a : 0x00000129); + nv_wr32(dev, 0x419888, 0x00000000); + nv_wr32(dev, 0x419a00, 0x000001f0); + nv_wr32(dev, 0x419a04, 0x00000001); +@@ -1740,8 +1663,8 @@ + nv_wr32(dev, 0x419a14, 0x00000200); + nv_wr32(dev, 0x419a1c, 0x00000000); + nv_wr32(dev, 0x419a20, 0x00000800); +- if (dev_priv->chipset != 0xc0) +- nv_wr32(dev, 0x00419ac4, 0x0007f440); /* 0xc3 */ ++ if (chipset != 0xc0 && chipset != 0xc8) ++ nv_wr32(dev, 0x00419ac4, 0x0007f440); + nv_wr32(dev, 0x419b00, 0x0a418820); + nv_wr32(dev, 0x419b04, 0x062080e6); + nv_wr32(dev, 0x419b08, 0x020398a4); +@@ -1749,17 +1672,19 @@ + nv_wr32(dev, 0x419b10, 0x0a418820); + nv_wr32(dev, 0x419b14, 0x000000e6); + nv_wr32(dev, 0x419bd0, 0x00900103); +- nv_wr32(dev, 0x419be0, 0x00000001); ++ nv_wr32(dev, 0x419be0, chipset != 0xc1 ? 0x00000001 : 0x00400001); + nv_wr32(dev, 0x419be4, 0x00000000); + nv_wr32(dev, 0x419c00, 0x00000002); + nv_wr32(dev, 0x419c04, 0x00000006); + nv_wr32(dev, 0x419c08, 0x00000002); + nv_wr32(dev, 0x419c20, 0x00000000); +- nv_wr32(dev, 0x419cbc, 0x28137606); ++ nv_wr32(dev, 0x419cb0, 0x00060048); //XXX: 0xce 0x00020048 + nv_wr32(dev, 0x419ce8, 0x00000000); + nv_wr32(dev, 0x419cf4, 0x00000183); +- nv_wr32(dev, 0x419d20, 0x02180000); ++ nv_wr32(dev, 0x419d20, chipset != 0xc1 ? 0x02180000 : 0x12180000); + nv_wr32(dev, 0x419d24, 0x00001fff); ++ if (chipset == 0xc1) ++ nv_wr32(dev, 0x419d44, 0x02180218); + nv_wr32(dev, 0x419e04, 0x00000000); + nv_wr32(dev, 0x419e08, 0x00000000); + nv_wr32(dev, 0x419e0c, 0x00000000); +@@ -1785,11 +1710,11 @@ + nv_wr32(dev, 0x419e8c, 0x00000000); + nv_wr32(dev, 0x419e90, 0x00000000); + nv_wr32(dev, 0x419e98, 0x00000000); +- if (dev_priv->chipset != 0xc0) ++ if (chipset != 0xc0 && chipset != 0xc8) + nv_wr32(dev, 0x419ee0, 0x00011110); + nv_wr32(dev, 0x419f50, 0x00000000); + nv_wr32(dev, 0x419f54, 0x00000000); +- if (dev_priv->chipset != 0xc0) ++ if (chipset != 0xc0 && chipset != 0xc8) + nv_wr32(dev, 0x419f58, 0x00000000); + } + +@@ -1801,6 +1726,7 @@ + struct nvc0_graph_chan *grch = chan->engctx[NVOBJ_ENGINE_GR]; + struct drm_device *dev = chan->dev; + int i, gpc, tp, id; ++ u32 fermi = nvc0_graph_class(dev); + u32 r000260, tmp; + + r000260 = nv_rd32(dev, 0x000260); +@@ -1857,10 +1783,11 @@ + nv_wr32(dev, 0x40587c, 0x00000000); + + if (1) { +- const u8 chipset_tp_max[] = { 16, 0, 0, 4, 8 }; ++ const u8 chipset_tp_max[] = { 16, 4, 0, 4, 8, 0, 0, 0, ++ 16, 0, 0, 0, 0, 0, 8, 0 }; + u8 max = chipset_tp_max[dev_priv->chipset & 0x0f]; + u8 tpnr[GPC_MAX]; +- u8 data[32]; ++ u8 data[TP_MAX]; + + memcpy(tpnr, priv->tp_nr, sizeof(priv->tp_nr)); + memset(data, 0x1f, sizeof(data)); +@@ -2633,6 +2560,8 @@ + nv_icmd(dev, 0x0000053f, 0xffff0000); + nv_icmd(dev, 0x00000585, 0x0000003f); + nv_icmd(dev, 0x00000576, 0x00000003); ++ if (dev_priv->chipset == 0xc1) ++ nv_icmd(dev, 0x0000057b, 0x00000059); + nv_icmd(dev, 0x00000586, 0x00000040); + nv_icmd(dev, 0x00000582, 0x00000080); + nv_icmd(dev, 0x00000583, 0x00000080); +@@ -2865,6 +2794,10 @@ + nv_wr32(dev, 0x404154, 0x00000400); + + nvc0_grctx_generate_9097(dev); ++ if (fermi >= 0x9197) ++ nvc0_grctx_generate_9197(dev); ++ if (fermi >= 0x9297) ++ nvc0_grctx_generate_9297(dev); + nvc0_grctx_generate_902d(dev); + nvc0_grctx_generate_9039(dev); + nvc0_grctx_generate_90c0(dev); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc 2011-06-26 07:59:23.000000000 +0200 +@@ -0,0 +1,474 @@ ++/* fuc microcode for nvc0 PGRAPH/GPC ++ * ++ * Copyright 2011 Red Hat Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: Ben Skeggs ++ */ ++ ++/* To build: ++ * m4 nvc0_grgpc.fuc | envyas -a -w -m fuc -V nva3 -o nvc0_grgpc.fuc.h ++ */ ++ ++/* TODO ++ * - bracket certain functions with scratch writes, useful for debugging ++ * - watchdog timer around ctx operations ++ */ ++ ++.section nvc0_grgpc_data ++include(`nvc0_graph.fuc') ++gpc_id: .b32 0 ++gpc_mmio_list_head: .b32 0 ++gpc_mmio_list_tail: .b32 0 ++ ++tpc_count: .b32 0 ++tpc_mask: .b32 0 ++tpc_mmio_list_head: .b32 0 ++tpc_mmio_list_tail: .b32 0 ++ ++cmd_queue: queue_init ++ ++// chipset descriptions ++chipsets: ++.b8 0xc0 0 0 0 ++.b16 nvc0_gpc_mmio_head ++.b16 nvc0_gpc_mmio_tail ++.b16 nvc0_tpc_mmio_head ++.b16 nvc0_tpc_mmio_tail ++.b8 0xc1 0 0 0 ++.b16 nvc0_gpc_mmio_head ++.b16 nvc1_gpc_mmio_tail ++.b16 nvc0_tpc_mmio_head ++.b16 nvc1_tpc_mmio_tail ++.b8 0xc3 0 0 0 ++.b16 nvc0_gpc_mmio_head ++.b16 nvc0_gpc_mmio_tail ++.b16 nvc0_tpc_mmio_head ++.b16 nvc3_tpc_mmio_tail ++.b8 0xc4 0 0 0 ++.b16 nvc0_gpc_mmio_head ++.b16 nvc0_gpc_mmio_tail ++.b16 nvc0_tpc_mmio_head ++.b16 nvc3_tpc_mmio_tail ++.b8 0xc8 0 0 0 ++.b16 nvc0_gpc_mmio_head ++.b16 nvc0_gpc_mmio_tail ++.b16 nvc0_tpc_mmio_head ++.b16 nvc0_tpc_mmio_tail ++.b8 0xce 0 0 0 ++.b16 nvc0_gpc_mmio_head ++.b16 nvc0_gpc_mmio_tail ++.b16 nvc0_tpc_mmio_head ++.b16 nvc3_tpc_mmio_tail ++.b8 0 0 0 0 ++ ++// GPC mmio lists ++nvc0_gpc_mmio_head: ++mmctx_data(0x000380, 1) ++mmctx_data(0x000400, 6) ++mmctx_data(0x000450, 9) ++mmctx_data(0x000600, 1) ++mmctx_data(0x000684, 1) ++mmctx_data(0x000700, 5) ++mmctx_data(0x000800, 1) ++mmctx_data(0x000808, 3) ++mmctx_data(0x000828, 1) ++mmctx_data(0x000830, 1) ++mmctx_data(0x0008d8, 1) ++mmctx_data(0x0008e0, 1) ++mmctx_data(0x0008e8, 6) ++mmctx_data(0x00091c, 1) ++mmctx_data(0x000924, 3) ++mmctx_data(0x000b00, 1) ++mmctx_data(0x000b08, 6) ++mmctx_data(0x000bb8, 1) ++mmctx_data(0x000c08, 1) ++mmctx_data(0x000c10, 8) ++mmctx_data(0x000c80, 1) ++mmctx_data(0x000c8c, 1) ++mmctx_data(0x001000, 3) ++mmctx_data(0x001014, 1) ++nvc0_gpc_mmio_tail: ++mmctx_data(0x000c6c, 1); ++nvc1_gpc_mmio_tail: ++ ++// TPC mmio lists ++nvc0_tpc_mmio_head: ++mmctx_data(0x000018, 1) ++mmctx_data(0x00003c, 1) ++mmctx_data(0x000048, 1) ++mmctx_data(0x000064, 1) ++mmctx_data(0x000088, 1) ++mmctx_data(0x000200, 6) ++mmctx_data(0x00021c, 2) ++mmctx_data(0x000300, 6) ++mmctx_data(0x0003d0, 1) ++mmctx_data(0x0003e0, 2) ++mmctx_data(0x000400, 3) ++mmctx_data(0x000420, 1) ++mmctx_data(0x0004b0, 1) ++mmctx_data(0x0004e8, 1) ++mmctx_data(0x0004f4, 1) ++mmctx_data(0x000520, 2) ++mmctx_data(0x000604, 4) ++mmctx_data(0x000644, 20) ++mmctx_data(0x000698, 1) ++mmctx_data(0x000750, 2) ++nvc0_tpc_mmio_tail: ++mmctx_data(0x000758, 1) ++mmctx_data(0x0002c4, 1) ++mmctx_data(0x0004bc, 1) ++mmctx_data(0x0006e0, 1) ++nvc3_tpc_mmio_tail: ++mmctx_data(0x000544, 1) ++nvc1_tpc_mmio_tail: ++ ++ ++.section nvc0_grgpc_code ++bra init ++define(`include_code') ++include(`nvc0_graph.fuc') ++ ++// reports an exception to the host ++// ++// In: $r15 error code (see nvc0_graph.fuc) ++// ++error: ++ push $r14 ++ mov $r14 -0x67ec // 0x9814 ++ sethi $r14 0x400000 ++ call nv_wr32 // HUB_CTXCTL_CC_SCRATCH[5] = error code ++ add b32 $r14 0x41c ++ mov $r15 1 ++ call nv_wr32 // HUB_CTXCTL_INTR_UP_SET ++ pop $r14 ++ ret ++ ++// GPC fuc initialisation, executed by triggering ucode start, will ++// fall through to main loop after completion. ++// ++// Input: ++// CC_SCRATCH[0]: chipset (PMC_BOOT_0 read returns 0x0bad0bad... sigh) ++// CC_SCRATCH[1]: context base ++// ++// Output: ++// CC_SCRATCH[0]: ++// 31:31: set to signal completion ++// CC_SCRATCH[1]: ++// 31:0: GPC context size ++// ++init: ++ clear b32 $r0 ++ mov $sp $r0 ++ ++ // enable fifo access ++ mov $r1 0x1200 ++ mov $r2 2 ++ iowr I[$r1 + 0x000] $r2 // FIFO_ENABLE ++ ++ // setup i0 handler, and route all interrupts to it ++ mov $r1 ih ++ mov $iv0 $r1 ++ mov $r1 0x400 ++ iowr I[$r1 + 0x300] $r0 // INTR_DISPATCH ++ ++ // enable fifo interrupt ++ mov $r2 4 ++ iowr I[$r1 + 0x000] $r2 // INTR_EN_SET ++ ++ // enable interrupts ++ bset $flags ie0 ++ ++ // figure out which GPC we are, and how many TPCs we have ++ mov $r1 0x608 ++ shl b32 $r1 6 ++ iord $r2 I[$r1 + 0x000] // UNITS ++ mov $r3 1 ++ and $r2 0x1f ++ shl b32 $r3 $r2 ++ sub b32 $r3 1 ++ st b32 D[$r0 + tpc_count] $r2 ++ st b32 D[$r0 + tpc_mask] $r3 ++ add b32 $r1 0x400 ++ iord $r2 I[$r1 + 0x000] // MYINDEX ++ st b32 D[$r0 + gpc_id] $r2 ++ ++ // find context data for this chipset ++ mov $r2 0x800 ++ shl b32 $r2 6 ++ iord $r2 I[$r2 + 0x000] // CC_SCRATCH[0] ++ mov $r1 chipsets - 12 ++ init_find_chipset: ++ add b32 $r1 12 ++ ld b32 $r3 D[$r1 + 0x00] ++ cmpu b32 $r3 $r2 ++ bra e init_context ++ cmpu b32 $r3 0 ++ bra ne init_find_chipset ++ // unknown chipset ++ ret ++ ++ // initialise context base, and size tracking ++ init_context: ++ mov $r2 0x800 ++ shl b32 $r2 6 ++ iord $r2 I[$r2 + 0x100] // CC_SCRATCH[1], initial base ++ clear b32 $r3 // track GPC context size here ++ ++ // set mmctx base addresses now so we don't have to do it later, ++ // they don't currently ever change ++ mov $r4 0x700 ++ shl b32 $r4 6 ++ shr b32 $r5 $r2 8 ++ iowr I[$r4 + 0x000] $r5 // MMCTX_SAVE_SWBASE ++ iowr I[$r4 + 0x100] $r5 // MMCTX_LOAD_SWBASE ++ ++ // calculate GPC mmio context size, store the chipset-specific ++ // mmio list pointers somewhere we can get at them later without ++ // re-parsing the chipset list ++ clear b32 $r14 ++ clear b32 $r15 ++ ld b16 $r14 D[$r1 + 4] ++ ld b16 $r15 D[$r1 + 6] ++ st b16 D[$r0 + gpc_mmio_list_head] $r14 ++ st b16 D[$r0 + gpc_mmio_list_tail] $r15 ++ call mmctx_size ++ add b32 $r2 $r15 ++ add b32 $r3 $r15 ++ ++ // calculate per-TPC mmio context size, store the list pointers ++ ld b16 $r14 D[$r1 + 8] ++ ld b16 $r15 D[$r1 + 10] ++ st b16 D[$r0 + tpc_mmio_list_head] $r14 ++ st b16 D[$r0 + tpc_mmio_list_tail] $r15 ++ call mmctx_size ++ ld b32 $r14 D[$r0 + tpc_count] ++ mulu $r14 $r15 ++ add b32 $r2 $r14 ++ add b32 $r3 $r14 ++ ++ // round up base/size to 256 byte boundary (for strand SWBASE) ++ add b32 $r4 0x1300 ++ shr b32 $r3 2 ++ iowr I[$r4 + 0x000] $r3 // MMCTX_LOAD_COUNT, wtf for?!? ++ shr b32 $r2 8 ++ shr b32 $r3 6 ++ add b32 $r2 1 ++ add b32 $r3 1 ++ shl b32 $r2 8 ++ shl b32 $r3 8 ++ ++ // calculate size of strand context data ++ mov b32 $r15 $r2 ++ call strand_ctx_init ++ add b32 $r3 $r15 ++ ++ // save context size, and tell HUB we're done ++ mov $r1 0x800 ++ shl b32 $r1 6 ++ iowr I[$r1 + 0x100] $r3 // CC_SCRATCH[1] = context size ++ add b32 $r1 0x800 ++ clear b32 $r2 ++ bset $r2 31 ++ iowr I[$r1 + 0x000] $r2 // CC_SCRATCH[0] |= 0x80000000 ++ ++// Main program loop, very simple, sleeps until woken up by the interrupt ++// handler, pulls a command from the queue and executes its handler ++// ++main: ++ bset $flags $p0 ++ sleep $p0 ++ mov $r13 cmd_queue ++ call queue_get ++ bra $p1 main ++ ++ // 0x0000-0x0003 are all context transfers ++ cmpu b32 $r14 0x04 ++ bra nc main_not_ctx_xfer ++ // fetch $flags and mask off $p1/$p2 ++ mov $r1 $flags ++ mov $r2 0x0006 ++ not b32 $r2 ++ and $r1 $r2 ++ // set $p1/$p2 according to transfer type ++ shl b32 $r14 1 ++ or $r1 $r14 ++ mov $flags $r1 ++ // transfer context data ++ call ctx_xfer ++ bra main ++ ++ main_not_ctx_xfer: ++ shl b32 $r15 $r14 16 ++ or $r15 E_BAD_COMMAND ++ call error ++ bra main ++ ++// interrupt handler ++ih: ++ push $r8 ++ mov $r8 $flags ++ push $r8 ++ push $r9 ++ push $r10 ++ push $r11 ++ push $r13 ++ push $r14 ++ push $r15 ++ ++ // incoming fifo command? ++ iord $r10 I[$r0 + 0x200] // INTR ++ and $r11 $r10 0x00000004 ++ bra e ih_no_fifo ++ // queue incoming fifo command for later processing ++ mov $r11 0x1900 ++ mov $r13 cmd_queue ++ iord $r14 I[$r11 + 0x100] // FIFO_CMD ++ iord $r15 I[$r11 + 0x000] // FIFO_DATA ++ call queue_put ++ add b32 $r11 0x400 ++ mov $r14 1 ++ iowr I[$r11 + 0x000] $r14 // FIFO_ACK ++ ++ // ack, and wake up main() ++ ih_no_fifo: ++ iowr I[$r0 + 0x100] $r10 // INTR_ACK ++ ++ pop $r15 ++ pop $r14 ++ pop $r13 ++ pop $r11 ++ pop $r10 ++ pop $r9 ++ pop $r8 ++ mov $flags $r8 ++ pop $r8 ++ bclr $flags $p0 ++ iret ++ ++// Set this GPC's bit in HUB_BAR, used to signal completion of various ++// activities to the HUB fuc ++// ++hub_barrier_done: ++ mov $r15 1 ++ ld b32 $r14 D[$r0 + gpc_id] ++ shl b32 $r15 $r14 ++ mov $r14 -0x6be8 // 0x409418 - HUB_BAR_SET ++ sethi $r14 0x400000 ++ call nv_wr32 ++ ret ++ ++// Disables various things, waits a bit, and re-enables them.. ++// ++// Not sure how exactly this helps, perhaps "ENABLE" is not such a ++// good description for the bits we turn off? Anyways, without this, ++// funny things happen. ++// ++ctx_redswitch: ++ mov $r14 0x614 ++ shl b32 $r14 6 ++ mov $r15 0x020 ++ iowr I[$r14] $r15 // GPC_RED_SWITCH = POWER ++ mov $r15 8 ++ ctx_redswitch_delay: ++ sub b32 $r15 1 ++ bra ne ctx_redswitch_delay ++ mov $r15 0xa20 ++ iowr I[$r14] $r15 // GPC_RED_SWITCH = UNK11, ENABLE, POWER ++ ret ++ ++// Transfer GPC context data between GPU and storage area ++// ++// In: $r15 context base address ++// $p1 clear on save, set on load ++// $p2 set if opposite direction done/will be done, so: ++// on save it means: "a load will follow this save" ++// on load it means: "a save preceeded this load" ++// ++ctx_xfer: ++ // set context base address ++ mov $r1 0xa04 ++ shl b32 $r1 6 ++ iowr I[$r1 + 0x000] $r15// MEM_BASE ++ bra not $p1 ctx_xfer_not_load ++ call ctx_redswitch ++ ctx_xfer_not_load: ++ ++ // strands ++ mov $r1 0x4afc ++ sethi $r1 0x20000 ++ mov $r2 0xc ++ iowr I[$r1] $r2 // STRAND_CMD(0x3f) = 0x0c ++ call strand_wait ++ mov $r2 0x47fc ++ sethi $r2 0x20000 ++ iowr I[$r2] $r0 // STRAND_FIRST_GENE(0x3f) = 0x00 ++ xbit $r2 $flags $p1 ++ add b32 $r2 3 ++ iowr I[$r1] $r2 // STRAND_CMD(0x3f) = 0x03/0x04 (SAVE/LOAD) ++ ++ // mmio context ++ xbit $r10 $flags $p1 // direction ++ or $r10 2 // first ++ mov $r11 0x0000 ++ sethi $r11 0x500000 ++ ld b32 $r12 D[$r0 + gpc_id] ++ shl b32 $r12 15 ++ add b32 $r11 $r12 // base = NV_PGRAPH_GPCn ++ ld b32 $r12 D[$r0 + gpc_mmio_list_head] ++ ld b32 $r13 D[$r0 + gpc_mmio_list_tail] ++ mov $r14 0 // not multi ++ call mmctx_xfer ++ ++ // per-TPC mmio context ++ xbit $r10 $flags $p1 // direction ++ or $r10 4 // last ++ mov $r11 0x4000 ++ sethi $r11 0x500000 // base = NV_PGRAPH_GPC0_TPC0 ++ ld b32 $r12 D[$r0 + gpc_id] ++ shl b32 $r12 15 ++ add b32 $r11 $r12 // base = NV_PGRAPH_GPCn_TPC0 ++ ld b32 $r12 D[$r0 + tpc_mmio_list_head] ++ ld b32 $r13 D[$r0 + tpc_mmio_list_tail] ++ ld b32 $r15 D[$r0 + tpc_mask] ++ mov $r14 0x800 // stride = 0x800 ++ call mmctx_xfer ++ ++ // wait for strands to finish ++ call strand_wait ++ ++ // if load, or a save without a load following, do some ++ // unknown stuff that's done after finishing a block of ++ // strand commands ++ bra $p1 ctx_xfer_post ++ bra not $p2 ctx_xfer_done ++ ctx_xfer_post: ++ mov $r1 0x4afc ++ sethi $r1 0x20000 ++ mov $r2 0xd ++ iowr I[$r1] $r2 // STRAND_CMD(0x3f) = 0x0d ++ call strand_wait ++ ++ // mark completion in HUB's barrier ++ ctx_xfer_done: ++ call hub_barrier_done ++ ret ++ ++.align 256 +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h 2011-06-26 07:59:23.000000000 +0200 +@@ -0,0 +1,483 @@ ++uint32_t nvc0_grgpc_data[] = { ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x000000c0, ++ 0x011000b0, ++ 0x01640114, ++ 0x000000c1, ++ 0x011400b0, ++ 0x01780114, ++ 0x000000c3, ++ 0x011000b0, ++ 0x01740114, ++ 0x000000c4, ++ 0x011000b0, ++ 0x01740114, ++ 0x000000c8, ++ 0x011000b0, ++ 0x01640114, ++ 0x000000ce, ++ 0x011000b0, ++ 0x01740114, ++ 0x00000000, ++ 0x00000380, ++ 0x14000400, ++ 0x20000450, ++ 0x00000600, ++ 0x00000684, ++ 0x10000700, ++ 0x00000800, ++ 0x08000808, ++ 0x00000828, ++ 0x00000830, ++ 0x000008d8, ++ 0x000008e0, ++ 0x140008e8, ++ 0x0000091c, ++ 0x08000924, ++ 0x00000b00, ++ 0x14000b08, ++ 0x00000bb8, ++ 0x00000c08, ++ 0x1c000c10, ++ 0x00000c80, ++ 0x00000c8c, ++ 0x08001000, ++ 0x00001014, ++ 0x00000c6c, ++ 0x00000018, ++ 0x0000003c, ++ 0x00000048, ++ 0x00000064, ++ 0x00000088, ++ 0x14000200, ++ 0x0400021c, ++ 0x14000300, ++ 0x000003d0, ++ 0x040003e0, ++ 0x08000400, ++ 0x00000420, ++ 0x000004b0, ++ 0x000004e8, ++ 0x000004f4, ++ 0x04000520, ++ 0x0c000604, ++ 0x4c000644, ++ 0x00000698, ++ 0x04000750, ++ 0x00000758, ++ 0x000002c4, ++ 0x000004bc, ++ 0x000006e0, ++ 0x00000544, ++}; ++ ++uint32_t nvc0_grgpc_code[] = { ++ 0x03060ef5, ++ 0x9800d898, ++ 0x86f001d9, ++ 0x0489b808, ++ 0xf00c1bf4, ++ 0x21f502f7, ++ 0x00f802ec, ++ 0xb60798c4, ++ 0x8dbb0384, ++ 0x0880b600, ++ 0x80008e80, ++ 0x90b6018f, ++ 0x0f94f001, ++ 0xf801d980, ++ 0x0131f400, ++ 0x9800d898, ++ 0x89b801d9, ++ 0x210bf404, ++ 0xb60789c4, ++ 0x9dbb0394, ++ 0x0890b600, ++ 0x98009e98, ++ 0x80b6019f, ++ 0x0f84f001, ++ 0xf400d880, ++ 0x00f80132, ++ 0x0728b7f1, ++ 0xb906b4b6, ++ 0xc9f002ec, ++ 0x00bcd01f, ++ 0xc800bccf, ++ 0x1bf41fcc, ++ 0x06a7f0fa, ++ 0x010321f5, ++ 0xf840bfcf, ++ 0x28b7f100, ++ 0x06b4b607, ++ 0xb980bfd0, ++ 0xc9f002ec, ++ 0x1ec9f01f, ++ 0xcf00bcd0, ++ 0xccc800bc, ++ 0xfa1bf41f, ++ 0x87f100f8, ++ 0x84b60430, ++ 0x1ff9f006, ++ 0xf8008fd0, ++ 0x3087f100, ++ 0x0684b604, ++ 0xf80080d0, ++ 0x3c87f100, ++ 0x0684b608, ++ 0x99f094bd, ++ 0x0089d000, ++ 0x081887f1, ++ 0xd00684b6, ++ 0x87f1008a, ++ 0x84b60400, ++ 0x0088cf06, ++ 0xf4888aff, ++ 0x87f1f31b, ++ 0x84b6085c, ++ 0xf094bd06, ++ 0x89d00099, ++ 0xf100f800, ++ 0xb6083c87, ++ 0x94bd0684, ++ 0xd00099f0, ++ 0x87f10089, ++ 0x84b60818, ++ 0x008ad006, ++ 0x040087f1, ++ 0xcf0684b6, ++ 0x8aff0088, ++ 0xf30bf488, ++ 0x085c87f1, ++ 0xbd0684b6, ++ 0x0099f094, ++ 0xf80089d0, ++ 0x9894bd00, ++ 0x85b600e8, ++ 0x0180b61a, ++ 0xbb0284b6, ++ 0xe0b60098, ++ 0x04efb804, ++ 0xb9eb1bf4, ++ 0x00f8029f, ++ 0x083c87f1, ++ 0xbd0684b6, ++ 0x0199f094, ++ 0xf10089d0, ++ 0xb6071087, ++ 0x94bd0684, ++ 0xf405bbfd, ++ 0x8bd0090b, ++ 0x0099f000, ++ 0xf405eefd, ++ 0x8ed00c0b, ++ 0xc08fd080, ++ 0xb70199f0, ++ 0xc8010080, ++ 0xb4b600ab, ++ 0x0cb9f010, ++ 0xb601aec8, ++ 0xbefd11e4, ++ 0x008bd005, ++ 0xf0008ecf, ++ 0x0bf41fe4, ++ 0x00ce98fa, ++ 0xd005e9fd, ++ 0xc0b6c08e, ++ 0x04cdb804, ++ 0xc8e81bf4, ++ 0x1bf402ab, ++ 0x008bcf18, ++ 0xb01fb4f0, ++ 0x1bf410b4, ++ 0x02a7f0f7, ++ 0xf4c921f4, ++ 0xabc81b0e, ++ 0x10b4b600, ++ 0xf00cb9f0, ++ 0x8bd012b9, ++ 0x008bcf00, ++ 0xf412bbc8, ++ 0x87f1fa1b, ++ 0x84b6085c, ++ 0xf094bd06, ++ 0x89d00199, ++ 0xf900f800, ++ 0x02a7f0a0, ++ 0xfcc921f4, ++ 0xf100f8a0, ++ 0xf04afc87, ++ 0x97f00283, ++ 0x0089d00c, ++ 0x020721f5, ++ 0x87f100f8, ++ 0x83f04afc, ++ 0x0d97f002, ++ 0xf50089d0, ++ 0xf8020721, ++ 0xfca7f100, ++ 0x02a3f04f, ++ 0x0500aba2, ++ 0xd00fc7f0, ++ 0xc7f000ac, ++ 0x00bcd00b, ++ 0x020721f5, ++ 0xf000aed0, ++ 0xbcd00ac7, ++ 0x0721f500, ++ 0xf100f802, ++ 0xb6083c87, ++ 0x94bd0684, ++ 0xd00399f0, ++ 0x21f50089, ++ 0xe7f00213, ++ 0x3921f503, ++ 0xfca7f102, ++ 0x02a3f046, ++ 0x0400aba0, ++ 0xf040a0d0, ++ 0xbcd001c7, ++ 0x0721f500, ++ 0x010c9202, ++ 0xf000acd0, ++ 0xbcd002c7, ++ 0x0721f500, ++ 0x2621f502, ++ 0x8087f102, ++ 0x0684b608, ++ 0xb70089cf, ++ 0x95220080, ++ 0x8ed008fe, ++ 0x408ed000, ++ 0xb6808acf, ++ 0xa0b606a5, ++ 0x00eabb01, ++ 0xb60480b6, ++ 0x1bf40192, ++ 0x08e4b6e8, ++ 0xf1f2efbc, ++ 0xb6085c87, ++ 0x94bd0684, ++ 0xd00399f0, ++ 0x00f80089, ++ 0xe7f1e0f9, ++ 0xe3f09814, ++ 0x8d21f440, ++ 0x041ce0b7, ++ 0xf401f7f0, ++ 0xe0fc8d21, ++ 0x04bd00f8, ++ 0xf10004fe, ++ 0xf0120017, ++ 0x12d00227, ++ 0x3e17f100, ++ 0x0010fe04, ++ 0x040017f1, ++ 0xf0c010d0, ++ 0x12d00427, ++ 0x1031f400, ++ 0x060817f1, ++ 0xcf0614b6, ++ 0x37f00012, ++ 0x1f24f001, ++ 0xb60432bb, ++ 0x02800132, ++ 0x04038003, ++ 0x040010b7, ++ 0x800012cf, ++ 0x27f10002, ++ 0x24b60800, ++ 0x0022cf06, ++ 0xb65817f0, ++ 0x13980c10, ++ 0x0432b800, ++ 0xb00b0bf4, ++ 0x1bf40034, ++ 0xf100f8f1, ++ 0xb6080027, ++ 0x22cf0624, ++ 0xf134bd40, ++ 0xb6070047, ++ 0x25950644, ++ 0x0045d008, ++ 0xbd4045d0, ++ 0x58f4bde4, ++ 0x1f58021e, ++ 0x020e4003, ++ 0xf5040f40, ++ 0xbb013d21, ++ 0x3fbb002f, ++ 0x041e5800, ++ 0x40051f58, ++ 0x0f400a0e, ++ 0x3d21f50c, ++ 0x030e9801, ++ 0xbb00effd, ++ 0x3ebb002e, ++ 0x0040b700, ++ 0x0235b613, ++ 0xb60043d0, ++ 0x35b60825, ++ 0x0120b606, ++ 0xb60130b6, ++ 0x34b60824, ++ 0x022fb908, ++ 0x026321f5, ++ 0xf1003fbb, ++ 0xb6080017, ++ 0x13d00614, ++ 0x0010b740, ++ 0xf024bd08, ++ 0x12d01f29, ++ 0x0031f400, ++ 0xf00028f4, ++ 0x21f41cd7, ++ 0xf401f439, ++ 0xf404e4b0, ++ 0x81fe1e18, ++ 0x0627f001, ++ 0x12fd20bd, ++ 0x01e4b604, ++ 0xfe051efd, ++ 0x21f50018, ++ 0x0ef404c3, ++ 0x10ef94d3, ++ 0xf501f5f0, ++ 0xf402ec21, ++ 0x80f9c60e, ++ 0xf90188fe, ++ 0xf990f980, ++ 0xf9b0f9a0, ++ 0xf9e0f9d0, ++ 0x800acff0, ++ 0xf404abc4, ++ 0xb7f11d0b, ++ 0xd7f01900, ++ 0x40becf1c, ++ 0xf400bfcf, ++ 0xb0b70421, ++ 0xe7f00400, ++ 0x00bed001, ++ 0xfc400ad0, ++ 0xfce0fcf0, ++ 0xfcb0fcd0, ++ 0xfc90fca0, ++ 0x0088fe80, ++ 0x32f480fc, ++ 0xf001f800, ++ 0x0e9801f7, ++ 0x04febb00, ++ 0x9418e7f1, ++ 0xf440e3f0, ++ 0x00f88d21, ++ 0x0614e7f1, ++ 0xf006e4b6, ++ 0xefd020f7, ++ 0x08f7f000, ++ 0xf401f2b6, ++ 0xf7f1fd1b, ++ 0xefd00a20, ++ 0xf100f800, ++ 0xb60a0417, ++ 0x1fd00614, ++ 0x0711f400, ++ 0x04a421f5, ++ 0x4afc17f1, ++ 0xf00213f0, ++ 0x12d00c27, ++ 0x0721f500, ++ 0xfc27f102, ++ 0x0223f047, ++ 0xf00020d0, ++ 0x20b6012c, ++ 0x0012d003, ++ 0xf001acf0, ++ 0xb7f002a5, ++ 0x50b3f000, ++ 0xb6000c98, ++ 0xbcbb0fc4, ++ 0x010c9800, ++ 0xf0020d98, ++ 0x21f500e7, ++ 0xacf0015c, ++ 0x04a5f001, ++ 0x4000b7f1, ++ 0x9850b3f0, ++ 0xc4b6000c, ++ 0x00bcbb0f, ++ 0x98050c98, ++ 0x0f98060d, ++ 0x00e7f104, ++ 0x5c21f508, ++ 0x0721f501, ++ 0x0601f402, ++ 0xf11412f4, ++ 0xf04afc17, ++ 0x27f00213, ++ 0x0012d00d, ++ 0x020721f5, ++ 0x048f21f5, ++ 0x000000f8, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++}; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grhub.fuc linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grhub.fuc +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grhub.fuc 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grhub.fuc 2011-06-26 07:59:23.000000000 +0200 +@@ -0,0 +1,808 @@ ++/* fuc microcode for nvc0 PGRAPH/HUB ++ * ++ * Copyright 2011 Red Hat Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: Ben Skeggs ++ */ ++ ++/* To build: ++ * m4 nvc0_grhub.fuc | envyas -a -w -m fuc -V nva3 -o nvc0_grhub.fuc.h ++ */ ++ ++.section nvc0_grhub_data ++include(`nvc0_graph.fuc') ++gpc_count: .b32 0 ++rop_count: .b32 0 ++cmd_queue: queue_init ++hub_mmio_list_head: .b32 0 ++hub_mmio_list_tail: .b32 0 ++ ++ctx_current: .b32 0 ++ ++chipsets: ++.b8 0xc0 0 0 0 ++.b16 nvc0_hub_mmio_head ++.b16 nvc0_hub_mmio_tail ++.b8 0xc1 0 0 0 ++.b16 nvc0_hub_mmio_head ++.b16 nvc1_hub_mmio_tail ++.b8 0xc3 0 0 0 ++.b16 nvc0_hub_mmio_head ++.b16 nvc0_hub_mmio_tail ++.b8 0xc4 0 0 0 ++.b16 nvc0_hub_mmio_head ++.b16 nvc0_hub_mmio_tail ++.b8 0xc8 0 0 0 ++.b16 nvc0_hub_mmio_head ++.b16 nvc0_hub_mmio_tail ++.b8 0xce 0 0 0 ++.b16 nvc0_hub_mmio_head ++.b16 nvc0_hub_mmio_tail ++.b8 0 0 0 0 ++ ++nvc0_hub_mmio_head: ++mmctx_data(0x17e91c, 2) ++mmctx_data(0x400204, 2) ++mmctx_data(0x404004, 11) ++mmctx_data(0x404044, 1) ++mmctx_data(0x404094, 14) ++mmctx_data(0x4040d0, 7) ++mmctx_data(0x4040f8, 1) ++mmctx_data(0x404130, 3) ++mmctx_data(0x404150, 3) ++mmctx_data(0x404164, 2) ++mmctx_data(0x404174, 3) ++mmctx_data(0x404200, 8) ++mmctx_data(0x404404, 14) ++mmctx_data(0x404460, 4) ++mmctx_data(0x404480, 1) ++mmctx_data(0x404498, 1) ++mmctx_data(0x404604, 4) ++mmctx_data(0x404618, 32) ++mmctx_data(0x404698, 21) ++mmctx_data(0x4046f0, 2) ++mmctx_data(0x404700, 22) ++mmctx_data(0x405800, 1) ++mmctx_data(0x405830, 3) ++mmctx_data(0x405854, 1) ++mmctx_data(0x405870, 4) ++mmctx_data(0x405a00, 2) ++mmctx_data(0x405a18, 1) ++mmctx_data(0x406020, 1) ++mmctx_data(0x406028, 4) ++mmctx_data(0x4064a8, 2) ++mmctx_data(0x4064b4, 2) ++mmctx_data(0x407804, 1) ++mmctx_data(0x40780c, 6) ++mmctx_data(0x4078bc, 1) ++mmctx_data(0x408000, 7) ++mmctx_data(0x408064, 1) ++mmctx_data(0x408800, 3) ++mmctx_data(0x408900, 4) ++mmctx_data(0x408980, 1) ++nvc0_hub_mmio_tail: ++mmctx_data(0x4064c0, 2) ++nvc1_hub_mmio_tail: ++ ++.align 256 ++chan_data: ++chan_mmio_count: .b32 0 ++chan_mmio_address: .b32 0 ++ ++.align 256 ++xfer_data: .b32 0 ++ ++.section nvc0_grhub_code ++bra init ++define(`include_code') ++include(`nvc0_graph.fuc') ++ ++// reports an exception to the host ++// ++// In: $r15 error code (see nvc0_graph.fuc) ++// ++error: ++ push $r14 ++ mov $r14 0x814 ++ shl b32 $r14 6 ++ iowr I[$r14 + 0x000] $r15 // CC_SCRATCH[5] = error code ++ mov $r14 0xc1c ++ shl b32 $r14 6 ++ mov $r15 1 ++ iowr I[$r14 + 0x000] $r15 // INTR_UP_SET ++ pop $r14 ++ ret ++ ++// HUB fuc initialisation, executed by triggering ucode start, will ++// fall through to main loop after completion. ++// ++// Input: ++// CC_SCRATCH[0]: chipset (PMC_BOOT_0 read returns 0x0bad0bad... sigh) ++// ++// Output: ++// CC_SCRATCH[0]: ++// 31:31: set to signal completion ++// CC_SCRATCH[1]: ++// 31:0: total PGRAPH context size ++// ++init: ++ clear b32 $r0 ++ mov $sp $r0 ++ mov $xdbase $r0 ++ ++ // enable fifo access ++ mov $r1 0x1200 ++ mov $r2 2 ++ iowr I[$r1 + 0x000] $r2 // FIFO_ENABLE ++ ++ // setup i0 handler, and route all interrupts to it ++ mov $r1 ih ++ mov $iv0 $r1 ++ mov $r1 0x400 ++ iowr I[$r1 + 0x300] $r0 // INTR_DISPATCH ++ ++ // route HUB_CHANNEL_SWITCH to fuc interrupt 8 ++ mov $r3 0x404 ++ shl b32 $r3 6 ++ mov $r2 0x2003 // { HUB_CHANNEL_SWITCH, ZERO } -> intr 8 ++ iowr I[$r3 + 0x000] $r2 ++ ++ // not sure what these are, route them because NVIDIA does, and ++ // the IRQ handler will signal the host if we ever get one.. we ++ // may find out if/why we need to handle these if so.. ++ // ++ mov $r2 0x2004 ++ iowr I[$r3 + 0x004] $r2 // { 0x04, ZERO } -> intr 9 ++ mov $r2 0x200b ++ iowr I[$r3 + 0x008] $r2 // { 0x0b, ZERO } -> intr 10 ++ mov $r2 0x200c ++ iowr I[$r3 + 0x01c] $r2 // { 0x0c, ZERO } -> intr 15 ++ ++ // enable all INTR_UP interrupts ++ mov $r2 0xc24 ++ shl b32 $r2 6 ++ not b32 $r3 $r0 ++ iowr I[$r2] $r3 ++ ++ // enable fifo, ctxsw, 9, 10, 15 interrupts ++ mov $r2 -0x78fc // 0x8704 ++ sethi $r2 0 ++ iowr I[$r1 + 0x000] $r2 // INTR_EN_SET ++ ++ // fifo level triggered, rest edge ++ sub b32 $r1 0x100 ++ mov $r2 4 ++ iowr I[$r1] $r2 ++ ++ // enable interrupts ++ bset $flags ie0 ++ ++ // fetch enabled GPC/ROP counts ++ mov $r14 -0x69fc // 0x409604 ++ sethi $r14 0x400000 ++ call nv_rd32 ++ extr $r1 $r15 16:20 ++ st b32 D[$r0 + rop_count] $r1 ++ and $r15 0x1f ++ st b32 D[$r0 + gpc_count] $r15 ++ ++ // set BAR_REQMASK to GPC mask ++ mov $r1 1 ++ shl b32 $r1 $r15 ++ sub b32 $r1 1 ++ mov $r2 0x40c ++ shl b32 $r2 6 ++ iowr I[$r2 + 0x000] $r1 ++ iowr I[$r2 + 0x100] $r1 ++ ++ // find context data for this chipset ++ mov $r2 0x800 ++ shl b32 $r2 6 ++ iord $r2 I[$r2 + 0x000] // CC_SCRATCH[0] ++ mov $r15 chipsets - 8 ++ init_find_chipset: ++ add b32 $r15 8 ++ ld b32 $r3 D[$r15 + 0x00] ++ cmpu b32 $r3 $r2 ++ bra e init_context ++ cmpu b32 $r3 0 ++ bra ne init_find_chipset ++ // unknown chipset ++ ret ++ ++ // context size calculation, reserve first 256 bytes for use by fuc ++ init_context: ++ mov $r1 256 ++ ++ // calculate size of mmio context data ++ ld b16 $r14 D[$r15 + 4] ++ ld b16 $r15 D[$r15 + 6] ++ sethi $r14 0 ++ st b32 D[$r0 + hub_mmio_list_head] $r14 ++ st b32 D[$r0 + hub_mmio_list_tail] $r15 ++ call mmctx_size ++ ++ // set mmctx base addresses now so we don't have to do it later, ++ // they don't (currently) ever change ++ mov $r3 0x700 ++ shl b32 $r3 6 ++ shr b32 $r4 $r1 8 ++ iowr I[$r3 + 0x000] $r4 // MMCTX_SAVE_SWBASE ++ iowr I[$r3 + 0x100] $r4 // MMCTX_LOAD_SWBASE ++ add b32 $r3 0x1300 ++ add b32 $r1 $r15 ++ shr b32 $r15 2 ++ iowr I[$r3 + 0x000] $r15 // MMCTX_LOAD_COUNT, wtf for?!? ++ ++ // strands, base offset needs to be aligned to 256 bytes ++ shr b32 $r1 8 ++ add b32 $r1 1 ++ shl b32 $r1 8 ++ mov b32 $r15 $r1 ++ call strand_ctx_init ++ add b32 $r1 $r15 ++ ++ // initialise each GPC in sequence by passing in the offset of its ++ // context data in GPCn_CC_SCRATCH[1], and starting its FUC (which ++ // has previously been uploaded by the host) running. ++ // ++ // the GPC fuc init sequence will set GPCn_CC_SCRATCH[0] bit 31 ++ // when it has completed, and return the size of its context data ++ // in GPCn_CC_SCRATCH[1] ++ // ++ ld b32 $r3 D[$r0 + gpc_count] ++ mov $r4 0x2000 ++ sethi $r4 0x500000 ++ init_gpc: ++ // setup, and start GPC ucode running ++ add b32 $r14 $r4 0x804 ++ mov b32 $r15 $r1 ++ call nv_wr32 // CC_SCRATCH[1] = ctx offset ++ add b32 $r14 $r4 0x800 ++ mov b32 $r15 $r2 ++ call nv_wr32 // CC_SCRATCH[0] = chipset ++ add b32 $r14 $r4 0x10c ++ clear b32 $r15 ++ call nv_wr32 ++ add b32 $r14 $r4 0x104 ++ call nv_wr32 // ENTRY ++ add b32 $r14 $r4 0x100 ++ mov $r15 2 // CTRL_START_TRIGGER ++ call nv_wr32 // CTRL ++ ++ // wait for it to complete, and adjust context size ++ add b32 $r14 $r4 0x800 ++ init_gpc_wait: ++ call nv_rd32 ++ xbit $r15 $r15 31 ++ bra e init_gpc_wait ++ add b32 $r14 $r4 0x804 ++ call nv_rd32 ++ add b32 $r1 $r15 ++ ++ // next! ++ add b32 $r4 0x8000 ++ sub b32 $r3 1 ++ bra ne init_gpc ++ ++ // save context size, and tell host we're ready ++ mov $r2 0x800 ++ shl b32 $r2 6 ++ iowr I[$r2 + 0x100] $r1 // CC_SCRATCH[1] = context size ++ add b32 $r2 0x800 ++ clear b32 $r1 ++ bset $r1 31 ++ iowr I[$r2 + 0x000] $r1 // CC_SCRATCH[0] |= 0x80000000 ++ ++// Main program loop, very simple, sleeps until woken up by the interrupt ++// handler, pulls a command from the queue and executes its handler ++// ++main: ++ // sleep until we have something to do ++ bset $flags $p0 ++ sleep $p0 ++ mov $r13 cmd_queue ++ call queue_get ++ bra $p1 main ++ ++ // context switch, requested by GPU? ++ cmpu b32 $r14 0x4001 ++ bra ne main_not_ctx_switch ++ trace_set(T_AUTO) ++ mov $r1 0xb00 ++ shl b32 $r1 6 ++ iord $r2 I[$r1 + 0x100] // CHAN_NEXT ++ iord $r1 I[$r1 + 0x000] // CHAN_CUR ++ ++ xbit $r3 $r1 31 ++ bra e chsw_no_prev ++ xbit $r3 $r2 31 ++ bra e chsw_prev_no_next ++ push $r2 ++ mov b32 $r2 $r1 ++ trace_set(T_SAVE) ++ bclr $flags $p1 ++ bset $flags $p2 ++ call ctx_xfer ++ trace_clr(T_SAVE); ++ pop $r2 ++ trace_set(T_LOAD); ++ bset $flags $p1 ++ call ctx_xfer ++ trace_clr(T_LOAD); ++ bra chsw_done ++ chsw_prev_no_next: ++ push $r2 ++ mov b32 $r2 $r1 ++ bclr $flags $p1 ++ bclr $flags $p2 ++ call ctx_xfer ++ pop $r2 ++ mov $r1 0xb00 ++ shl b32 $r1 6 ++ iowr I[$r1] $r2 ++ bra chsw_done ++ chsw_no_prev: ++ xbit $r3 $r2 31 ++ bra e chsw_done ++ bset $flags $p1 ++ bclr $flags $p2 ++ call ctx_xfer ++ ++ // ack the context switch request ++ chsw_done: ++ mov $r1 0xb0c ++ shl b32 $r1 6 ++ mov $r2 1 ++ iowr I[$r1 + 0x000] $r2 // 0x409b0c ++ trace_clr(T_AUTO) ++ bra main ++ ++ // request to set current channel? (*not* a context switch) ++ main_not_ctx_switch: ++ cmpu b32 $r14 0x0001 ++ bra ne main_not_ctx_chan ++ mov b32 $r2 $r15 ++ call ctx_chan ++ bra main_done ++ ++ // request to store current channel context? ++ main_not_ctx_chan: ++ cmpu b32 $r14 0x0002 ++ bra ne main_not_ctx_save ++ trace_set(T_SAVE) ++ bclr $flags $p1 ++ bclr $flags $p2 ++ call ctx_xfer ++ trace_clr(T_SAVE) ++ bra main_done ++ ++ main_not_ctx_save: ++ shl b32 $r15 $r14 16 ++ or $r15 E_BAD_COMMAND ++ call error ++ bra main ++ ++ main_done: ++ mov $r1 0x820 ++ shl b32 $r1 6 ++ clear b32 $r2 ++ bset $r2 31 ++ iowr I[$r1 + 0x000] $r2 // CC_SCRATCH[0] |= 0x80000000 ++ bra main ++ ++// interrupt handler ++ih: ++ push $r8 ++ mov $r8 $flags ++ push $r8 ++ push $r9 ++ push $r10 ++ push $r11 ++ push $r13 ++ push $r14 ++ push $r15 ++ ++ // incoming fifo command? ++ iord $r10 I[$r0 + 0x200] // INTR ++ and $r11 $r10 0x00000004 ++ bra e ih_no_fifo ++ // queue incoming fifo command for later processing ++ mov $r11 0x1900 ++ mov $r13 cmd_queue ++ iord $r14 I[$r11 + 0x100] // FIFO_CMD ++ iord $r15 I[$r11 + 0x000] // FIFO_DATA ++ call queue_put ++ add b32 $r11 0x400 ++ mov $r14 1 ++ iowr I[$r11 + 0x000] $r14 // FIFO_ACK ++ ++ // context switch request? ++ ih_no_fifo: ++ and $r11 $r10 0x00000100 ++ bra e ih_no_ctxsw ++ // enqueue a context switch for later processing ++ mov $r13 cmd_queue ++ mov $r14 0x4001 ++ call queue_put ++ ++ // anything we didn't handle, bring it to the host's attention ++ ih_no_ctxsw: ++ mov $r11 0x104 ++ not b32 $r11 ++ and $r11 $r10 $r11 ++ bra e ih_no_other ++ mov $r10 0xc1c ++ shl b32 $r10 6 ++ iowr I[$r10] $r11 // INTR_UP_SET ++ ++ // ack, and wake up main() ++ ih_no_other: ++ iowr I[$r0 + 0x100] $r10 // INTR_ACK ++ ++ pop $r15 ++ pop $r14 ++ pop $r13 ++ pop $r11 ++ pop $r10 ++ pop $r9 ++ pop $r8 ++ mov $flags $r8 ++ pop $r8 ++ bclr $flags $p0 ++ iret ++ ++// Not real sure, but, MEM_CMD 7 will hang forever if this isn't done ++ctx_4160s: ++ mov $r14 0x4160 ++ sethi $r14 0x400000 ++ mov $r15 1 ++ call nv_wr32 ++ ctx_4160s_wait: ++ call nv_rd32 ++ xbit $r15 $r15 4 ++ bra e ctx_4160s_wait ++ ret ++ ++// Without clearing again at end of xfer, some things cause PGRAPH ++// to hang with STATUS=0x00000007 until it's cleared.. fbcon can ++// still function with it set however... ++ctx_4160c: ++ mov $r14 0x4160 ++ sethi $r14 0x400000 ++ clear b32 $r15 ++ call nv_wr32 ++ ret ++ ++// Again, not real sure ++// ++// In: $r15 value to set 0x404170 to ++// ++ctx_4170s: ++ mov $r14 0x4170 ++ sethi $r14 0x400000 ++ or $r15 0x10 ++ call nv_wr32 ++ ret ++ ++// Waits for a ctx_4170s() call to complete ++// ++ctx_4170w: ++ mov $r14 0x4170 ++ sethi $r14 0x400000 ++ call nv_rd32 ++ and $r15 0x10 ++ bra ne ctx_4170w ++ ret ++ ++// Disables various things, waits a bit, and re-enables them.. ++// ++// Not sure how exactly this helps, perhaps "ENABLE" is not such a ++// good description for the bits we turn off? Anyways, without this, ++// funny things happen. ++// ++ctx_redswitch: ++ mov $r14 0x614 ++ shl b32 $r14 6 ++ mov $r15 0x270 ++ iowr I[$r14] $r15 // HUB_RED_SWITCH = ENABLE_GPC, POWER_ALL ++ mov $r15 8 ++ ctx_redswitch_delay: ++ sub b32 $r15 1 ++ bra ne ctx_redswitch_delay ++ mov $r15 0x770 ++ iowr I[$r14] $r15 // HUB_RED_SWITCH = ENABLE_ALL, POWER_ALL ++ ret ++ ++// Not a clue what this is for, except that unless the value is 0x10, the ++// strand context is saved (and presumably restored) incorrectly.. ++// ++// In: $r15 value to set to (0x00/0x10 are used) ++// ++ctx_86c: ++ mov $r14 0x86c ++ shl b32 $r14 6 ++ iowr I[$r14] $r15 // HUB(0x86c) = val ++ mov $r14 -0x75ec ++ sethi $r14 0x400000 ++ call nv_wr32 // ROP(0xa14) = val ++ mov $r14 -0x5794 ++ sethi $r14 0x410000 ++ call nv_wr32 // GPC(0x86c) = val ++ ret ++ ++// ctx_load - load's a channel's ctxctl data, and selects its vm ++// ++// In: $r2 channel address ++// ++ctx_load: ++ trace_set(T_CHAN) ++ ++ // switch to channel, somewhat magic in parts.. ++ mov $r10 12 // DONE_UNK12 ++ call wait_donez ++ mov $r1 0xa24 ++ shl b32 $r1 6 ++ iowr I[$r1 + 0x000] $r0 // 0x409a24 ++ mov $r3 0xb00 ++ shl b32 $r3 6 ++ iowr I[$r3 + 0x100] $r2 // CHAN_NEXT ++ mov $r1 0xa0c ++ shl b32 $r1 6 ++ mov $r4 7 ++ iowr I[$r1 + 0x000] $r2 // MEM_CHAN ++ iowr I[$r1 + 0x100] $r4 // MEM_CMD ++ ctx_chan_wait_0: ++ iord $r4 I[$r1 + 0x100] ++ and $r4 0x1f ++ bra ne ctx_chan_wait_0 ++ iowr I[$r3 + 0x000] $r2 // CHAN_CUR ++ ++ // load channel header, fetch PGRAPH context pointer ++ mov $xtargets $r0 ++ bclr $r2 31 ++ shl b32 $r2 4 ++ add b32 $r2 2 ++ ++ trace_set(T_LCHAN) ++ mov $r1 0xa04 ++ shl b32 $r1 6 ++ iowr I[$r1 + 0x000] $r2 // MEM_BASE ++ mov $r1 0xa20 ++ shl b32 $r1 6 ++ mov $r2 0x0002 ++ sethi $r2 0x80000000 ++ iowr I[$r1 + 0x000] $r2 // MEM_TARGET = vram ++ mov $r1 0x10 // chan + 0x0210 ++ mov $r2 xfer_data ++ sethi $r2 0x00020000 // 16 bytes ++ xdld $r1 $r2 ++ xdwait ++ trace_clr(T_LCHAN) ++ ++ // update current context ++ ld b32 $r1 D[$r0 + xfer_data + 4] ++ shl b32 $r1 24 ++ ld b32 $r2 D[$r0 + xfer_data + 0] ++ shr b32 $r2 8 ++ or $r1 $r2 ++ st b32 D[$r0 + ctx_current] $r1 ++ ++ // set transfer base to start of context, and fetch context header ++ trace_set(T_LCTXH) ++ mov $r2 0xa04 ++ shl b32 $r2 6 ++ iowr I[$r2 + 0x000] $r1 // MEM_BASE ++ mov $r2 1 ++ mov $r1 0xa20 ++ shl b32 $r1 6 ++ iowr I[$r1 + 0x000] $r2 // MEM_TARGET = vm ++ mov $r1 chan_data ++ sethi $r1 0x00060000 // 256 bytes ++ xdld $r0 $r1 ++ xdwait ++ trace_clr(T_LCTXH) ++ ++ trace_clr(T_CHAN) ++ ret ++ ++// ctx_chan - handler for HUB_SET_CHAN command, will set a channel as ++// the active channel for ctxctl, but not actually transfer ++// any context data. intended for use only during initial ++// context construction. ++// ++// In: $r2 channel address ++// ++ctx_chan: ++ call ctx_4160s ++ call ctx_load ++ mov $r10 12 // DONE_UNK12 ++ call wait_donez ++ mov $r1 0xa10 ++ shl b32 $r1 6 ++ mov $r2 5 ++ iowr I[$r1 + 0x000] $r2 // MEM_CMD = 5 (???) ++ ctx_chan_wait: ++ iord $r2 I[$r1 + 0x000] ++ or $r2 $r2 ++ bra ne ctx_chan_wait ++ call ctx_4160c ++ ret ++ ++// Execute per-context state overrides list ++// ++// Only executed on the first load of a channel. Might want to look into ++// removing this and having the host directly modify the channel's context ++// to change this state... The nouveau DRM already builds this list as ++// it's definitely needed for NVIDIA's, so we may as well use it for now ++// ++// Input: $r1 mmio list length ++// ++ctx_mmio_exec: ++ // set transfer base to be the mmio list ++ ld b32 $r3 D[$r0 + chan_mmio_address] ++ mov $r2 0xa04 ++ shl b32 $r2 6 ++ iowr I[$r2 + 0x000] $r3 // MEM_BASE ++ ++ clear b32 $r3 ++ ctx_mmio_loop: ++ // fetch next 256 bytes of mmio list if necessary ++ and $r4 $r3 0xff ++ bra ne ctx_mmio_pull ++ mov $r5 xfer_data ++ sethi $r5 0x00060000 // 256 bytes ++ xdld $r3 $r5 ++ xdwait ++ ++ // execute a single list entry ++ ctx_mmio_pull: ++ ld b32 $r14 D[$r4 + xfer_data + 0x00] ++ ld b32 $r15 D[$r4 + xfer_data + 0x04] ++ call nv_wr32 ++ ++ // next! ++ add b32 $r3 8 ++ sub b32 $r1 1 ++ bra ne ctx_mmio_loop ++ ++ // set transfer base back to the current context ++ ctx_mmio_done: ++ ld b32 $r3 D[$r0 + ctx_current] ++ iowr I[$r2 + 0x000] $r3 // MEM_BASE ++ ++ // disable the mmio list now, we don't need/want to execute it again ++ st b32 D[$r0 + chan_mmio_count] $r0 ++ mov $r1 chan_data ++ sethi $r1 0x00060000 // 256 bytes ++ xdst $r0 $r1 ++ xdwait ++ ret ++ ++// Transfer HUB context data between GPU and storage area ++// ++// In: $r2 channel address ++// $p1 clear on save, set on load ++// $p2 set if opposite direction done/will be done, so: ++// on save it means: "a load will follow this save" ++// on load it means: "a save preceeded this load" ++// ++ctx_xfer: ++ bra not $p1 ctx_xfer_pre ++ bra $p2 ctx_xfer_pre_load ++ ctx_xfer_pre: ++ mov $r15 0x10 ++ call ctx_86c ++ call ctx_4160s ++ bra not $p1 ctx_xfer_exec ++ ++ ctx_xfer_pre_load: ++ mov $r15 2 ++ call ctx_4170s ++ call ctx_4170w ++ call ctx_redswitch ++ clear b32 $r15 ++ call ctx_4170s ++ call ctx_load ++ ++ // fetch context pointer, and initiate xfer on all GPCs ++ ctx_xfer_exec: ++ ld b32 $r1 D[$r0 + ctx_current] ++ mov $r2 0x414 ++ shl b32 $r2 6 ++ iowr I[$r2 + 0x000] $r0 // BAR_STATUS = reset ++ mov $r14 -0x5b00 ++ sethi $r14 0x410000 ++ mov b32 $r15 $r1 ++ call nv_wr32 // GPC_BCAST_WRCMD_DATA = ctx pointer ++ add b32 $r14 4 ++ xbit $r15 $flags $p1 ++ xbit $r2 $flags $p2 ++ shl b32 $r2 1 ++ or $r15 $r2 ++ call nv_wr32 // GPC_BCAST_WRCMD_CMD = GPC_XFER(type) ++ ++ // strands ++ mov $r1 0x4afc ++ sethi $r1 0x20000 ++ mov $r2 0xc ++ iowr I[$r1] $r2 // STRAND_CMD(0x3f) = 0x0c ++ call strand_wait ++ mov $r2 0x47fc ++ sethi $r2 0x20000 ++ iowr I[$r2] $r0 // STRAND_FIRST_GENE(0x3f) = 0x00 ++ xbit $r2 $flags $p1 ++ add b32 $r2 3 ++ iowr I[$r1] $r2 // STRAND_CMD(0x3f) = 0x03/0x04 (SAVE/LOAD) ++ ++ // mmio context ++ xbit $r10 $flags $p1 // direction ++ or $r10 6 // first, last ++ mov $r11 0 // base = 0 ++ ld b32 $r12 D[$r0 + hub_mmio_list_head] ++ ld b32 $r13 D[$r0 + hub_mmio_list_tail] ++ mov $r14 0 // not multi ++ call mmctx_xfer ++ ++ // wait for GPCs to all complete ++ mov $r10 8 // DONE_BAR ++ call wait_doneo ++ ++ // wait for strand xfer to complete ++ call strand_wait ++ ++ // post-op ++ bra $p1 ctx_xfer_post ++ mov $r10 12 // DONE_UNK12 ++ call wait_donez ++ mov $r1 0xa10 ++ shl b32 $r1 6 ++ mov $r2 5 ++ iowr I[$r1] $r2 // MEM_CMD ++ ctx_xfer_post_save_wait: ++ iord $r2 I[$r1] ++ or $r2 $r2 ++ bra ne ctx_xfer_post_save_wait ++ ++ bra $p2 ctx_xfer_done ++ ctx_xfer_post: ++ mov $r15 2 ++ call ctx_4170s ++ clear b32 $r15 ++ call ctx_86c ++ call strand_post ++ call ctx_4170w ++ clear b32 $r15 ++ call ctx_4170s ++ ++ bra not $p1 ctx_xfer_no_post_mmio ++ ld b32 $r1 D[$r0 + chan_mmio_count] ++ or $r1 $r1 ++ bra e ctx_xfer_no_post_mmio ++ call ctx_mmio_exec ++ ++ ctx_xfer_no_post_mmio: ++ call ctx_4160c ++ ++ ctx_xfer_done: ++ ret ++ ++.align 256 +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h 2011-06-26 07:59:23.000000000 +0200 +@@ -0,0 +1,838 @@ ++uint32_t nvc0_grhub_data[] = { ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x000000c0, ++ 0x012c0090, ++ 0x000000c1, ++ 0x01300090, ++ 0x000000c3, ++ 0x012c0090, ++ 0x000000c4, ++ 0x012c0090, ++ 0x000000c8, ++ 0x012c0090, ++ 0x000000ce, ++ 0x012c0090, ++ 0x00000000, ++ 0x0417e91c, ++ 0x04400204, ++ 0x28404004, ++ 0x00404044, ++ 0x34404094, ++ 0x184040d0, ++ 0x004040f8, ++ 0x08404130, ++ 0x08404150, ++ 0x04404164, ++ 0x08404174, ++ 0x1c404200, ++ 0x34404404, ++ 0x0c404460, ++ 0x00404480, ++ 0x00404498, ++ 0x0c404604, ++ 0x7c404618, ++ 0x50404698, ++ 0x044046f0, ++ 0x54404700, ++ 0x00405800, ++ 0x08405830, ++ 0x00405854, ++ 0x0c405870, ++ 0x04405a00, ++ 0x00405a18, ++ 0x00406020, ++ 0x0c406028, ++ 0x044064a8, ++ 0x044064b4, ++ 0x00407804, ++ 0x1440780c, ++ 0x004078bc, ++ 0x18408000, ++ 0x00408064, ++ 0x08408800, ++ 0x0c408900, ++ 0x00408980, ++ 0x044064c0, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++}; ++ ++uint32_t nvc0_grhub_code[] = { ++ 0x03090ef5, ++ 0x9800d898, ++ 0x86f001d9, ++ 0x0489b808, ++ 0xf00c1bf4, ++ 0x21f502f7, ++ 0x00f802ec, ++ 0xb60798c4, ++ 0x8dbb0384, ++ 0x0880b600, ++ 0x80008e80, ++ 0x90b6018f, ++ 0x0f94f001, ++ 0xf801d980, ++ 0x0131f400, ++ 0x9800d898, ++ 0x89b801d9, ++ 0x210bf404, ++ 0xb60789c4, ++ 0x9dbb0394, ++ 0x0890b600, ++ 0x98009e98, ++ 0x80b6019f, ++ 0x0f84f001, ++ 0xf400d880, ++ 0x00f80132, ++ 0x0728b7f1, ++ 0xb906b4b6, ++ 0xc9f002ec, ++ 0x00bcd01f, ++ 0xc800bccf, ++ 0x1bf41fcc, ++ 0x06a7f0fa, ++ 0x010321f5, ++ 0xf840bfcf, ++ 0x28b7f100, ++ 0x06b4b607, ++ 0xb980bfd0, ++ 0xc9f002ec, ++ 0x1ec9f01f, ++ 0xcf00bcd0, ++ 0xccc800bc, ++ 0xfa1bf41f, ++ 0x87f100f8, ++ 0x84b60430, ++ 0x1ff9f006, ++ 0xf8008fd0, ++ 0x3087f100, ++ 0x0684b604, ++ 0xf80080d0, ++ 0x3c87f100, ++ 0x0684b608, ++ 0x99f094bd, ++ 0x0089d000, ++ 0x081887f1, ++ 0xd00684b6, ++ 0x87f1008a, ++ 0x84b60400, ++ 0x0088cf06, ++ 0xf4888aff, ++ 0x87f1f31b, ++ 0x84b6085c, ++ 0xf094bd06, ++ 0x89d00099, ++ 0xf100f800, ++ 0xb6083c87, ++ 0x94bd0684, ++ 0xd00099f0, ++ 0x87f10089, ++ 0x84b60818, ++ 0x008ad006, ++ 0x040087f1, ++ 0xcf0684b6, ++ 0x8aff0088, ++ 0xf30bf488, ++ 0x085c87f1, ++ 0xbd0684b6, ++ 0x0099f094, ++ 0xf80089d0, ++ 0x9894bd00, ++ 0x85b600e8, ++ 0x0180b61a, ++ 0xbb0284b6, ++ 0xe0b60098, ++ 0x04efb804, ++ 0xb9eb1bf4, ++ 0x00f8029f, ++ 0x083c87f1, ++ 0xbd0684b6, ++ 0x0199f094, ++ 0xf10089d0, ++ 0xb6071087, ++ 0x94bd0684, ++ 0xf405bbfd, ++ 0x8bd0090b, ++ 0x0099f000, ++ 0xf405eefd, ++ 0x8ed00c0b, ++ 0xc08fd080, ++ 0xb70199f0, ++ 0xc8010080, ++ 0xb4b600ab, ++ 0x0cb9f010, ++ 0xb601aec8, ++ 0xbefd11e4, ++ 0x008bd005, ++ 0xf0008ecf, ++ 0x0bf41fe4, ++ 0x00ce98fa, ++ 0xd005e9fd, ++ 0xc0b6c08e, ++ 0x04cdb804, ++ 0xc8e81bf4, ++ 0x1bf402ab, ++ 0x008bcf18, ++ 0xb01fb4f0, ++ 0x1bf410b4, ++ 0x02a7f0f7, ++ 0xf4c921f4, ++ 0xabc81b0e, ++ 0x10b4b600, ++ 0xf00cb9f0, ++ 0x8bd012b9, ++ 0x008bcf00, ++ 0xf412bbc8, ++ 0x87f1fa1b, ++ 0x84b6085c, ++ 0xf094bd06, ++ 0x89d00199, ++ 0xf900f800, ++ 0x02a7f0a0, ++ 0xfcc921f4, ++ 0xf100f8a0, ++ 0xf04afc87, ++ 0x97f00283, ++ 0x0089d00c, ++ 0x020721f5, ++ 0x87f100f8, ++ 0x83f04afc, ++ 0x0d97f002, ++ 0xf50089d0, ++ 0xf8020721, ++ 0xfca7f100, ++ 0x02a3f04f, ++ 0x0500aba2, ++ 0xd00fc7f0, ++ 0xc7f000ac, ++ 0x00bcd00b, ++ 0x020721f5, ++ 0xf000aed0, ++ 0xbcd00ac7, ++ 0x0721f500, ++ 0xf100f802, ++ 0xb6083c87, ++ 0x94bd0684, ++ 0xd00399f0, ++ 0x21f50089, ++ 0xe7f00213, ++ 0x3921f503, ++ 0xfca7f102, ++ 0x02a3f046, ++ 0x0400aba0, ++ 0xf040a0d0, ++ 0xbcd001c7, ++ 0x0721f500, ++ 0x010c9202, ++ 0xf000acd0, ++ 0xbcd002c7, ++ 0x0721f500, ++ 0x2621f502, ++ 0x8087f102, ++ 0x0684b608, ++ 0xb70089cf, ++ 0x95220080, ++ 0x8ed008fe, ++ 0x408ed000, ++ 0xb6808acf, ++ 0xa0b606a5, ++ 0x00eabb01, ++ 0xb60480b6, ++ 0x1bf40192, ++ 0x08e4b6e8, ++ 0xf1f2efbc, ++ 0xb6085c87, ++ 0x94bd0684, ++ 0xd00399f0, ++ 0x00f80089, ++ 0xe7f1e0f9, ++ 0xe4b60814, ++ 0x00efd006, ++ 0x0c1ce7f1, ++ 0xf006e4b6, ++ 0xefd001f7, ++ 0xf8e0fc00, ++ 0xfe04bd00, ++ 0x07fe0004, ++ 0x0017f100, ++ 0x0227f012, ++ 0xf10012d0, ++ 0xfe05b917, ++ 0x17f10010, ++ 0x10d00400, ++ 0x0437f1c0, ++ 0x0634b604, ++ 0x200327f1, ++ 0xf10032d0, ++ 0xd0200427, ++ 0x27f10132, ++ 0x32d0200b, ++ 0x0c27f102, ++ 0x0732d020, ++ 0x0c2427f1, ++ 0xb90624b6, ++ 0x23d00003, ++ 0x0427f100, ++ 0x0023f087, ++ 0xb70012d0, ++ 0xf0010012, ++ 0x12d00427, ++ 0x1031f400, ++ 0x9604e7f1, ++ 0xf440e3f0, ++ 0xf1c76821, ++ 0x01018090, ++ 0x801ff4f0, ++ 0x17f0000f, ++ 0x041fbb01, ++ 0xf10112b6, ++ 0xb6040c27, ++ 0x21d00624, ++ 0x4021d000, ++ 0x080027f1, ++ 0xcf0624b6, ++ 0xf7f00022, ++ 0x08f0b654, ++ 0xb800f398, ++ 0x0bf40432, ++ 0x0034b00b, ++ 0xf8f11bf4, ++ 0x0017f100, ++ 0x02fe5801, ++ 0xf003ff58, ++ 0x0e8000e3, ++ 0x150f8014, ++ 0x013d21f5, ++ 0x070037f1, ++ 0x950634b6, ++ 0x34d00814, ++ 0x4034d000, ++ 0x130030b7, ++ 0xb6001fbb, ++ 0x3fd002f5, ++ 0x0815b600, ++ 0xb60110b6, ++ 0x1fb90814, ++ 0x6321f502, ++ 0x001fbb02, ++ 0xf1000398, ++ 0xf0200047, ++ 0x4ea05043, ++ 0x1fb90804, ++ 0x8d21f402, ++ 0x08004ea0, ++ 0xf4022fb9, ++ 0x4ea08d21, ++ 0xf4bd010c, ++ 0xa08d21f4, ++ 0xf401044e, ++ 0x4ea08d21, ++ 0xf7f00100, ++ 0x8d21f402, ++ 0x08004ea0, ++ 0xc86821f4, ++ 0x0bf41fff, ++ 0x044ea0fa, ++ 0x6821f408, ++ 0xb7001fbb, ++ 0xb6800040, ++ 0x1bf40132, ++ 0x0027f1b4, ++ 0x0624b608, ++ 0xb74021d0, ++ 0xbd080020, ++ 0x1f19f014, ++ 0xf40021d0, ++ 0x28f40031, ++ 0x08d7f000, ++ 0xf43921f4, ++ 0xe4b1f401, ++ 0x1bf54001, ++ 0x87f100d1, ++ 0x84b6083c, ++ 0xf094bd06, ++ 0x89d00499, ++ 0x0017f100, ++ 0x0614b60b, ++ 0xcf4012cf, ++ 0x13c80011, ++ 0x7e0bf41f, ++ 0xf41f23c8, ++ 0x20f95a0b, ++ 0xf10212b9, ++ 0xb6083c87, ++ 0x94bd0684, ++ 0xd00799f0, ++ 0x32f40089, ++ 0x0231f401, ++ 0x082921f5, ++ 0x085c87f1, ++ 0xbd0684b6, ++ 0x0799f094, ++ 0xfc0089d0, ++ 0x3c87f120, ++ 0x0684b608, ++ 0x99f094bd, ++ 0x0089d006, ++ 0xf50131f4, ++ 0xf1082921, ++ 0xb6085c87, ++ 0x94bd0684, ++ 0xd00699f0, ++ 0x0ef40089, ++ 0xb920f931, ++ 0x32f40212, ++ 0x0232f401, ++ 0x082921f5, ++ 0x17f120fc, ++ 0x14b60b00, ++ 0x0012d006, ++ 0xc8130ef4, ++ 0x0bf41f23, ++ 0x0131f40d, ++ 0xf50232f4, ++ 0xf1082921, ++ 0xb60b0c17, ++ 0x27f00614, ++ 0x0012d001, ++ 0x085c87f1, ++ 0xbd0684b6, ++ 0x0499f094, ++ 0xf50089d0, ++ 0xb0ff200e, ++ 0x1bf401e4, ++ 0x02f2b90d, ++ 0x07b521f5, ++ 0xb0420ef4, ++ 0x1bf402e4, ++ 0x3c87f12e, ++ 0x0684b608, ++ 0x99f094bd, ++ 0x0089d007, ++ 0xf40132f4, ++ 0x21f50232, ++ 0x87f10829, ++ 0x84b6085c, ++ 0xf094bd06, ++ 0x89d00799, ++ 0x110ef400, ++ 0xf010ef94, ++ 0x21f501f5, ++ 0x0ef502ec, ++ 0x17f1fed1, ++ 0x14b60820, ++ 0xf024bd06, ++ 0x12d01f29, ++ 0xbe0ef500, ++ 0xfe80f9fe, ++ 0x80f90188, ++ 0xa0f990f9, ++ 0xd0f9b0f9, ++ 0xf0f9e0f9, ++ 0xc4800acf, ++ 0x0bf404ab, ++ 0x00b7f11d, ++ 0x08d7f019, ++ 0xcf40becf, ++ 0x21f400bf, ++ 0x00b0b704, ++ 0x01e7f004, ++ 0xe400bed0, ++ 0xf40100ab, ++ 0xd7f00d0b, ++ 0x01e7f108, ++ 0x0421f440, ++ 0x0104b7f1, ++ 0xabffb0bd, ++ 0x0d0bf4b4, ++ 0x0c1ca7f1, ++ 0xd006a4b6, ++ 0x0ad000ab, ++ 0xfcf0fc40, ++ 0xfcd0fce0, ++ 0xfca0fcb0, ++ 0xfe80fc90, ++ 0x80fc0088, ++ 0xf80032f4, ++ 0x60e7f101, ++ 0x40e3f041, ++ 0xf401f7f0, ++ 0x21f48d21, ++ 0x04ffc868, ++ 0xf8fa0bf4, ++ 0x60e7f100, ++ 0x40e3f041, ++ 0x21f4f4bd, ++ 0xf100f88d, ++ 0xf04170e7, ++ 0xf5f040e3, ++ 0x8d21f410, ++ 0xe7f100f8, ++ 0xe3f04170, ++ 0x6821f440, ++ 0xf410f4f0, ++ 0x00f8f31b, ++ 0x0614e7f1, ++ 0xf106e4b6, ++ 0xd00270f7, ++ 0xf7f000ef, ++ 0x01f2b608, ++ 0xf1fd1bf4, ++ 0xd00770f7, ++ 0x00f800ef, ++ 0x086ce7f1, ++ 0xd006e4b6, ++ 0xe7f100ef, ++ 0xe3f08a14, ++ 0x8d21f440, ++ 0xa86ce7f1, ++ 0xf441e3f0, ++ 0x00f88d21, ++ 0x083c87f1, ++ 0xbd0684b6, ++ 0x0599f094, ++ 0xf00089d0, ++ 0x21f40ca7, ++ 0x2417f1c9, ++ 0x0614b60a, ++ 0xf10010d0, ++ 0xb60b0037, ++ 0x32d00634, ++ 0x0c17f140, ++ 0x0614b60a, ++ 0xd00747f0, ++ 0x14d00012, ++ 0x4014cf40, ++ 0xf41f44f0, ++ 0x32d0fa1b, ++ 0x000bfe00, ++ 0xb61f2af0, ++ 0x20b60424, ++ 0x3c87f102, ++ 0x0684b608, ++ 0x99f094bd, ++ 0x0089d008, ++ 0x0a0417f1, ++ 0xd00614b6, ++ 0x17f10012, ++ 0x14b60a20, ++ 0x0227f006, ++ 0x800023f1, ++ 0xf00012d0, ++ 0x27f11017, ++ 0x23f00300, ++ 0x0512fa02, ++ 0x87f103f8, ++ 0x84b6085c, ++ 0xf094bd06, ++ 0x89d00899, ++ 0xc1019800, ++ 0x981814b6, ++ 0x25b6c002, ++ 0x0512fd08, ++ 0xf1160180, ++ 0xb6083c87, ++ 0x94bd0684, ++ 0xd00999f0, ++ 0x27f10089, ++ 0x24b60a04, ++ 0x0021d006, ++ 0xf10127f0, ++ 0xb60a2017, ++ 0x12d00614, ++ 0x0017f100, ++ 0x0613f002, ++ 0xf80501fa, ++ 0x5c87f103, ++ 0x0684b608, ++ 0x99f094bd, ++ 0x0089d009, ++ 0x085c87f1, ++ 0xbd0684b6, ++ 0x0599f094, ++ 0xf80089d0, ++ 0x3121f500, ++ 0xb821f506, ++ 0x0ca7f006, ++ 0xf1c921f4, ++ 0xb60a1017, ++ 0x27f00614, ++ 0x0012d005, ++ 0xfd0012cf, ++ 0x1bf40522, ++ 0x4921f5fa, ++ 0x9800f806, ++ 0x27f18103, ++ 0x24b60a04, ++ 0x0023d006, ++ 0x34c434bd, ++ 0x0f1bf4ff, ++ 0x030057f1, ++ 0xfa0653f0, ++ 0x03f80535, ++ 0x98c04e98, ++ 0x21f4c14f, ++ 0x0830b68d, ++ 0xf40112b6, ++ 0x0398df1b, ++ 0x0023d016, ++ 0xf1800080, ++ 0xf0020017, ++ 0x01fa0613, ++ 0xf803f806, ++ 0x0611f400, ++ 0xf01102f4, ++ 0x21f510f7, ++ 0x21f50698, ++ 0x11f40631, ++ 0x02f7f01c, ++ 0x065721f5, ++ 0x066621f5, ++ 0x067821f5, ++ 0x21f5f4bd, ++ 0x21f50657, ++ 0x019806b8, ++ 0x1427f116, ++ 0x0624b604, ++ 0xf10020d0, ++ 0xf0a500e7, ++ 0x1fb941e3, ++ 0x8d21f402, ++ 0xf004e0b6, ++ 0x2cf001fc, ++ 0x0124b602, ++ 0xf405f2fd, ++ 0x17f18d21, ++ 0x13f04afc, ++ 0x0c27f002, ++ 0xf50012d0, ++ 0xf1020721, ++ 0xf047fc27, ++ 0x20d00223, ++ 0x012cf000, ++ 0xd00320b6, ++ 0xacf00012, ++ 0x06a5f001, ++ 0x9800b7f0, ++ 0x0d98140c, ++ 0x00e7f015, ++ 0x015c21f5, ++ 0xf508a7f0, ++ 0xf5010321, ++ 0xf4020721, ++ 0xa7f02201, ++ 0xc921f40c, ++ 0x0a1017f1, ++ 0xf00614b6, ++ 0x12d00527, ++ 0x0012cf00, ++ 0xf40522fd, ++ 0x02f4fa1b, ++ 0x02f7f032, ++ 0x065721f5, ++ 0x21f5f4bd, ++ 0x21f50698, ++ 0x21f50226, ++ 0xf4bd0666, ++ 0x065721f5, ++ 0x981011f4, ++ 0x11fd8001, ++ 0x070bf405, ++ 0x07df21f5, ++ 0x064921f5, ++ 0x000000f8, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++ 0x00000000, ++}; +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_instmem.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c 2011-06-26 07:59:23.000000000 +0200 +@@ -32,7 +32,6 @@ + struct nouveau_channel *bar1; + struct nouveau_gpuobj *bar3_pgd; + struct nouveau_channel *bar3; +- struct nouveau_gpuobj *chan_pgd; + }; + + int +@@ -181,17 +180,11 @@ + goto error; + + /* channel vm */ +- ret = nouveau_vm_new(dev, 0, (1ULL << 40), 0x0008000000ULL, &vm); ++ ret = nouveau_vm_new(dev, 0, (1ULL << 40), 0x0008000000ULL, ++ &dev_priv->chan_vm); + if (ret) + goto error; + +- ret = nouveau_gpuobj_new(dev, NULL, 0x8000, 4096, 0, &priv->chan_pgd); +- if (ret) +- goto error; +- +- nouveau_vm_ref(vm, &dev_priv->chan_vm, priv->chan_pgd); +- nouveau_vm_ref(NULL, &vm, NULL); +- + nvc0_instmem_resume(dev); + return 0; + error: +@@ -211,8 +204,7 @@ + nv_wr32(dev, 0x1704, 0x00000000); + nv_wr32(dev, 0x1714, 0x00000000); + +- nouveau_vm_ref(NULL, &dev_priv->chan_vm, priv->chan_pgd); +- nouveau_gpuobj_ref(NULL, &priv->chan_pgd); ++ nouveau_vm_ref(NULL, &dev_priv->chan_vm, NULL); + + nvc0_channel_del(&priv->bar1); + nouveau_vm_ref(NULL, &dev_priv->bar1_vm, priv->bar1_pgd); +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_pm.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_pm.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_pm.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_pm.c 2011-06-26 07:59:23.000000000 +0200 +@@ -0,0 +1,151 @@ ++/* ++ * Copyright 2011 Red Hat Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: Ben Skeggs ++ */ ++ ++#include "drmP.h" ++#include "nouveau_drv.h" ++#include "nouveau_bios.h" ++#include "nouveau_pm.h" ++ ++static u32 read_div(struct drm_device *, int, u32, u32); ++static u32 read_pll(struct drm_device *, u32); ++ ++static u32 ++read_vco(struct drm_device *dev, u32 dsrc) ++{ ++ u32 ssrc = nv_rd32(dev, dsrc); ++ if (!(ssrc & 0x00000100)) ++ return read_pll(dev, 0x00e800); ++ return read_pll(dev, 0x00e820); ++} ++ ++static u32 ++read_pll(struct drm_device *dev, u32 pll) ++{ ++ u32 coef = nv_rd32(dev, pll + 4); ++ u32 P = (coef & 0x003f0000) >> 16; ++ u32 N = (coef & 0x0000ff00) >> 8; ++ u32 M = (coef & 0x000000ff) >> 0; ++ u32 sclk, doff; ++ ++ switch (pll & 0xfff000) { ++ case 0x00e000: ++ sclk = 27000; ++ P = 1; ++ break; ++ case 0x137000: ++ doff = (pll - 0x137000) / 0x20; ++ sclk = read_div(dev, doff, 0x137120, 0x137140); ++ break; ++ case 0x132000: ++ switch (pll) { ++ case 0x132000: ++ sclk = read_pll(dev, 0x132020); ++ break; ++ case 0x132020: ++ sclk = read_div(dev, 0, 0x137320, 0x137330); ++ break; ++ default: ++ return 0; ++ } ++ break; ++ default: ++ return 0; ++ } ++ ++ return sclk * N / M / P; ++} ++ ++static u32 ++read_div(struct drm_device *dev, int doff, u32 dsrc, u32 dctl) ++{ ++ u32 ssrc = nv_rd32(dev, dsrc + (doff * 4)); ++ u32 sctl = nv_rd32(dev, dctl + (doff * 4)); ++ ++ switch (ssrc & 0x00000003) { ++ case 0: ++ if ((ssrc & 0x00030000) != 0x00030000) ++ return 27000; ++ return 108000; ++ case 2: ++ return 100000; ++ case 3: ++ if (sctl & 0x80000000) { ++ u32 sclk = read_vco(dev, dsrc); ++ u32 sdiv = (sctl & 0x0000003f) + 2; ++ return (sclk * 2) / sdiv; ++ } ++ ++ return read_vco(dev, dsrc); ++ default: ++ return 0; ++ } ++} ++ ++static u32 ++read_mem(struct drm_device *dev) ++{ ++ u32 ssel = nv_rd32(dev, 0x1373f0); ++ if (ssel & 0x00000001) ++ return read_div(dev, 0, 0x137300, 0x137310); ++ return read_pll(dev, 0x132000); ++} ++ ++static u32 ++read_clk(struct drm_device *dev, int clk) ++{ ++ u32 sctl = nv_rd32(dev, 0x137250 + (clk * 4)); ++ u32 ssel = nv_rd32(dev, 0x137100); ++ u32 sclk, sdiv; ++ ++ if (ssel & (1 << clk)) { ++ if (clk < 7) ++ sclk = read_pll(dev, 0x137000 + (clk * 0x20)); ++ else ++ sclk = read_pll(dev, 0x1370e0); ++ sdiv = ((sctl & 0x00003f00) >> 8) + 2; ++ } else { ++ sclk = read_div(dev, clk, 0x137160, 0x1371d0); ++ sdiv = ((sctl & 0x0000003f) >> 0) + 2; ++ } ++ ++ if (sctl & 0x80000000) ++ return (sclk * 2) / sdiv; ++ return sclk; ++} ++ ++int ++nvc0_pm_clocks_get(struct drm_device *dev, struct nouveau_pm_level *perflvl) ++{ ++ perflvl->shader = read_clk(dev, 0x00); ++ perflvl->core = perflvl->shader / 2; ++ perflvl->memory = read_mem(dev); ++ perflvl->rop = read_clk(dev, 0x01); ++ perflvl->hub07 = read_clk(dev, 0x02); ++ perflvl->hub06 = read_clk(dev, 0x07); ++ perflvl->hub01 = read_clk(dev, 0x08); ++ perflvl->copy = read_clk(dev, 0x09); ++ perflvl->daemon = read_clk(dev, 0x0c); ++ perflvl->vdec = read_clk(dev, 0x0e); ++ return 0; ++} +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_vm.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_vm.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_vm.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_vm.c 2011-06-26 07:59:23.000000000 +0200 +@@ -105,7 +105,11 @@ + struct drm_device *dev = vm->dev; + struct nouveau_vm_pgd *vpgd; + unsigned long flags; +- u32 engine = (dev_priv->chan_vm == vm) ? 1 : 5; ++ u32 engine; ++ ++ engine = 1; ++ if (vm == dev_priv->bar1_vm || vm == dev_priv->bar3_vm) ++ engine |= 4; + + pinstmem->flush(vm->dev); + +diff -Naur linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_vram.c linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_vram.c +--- linux-3.0-rc4/drivers/gpu/drm/nouveau/nvc0_vram.c 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/drivers/gpu/drm/nouveau/nvc0_vram.c 2011-06-26 07:59:23.000000000 +0200 +@@ -61,9 +61,7 @@ + u32 type, struct nouveau_mem **pmem) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct ttm_bo_device *bdev = &dev_priv->ttm.bdev; +- struct ttm_mem_type_manager *man = &bdev->man[TTM_PL_VRAM]; +- struct nouveau_mm *mm = man->priv; ++ struct nouveau_mm *mm = dev_priv->engine.vram.mm; + struct nouveau_mm_node *r; + struct nouveau_mem *mem; + int ret; +@@ -105,9 +103,15 @@ + nvc0_vram_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_vram_engine *vram = &dev_priv->engine.vram; ++ const u32 rsvd_head = ( 256 * 1024) >> 12; /* vga memory */ ++ const u32 rsvd_tail = (1024 * 1024) >> 12; /* vbios etc */ ++ u32 length; + + dev_priv->vram_size = nv_rd32(dev, 0x10f20c) << 20; + dev_priv->vram_size *= nv_rd32(dev, 0x121c74); +- dev_priv->vram_rblock_size = 4096; +- return 0; ++ ++ length = (dev_priv->vram_size >> 12) - rsvd_head - rsvd_tail; ++ ++ return nouveau_mm_init(&vram->mm, rsvd_head, length, 1); + } +diff -Naur linux-3.0-rc4/.gitignore linux-3.0-rc4.nouveau/.gitignore +diff -Naur linux-3.0-rc4/include/drm/drmP.h linux-3.0-rc4.nouveau/include/drm/drmP.h +--- linux-3.0-rc4/include/drm/drmP.h 2011-06-21 05:25:46.000000000 +0200 ++++ linux-3.0-rc4.nouveau/include/drm/drmP.h 2011-06-26 07:59:43.000000000 +0200 +@@ -886,6 +886,8 @@ + */ + int (*gem_init_object) (struct drm_gem_object *obj); + void (*gem_free_object) (struct drm_gem_object *obj); ++ int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); ++ void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); + + /* vga arb irq handler */ + void (*vgaarb_irq)(struct drm_device *dev, bool state); diff --git a/packages/linux/patches/linux-3.0-rc4-322-omap4_pandaboard_fix_dvi_support-0.1.patch b/packages/linux/patches/linux-3.0-rc5-322-omap4_pandaboard_fix_dvi_support-0.1.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-322-omap4_pandaboard_fix_dvi_support-0.1.patch rename to packages/linux/patches/linux-3.0-rc5-322-omap4_pandaboard_fix_dvi_support-0.1.patch diff --git a/packages/linux/patches/linux-3.0-rc4-716_mm-zero_swappiness.patch b/packages/linux/patches/linux-3.0-rc5-716_mm-zero_swappiness.patch similarity index 100% rename from packages/linux/patches/linux-3.0-rc4-716_mm-zero_swappiness.patch rename to packages/linux/patches/linux-3.0-rc5-716_mm-zero_swappiness.patch diff --git a/packages/mediacenter/xbmc-theme-Confluence/meta b/packages/mediacenter/xbmc-theme-Confluence/meta index c71e76862d..fe7baa2af7 100644 --- a/packages/mediacenter/xbmc-theme-Confluence/meta +++ b/packages/mediacenter/xbmc-theme-Confluence/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc-theme-Confluence" -PKG_VERSION="e1a0b08" +PKG_VERSION="3c8a4c9" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index 39a2f0c32e..bd0615c881 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc" -PKG_VERSION="e1a0b08" +PKG_VERSION="3c8a4c9" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-001-add_support_to_specify_GIT_REV-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-001-add_support_to_specify_GIT_REV-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-001-add_support_to_specify_GIT_REV-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-001-add_support_to_specify_GIT_REV-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-013-reenable_lcd_config_settings-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-013-reenable_lcd_config_settings-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-013-reenable_lcd_config_settings-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-013-reenable_lcd_config_settings-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-201-let_select_XBMCProjectM-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-201-let_select_XBMCProjectM-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-201-let_select_XBMCProjectM-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-201-let_select_XBMCProjectM-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-202-let_select_RSXS-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-202-let_select_RSXS-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-202-let_select_RSXS-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-202-let_select_RSXS-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-303-fix_libdvd_xFLAGS-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-303-fix_libdvd_xFLAGS-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-303-fix_libdvd_xFLAGS-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-303-fix_libdvd_xFLAGS-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-321-CrystalHD_use_yuy2_to_yv12-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-321-CrystalHD_use_yuy2_to_yv12-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-321-CrystalHD_use_yuy2_to_yv12-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-321-CrystalHD_use_yuy2_to_yv12-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-402-enable_yasm_in_ffmpeg-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-402-enable_yasm_in_ffmpeg-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-402-enable_yasm_in_ffmpeg-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-402-enable_yasm_in_ffmpeg-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-404-add_lame_check-0.6.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-404-add_lame_check-0.6.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-404-add_lame_check-0.6.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-404-add_lame_check-0.6.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-452-change_lcd_content-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-452-change_lcd_content-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-452-change_lcd_content-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-452-change_lcd_content-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-453-add_openelec.tv_RSS_news-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-453-add_openelec.tv_RSS_news-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-453-add_openelec.tv_RSS_news-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-453-add_openelec.tv_RSS_news-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-453-ps3_remote_be_more_quiet-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-453-ps3_remote_be_more_quiet-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-453-ps3_remote_be_more_quiet-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-453-ps3_remote_be_more_quiet-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-462-add_remote_irtrans_mediacenter-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-462-add_remote_irtrans_mediacenter-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-462-add_remote_irtrans_mediacenter-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-462-add_remote_irtrans_mediacenter-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-463-add_remote_devinput-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-463-add_remote_devinput-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-463-add_remote_devinput-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-463-add_remote_devinput-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-464-add_eject_keymapping_for_lirc-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-464-add_eject_keymapping_for_lirc-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-464-add_eject_keymapping_for_lirc-0.1.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-464-add_eject_keymapping_for_lirc-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-e1a0b08-901-advancedsettings_alwaysextractflags.patch b/packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-901-advancedsettings_alwaysextractflags.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-e1a0b08-901-advancedsettings_alwaysextractflags.patch rename to packages/mediacenter/xbmc/patches/xbmc-3c8a4c9-901-advancedsettings_alwaysextractflags.patch diff --git a/packages/multimedia/rtmpdump/meta b/packages/multimedia/rtmpdump/meta index b948ad19a3..21be55b2be 100644 --- a/packages/multimedia/rtmpdump/meta +++ b/packages/multimedia/rtmpdump/meta @@ -19,12 +19,13 @@ ################################################################################ PKG_NAME="rtmpdump" -PKG_VERSION="2.3" +PKG_VERSION="6155179" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://rtmpdump.mplayerhq.hu/" -PKG_URL="http://rtmpdump.mplayerhq.hu/download/$PKG_NAME-$PKG_VERSION.tgz" +#PKG_URL="http://rtmpdump.mplayerhq.hu/download/$PKG_NAME-$PKG_VERSION.tgz" +PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="zlib openssl" PKG_BUILD_DEPENDS="toolchain zlib openssl" PKG_PRIORITY="optional" diff --git a/packages/network/connman/meta b/packages/network/connman/meta index 52c2f48306..f0799057ca 100644 --- a/packages/network/connman/meta +++ b/packages/network/connman/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="connman" -PKG_VERSION="0.75" +PKG_VERSION="0.74" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/network/libnfs/build b/packages/network/libnfs/build index c17dd6d985..2cf0e98223 100755 --- a/packages/network/libnfs/build +++ b/packages/network/libnfs/build @@ -29,6 +29,7 @@ cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --libdir=/usr/lib \ --sysconfdir=/etc \ --without-examples \ diff --git a/packages/network/libtirpc/build b/packages/network/libtirpc/build index d7c66e3995..2a582d396c 100755 --- a/packages/network/libtirpc/build +++ b/packages/network/libtirpc/build @@ -29,8 +29,8 @@ cd $PKG_BUILD --sysconfdir=/etc \ --disable-static \ --enable-shared \ + --disable-gss \ --with-gnu-ld make - $MAKEINSTALL \ No newline at end of file diff --git a/packages/network/netmount/config/netmount.conf.sample b/packages/network/netmount/config/netmount.conf.sample index 97de6a75bb..3152daa75a 100644 --- a/packages/network/netmount/config/netmount.conf.sample +++ b/packages/network/netmount/config/netmount.conf.sample @@ -40,4 +40,4 @@ # afp | 192.168.1.44/videos | /storage/mount/videos | : # cifs | //192.168.1.44/videos | /storage/mount/videos | username=user,pass=secret # cifs | //192.168.1.44/tv shows | /storage/mount/tvshows | username=user,pass=secret -# nfs | 192.168.1.44:/videos | /storage/mount/videos +# nfs | 192.168.1.44:/videos | /storage/mount/videos | diff --git a/packages/network/netmount/scripts/netmount b/packages/network/netmount/scripts/netmount index b1201c1638..4cf1fbbd77 100755 --- a/packages/network/netmount/scripts/netmount +++ b/packages/network/netmount/scripts/netmount @@ -46,7 +46,7 @@ IFS=" mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" & ;; nfs) - mount.nfs "$SHARE" "$MOUNTPOINT" & + mount.nfs "$SHARE" "$MOUNTPOINT" -o nolock,"$OPTIONS" & ;; esac done diff --git a/packages/network/nfs-utils/build b/packages/network/nfs-utils/build index 471068ff4c..f19e84ef88 100755 --- a/packages/network/nfs-utils/build +++ b/packages/network/nfs-utils/build @@ -46,12 +46,11 @@ libblkid_is_recent="yes" \ --enable-tirpc \ --with-tirpcinclude="$SYSROOT_PREFIX/usr/include/tirpc" \ --enable-ipv6 \ - --enable-mountconfig \ + --disable-mountconfig \ --without-tcp-wrappers \ --without-krb5 \ --disable-caps \ --enable-largefile \ - --with-mountfile=/etc/nfsmounts.conf \ --with-gnu-ld make -C support diff --git a/packages/network/nfs-utils/init.d/05_nfsutils b/packages/network/nfs-utils/init.d/05_nfsutils deleted file mode 100644 index 48aeaf3924..0000000000 --- a/packages/network/nfs-utils/init.d/05_nfsutils +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# Copyright (C) 2009-2010 OpenELEC.tv -# http://www.openelec.tv -# -# This Program is free software; you can 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 Program 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 -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -# create directories needed for nfs-utils -# -# runlevels: openelec, textmode - -( - progress "create directories needed for nfs-utils" - - install -m 755 -o rpcuser -g rpcuser -d /var/lib/nfs - install -m 755 -o rpcuser -g rpcuser -d /var/lib/nfs/sm - install -m 755 -o rpcuser -g rpcuser -d /var/lib/nfs/sm.bak - touch /var/lib/nfs/etab && chown rpcuser:rpcuser /var/lib/nfs/etab - touch /var/lib/nfs/rmtab && chown rpcuser:rpcuser /var/lib/nfs/rmtab - touch /var/lib/nfs/state && chown rpcuser:rpcuser /var/lib/nfs/state - touch /var/lib/nfs/xtab && chown rpcuser:rpcuser /var/lib/nfs/xtab -)& diff --git a/packages/network/nfs-utils/install b/packages/network/nfs-utils/install index e5dd29e39c..acde9ddb41 100755 --- a/packages/network/nfs-utils/install +++ b/packages/network/nfs-utils/install @@ -22,9 +22,6 @@ . config/options $1 -add_user rpcuser x 29 29 "RPC Service User" "/var/lib/nfs" "/bin/sh" -add_group rpcuser 29 - mkdir -p $INSTALL/sbin cp $PKG_BUILD/utils/mount/mount.nfs $INSTALL/sbin/ ln -sf mount.nfs $INSTALL/sbin/mount.nfs4 diff --git a/packages/network/nfs-utils/meta b/packages/network/nfs-utils/meta index 22eb91f855..fc6e3c3eb7 100644 --- a/packages/network/nfs-utils/meta +++ b/packages/network/nfs-utils/meta @@ -22,10 +22,10 @@ PKG_NAME="nfs-utils" PKG_VERSION="1.2.3" PKG_REV="1" PKG_ARCH="any" -PKG_LICENSE="OSS" +PKG_LICENSE="GPL" PKG_SITE="http://nfs.sourceforge.net/" PKG_URL="$SOURCEFORGE_SRC/nfs/nfs-utils/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="libevent libnfsidmap libtirpc portmap util-linux" +PKG_DEPENDS="libevent libnfsidmap libtirpc util-linux" PKG_BUILD_DEPENDS="toolchain libevent libnfsidmap libtirpc util-linux" PKG_PRIORITY="optional" PKG_SECTION="network" diff --git a/packages/network/nfs-utils/patches/nfs-utils-1.2.3-cross.patch b/packages/network/nfs-utils/patches/nfs-utils-1.2.3-cross.patch deleted file mode 100644 index 57c2f035c1..0000000000 --- a/packages/network/nfs-utils/patches/nfs-utils-1.2.3-cross.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -Naur nfs-utils-1.1.0-old/tools/locktest/Makefile.am nfs-utils-1.1.0-new/tools/locktest/Makefile.am ---- nfs-utils-1.1.0-old/tools/locktest/Makefile.am 2007-05-10 20:40:57.000000000 -0700 -+++ nfs-utils-1.1.0-new/tools/locktest/Makefile.am 2007-08-11 19:18:59.000000000 -0700 -@@ -5,8 +5,8 @@ - - noinst_PROGRAMS = testlk - testlk_SOURCES = testlk.c --testlk_CFLAGS=$(CFLAGS_FOR_BUILD) --testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) --testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD) -+CFLAGS=$(CFLAGS_FOR_BUILD) -+CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -+LDFLAGS=$(LDFLAGS_FOR_BUILD) - - MAINTAINERCLEANFILES = Makefile.in -diff -Naur nfs-utils-1.1.0-old/tools/rpcdebug/Makefile.am nfs-utils-1.1.0-new/tools/rpcdebug/Makefile.am ---- nfs-utils-1.1.0-old/tools/rpcdebug/Makefile.am 2007-05-10 20:40:57.000000000 -0700 -+++ nfs-utils-1.1.0-new/tools/rpcdebug/Makefile.am 2007-08-11 19:19:37.000000000 -0700 -@@ -8,8 +8,8 @@ - - sbin_PROGRAMS = rpcdebug - rpcdebug_SOURCES = rpcdebug.c --rpcdebug_CFLAGS=$(CFLAGS_FOR_BUILD) --rpcdebug_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include --rpcdebug_LDFLAGS=$(LDFLAGS_FOR_BUILD) -+CFLAGS=$(CFLAGS_FOR_BUILD) -+CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include -+LDFLAGS=$(LDFLAGS_FOR_BUILD) - - MAINTAINERCLEANFILES = Makefile.in -diff -Naur nfs-utils-1.1.0-old/tools/rpcgen/Makefile.am nfs-utils-1.1.0-new/tools/rpcgen/Makefile.am ---- nfs-utils-1.1.0-old/tools/rpcgen/Makefile.am 2007-05-10 20:40:57.000000000 -0700 -+++ nfs-utils-1.1.0-new/tools/rpcgen/Makefile.am 2007-08-11 19:19:57.000000000 -0700 -@@ -9,9 +9,9 @@ - rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \ - rpc_scan.h rpc_util.h - --rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD) --rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD) --rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD) -+CFLAGS=$(CFLAGS_FOR_BUILD) -+CPPLAGS=$(CPPFLAGS_FOR_BUILD) -+LDFLAGS=$(LDFLAGS_FOR_BUILD) - - MAINTAINERCLEANFILES = Makefile.in - diff --git a/packages/network/portmap/patches/portmap-4-001_linux.patch b/packages/network/portmap/patches/portmap-4-001_linux.patch deleted file mode 100644 index c29b3d570f..0000000000 --- a/packages/network/portmap/patches/portmap-4-001_linux.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- portmap_4/Makefile.orig Fri May 31 09:50:40 1996 -+++ portmap_4/Makefile Fri Aug 9 17:40:43 1996 -@@ -67,9 +67,9 @@ - - SHELL = /bin/sh - --COPT = -Dconst= -Dperror=xperror $(HOSTS_ACCESS) $(CHECK_PORT) \ -+COPT = -Dconst= $(HOSTS_ACCESS) $(CHECK_PORT) \ - $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) --CFLAGS = $(COPT) -O $(NSARCHS) $(SETPGRP) -+CFLAGS = $(COPT) $(RPM_OPT_FLAGS) $(NSARCHS) $(SETPGRP) - OBJECTS = portmap.o pmap_check.o from_local.o $(AUX) - - all: portmap pmap_dump pmap_set ---- portmap_4/Makefile.bad 1996-05-31 09:50:40.000000000 -0400 -+++ portmap_4/Makefile 2002-12-12 09:54:00.000000000 -0500 -@@ -74,8 +74,8 @@ - - all: portmap pmap_dump pmap_set - --portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a -- $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_DIR)/libwrap.a $(LIBS) -+portmap: $(OBJECTS) -+ $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS) - - pmap_dump: pmap_dump.c - $(CC) $(CFLAGS) -o $@ $? $(LIBS) diff --git a/packages/network/portmap/patches/portmap-4-002_malloc.patch b/packages/network/portmap/patches/portmap-4-002_malloc.patch deleted file mode 100644 index 3b971ffbd9..0000000000 --- a/packages/network/portmap/patches/portmap-4-002_malloc.patch +++ /dev/null @@ -1,330 +0,0 @@ -diff -urN portmap_4/daemon.c portmap_4.new/daemon.c ---- portmap_4/daemon.c Thu Jun 11 13:53:12 1992 -+++ portmap_4.new/daemon.c Mon Nov 29 18:37:28 1999 -@@ -35,7 +35,9 @@ - static char sccsid[] = "@(#)daemon.c 5.3 (Berkeley) 12/28/90"; - #endif /* LIBC_SCCS and not lint */ - -+#include - #include -+#include - - /* From unistd.h */ - #define STDIN_FILENO 0 -@@ -44,7 +46,7 @@ - - /* From paths.h */ - #define _PATH_DEVNULL "/dev/null" -- -+int - daemon(nochdir, noclose) - int nochdir, noclose; - { -diff -urN portmap_4/from_local.c portmap_4.new/from_local.c ---- portmap_4/from_local.c Fri May 31 06:52:58 1996 -+++ portmap_4.new/from_local.c Tue Nov 30 01:21:27 1999 -@@ -46,11 +46,14 @@ - #include - #include - #include -+#include - #include - #include - #include - #include - #include -+#include -+#include - - #ifndef TRUE - #define TRUE 1 -@@ -95,7 +98,7 @@ - } - - /* find_local - find all IP addresses for this host */ -- -+int - find_local() - { - struct ifconf ifc; -@@ -153,7 +156,7 @@ - } - - /* from_local - determine whether request comes from the local system */ -- -+int - from_local(addr) - struct sockaddr_in *addr; - { -diff -urN portmap_4/pmap_check.c portmap_4.new/pmap_check.c ---- portmap_4/pmap_check.c Sun Nov 21 11:59:01 1993 -+++ portmap_4.new/pmap_check.c Tue Nov 30 01:19:37 1999 -@@ -34,7 +34,7 @@ - #ifndef lint - static char sccsid[] = "@(#) pmap_check.c 1.6 93/11/21 20:58:59"; - #endif -- -+#include - #include - #include - #include -@@ -66,6 +66,9 @@ - - /* A handful of macros for "readability". */ - -+/* coming from libwrap.a (tcp_wrappers) */ -+extern int hosts_ctl(char *daemon, char *name, char *addr, char *user); -+ - #define good_client(a) hosts_ctl("portmap", "", inet_ntoa(a->sin_addr), "") - - #define legal_port(a,p) \ -@@ -104,6 +107,7 @@ - - /* check_default - additional checks for NULL, DUMP, GETPORT and unknown */ - -+int - check_default(addr, proc, prog) - struct sockaddr_in *addr; - u_long proc; -@@ -121,7 +125,7 @@ - } - - /* check_privileged_port - additional checks for privileged-port updates */ -- -+int - check_privileged_port(addr, proc, prog, port) - struct sockaddr_in *addr; - u_long proc; -@@ -138,7 +142,7 @@ - } - - /* check_setunset - additional checks for update requests */ -- -+int - check_setunset(addr, proc, prog, port) - struct sockaddr_in *addr; - u_long proc; -@@ -160,7 +164,7 @@ - } - - /* check_callit - additional checks for forwarded requests */ -- -+int - check_callit(addr, proc, prog, aproc) - struct sockaddr_in *addr; - u_long proc; -@@ -213,13 +217,13 @@ - }; - struct proc_map *procp; - static struct proc_map procmap[] = { -- PMAPPROC_CALLIT, "callit", -- PMAPPROC_DUMP, "dump", -- PMAPPROC_GETPORT, "getport", -- PMAPPROC_NULL, "null", -- PMAPPROC_SET, "set", -- PMAPPROC_UNSET, "unset", -- 0, 0, -+ { PMAPPROC_CALLIT, "callit"}, -+ { PMAPPROC_DUMP, "dump"}, -+ { PMAPPROC_GETPORT, "getport"}, -+ { PMAPPROC_NULL, "null"}, -+ { PMAPPROC_SET, "set"}, -+ { PMAPPROC_UNSET, "unset"}, -+ { 0, 0}, - }; - - /* -@@ -233,7 +237,7 @@ - - if (prognum == 0) { - progname = ""; -- } else if (rpc = getrpcbynumber((int) prognum)) { -+ } else if ((rpc = getrpcbynumber((int) prognum))) { - progname = rpc->r_name; - } else { - sprintf(progname = progbuf, "%lu", prognum); -diff -urN portmap_4/pmap_dump.c portmap_4.new/pmap_dump.c ---- portmap_4/pmap_dump.c Thu Jun 11 13:53:16 1992 -+++ portmap_4.new/pmap_dump.c Tue Nov 30 01:22:07 1999 -@@ -22,7 +22,7 @@ - #include - - static char *protoname(); -- -+int - main(argc, argv) - int argc; - char **argv; -diff -urN portmap_4/pmap_set.c portmap_4.new/pmap_set.c ---- portmap_4/pmap_set.c Thu Jun 11 13:53:17 1992 -+++ portmap_4.new/pmap_set.c Tue Nov 30 01:23:49 1999 -@@ -17,6 +17,9 @@ - #include - #include - -+int parse_line(char *buf, u_long *, u_long *, int *, unsigned *); -+ -+int - main(argc, argv) - int argc; - char **argv; -@@ -42,7 +45,7 @@ - } - - /* parse_line - convert line to numbers */ -- -+int - parse_line(buf, prog, vers, prot, port) - char *buf; - u_long *prog; -diff -urN portmap_4/portmap.c portmap_4.new/portmap.c ---- portmap_4/portmap.c Fri May 31 06:52:59 1996 -+++ portmap_4.new/portmap.c Tue Nov 30 01:01:32 1999 -@@ -83,6 +83,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -128,6 +129,7 @@ - - #include "pmap_check.h" - -+int - main(argc, argv) - int argc; - char **argv; -@@ -229,6 +231,7 @@ - svc_run(); - syslog(LOG_ERR, "run_svc returned unexpectedly"); - abort(); -+ /* never reached */ - } - - #ifndef lint -@@ -290,7 +293,7 @@ - */ - /* remote host authorization check */ - check_default(svc_getcaller(xprt), rqstp->rq_proc, (u_long) 0); -- if (!svc_sendreply(xprt, xdr_void, (caddr_t)0) && debugging) { -+ if (!svc_sendreply(xprt, (xdrproc_t)xdr_void, (caddr_t)0) && debugging) { - abort(); - } - break; -@@ -299,7 +302,7 @@ - /* - * Set a program,version to port mapping - */ -- if (!svc_getargs(xprt, xdr_pmap, ®)) -+ if (!svc_getargs(xprt, (xdrproc_t)xdr_pmap, (caddr_t)®)) - svcerr_decode(xprt); - else { - /* reject non-local requests, protect priv. ports */ -@@ -341,7 +344,7 @@ - ans = 1; - } - done: -- if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) && -+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_int, (caddr_t)&ans)) && - debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -353,7 +356,7 @@ - /* - * Remove a program,version to port mapping. - */ -- if (!svc_getargs(xprt, xdr_pmap, ®)) -+ if (!svc_getargs(xprt, (xdrproc_t)xdr_pmap, (caddr_t)®)) - svcerr_decode(xprt); - else { - ans = 0; -@@ -387,7 +390,7 @@ - prevpml->pml_next = pml; - free(t); - } -- if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) && -+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_int, (caddr_t)&ans)) && - debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -399,7 +402,7 @@ - /* - * Lookup the mapping for a program,version and return its port - */ -- if (!svc_getargs(xprt, xdr_pmap, ®)) -+ if (!svc_getargs(xprt, (xdrproc_t)xdr_pmap, (caddr_t)®)) - svcerr_decode(xprt); - else { - /* remote host authorization check */ -@@ -414,7 +417,7 @@ - port = fnd->pml_map.pm_port; - else - port = 0; -- if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&port)) && -+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_int, (caddr_t)&port)) && - debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -426,7 +429,7 @@ - /* - * Return the current set of mapped program,version - */ -- if (!svc_getargs(xprt, xdr_void, NULL)) -+ if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) - svcerr_decode(xprt); - else { - /* remote host authorization check */ -@@ -437,7 +440,7 @@ - } else { - p = pmaplist; - } -- if ((!svc_sendreply(xprt, xdr_pmaplist, -+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_pmaplist, - (caddr_t)&p)) && debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -481,7 +484,7 @@ - struct encap_parms *epp; - { - -- return (xdr_bytes(xdrs, &(epp->args), &(epp->arglen), ARGSIZE)); -+ return (xdr_bytes(xdrs, &(epp->args), (u_int *)&(epp->arglen), ARGSIZE)); - } - - struct rmtcallargs { -@@ -585,7 +588,7 @@ - timeout.tv_sec = 5; - timeout.tv_usec = 0; - a.rmt_args.args = buf; -- if (!svc_getargs(xprt, xdr_rmtcall_args, &a)) -+ if (!svc_getargs(xprt, (xdrproc_t)xdr_rmtcall_args, (caddr_t)&a)) - return; - /* host and service access control */ - if (!check_callit(svc_getcaller(xprt), -@@ -614,9 +617,9 @@ - au->aup_uid, au->aup_gid, au->aup_len, au->aup_gids); - } - a.rmt_port = (u_long)port; -- if (clnt_call(client, a.rmt_proc, xdr_opaque_parms, &a, -- xdr_len_opaque_parms, &a, timeout) == RPC_SUCCESS) { -- svc_sendreply(xprt, xdr_rmtcall_result, (caddr_t)&a); -+ if (clnt_call(client, a.rmt_proc, (xdrproc_t)xdr_opaque_parms, (caddr_t)&a, -+ (xdrproc_t)xdr_len_opaque_parms, (caddr_t)&a, timeout) == RPC_SUCCESS) { -+ svc_sendreply(xprt, (xdrproc_t)xdr_rmtcall_result, (caddr_t)&a); - } - AUTH_DESTROY(client->cl_auth); - clnt_destroy(client); - -+--------------------------------------------------------------------+ -| Ste'phane ERANIAN | Email eranian@hpl.hp.com | -| Hewlett-Packard Laboratories | | -| 1501, Page Mill Road MS 1U-15 | | -| Palo Alto, CA 94303-096 | | -| USA | | -| Tel : (650) 857-7174 | | -| Fax : (650) 857-5548 | | -+--------------------------------------------------------------------+ - - diff --git a/packages/network/portmap/patches/portmap-4-003_cleanup.patch b/packages/network/portmap/patches/portmap-4-003_cleanup.patch deleted file mode 100644 index f6b16b1095..0000000000 --- a/packages/network/portmap/patches/portmap-4-003_cleanup.patch +++ /dev/null @@ -1,85 +0,0 @@ -Some cleanup for my last patch. - - --- -H.J. Lu (hjl@gnu.org) --- ---- portmap_4/pmap_check.c.hostname Wed May 10 10:23:35 2000 -+++ portmap_4/pmap_check.c Wed May 10 11:03:22 2000 -@@ -35,6 +35,7 @@ - static char sccsid[] = "@(#) pmap_check.c 1.6 93/11/21 20:58:59"; - #endif - #include -+#include - #include - #include - #include -@@ -69,8 +70,6 @@ int deny_severity = LOG_WARNING; - /* coming from libwrap.a (tcp_wrappers) */ - extern int hosts_ctl(char *daemon, char *name, char *addr, char *user); - --#define good_client(a) hosts_ctl("portmap", "", inet_ntoa(a->sin_addr), "") -- - #define legal_port(a,p) \ - (ntohs((a)->sin_port) < IPPORT_RESERVED || (p) >= IPPORT_RESERVED) - -@@ -88,6 +87,59 @@ extern int hosts_ctl(char *daemon, char - - #define log_client(addr, proc, prog) \ - logit(allow_severity, addr, proc, prog, "") -+ -+#ifdef HOSTS_ACCESS -+static int -+good_client(addr) -+struct sockaddr_in *addr; -+{ -+ struct hostent *hp; -+ char **sp; -+ char *tmpname; -+ -+ /* Check the IP address first. */ -+ if (hosts_ctl("portmap", "", inet_ntoa(addr->sin_addr), "")) -+ return 1; -+ -+ /* Check the hostname. */ -+ hp = gethostbyaddr ((const char *) &(addr->sin_addr), -+ sizeof (addr->sin_addr), AF_INET); -+ -+ if (!hp) -+ return 0; -+ -+ /* must make sure the hostent is authorative. */ -+ tmpname = alloca (strlen (hp->h_name) + 1); -+ strcpy (tmpname, hp->h_name); -+ hp = gethostbyname(tmpname); -+ if (hp) { -+ /* now make sure the "addr->sin_addr" is on the list */ -+ for (sp = hp->h_addr_list ; *sp ; sp++) { -+ if (memcmp(*sp, &(addr->sin_addr), hp->h_length)==0) -+ break; -+ } -+ if (!*sp) -+ /* it was a FAKE. */ -+ return 0; -+ } -+ else -+ /* never heard of it. misconfigured DNS? */ -+ return 0; -+ -+ /* Check the official name first. */ -+ if (hosts_ctl("portmap", "", hp->h_name, "")) -+ return 1; -+ -+ /* Check aliases. */ -+ for (sp = hp->h_aliases; *sp ; sp++) { -+ if (hosts_ctl("portmap", "", *sp, "")) -+ return 1; -+ } -+ -+ /* No match */ -+ return 0; -+} -+#endif - - /* check_startup - additional startup code */ - diff --git a/packages/network/portmap/patches/portmap-4-004_rpc_user.patch b/packages/network/portmap/patches/portmap-4-004_rpc_user.patch deleted file mode 100644 index 5826696952..0000000000 --- a/packages/network/portmap/patches/portmap-4-004_rpc_user.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- portmap_4/daemon.c.rpcuser Wed Feb 28 18:42:17 2001 -+++ portmap_4/daemon.c Wed Feb 28 18:42:17 2001 -@@ -35,6 +35,7 @@ - static char sccsid[] = "@(#)daemon.c 5.3 (Berkeley) 12/28/90"; - #endif /* LIBC_SCCS and not lint */ - -+#include - #include - #include - #include ---- portmap_4/pmap_check.c.rpcuser Wed Feb 28 18:42:17 2001 -+++ portmap_4/pmap_check.c Wed Feb 28 18:50:28 2001 -@@ -40,6 +40,8 @@ - #include - #include - #include -+#include -+#include - #include - #ifdef SYSV40 - #include -@@ -149,11 +151,47 @@ - /* - * Give up root privileges so that we can never allocate a privileged - * port when forwarding an rpc request. -+ * -+ * Fix 8/3/00 Philipp Knirsch: First lookup our rpc user. If we find it, -+ * switch to that uid, otherwise simply resue the old bin user and print -+ * out a warning in syslog. - */ -- if (setuid(1) == -1) { -- syslog(LOG_ERR, "setuid(1) failed: %m"); -- exit(1); -+ -+ struct passwd *pwent; -+ -+ pwent = getpwnam("rpc"); -+ if (pwent == NULL) { -+ syslog(LOG_WARNING, "user rpc not found, reverting to user bin"); -+ if (setgid(1) == -1) { -+ syslog(LOG_ERR, "setgid(1) failed: %m"); -+ exit(1); -+ } -+ if (setuid(1) == -1) { -+ syslog(LOG_ERR, "setuid(1) failed: %m"); -+ exit(1); -+ } - } -+ else { -+ if (setgroups(0,NULL) == -1) { -+ syslog(LOG_WARNING,"setgroups() to clear group memberships failed: %m"); -+ } -+ -+ if (setgid(pwent->pw_gid) == -1) { -+ syslog(LOG_WARNING, "setgid() to rpc group failed: %m"); -+ if (setgid(1) == -1) { -+ syslog(LOG_ERR, "setgid(1) failed: %m"); -+ exit(1); -+ } -+ } -+ if (setuid(pwent->pw_uid) == -1) { -+ syslog(LOG_WARNING, "setuid() to rpc user failed: %m"); -+ if (setuid(1) == -1) { -+ syslog(LOG_ERR, "setuid(1) failed: %m"); -+ exit(1); -+ } -+ } -+ } -+ - (void) signal(SIGINT, toggle_verboselog); - } - diff --git a/packages/network/portmap/patches/portmap-4-005_sigpipe.patch b/packages/network/portmap/patches/portmap-4-005_sigpipe.patch deleted file mode 100644 index dba7cf4bb1..0000000000 --- a/packages/network/portmap/patches/portmap-4-005_sigpipe.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- portmap_4/portmap.c.sigpipe Sun Feb 11 17:45:11 2001 -+++ portmap_4/portmap.c Sun Feb 11 17:45:51 2001 -@@ -228,6 +228,9 @@ - #else - (void)signal(SIGCHLD, reap); - #endif -+ /* Dying on SIGPIPE doesn't help anyone */ -+ (void)signal(SIGPIPE, SIG_IGN); -+ - svc_run(); - syslog(LOG_ERR, "run_svc returned unexpectedly"); - abort(); diff --git a/packages/network/portmap/patches/portmap-4-006_errno.patch b/packages/network/portmap/patches/portmap-4-006_errno.patch deleted file mode 100644 index bd83ac863e..0000000000 --- a/packages/network/portmap/patches/portmap-4-006_errno.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- portmap_4/portmap.c.old 1996-05-31 09:52:59.000000000 -0400 -+++ portmap_4/portmap.c 2002-12-13 11:44:16.000000000 -0500 -@@ -94,6 +94,7 @@ - #ifdef SYSV40 - #include - #endif -+#include - - extern char *strerror(); - #include -@@ -124,7 +125,6 @@ - static void callit(); - struct pmaplist *pmaplist; - int debugging = 0; --extern int errno; - - #include "pmap_check.h" - diff --git a/packages/network/portmap/patches/portmap-4-007_pie.patch b/packages/network/portmap/patches/portmap-4-007_pie.patch deleted file mode 100644 index ee22eb769e..0000000000 --- a/packages/network/portmap/patches/portmap-4-007_pie.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- portmap_4/Makefile.pie 2003-10-28 20:18:32.000000000 -0800 -+++ portmap_4/Makefile 2003-10-28 20:18:32.000000000 -0800 -@@ -74,8 +74,11 @@ - - all: portmap pmap_dump pmap_set - -+$(OBJECTS): %.o: %.c -+ $(CC) $(CFLAGS) -fpie -c $< -+ - portmap: $(OBJECTS) -- $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS) -+ $(CC) $(CFLAGS) -o $@ -pie $(OBJECTS) $(LIBS) - - pmap_dump: pmap_dump.c - $(CC) $(CFLAGS) -o $@ $? $(LIBS) ---- portmap_4/pmap_check.h.pie 2003-10-28 20:26:34.000000000 -0800 -+++ portmap_4/pmap_check.h 2003-10-28 20:26:49.000000000 -0800 -@@ -6,6 +6,6 @@ - extern int check_setunset(); - extern int check_privileged_port(); - extern int check_callit(); --extern int verboselog; --extern int allow_severity; --extern int deny_severity; -+extern int verboselog __attribute__ ((visibility ("hidden"))); -+extern int allow_severity __attribute__ ((visibility ("hidden"))); -+extern int deny_severity __attribute__ ((visibility ("hidden"))); ---- portmap_4/pmap_check.c.pie 2003-10-28 20:27:38.000000000 -0800 -+++ portmap_4/pmap_check.c 2003-10-28 20:27:40.000000000 -0800 -@@ -63,9 +63,9 @@ - - static void logit(); - static void toggle_verboselog(); --int verboselog = 0; --int allow_severity = LOG_INFO; --int deny_severity = LOG_WARNING; -+int verboselog __attribute ((visibility ("hidden"))) = 0; -+int allow_severity __attribute ((visibility ("hidden"))) = LOG_INFO; -+int deny_severity __attribute ((visibility ("hidden"))) = LOG_WARNING; - - /* A handful of macros for "readability". */ - diff --git a/packages/network/portmap/patches/portmap-4-008_loopback.patch b/packages/network/portmap/patches/portmap-4-008_loopback.patch deleted file mode 100644 index 5234e7ef56..0000000000 --- a/packages/network/portmap/patches/portmap-4-008_loopback.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- portmap_4/portmap.c.orig 2004-08-12 10:48:13.405000000 -0400 -+++ portmap_4/portmap.c 2004-08-12 10:58:13.666000000 -0400 -@@ -126,6 +126,7 @@ - static void callit(); - struct pmaplist *pmaplist; - int debugging = 0; -+int localhost_only = 0; - - #include "pmap_check.h" - -@@ -140,13 +141,17 @@ - int len = sizeof(struct sockaddr_in); - register struct pmaplist *pml; - -- while ((c = getopt(argc, argv, "dv")) != EOF) { -+ while ((c = getopt(argc, argv, "dlv")) != EOF) { - switch (c) { - - case 'd': - debugging = 1; - break; - -+ case 'l': -+ localhost_only = 1; -+ break; -+ - case 'v': - verboselog = 1; - break; -@@ -154,6 +159,7 @@ - default: - (void) fprintf(stderr, "usage: %s [-dv]\n", argv[0]); - (void) fprintf(stderr, "-d: debugging mode\n"); -+ (void) fprintf(stderr, "-l: listen on localhost only\n"); - (void) fprintf(stderr, "-v: verbose logging\n"); - exit(1); - } -@@ -176,7 +182,12 @@ - exit(1); - } - -- addr.sin_addr.s_addr = 0; -+ if (localhost_only) { -+ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ syslog(LOG_NOTICE, "Only binding to LOOPBACK address!"); -+ } else { -+ addr.sin_addr.s_addr = 0; -+ } - addr.sin_family = AF_INET; - addr.sin_port = htons(PMAPPORT); - if (bind(sock, (struct sockaddr *)&addr, len) != 0) { diff --git a/packages/network/portmap/patches/portmap-4-009_pic.patch b/packages/network/portmap/patches/portmap-4-009_pic.patch deleted file mode 100644 index b66c432d1d..0000000000 --- a/packages/network/portmap/patches/portmap-4-009_pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur portmap_4-old/Makefile portmap_4-new/Makefile ---- portmap_4-old/Makefile 2008-12-24 11:02:07.000000000 -0800 -+++ portmap_4-new/Makefile 2008-12-24 11:02:52.000000000 -0800 -@@ -75,10 +75,10 @@ - all: portmap pmap_dump pmap_set - - $(OBJECTS): %.o: %.c -- $(CC) $(CFLAGS) -fpie -c $< -+ $(CC) $(CFLAGS) -fpic -c $< - - portmap: $(OBJECTS) -- $(CC) $(CFLAGS) -o $@ -pie $(OBJECTS) $(LIBS) -+ $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS) - - pmap_dump: pmap_dump.c - $(CC) $(CFLAGS) -o $@ $? $(LIBS) diff --git a/packages/network/samba/build b/packages/network/samba/build index 481a8ef616..a122916bdb 100755 --- a/packages/network/samba/build +++ b/packages/network/samba/build @@ -77,7 +77,7 @@ sh autogen.sh --without-dce-dfs \ --without-ldap \ --without-ads \ - --with-dnsupdate \ + --without-dnsupdate \ --without-automount \ --without-cifsmount \ --without-cifsumount \ @@ -104,8 +104,6 @@ sh autogen.sh --without-setproctitle \ make bin/libsmbclient.so -make bin/mount.cifs -make bin/umount.cifs if [ "$SAMBA_SERVER" = yes ]; then make bin/smbd diff --git a/packages/network/samba/config/smb.conf b/packages/network/samba/config/smb.conf index d52f351f78..f301ecc96e 100644 --- a/packages/network/samba/config/smb.conf +++ b/packages/network/samba/config/smb.conf @@ -32,6 +32,8 @@ wins support = yes syslog only = yes name resolve order = lmhosts wins bcast host + printcap name = /dev/null + load printers = no [printers] comment = All Printers @@ -40,8 +42,6 @@ guest ok = no writable = no printable = yes - printcap name = /dev/null - load printers = no # Using the following configurations as a template allows you to add # writable shares of disks and paths under /storage diff --git a/packages/print/freetype/meta b/packages/print/freetype/meta index ba4e0d819f..b799da8547 100644 --- a/packages/print/freetype/meta +++ b/packages/print/freetype/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="freetype" -PKG_VERSION="2.4.4" +PKG_VERSION="2.4.5" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/security/libgcrypt/meta b/packages/security/libgcrypt/meta index 456e5f61d7..537adc19a4 100644 --- a/packages/security/libgcrypt/meta +++ b/packages/security/libgcrypt/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libgcrypt" -PKG_VERSION="1.4.6" +PKG_VERSION="1.5.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/security/libgcrypt/patches/libgcrypt-1.4.6-gpg_error_libs.patch b/packages/security/libgcrypt/patches/libgcrypt-1.4.6-gpg_error_libs.patch deleted file mode 100644 index 58ba876acd..0000000000 --- a/packages/security/libgcrypt/patches/libgcrypt-1.4.6-gpg_error_libs.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur libgcrypt-1.4.6-old/tests/Makefile.am libgcrypt-1.4.6-new/tests/Makefile.am ---- libgcrypt-1.4.6-old/tests/Makefile.am 2010-07-13 07:05:56.000000000 -0700 -+++ libgcrypt-1.4.6-new/tests/Makefile.am 2010-08-10 10:00:44.000000000 -0700 -@@ -35,6 +35,7 @@ - # a built header. - AM_CPPFLAGS = -I../src -I$(top_srcdir)/src - AM_CFLAGS = $(GPG_ERROR_CFLAGS) -+AM_LDFLAGS = $(GPG_ERROR_LIBS) - - LDADD = ../src/libgcrypt.la $(DL_LIBS) - -diff -Naur libgcrypt-1.4.6-old/tests/Makefile.in libgcrypt-1.4.6-new/tests/Makefile.in ---- libgcrypt-1.4.6-old/tests/Makefile.in 2010-07-13 08:42:21.000000000 -0700 -+++ libgcrypt-1.4.6-new/tests/Makefile.in 2010-08-10 10:02:01.000000000 -0700 -@@ -338,6 +338,7 @@ - # a built header. - AM_CPPFLAGS = -I../src -I$(top_srcdir)/src - AM_CFLAGS = $(GPG_ERROR_CFLAGS) -+AM_LDFLAGS = $(GPG_ERROR_LIBS) - LDADD = ../src/libgcrypt.la $(DL_LIBS) - EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl - all: all-am diff --git a/packages/security/libgcrypt/patches/libgcrypt-1.4.6-01-dont_replace_parts_of_path-0.1.patch b/packages/security/libgcrypt/patches/libgcrypt-1.5.0-01-dont_replace_parts_of_path-0.1.patch similarity index 100% rename from packages/security/libgcrypt/patches/libgcrypt-1.4.6-01-dont_replace_parts_of_path-0.1.patch rename to packages/security/libgcrypt/patches/libgcrypt-1.5.0-01-dont_replace_parts_of_path-0.1.patch diff --git a/packages/security/libgcrypt/patches/libgcrypt-1.5.0-gpg_error_libs.patch b/packages/security/libgcrypt/patches/libgcrypt-1.5.0-gpg_error_libs.patch new file mode 100644 index 0000000000..cacb62c720 --- /dev/null +++ b/packages/security/libgcrypt/patches/libgcrypt-1.5.0-gpg_error_libs.patch @@ -0,0 +1,22 @@ +diff -Naur libgcrypt-1.5.0-old/tests/Makefile.am libgcrypt-1.5.0-new/tests/Makefile.am +--- libgcrypt-1.5.0-old/tests/Makefile.am 2011-06-11 11:56:32.000000000 -0700 ++++ libgcrypt-1.5.0-new/tests/Makefile.am 2011-06-30 20:08:49.000000000 -0700 +@@ -36,6 +36,7 @@ + # a built header. + AM_CPPFLAGS = -I../src -I$(top_srcdir)/src + AM_CFLAGS = $(GPG_ERROR_CFLAGS) ++AM_LDFLAGS = $(GPG_ERROR_LIBS) + + LDADD = ../src/libgcrypt.la $(DL_LIBS) ../compat/libcompat.la $(GPG_ERROR_LIBS) + +diff -Naur libgcrypt-1.5.0-old/tests/Makefile.in libgcrypt-1.5.0-new/tests/Makefile.in +--- libgcrypt-1.5.0-old/tests/Makefile.in 2011-06-29 01:58:01.000000000 -0700 ++++ libgcrypt-1.5.0-new/tests/Makefile.in 2011-06-30 20:10:01.000000000 -0700 +@@ -400,6 +400,7 @@ + # a built header. + AM_CPPFLAGS = -I../src -I$(top_srcdir)/src + AM_CFLAGS = $(GPG_ERROR_CFLAGS) ++AM_LDFLAGS = $(GPG_ERROR_LIBS) + LDADD = ../src/libgcrypt.la $(DL_LIBS) ../compat/libcompat.la $(GPG_ERROR_LIBS) + EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl \ + pkcs1v2-oaep.h pkcs1v2-pss.h pkcs1v2-v15c.h pkcs1v2-v15s.h diff --git a/packages/sysutils/fuse/build b/packages/sysutils/fuse/build index f887ffa1a5..ea60500499 100755 --- a/packages/sysutils/fuse/build +++ b/packages/sysutils/fuse/build @@ -38,7 +38,7 @@ am_cv_func_iconv=yes \ --enable-lib \ --enable-util \ --disable-example \ - --disable-mtab \ + --enable-mtab \ --disable-rpath \ --with-gnu-ld \ diff --git a/packages/sysutils/ntfs-3g_ntfsprogs/build b/packages/sysutils/ntfs-3g_ntfsprogs/build index 77b1c60433..739edd32fb 100755 --- a/packages/sysutils/ntfs-3g_ntfsprogs/build +++ b/packages/sysutils/ntfs-3g_ntfsprogs/build @@ -29,7 +29,6 @@ cd $PKG_BUILD --enable-shared \ --disable-static \ --disable-dependency-tracking \ - --with-fuse=external \ --disable-library \ --enable-posix-acls \ --enable-mtab \ diff --git a/packages/sysutils/udisks/init.d/31_mount-disks b/packages/sysutils/udisks/init.d/31_mount-disks deleted file mode 100644 index a02d14aebd..0000000000 --- a/packages/sysutils/udisks/init.d/31_mount-disks +++ /dev/null @@ -1,47 +0,0 @@ -################################################################################ -# Copyright (C) 2009-2010 OpenELEC.tv -# http://www.openelec.tv -# -# This Program is free software; you can 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 Program 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 -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -# -# automount internal disks -# -# runlevels: openelec, textmode - -( - progress "automount internal disks" - - drive_dump () { - udisks --dump | tr -d ' ' | grep 'device-file:' | cut -d ':' -f2 - } - - show_info () { - udisks --show-info $2 | grep "$1:" | tr -d ' ' | cut -d ":" -f2 - } - - for DEVICE in `drive_dump`; do - REMOVABLE="`show_info "removable" $DEVICE`" - MOUNTED="`show_info "is mounted" $DEVICE`" - USAGE="`show_info "usage" $DEVICE`" - - if [ "$REMOVABLE" = "0" -a "$MOUNTED" = "0" -a "$USAGE" = "filesystem" ]; then - udisks --mount "$DEVICE" >/dev/null - fi - - done -)& diff --git a/packages/sysutils/udisks/install b/packages/sysutils/udisks/install index 22c151e4a2..db9474e26d 100755 --- a/packages/sysutils/udisks/install +++ b/packages/sysutils/udisks/install @@ -32,7 +32,7 @@ mkdir -p $INSTALL/lib/udev cp -P $PKG_BUILD/src/probers/udisks-probe-sas-expander $INSTALL/lib/udev mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/data/80-udisks.rules $INSTALL/lib/udev/rules.d +# cp $PKG_BUILD/data/80-udisks.rules $INSTALL/lib/udev/rules.d mkdir -p $INSTALL/sbin cp -P $PKG_BUILD/tools/umount.udisks $INSTALL/sbin @@ -40,9 +40,6 @@ mkdir -p $INSTALL/sbin mkdir -p $INSTALL/usr/bin cp -P $PKG_BUILD/tools/udisks $INSTALL/usr/bin -mkdir -p $INSTALL/usr/lib/polkit-1/extensions - cp -P $PKG_BUILD/src/.libs/*.so $INSTALL/usr/lib/polkit-1/extensions - mkdir -p $INSTALL/usr/lib/udisks cp -P $PKG_BUILD/src/udisks-daemon $INSTALL/usr/lib/udisks cp -P $PKG_BUILD/src/helpers/udisks-helper-ata-smart-collect $INSTALL/usr/lib/udisks diff --git a/packages/sysutils/udisks/meta b/packages/sysutils/udisks/meta index 699d4da538..9b326f0303 100644 --- a/packages/sysutils/udisks/meta +++ b/packages/sysutils/udisks/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="udisks" -PKG_VERSION="1.0.2" +PKG_VERSION="1.0.3" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/network/portmap/build b/packages/sysutils/udisks/udev.d/97-automount.rules old mode 100755 new mode 100644 similarity index 78% rename from packages/network/portmap/build rename to packages/sysutils/udisks/udev.d/97-automount.rules index 5efb4d6557..f78b00f905 --- a/packages/network/portmap/build +++ b/packages/sysutils/udisks/udev.d/97-automount.rules @@ -1,5 +1,3 @@ -#!/bin/sh - ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) @@ -20,12 +18,13 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -. config/options $1 +ACTION!="add|change", GOTO="end" +SUBSYSTEM!="block", GOTO="end" -cd $PKG_BUILD -make FACILITY=LOG_AUTH \ - ZOMBIES='-DIGNORE_SIGCHLD -Dlint' \ - LIBS="-lnsl" \ - AUX="" \ - HOSTS_ACCESS="" \ +# mount the partition on add/change, if its a filesystem and on a ata drive + KERNEL=="sd[a-z][0-9]*", \ + ENV{ID_BUS}=="ata", \ + ENV{ID_FS_USAGE}=="filesystem", \ + RUN+="/usr/bin/udisks --mount /dev/%k" +LABEL="end" diff --git a/packages/sysutils/upower/meta b/packages/sysutils/upower/meta index e5ff2eac5f..76f55343a7 100644 --- a/packages/sysutils/upower/meta +++ b/packages/sysutils/upower/meta @@ -19,12 +19,12 @@ ################################################################################ PKG_NAME="upower" -PKG_VERSION="0.9.11" +PKG_VERSION="0.9.12" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://upower.freedesktop.org/" -PKG_URL="http://upower.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="http://upower.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="udev glib dbus dbus-glib polkit pm-utils" PKG_BUILD_DEPENDS="toolchain udev glib dbus dbus-glib gobject-introspection polkit" PKG_PRIORITY="optional" diff --git a/packages/toolchain/devel/eglibc/install b/packages/toolchain/devel/eglibc/install index d5e89e6ff8..97d5936204 100755 --- a/packages/toolchain/devel/eglibc/install +++ b/packages/toolchain/devel/eglibc/install @@ -53,4 +53,5 @@ mkdir -p $INSTALL/bin # cp $PKG_BUILD/objdir-$1/iconvdata/*.so $INSTALL/usr/lib/gconv mkdir -p $INSTALL/etc - cp $PKG_DIR/config/nsswitch.conf $INSTALL/etc + cp $PKG_DIR/config/nsswitch.conf $INSTALL/etc + cp $PKG_BUILD/sunrpc/etc.rpc $INSTALL/etc/rpc diff --git a/packages/x11/app/xrandr/meta b/packages/x11/app/xrandr/meta index 143564fd63..c387ee9e20 100644 --- a/packages/x11/app/xrandr/meta +++ b/packages/x11/app/xrandr/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xrandr" -PKG_VERSION="1.3.4" +PKG_VERSION="1.3.5" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/x11/driver/xf86-video-nouveau/meta b/packages/x11/driver/xf86-video-nouveau/meta index 1ee474aa30..eedab0625f 100644 --- a/packages/x11/driver/xf86-video-nouveau/meta +++ b/packages/x11/driver/xf86-video-nouveau/meta @@ -19,12 +19,12 @@ ################################################################################ PKG_NAME="xf86-video-nouveau" -PKG_VERSION="8378443" +PKG_VERSION="ab89aa0" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" -PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="libXrandr libXrender libdrm libXext libpciaccess udev Mesa" PKG_BUILD_DEPENDS="toolchain util-macros libXrandr libXrender libdrm libXext libpciaccess udev Mesa xorg-server" PKG_PRIORITY="optional" diff --git a/packages/x11/driver/xf86-video-nvidia/meta b/packages/x11/driver/xf86-video-nvidia/meta index aed65025bf..c4425ead44 100644 --- a/packages/x11/driver/xf86-video-nvidia/meta +++ b/packages/x11/driver/xf86-video-nvidia/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xf86-video-nvidia" -PKG_VERSION="275.09.07" +PKG_VERSION="280.04" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="nonfree" diff --git a/packages/x11/lib/libXrandr/meta b/packages/x11/lib/libXrandr/meta index 0fb0bc3a8d..a750fb6736 100644 --- a/packages/x11/lib/libXrandr/meta +++ b/packages/x11/lib/libXrandr/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libXrandr" -PKG_VERSION="1.3.1" +PKG_VERSION="1.3.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/x11/proto/dri2proto/meta b/packages/x11/proto/dri2proto/meta index 72c4427a8a..c4a70c40f1 100644 --- a/packages/x11/proto/dri2proto/meta +++ b/packages/x11/proto/dri2proto/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="dri2proto" -PKG_VERSION="2.3" +PKG_VERSION="2.6" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/x11/proto/glproto/meta b/packages/x11/proto/glproto/meta index 345ff21598..6379232cb4 100644 --- a/packages/x11/proto/glproto/meta +++ b/packages/x11/proto/glproto/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="glproto" -PKG_VERSION="1.4.12" +PKG_VERSION="1.4.14" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/x11/xserver/xorg-server/meta b/packages/x11/xserver/xorg-server/meta index c3445ec078..141b5adf38 100644 --- a/packages/x11/xserver/xorg-server/meta +++ b/packages/x11/xserver/xorg-server/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xorg-server" -PKG_VERSION="1.10.2" +PKG_VERSION="1.10.2.902" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-05_pkg_config.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-05_pkg_config.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-05_pkg_config.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-05_pkg_config.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-10_cache_xkbcomp_output_for_fast_start_up.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-10_cache_xkbcomp_output_for_fast_start_up.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-10_cache_xkbcomp_output_for_fast_start_up.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-10_cache_xkbcomp_output_for_fast_start_up.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-11_use_sloppy_heuristic_first_for_initial_mode.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-11_use_sloppy_heuristic_first_for_initial_mode.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-11_use_sloppy_heuristic_first_for_initial_mode.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-11_use_sloppy_heuristic_first_for_initial_mode.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-13_nouveau.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-13_nouveau.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-13_nouveau.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-13_nouveau.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-14_nvidia_fglrx_autodetect.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-14_nvidia_fglrx_autodetect.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-14_nvidia_fglrx_autodetect.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-14_nvidia_fglrx_autodetect.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-20_extra_modelines_fromxorg.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-20_extra_modelines_fromxorg.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-20_extra_modelines_fromxorg.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-20_extra_modelines_fromxorg.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-21_x11_nonroot-vesa.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-21_x11_nonroot-vesa.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-21_x11_nonroot-vesa.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-21_x11_nonroot-vesa.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-22_do_not_zap_xserver.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-22_do_not_zap_xserver.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-22_do_not_zap_xserver.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-22_do_not_zap_xserver.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-25_less_acpi_brokenness.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-25_less_acpi_brokenness.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2-25_less_acpi_brokenness.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.2.902-25_less_acpi_brokenness.patch diff --git a/packages/x11/xserver/xorg-server/scripts/xorg_start b/packages/x11/xserver/xorg-server/scripts/xorg_start index 8d38758750..c971eec77c 100755 --- a/packages/x11/xserver/xorg-server/scripts/xorg_start +++ b/packages/x11/xserver/xorg-server/scripts/xorg_start @@ -33,8 +33,9 @@ if [ "$RUNLEVEL" = openelec ]; then logger -t Xorg "### setup xorg.conf paths ###" XORG_CONF_USER="/storage/.config/xorg.conf" + XORG_CONF_USER_DRV="/storage/.config/xorg-${xorg_driver}.conf" XORG_CONF_DEFAULT="/etc/X11/xorg.conf" - XORG_CONF_DRIVER="/etc/X11/xorg-${xorg_driver}.conf" + XORG_CONF_DEFAULT_DRV="/etc/X11/xorg-${xorg_driver}.conf" ############################################################################## # creating start options @@ -51,10 +52,12 @@ if [ "$RUNLEVEL" = openelec ]; then # load user defined xorg.conf, if exist if [ -f "$XORG_CONF_USER" ]; then XORG_ARGS="$XORG_ARGS -config $XORG_CONF_USER" + elif [ -f "$XORG_CONF_USER_DRV" ]; then + XORG_ARGS="$XORG_ARGS -config $XORG_CONF_USER_DRV" elif [ -f "$XORG_CONF_DEFAULT" ]; then XORG_ARGS="$XORG_ARGS -config $XORG_CONF_DEFAULT" - elif [ -f "$XORG_CONF_DRIVER" ]; then - XORG_ARGS="$XORG_ARGS -config $XORG_CONF_DRIVER" + elif [ -f "$XORG_CONF_DEFAULT_DRV" ]; then + XORG_ARGS="$XORG_ARGS -config $XORG_CONF_DEFAULT_DRV" fi ############################################################################## diff --git a/projects/Generic/linux/linux.i386.conf b/projects/Generic/linux/linux.i386.conf index 816d560756..9898cdffd6 100644 --- a/projects/Generic/linux/linux.i386.conf +++ b/projects/Generic/linux/linux.i386.conf @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux/i386 3.0.0-rc4 Kernel Configuration +# Linux/i386 3.0.0-rc5 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -2053,7 +2053,8 @@ CONFIG_DRM_KMS_HELPER=y CONFIG_DRM_TTM=y # CONFIG_DRM_TDFX is not set # CONFIG_DRM_R128 is not set -# CONFIG_DRM_RADEON is not set +CONFIG_DRM_RADEON=y +CONFIG_DRM_RADEON_KMS=y # CONFIG_DRM_I810 is not set CONFIG_DRM_I915=y CONFIG_DRM_I915_KMS=y @@ -2904,7 +2905,6 @@ CONFIG_CIFS_STATS2=y # CONFIG_CIFS_XATTR is not set # CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_DFS_UPCALL is not set -# CONFIG_CIFS_NFSD_EXPORT is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set diff --git a/projects/Generic/options b/projects/Generic/options index ca85bab503..a9cc2a8635 100644 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -166,7 +166,7 @@ # Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau,vmware) # Space separated list is supported, # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 nvidia nouveau" - GRAPHIC_DRIVERS="i915 i965 fglrx nvidia vmware" + GRAPHIC_DRIVERS="i915 i965 r200 r300 fglrx nvidia vmware" # use libdrm-master (latest git) instead latest released version LIBDRM_MASTER="no" diff --git a/projects/Ultra/filesystem/etc/asound.conf b/projects/Ultra/filesystem/etc/asound.conf new file mode 100644 index 0000000000..f855b46cfc --- /dev/null +++ b/projects/Ultra/filesystem/etc/asound.conf @@ -0,0 +1,58 @@ +# asound.conf for Shuttle XS35GT +# http://forum.xbmc.org/showpost.php?p=635394&postcount=330 +# in XBMC, set "audio output device" to custom +# insert "pcm.both" into the text box + +pcm.!default { + type plug + slave { + pcm both + } +} + +pcm.both { + type route + slave { + pcm multi + channels 4 + } + ttable.0.0 1.0 + ttable.1.1 1.0 + ttable.0.2 1.0 + ttable.1.3 1.0 +} + +pcm.multi { + type multi + slaves.a { + pcm tv + channels 2 + } + slaves.b { + pcm receiver + channels 2 + } + bindings.0.slave a + bindings.0.channel 0 + bindings.1.slave a + bindings.1.channel 1 + bindings.2.slave b + bindings.2.channel 0 + bindings.3.slave b + bindings.3.channel 1 +} + +pcm.receiver { + type hw + card 0 + device 0 + channels 2 +} + +pcm.tv { + type hw + card 1 + device 7 + channels 2 +} + diff --git a/packages/network/portmap/install b/projects/Ultra/installer/installer.conf old mode 100755 new mode 100644 similarity index 71% rename from packages/network/portmap/install rename to projects/Ultra/installer/installer.conf index 5afa135c98..8473237413 --- a/packages/network/portmap/install +++ b/projects/Ultra/installer/installer.conf @@ -1,5 +1,3 @@ -#!/bin/sh - ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) @@ -19,12 +17,21 @@ # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # http://www.gnu.org/copyleft/gpl.html ################################################################################ +# Disklabel for System an Storage partition + DISKLABEL_SYSTEM="System" + DISKLABEL_STORAGE="Storage" -. config/options $1 +# Defaultsize of system partition (Cylinder: 16=132MB, 31=255MB) + PARTSIZE_SYSTEM="31" -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/portmap $INSTALL/sbin/ +# additional parameters to extlinux + EXTLINUX_PARAMETERS="vga=792" -mkdir -p $INSTALL/usr/sbin - cp $PKG_BUILD/pmap_set $INSTALL/usr/sbin/ - cp $PKG_BUILD/pmap_dump $INSTALL/usr/sbin/ +# enable BIOS update function + BIOS_UPDATE="no" + +# BIOS file to program + BIOS_FILE="" + +# location for BIOS backup (with filename) + BIOS_BACKUP="" diff --git a/projects/Ultra/linux/linux.x86_64.conf b/projects/Ultra/linux/linux.x86_64.conf new file mode 100644 index 0000000000..8897323ef1 --- /dev/null +++ b/projects/Ultra/linux/linux.x86_64.conf @@ -0,0 +1,2766 @@ +# +# Automatically generated make config: don't edit +# Linux/x86_64 3.0.0-rc5 Kernel Configuration +# +CONFIG_64BIT=y +# CONFIG_X86_32 is not set +CONFIG_X86_64=y +CONFIG_X86=y +CONFIG_INSTRUCTION_DECODER=y +CONFIG_OUTPUT_FORMAT="elf64-x86-64" +CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_MMU=y +CONFIG_ZONE_DMA=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_ARCH_HAS_CPU_RELAX=y +CONFIG_ARCH_HAS_DEFAULT_IDLE=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y +CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ZONE_DMA32=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_AUDIT_ARCH=y +CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_HAVE_INTEL_TXT=y +CONFIG_X86_64_SMP=y +CONFIG_X86_HT=y +CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" +# CONFIG_KTIME_SCALAR is not set +CONFIG_ARCH_CPU_PROBE_RELEASE=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set +CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +CONFIG_DEFAULT_HOSTNAME="openelec" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_FHANDLE is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_IRQ_FORCED_THREADING=y +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TREE_RCU=y +# CONFIG_PREEMPT_RCU is not set +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_FREEZER=y +# CONFIG_CGROUP_DEVICE is not set +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +# CONFIG_CGROUP_MEM_RES_CTLR is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +# CONFIG_BLK_CGROUP is not set +# CONFIG_NAMESPACES is not set +CONFIG_SCHED_AUTOGROUP=y +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE=" " +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +# CONFIG_RD_GZIP is not set +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +CONFIG_INITRAMFS_COMPRESSION_NONE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +# CONFIG_BUG is not set +CONFIG_ELF_CORE=y +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_VM_EVENT_COUNTERS is not set +CONFIG_PCI_QUIRKS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y +CONFIG_HAVE_USER_RETURN_NOTIFIER=y +CONFIG_HAVE_PERF_EVENTS_NMI=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y + +# +# GCOV-based kernel profiling +# +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK_BH is not set +CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_FREEZER=y + +# +# Processor type and features +# +CONFIG_TICK_ONESHOT=y +# CONFIG_NO_HZ is not set +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_SMP=y +CONFIG_X86_MPPARSE=y +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_SCHED_OMIT_FRAME_POINTER=y +# CONFIG_PARAVIRT_GUEST is not set +CONFIG_NO_BOOTMEM=y +# CONFIG_MEMTEST is not set +# CONFIG_MK8 is not set +# CONFIG_MPSC is not set +# CONFIG_MCORE2 is not set +CONFIG_MATOM=y +# CONFIG_GENERIC_CPU is not set +CONFIG_X86_INTERNODE_CACHE_SHIFT=6 +CONFIG_X86_CMPXCHG=y +CONFIG_CMPXCHG_LOCAL=y +CONFIG_X86_L1_CACHE_SHIFT=6 +CONFIG_X86_XADD=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_CMOV=y +CONFIG_X86_MINIMUM_CPU_FAMILY=64 +CONFIG_X86_DEBUGCTLMSR=y +CONFIG_PROCESSOR_SELECT=y +CONFIG_CPU_SUP_INTEL=y +# CONFIG_CPU_SUP_AMD is not set +# CONFIG_CPU_SUP_CENTAUR is not set +CONFIG_HPET_TIMER=y +CONFIG_HPET_EMULATE_RTC=y +CONFIG_DMI=y +# CONFIG_CALGARY_IOMMU is not set +# CONFIG_AMD_IOMMU is not set +CONFIG_SWIOTLB=y +CONFIG_IOMMU_HELPER=y +CONFIG_IOMMU_API=y +CONFIG_NR_CPUS=4 +CONFIG_SCHED_SMT=y +CONFIG_SCHED_MC=y +# CONFIG_IRQ_TIME_ACCOUNTING is not set +# CONFIG_PREEMPT_NONE is not set +CONFIG_PREEMPT_VOLUNTARY=y +# CONFIG_PREEMPT is not set +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set +# CONFIG_X86_MCE is not set +# CONFIG_I8K is not set +# CONFIG_MICROCODE is not set +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_DIRECT_GBPAGES=y +# CONFIG_NUMA is not set +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_PROC_KCORE_TEXT=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_HAVE_MEMBLOCK=y +# CONFIG_MEMORY_HOTPLUG is not set +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y +# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set +CONFIG_CLEANCACHE=y +# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set +CONFIG_X86_RESERVE_LOW=64 +CONFIG_MTRR=y +CONFIG_MTRR_SANITIZER=y +CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 +CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 +CONFIG_X86_PAT=y +CONFIG_ARCH_USES_PG_UNCACHED=y +# CONFIG_EFI is not set +CONFIG_SECCOMP=y +CONFIG_CC_STACKPROTECTOR=y +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 +CONFIG_SCHED_HRTICK=y +# CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set +CONFIG_PHYSICAL_START=0x1000000 +# CONFIG_RELOCATABLE is not set +CONFIG_PHYSICAL_ALIGN=0x1000000 +CONFIG_HOTPLUG_CPU=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="fastboot root=/dev/ram0 rdinit=/init threadirqs" +# CONFIG_CMDLINE_OVERRIDE is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y + +# +# Power management and ACPI options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +CONFIG_ACPI=y +CONFIG_ACPI_SLEEP=y +# CONFIG_ACPI_PROCFS is not set +# CONFIG_ACPI_PROCFS_POWER is not set +# CONFIG_ACPI_EC_DEBUGFS is not set +# CONFIG_ACPI_PROC_EVENT is not set +CONFIG_ACPI_AC=y +CONFIG_ACPI_BATTERY=y +CONFIG_ACPI_BUTTON=y +CONFIG_ACPI_FAN=y +# CONFIG_ACPI_DOCK is not set +CONFIG_ACPI_PROCESSOR=y +CONFIG_ACPI_HOTPLUG_CPU=y +# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set +CONFIG_ACPI_THERMAL=y +# CONFIG_ACPI_CUSTOM_DSDT is not set +CONFIG_ACPI_BLACKLIST_YEAR=0 +# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_PCI_SLOT=y +CONFIG_X86_PM_TIMER=y +CONFIG_ACPI_CONTAINER=y +# CONFIG_ACPI_SBS is not set +# CONFIG_ACPI_HED is not set +# CONFIG_ACPI_APEI is not set +# CONFIG_SFI is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_STAT is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# x86 CPU frequency scaling drivers +# +# CONFIG_X86_PCC_CPUFREQ is not set +CONFIG_X86_ACPI_CPUFREQ=y +# CONFIG_X86_POWERNOW_K8 is not set +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +# CONFIG_X86_P4_CLOCKMOD is not set + +# +# shared options +# +# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_INTEL_IDLE=y + +# +# Memory power savings +# +# CONFIG_I7300_IDLE is not set + +# +# Bus options (PCI etc.) +# +CONFIG_PCI=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCI_DOMAINS=y +# CONFIG_PCI_CNB20LE_QUIRK is not set +CONFIG_DMAR=y +CONFIG_DMAR_DEFAULT_ON=y +CONFIG_DMAR_FLOPPY_WA=y +# CONFIG_INTR_REMAP is not set +CONFIG_PCIEPORTBUS=y +CONFIG_PCIEAER=y +# CONFIG_PCIE_ECRC is not set +# CONFIG_PCIEAER_INJECT is not set +CONFIG_PCIEASPM=y +# CONFIG_PCIEASPM_DEBUG is not set +CONFIG_PCIE_PME=y +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_PCI_MSI=y +# CONFIG_PCI_STUB is not set +CONFIG_HT_IRQ=y +# CONFIG_PCI_IOV is not set +CONFIG_PCI_IOAPIC=y +CONFIG_PCI_LABEL=y +CONFIG_ISA_DMA_API=y +# CONFIG_PCCARD is not set +# CONFIG_HOTPLUG_PCI is not set +# CONFIG_RAPIDIO is not set + +# +# Executable file formats / Emulations +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_HAVE_AOUT is not set +CONFIG_BINFMT_MISC=y +# CONFIG_IA32_EMULATION is not set +# CONFIG_COMPAT_FOR_U64_ALIGNMENT is not set +CONFIG_HAVE_TEXT_POKE_SMP=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET6_XFRM_MODE_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_BEET is not set +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +CONFIG_HAVE_BPF_JIT=y +# CONFIG_BPF_JIT is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +# CONFIG_BT_BNEP is not set +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +# CONFIG_BT_HCIUART is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT_MRVL is not set +# CONFIG_BT_ATH3K is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_DEFAULT_PS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=y +CONFIG_MAC80211_HAS_RC=y +# CONFIG_MAC80211_RC_PID is not set +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_MINSTREL_HT=y +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUG_MENU is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_PNP=y +# CONFIG_PNP_DEBUG_MESSAGES is not set + +# +# Protocols +# +CONFIG_PNPACPI=y +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_RBD is not set +# CONFIG_SENSORS_LIS3LV02D is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_IBM_ASM is not set +# CONFIG_PHANTOM is not set +# CONFIG_INTEL_MID_PTI is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_TIFM_CORE is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_CS5535_MFGPT is not set +# CONFIG_HP_ILO is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_VMWARE_BALLOON is not set +# CONFIG_BMP085 is not set +# CONFIG_PCH_PHUB is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=m +# CONFIG_CB710_CORE is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_SENSORS_LIS3_I2C is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +# CONFIG_ATA_VERBOSE_ERROR is not set +CONFIG_ATA_ACPI=y +CONFIG_SATA_PMP=y + +# +# Controllers with non-SFF native interface +# +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +# CONFIG_SATA_INIC162X is not set +# CONFIG_SATA_ACARD_AHCI is not set +# CONFIG_SATA_SIL24 is not set +CONFIG_ATA_SFF=y + +# +# SFF controllers with custom DMA interface +# +# CONFIG_PDC_ADMA is not set +# CONFIG_SATA_QSTOR is not set +# CONFIG_SATA_SX4 is not set +CONFIG_ATA_BMDMA=y + +# +# SATA SFF controllers with BMDMA +# +CONFIG_ATA_PIIX=y +# CONFIG_SATA_MV is not set +CONFIG_SATA_NV=y +# CONFIG_SATA_PROMISE is not set +# CONFIG_SATA_SIL is not set +# CONFIG_SATA_SIS is not set +# CONFIG_SATA_SVW is not set +# CONFIG_SATA_ULI is not set +# CONFIG_SATA_VIA is not set +# CONFIG_SATA_VITESSE is not set + +# +# PATA SFF controllers with BMDMA +# +# CONFIG_PATA_ALI is not set +# CONFIG_PATA_AMD is not set +# CONFIG_PATA_ARASAN_CF is not set +# CONFIG_PATA_ARTOP is not set +# CONFIG_PATA_ATIIXP is not set +# CONFIG_PATA_ATP867X is not set +# CONFIG_PATA_CMD64X is not set +# CONFIG_PATA_CS5520 is not set +# CONFIG_PATA_CS5530 is not set +# CONFIG_PATA_CS5536 is not set +# CONFIG_PATA_CYPRESS is not set +# CONFIG_PATA_EFAR is not set +# CONFIG_PATA_HPT366 is not set +# CONFIG_PATA_HPT37X is not set +# CONFIG_PATA_HPT3X2N is not set +# CONFIG_PATA_HPT3X3 is not set +# CONFIG_PATA_IT8213 is not set +# CONFIG_PATA_IT821X is not set +# CONFIG_PATA_JMICRON is not set +# CONFIG_PATA_MARVELL is not set +# CONFIG_PATA_NETCELL is not set +# CONFIG_PATA_NINJA32 is not set +# CONFIG_PATA_NS87415 is not set +# CONFIG_PATA_OLDPIIX is not set +# CONFIG_PATA_OPTIDMA is not set +# CONFIG_PATA_PDC2027X is not set +# CONFIG_PATA_PDC_OLD is not set +# CONFIG_PATA_RADISYS is not set +# CONFIG_PATA_RDC is not set +# CONFIG_PATA_SC1200 is not set +# CONFIG_PATA_SCH is not set +# CONFIG_PATA_SERVERWORKS is not set +# CONFIG_PATA_SIL680 is not set +# CONFIG_PATA_SIS is not set +# CONFIG_PATA_TOSHIBA is not set +# CONFIG_PATA_TRIFLEX is not set +# CONFIG_PATA_VIA is not set +# CONFIG_PATA_WINBOND is not set + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_CMD640_PCI is not set +# CONFIG_PATA_MPIIX is not set +# CONFIG_PATA_NS87410 is not set +# CONFIG_PATA_OPTI is not set +# CONFIG_PATA_PLATFORM is not set +# CONFIG_PATA_RZ1000 is not set + +# +# Generic fallback / legacy drivers +# +CONFIG_PATA_ACPI=y +CONFIG_ATA_GENERIC=y +# CONFIG_PATA_LEGACY is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +CONFIG_FIREWIRE=m +CONFIG_FIREWIRE_OHCI=m +CONFIG_FIREWIRE_OHCI_DEBUG=y +CONFIG_FIREWIRE_SBP2=m +# CONFIG_FIREWIRE_NET is not set +# CONFIG_FIREWIRE_NOSY is not set +# CONFIG_I2O is not set +# CONFIG_MACINTOSH_DRIVERS is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_NET_SB1000 is not set +# CONFIG_ARCNET is not set +CONFIG_MII=y +# CONFIG_PHYLIB is not set +# CONFIG_NET_ETHERNET is not set +CONFIG_NETDEV_1000=y +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_E1000E is not set +# CONFIG_IP1000 is not set +# CONFIG_IGB is not set +# CONFIG_IGBVF is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +CONFIG_R8169=y +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set +# CONFIG_CNIC is not set +# CONFIG_QLA3XXX is not set +# CONFIG_ATL1 is not set +# CONFIG_ATL1E is not set +# CONFIG_ATL1C is not set +# CONFIG_JME is not set +# CONFIG_STMMAC_ETH is not set +# CONFIG_PCH_GBE is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_TR is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +# CONFIG_AIRO is not set +# CONFIG_ATMEL is not set +# CONFIG_AT76C50X_USB is not set +# CONFIG_PRISM54 is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_RTL8180 is not set +# CONFIG_RTL8187 is not set +# CONFIG_ADM8211 is not set +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_MWL8K is not set +CONFIG_ATH_COMMON=m +# CONFIG_ATH_DEBUG is not set +# CONFIG_ATH5K is not set +# CONFIG_ATH5K_PCI is not set +# CONFIG_ATH9K is not set +# CONFIG_ATH9K_HTC is not set +CONFIG_CARL9170=m +CONFIG_CARL9170_LEDS=y +CONFIG_CARL9170_WPC=y +# CONFIG_B43 is not set +# CONFIG_B43LEGACY is not set +# CONFIG_HOSTAP is not set +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_IWLAGN is not set +# CONFIG_IWL4965 is not set +# CONFIG_IWL3945 is not set +# CONFIG_LIBERTAS is not set +# CONFIG_HERMES is not set +# CONFIG_P54_COMMON is not set +CONFIG_RT2X00=m +# CONFIG_RT2400PCI is not set +# CONFIG_RT2500PCI is not set +# CONFIG_RT61PCI is not set +# CONFIG_RT2800PCI is not set +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT33XX=y +# CONFIG_RT2800USB_RT35XX is not set +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RT2800_LIB=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +# CONFIG_RTL8192CE is not set +# CONFIG_RTL8192SE is not set +CONFIG_RTL8192CU=m +CONFIG_RTLWIFI=m +CONFIG_RTL8192C_COMMON=m +# CONFIG_WL1251 is not set +# CONFIG_WL12XX_MENU is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=m +# CONFIG_USB_NET_AX8817X is not set +# CONFIG_USB_NET_CDCETHER is not set +# CONFIG_USB_NET_CDC_EEM is not set +# CONFIG_USB_NET_CDC_NCM is not set +CONFIG_USB_NET_DM9601=m +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_KALMIA is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_VMXNET3 is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ADP5589 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT1070 is not set +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_MPR121 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_APANEL is not set +# CONFIG_INPUT_ATLAS_BTNS is not set +CONFIG_INPUT_ATI_REMOTE=m +CONFIG_INPUT_ATI_REMOTE2=m +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_APPLEIR is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_NOZOMI is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=m +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_SERIAL_8250_PCI=m +# CONFIG_SERIAL_8250_PNP is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MFD_HSU is not set +CONFIG_SERIAL_CORE=m +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_PCH_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_MWAVE is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +# CONFIG_HANGCHECK_TIMER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set +CONFIG_DEVPORT=y +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +CONFIG_I2C_I801=y +CONFIG_I2C_ISCH=y +# CONFIG_I2C_PIIX4 is not set +CONFIG_I2C_NFORCE2=y +# CONFIG_I2C_NFORCE2_S4985 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set + +# +# ACPI drivers +# +# CONFIG_I2C_SCMI is not set + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +CONFIG_I2C_INTEL_MID=y +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set +# CONFIG_I2C_EG20T is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# + +# +# Enable Device Drivers -> PPS to see the PTP clock options. +# +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +# CONFIG_GPIOLIB is not set +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_BATTERY_MAX17042 is not set +# CONFIG_CHARGER_MAX8903 is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ABITUGURU3 is not set +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_K8TEMP is not set +# CONFIG_SENSORS_K10TEMP is not set +# CONFIG_SENSORS_FAM15H_POWER is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_I5K_AMB is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_FSCHMD is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +CONFIG_SENSORS_CORETEMP=y +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_VIA_CPUTEMP is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_VT8231 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_SENSORS_APPLESMC is not set + +# +# ACPI drivers +# +# CONFIG_SENSORS_ACPI_POWER is not set +# CONFIG_SENSORS_ATK0110 is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +# CONFIG_SSB_B43_PCI_BRIDGE is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_DRIVER_PCICORE=y +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set +CONFIG_MFD_SUPPORT=y +CONFIG_MFD_CORE=y +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS6507X is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_CS5535 is not set +CONFIG_LPC_SCH=y +# CONFIG_MFD_RDC321X is not set +# CONFIG_MFD_JANZ_CMODIO is not set +# CONFIG_MFD_VX855 is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_REGULATOR is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +# CONFIG_MEDIA_CONTROLLER is not set +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_DVB_CORE=y +CONFIG_VIDEO_MEDIA=y + +# +# Multimedia drivers +# +CONFIG_RC_CORE=y +CONFIG_LIRC=y +CONFIG_RC_MAP=y +CONFIG_IR_NEC_DECODER=y +CONFIG_IR_RC5_DECODER=y +CONFIG_IR_RC6_DECODER=y +CONFIG_IR_JVC_DECODER=y +CONFIG_IR_SONY_DECODER=y +CONFIG_IR_RC5_SZ_DECODER=y +# CONFIG_IR_LIRC_CODEC is not set +# CONFIG_IR_ENE is not set +# CONFIG_IR_IMON is not set +# CONFIG_IR_MCEUSB is not set +# CONFIG_IR_ITE_CIR is not set +# CONFIG_IR_FINTEK is not set +CONFIG_IR_NUVOTON=y +# CONFIG_IR_REDRAT3 is not set +# CONFIG_IR_STREAMZAP is not set +# CONFIG_IR_WINBOND_CIR is not set +# CONFIG_RC_LOOPBACK is not set +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=y +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_TEA5761=y +CONFIG_MEDIA_TUNER_TEA5767=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_HELPER_CHIPS_AUTO=y +CONFIG_VIDEO_IR_I2C=y + +# +# Audio decoders, processors and mixers +# + +# +# RDS decoders +# + +# +# Video decoders +# + +# +# Video and audio decoders +# + +# +# MPEG video encoders +# + +# +# Video encoders +# + +# +# Camera sensor devices +# + +# +# Video improvement chips +# + +# +# Miscelaneous helper chips +# +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_SAA7134 is not set +# CONFIG_VIDEO_MXB is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_CX88 is not set +# CONFIG_VIDEO_CX23885 is not set +# CONFIG_VIDEO_AU0828 is not set +# CONFIG_VIDEO_IVTV is not set +# CONFIG_VIDEO_CX18 is not set +# CONFIG_VIDEO_SAA7164 is not set +# CONFIG_VIDEO_CAFE_CCIC is not set +# CONFIG_VIDEO_SR030PC30 is not set +# CONFIG_VIDEO_NOON010PC30 is not set +# CONFIG_SOC_CAMERA is not set +# CONFIG_V4L_USB_DRIVERS is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +CONFIG_RADIO_ADAPTERS=y +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_I2C_SI4713 is not set +# CONFIG_RADIO_SI4713 is not set +# CONFIG_USB_DSBR is not set +# CONFIG_RADIO_SI470X is not set +# CONFIG_USB_MR800 is not set +# CONFIG_RADIO_TEA5764 is not set +# CONFIG_RADIO_SAA7706H is not set +# CONFIG_RADIO_TEF6862 is not set +# CONFIG_RADIO_WL1273 is not set + +# +# Texas Instruments WL128x FM driver (ST based) +# +# CONFIG_RADIO_WL128X is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_TTPCI_EEPROM is not set +# CONFIG_DVB_AV7110 is not set +# CONFIG_DVB_BUDGET_CORE is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=y +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +# CONFIG_DVB_USB_UMT_010 is not set +# CONFIG_DVB_USB_CXUSB is not set +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +# CONFIG_DVB_USB_VP7045 is not set +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +# CONFIG_DVB_USB_NOVA_T_USB2 is not set +# CONFIG_DVB_USB_TTUSB2 is not set +# CONFIG_DVB_USB_DTT200U is not set +# CONFIG_DVB_USB_OPERA1 is not set +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_DW2102=m +# CONFIG_DVB_USB_CINERGY_T2 is not set +CONFIG_DVB_USB_ANYSEE=m +# CONFIG_DVB_USB_DTV5100 is not set +CONFIG_DVB_USB_RTL2832U=m +CONFIG_DVB_USB_AF9015=m +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +# CONFIG_DVB_USB_AZ6027 is not set +# CONFIG_DVB_USB_LME2510 is not set +CONFIG_DVB_USB_TECHNISAT_USB2=m +# CONFIG_DVB_TTUSB_BUDGET is not set +# CONFIG_DVB_TTUSB_DEC is not set +CONFIG_SMS_SIANO_MDTV=m + +# +# Siano module components +# +CONFIG_SMS_USB_DRV=m + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_FLEXCOP is not set + +# +# Supported BT878 Adapters +# + +# +# Supported Pluto2 Adapters +# +# CONFIG_DVB_PLUTO2 is not set + +# +# Supported SDMC DM1105 Adapters +# +# CONFIG_DVB_DM1105 is not set + +# +# Supported FireWire (IEEE 1394) Adapters +# +# CONFIG_DVB_FIREDTV is not set + +# +# Supported Earthsoft PT1 Adapters +# +# CONFIG_DVB_PT1 is not set + +# +# Supported Mantis Adapters +# +# CONFIG_MANTIS_CORE is not set + +# +# Supported nGene Adapters +# +# CONFIG_DVB_NGENE is not set + +# +# Supported DVB Frontends +# +# CONFIG_DVB_FE_CUSTOMISE is not set + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_STB6100=m +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV6110x=m + +# +# DVB-S (satellite) frontends +# +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_DS3000=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_AF9013=m + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_TDA10023=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +CONFIG_DVB_DIB8000=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_ISL6423=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +CONFIG_AGP=y +CONFIG_AGP_INTEL=y +# CONFIG_AGP_SIS is not set +# CONFIG_AGP_VIA is not set +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=16 +# CONFIG_VGA_SWITCHEROO is not set +# CONFIG_DRM is not set +# CONFIG_STUB_POULSBO is not set +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_BOOT_VESA_SUPPORT=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_WMT_GE_ROPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ARC is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_VGA16 is not set +CONFIG_FB_VESA=y +# CONFIG_FB_N411 is not set +# CONFIG_FB_HGA is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_LE80578 is not set +# CONFIG_FB_INTEL is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_S3 is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_VIA is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_VT8623 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_GEODE is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_UDL is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=m +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +CONFIG_SND_HRTIMER=y +CONFIG_SND_DYNAMIC_MINORS=y +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_DMA_SGBUF=y +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +CONFIG_SND_PCI=y +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ASIHPI is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AW2 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_OXYGEN is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_CS5530 is not set +# CONFIG_SND_CS5535AUDIO is not set +# CONFIG_SND_CTXFI is not set +# CONFIG_SND_DARLA20 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_DARLA24 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MONA is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIOX is not set +# CONFIG_SND_INDIGODJX is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_HWDEP=y +CONFIG_SND_HDA_RECONFIG=y +CONFIG_SND_HDA_INPUT_BEEP=y +CONFIG_SND_HDA_INPUT_BEEP_MODE=2 +CONFIG_SND_HDA_INPUT_JACK=y +CONFIG_SND_HDA_PATCH_LOADER=y +CONFIG_SND_HDA_CODEC_REALTEK=y +# CONFIG_SND_HDA_CODEC_ANALOG is not set +# CONFIG_SND_HDA_CODEC_SIGMATEL is not set +# CONFIG_SND_HDA_CODEC_VIA is not set +CONFIG_SND_HDA_CODEC_HDMI=y +# CONFIG_SND_HDA_CODEC_CIRRUS is not set +# CONFIG_SND_HDA_CODEC_CONEXANT is not set +# CONFIG_SND_HDA_CODEC_CA0110 is not set +# CONFIG_SND_HDA_CODEC_CMEDIA is not set +# CONFIG_SND_HDA_CODEC_SI3054 is not set +CONFIG_SND_HDA_GENERIC=y +# CONFIG_SND_HDA_POWER_SAVE is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LOLA is not set +# CONFIG_SND_LX6464ES is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VIRTUOSO is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_USX2Y is not set +# CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_US122L is not set +# CONFIG_SND_USB_6FIRE is not set +# CONFIG_SND_FIREWIRE is not set +# CONFIG_SND_SOC is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +CONFIG_HIDRAW=y + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# Special HID drivers +# +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACRUX is not set +CONFIG_HID_APPLE=y +CONFIG_HID_AUREAL=y +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EMS_FF is not set +# CONFIG_HID_ELECOM is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_KEYTOUCH is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +CONFIG_HID_TWINHAN=y +# CONFIG_HID_KENSINGTON is not set +# CONFIG_HID_LCPOWER is not set +CONFIG_HID_LOGITECH=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +# CONFIG_LOGIWII_FF is not set +# CONFIG_HID_MAGICMOUSE is not set +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_MULTITOUCH is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_ARVO is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_KONEPLUS is not set +# CONFIG_HID_ROCCAT_KOVAPLUS is not set +# CONFIG_HID_ROCCAT_PYRA is not set +# CONFIG_HID_SAMSUNG is not set +CONFIG_HID_SONY=y +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_WACOM is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DEVICE_CLASS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_XHCI_HCD=y +# CONFIG_USB_XHCI_HCD_DEBUGGING is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_WHCI_HCD is not set +# CONFIG_USB_HWA_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set +# CONFIG_USB_UAS is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_EZUSB is not set +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_UWB is not set +# CONFIG_MMC is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_ALIX2 is not set +# CONFIG_LEDS_PCA9532 is not set +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_CLEVO_MAIL is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_INTEL_SS4200 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +# CONFIG_LEDS_TRIGGER_TIMER is not set +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# +# CONFIG_NFC_DEVICES is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_INFINIBAND is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set +# CONFIG_RTC_DRV_EM3027 is not set +# CONFIG_RTC_DRV_RV3029C2 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +CONFIG_RTC_DRV_CMOS=y +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +CONFIG_STAGING=y +# CONFIG_ET131X is not set +# CONFIG_SLICOSS is not set +# CONFIG_VIDEO_GO7007 is not set +# CONFIG_VIDEO_CX25821 is not set +# CONFIG_VIDEO_TM6000 is not set +# CONFIG_USBIP_CORE is not set +# CONFIG_W35UND is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_BRCMUTIL is not set +# CONFIG_BRCMSMAC is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8187SE is not set +# CONFIG_RTL8192U is not set +# CONFIG_RTL8192E is not set +CONFIG_R8712U=m +CONFIG_R8712_AP=y +# CONFIG_RTS_PSTOR is not set +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_IDE_PHISON is not set +# CONFIG_LINE6_USB is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set +# CONFIG_VT6655 is not set +# CONFIG_VT6656 is not set +# CONFIG_HYPERV is not set +# CONFIG_VME_BUS is not set +# CONFIG_DX_SEP is not set +# CONFIG_IIO is not set +CONFIG_XVMALLOC=y +# CONFIG_ZRAM is not set +CONFIG_ZCACHE=y +# CONFIG_FB_SM7XX is not set +# CONFIG_VIDEO_DT3155 is not set +# CONFIG_CRYSTALHD is not set +# CONFIG_FB_XGI is not set +CONFIG_LIRC_STAGING=y +# CONFIG_LIRC_BT829 is not set +CONFIG_LIRC_IGORPLUGUSB=m +# CONFIG_LIRC_IMON is not set +# CONFIG_LIRC_SASEM is not set +CONFIG_LIRC_SERIAL=m +CONFIG_LIRC_SERIAL_TRANSMITTER=y +# CONFIG_LIRC_SIR is not set +# CONFIG_LIRC_TTUSBIR is not set +# CONFIG_LIRC_ZILOG is not set +# CONFIG_EASYCAP is not set +# CONFIG_SOLO6X10 is not set +# CONFIG_ACPI_QUICKSTART is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_USB_ENESTORAGE is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set +# CONFIG_INTEL_MEI is not set +# CONFIG_X86_PLATFORM_DEVICES is not set + +# +# Firmware Drivers +# +# CONFIG_EDD is not set +# CONFIG_FIRMWARE_MEMMAP is not set +# CONFIG_DELL_RBU is not set +# CONFIG_DCDBAS is not set +CONFIG_DMIID=y +# CONFIG_DMI_SYSFS is not set +# CONFIG_ISCSI_IBFT_FIND is not set +# CONFIG_SIGMA is not set +# CONFIG_GOOGLE_FIRMWARE is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_XATTR is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +# CONFIG_CUSE is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +# CONFIG_SQUASHFS_LZO is not set +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_SLUB_STATS is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +CONFIG_ARCH_WANT_FRAME_POINTERS=y +# CONFIG_FRAME_POINTER is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=60 +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_USER_STACKTRACE_SUPPORT=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y +CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_KMEMCHECK=y +# CONFIG_TEST_KSTRTOX is not set +CONFIG_STRICT_DEVMEM=y +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_EARLY_PRINTK is not set +# CONFIG_DEBUG_SET_MODULE_RONX is not set +# CONFIG_IOMMU_STRESS is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y +CONFIG_IO_DELAY_TYPE_0X80=0 +CONFIG_IO_DELAY_TYPE_0XED=1 +CONFIG_IO_DELAY_TYPE_UDELAY=2 +CONFIG_IO_DELAY_TYPE_NONE=3 +CONFIG_IO_DELAY_0X80=y +# CONFIG_IO_DELAY_0XED is not set +# CONFIG_IO_DELAY_UDELAY is not set +# CONFIG_IO_DELAY_NONE is not set +CONFIG_DEFAULT_IO_DELAY_TYPE=0 +CONFIG_OPTIMIZE_INLINING=y + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +# CONFIG_INTEL_TXT is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CRC32C_INTEL is not set +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_X86_64 is not set +# CONFIG_CRYPTO_AES_NI_INTEL is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SALSA20_X86_64 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_TWOFISH_X86_64 is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +CONFIG_HAVE_KVM=y +# CONFIG_VIRTUALIZATION is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CHECK_SIGNATURE=y +CONFIG_CPU_RMAP=y +CONFIG_NLATTR=y +CONFIG_AVERAGE=y diff --git a/projects/Ultra/options b/projects/Ultra/options new file mode 100644 index 0000000000..deb015fee8 --- /dev/null +++ b/projects/Ultra/options @@ -0,0 +1,239 @@ +# Name of the Distro to build (full name, without special charcters) + DISTRONAME="OpenELEC_EDEN" + +# Welcome Message for e.g. SSH Server (up to 5 Lines) + GREATING0="##############################################" + GREATING1="# OpenELEC - The living room PC for everyone #" + GREATING2="# ...... visit http://www.openelec.tv ...... #" + GREATING3="##############################################" + GREATING4="" + +# Hostname for target system (openelec) + HOSTNAME="openelec" + +# Root password to integrate in the target system + ROOT_PASSWORD="openelec" + +# User to integrate in the target system + USER_NAME="openelec" + +# User group to integrate in the target system + USER_GROUP="openelec" + +# User password to integrate in the target system + USER_PASSWORD="openelec" + +# The TARGET_CPU variable controls which processor should be targeted for +# generated code. + case $TARGET_ARCH in + i386) + # (AMD CPUs) k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 + # athlon-fx athlon-mp athlon-xp athlon-4 + # athlon-tbird athlon k6-3 k6-2 k6 geode + # (Intel CPUs) atom core2 nocona prescott pentium4[m] pentium3[m] + # pentium-m pentium2 pentiumpro pentium-mmx pentium + # i686 i586 i486 i386 + # (VIA CPUs) c3 c3-2 + # + TARGET_CPU="atom" + ;; + + x86_64) + # (AMD CPUs) k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 + # athlon-fx amdfam10 barcelona + # (Intel CPUs) atom core2 nocona + # + TARGET_CPU="atom" + ;; + + arm) + # TARGET_CPU: + # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d + # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c + # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t + # arm720t arm740t strongarm strongarm110 strongarm1100 + # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t + # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi + # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e + # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s + # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4 + # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312. + # + TARGET_CPU="cortex-a9" + + # TARGET_FPU: + # This specifies what floating point hardware (or hardware emulation) is + # available on the target. Permissible names are: + # fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 + # vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16 + # neon-vfpv4. + TARGET_FPU="neon" + ;; + esac + +# Build optimizations (size/normal/speed) + OPTIMIZATIONS="speed" + +# Project CFLAGS + PROJECT_CFLAGS="-mfpmath=sse -ftree-vectorize -mmovbe" + +# Bootloader to use (syslinux / u-boot / atv-bootloader) + BOOTLOADER="syslinux" + +# Configuration for u-boot + UBOOT_CONFIG="" + +# Kernel to use. values can be: +# default: default mainline kernel +# ti-omap4: Ti's OMAP4 kernel + LINUX="default" + +# use linux-next (latest rc) instead latest released version + LINUX_NEXT="no" + +# Mediacenter to use (xbmc / no) + MEDIACENTER="xbmc" + +# Skins to install (Confluence) + SKINS="Confluence" + +# Default Skin (Confluence) + SKIN_DEFAULT="Confluence" + +# Plugins for XBMC to install (SABnzbd) +# Space separated list is supported, +# e.g. XBMC_PLUGINS="SABnzbd" + XBMC_PLUGINS="" + +# build and install 'ProjectM' Visualization (yes / no) + XBMC_VIS_PROJECTM="yes" + +# build and install with non-free support +# (RAR compression support in XBMC) (yes / no) + NONFREE_SUPPORT="yes" + +# build and install with DVDCSS support +# (DVD decryption support in XBMC) (yes / no) + DVDCSS_SUPPORT="yes" + +# additional drivers to install: +# asix-ax887xx: Asix AX887xx USB LAN Driver +# Space separated list is supported, +# e.g. ADDITIONAL_DRIVERS="asix-ax887xx" + ADDITIONAL_DRIVERS="asix-ax887xx" + +# build with network support (yes / no) + NETWORK="yes" + +# build with netmount (mounting network drives on boot) support (yes / no) + NETMOUNT="yes" + +# build and install with XBMC webfrontend (yes / no) + WEBSERVER="yes" + +# build and install Avahi (Zeroconf) daemon (yes / no) + AVAHI_DAEMON="yes" + +# build and install Samba Server (yes / no) + SAMBA_SERVER="yes" + +# build and install SFTP Server (yes / no) + SFTP_SERVER="yes" + +# build and install diskmounter service (udisks) +# this service provide auto mounting support for external drives +# in the mediacenter also automount internally drives at boottime (yes / no) + UDISKS="yes" + +# build and install powermanagement support (upower) (yes / no) + UPOWER="yes" + +# build and install NTFS-3G fuse support (yes / no) + NTFS3G="yes" + +# build and install hfs filesystem utilities (yes / no) + HFSTOOLS="yes" + +# build and install Apple device mount support (via ifuse) (yes / no) + APPLEMOUNT="yes" + +# Displayserver to use (xorg-server / no) + DISPLAYSERVER="xorg-server" + +# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau,vmware) +# Space separated list is supported, +# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeon nvidia nouveau" + GRAPHIC_DRIVERS="nvidia" + +# use libdrm-master (latest git) instead latest released version + LIBDRM_MASTER="no" + +# use Mesa-master (latest git) instead latest released version + MESA_MASTER="no" + +# use linux-next (latest rc) instead latest released version + LINUX_NEXT="no" + +# Use VDPAU video acceleration (needs nVidia driver and a supported card) + VDPAU="yes" + +# Use VAAPI video acceleration (needs intel i965 driver and a supported card) + VAAPI="no" + +# Use Broadcom CrystalHD Decoder Card for video acceleration +# (needs Kernelsupport for Broadcom Decoder Card and a supported card) + CRYSTALHD="no" + +# build and install remote support (yes / no) + REMOTE_SUPPORT="yes" + +# build and install WiiMote support (yes / no) + WIIMOTE_SUPPORT="yes" + +# build and install PS3 Remote support (yes / no) + PS3REMOTE_SUPPORT="yes" + +# build and install ATV IR remote support (yes / no) + ATVCLIENT_SUPPORT="no" + +# LCD driver to Use - Possible drivers are ( Comma seperated: +# bayrad,CFontz,CFontz633,CFontzPacket,CwLnx,ea65, +# EyeboxOne,g15,glcdlib,glk,hd44780,i2500vfd,icp_a106,imon,imonlcd, +# IOWarrior,irman,irtrans,joy,lb216,lcdm001,lcterm,lirc,lis, +# MD8800,ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,picolcd, +# pyramid,sed1330,sed1520,serialPOS,serialVFD,shuttleVFD,sli, +# stv5730,SureElec,t6963,text,tyan,ula200,xosd +# 'all' compiles all drivers; +# 'all,!xxx,!yyy' de-selects previously selected drivers +# "none" for disable LCD support + LCD_DRIVER="irtrans,imon,imonlcd" + +# additional Firmware to use (dvb-firmware, wlan-firmware) +# Space separated list is supported, +# e.g. FIRMWARE="dvb-firmware, wlan-firmware" + FIRMWARE="dvb-firmware wlan-firmware" + +# build with lm_sensors hardware monitoring support (yes / no) + SENSOR_SUPPORT="yes" + +# build with automatic update support (yes / no) + UPDATE_SUPPORT="yes" + +# build with installer (yes / no) + INSTALLER_SUPPORT="yes" + +# Testpackages for development (yes / no) + TESTING="no" + +# OEM packages for OEM's (yes / no) + OEM_SUPPORT="no" + +# Coreboot support (yes / no) + COREBOOT="no" + +# Addon Server Url + ADDON_SERVER_URL="http://addons.openelec.tv" + +# set the addon dirs + ADDON_PATH="$OS_VERSION/$PROJECT/$TARGET_ARCH" + ADDON_URL="$ADDON_SERVER_URL/$ADDON_PATH" diff --git a/packages/network/portmap/meta b/tools/mkpkg/mkpkg_Mesa-7.11 old mode 100644 new mode 100755 similarity index 62% rename from packages/network/portmap/meta rename to tools/mkpkg/mkpkg_Mesa-7.11 index c8e8eab2d4..21e01f89f1 --- a/packages/network/portmap/meta +++ b/tools/mkpkg/mkpkg_Mesa-7.11 @@ -1,3 +1,4 @@ +#!/bin/sh ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) @@ -18,19 +19,25 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -PKG_NAME="portmap" -PKG_VERSION="4" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="OSS" -PKG_SITE="ftp://ftp.porcupine.org/pub/security/" -PKG_URL="ftp://ftp.porcupine.org/pub/security/${PKG_NAME}_${PKG_VERSION}.tar.gz" -PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" -PKG_PRIORITY="optional" -PKG_SECTION="network" -PKG_SHORTDESC="portmap: RPC portmapper" -PKG_LONGDESC="This is an RPC portmapper that prevents theft of NIS (YP), NFS, and other sensitive information via the portmapper. As an option, the program supports access control in the style of the tcp wrapper (log_tcp) package." -PKG_IS_ADDON="no" +echo "getting sources..." + if [ ! -d Mesa-7.11.git ]; then + git clone git://anongit.freedesktop.org/mesa/mesa -b 7.11 Mesa-7.11.git + fi -PKG_AUTORECONF="no" + cd Mesa-7.11.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf Mesa-7.11-$GIT_REV + cp -R Mesa-7.11.git Mesa-7.11-$GIT_REV + +echo "cleaning sources..." + rm -rf Mesa-7.11-$GIT_REV/.git + +echo "packing sources..." + tar cvJf Mesa-7.11-$GIT_REV.tar.xz Mesa-7.11-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf Mesa-7.11-$GIT_REV diff --git a/packages/network/portmap/init.d/54_portmap b/tools/mkpkg/mkpkg_rtmpdump old mode 100644 new mode 100755 similarity index 58% rename from packages/network/portmap/init.d/54_portmap rename to tools/mkpkg/mkpkg_rtmpdump index 08ee2a7b26..f781434948 --- a/packages/network/portmap/init.d/54_portmap +++ b/tools/mkpkg/mkpkg_rtmpdump @@ -1,6 +1,7 @@ +#!/bin/sh ################################################################################ -# Copyright (C) 2009-2010 OpenELEC.tv -# http://www.openelec.tv +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,11 +19,25 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -# starting portmap -# -# runlevels: openelec, textmode +echo "getting sources..." + if [ ! -d rtmpdump.git ]; then + git clone git://git.ffmpeg.org/rtmpdump rtmpdump.git + fi -( - progress "starting portmap" - portmap -)& \ No newline at end of file + cd rtmpdump.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf rtmpdump-$GIT_REV + cp -R rtmpdump.git rtmpdump-$GIT_REV + +echo "cleaning sources..." + rm -rf rtmpdump-$GIT_REV/.git + +echo "packing sources..." + tar cvJf rtmpdump-$GIT_REV.tar.xz rtmpdump-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf rtmpdump-$GIT_REV