mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 17:41:05 +02:00
chore(x11-drivers): remove unneeded ebuilds
This commit is contained in:
parent
e43a016307
commit
126b50b99e
@ -1,7 +0,0 @@
|
||||
DEFINED_PHASES=install
|
||||
DESCRIPTION=Rules for setting permissions right on /dev/mali0
|
||||
EAPI=4
|
||||
KEYWORDS=arm
|
||||
LICENSE=BSD
|
||||
SLOT=0
|
||||
_md5_=992e7bee8e0705fcf9bd18cdaaec1d0c
|
@ -1,7 +0,0 @@
|
||||
DEFINED_PHASES=install
|
||||
DESCRIPTION=Rules for setting permissions right on /dev/mali0
|
||||
EAPI=4
|
||||
KEYWORDS=arm
|
||||
LICENSE=BSD
|
||||
SLOT=0
|
||||
_md5_=992e7bee8e0705fcf9bd18cdaaec1d0c
|
@ -1,15 +0,0 @@
|
||||
DEFINED_PHASES=compile install postinst postrm preinst prepare setup unpack
|
||||
DEPEND=<x11-base/xorg-server-1.9.99 kernel_linux? ( >=sys-libs/glibc-2.6.1 ) multilib? ( app-emulation/emul-linux-x86-xlibs ) >=app-admin/eselect-opengl-1.0.9 !<media-video/nvidia-settings-256.52 kernel_linux? ( virtual/linux-sources ) kernel_linux? ( virtual/modutils ) sys-apps/sed kernel_linux? ( virtual/linux-sources ) sys-apps/pciutils
|
||||
DESCRIPTION=NVIDIA X11 driver and GLX libraries
|
||||
EAPI=2
|
||||
HOMEPAGE=http://www.nvidia.com/
|
||||
IUSE=acpi custom-cflags gtk multilib kernel_linux kernel_linux
|
||||
KEYWORDS=-* ~amd64 ~x86 ~x86-fbsd
|
||||
LICENSE=NVIDIA
|
||||
PDEPEND=>=x11-libs/libvdpau-0.3-r1 gtk? ( media-video/nvidia-settings )
|
||||
RDEPEND=<x11-base/xorg-server-1.9.99 kernel_linux? ( >=sys-libs/glibc-2.6.1 ) multilib? ( app-emulation/emul-linux-x86-xlibs ) >=app-admin/eselect-opengl-1.0.9 !<media-video/nvidia-settings-256.52 x11-libs/libXvMC kernel_linux? ( virtual/modutils ) acpi? ( sys-power/acpid ) kernel_linux? ( virtual/modutils )
|
||||
RESTRICT=strip
|
||||
SLOT=0
|
||||
SRC_URI=x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/260.19.36/NVIDIA-Linux-x86-260.19.36.run ) amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/260.19.36/NVIDIA-Linux-x86_64-260.19.36.run ) x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/260.19.36/NVIDIA-FreeBSD-x86-260.19.36.tar.gz )
|
||||
_eclasses_=binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 linux-info 01b7a221ed254c010703fd454e011ea6 linux-mod 07a3d250a1268d811d3e8730e5741394 multilib 5f4ad6cf85e365e8f0c6050ddd21659e nvidia-driver f195f64263551aa3c4a9aff69ed97059 portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29 versionator 865bc8b2fc9fcfb6d520bdf5a110f5ed
|
||||
_md5_=eb8b68ad54621db9e4c589760db8ff53
|
@ -1,12 +0,0 @@
|
||||
DEFINED_PHASES=compile info install setup unpack
|
||||
DEPEND=x11-libs/libX11 x11-drivers/opengles-headers dev-vcs/git
|
||||
DESCRIPTION=OpenGL|ES mock library
|
||||
EAPI=4
|
||||
HOMEPAGE=http://www.khronos.org/opengles/2_X/
|
||||
IUSE=cros_workon_tree_1a5966915f51a670b1f1bd4fda10ec670b40244b
|
||||
KEYWORDS=arm x86
|
||||
LICENSE=SGI-B-2.0
|
||||
RDEPEND=x11-libs/libX11 x11-drivers/opengles-headers
|
||||
SLOT=0
|
||||
_eclasses_=binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=72c7bf2505c79a2fbc32f5a62e9703d6
|
@ -1,12 +0,0 @@
|
||||
DEFINED_PHASES=compile info install setup unpack
|
||||
DEPEND=x11-libs/libX11 x11-drivers/opengles-headers dev-vcs/git
|
||||
DESCRIPTION=OpenGL|ES mock library
|
||||
EAPI=4
|
||||
HOMEPAGE=http://www.khronos.org/opengles/2_X/
|
||||
IUSE=cros_workon_tree_
|
||||
KEYWORDS=~arm ~x86
|
||||
LICENSE=SGI-B-2.0
|
||||
RDEPEND=x11-libs/libX11 x11-drivers/opengles-headers
|
||||
SLOT=0
|
||||
_eclasses_=binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=02b7e831a4820d044457bfb81d793c38
|
@ -1,11 +0,0 @@
|
||||
DEFINED_PHASES=info install setup unpack
|
||||
DEPEND=dev-vcs/git
|
||||
DESCRIPTION=OpenGL|ES headers.
|
||||
EAPI=2
|
||||
HOMEPAGE=http://www.khronos.org/opengles/2_X/
|
||||
IUSE=cros_workon_tree_1a5966915f51a670b1f1bd4fda10ec670b40244b
|
||||
KEYWORDS=x86 arm
|
||||
LICENSE=SGI-B-2.0
|
||||
SLOT=0
|
||||
_eclasses_=binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=e898726ef860a0c3b55b099ffafffadd
|
@ -1,11 +0,0 @@
|
||||
DEFINED_PHASES=info install setup unpack
|
||||
DEPEND=dev-vcs/git
|
||||
DESCRIPTION=OpenGL|ES headers.
|
||||
EAPI=2
|
||||
HOMEPAGE=http://www.khronos.org/opengles/2_X/
|
||||
IUSE=cros_workon_tree_
|
||||
KEYWORDS=~x86 ~arm
|
||||
LICENSE=SGI-B-2.0
|
||||
SLOT=0
|
||||
_eclasses_=binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=688d878f6579919131fa744d9c5fd3cb
|
@ -1,11 +0,0 @@
|
||||
DEFINED_PHASES=compile configure info install prepare setup test unpack
|
||||
DEPEND=chromeos-base/gestures chromeos-base/libevdev app-misc/utouch-evemu x11-proto/inputproto || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool dev-vcs/git
|
||||
DESCRIPTION=Chromium OS multitouch driver regression tests.
|
||||
EAPI=4
|
||||
IUSE=cros_workon_tree_7d097ae9d618817e2c9a274a07c3ec207a631583
|
||||
KEYWORDS=arm amd64 x86
|
||||
LICENSE=BSD
|
||||
RDEPEND=chromeos-base/gestures chromeos-base/libevdev app-misc/utouch-evemu x11-proto/inputproto
|
||||
SLOT=0
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=8a5ea11aa36a73c4e56db6ab6f8ef1ac
|
@ -1,11 +0,0 @@
|
||||
DEFINED_PHASES=compile configure info install prepare setup test unpack
|
||||
DEPEND=chromeos-base/gestures chromeos-base/libevdev app-misc/utouch-evemu x11-proto/inputproto || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool dev-vcs/git
|
||||
DESCRIPTION=Chromium OS multitouch driver regression tests.
|
||||
EAPI=4
|
||||
IUSE=cros_workon_tree_
|
||||
KEYWORDS=~arm amd64 ~x86
|
||||
LICENSE=BSD
|
||||
RDEPEND=chromeos-base/gestures chromeos-base/libevdev app-misc/utouch-evemu x11-proto/inputproto
|
||||
SLOT=0
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=3c61498470d6bd908bb97cf565c66646
|
@ -1,11 +0,0 @@
|
||||
DEFINED_PHASES=compile configure info install prepare setup test unpack
|
||||
DEPEND=chromeos-base/gestures chromeos-base/libevdev x11-base/xorg-server x11-proto/inputproto || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool dev-vcs/git
|
||||
DESCRIPTION=Chromium OS multitouch input driver for Xorg X server.
|
||||
EAPI=4
|
||||
IUSE=cros_workon_tree_3b26ecfe0fc8246a9771a6b1539572d0d70e3ad1
|
||||
KEYWORDS=arm amd64 x86
|
||||
LICENSE=BSD
|
||||
RDEPEND=chromeos-base/gestures chromeos-base/libevdev x11-base/xorg-server
|
||||
SLOT=0
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=cf420d228f97cd5a8b4ee387258f2506
|
@ -1,11 +0,0 @@
|
||||
DEFINED_PHASES=compile configure info install prepare setup test unpack
|
||||
DEPEND=chromeos-base/gestures chromeos-base/libevdev x11-base/xorg-server x11-proto/inputproto || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool dev-vcs/git
|
||||
DESCRIPTION=Chromium OS multitouch input driver for Xorg X server.
|
||||
EAPI=4
|
||||
IUSE=cros_workon_tree_
|
||||
KEYWORDS=~arm ~amd64 ~x86
|
||||
LICENSE=BSD
|
||||
RDEPEND=chromeos-base/gestures chromeos-base/libevdev x11-base/xorg-server
|
||||
SLOT=0
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29
|
||||
_md5_=d96ebc46f1e988ac78f9b3120ae18bc5
|
@ -1,12 +0,0 @@
|
||||
DEFINED_PHASES=compile configure install postinst postrm prepare test unpack
|
||||
DEPEND=>=x11-base/xorg-server-1.10[udev] sys-libs/mtdev >=x11-proto/inputproto-2.1.99.3 >=sys-kernel/linux-headers-2.6 || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool x86-interix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) ppc-aix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 >=dev-util/pkgconfig-0.23 x11-proto/inputproto x11-proto/kbproto x11-proto/xproto x11-base/xorg-server[xorg]
|
||||
DESCRIPTION=Generic Linux input driver
|
||||
EAPI=4
|
||||
HOMEPAGE=http://xorg.freedesktop.org/
|
||||
KEYWORDS=~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86
|
||||
LICENSE=MIT
|
||||
RDEPEND=>=x11-base/xorg-server-1.10[udev] sys-libs/mtdev x11-base/xorg-server[xorg]
|
||||
SLOT=0
|
||||
SRC_URI=http://xorg.freedesktop.org/releases/individual/driver/xf86-input-evdev-2.7.3.tar.bz2
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29 xorg-2 b83efc910bb3ac2c64f89e2623f181f5
|
||||
_md5_=9d45ae64d4a90840058743a4ab653c51
|
@ -1,12 +0,0 @@
|
||||
DEFINED_PHASES=compile configure install postinst postrm prepare test unpack
|
||||
DEPEND=>=x11-base/xorg-server-1.10[udev] sys-libs/mtdev >=x11-proto/inputproto-2.1.99.3 >=sys-kernel/linux-headers-2.6 || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool x86-interix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) ppc-aix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 >=dev-util/pkgconfig-0.23 x11-proto/inputproto x11-proto/kbproto x11-proto/xproto x11-base/xorg-server[xorg]
|
||||
DESCRIPTION=Generic Linux input driver
|
||||
EAPI=4
|
||||
HOMEPAGE=http://xorg.freedesktop.org/
|
||||
KEYWORDS=~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86
|
||||
LICENSE=MIT
|
||||
RDEPEND=>=x11-base/xorg-server-1.10[udev] sys-libs/mtdev x11-base/xorg-server[xorg]
|
||||
SLOT=0
|
||||
SRC_URI=http://xorg.freedesktop.org/releases/individual/driver/xf86-input-evdev-2.7.3.tar.bz2
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29 xorg-2 b83efc910bb3ac2c64f89e2623f181f5
|
||||
_md5_=9d45ae64d4a90840058743a4ab653c51
|
@ -1,13 +0,0 @@
|
||||
DEFINED_PHASES=compile configure info install postinst postrm prepare setup test unpack
|
||||
DEPEND=>=x11-base/xorg-server-1.9 || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool x86-interix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) ppc-aix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 >=dev-util/pkgconfig-0.23 x11-proto/xf86driproto x11-proto/glproto x11-proto/dri2proto x11-proto/fontsproto x11-proto/randrproto x11-proto/renderproto x11-proto/videoproto x11-proto/xextproto x11-proto/xineramaproto x11-proto/xproto x11-base/xorg-server[-minimal] x11-libs/libdrm x11-base/xorg-server[xorg] x11-libs/libpciaccess dev-vcs/git
|
||||
DESCRIPTION=X.Org driver for ARM devices
|
||||
EAPI=4
|
||||
HOMEPAGE=http://xorg.freedesktop.org/
|
||||
IUSE=cros_workon_tree_0d2d6cd5e23e84585ebe72df251360086c8408bf
|
||||
KEYWORDS=-* arm
|
||||
LICENSE=MIT
|
||||
RDEPEND=>=x11-base/xorg-server-1.9 x11-base/xorg-server[-minimal] x11-libs/libdrm x11-base/xorg-server[xorg] x11-libs/libpciaccess
|
||||
SLOT=0
|
||||
SRC_URI=http://xorg.freedesktop.org/releases/individual/driver/xf86-video-armsoc-0.0.1.tar.bz2
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29 xorg-2 b83efc910bb3ac2c64f89e2623f181f5
|
||||
_md5_=76626a63ead6a130a7b910ce5e45c597
|
@ -1,12 +0,0 @@
|
||||
DEFINED_PHASES=compile configure info install postinst postrm prepare setup test unpack
|
||||
DEPEND=>=x11-base/xorg-server-1.9 || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool dev-vcs/git x86-interix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) ppc-aix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 >=dev-util/pkgconfig-0.23 x11-proto/xf86driproto x11-proto/glproto x11-proto/dri2proto x11-proto/fontsproto x11-proto/randrproto x11-proto/renderproto x11-proto/videoproto x11-proto/xextproto x11-proto/xineramaproto x11-proto/xproto x11-base/xorg-server[-minimal] x11-libs/libdrm x11-base/xorg-server[xorg] x11-libs/libpciaccess dev-vcs/git
|
||||
DESCRIPTION=X.Org driver for ARM devices
|
||||
EAPI=4
|
||||
HOMEPAGE=http://xorg.freedesktop.org/
|
||||
IUSE=cros_workon_tree_
|
||||
KEYWORDS=-* ~arm
|
||||
LICENSE=MIT
|
||||
RDEPEND=>=x11-base/xorg-server-1.9 x11-base/xorg-server[-minimal] x11-libs/libdrm x11-base/xorg-server[xorg] x11-libs/libpciaccess
|
||||
SLOT=0
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 cros-workon 5f2f8a42fa8e9e59f25015d9167f93a4 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 git-2 da60d6e85fa94cef4d510cab24e01e36 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29 xorg-2 b83efc910bb3ac2c64f89e2623f181f5
|
||||
_md5_=944ebfd311dc1090a8066b5328a5fcf8
|
@ -1,13 +0,0 @@
|
||||
DEFINED_PHASES=compile configure install postinst postrm prepare setup test unpack
|
||||
DEPEND=x11-libs/libXext x11-libs/libXfixes xvmc? ( x11-libs/libXvMC ) >=x11-libs/libxcb-1.5 >=x11-libs/libdrm-2.4.23[video_cards_intel] sna? ( >=x11-base/xorg-server-1.10 ) >=x11-proto/dri2proto-2.6 || ( >=sys-devel/automake-1.11.1:1.11 ) >=sys-devel/autoconf-2.68 sys-devel/libtool x86-interix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) ppc-aix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.14.0 >=media-fonts/font-util-1.2.0 ) >=dev-util/pkgconfig-0.23 dri? ( x11-proto/xf86driproto x11-proto/glproto x11-proto/dri2proto ) x11-proto/fontsproto x11-proto/randrproto x11-proto/renderproto x11-proto/videoproto x11-proto/xextproto x11-proto/xineramaproto x11-proto/xproto dri? ( x11-base/xorg-server[-minimal] x11-libs/libdrm ) x11-base/xorg-server[xorg] x11-libs/libpciaccess
|
||||
DESCRIPTION=X.Org driver for Intel cards
|
||||
EAPI=4
|
||||
HOMEPAGE=http://xorg.freedesktop.org/
|
||||
IUSE=dri sna xvmc broken_partialswaps dri
|
||||
KEYWORDS=amd64 ~ia64 x86 -x86-fbsd
|
||||
LICENSE=MIT
|
||||
RDEPEND=x11-libs/libXext x11-libs/libXfixes xvmc? ( x11-libs/libXvMC ) >=x11-libs/libxcb-1.5 >=x11-libs/libdrm-2.4.23[video_cards_intel] sna? ( >=x11-base/xorg-server-1.10 ) dri? ( x11-base/xorg-server[-minimal] x11-libs/libdrm ) x11-base/xorg-server[xorg] x11-libs/libpciaccess
|
||||
SLOT=0
|
||||
SRC_URI=http://xorg.freedesktop.org/releases/individual/driver/xf86-video-intel-2.16.0.tar.bz2
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d autotools-utils 966fed1f979132a778b0b48c74a16adb base fc89786f3f7e7bcf03334359bd5b639b binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 libtool 0fd90d183673bf1107465ec45849d1ea linux-info 01b7a221ed254c010703fd454e011ea6 multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29 versionator 865bc8b2fc9fcfb6d520bdf5a110f5ed xorg-2 b83efc910bb3ac2c64f89e2623f181f5
|
||||
_md5_=84828c443d7f2f2603fb2ab324282add
|
@ -1,12 +0,0 @@
|
||||
DEFINED_PHASES=compile install postinst postrm preinst unpack
|
||||
DEPEND=>=x11-base/xorg-server-1.0.99 x11-proto/fontsproto x11-proto/randrproto x11-proto/renderproto x11-proto/xextproto x11-proto/xproto || ( >=sys-devel/automake-1.11.1 ) >=sys-devel/autoconf-2.68 sys-devel/libtool >=sys-devel/libtool-1.5 >=sys-devel/m4-1.4 virtual/pkgconfig >=x11-misc/util-macros-1.3.0
|
||||
DESCRIPTION=Generic VESA video driver
|
||||
HOMEPAGE=http://xorg.freedesktop.org/
|
||||
IUSE=debug
|
||||
KEYWORDS=-* ~alpha amd64 ~ia64 x86 ~x86-fbsd
|
||||
LICENSE=MIT
|
||||
RDEPEND=>=x11-base/xorg-server-1.0.99 !<=x11-base/xorg-x11-6.9
|
||||
SLOT=0
|
||||
SRC_URI=http://xorg.freedesktop.org/releases/individual/driver/xf86-video-vesa-2.3.0.tar.bz2
|
||||
_eclasses_=autotools addbdf6cce5024ac93ad2084ad5e1d2d binutils-funcs 73669d0b20960c1cc54cf381a4b89e77 eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 libtool 0fd90d183673bf1107465ec45849d1ea multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 64fc271a237429f84f36b91c9f4b9912 user 9e552f935106ff0bc92af16da64b4b29 x-modular 9f4ee0c44a3a3b7ecdf52cefc1e10280
|
||||
_md5_=9ae88dd31766afb3218be4e38413dea4
|
@ -1 +0,0 @@
|
||||
KERNEL=="mali0", MODE="0660", GROUP="video"
|
@ -1 +0,0 @@
|
||||
mali-rules-0.0.1.ebuild
|
@ -1,24 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Rules for setting permissions right on /dev/mali0"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="arm"
|
||||
IUSE=""
|
||||
|
||||
# Because this ebuild has no source package, "${S}" doesn't get
|
||||
# automatically created. The compile phase depends on "${S}" to
|
||||
# exist, so we make sure "${S}" refers to a real directory.
|
||||
#
|
||||
# The problem is apparently an undocumented feature of EAPI 4;
|
||||
# earlier versions of EAPI don't require this.
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_install() {
|
||||
insinto /etc/udev/rules.d
|
||||
doins "${FILESDIR}"/50-mali.rules
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
DIST NVIDIA-FreeBSD-x86-260.19.36.tar.gz 27282754 SHA256 03e41a19ad93668034efa8306983b57b69fcca1e328a5a70c9295096fb9675d5 SHA512 0ae75d616202bd054c820ef0dd1cfa16fe0aa7dc73e7abc502aeb2a4c28f3469dc3d089e6e6f4b27c6002c79ab6ca96f8bca52da362f5b088210869f3da60961 WHIRLPOOL 26cc49ff77ef5f324fa73c4c856bdde7f5ce8b1eadc97680adf725eb64c048da829561c481549557855f45e4c54a248fd45c69104e3c1a45a66c6b440d5a5c5a
|
||||
DIST NVIDIA-Linux-x86-260.19.36.run 28558478 SHA256 6cfbb7cbfdb8ca5399303d43204e73ca3aad5bbc03c938f11ce5e154ec76cc6d SHA512 56e51ba75a0f82fb81701550a74d318f2693220327bceb551b37f90cd9f754d9f237624941ea3ce3f571c62b486df690410d1b7f211f6919a25c7a5bb73e25b4 WHIRLPOOL 698738d3b1df6b70d010f1cf57a0683ed71e28fde58da2e13a70eefbf2ce9b4fc103b8598edc0d3ae6d77eddff31a9a19079b1cb99d71a1d3035b68681309b5d
|
||||
DIST NVIDIA-Linux-x86_64-260.19.36.run 48081798 SHA256 35a8769585e1f9b426c9c21b5f5898c06251a642ed73e9fb9eea9ab87ef91067 SHA512 4f008c90296f22ba944b30d40138af865c82c17721b17368f6497d9b0c7dab50a8320eff90e6da3a5a592b9b8f9741284bbd6589754ae95d80fd489be9b2d126 WHIRLPOOL e0d399f72aba94c3f242e8c1929dd3174fc8a51aa91349b6bc9694922062dbebca6e077a1f7c382caed22fd0aa8c70754792414cfd5380368be2c75ceaeb3bd1
|
@ -1,2 +0,0 @@
|
||||
# Has to precede X11's own libraries!
|
||||
LDPATH=/opt/nvidia/lib
|
@ -1,30 +0,0 @@
|
||||
diff -Naurp NVIDIA-Linux-x86_64-195.30-pkg2-orig/usr/src/nv/conftest.sh NVIDIA-Linux-x86_64-195.30-pkg2/usr/src/nv/conftest.sh
|
||||
--- NVIDIA-Linux-x86_64-195.30-pkg2-orig/usr/src/nv/conftest.sh 2010-02-07 22:53:38.000000000 +0100
|
||||
+++ NVIDIA-Linux-x86_64-195.30-pkg2/usr/src/nv/conftest.sh 2010-02-07 22:57:10.000000000 +0100
|
||||
@@ -82,7 +82,7 @@ build_cflags() {
|
||||
|
||||
if [ "$OUTPUT" != "$SOURCES" ]; then
|
||||
MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
|
||||
- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
|
||||
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
|
||||
fi
|
||||
@@ -91,7 +91,7 @@ build_cflags() {
|
||||
fi
|
||||
else
|
||||
MACH_CFLAGS="-I$HEADERS/asm/mach-default"
|
||||
- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
|
||||
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
|
||||
fi
|
||||
@@ -102,7 +102,7 @@ build_cflags() {
|
||||
|
||||
CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS"
|
||||
|
||||
- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
|
||||
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
|
||||
CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
|
||||
fi
|
||||
if [ -n "$BUILD_PARAMS" ]; then
|
@ -1,30 +0,0 @@
|
||||
diff -NuarpbB NVIDIA-Linux-x86-256.25-ori/kernel/conftest.sh NVIDIA-Linux-x86-256.25/kernel/conftest.sh
|
||||
--- NVIDIA-Linux-x86-256.25-ori/kernel/conftest.sh 2010-05-19 05:38:57.000000000 +0200
|
||||
+++ NVIDIA-Linux-x86-256.25/kernel/conftest.sh 2010-05-22 02:13:56.000000000 +0200
|
||||
@@ -101,7 +101,7 @@ build_cflags() {
|
||||
|
||||
if [ "$OUTPUT" != "$SOURCES" ]; then
|
||||
MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
|
||||
- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
|
||||
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
|
||||
fi
|
||||
@@ -110,7 +110,7 @@ build_cflags() {
|
||||
fi
|
||||
else
|
||||
MACH_CFLAGS="-I$HEADERS/asm/mach-default"
|
||||
- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
|
||||
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
|
||||
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
|
||||
fi
|
||||
@@ -121,7 +121,7 @@ build_cflags() {
|
||||
|
||||
CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
|
||||
|
||||
- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
|
||||
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
|
||||
CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
|
||||
fi
|
||||
if [ -n "$BUILD_PARAMS" ]; then
|
@ -1,11 +0,0 @@
|
||||
diff -ur NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h
|
||||
--- NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h 2002-12-09 21:26:55.000000000 +0100
|
||||
+++ NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h 2003-01-30 18:20:23.000000000 +0100
|
||||
@@ -39,6 +39,7 @@
|
||||
typedef XID GLXPixmap;
|
||||
typedef XID GLXDrawable;
|
||||
typedef XID GLXPbuffer;
|
||||
+typedef XID GLXPbufferSGIX;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXFBConfigID;
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- usr/include/GL/gl.g.orig 2004-07-17 19:56:59.789410584 +1000
|
||||
+++ usr/include/GL/gl.h 2004-07-17 19:59:08.844791184 +1000
|
||||
@@ -66,6 +66,10 @@
|
||||
typedef double GLclampd;
|
||||
typedef void GLvoid;
|
||||
|
||||
+/* Patching for some better defines in the global system */
|
||||
+#ifndef GL_GLEXT_LEGACY
|
||||
+#include <GL/glext.h>
|
||||
+#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
@ -1,21 +0,0 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
|
||||
|
||||
# Install nvidia library:
|
||||
# the first parameter is the place where to install it
|
||||
# the second parameter is the base name of the library
|
||||
# the third parameter is the provided soversion
|
||||
donvidia() {
|
||||
dodir $1
|
||||
exeinto $1
|
||||
|
||||
libname=$(basename $2)
|
||||
|
||||
# libnvidia-cfg.so is no longer supplied in lib32; step over it gracefully
|
||||
if [ -e $2.$3 ] ; then
|
||||
doexe $2.$3
|
||||
dosym ${libname}.$3 $1/${libname}
|
||||
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1
|
||||
fi
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
|
||||
|
||||
mtrr_check() {
|
||||
ebegin "Checking for MTRR support"
|
||||
linux_chkconfig_present MTRR
|
||||
eend $?
|
||||
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
eerror "Please enable MTRR support in your kernel config, found at:"
|
||||
eerror
|
||||
eerror " Processor type and features"
|
||||
eerror " [*] MTRR (Memory Type Range Register) support"
|
||||
eerror
|
||||
eerror "and recompile your kernel ..."
|
||||
die "MTRR support not detected!"
|
||||
fi
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distribnuted under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
|
||||
#
|
||||
src_install-libs() {
|
||||
local pkglibdir=lib
|
||||
local inslibdir=$(get_libdir)
|
||||
|
||||
if [[ ${#} -eq 2 ]] ; then
|
||||
pkglibdir=${1}
|
||||
inslibdir=${2}
|
||||
elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then
|
||||
pkglibdir=lib32
|
||||
fi
|
||||
|
||||
local usrpkglibdir=usr/${pkglibdir}
|
||||
local libdir=usr/X11R6/${pkglibdir}
|
||||
local drvdir=${libdir}/modules/drivers
|
||||
local extdir=${libdir}/modules/extensions
|
||||
local incdir=usr/include/GL
|
||||
local sover=${PV}
|
||||
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia"
|
||||
local NO_TLS_ROOT="${NV_ROOT}/no-tls"
|
||||
local TLS_ROOT="${NV_ROOT}/tls"
|
||||
local X11_LIB_DIR="/usr/${inslibdir}/xorg"
|
||||
|
||||
if use x86-fbsd; then
|
||||
# on FreeBSD everything is on obj/
|
||||
pkglibdir=obj
|
||||
usrpkglibdir=obj
|
||||
x11pkglibdir=obj
|
||||
drvdir=obj
|
||||
extdir=obj
|
||||
|
||||
# don't ask me why the headers are there.. glxext.h is missing
|
||||
incdir=doc
|
||||
|
||||
# on FreeBSD it has just .1 suffix
|
||||
sover=1
|
||||
fi
|
||||
|
||||
# The GLX libraries
|
||||
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover}
|
||||
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover}
|
||||
|
||||
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover}
|
||||
|
||||
dodir ${NO_TLS_ROOT}
|
||||
donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover}
|
||||
|
||||
if ! use x86-fbsd; then
|
||||
donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover}
|
||||
fi
|
||||
|
||||
if want_tls ; then
|
||||
dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib
|
||||
dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib
|
||||
dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib
|
||||
else
|
||||
dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib
|
||||
dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib
|
||||
dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib
|
||||
fi
|
||||
|
||||
if ! use x86-fbsd; then
|
||||
# Install the .la file for libtool, to prevent e.g. bug #176423
|
||||
[ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR"
|
||||
local ver1=$(get_version_component_range 1)
|
||||
local ver2=$(get_version_component_range 2)
|
||||
local ver3=$(get_version_component_range 3)
|
||||
sed -e "s:\${PV}:${PV}:" \
|
||||
-e "s:\${ver1}:${ver1}:" \
|
||||
-e "s:\${ver2}:${ver2}:" \
|
||||
-e "s:\${ver3}:${ver3}:" \
|
||||
-e "s:\${libdir}:${inslibdir}:" \
|
||||
"${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la
|
||||
fi
|
||||
|
||||
exeinto ${X11_LIB_DIR}/modules/drivers
|
||||
|
||||
[[ -f ${drvdir}/nvidia_drv.so ]] && \
|
||||
doexe ${drvdir}/nvidia_drv.so
|
||||
|
||||
insinto /usr/${inslibdir}
|
||||
[[ -f ${libdir}/libXvMCNVIDIA.a ]] && \
|
||||
doins ${libdir}/libXvMCNVIDIA.a
|
||||
exeinto /usr/${inslibdir}
|
||||
# fix Bug 131315
|
||||
[[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \
|
||||
doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \
|
||||
dosym libXvMCNVIDIA.so.${PV} \
|
||||
/usr/${inslibdir}/libXvMCNVIDIA.so
|
||||
|
||||
exeinto ${NV_ROOT}/extensions
|
||||
[[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \
|
||||
newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so
|
||||
[[ -f ${extdir}/libglx.so.${sover} ]] && \
|
||||
newexe ${extdir}/libglx.so.${sover} libglx.so
|
||||
|
||||
# Includes
|
||||
insinto ${NV_ROOT}/include
|
||||
doins ${incdir}/*.h
|
||||
|
||||
#cuda
|
||||
if [[ -f usr/include/cuda/cuda.h ]]; then
|
||||
dodir /usr/include/cuda
|
||||
insinto /usr/include/cuda
|
||||
doins usr/include/cuda/*.h
|
||||
|
||||
if [[ -f usr/${pkglibdir}/libcuda.so.${PV} ]]; then
|
||||
dolib.so usr/${pkglibdir}/libcuda.so.${PV}
|
||||
dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1
|
||||
dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so
|
||||
fi
|
||||
fi
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
|
||||
|
||||
want_tls() {
|
||||
# For uclibc or anything non glibc, return false
|
||||
has_version sys-libs/glibc || return 1
|
||||
|
||||
# Old versions of glibc were lt/no-tls only
|
||||
has_version '<sys-libs/glibc-2.3.2' && return 1
|
||||
|
||||
if use x86 ; then
|
||||
case ${CHOST/-*} in
|
||||
i486|i586|i686) ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# If we've got nptl, we've got tls
|
||||
built_with_use --missing true sys-libs/glibc nptl && return 0
|
||||
|
||||
# 2.3.5 turned off tls for linuxthreads glibc on i486 and i586
|
||||
if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then
|
||||
case ${CHOST/-*} in
|
||||
i486|i586) return 1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# These versions built linuxthreads version to support tls, too
|
||||
has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0
|
||||
|
||||
return 1
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
# libGL.la - a libtool library file
|
||||
# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18)
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='libGL.so.1'
|
||||
|
||||
# Names of this library.
|
||||
library_names='libGL.so.${PV} libGL.so.1 libGL.so'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs='-L/usr/${libdir} -lm -lX11 -lXext -ldl'
|
||||
|
||||
# Version information for libGL.
|
||||
current=${ver1}
|
||||
age=${ver2}
|
||||
revision=${ver3}
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/usr/${libdir}'
|
@ -1,40 +0,0 @@
|
||||
# Nvidia drivers support
|
||||
alias char-major-195 nvidia
|
||||
alias /dev/nvidiactl char-major-195
|
||||
|
||||
# To tweak the driver the following options can be used, note that
|
||||
# you should be careful, as it could cause instability!! For more
|
||||
# options see /usr/share/doc/PACKAGE/README
|
||||
#
|
||||
# To enable Side Band Adressing: NVreg_EnableAGPSBA=1
|
||||
#
|
||||
# To enable Fast Writes: NVreg_EnableAGPFW=1
|
||||
#
|
||||
# To enable both for instance, uncomment following line:
|
||||
#
|
||||
#options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1
|
||||
# If you have a mobile chip, you may need to enable this option
|
||||
# if you have hard lockups when starting X.
|
||||
#
|
||||
# See: Appendix I. Configuring your laptop
|
||||
# In /usr/share/doc/PACKAGE/README for full details
|
||||
#
|
||||
# Choose the appropriate value for NVreg_Mobile from the table:
|
||||
# Value Meaning
|
||||
# ---------- --------------------------------------------------
|
||||
# 0xFFFFFFFF let the kernel module autodetect the correct value
|
||||
# 1 Dell laptops
|
||||
# 2 non-Compal Toshiba laptops
|
||||
# 3 all other laptops
|
||||
# 4 Compal Toshiba laptops
|
||||
# 5 Gateway laptops
|
||||
#
|
||||
#options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=3
|
||||
|
||||
|
||||
# !!! SECURITY WARNING !!!
|
||||
# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
|
||||
# WHAT YOU ARE DOING.
|
||||
# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
|
||||
# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
|
||||
options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
|
@ -1,14 +0,0 @@
|
||||
# Nvidia drivers support
|
||||
alias char-major-195 nvidia
|
||||
alias /dev/nvidiactl char-major-195
|
||||
|
||||
# To tweak the driver the following options can be used, note that
|
||||
# you should be careful, as it could cause instability!! For more
|
||||
# options see /usr/share/doc/PACKAGE/README
|
||||
#
|
||||
# !!! SECURITY WARNING !!!
|
||||
# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
|
||||
# WHAT YOU ARE DOING.
|
||||
# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
|
||||
# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
|
||||
options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
|
@ -1,92 +0,0 @@
|
||||
Index: usr/src/nv/conftest.sh
|
||||
===================================================================
|
||||
--- usr/src/nv/conftest.sh
|
||||
+++ usr/src/nv/conftest.sh 2010-01-06 12:10:56.000000000 +0530
|
||||
@@ -32,14 +32,14 @@
|
||||
# CONFIG_XEN and CONFIG_PARAVIRT are present, text_xen() treats
|
||||
# the kernel as a stand-alone kernel.
|
||||
#
|
||||
- FILE="linux/autoconf.h"
|
||||
+ FILE="generated/autoconf.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
#
|
||||
# We are looking at a configured source tree; verify
|
||||
# that it's not a Xen kernel.
|
||||
#
|
||||
- echo "#include <linux/autoconf.h>
|
||||
+ echo "#include <generated/autoconf.h>
|
||||
#if defined(CONFIG_XEN) && !defined(CONFIG_PARAVIRT)
|
||||
#error CONFIG_XEN defined!
|
||||
#endif
|
||||
@@ -111,7 +111,12 @@
|
||||
fi
|
||||
}
|
||||
|
||||
-CONFTEST_PREAMBLE="#include <linux/autoconf.h>
|
||||
+CONFTEST_PREAMBLE="#include <linux/version.h>
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
|
||||
+ #include <generated/autoconf.h>
|
||||
+ #else
|
||||
+ #include <linux/autoconf.h>
|
||||
+ #endif
|
||||
#if defined(CONFIG_XEN) && \
|
||||
defined(CONFIG_XEN_INTERFACE_VERSION) && !defined(__XEN_INTERFACE_VERSION__)
|
||||
#define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION
|
||||
@@ -1294,7 +1299,7 @@
|
||||
echo "";
|
||||
fi
|
||||
fi
|
||||
- exit $RET
|
||||
+# exit $RET
|
||||
;;
|
||||
|
||||
get_uname)
|
||||
@@ -1316,11 +1321,11 @@
|
||||
# tree or at headers shipped for a specific kernel.
|
||||
# Determine the kernel version using a compile check.
|
||||
#
|
||||
- FILE="linux/utsrelease.h"
|
||||
+ FILE="generated/utsrelease.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
echo "$CONFTEST_PREAMBLE
|
||||
- #include <linux/utsrelease.h>
|
||||
+ #include <generated/utsrelease.h>
|
||||
int main() {
|
||||
printf(\"%s\", UTS_RELEASE);
|
||||
return 0;
|
||||
@@ -1375,7 +1380,7 @@
|
||||
#
|
||||
RET=1
|
||||
VERBOSE=$6
|
||||
- FILE="linux/autoconf.h"
|
||||
+ FILE="generated/autoconf.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
#
|
||||
@@ -1429,7 +1434,7 @@
|
||||
#
|
||||
RET=1
|
||||
VERBOSE=$6
|
||||
- FILE="linux/autoconf.h"
|
||||
+ FILE="generated/autoconf.h"
|
||||
|
||||
if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
|
||||
#
|
||||
Index: usr/src/nv/nvacpi.c
|
||||
===================================================================
|
||||
--- usr/src/nv/nvacpi.c
|
||||
+++ usr/src/nv/nvacpi.c 2010-01-06 12:10:56.000000000 +0530
|
||||
@@ -49,6 +49,10 @@
|
||||
};
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
|
||||
+#define acpi_walk_namespace(a,b,c,d,e,f) acpi_walk_namespace(a,b,c,d,e,f,NULL)
|
||||
+#endif
|
||||
+
|
||||
static struct acpi_driver *nv_acpi_driver;
|
||||
static acpi_handle nvif_handle = NULL;
|
||||
static acpi_handle dsm_handle = NULL;
|
||||
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>no-herd</herd>
|
||||
<maintainer>
|
||||
<email>cardoe@gentoo.org</email>
|
||||
<description>General maintainer and POC with NVIDIA</description>
|
||||
</maintainer>
|
||||
<maintainer>
|
||||
<email>jer@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer>
|
||||
<email>spock@gentoo.org</email>
|
||||
<description>Focused on CUDA and new kernel support</description>
|
||||
</maintainer>
|
||||
<longdescription>NVIDIA X11 driver and GLX libraries</longdescription>
|
||||
</pkgmetadata>
|
@ -1,529 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-260.19.36.ebuild,v 1.1 2011/01/24 15:39:30 cardoe Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver
|
||||
|
||||
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
|
||||
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
|
||||
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
|
||||
|
||||
DESCRIPTION="NVIDIA X11 driver and GLX libraries"
|
||||
HOMEPAGE="http://www.nvidia.com/"
|
||||
SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
|
||||
amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
|
||||
x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
|
||||
|
||||
LICENSE="NVIDIA"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
|
||||
IUSE="acpi custom-cflags gtk multilib kernel_linux"
|
||||
RESTRICT="strip"
|
||||
EMULTILIB_PKG="true"
|
||||
|
||||
COMMON="<x11-base/xorg-server-1.9.99
|
||||
kernel_linux? ( >=sys-libs/glibc-2.6.1 )
|
||||
multilib? ( app-emulation/emul-linux-x86-xlibs )
|
||||
>=app-admin/eselect-opengl-1.0.9
|
||||
!<media-video/nvidia-settings-256.52"
|
||||
DEPEND="${COMMON}
|
||||
kernel_linux? ( virtual/linux-sources )"
|
||||
RDEPEND="${COMMON}
|
||||
x11-libs/libXvMC
|
||||
kernel_linux? ( virtual/modutils )
|
||||
acpi? ( sys-power/acpid )"
|
||||
PDEPEND=">=x11-libs/libvdpau-0.3-r1
|
||||
gtk? ( media-video/nvidia-settings )"
|
||||
|
||||
QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV}
|
||||
usr/lib/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib/libnvidia-glcore.so.${PV}
|
||||
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
|
||||
usr/lib/xorg/modules/drivers/nvidia_drv.so
|
||||
usr/lib/libcuda.so.${PV}
|
||||
usr/lib/libnvidia-cfg.so.${PV}
|
||||
usr/lib/libvdpau_nvidia.so.${PV}
|
||||
usr/lib/libOpenCL.so.1.0.0
|
||||
usr/lib/libnvidia-compiler.so.${PV}"
|
||||
|
||||
QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko
|
||||
usr/lib/opengl/nvidia/lib/libGL.so.1
|
||||
usr/lib/libnvidia-glcore.so.1
|
||||
usr/lib/libnvidia-cfg.so.1
|
||||
usr/lib/opengl/nvidia/extensions/libglx.so.1
|
||||
usr/lib/xorg/modules/drivers/nvidia_drv.so"
|
||||
|
||||
QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
|
||||
usr/lib32/libnvidia-glcore.so.${PV}
|
||||
usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib32/libcuda.so.${PV}
|
||||
usr/lib32/libvdpau_nvidia.so.${PV}
|
||||
usr/lib32/libOpenCL.so.1.0.0
|
||||
usr/lib32/libnvidia-compiler.so.${PV}"
|
||||
|
||||
QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib/libnvidia-glcore.so.${PV}
|
||||
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
|
||||
usr/lib64/libXvMCNVIDIA.so.${PV}
|
||||
usr/lib/libXvMCNVIDIA.a:NVXVMC.o
|
||||
usr/lib/libnvidia-compiler.so.${PV}
|
||||
usr/lib/libvdpau_nvidia.so.${PV}
|
||||
usr/lib/libcuda.so.${PV}
|
||||
usr/lib/libOpenCL.so.1.0.0"
|
||||
|
||||
QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV}
|
||||
usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib32/libnvidia-compiler.so.${PV}
|
||||
usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
|
||||
usr/lib32/libvdpau_nvidia.so.${PV}
|
||||
usr/lib32/libcuda.so.${PV}
|
||||
usr/lib32/libOpenCL.so.1.0.0
|
||||
usr/lib64/libnvidia-compiler.so.${PV}
|
||||
usr/lib64/libXvMCNVIDIA.a:NVXVMC.o
|
||||
usr/lib64/libnvidia-cfg.so.${PV}
|
||||
usr/lib64/libvdpau_nvidia.so.${PV}
|
||||
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV}
|
||||
usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib64/libnvidia-glcore.so.${PV}
|
||||
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
|
||||
usr/lib64/libXvMCNVIDIA.so.${PV}
|
||||
usr/lib64/libcuda.so.${PV}
|
||||
usr/lib64/libOpenCL.so.1.0.0
|
||||
usr/lib64/xorg/modules/drivers/nvidia_drv.so
|
||||
usr/bin/nvidia-smi
|
||||
usr/bin/nvidia-xconfig
|
||||
usr/bin/nvidia-settings"
|
||||
|
||||
QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV}
|
||||
usr/lib/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
|
||||
usr/lib/libXvMCNVIDIA.a
|
||||
usr/lib64/libXvMCNVIDIA.so.${PV}"
|
||||
|
||||
QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib32/libnvidia-glcore.so.${PV}
|
||||
usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib64/libnvidia-glcore.so.${PV}
|
||||
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
|
||||
usr/lib64/libXvMCNVIDIA.so.${PV}"
|
||||
|
||||
QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}"
|
||||
|
||||
QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV}
|
||||
usr/lib32/libnvidia-compiler.so.${PV}"
|
||||
|
||||
QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV}
|
||||
usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib32/libnvidia-glcore.so.${PV}
|
||||
usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
|
||||
usr/lib32/libvdpau_nvidia.so.${PV}
|
||||
usr/lib32/libOpenCL.so.1.0.0
|
||||
usr/lib32/libnvidia-compiler.so.${PV}
|
||||
usr/lib64/libXvMCNVIDIA.so.${PV}
|
||||
usr/lib64/libcuda.so.${PV}
|
||||
usr/lib64/libnvidia-cfg.so.${PV}
|
||||
usr/lib64/libnvidia-glcore.so.${PV}
|
||||
usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV}
|
||||
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
|
||||
usr/lib64/xorg/modules/drivers/nvidia_drv.so
|
||||
usr/lib64/libvdpau_nvidia.so.${PV}
|
||||
usr/lib64/libOpenCL.so.1.0.0
|
||||
usr/lib64/libnvidia-compiler.so.${PV}
|
||||
usr/lib64/libnvcuvid.so.${PV}
|
||||
usr/bin/nvidia-smi
|
||||
usr/bin/nvidia-xconfig
|
||||
usr/bin/nvidia-settings"
|
||||
|
||||
QA_DT_HASH_x86="usr/lib/libcuda.so.${PV}
|
||||
usr/lib/libnvidia-cfg.so.${PV}
|
||||
usr/lib/libnvidia-glcore.so.${PV}
|
||||
usr/lib/opengl/nvidia/lib/libGL.so.${PV}
|
||||
usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV}
|
||||
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
|
||||
usr/lib/xorg/modules/drivers/nvidia_drv.so
|
||||
usr/lib/libXvMCNVIDIA.so.${PV}
|
||||
usr/lib/libvdpau_nvidia.so.${PV}
|
||||
usr/lib/libOpenCL.so.1.0.0
|
||||
usr/lib/libnvidia-compiler.so.${PV}
|
||||
usr/lib/libnvcuvid.so.${PV}
|
||||
usr/bin/nvidia-smi
|
||||
usr/bin/nvidia-xconfig
|
||||
usr/bin/nvidia-settings"
|
||||
|
||||
S="${WORKDIR}/"
|
||||
|
||||
mtrr_check() {
|
||||
ebegin "Checking for MTRR support"
|
||||
linux_chkconfig_present MTRR
|
||||
eend $?
|
||||
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
eerror "Please enable MTRR support in your kernel config, found at:"
|
||||
eerror
|
||||
eerror " Processor type and features"
|
||||
eerror " [*] MTRR (Memory Type Range Register) support"
|
||||
eerror
|
||||
eerror "and recompile your kernel ..."
|
||||
die "MTRR support not detected!"
|
||||
fi
|
||||
}
|
||||
|
||||
lockdep_check() {
|
||||
if linux_chkconfig_present LOCKDEP; then
|
||||
eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
|
||||
eerror "Unfortunately, this option exports the symbol "
|
||||
eerror "'lockdep_init_map' as GPL-only which will prevent "
|
||||
eerror "${P} from compiling."
|
||||
eerror "Please make sure the following options have been unset:"
|
||||
eerror
|
||||
eerror " Kernel hacking --->"
|
||||
eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
|
||||
eerror " [ ] Lock debugging: prove locking correctness"
|
||||
eerror " [ ] Lock usage statistics"
|
||||
eerror "in 'menuconfig'"
|
||||
die "LOCKDEP enabled"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# try to turn off distcc and ccache for people that have a problem with it
|
||||
export DISTCC_DISABLE=1
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then
|
||||
eerror "This ebuild doesn't currently support changing your default abi."
|
||||
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
|
||||
fi
|
||||
|
||||
if use kernel_linux; then
|
||||
linux-mod_pkg_setup
|
||||
MODULE_NAMES="nvidia(video:${S}/kernel)"
|
||||
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
|
||||
SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)"
|
||||
mtrr_check
|
||||
lockdep_check
|
||||
fi
|
||||
|
||||
# On BSD userland it wants real make command
|
||||
use userland_BSD && MAKE="$(get_bmake)"
|
||||
|
||||
export _POSIX2_VERSION="199209"
|
||||
|
||||
# Since Nvidia ships 3 different series of drivers, we need to give the user
|
||||
# some kind of guidance as to what version they should install. This tries
|
||||
# to point the user in the right direction but can't be perfect. check
|
||||
# nvidia-driver.eclass
|
||||
nvidia-driver-check-warning
|
||||
|
||||
# set variables to where files are in the package structure
|
||||
if use kernel_FreeBSD; then
|
||||
NV_DOC="${S}/doc"
|
||||
NV_EXEC="${S}/obj"
|
||||
NV_LIB="${S}/obj"
|
||||
NV_SRC="${S}/src"
|
||||
NV_MAN="${S}/x11/man"
|
||||
NV_X11="${S}/obj"
|
||||
NV_X11_DRV="${NV_X11}"
|
||||
NV_X11_EXT="${NV_X11}"
|
||||
NV_SOVER=1
|
||||
elif use kernel_linux; then
|
||||
NV_DOC="${S}"
|
||||
NV_EXEC="${S}"
|
||||
NV_LIB="${S}"
|
||||
NV_SRC="${S}/kernel"
|
||||
NV_MAN="${S}"
|
||||
NV_X11="${S}"
|
||||
NV_X11_DRV="${NV_X11}"
|
||||
NV_X11_EXT="${NV_X11}"
|
||||
NV_SOVER=${PV}
|
||||
else
|
||||
die "Could not determine proper NVIDIA package"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use kernel_linux && kernel_is lt 2 6 7; then
|
||||
echo
|
||||
ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
|
||||
ewarn "This is not officially supported for ${P}. It is likely you"
|
||||
ewarn "will not be able to compile or use the kernel module."
|
||||
ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
|
||||
echo
|
||||
ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
|
||||
fi
|
||||
|
||||
if ! use x86-fbsd; then
|
||||
cd "${S}"
|
||||
unpack_makeself
|
||||
else
|
||||
unpack ${A}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Please add a brief description for every added patch
|
||||
use x86-fbsd && cd doc
|
||||
|
||||
if use kernel_linux; then
|
||||
# Quiet down warnings the user does not need to see
|
||||
sed -i \
|
||||
-e 's:-Wsign-compare::g' \
|
||||
"${NV_SRC}"/Makefile.kbuild
|
||||
|
||||
# Add support for the 'x86' unified kernel arch in conftest.sh
|
||||
epatch "${FILESDIR}"/256.35-unified-arch.patch
|
||||
|
||||
# If you set this then it's your own fault when stuff breaks :)
|
||||
use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
|
||||
|
||||
# If greater than 2.6.5 use M= instead of SUBDIR=
|
||||
convert_to_m "${NV_SRC}"/Makefile.kbuild
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# This is already the default on Linux, as there's no toplevel Makefile, but
|
||||
# on FreeBSD there's one and triggers the kernel module build, as we install
|
||||
# it by itself, pass this.
|
||||
|
||||
cd "${NV_SRC}"
|
||||
if use x86-fbsd; then
|
||||
MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
|
||||
LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
|
||||
elif use kernel_linux; then
|
||||
linux-mod_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use kernel_linux; then
|
||||
linux-mod_src_install
|
||||
|
||||
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)"
|
||||
if [ -z "$VIDEOGROUP" ]; then
|
||||
eerror "Failed to determine the video group gid."
|
||||
die "Failed to determine the video group gid."
|
||||
fi
|
||||
|
||||
# Add the aliases
|
||||
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
|
||||
sed -e 's:PACKAGE:'${PF}':g' \
|
||||
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
|
||||
"${WORKDIR}"/nvidia
|
||||
insinto /etc/modprobe.d
|
||||
newins "${WORKDIR}"/nvidia nvidia.conf || die
|
||||
elif use x86-fbsd; then
|
||||
insinto /boot/modules
|
||||
doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
|
||||
|
||||
exeinto /boot/modules
|
||||
doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
|
||||
fi
|
||||
|
||||
# NVIDIA kernel <-> userspace driver config lib
|
||||
dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \
|
||||
die "failed to install libnvidia-cfg"
|
||||
dosym /usr/$(get_libdir)/libnvidia-cfg.so.${NV_SOVER} \
|
||||
/usr/$(get_libdir)/libnvidia-cfg.so || \
|
||||
die "failed to create libnvidia-cfg.so symlink"
|
||||
|
||||
# NVIDIA video decode <-> CUDA
|
||||
dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \
|
||||
die "failed to install libnvcuvid.so"
|
||||
dosym /usr/$(get_libdir)/libnvcuvid.so.${NV_SOVER} \
|
||||
/usr/$(get_libdir)/libnvcuvid.so || \
|
||||
die "failed to create libnvcuvid.so symlink"
|
||||
|
||||
# Xorg DDX driver
|
||||
insinto /usr/$(get_libdir)/xorg/modules/drivers
|
||||
doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so"
|
||||
|
||||
# Xorg GLX driver
|
||||
insinto /usr/$(get_libdir)/opengl/nvidia/extensions
|
||||
doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \
|
||||
die "failed to install libglx.so"
|
||||
dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \
|
||||
/usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \
|
||||
die "failed to create libglx.so symlink"
|
||||
|
||||
# XvMC driver
|
||||
dolib.a ${NV_X11}/libXvMCNVIDIA.a || \
|
||||
die "failed to install libXvMCNVIDIA.so"
|
||||
dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \
|
||||
die "failed to install libXvMCNVIDIA.so"
|
||||
dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \
|
||||
die "failed to create libXvMCNVIDIA.so symlink"
|
||||
|
||||
# OpenCL ICD for NVIDIA
|
||||
if use kernel_linux; then
|
||||
dodir /etc/OpenCL/vendors
|
||||
insinto /etc/OpenCL/vendors
|
||||
doins nvidia.icd
|
||||
fi
|
||||
|
||||
# Documentation
|
||||
dohtml ${NV_DOC}/html/*
|
||||
if use x86-fbsd; then
|
||||
dodoc "${NV_DOC}/README"
|
||||
doman "${NV_MAN}/nvidia-xconfig.1"
|
||||
use gtk && doman "${NV_MAN}/nvidia-settings.1"
|
||||
else
|
||||
# Docs
|
||||
newdoc "${NV_DOC}/README.txt" README
|
||||
dodoc "${NV_DOC}/NVIDIA_Changelog"
|
||||
doman "${NV_MAN}/nvidia-smi.1.gz"
|
||||
doman "${NV_MAN}/nvidia-xconfig.1.gz"
|
||||
use gtk && doman "${NV_MAN}/nvidia-settings.1.gz"
|
||||
fi
|
||||
|
||||
# Helper Apps
|
||||
dobin ${NV_EXEC}/nvidia-xconfig || die
|
||||
if use gtk; then
|
||||
dobin ${NV_EXEC}/nvidia-settings || die
|
||||
fi
|
||||
dobin ${NV_EXEC}/nvidia-bug-report.sh || die
|
||||
if use kernel_linux; then
|
||||
dobin ${NV_EXEC}/nvidia-smi || die
|
||||
fi
|
||||
|
||||
# Desktop entries for nvidia-settings
|
||||
if use gtk; then
|
||||
sed -e 's:__UTILS_PATH__:/usr/bin:' \
|
||||
-e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \
|
||||
-i "${NV_EXEC}/nvidia-settings.desktop"
|
||||
domenu ${NV_EXEC}/nvidia-settings.desktop
|
||||
|
||||
doicon ${NV_EXEC}/nvidia-settings.png
|
||||
fi
|
||||
|
||||
if has_multilib_profile ; then
|
||||
local OABI=${ABI}
|
||||
for ABI in $(get_install_abis) ; do
|
||||
src_install-libs
|
||||
done
|
||||
ABI=${OABI}
|
||||
unset OABI
|
||||
else
|
||||
src_install-libs
|
||||
fi
|
||||
|
||||
is_final_abi || die "failed to iterate through all ABIs"
|
||||
}
|
||||
|
||||
# Install nvidia library:
|
||||
# the first parameter is the place where to install it
|
||||
# the second parameter is the base name of the library
|
||||
# the third parameter is the provided soversion
|
||||
donvidia() {
|
||||
dodir $1
|
||||
exeinto $1
|
||||
|
||||
libname=$(basename $2)
|
||||
|
||||
doexe $2.$3 || die "failed to install $2"
|
||||
dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2"
|
||||
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1
|
||||
}
|
||||
|
||||
src_install-libs() {
|
||||
local inslibdir=$(get_libdir)
|
||||
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia"
|
||||
local libdir= sover=
|
||||
|
||||
if use kernel_linux; then
|
||||
if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then
|
||||
libdir=32
|
||||
else
|
||||
libdir=.
|
||||
fi
|
||||
sover=${PV}
|
||||
else
|
||||
libdir=obj
|
||||
# on FreeBSD it has just .1 suffix
|
||||
sover=1
|
||||
fi
|
||||
|
||||
# The GLX libraries
|
||||
donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover}
|
||||
donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover}
|
||||
if use x86-fbsd; then
|
||||
donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover}
|
||||
else
|
||||
donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover}
|
||||
fi
|
||||
|
||||
# VDPAU
|
||||
donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover}
|
||||
|
||||
# CUDA & OpenCL
|
||||
if use kernel_linux; then
|
||||
donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover}
|
||||
donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover}
|
||||
donvidia /usr/${inslibdir} ${libdir}/libOpenCL.so 1.0.0
|
||||
dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if use kernel_linux; then
|
||||
linux-mod_pkg_postinst
|
||||
fi
|
||||
|
||||
# Clean the dynamic libGL stuff's home to ensure
|
||||
# we dont have stale libs floating around
|
||||
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
|
||||
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
|
||||
fi
|
||||
# Make sure we nuke the old nvidia-glx's env.d file
|
||||
if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
|
||||
rm -f "${ROOT}"/etc/env.d/09nvidia
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use kernel_linux; then
|
||||
linux-mod_pkg_postinst
|
||||
fi
|
||||
|
||||
# Switch to the nvidia implementation
|
||||
eselect opengl set --use-old nvidia
|
||||
|
||||
echo
|
||||
elog "You must be in the video group to use the NVIDIA device"
|
||||
elog "For more info, read the docs at"
|
||||
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
|
||||
elog
|
||||
|
||||
elog "This ebuild installs a kernel module and X driver. Both must"
|
||||
elog "match explicitly in their version. This means, if you restart"
|
||||
elog "X, you must modprobe -r nvidia before starting it back up"
|
||||
elog
|
||||
|
||||
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
|
||||
elog
|
||||
elog "NVIDIA has requested that any bug reports submitted have the"
|
||||
elog "output of /usr/bin/nvidia-bug-report.sh included."
|
||||
elog
|
||||
elog "To work with compiz, you must enable the AddARGBGLXVisuals option."
|
||||
elog
|
||||
elog "If you are having resolution problems, try disabling DynamicTwinView."
|
||||
elog
|
||||
|
||||
if ! use gtk; then
|
||||
elog "USE=gtk controls whether the nvidia-settings application"
|
||||
elog "is installed. If you would like to use it, enable that"
|
||||
elog "flag and re-emerge this ebuild. media-video/nvidia-settings"
|
||||
elog "no longer installs nvidia-settings but only installs the"
|
||||
elog "associated user space libraries."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use kernel_linux; then
|
||||
linux-mod_pkg_postrm
|
||||
fi
|
||||
eselect opengl set --use-old xorg-x11
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=2
|
||||
CROS_WORKON_COMMIT="6db8cf26b1abd41f0465aa345fb12ddbcde404eb"
|
||||
CROS_WORKON_TREE="1a5966915f51a670b1f1bd4fda10ec670b40244b"
|
||||
CROS_WORKON_PROJECT="chromiumos/third_party/khronos"
|
||||
|
||||
inherit cros-workon
|
||||
|
||||
DESCRIPTION="OpenGL|ES headers."
|
||||
HOMEPAGE="http://www.khronos.org/opengles/2_X/"
|
||||
SRC_URI=""
|
||||
LICENSE="SGI-B-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="x86 arm"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND=""
|
||||
|
||||
CROS_WORKON_LOCALNAME="khronos"
|
||||
|
||||
src_install() {
|
||||
# headers
|
||||
insinto /usr/include/EGL
|
||||
doins "${S}/include/EGL/egl.h"
|
||||
doins "${S}/include/EGL/eglplatform.h"
|
||||
doins "${S}/include/EGL/eglext.h"
|
||||
insinto /usr/include/KHR
|
||||
doins "${S}/include/KHR/khrplatform.h"
|
||||
insinto /usr/include/GLES
|
||||
doins "${S}/include/GLES/gl.h"
|
||||
doins "${S}/include/GLES/glext.h"
|
||||
doins "${S}/include/GLES/glplatform.h"
|
||||
insinto /usr/include/GLES2
|
||||
doins "${S}/include/GLES2/gl2.h"
|
||||
doins "${S}/include/GLES2/gl2ext.h"
|
||||
doins "${S}/include/GLES2/gl2platform.h"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=2
|
||||
CROS_WORKON_PROJECT="chromiumos/third_party/khronos"
|
||||
|
||||
inherit cros-workon
|
||||
|
||||
DESCRIPTION="OpenGL|ES headers."
|
||||
HOMEPAGE="http://www.khronos.org/opengles/2_X/"
|
||||
SRC_URI=""
|
||||
LICENSE="SGI-B-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~arm"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND=""
|
||||
|
||||
CROS_WORKON_LOCALNAME="khronos"
|
||||
|
||||
src_install() {
|
||||
# headers
|
||||
insinto /usr/include/EGL
|
||||
doins "${S}/include/EGL/egl.h"
|
||||
doins "${S}/include/EGL/eglplatform.h"
|
||||
doins "${S}/include/EGL/eglext.h"
|
||||
insinto /usr/include/KHR
|
||||
doins "${S}/include/KHR/khrplatform.h"
|
||||
insinto /usr/include/GLES
|
||||
doins "${S}/include/GLES/gl.h"
|
||||
doins "${S}/include/GLES/glext.h"
|
||||
doins "${S}/include/GLES/glplatform.h"
|
||||
insinto /usr/include/GLES2
|
||||
doins "${S}/include/GLES2/gl2.h"
|
||||
doins "${S}/include/GLES2/gl2ext.h"
|
||||
doins "${S}/include/GLES2/gl2platform.h"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
CROS_WORKON_COMMIT="6db8cf26b1abd41f0465aa345fb12ddbcde404eb"
|
||||
CROS_WORKON_TREE="1a5966915f51a670b1f1bd4fda10ec670b40244b"
|
||||
CROS_WORKON_PROJECT="chromiumos/third_party/khronos"
|
||||
|
||||
inherit toolchain-funcs cros-workon
|
||||
|
||||
DESCRIPTION="OpenGL|ES mock library"
|
||||
HOMEPAGE="http://www.khronos.org/opengles/2_X/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="SGI-B-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="arm x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="x11-libs/libX11
|
||||
x11-drivers/opengles-headers"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
CROS_WORKON_LOCALNAME="khronos"
|
||||
|
||||
src_compile() {
|
||||
tc-export AR CC CXX LD NM RANLIB
|
||||
scons || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dolib libEGL.so libGLESv2.so
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
CROS_WORKON_PROJECT="chromiumos/third_party/khronos"
|
||||
|
||||
inherit toolchain-funcs cros-workon
|
||||
|
||||
DESCRIPTION="OpenGL|ES mock library"
|
||||
HOMEPAGE="http://www.khronos.org/opengles/2_X/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="SGI-B-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~arm ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="x11-libs/libX11
|
||||
x11-drivers/opengles-headers"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
CROS_WORKON_LOCALNAME="khronos"
|
||||
|
||||
src_compile() {
|
||||
tc-export AR CC CXX LD NM RANLIB
|
||||
scons || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dolib libEGL.so libGLESv2.so
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
CROS_WORKON_COMMIT="d15b481e374f58ad82812b5ec9193307a937cfbe"
|
||||
CROS_WORKON_TREE="7d097ae9d618817e2c9a274a07c3ec207a631583"
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/touchpad-tests"
|
||||
|
||||
XORG_EAUTORECONF="yes"
|
||||
BASE_INDIVIDUAL_URI=""
|
||||
inherit autotools-utils cros-workon
|
||||
|
||||
DESCRIPTION="Chromium OS multitouch driver regression tests."
|
||||
CROS_WORKON_LOCALNAME="../platform/touchpad-tests"
|
||||
|
||||
KEYWORDS="arm amd64 x86"
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="chromeos-base/gestures
|
||||
chromeos-base/libevdev
|
||||
app-misc/utouch-evemu
|
||||
x11-proto/inputproto"
|
||||
|
||||
DEPEND=${RDEPEND}
|
||||
|
||||
DOCS=""
|
||||
|
||||
src_prepare() {
|
||||
cros-workon_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cros-workon_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# install to autotest deps directory for dependency
|
||||
emake DESTDIR="${D}/usr/local/autotest/client/deps/touchpad-tests" install
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/touchpad-tests"
|
||||
|
||||
XORG_EAUTORECONF="yes"
|
||||
BASE_INDIVIDUAL_URI=""
|
||||
inherit autotools-utils cros-workon
|
||||
|
||||
DESCRIPTION="Chromium OS multitouch driver regression tests."
|
||||
CROS_WORKON_LOCALNAME="../platform/touchpad-tests"
|
||||
|
||||
KEYWORDS="~arm amd64 ~x86"
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="chromeos-base/gestures
|
||||
chromeos-base/libevdev
|
||||
app-misc/utouch-evemu
|
||||
x11-proto/inputproto"
|
||||
|
||||
DEPEND=${RDEPEND}
|
||||
|
||||
DOCS=""
|
||||
|
||||
src_prepare() {
|
||||
cros-workon_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cros-workon_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# install to autotest deps directory for dependency
|
||||
emake DESTDIR="${D}/usr/local/autotest/client/deps/touchpad-tests" install
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
CROS_WORKON_COMMIT="43e047f66e76514f6ff153724482440bc45a09d2"
|
||||
CROS_WORKON_TREE="3b26ecfe0fc8246a9771a6b1539572d0d70e3ad1"
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/xf86-input-cmt"
|
||||
|
||||
XORG_EAUTORECONF="yes"
|
||||
BASE_INDIVIDUAL_URI=""
|
||||
inherit autotools-utils cros-workon
|
||||
|
||||
DESCRIPTION="Chromium OS multitouch input driver for Xorg X server."
|
||||
CROS_WORKON_LOCALNAME="../platform/xf86-input-cmt"
|
||||
|
||||
KEYWORDS="arm amd64 x86"
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="chromeos-base/gestures
|
||||
chromeos-base/libevdev
|
||||
x11-base/xorg-server"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-proto/inputproto"
|
||||
|
||||
DOCS="README"
|
||||
|
||||
src_prepare() {
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_install() {
|
||||
autotools-utils_src_install
|
||||
remove_libtool_files all
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/xf86-input-cmt"
|
||||
|
||||
XORG_EAUTORECONF="yes"
|
||||
BASE_INDIVIDUAL_URI=""
|
||||
inherit autotools-utils cros-workon
|
||||
|
||||
DESCRIPTION="Chromium OS multitouch input driver for Xorg X server."
|
||||
CROS_WORKON_LOCALNAME="../platform/xf86-input-cmt"
|
||||
|
||||
KEYWORDS="~arm ~amd64 ~x86"
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="chromeos-base/gestures
|
||||
chromeos-base/libevdev
|
||||
x11-base/xorg-server"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-proto/inputproto"
|
||||
|
||||
DOCS="README"
|
||||
|
||||
src_prepare() {
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_install() {
|
||||
autotools-utils_src_install
|
||||
remove_libtool_files all
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST xf86-input-evdev-2.7.3.tar.bz2 364819 SHA256 eb389413602c3d28c44bbfab0477c98582f0e2f5be5f41986e58e93a033fa504 SHA512 edd5691bc6878bb491d7ffb04b35ab60cd70853ae702883c672c53c9f6cb8e81817f94cc03feaaca4e4a02a2a436f1417bd1e1e5f52a151a416fd04306159879 WHIRLPOOL 750605a0efabcb078e65d08b7ea610fdfc4cab49b73a2676247f95f50fcf7d17e80ab2186ef103830865a564dc695f035739f1b88e28f68c981fc703e26610a6
|
@ -1,374 +0,0 @@
|
||||
From: Ang Pan <oscarpan@chromium.org>
|
||||
Date: Thu, 15 Nov 2012 15:38:44 +0800
|
||||
Subject: [PATCH] Accelerate wheel scrolling
|
||||
|
||||
---
|
||||
include/evdev-properties.h | 4 +
|
||||
src/evdev.c | 198 +++++++++++++++++++++++++++++++++++++++----
|
||||
src/evdev.h | 13 +++
|
||||
3 files changed, 196 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/include/evdev-properties.h b/include/evdev-properties.h
|
||||
--- a/include/evdev-properties.h
|
||||
+++ b/include/evdev-properties.h
|
||||
@@ -87,4 +87,8 @@
|
||||
*/
|
||||
#define EVDEV_PROP_FUNCTION_KEYS "Evdev Function Keys"
|
||||
|
||||
+/* Mouse scroll wheel axes acceleration. */
|
||||
+/* BOOL */
|
||||
+#define EVDEV_PROP_WHEEL_ACCEL_AXES "Evdev Wheel Axes Acceleration"
|
||||
+
|
||||
#endif
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -99,6 +99,9 @@
|
||||
#define ABS_MT_TRACKING_ID 0x39
|
||||
#endif
|
||||
|
||||
+#define AXIS_LABEL_PROP_ABS_DBL_START_TIME "Abs Dbl Start Timestamp"
|
||||
+#define AXIS_LABEL_PROP_ABS_DBL_END_TIME "Abs Dbl End Timestamp"
|
||||
+
|
||||
static const char *evdevDefaults[] = {
|
||||
"XkbRules", "evdev",
|
||||
"XkbModel", "evdev",
|
||||
@@ -156,12 +159,17 @@ static Atom prop_axis_label;
|
||||
static Atom prop_btn_label;
|
||||
static Atom prop_device;
|
||||
static Atom prop_virtual;
|
||||
+static Atom prop_wheel_accel_axes;
|
||||
|
||||
/* All devices the evdev driver has allocated and knows about.
|
||||
* MAXDEVICES is safe as null-terminated array, as two devices (VCP and VCK)
|
||||
* cannot be used by evdev, leaving us with a space of 2 at the end. */
|
||||
static EvdevPtr evdev_devices[MAXDEVICES] = {NULL};
|
||||
|
||||
+static double TimevalToDouble(const struct timeval* tv) {
|
||||
+ return (double)(tv->tv_sec) + (double)(tv->tv_usec) / 1000000.0;
|
||||
+}
|
||||
+
|
||||
static int EvdevSwitchMode(ClientPtr client, DeviceIntPtr device, int mode)
|
||||
{
|
||||
InputInfoPtr pInfo;
|
||||
@@ -702,6 +710,103 @@ EvdevProcessButtonEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
EvdevQueueKbdEvent(pInfo, ev, value);
|
||||
}
|
||||
|
||||
+#ifndef HAVE_SMOOTH_SCROLLING
|
||||
+/**
|
||||
+ * Normal CDF seems like a good curve to simulate scroll wheel acceleration
|
||||
+ * curve. Use following methods to generate the coefficients of a degree-4
|
||||
+ * polynomial regression for a specific normal cdf in matlab.
|
||||
+ *
|
||||
+ * Note: x for click_speed, y for scroll pixels.
|
||||
+ * In reality, x ranges from 1 to 120+ for an Apple Mighty Mouse, use range
|
||||
+ * greater than that to minimize approximation error at the end points.
|
||||
+ * In our case, the range is [-50, 200].
|
||||
+ *
|
||||
+ * matlab code to generate accel_params below:
|
||||
+ * x=[-50:200];
|
||||
+ * y=600*normcdf(x,77,40);
|
||||
+ * a=polyfit(x,y,4);
|
||||
+ */
|
||||
+static const double accel_params[] = {
|
||||
+ -9.528484576366295e-08,
|
||||
+ -1.515738095456648e-04,
|
||||
+ 3.940238948978762e-02,
|
||||
+ 1.732410732791920,
|
||||
+ 4.412651786252371,
|
||||
+};
|
||||
+
|
||||
+/* when x is 155, the polinomial curve gives 600, the max pixels to scroll */
|
||||
+static const double max_allowed_click_speed = 155;
|
||||
+
|
||||
+/**
|
||||
+ * Get the number of pixels to scroll, used for axes_scroll.
|
||||
+ */
|
||||
+static double
|
||||
+EvdevGetPixelsToScroll(double click_speed)
|
||||
+{
|
||||
+ double pixels = 0;
|
||||
+ double term = 1;
|
||||
+ double allowed_click_speed = fabs(click_speed);
|
||||
+ if (allowed_click_speed > max_allowed_click_speed)
|
||||
+ allowed_click_speed = max_allowed_click_speed;
|
||||
+ int i;
|
||||
+ for (i = 1; i <= ArrayLength(accel_params); i++)
|
||||
+ {
|
||||
+ pixels += term * accel_params[ArrayLength(accel_params) - i];
|
||||
+ term *= allowed_click_speed;
|
||||
+ }
|
||||
+ if (click_speed < 0)
|
||||
+ pixels *= -1;
|
||||
+ return pixels;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Mouse scroll acceleration.
|
||||
+ */
|
||||
+static void
|
||||
+EvdevAccelWheel(InputInfoPtr pInfo, struct input_event *ev)
|
||||
+{
|
||||
+ double pixels;
|
||||
+ double dt; /* seconds */
|
||||
+ double click_speed; /* clicks / second */
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+ double start_time;
|
||||
+ double end_time = TimevalToDouble(&ev->time);
|
||||
+ int map;
|
||||
+ EvdevRelWheelPtr wheel = (ev->code == REL_WHEEL) ? &pEvdev->wheel :
|
||||
+ &pEvdev->hwheel;
|
||||
+
|
||||
+ /* Check if this scroll is in same direction as previous scroll event */
|
||||
+ if ((wheel->value < 0 && ev->value < 0) ||
|
||||
+ (wheel->value > 0 && ev->value > 0)) {
|
||||
+ start_time = wheel->time;
|
||||
+ } else {
|
||||
+ start_time = end_time;
|
||||
+ }
|
||||
+
|
||||
+ /* If start_time == end_time, compute click_speed using dt = 1 second */
|
||||
+ dt = (end_time - start_time) ?: 1.0;
|
||||
+ click_speed = ev->value / dt;
|
||||
+
|
||||
+ wheel->value = ev->value;
|
||||
+ wheel->time = end_time;
|
||||
+
|
||||
+ pixels = EvdevGetPixelsToScroll(click_speed);
|
||||
+ /* For historical reasons the vertical wheel (REL_WHEEL) is inverted */
|
||||
+ pixels *= (ev->code == REL_WHEEL) ? -1 : 1;
|
||||
+
|
||||
+ valuator_mask_zero(pEvdev->vals);
|
||||
+ map = pEvdev->axis_map[ev->code];
|
||||
+ valuator_mask_set_double(pEvdev->vals, map, pixels);
|
||||
+ if (pEvdev->start_time_valuator_index >= 0)
|
||||
+ valuator_mask_set_double(pEvdev->vals,
|
||||
+ pEvdev->start_time_valuator_index, start_time);
|
||||
+ if (pEvdev->end_time_valuator_index >= 0)
|
||||
+ valuator_mask_set_double(pEvdev->vals,
|
||||
+ pEvdev->end_time_valuator_index, end_time);
|
||||
+ xf86PostMotionEventM(pInfo->dev, TRUE, pEvdev->vals);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* Take the relative motion input event and process it accordingly.
|
||||
*/
|
||||
@@ -712,6 +817,14 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
EvdevPtr pEvdev = pInfo->private;
|
||||
int map;
|
||||
|
||||
+#ifndef HAVE_SMOOTH_SCROLLING
|
||||
+ if (pEvdev->scroll_axes && (ev->code == REL_WHEEL ||
|
||||
+ ev->code == REL_HWHEEL)) {
|
||||
+ EvdevAccelWheel(pInfo, ev);
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
/* Get the signed value, earlier kernels had this as unsigned */
|
||||
value = ev->value;
|
||||
|
||||
@@ -1894,12 +2007,6 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
|
||||
goto out;
|
||||
|
||||
#ifndef HAVE_SMOOTH_SCROLLING
|
||||
- /* Wheels are special, we post them as button events. So let's ignore them
|
||||
- * in the axes list too */
|
||||
- if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_WHEEL))
|
||||
- num_axes--;
|
||||
- if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_HWHEEL))
|
||||
- num_axes--;
|
||||
if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_DIAL))
|
||||
num_axes--;
|
||||
|
||||
@@ -1907,17 +2014,20 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
|
||||
goto out;
|
||||
#endif
|
||||
|
||||
- if (num_axes > MAX_VALUATORS) {
|
||||
- xf86IDrvMsg(pInfo, X_WARNING, "found %d axes, limiting to %d.\n", num_axes, MAX_VALUATORS);
|
||||
- num_axes = MAX_VALUATORS;
|
||||
+ /* -2 to leave room for start and end timestamps */
|
||||
+ if (num_axes > MAX_VALUATORS - 2) {
|
||||
+ xf86IDrvMsg(pInfo, X_WARNING, "found %d axes, limiting to %d.\n", num_axes, MAX_VALUATORS - 2);
|
||||
+ num_axes = MAX_VALUATORS - 2;
|
||||
}
|
||||
|
||||
- pEvdev->num_vals = num_axes;
|
||||
- if (num_axes > 0) {
|
||||
- pEvdev->vals = valuator_mask_new(num_axes);
|
||||
- if (!pEvdev->vals)
|
||||
- goto out;
|
||||
- }
|
||||
+ pEvdev->start_time_valuator_index = num_axes;
|
||||
+ pEvdev->end_time_valuator_index = num_axes + 1;
|
||||
+
|
||||
+ /* +2 for timestamp valuators */
|
||||
+ pEvdev->num_vals = num_axes + 2;
|
||||
+ pEvdev->vals = valuator_mask_new(pEvdev->num_vals);
|
||||
+ if (!pEvdev->vals)
|
||||
+ goto out;
|
||||
atoms = malloc(pEvdev->num_vals * sizeof(Atom));
|
||||
|
||||
for (axis = REL_X; i < MAX_VALUATORS && axis <= REL_MAX; axis++)
|
||||
@@ -1925,7 +2035,7 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
|
||||
pEvdev->axis_map[axis] = -1;
|
||||
#ifndef HAVE_SMOOTH_SCROLLING
|
||||
/* We don't post wheel events, so ignore them here too */
|
||||
- if (axis == REL_WHEEL || axis == REL_HWHEEL || axis == REL_DIAL)
|
||||
+ if (axis == REL_DIAL)
|
||||
continue;
|
||||
#endif
|
||||
if (!EvdevBitIsSet(pEvdev->rel_bitmask, axis))
|
||||
@@ -1934,9 +2044,20 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
|
||||
i++;
|
||||
}
|
||||
|
||||
- EvdevInitAxesLabels(pEvdev, Relative, pEvdev->num_vals, atoms);
|
||||
+ /* Initialize all axis label atoms except Start & End Timestamps */
|
||||
+ EvdevInitAxesLabels(pEvdev, Relative, num_axes, atoms);
|
||||
+
|
||||
+ /* Create atoms for Start & End Timestamps */
|
||||
+ atoms[pEvdev->start_time_valuator_index] =
|
||||
+ MakeAtom(AXIS_LABEL_PROP_ABS_DBL_START_TIME,
|
||||
+ strlen(AXIS_LABEL_PROP_ABS_DBL_START_TIME),
|
||||
+ TRUE);
|
||||
+ atoms[pEvdev->end_time_valuator_index] =
|
||||
+ MakeAtom(AXIS_LABEL_PROP_ABS_DBL_END_TIME,
|
||||
+ strlen(AXIS_LABEL_PROP_ABS_DBL_END_TIME),
|
||||
+ TRUE);
|
||||
|
||||
- if (!InitValuatorClassDeviceStruct(device, num_axes, atoms,
|
||||
+ if (!InitValuatorClassDeviceStruct(device, pEvdev->num_vals, atoms,
|
||||
GetMotionHistorySize(), Relative)) {
|
||||
xf86IDrvMsg(pInfo, X_ERROR, "failed to initialize valuator class device.\n");
|
||||
goto out;
|
||||
@@ -1951,11 +2072,18 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
|
||||
for (axis = REL_X; axis <= REL_MAX; axis++)
|
||||
{
|
||||
int axnum = pEvdev->axis_map[axis];
|
||||
+ int mode = Relative;
|
||||
|
||||
if (axnum == -1)
|
||||
continue;
|
||||
+
|
||||
+#ifndef HAVE_SMOOTH_SCROLLING
|
||||
+ if (axis == REL_WHEEL || axis == REL_HWHEEL)
|
||||
+ mode = Absolute;
|
||||
+#endif
|
||||
+
|
||||
xf86InitValuatorAxisStruct(device, axnum, atoms[axnum], -1, -1, 1, 0, 1,
|
||||
- Relative);
|
||||
+ mode);
|
||||
xf86InitValuatorDefaults(device, axnum);
|
||||
#ifdef HAVE_SMOOTH_SCROLLING
|
||||
if (axis == REL_WHEEL)
|
||||
@@ -1967,6 +2095,17 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifndef HAVE_SMOOTH_SCROLLING
|
||||
+ /* Initialize valuators for scroll wheel Start & End Timestamps */
|
||||
+ xf86InitValuatorAxisStruct(device, pEvdev->start_time_valuator_index,
|
||||
+ atoms[pEvdev->start_time_valuator_index],
|
||||
+ 0, INT_MAX, 1, 0, 1, Absolute);
|
||||
+
|
||||
+ xf86InitValuatorAxisStruct(device, pEvdev->end_time_valuator_index,
|
||||
+ atoms[pEvdev->end_time_valuator_index],
|
||||
+ 0, INT_MAX, 1, 0, 1, Absolute);
|
||||
+#endif
|
||||
+
|
||||
free(atoms);
|
||||
|
||||
return Success;
|
||||
@@ -2128,6 +2267,9 @@ EvdevInit(DeviceIntPtr device)
|
||||
for(i = 0; i < max(ABS_CNT,REL_CNT); i++)
|
||||
pEvdev->axis_map[i]=-1;
|
||||
|
||||
+ pEvdev->start_time_valuator_index = -1;
|
||||
+ pEvdev->end_time_valuator_index = -1;
|
||||
+
|
||||
if (pEvdev->flags & EVDEV_KEYBOARD_EVENTS)
|
||||
EvdevAddKeyClass(device);
|
||||
if (pEvdev->flags & EVDEV_BUTTON_EVENTS)
|
||||
@@ -3218,6 +3360,7 @@ EvdevInitProperty(DeviceIntPtr dev)
|
||||
if (pEvdev->flags & (EVDEV_RELATIVE_EVENTS | EVDEV_ABSOLUTE_EVENTS))
|
||||
{
|
||||
BOOL invert[2];
|
||||
+ int axis_accel_conf_val;
|
||||
invert[0] = pEvdev->invert_x;
|
||||
invert[1] = pEvdev->invert_y;
|
||||
|
||||
@@ -3264,6 +3407,16 @@ EvdevInitProperty(DeviceIntPtr dev)
|
||||
|
||||
XISetDevicePropertyDeletable(dev, prop_swap, FALSE);
|
||||
|
||||
+ prop_wheel_accel_axes = MakeAtom(EVDEV_PROP_WHEEL_ACCEL_AXES,
|
||||
+ strlen(EVDEV_PROP_WHEEL_ACCEL_AXES), TRUE);
|
||||
+ axis_accel_conf_val = xf86SetBoolOption(pInfo->options, EVDEV_PROP_WHEEL_ACCEL_AXES, 0);
|
||||
+ pEvdev->scroll_axes = axis_accel_conf_val != 0;
|
||||
+ rc = XIChangeDeviceProperty(dev, prop_wheel_accel_axes, XA_INTEGER, 8,
|
||||
+ PropModeReplace, 1, &pEvdev->scroll_axes, FALSE);
|
||||
+ if (rc != Success)
|
||||
+ return;
|
||||
+
|
||||
+ XISetDevicePropertyDeletable(dev, prop_wheel_accel_axes, FALSE);
|
||||
/* Axis labelling */
|
||||
if ((pEvdev->num_vals > 0) && (prop_axis_label = XIGetKnownProperty(AXIS_LABEL_PROP)))
|
||||
{
|
||||
@@ -3333,6 +3486,13 @@ EvdevSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
|
||||
|
||||
if (!checkonly)
|
||||
pEvdev->swap_axes = *((BOOL*)val->data);
|
||||
+ } else if (atom == prop_wheel_accel_axes)
|
||||
+ {
|
||||
+ if (val->format != 8 || val->type != XA_INTEGER || val->size != 1)
|
||||
+ return BadMatch;
|
||||
+
|
||||
+ if (!checkonly)
|
||||
+ pEvdev->scroll_axes = *((BOOL*)val->data);
|
||||
} else if (atom == prop_axis_label || atom == prop_btn_label ||
|
||||
atom == prop_product_id || atom == prop_device ||
|
||||
atom == prop_virtual)
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -155,6 +155,12 @@ typedef struct {
|
||||
#endif
|
||||
} EventQueueRec, *EventQueuePtr;
|
||||
|
||||
+/* Mouse scroll wheel state for one axis (REL_WHEEL or REL_WHEEL) */
|
||||
+typedef struct {
|
||||
+ int value; /* last scroll wheel value */
|
||||
+ double time; /* evdev timestamp of last scroll event */
|
||||
+} EvdevRelWheelRec, *EvdevRelWheelPtr;
|
||||
+
|
||||
typedef struct {
|
||||
unsigned short id_vendor;
|
||||
unsigned short id_product;
|
||||
@@ -252,6 +258,9 @@ typedef struct {
|
||||
unsigned long led_bitmask[NLONGS(LED_CNT)];
|
||||
struct input_absinfo absinfo[ABS_CNT];
|
||||
|
||||
+ int start_time_valuator_index;
|
||||
+ int end_time_valuator_index;
|
||||
+
|
||||
/* minor/major number */
|
||||
dev_t min_maj;
|
||||
|
||||
@@ -266,6 +275,10 @@ typedef struct {
|
||||
struct timeval before_sync_time;
|
||||
struct timeval after_sync_time;
|
||||
int32_t cached_tid[MAX_SLOT_COUNT];
|
||||
+
|
||||
+ BOOL scroll_axes;
|
||||
+ EvdevRelWheelRec wheel; /* scroll state for REL_WHEEL */
|
||||
+ EvdevRelWheelRec hwheel; /* scroll state for REL_HWHEEL */
|
||||
} EvdevRec, *EvdevPtr;
|
||||
|
||||
typedef struct {
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,89 +0,0 @@
|
||||
From: Yufeng Shen <miletus@chromium.org>
|
||||
Date: Mon, 20 Aug 2012 14:55:57 -0400
|
||||
Subject: [PATCH] x11-drivers/xf86-input-evdev: Use monotonic timestamps for
|
||||
input events
|
||||
|
||||
This patch adds the support for xf86-input-evdev to turn on monotonic
|
||||
timestamps if kernel supports it.
|
||||
|
||||
The clock source is set in EvdevOn() instead of EvdevCache() because the
|
||||
latter is only called once when X registers the input device fd with kernel,
|
||||
and if later X closes and reopens the input device fd (e.g. when the
|
||||
system goes through suspend/resume cycle), the clock source setting
|
||||
will be lost. EvdevOn() is the right place to set clock source since
|
||||
it is called whenever X wants to open the input device and use it.
|
||||
|
||||
BUG=chrome-os-partner:12187
|
||||
TEST=On Link, grep "time stamps" /var/log/Xorg.0.log
|
||||
Make sure monotonic timestamp is used for evdev
|
||||
Run "xinput test-xi2" and move fingers on touch device
|
||||
Note that valuator 4 (Touch Timestamp) is using
|
||||
monotonic timestamp.
|
||||
Suspend and resume the device and make sure the timestamp
|
||||
does not change back to real world timestamp.
|
||||
---
|
||||
src/evdev.c | 16 ++++++++++++++++
|
||||
src/evdev.h | 1 +
|
||||
2 files changed, 17 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#include <time.h>
|
||||
|
||||
#include <xf86.h>
|
||||
#include <xf86Xinput.h>
|
||||
@@ -61,6 +62,11 @@
|
||||
#define XI_PROP_VIRTUAL_DEVICE "Virtual Device"
|
||||
#endif
|
||||
|
||||
+/* Set clockid to be used for timestamps */
|
||||
+#ifndef EVIOCSCLOCKID
|
||||
+#define EVIOCSCLOCKID _IOW('E', 0xa0, int)
|
||||
+#endif
|
||||
+
|
||||
/* removed from server, purge when dropping support for server 1.10 */
|
||||
#define XI86_SEND_DRAG_EVENTS 0x08
|
||||
|
||||
@@ -1809,6 +1815,12 @@ EvdevInit(DeviceIntPtr device)
|
||||
return Success;
|
||||
}
|
||||
|
||||
+static int
|
||||
+EvdevEnableMonotonic(InputInfoPtr pInfo) {
|
||||
+ unsigned int clk = CLOCK_MONOTONIC;
|
||||
+ return (ioctl(pInfo->fd, EVIOCSCLOCKID, &clk) == 0) ? Success : !Success;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Init all extras (wheel emulation, etc.) and grab the device.
|
||||
*/
|
||||
@@ -1826,6 +1838,10 @@ EvdevOn(DeviceIntPtr device)
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
+ pEvdev->is_monotonic = (EvdevEnableMonotonic(pInfo) == Success);
|
||||
+ xf86IDrvMsg(pInfo, X_PROBED, "Using %s input event time stamps\n",
|
||||
+ pEvdev->is_monotonic ? "monotonic" : "realtime");
|
||||
+
|
||||
EvdevGrabDevice(pInfo, 1, 0);
|
||||
|
||||
xf86FlushInput(pInfo->fd);
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -173,6 +173,7 @@ typedef struct {
|
||||
BOOL swap_axes;
|
||||
BOOL invert_x;
|
||||
BOOL invert_y;
|
||||
+ BOOL is_monotonic;
|
||||
|
||||
int delta[REL_CNT];
|
||||
unsigned int abs_queued, rel_queued, prox_queued;
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,120 +0,0 @@
|
||||
From: Chung-yih Wang <cywang@chromium.org>
|
||||
Date: Thu, 6 Dec 2012 17:43:04 +0800
|
||||
Subject: [PATCH] Add block reading support
|
||||
|
||||
This patch adds a new xinput property "Block Event Reading" that blocks
|
||||
event reading by skipping read() calls in ReadInput() in order to
|
||||
generate the SYN_DROPPED event for testing the SYN_DROPPED handling.
|
||||
---
|
||||
src/debug.c | 37 +++++++++++++++++++++++++++++++++++++
|
||||
src/evdev.c | 6 +++++-
|
||||
src/evdev.h | 6 ++++++
|
||||
3 files changed, 48 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/debug.c b/src/debug.c
|
||||
--- a/src/debug.c
|
||||
+++ b/src/debug.c
|
||||
@@ -19,10 +19,12 @@
|
||||
#include <xf86Xinput.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
+#define XI_PROP_BLOCK_READ_INPUT "Block Event Reading"
|
||||
#define XI_PROP_DUMP_DEBUG_LOG "Dump Debug Log"
|
||||
|
||||
#define INPUT_EVENTS_LOG_FILE "/var/log/evdev_input_events.dat"
|
||||
|
||||
+static Atom block_read_prop;
|
||||
static Atom dump_debug_log_prop;
|
||||
|
||||
static void
|
||||
@@ -112,3 +114,38 @@ EvdevDebugInitProperty(DeviceIntPtr dev)
|
||||
XIRegisterPropertyHandler(dev, EvdevDebugSetProperty,
|
||||
EvdevDebugGetProperty, NULL);
|
||||
}
|
||||
+
|
||||
+static int
|
||||
+EvdevBlockSetProperty(DeviceIntPtr dev, Atom atom,
|
||||
+ XIPropertyValuePtr val, BOOL checkonly)
|
||||
+{
|
||||
+ InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+
|
||||
+ if (atom == block_read_prop) {
|
||||
+ if (val->type != XA_INTEGER || val->format != 8 || val->size != 1)
|
||||
+ return BadMatch;
|
||||
+
|
||||
+ if (!checkonly)
|
||||
+ pEvdev->block_input = *(BOOL *)val->data;
|
||||
+ }
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+EvdevBlockInitProperty(DeviceIntPtr dev)
|
||||
+{
|
||||
+ InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+
|
||||
+ block_read_prop = MakeAtom(XI_PROP_BLOCK_READ_INPUT,
|
||||
+ strlen(XI_PROP_BLOCK_READ_INPUT), TRUE);
|
||||
+
|
||||
+ pEvdev->block_input = FALSE;
|
||||
+
|
||||
+ XIChangeDeviceProperty(dev, block_read_prop, XA_INTEGER,
|
||||
+ /* format */ 8, PropModeReplace, /* size */ 1,
|
||||
+ &pEvdev->block_input, FALSE);
|
||||
+ XISetDevicePropertyDeletable(dev, block_read_prop, FALSE);
|
||||
+ XIRegisterPropertyHandler(dev, EvdevBlockSetProperty, NULL, NULL);
|
||||
+}
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -1569,11 +1569,14 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
struct input_event ev[NUM_EVENTS];
|
||||
int i, len = sizeof(ev);
|
||||
BOOL sync_evdev_state = FALSE;
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+
|
||||
+ if (pEvdev->block_input)
|
||||
+ return;
|
||||
|
||||
while (len == sizeof(ev))
|
||||
{
|
||||
#ifdef MULTITOUCH
|
||||
- EvdevPtr pEvdev = pInfo->private;
|
||||
|
||||
if (pEvdev->mtdev)
|
||||
len = mtdev_get(pEvdev->mtdev, pInfo->fd, ev, NUM_EVENTS) *
|
||||
@@ -2361,6 +2364,7 @@ EvdevInit(DeviceIntPtr device)
|
||||
EvdevDragLockInitProperty(device);
|
||||
EvdevAppleInitProperty(device);
|
||||
EvdevDebugInitProperty(device);
|
||||
+ EvdevBlockInitProperty(device);
|
||||
|
||||
return Success;
|
||||
}
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -291,6 +291,8 @@ typedef struct {
|
||||
BOOL scroll_axes;
|
||||
EvdevRelWheelRec wheel; /* scroll state for REL_WHEEL */
|
||||
EvdevRelWheelRec hwheel; /* scroll state for REL_HWHEEL */
|
||||
+
|
||||
+ BOOL block_input; /* block read for SYN_DROPPED test */
|
||||
} EvdevRec, *EvdevPtr;
|
||||
|
||||
typedef struct {
|
||||
@@ -352,5 +354,9 @@ void Evdev3BEmuInitProperty(DeviceIntPtr);
|
||||
void EvdevWheelEmuInitProperty(DeviceIntPtr);
|
||||
void EvdevDragLockInitProperty(DeviceIntPtr);
|
||||
void EvdevAppleInitProperty(DeviceIntPtr);
|
||||
+
|
||||
+/* For debugging and testing */
|
||||
void EvdevDebugInitProperty(DeviceIntPtr);
|
||||
+void EvdevBlockInitProperty(DeviceIntPtr);
|
||||
+
|
||||
#endif
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,200 +0,0 @@
|
||||
From: Yufeng Shen <miletus@chromium.org>
|
||||
Date: Wed, 7 Mar 2012 20:39:09 +1000
|
||||
Subject: [PATCH] x11-drivers/xf86-input-evdev: Add kernel timestamp to touch
|
||||
events
|
||||
|
||||
This CL passes kernel timestamp for touch events to X (hence Chrome)
|
||||
as a valuator named "Touch Timestamp". The timestamp for all the X
|
||||
touch events generated within one evdev sync report is set to be the
|
||||
same as the last EV_SYN event's timestamp.
|
||||
|
||||
BUG=chrome-os-partner:12187
|
||||
TEST=Run "xinput list 12" on Link and see something like
|
||||
Class originated from: 12. Type: XIValuatorClass
|
||||
Detail for Valuator 4:
|
||||
Label: Touch Timestamp
|
||||
Range: 0.000000 - 2147483647.000000
|
||||
Resolution: 1 units/m
|
||||
Mode: absolute
|
||||
Current value: 0.000000
|
||||
TEST=Run "xinput test-xi2" on Link and check that for each
|
||||
touch event there is timestamp at the correct valuator:
|
||||
EVENT type 6 (Motion)
|
||||
device: 12 (12)
|
||||
detail: 0
|
||||
flags: emulated
|
||||
...
|
||||
valuators:
|
||||
0: 135.95
|
||||
1: 116.93
|
||||
2: 18.00
|
||||
3: 100.00
|
||||
4: 1348803480.46 <- Touch Timestamp
|
||||
EVENT type 18 (TouchBegin)
|
||||
device: 12 (12)
|
||||
detail: 1
|
||||
valuators:
|
||||
0: 135.95
|
||||
1: 116.93
|
||||
2: 18.00
|
||||
3: 100.00
|
||||
4: 1348803480.46 <- Touch Timestamp
|
||||
TEST=Run "xinput test-xi2" on Link and check that for non-touch events
|
||||
(ie USB mouse) there is no Touch Timestamp:
|
||||
EVENT type 6 (Motion)
|
||||
device: 2 (13)
|
||||
...
|
||||
valuators:
|
||||
0: 1.19
|
||||
---
|
||||
src/evdev.c | 47 ++++++++++++++++++++++++++++++++++++++++++-----
|
||||
src/evdev.h | 4 ++++
|
||||
2 files changed, 46 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -102,6 +102,8 @@
|
||||
#define AXIS_LABEL_PROP_ABS_DBL_START_TIME "Abs Dbl Start Timestamp"
|
||||
#define AXIS_LABEL_PROP_ABS_DBL_END_TIME "Abs Dbl End Timestamp"
|
||||
|
||||
+#define AXIS_LABEL_PROP_TOUCH_TIME "Touch Timestamp"
|
||||
+
|
||||
static const char *evdevDefaults[] = {
|
||||
"XkbRules", "evdev",
|
||||
"XkbModel", "evdev",
|
||||
@@ -1097,7 +1099,7 @@ EvdevPostProximityEvents(InputInfoPtr pInfo, int which, int num_v, int first_v,
|
||||
* Post the queued key/button events.
|
||||
*/
|
||||
static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v,
|
||||
- int v[MAX_VALUATORS])
|
||||
+ int v[MAX_VALUATORS], struct input_event *ev)
|
||||
{
|
||||
int i;
|
||||
EvdevPtr pEvdev = pInfo->private;
|
||||
@@ -1127,6 +1129,10 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v,
|
||||
break;
|
||||
#ifdef MULTITOUCH
|
||||
case EV_QUEUE_TOUCH:
|
||||
+ if (pEvdev->touch_time_valuator_index >= 0)
|
||||
+ valuator_mask_set_double(pEvdev->queue[i].touchMask,
|
||||
+ pEvdev->touch_time_valuator_index,
|
||||
+ TimevalToDouble(&ev->time));
|
||||
xf86PostTouchEvent(pInfo->dev, pEvdev->queue[i].detail.touch,
|
||||
pEvdev->queue[i].val, 0,
|
||||
pEvdev->queue[i].touchMask);
|
||||
@@ -1161,7 +1167,7 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
EvdevPostProximityEvents(pInfo, TRUE, num_v, first_v, v);
|
||||
EvdevPostRelativeMotionEvents(pInfo, num_v, first_v, v);
|
||||
EvdevPostAbsoluteMotionEvents(pInfo, num_v, first_v, v);
|
||||
- EvdevPostQueuedEvents(pInfo, num_v, first_v, v);
|
||||
+ EvdevPostQueuedEvents(pInfo, num_v, first_v, v, ev);
|
||||
EvdevPostProximityEvents(pInfo, FALSE, num_v, first_v, v);
|
||||
|
||||
memset(pEvdev->delta, 0, sizeof(pEvdev->delta));
|
||||
@@ -1723,6 +1729,8 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
int num_mt_axes = 0, /* number of MT-only axes */
|
||||
num_mt_axes_total = 0; /* total number of MT axes, including
|
||||
double-counted ones, excluding blacklisted */
|
||||
+ int num_ts_vals = 0; /* number of Timestamp valuators */
|
||||
+ int num_valuators;
|
||||
Atom *atoms;
|
||||
|
||||
pInfo = device->public.devicePrivate;
|
||||
@@ -1785,6 +1793,9 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
}
|
||||
#ifdef MULTITOUCH
|
||||
if (num_mt_axes_total > 0) {
|
||||
+ /* A Touch Timestamp is only appended to Touch events */
|
||||
+ num_ts_vals = 1;
|
||||
+
|
||||
pEvdev->num_mt_vals = num_mt_axes_total;
|
||||
pEvdev->mt_mask = valuator_mask_new(num_mt_axes_total);
|
||||
if (!pEvdev->mt_mask) {
|
||||
@@ -1813,8 +1824,9 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
}
|
||||
|
||||
for (i = 0; i < EVDEV_MAXQUEUE; i++) {
|
||||
+ /* Touch Timestamp is appended directly to the touchMask */
|
||||
pEvdev->queue[i].touchMask =
|
||||
- valuator_mask_new(num_mt_axes_total);
|
||||
+ valuator_mask_new(num_mt_axes_total + 1);
|
||||
if (!pEvdev->queue[i].touchMask) {
|
||||
xf86Msg(X_ERROR, "%s: failed to allocate MT valuator masks for "
|
||||
"evdev event queue.\n", device->name);
|
||||
@@ -1823,7 +1835,10 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
- atoms = malloc((pEvdev->num_vals + num_mt_axes) * sizeof(Atom));
|
||||
+
|
||||
+ num_valuators = num_axes + num_mt_axes + num_ts_vals;
|
||||
+
|
||||
+ atoms = malloc(num_valuators * sizeof(Atom));
|
||||
|
||||
i = 0;
|
||||
for (axis = ABS_X; i < MAX_VALUATORS && axis <= ABS_MAX; axis++) {
|
||||
@@ -1853,9 +1868,22 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
i++;
|
||||
}
|
||||
|
||||
+ /* Note: touch timestamp, if present, is initialized separately */
|
||||
EvdevInitAxesLabels(pEvdev, Absolute, pEvdev->num_vals + num_mt_axes, atoms);
|
||||
|
||||
- if (!InitValuatorClassDeviceStruct(device, num_axes + num_mt_axes, atoms,
|
||||
+#ifdef MULTITOUCH
|
||||
+ if (num_ts_vals > 0) {
|
||||
+ /* Manually setup the atom for Touch Timestamp since it did not happen
|
||||
+ * in EvdevInitAxesLabels(). It will always be the last valuator. */
|
||||
+ pEvdev->touch_time_valuator_index = num_valuators - 1;
|
||||
+ atoms[pEvdev->touch_time_valuator_index] =
|
||||
+ MakeAtom(AXIS_LABEL_PROP_TOUCH_TIME,
|
||||
+ strlen(AXIS_LABEL_PROP_TOUCH_TIME),
|
||||
+ TRUE);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ if (!InitValuatorClassDeviceStruct(device, num_valuators, atoms,
|
||||
GetMotionHistorySize(), Absolute)) {
|
||||
xf86IDrvMsg(pInfo, X_ERROR, "failed to initialize valuator class device.\n");
|
||||
goto out;
|
||||
@@ -1945,6 +1973,14 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
resolution, 0, resolution,
|
||||
Absolute);
|
||||
}
|
||||
+
|
||||
+ /* Manually configure touch_time axis */
|
||||
+ if (num_ts_vals > 0) {
|
||||
+ xf86InitValuatorAxisStruct(device, pEvdev->touch_time_valuator_index,
|
||||
+ atoms[pEvdev->touch_time_valuator_index],
|
||||
+ 0, INT_MAX, 1, 0, 1, Absolute);
|
||||
+ }
|
||||
+
|
||||
#endif
|
||||
|
||||
free(atoms);
|
||||
@@ -2279,6 +2315,7 @@ EvdevInit(DeviceIntPtr device)
|
||||
|
||||
pEvdev->start_time_valuator_index = -1;
|
||||
pEvdev->end_time_valuator_index = -1;
|
||||
+ pEvdev->touch_time_valuator_index = -1;
|
||||
|
||||
if (pEvdev->flags & EVDEV_KEYBOARD_EVENTS)
|
||||
EvdevAddKeyClass(device);
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -260,6 +260,10 @@ typedef struct {
|
||||
unsigned long led_bitmask[NLONGS(LED_CNT)];
|
||||
struct input_absinfo absinfo[ABS_CNT];
|
||||
|
||||
+ /* touch_time_valuator_index is the index for the "Touch Timestamp"
|
||||
+ * property in the device valuator array. We will set it to be the
|
||||
+ * last valuator in EvdevAddAbsValuatorClass(); */
|
||||
+ int touch_time_valuator_index;
|
||||
int start_time_valuator_index;
|
||||
int end_time_valuator_index;
|
||||
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,222 +0,0 @@
|
||||
From: Michael Spang <spang@google.com>
|
||||
Date: Mon, 13 Aug 2012 11:35:32 -0400
|
||||
Subject: [PATCH] Add events debug log support
|
||||
|
||||
This adds a new xinput property "Dump Debug Logs" that dumps the last
|
||||
64k input events to /var/log/evdev_input_events.dat.
|
||||
---
|
||||
src/Makefile.am | 3 +-
|
||||
src/debug.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/evdev.c | 13 ++++++-
|
||||
src/evdev.h | 11 +++++
|
||||
4 files changed, 139 insertions(+), 2 deletions(-)
|
||||
create mode 100644 src/debug.c
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -39,5 +39,6 @@ AM_CPPFLAGS =-I$(top_srcdir)/include
|
||||
emuThird.c \
|
||||
emuWheel.c \
|
||||
draglock.c \
|
||||
- apple.c
|
||||
+ apple.c \
|
||||
+ debug.c
|
||||
|
||||
diff --git a/src/debug.c b/src/debug.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/src/debug.c
|
||||
@@ -0,0 +1,114 @@
|
||||
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+#include "config.h"
|
||||
+#endif
|
||||
+
|
||||
+#include <evdev.h>
|
||||
+#include <evdev-properties.h>
|
||||
+#include <errno.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+#include <exevents.h>
|
||||
+#include <xf86.h>
|
||||
+#include <xf86Xinput.h>
|
||||
+#include <X11/Xatom.h>
|
||||
+
|
||||
+#define XI_PROP_DUMP_DEBUG_LOG "Dump Debug Log"
|
||||
+
|
||||
+#define INPUT_EVENTS_LOG_FILE "/var/log/evdev_input_events.dat"
|
||||
+
|
||||
+static Atom dump_debug_log_prop;
|
||||
+
|
||||
+static void
|
||||
+EvdevDumpLog(InputInfoPtr pInfo) {
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+ int i;
|
||||
+
|
||||
+ FILE *fp = fopen(INPUT_EVENTS_LOG_FILE, "w");
|
||||
+ if (!fp) {
|
||||
+ xf86IDrvMsg(pInfo, X_ERROR, "fopen: %s: %s\n",
|
||||
+ INPUT_EVENTS_LOG_FILE, strerror(errno));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ fprintf(fp, "# device: %s\n", pInfo->name);
|
||||
+
|
||||
+ for (i = ABS_X; i <= ABS_MAX; i++) {
|
||||
+ if (EvdevBitIsSet(pEvdev->abs_bitmask, i)) {
|
||||
+ fprintf(fp, "# absinfo: %d %d %d %d %d %d\n",
|
||||
+ /* event code (axis) */ i,
|
||||
+ pEvdev->absinfo[i].minimum,
|
||||
+ pEvdev->absinfo[i].maximum,
|
||||
+ pEvdev->absinfo[i].fuzz,
|
||||
+ pEvdev->absinfo[i].flat,
|
||||
+ pEvdev->absinfo[i].resolution);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < DEBUG_BUF_SIZE; ++i) {
|
||||
+ struct debug_event *de =
|
||||
+ &pEvdev->debug_buf[(pEvdev->debug_buf_tail + i) % DEBUG_BUF_SIZE];
|
||||
+ if (de->ev.time.tv_sec == 0 && de->ev.time.tv_usec == 0)
|
||||
+ continue;
|
||||
+ fprintf(fp, "E: %ld.%06ld %04x %04x %d %d\n",
|
||||
+ de->ev.time.tv_sec,
|
||||
+ de->ev.time.tv_usec,
|
||||
+ de->ev.type,
|
||||
+ de->ev.code,
|
||||
+ de->ev.value,
|
||||
+ de->slot);
|
||||
+ }
|
||||
+
|
||||
+ fclose(fp);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevDebugGetProperty(DeviceIntPtr dev, Atom property)
|
||||
+{
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevDebugSetProperty(DeviceIntPtr dev, Atom atom,
|
||||
+ XIPropertyValuePtr val, BOOL checkonly)
|
||||
+{
|
||||
+ InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
+ CARD32 data;
|
||||
+
|
||||
+ if (atom == dump_debug_log_prop) {
|
||||
+ if (val->type != XA_INTEGER || val->format != 32 || val->size != 1)
|
||||
+ return BadMatch;
|
||||
+
|
||||
+ data = *(CARD32 *)val->data;
|
||||
+
|
||||
+ if (data != 1)
|
||||
+ return BadValue;
|
||||
+
|
||||
+ if (!checkonly)
|
||||
+ EvdevDumpLog(pInfo);
|
||||
+ }
|
||||
+
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+EvdevDebugInitProperty(DeviceIntPtr dev)
|
||||
+{
|
||||
+
|
||||
+ dump_debug_log_prop = MakeAtom(XI_PROP_DUMP_DEBUG_LOG,
|
||||
+ strlen(XI_PROP_DUMP_DEBUG_LOG), TRUE);
|
||||
+ CARD32 prop_dump_debug_log_init = 0;
|
||||
+
|
||||
+ XIChangeDeviceProperty(dev, dump_debug_log_prop, XA_INTEGER,
|
||||
+ /* format */ 32, PropModeReplace, /* size */ 1,
|
||||
+ &prop_dump_debug_log_init, FALSE);
|
||||
+ XISetDevicePropertyDeletable(dev, dump_debug_log_prop, FALSE);
|
||||
+ XIRegisterPropertyHandler(dev, EvdevDebugSetProperty,
|
||||
+ EvdevDebugGetProperty, NULL);
|
||||
+}
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -219,7 +219,7 @@ static size_t EvdevCountBits(unsigned long *array, size_t nlongs)
|
||||
return count;
|
||||
}
|
||||
|
||||
-static inline int EvdevBitIsSet(const unsigned long *array, int bit)
|
||||
+inline int EvdevBitIsSet(const unsigned long *array, int bit)
|
||||
{
|
||||
return !!(array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS)));
|
||||
}
|
||||
@@ -1208,6 +1208,16 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
syn_dropped = EvdevProcessSyncEvent(pInfo, ev);
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ // Add touch events to the debug log. Keypresses are not included.
|
||||
+ if (ev->type == EV_ABS || ev->type == EV_SYN ||
|
||||
+ (ev->type == EV_KEY && ev->code == BTN_TOUCH)) {
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+ pEvdev->debug_buf[pEvdev->debug_buf_tail].ev = *ev;
|
||||
+ pEvdev->debug_buf[pEvdev->debug_buf_tail].slot = pEvdev->cur_slot;
|
||||
+ pEvdev->debug_buf_tail++;
|
||||
+ pEvdev->debug_buf_tail %= DEBUG_BUF_SIZE;
|
||||
+ }
|
||||
return syn_dropped;
|
||||
}
|
||||
|
||||
@@ -2308,6 +2318,7 @@ EvdevInit(DeviceIntPtr device)
|
||||
EvdevWheelEmuInitProperty(device);
|
||||
EvdevDragLockInitProperty(device);
|
||||
EvdevAppleInitProperty(device);
|
||||
+ EvdevDebugInitProperty(device);
|
||||
|
||||
return Success;
|
||||
}
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -101,6 +101,8 @@
|
||||
/* Number of longs needed to hold the given number of bits */
|
||||
#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
|
||||
|
||||
+#define DEBUG_BUF_SIZE 65536
|
||||
+
|
||||
#define _ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
|
||||
#define _ABS_MT_LAST ABS_MT_DISTANCE
|
||||
#define _ABS_MT_CNT (_ABS_MT_LAST - _ABS_MT_FIRST + 1)
|
||||
@@ -268,6 +270,12 @@ typedef struct {
|
||||
int num_queue;
|
||||
EventQueueRec queue[EVDEV_MAXQUEUE];
|
||||
|
||||
+ struct debug_event {
|
||||
+ struct input_event ev;
|
||||
+ int slot;
|
||||
+ } debug_buf[DEBUG_BUF_SIZE];
|
||||
+ size_t debug_buf_tail;
|
||||
+
|
||||
enum fkeymode fkeymode;
|
||||
|
||||
/* Sync timestamps */
|
||||
@@ -329,9 +337,12 @@ BOOL EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv);
|
||||
void EvdevDragLockPreInit(InputInfoPtr pInfo);
|
||||
BOOL EvdevDragLockFilterEvent(InputInfoPtr pInfo, unsigned int button, int value);
|
||||
|
||||
+int EvdevBitIsSet(const unsigned long *array, int bit);
|
||||
+
|
||||
void EvdevMBEmuInitProperty(DeviceIntPtr);
|
||||
void Evdev3BEmuInitProperty(DeviceIntPtr);
|
||||
void EvdevWheelEmuInitProperty(DeviceIntPtr);
|
||||
void EvdevDragLockInitProperty(DeviceIntPtr);
|
||||
void EvdevAppleInitProperty(DeviceIntPtr);
|
||||
+void EvdevDebugInitProperty(DeviceIntPtr);
|
||||
#endif
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,163 +0,0 @@
|
||||
From: Chung-yih Wang <cywang@chromium.org>
|
||||
Date: Wed, 14 Nov 2012 15:42:36 +0800
|
||||
Subject: [PATCH] Accelerate emulated wheel events
|
||||
|
||||
Use the Chromium OS Mouse Wheel acceleration for Emulated Wheel
|
||||
events. This acceleration replaces the simpler "accumulated inertia
|
||||
mapped to number of button clicks" approach.
|
||||
|
||||
The main motivation of this change is to send Emulated Wheel events to
|
||||
Chrome using the scroll valuators instead of legacy button events.
|
||||
---
|
||||
src/emuWheel.c | 48 +++++++++---------------------------------------
|
||||
src/evdev.c | 20 +++++++++++++++++++-
|
||||
src/evdev.h | 4 ++++
|
||||
3 files changed, 32 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/src/emuWheel.c b/src/emuWheel.c
|
||||
--- a/src/emuWheel.c
|
||||
+++ b/src/emuWheel.c
|
||||
@@ -50,9 +50,6 @@ static Atom prop_wheel_inertia = 0;
|
||||
static Atom prop_wheel_timeout = 0;
|
||||
static Atom prop_wheel_button = 0;
|
||||
|
||||
-/* Local Funciton Prototypes */
|
||||
-static int EvdevWheelEmuInertia(InputInfoPtr pInfo, WheelAxisPtr axis, int value);
|
||||
-
|
||||
/* Filter mouse button events */
|
||||
BOOL
|
||||
EvdevWheelEmuFilterButton(InputInfoPtr pInfo, unsigned int button, int value)
|
||||
@@ -148,8 +145,15 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv)
|
||||
*/
|
||||
if (pAxis)
|
||||
{
|
||||
- if (EvdevWheelEmuInertia(pInfo, pAxis, value))
|
||||
- pOtherAxis->traveled_distance = 0;
|
||||
+ if (pAxis->up_button) {
|
||||
+ /*
|
||||
+ * Try to emit an emulated wheel event. For REL_Y, up is -
|
||||
+ * and down is + but, for REL_WHEEL, up is + and down is -.
|
||||
+ */
|
||||
+ pEv->code = (pEv->code == REL_Y) ? REL_WHEEL : REL_HWHEEL;
|
||||
+ pEv->value *= (pEv->code == REL_WHEEL) ? -1 : 1;
|
||||
+ EvdevProcessRelativeMotionEvent(pInfo, pEv);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Eat motion events while emulateWheel button pressed. */
|
||||
@@ -159,40 +163,6 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
-/* Simulate inertia for our emulated mouse wheel.
|
||||
- Returns the number of wheel events generated.
|
||||
- */
|
||||
-static int
|
||||
-EvdevWheelEmuInertia(InputInfoPtr pInfo, WheelAxisPtr axis, int value)
|
||||
-{
|
||||
- EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
|
||||
- int button;
|
||||
- int inertia;
|
||||
- int rc = 0;
|
||||
-
|
||||
- /* if this axis has not been configured, just eat the motion */
|
||||
- if (!axis->up_button)
|
||||
- return rc;
|
||||
-
|
||||
- axis->traveled_distance += value;
|
||||
-
|
||||
- if (axis->traveled_distance < 0) {
|
||||
- button = axis->up_button;
|
||||
- inertia = -pEvdev->emulateWheel.inertia;
|
||||
- } else {
|
||||
- button = axis->down_button;
|
||||
- inertia = pEvdev->emulateWheel.inertia;
|
||||
- }
|
||||
-
|
||||
- /* Produce button press events for wheel motion */
|
||||
- while(abs(axis->traveled_distance) > pEvdev->emulateWheel.inertia) {
|
||||
- axis->traveled_distance -= inertia;
|
||||
- EvdevQueueButtonClicks(pInfo, button, 1);
|
||||
- rc++;
|
||||
- }
|
||||
- return rc;
|
||||
-}
|
||||
-
|
||||
/* Handle button mapping here to avoid code duplication,
|
||||
returns true if a button mapping was found. */
|
||||
static BOOL
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -131,6 +131,7 @@ static BOOL EvdevGrabDevice(InputInfoPtr pInfo, int grab, int ungrab);
|
||||
static void EvdevSetCalibration(InputInfoPtr pInfo, int num_calibration, int calibration[4]);
|
||||
static int EvdevOpenDevice(InputInfoPtr pInfo);
|
||||
static void EvdevCloseDevice(InputInfoPtr pInfo);
|
||||
+static void EvdevForceWheel(InputInfoPtr pInfo);
|
||||
|
||||
static int EvdevInjectEvent(InputInfoPtr pInfo, uint16_t type,
|
||||
uint16_t code, int32_t value);
|
||||
@@ -787,6 +788,8 @@ EvdevAccelWheel(InputInfoPtr pInfo, struct input_event *ev)
|
||||
|
||||
/* If start_time == end_time, compute click_speed using dt = 1 second */
|
||||
dt = (end_time - start_time) ?: 1.0;
|
||||
+ if (pEvdev->emulateWheel.enabled)
|
||||
+ dt *= pEvdev->emulateWheel.inertia;
|
||||
click_speed = ev->value / dt;
|
||||
|
||||
wheel->value = ev->value;
|
||||
@@ -812,7 +815,7 @@ EvdevAccelWheel(InputInfoPtr pInfo, struct input_event *ev)
|
||||
/**
|
||||
* Take the relative motion input event and process it accordingly.
|
||||
*/
|
||||
-static void
|
||||
+void
|
||||
EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
{
|
||||
int value;
|
||||
@@ -2048,6 +2051,8 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
|
||||
if (!EvdevBitIsSet(pEvdev->bitmask, EV_REL))
|
||||
goto out;
|
||||
|
||||
+ EvdevForceWheel(pInfo);
|
||||
+
|
||||
num_axes = EvdevCountBits(pEvdev->rel_bitmask, NLONGS(REL_MAX));
|
||||
if (num_axes < 1)
|
||||
goto out;
|
||||
@@ -2583,6 +2588,19 @@ EvdevGrabDevice(InputInfoPtr pInfo, int grab, int ungrab)
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Some devices require REL_WHEEL and REL_HWHEEL axes to emulate wheel
|
||||
+ * activities.
|
||||
+ */
|
||||
+static void
|
||||
+EvdevForceWheel(InputInfoPtr pInfo)
|
||||
+{
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+
|
||||
+ EvdevSetBit(pEvdev->rel_bitmask, REL_WHEEL);
|
||||
+ EvdevSetBit(pEvdev->rel_bitmask, REL_HWHEEL);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* Some devices only have other axes (e.g. wheels), but we
|
||||
* still need x/y for these. The server relies on devices having
|
||||
* x/y as axes 0/1 and core/XI 1.x clients expect it too (#44655)
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -314,6 +314,10 @@ void EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,
|
||||
int v[MAX_VALUATORS]);
|
||||
unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);
|
||||
|
||||
+/* Event processing functions */
|
||||
+void EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo,
|
||||
+ struct input_event *ev);
|
||||
+
|
||||
/* Middle Button emulation */
|
||||
int EvdevMBEmuTimer(InputInfoPtr);
|
||||
BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL);
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,537 +0,0 @@
|
||||
From: Chung-yih Wang <cywang@chromium.org>
|
||||
Date: Thu, 15 Nov 2012 16:17:12 +0800
|
||||
Subject: [PATCH] x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
|
||||
|
||||
If an evdev client cannot consume evdev events in its queue fast enough, the
|
||||
evdev kernel driver will enqueue a SYN_DROPPED event and clear the queue
|
||||
once the client's queue is full. The result is that the X driver will be out
|
||||
of sync with respect to the kernel driver state. The patch tries to handle the
|
||||
SYN_DROPPED event by retrieving the kernel driver's state. Retrieving this
|
||||
state is inherently non-atomic, since it requires a sequence of ioctls. We use
|
||||
a simple before and after time stamping approach to deal with the race
|
||||
condition between partially syncing state and any potentially stale events that
|
||||
arrive during synchronization.
|
||||
---
|
||||
src/evdev.c | 371 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
src/evdev.h | 17 +++
|
||||
2 files changed, 381 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -127,11 +127,27 @@ static void EvdevSetCalibration(InputInfoPtr pInfo, int num_calibration, int cal
|
||||
static int EvdevOpenDevice(InputInfoPtr pInfo);
|
||||
static void EvdevCloseDevice(InputInfoPtr pInfo);
|
||||
|
||||
+static int EvdevInjectEvent(InputInfoPtr pInfo, uint16_t type,
|
||||
+ uint16_t code, int32_t value);
|
||||
static void EvdevInitAxesLabels(EvdevPtr pEvdev, int mode, int natoms, Atom *atoms);
|
||||
static void EvdevInitButtonLabels(EvdevPtr pEvdev, int natoms, Atom *atoms);
|
||||
static void EvdevInitProperty(DeviceIntPtr dev);
|
||||
static int EvdevSetProperty(DeviceIntPtr dev, Atom atom,
|
||||
XIPropertyValuePtr val, BOOL checkonly);
|
||||
+static void EvdevSyncState(InputInfoPtr pInfo);
|
||||
+static void EvdevGetKernelTime(struct timeval *current_time,
|
||||
+ BOOL use_monotonic);
|
||||
+static int EvdevKeyStateSync(InputInfoPtr pInfo);
|
||||
+static int EvdevAbsAxesSync(InputInfoPtr pInfo);
|
||||
+static int EvdevAbsMtSlotSync(InputInfoPtr pInfo);
|
||||
+static int EvdevInjectAbsMtAxisChangeEvent(InputInfoPtr pInfo, int slot_index,
|
||||
+ uint16_t code, int32_t value);
|
||||
+static int EvdevCheckAbsMtAxesChange(InputInfoPtr pInfo, MTSlotInfoPtr slots,
|
||||
+ int *count_after_synreport);
|
||||
+static int EvdevGetAllSlotVals(InputInfoPtr pInfo, MTSlotInfoPtr slots);
|
||||
+static int EvdevAbsMtStateSync(InputInfoPtr pInfo, int *count_after_synreport);
|
||||
+static int EvdevAbsStateSync(InputInfoPtr pInfo, int *count_after_synreport);
|
||||
+
|
||||
static Atom prop_product_id;
|
||||
static Atom prop_invert;
|
||||
static Atom prop_calibration;
|
||||
@@ -205,6 +221,11 @@ static inline void EvdevSetBit(unsigned long *array, int bit)
|
||||
array[bit / LONG_BITS] |= (1LL << (bit % LONG_BITS));
|
||||
}
|
||||
|
||||
+static inline void EvdevClearBit(unsigned long *array, int bit)
|
||||
+{
|
||||
+ array[bit / LONG_BITS] &= ~(1LL << (bit % LONG_BITS));
|
||||
+}
|
||||
+
|
||||
static int
|
||||
EvdevGetMajorMinor(InputInfoPtr pInfo)
|
||||
{
|
||||
@@ -660,6 +681,11 @@ EvdevProcessButtonEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
/* Get the signed value, earlier kernels had this as unsigned */
|
||||
value = ev->value;
|
||||
|
||||
+ if (ev->value)
|
||||
+ EvdevSetBit(pEvdev->key_state_bitmask, ev->code);
|
||||
+ else
|
||||
+ EvdevClearBit(pEvdev->key_state_bitmask, ev->code);
|
||||
+
|
||||
/* Handle drag lock */
|
||||
if (EvdevDragLockFilterEvent(pInfo, button, value))
|
||||
return;
|
||||
@@ -787,6 +813,7 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
if (pEvdev->slot_state == SLOTSTATE_EMPTY)
|
||||
pEvdev->slot_state = SLOTSTATE_UPDATE;
|
||||
if (ev->code == ABS_MT_TRACKING_ID) {
|
||||
+ pEvdev->cached_tid[slot_index] = ev->value;
|
||||
if (ev->value >= 0) {
|
||||
pEvdev->slot_state = SLOTSTATE_OPEN;
|
||||
|
||||
@@ -1000,7 +1027,7 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v,
|
||||
* Take the synchronization input event and process it accordingly; the motion
|
||||
* notify events are sent first, then any button/key press/release events.
|
||||
*/
|
||||
-static void
|
||||
+static BOOL
|
||||
EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
{
|
||||
int i;
|
||||
@@ -1008,6 +1035,11 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
int v[MAX_VALUATORS] = {};
|
||||
EvdevPtr pEvdev = pInfo->private;
|
||||
|
||||
+ if (ev->code == SYN_DROPPED) {
|
||||
+ xf86IDrvMsg(pInfo, X_INFO, "+++ SYN_DROPPED +++\n");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
EvdevProcessProximityState(pInfo);
|
||||
|
||||
EvdevProcessValuators(pInfo);
|
||||
@@ -1035,16 +1067,20 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
pEvdev->abs_queued = 0;
|
||||
pEvdev->rel_queued = 0;
|
||||
pEvdev->prox_queued = 0;
|
||||
-
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the events from the device; nothing is actually posted to the server
|
||||
- * until an EV_SYN event is received.
|
||||
+ * until an EV_SYN event is received. As the SYN_DROPPED event indicates that the
|
||||
+ * state of evdev driver will be out of sync with the event queue, additional
|
||||
+ * handling is required for processing the SYN_DROPPED event. The function returns
|
||||
+ * TRUE if a SYN_DROPPED event is received, FALSE otherwise.
|
||||
*/
|
||||
-static void
|
||||
+static BOOL
|
||||
EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
{
|
||||
+ BOOL syn_dropped = FALSE;
|
||||
switch (ev->type) {
|
||||
case EV_REL:
|
||||
EvdevProcessRelativeMotionEvent(pInfo, ev);
|
||||
@@ -1056,9 +1092,10 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
EvdevProcessKeyEvent(pInfo, ev);
|
||||
break;
|
||||
case EV_SYN:
|
||||
- EvdevProcessSyncEvent(pInfo, ev);
|
||||
+ syn_dropped = EvdevProcessSyncEvent(pInfo, ev);
|
||||
break;
|
||||
}
|
||||
+ return syn_dropped;
|
||||
}
|
||||
|
||||
#undef ABS_X_VALUE
|
||||
@@ -1089,6 +1126,308 @@ EvdevFreeMasks(EvdevPtr pEvdev)
|
||||
#endif
|
||||
}
|
||||
|
||||
+static void
|
||||
+EvdevGetKernelTime(struct timeval *current_time, BOOL use_monotonic) {
|
||||
+ struct timespec now;
|
||||
+ clockid_t clockid = (use_monotonic) ? CLOCK_MONOTONIC : CLOCK_REALTIME;
|
||||
+
|
||||
+ clock_gettime(clockid, &now);
|
||||
+ current_time->tv_sec = now.tv_sec;
|
||||
+ current_time->tv_usec = now.tv_nsec / 1000;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevInjectEvent(InputInfoPtr pInfo, uint16_t type, uint16_t code,
|
||||
+ int32_t value) {
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+ struct input_event ev;
|
||||
+
|
||||
+ ev.type = type;
|
||||
+ ev.code = code;
|
||||
+ ev.value = value;
|
||||
+ EvdevGetKernelTime(&ev.time, pEvdev->is_monotonic);
|
||||
+ /* Inject the event by processing it */
|
||||
+ EvdevProcessEvent(pInfo, &ev);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevKeyStateSync(InputInfoPtr pInfo) {
|
||||
+ EvdevPtr pEvdev = pInfo->private;
|
||||
+ unsigned long key_state_bitmask[NLONGS(KEY_CNT)];
|
||||
+ int i, ev_count = 0;
|
||||
+ int len = sizeof(key_state_bitmask);
|
||||
+
|
||||
+ if (ioctl(pInfo->fd, EVIOCGKEY(len), key_state_bitmask) < 0) {
|
||||
+ xf86IDrvMsg(pInfo, X_ERROR,
|
||||
+ "ioctl EVIOCGKEY failed: %s\n", strerror(errno));
|
||||
+ return !Success;
|
||||
+ }
|
||||
+ for (i = 0; i < KEY_CNT; i++) {
|
||||
+ int orig_value, current_value;
|
||||
+ if (!EvdevBitIsSet(pEvdev->key_bitmask, i))
|
||||
+ continue;
|
||||
+ orig_value = EvdevBitIsSet(pEvdev->key_state_bitmask, i);
|
||||
+ current_value = EvdevBitIsSet(key_state_bitmask, i);
|
||||
+ if (current_value == orig_value)
|
||||
+ continue;
|
||||
+ ev_count += EvdevInjectEvent(pInfo, EV_KEY, i, current_value);
|
||||
+ }
|
||||
+ return ev_count;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevAbsAxesSync(InputInfoPtr pInfo) {
|
||||
+ EvdevPtr device = pInfo->private;
|
||||
+ struct input_absinfo absinfo;
|
||||
+ int i, ev_count = 0;
|
||||
+
|
||||
+ /* Sync all ABS_ axes excluding ABS_MT_ axes */
|
||||
+ for (i = ABS_X; i < ABS_MAX; i++) {
|
||||
+ if (i >= ABS_MT_SLOT && i <= _ABS_MT_LAST)
|
||||
+ continue;
|
||||
+ if (!EvdevBitIsSet(device->abs_bitmask, i))
|
||||
+ continue;
|
||||
+ if (ioctl(pInfo->fd, EVIOCGABS(i), &absinfo) < 0) {
|
||||
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGABS(%zu) failed: %s\n",
|
||||
+ i, strerror(errno));
|
||||
+ } else if (absinfo.value != device->absinfo[i].value) {
|
||||
+ ev_count += EvdevInjectEvent(pInfo, EV_ABS, i, absinfo.value);
|
||||
+ }
|
||||
+ }
|
||||
+ return ev_count;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevAbsMtSlotSync(InputInfoPtr pInfo) {
|
||||
+ EvdevPtr device = pInfo->private;
|
||||
+ struct input_absinfo absinfo;
|
||||
+ int ev_count = 0;
|
||||
+
|
||||
+ if (ioctl(pInfo->fd, EVIOCGABS(ABS_MT_SLOT), &absinfo) < 0) {
|
||||
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGABS(ABS_MT_SLOT) failed: %s\n",
|
||||
+ strerror(errno));
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (device->cur_slot != absinfo.value)
|
||||
+ ev_count = EvdevInjectEvent(pInfo, EV_ABS, ABS_MT_SLOT, absinfo.value);
|
||||
+ return ev_count;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevInjectAbsMtAxisChangeEvent(InputInfoPtr pInfo, int slot_index,
|
||||
+ uint16_t code, int32_t value) {
|
||||
+ EvdevPtr device = pInfo->private;
|
||||
+ int ev_count = 0;
|
||||
+
|
||||
+ if (device->cur_slot != slot_index)
|
||||
+ ev_count += EvdevInjectEvent(pInfo, EV_ABS, ABS_MT_SLOT, slot_index);
|
||||
+ ev_count += EvdevInjectEvent(pInfo, EV_ABS, code, value);
|
||||
+ return ev_count;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevCheckAbsMtAxesChange(InputInfoPtr pInfo, MTSlotInfoPtr slots,
|
||||
+ int *count_after_synreport)
|
||||
+{
|
||||
+ EvdevPtr device = pInfo->private;
|
||||
+ int i, j, ev_count = 0;
|
||||
+ int total_ev_count = 0;
|
||||
+
|
||||
+ /*
|
||||
+ * There will be five conditions of a slot change after SYN_DROPPED:
|
||||
+ * a. Finger leaving, i.e., tracking id changes from a non-negative
|
||||
+ * number to -1.
|
||||
+ * b. Finger arriving, i.e., tracking id changes from -1 to a
|
||||
+ * non-negative number.
|
||||
+ * c. Finger changing, i.e., original finger leaving and new finger
|
||||
+ * arriving, tracking id changes from a non-negative number to
|
||||
+ * another one.
|
||||
+ * d. Same finger, but axes change, i.e., no tracking id changes, but some
|
||||
+ * axes values have changed.
|
||||
+ * e. Fingers arrive and leave: tracking ID was -1, and is still -1, but
|
||||
+ * some axes values have changed.
|
||||
+ * f. nothing changed
|
||||
+ *
|
||||
+ * To have X server seamless of SYN_DROPPED event, additional event
|
||||
+ * injections will be required except for conditions e and f:
|
||||
+ *
|
||||
+ * Finger leaving (a): all axes of the slot should be updated first, then
|
||||
+ * followed with tracking id change (-1).
|
||||
+ *
|
||||
+ * Finger arriving (b): new tracking id should be injected first, followed
|
||||
+ * with all axes updates.
|
||||
+ *
|
||||
+ * Finger changing (c): first, inject finger leaving with tracking id -1,
|
||||
+ * followed with new tracking id event, then update all axes data.
|
||||
+ *
|
||||
+ * Same finger, but axes change (d): all axes updates should be injected
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+ for (i = 0; i < num_slots(device); i++) {
|
||||
+ int curr_tid = slots[ABS_MT_TRACKING_ID - _ABS_MT_FIRST].values[i];
|
||||
+ int orig_tid = device->cached_tid[i];
|
||||
+
|
||||
+ /* For conditions b and c, inject the tracking id change events first */
|
||||
+ if (orig_tid != curr_tid && curr_tid != -1) {
|
||||
+ /* For (c), inject the leaving event for original finger */
|
||||
+ if (orig_tid != -1) {
|
||||
+ ev_count += EvdevInjectAbsMtAxisChangeEvent(pInfo,
|
||||
+ i,
|
||||
+ ABS_MT_TRACKING_ID,
|
||||
+ -1);
|
||||
+ ev_count += EvdevInjectEvent(pInfo, EV_SYN, SYN_REPORT, 0);
|
||||
+ /* Reset the count_after_synreport after SYN_REPORT event */
|
||||
+ total_ev_count += ev_count;
|
||||
+ *count_after_synreport = ev_count = 0;
|
||||
+ }
|
||||
+ /* For (b) and (c), set the new tid before updating axes */
|
||||
+ ev_count += EvdevInjectAbsMtAxisChangeEvent(pInfo,
|
||||
+ i,
|
||||
+ ABS_MT_TRACKING_ID,
|
||||
+ curr_tid);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ for (j = _ABS_MT_FIRST; j <= _ABS_MT_LAST; j++) {
|
||||
+ int axis = j - _ABS_MT_FIRST;
|
||||
+ int map, orig_value, curr_value;
|
||||
+ if ((j == ABS_MT_TRACKING_ID) ||
|
||||
+ ((map = device->axis_map[j]) == -1))
|
||||
+ continue;
|
||||
+ if (!EvdevBitIsSet(device->abs_bitmask, j))
|
||||
+ continue;
|
||||
+
|
||||
+ orig_value = valuator_mask_get(device->last_mt_vals[i], map);
|
||||
+ curr_value = slots[axis].values[i];
|
||||
+
|
||||
+ if (orig_value == curr_value)
|
||||
+ continue;
|
||||
+
|
||||
+ /* For condition e, internal axes values should be updated */
|
||||
+ if (orig_tid == -1 && curr_tid == -1) {
|
||||
+ valuator_mask_set(device->last_mt_vals[i], map, curr_value);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /* In addition to condition d, all axes updates will be injected */
|
||||
+ ev_count += EvdevInjectAbsMtAxisChangeEvent(pInfo,
|
||||
+ i,
|
||||
+ j,
|
||||
+ curr_value);
|
||||
+ }
|
||||
+
|
||||
+ /* For condition a, inject finger leaving event */
|
||||
+ if (orig_tid != -1 && curr_tid == -1) {
|
||||
+ ev_count += EvdevInjectAbsMtAxisChangeEvent(pInfo,
|
||||
+ i,
|
||||
+ ABS_MT_TRACKING_ID,
|
||||
+ -1);
|
||||
+ }
|
||||
+ }
|
||||
+ /* Update current slot index if it is different from cur_slot value */
|
||||
+ ev_count += EvdevAbsMtSlotSync(pInfo);
|
||||
+ *count_after_synreport += ev_count;
|
||||
+
|
||||
+ return total_ev_count + ev_count;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevGetAllSlotVals(InputInfoPtr pInfo, MTSlotInfoPtr slots)
|
||||
+{
|
||||
+ EvdevPtr device = pInfo->private;
|
||||
+ int i;
|
||||
+
|
||||
+ /* Retrieve current ABS_MT_ axes for all slots */
|
||||
+ for (i = _ABS_MT_FIRST; i <= _ABS_MT_LAST; i++) {
|
||||
+ MTSlotInfoPtr req = &slots[i - _ABS_MT_FIRST];
|
||||
+ if (!EvdevBitIsSet(device->abs_bitmask, i))
|
||||
+ continue;
|
||||
+ req->code = i;
|
||||
+ if (ioctl(pInfo->fd, EVIOCGMTSLOTS((sizeof(*req))), req) < 0) {
|
||||
+ xf86IDrvMsg(pInfo, X_ERROR,
|
||||
+ "ioctl EVIOCGMTSLOTS(req.code=%d) failed: %s\n",
|
||||
+ req->code, strerror(errno));
|
||||
+ return !Success;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevAbsMtStateSync(InputInfoPtr pInfo, int *count_after_synreport) {
|
||||
+ MTSlotInfo slots[_ABS_MT_CNT];
|
||||
+ int ev_count = 0;
|
||||
+
|
||||
+ /* Get all current slots axes, then check if there is any update required */
|
||||
+ if (EvdevGetAllSlotVals(pInfo, slots) == Success) {
|
||||
+ ev_count = EvdevCheckAbsMtAxesChange(pInfo, slots,
|
||||
+ count_after_synreport);
|
||||
+ }
|
||||
+
|
||||
+ return ev_count;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+EvdevAbsStateSync(InputInfoPtr pInfo, int *count_after_synreport) {
|
||||
+ EvdevPtr device = pInfo->private;
|
||||
+ int ev_count;
|
||||
+
|
||||
+ /* Sync all ABS_ axes */
|
||||
+ ev_count = EvdevAbsAxesSync(pInfo);
|
||||
+ *count_after_synreport += ev_count;
|
||||
+
|
||||
+ /* Sync ABS_MT_ axes for all slots if exists */
|
||||
+ if (device->num_mt_vals)
|
||||
+ ev_count += EvdevAbsMtStateSync(pInfo, count_after_synreport);
|
||||
+
|
||||
+ return ev_count;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Synchronize the current state with kernel evdev driver.
|
||||
+ */
|
||||
+static void
|
||||
+EvdevSyncState(InputInfoPtr pInfo)
|
||||
+{
|
||||
+ int ev_count = 0;
|
||||
+ int ev_count_after_synreport = 0;
|
||||
+ EvdevPtr device = pInfo->private;
|
||||
+
|
||||
+ EvdevGetKernelTime(&device->before_sync_time, device->is_monotonic);
|
||||
+
|
||||
+ ev_count = EvdevKeyStateSync(pInfo);
|
||||
+ ev_count_after_synreport += ev_count;
|
||||
+
|
||||
+ /*
|
||||
+ * TODO: sync all led, switch and sound states as well. We probably need
|
||||
+ * to post events out actively if the new states are different from the
|
||||
+ * cached ones.
|
||||
+ */
|
||||
+
|
||||
+ /* sync abs and abs_mt value/limits */
|
||||
+ ev_count += EvdevAbsStateSync(pInfo, &ev_count_after_synreport);
|
||||
+
|
||||
+ /*
|
||||
+ * Push SYN_REPORT event out if there is any event injected
|
||||
+ * during the state synchronization.
|
||||
+ */
|
||||
+ if (ev_count_after_synreport)
|
||||
+ ev_count += EvdevInjectEvent(pInfo, EV_SYN, SYN_REPORT, 0);
|
||||
+
|
||||
+ EvdevGetKernelTime(&device->after_sync_time, device->is_monotonic);
|
||||
+
|
||||
+ xf86IDrvMsg(pInfo, X_INFO,
|
||||
+ "Sync_State: before %ld.%ld after %ld.%ld injected events=%d\n",
|
||||
+ device->before_sync_time.tv_sec,
|
||||
+ device->before_sync_time.tv_usec,
|
||||
+ device->after_sync_time.tv_sec,
|
||||
+ device->after_sync_time.tv_usec,
|
||||
+ ev_count);
|
||||
+}
|
||||
+
|
||||
/* just a magic number to reduce the number of reads */
|
||||
#define NUM_EVENTS 16
|
||||
|
||||
@@ -1097,6 +1436,7 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
{
|
||||
struct input_event ev[NUM_EVENTS];
|
||||
int i, len = sizeof(ev);
|
||||
+ BOOL sync_evdev_state = FALSE;
|
||||
|
||||
while (len == sizeof(ev))
|
||||
{
|
||||
@@ -1131,9 +1471,23 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
break;
|
||||
}
|
||||
|
||||
- for (i = 0; i < len/sizeof(ev[0]); i++)
|
||||
- EvdevProcessEvent(pInfo, &ev[i]);
|
||||
+ for (i = 0; i < len/sizeof(ev[0]); i++) {
|
||||
+ if (sync_evdev_state)
|
||||
+ break;
|
||||
+ if (timercmp(&ev[i].time, &pEvdev->before_sync_time, <)) {
|
||||
+ /* Ignore events before last sync time */
|
||||
+ continue;
|
||||
+ } else if (timercmp(&ev[i].time, &pEvdev->after_sync_time, >)) {
|
||||
+ /* Event_Process returns TRUE if SYN_DROPPED detected */
|
||||
+ sync_evdev_state = EvdevProcessEvent(pInfo, &ev[i]);
|
||||
+ } else {
|
||||
+ /* If the event occurred during sync, then sync again */
|
||||
+ sync_evdev_state = TRUE;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+ if (sync_evdev_state)
|
||||
+ EvdevSyncState(pInfo);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1325,6 +1679,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
}
|
||||
|
||||
for (i = 0; i < num_slots(pEvdev); i++) {
|
||||
+ pEvdev->cached_tid[i] = -1;
|
||||
pEvdev->last_mt_vals[i] = valuator_mask_new(num_mt_axes_total);
|
||||
if (!pEvdev->last_mt_vals[i]) {
|
||||
xf86IDrvMsg(pInfo, X_ERROR,
|
||||
@@ -1850,6 +2205,8 @@ EvdevOn(DeviceIntPtr device)
|
||||
Evdev3BEmuOn(pInfo);
|
||||
pEvdev->flags |= EVDEV_INITIALIZED;
|
||||
device->public.on = TRUE;
|
||||
+ pEvdev->slot_state = SLOTSTATE_EMPTY;
|
||||
+ EvdevSyncState(pInfo);
|
||||
|
||||
return Success;
|
||||
}
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -97,6 +97,12 @@
|
||||
/* Number of longs needed to hold the given number of bits */
|
||||
#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
|
||||
|
||||
+#define _ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
|
||||
+#define _ABS_MT_LAST ABS_MT_DISTANCE
|
||||
+#define _ABS_MT_CNT (_ABS_MT_LAST - _ABS_MT_FIRST + 1)
|
||||
+
|
||||
+#define MAX_SLOT_COUNT 64
|
||||
+
|
||||
/* Function key mode */
|
||||
enum fkeymode {
|
||||
FKEYMODE_UNKNOWN = 0,
|
||||
@@ -250,8 +256,19 @@ typedef struct {
|
||||
EventQueueRec queue[EVDEV_MAXQUEUE];
|
||||
|
||||
enum fkeymode fkeymode;
|
||||
+
|
||||
+ /* Sync timestamps */
|
||||
+ unsigned long key_state_bitmask[NLONGS(KEY_CNT)];
|
||||
+ struct timeval before_sync_time;
|
||||
+ struct timeval after_sync_time;
|
||||
+ int32_t cached_tid[MAX_SLOT_COUNT];
|
||||
} EvdevRec, *EvdevPtr;
|
||||
|
||||
+typedef struct {
|
||||
+ uint32_t code;
|
||||
+ int32_t values[MAX_SLOT_COUNT];
|
||||
+} MTSlotInfo, *MTSlotInfoPtr;
|
||||
+
|
||||
/* Event posting functions */
|
||||
void EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
|
||||
void EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value);
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,32 +0,0 @@
|
||||
From: Daniel Erat <derat@chromium.org>
|
||||
Date: Wed, 21 Mar 2012 10:44:51 -0700
|
||||
Subject: [PATCH] Disable smooth scrolling in xf86-input-evdev.
|
||||
|
||||
This caused additional valuator-containing motion events to
|
||||
be sent on behalf of the scrollwheel, which Chrome treated
|
||||
identically to touchpad scroll events, resulting in the
|
||||
scrollwheel being unusable.
|
||||
|
||||
BUG=chromium:118608
|
||||
TEST=manual: we scroll 106 pixels for each scrollwheel click on stumpy
|
||||
---
|
||||
src/evdev.h | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/evdev.h b/src/evdev.h
|
||||
--- a/src/evdev.h
|
||||
+++ b/src/evdev.h
|
||||
@@ -67,6 +67,10 @@
|
||||
#define HAVE_SMOOTH_SCROLLING 1
|
||||
#endif
|
||||
|
||||
+/* Smooth scrolling results in the mousewheel generating motion events with
|
||||
+ * valuators that confuse Chrome: http://crosbug.com/118608 */
|
||||
+#undef HAVE_SMOOTH_SCROLLING
|
||||
+
|
||||
#define EVDEV_MAXBUTTONS 32
|
||||
#define EVDEV_MAXQUEUE 32
|
||||
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1 +0,0 @@
|
||||
xf86-input-evdev-2.7.3.ebuild
|
@ -1,30 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-input-evdev/xf86-input-evdev-2.7.3.ebuild,v 1.1 2012/08/14 01:24:15 chithanh Exp $
|
||||
|
||||
EAPI=4
|
||||
XORG_EAUTORECONF=yes
|
||||
|
||||
inherit xorg-2
|
||||
|
||||
DESCRIPTION="Generic Linux input driver"
|
||||
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86"
|
||||
IUSE=""
|
||||
RDEPEND=">=x11-base/xorg-server-1.10[udev]
|
||||
sys-libs/mtdev"
|
||||
DEPEND="${RDEPEND}
|
||||
>=x11-proto/inputproto-2.1.99.3
|
||||
>=sys-kernel/linux-headers-2.6"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/evdev-2.7.0-Use-monotonic-timestamps-for-input-events-if-availab.patch
|
||||
# crosbug.com/35291
|
||||
"${FILESDIR}"/evdev-2.7.3-Add-SYN_DROPPED-handling.patch
|
||||
"${FILESDIR}/evdev-disable-smooth-scrolling.patch"
|
||||
"${FILESDIR}/evdev-2.6.99-wheel-accel.patch"
|
||||
"${FILESDIR}"/evdev-2.7.0-feedback-log.patch
|
||||
"${FILESDIR}"/evdev-2.7.0-add-touch-event-timestamp.patch
|
||||
# crosbug.com/p/13787
|
||||
"${FILESDIR}"/evdev-2.7.0-fix-emulated-wheel.patch
|
||||
"${FILESDIR}"/evdev-2.7.0-add-block-reading-support.patch
|
||||
)
|
@ -1 +0,0 @@
|
||||
DIST xf86-video-armsoc-0.0.1.tar.bz2 194556 SHA256 51dd0b7dae6a216cb3b197436e4c1d0c7dcf15049e947543d45942fbd000b314 SHA512 cf6ca259059f9f1364ce936de4ee21ecbcb3b0a839622f83a6e62abadc1176be9d0dad83c86fe3aa25ad3c2297f0e6f55d4f33f10f91eaff7897a2cfe43bb39e WHIRLPOOL 4f77e7f2c0f89f09853e5d25e376494c813a7ee4a50b5cdefc20df1c5f5b99d2202c7580fa4dd9f221a152321d7656986729aa8383390cc1354d5abd8eb6eda1
|
@ -1,26 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU Public License v2
|
||||
|
||||
EAPI="4"
|
||||
CROS_WORKON_COMMIT="9eb527e3cf926175eda9063fa0ef65504c816364"
|
||||
CROS_WORKON_TREE="0d2d6cd5e23e84585ebe72df251360086c8408bf"
|
||||
CROS_WORKON_PROJECT="chromiumos/third_party/xf86-video-armsoc"
|
||||
CROS_WORKON_LOCALNAME="xf86-video-armsoc"
|
||||
|
||||
XORG_DRI="always"
|
||||
XORG_EAUTORECONF="yes"
|
||||
|
||||
inherit xorg-2 cros-workon
|
||||
|
||||
DESCRIPTION="X.Org driver for ARM devices"
|
||||
|
||||
KEYWORDS="-* arm"
|
||||
|
||||
RDEPEND=">=x11-base/xorg-server-1.9"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
cros-workon_src_unpack
|
||||
mkdir -p "${S}"/m4
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU Public License v2
|
||||
|
||||
EAPI="4"
|
||||
CROS_WORKON_PROJECT="chromiumos/third_party/xf86-video-armsoc"
|
||||
CROS_WORKON_LOCALNAME="xf86-video-armsoc"
|
||||
|
||||
XORG_DRI="always"
|
||||
XORG_EAUTORECONF="yes"
|
||||
|
||||
inherit xorg-2 cros-workon
|
||||
|
||||
DESCRIPTION="X.Org driver for ARM devices"
|
||||
|
||||
KEYWORDS="-* ~arm"
|
||||
|
||||
RDEPEND=">=x11-base/xorg-server-1.9"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
cros-workon_src_unpack
|
||||
mkdir -p "${S}"/m4
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
DIST xf86-video-intel-2.16.0.tar.bz2 1249069 RMD160 9eb9aeabecfbe9f6dde6c81a59c07d9d90f2dc69 SHA1 53441ea4d4335b501d32809b6b92593cbb1f79cf SHA256 77482bcd1e30a57b68ba0d6a1862b4ff3c55fa23bf0109ec2af318a3e066ebfe
|
@ -1,12 +0,0 @@
|
||||
Disable gamma setting. We set this early at boot and we don't want X to mess with our settings.
|
||||
diff -paur xf86-video-intel-2.14.0.orig/src/intel_display.c xf86-video-intel-2.14.0.work/src/intel_display.c
|
||||
--- xf86-video-intel-2.14.0.orig/src/intel_display.c 2011-01-10 15:02:16.534513000 -0800
|
||||
+++ xf86-video-intel-2.14.0.work/src/intel_display.c 2011-04-18 13:40:46.586165000 -0700
|
||||
@@ -617,6 +617,7 @@ static void
|
||||
intel_crtc_gamma_set(xf86CrtcPtr crtc,
|
||||
CARD16 *red, CARD16 *green, CARD16 *blue, int size)
|
||||
{
|
||||
+ return;
|
||||
struct intel_crtc *intel_crtc = crtc->driver_private;
|
||||
struct intel_mode *mode = intel_crtc->mode;
|
||||
|
@ -1,41 +0,0 @@
|
||||
diff -paur xf86-video-intel-2.14.0.orig/src/intel_display.c xf86-video-intel-2.14.0.work/src/intel_display.c
|
||||
--- xf86-video-intel-2.14.0.orig/src/intel_display.c 2011-01-10 15:02:16.534513000 -0800
|
||||
+++ xf86-video-intel-2.14.0.work/src/intel_display.c 2011-05-19 15:06:39.732535000 -0700
|
||||
@@ -57,6 +57,8 @@ struct intel_mode {
|
||||
unsigned int fe_tv_sec;
|
||||
unsigned int fe_tv_usec;
|
||||
|
||||
+ unsigned int last_queued_frame;
|
||||
+
|
||||
struct list outputs;
|
||||
struct list crtcs;
|
||||
};
|
||||
@@ -1435,6 +1437,12 @@ intel_do_pageflip(intel_screen_private *
|
||||
int i, old_fb_id;
|
||||
|
||||
/*
|
||||
+ * Discard this flip since we already have one pending for this frame.
|
||||
+ */
|
||||
+ if ( flip_info->frame <= mode->last_queued_frame )
|
||||
+ return FALSE;
|
||||
+
|
||||
+ /*
|
||||
* Create a new handle for the back buffer
|
||||
*/
|
||||
old_fb_id = mode->fb_id;
|
||||
@@ -1490,11 +1498,15 @@ intel_do_pageflip(intel_screen_private *
|
||||
}
|
||||
|
||||
mode->old_fb_id = old_fb_id;
|
||||
+ mode->last_queued_frame = flip_info->frame;
|
||||
return TRUE;
|
||||
|
||||
error_undo:
|
||||
drmModeRmFB(mode->fd, mode->fb_id);
|
||||
mode->fb_id = old_fb_id;
|
||||
+ for (i = 0; i < config->num_crtc; i++)
|
||||
+ if (config->crtc[i]->enabled)
|
||||
+ mode->flip_count--;
|
||||
|
||||
error_out:
|
||||
xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Page flip failed: %s\n",
|
@ -1,72 +0,0 @@
|
||||
commit 46f97127c22ea42bc8fdae59d2a133e4b8b6c997
|
||||
Author: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Sun Oct 16 21:40:15 2011 +0100
|
||||
|
||||
snb,ivb: Workaround unknown blitter death
|
||||
|
||||
The first workaround was a performance killing MI_FLUSH_DW after every
|
||||
op. This workaround appears to be a stable compromise instead, only
|
||||
requiring a redundant command after every BLT command with little
|
||||
impact on throughput.
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27892
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39524
|
||||
Tested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
|
||||
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
|
||||
index 30717d0..9e58c69 100644
|
||||
--- a/src/intel_uxa.c
|
||||
+++ b/src/intel_uxa.c
|
||||
@@ -340,13 +340,6 @@ static void intel_uxa_solid(PixmapPtr pixmap, int x1, int y1, int x2, int y2)
|
||||
}
|
||||
}
|
||||
|
||||
-static void intel_uxa_done_solid(PixmapPtr pixmap)
|
||||
-{
|
||||
- ScrnInfoPtr scrn = xf86Screens[pixmap->drawable.pScreen->myNum];
|
||||
-
|
||||
- intel_debug_flush(scrn);
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* TODO:
|
||||
* - support planemask using FULL_BLT_CMD?
|
||||
@@ -501,9 +494,19 @@ intel_uxa_copy(PixmapPtr dest, int src_x1, int src_y1, int dst_x1,
|
||||
}
|
||||
}
|
||||
|
||||
-static void intel_uxa_done_copy(PixmapPtr dest)
|
||||
+static void intel_uxa_done(PixmapPtr pixmap)
|
||||
{
|
||||
- ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum];
|
||||
+ ScrnInfoPtr scrn = xf86Screens[pixmap->drawable.pScreen->myNum];
|
||||
+ intel_screen_private *intel = intel_get_screen_private(scrn);
|
||||
+
|
||||
+ if (IS_GEN6(intel) || IS_GEN7(intel)) {
|
||||
+ /* workaround a random BLT hang */
|
||||
+ BEGIN_BATCH_BLT(3);
|
||||
+ OUT_BATCH(XY_SETUP_CLIP_BLT_CMD);
|
||||
+ OUT_BATCH(0);
|
||||
+ OUT_BATCH(0);
|
||||
+ ADVANCE_BATCH();
|
||||
+ }
|
||||
|
||||
intel_debug_flush(scrn);
|
||||
}
|
||||
@@ -1225,13 +1228,13 @@ Bool intel_uxa_init(ScreenPtr screen)
|
||||
intel->uxa_driver->check_solid = intel_uxa_check_solid;
|
||||
intel->uxa_driver->prepare_solid = intel_uxa_prepare_solid;
|
||||
intel->uxa_driver->solid = intel_uxa_solid;
|
||||
- intel->uxa_driver->done_solid = intel_uxa_done_solid;
|
||||
+ intel->uxa_driver->done_solid = intel_uxa_done;
|
||||
|
||||
/* Copy */
|
||||
intel->uxa_driver->check_copy = intel_uxa_check_copy;
|
||||
intel->uxa_driver->prepare_copy = intel_uxa_prepare_copy;
|
||||
intel->uxa_driver->copy = intel_uxa_copy;
|
||||
- intel->uxa_driver->done_copy = intel_uxa_done_copy;
|
||||
+ intel->uxa_driver->done_copy = intel_uxa_done;
|
||||
|
||||
/* Composite */
|
||||
if (IS_GEN2(intel)) {
|
@ -1,156 +0,0 @@
|
||||
diff --git a/src/intel.h b/src/intel.h
|
||||
index 42afaf4..22527df 100644
|
||||
--- a/src/intel.h
|
||||
+++ b/src/intel.h
|
||||
@@ -465,6 +465,7 @@ extern void intel_mode_fini(intel_screen_private *intel);
|
||||
extern int intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, xf86CrtcPtr crtc);
|
||||
extern int intel_crtc_id(xf86CrtcPtr crtc);
|
||||
extern int intel_output_dpms_status(xf86OutputPtr output);
|
||||
+extern void intel_copy_fb(ScrnInfoPtr pScrn);
|
||||
|
||||
enum DRI2FrameEventType {
|
||||
DRI2_SWAP,
|
||||
diff --git a/src/intel_display.c b/src/intel_display.c
|
||||
index 84c7c08..e52ca67 100644
|
||||
--- a/src/intel_display.c
|
||||
+++ b/src/intel_display.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
+#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
@@ -1435,6 +1436,109 @@ fail:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+static PixmapPtr
|
||||
+intel_create_pixmap_for_fbcon(ScrnInfoPtr pScrn)
|
||||
+{
|
||||
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
|
||||
+ drmModeFBPtr fbcon = NULL;
|
||||
+ PixmapPtr pixmap = NULL;
|
||||
+ struct drm_gem_flink flink;
|
||||
+ drm_intel_bo *bo;
|
||||
+
|
||||
+ struct intel_crtc *intel_crtc = xf86_config->crtc[0]->driver_private;
|
||||
+ struct intel_mode *intel_mode = intel_crtc->mode;
|
||||
+ intel_screen_private *intel = intel_get_screen_private(pScrn);
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < intel_mode->mode_res->count_crtcs; i++) {
|
||||
+ intel_crtc = xf86_config->crtc[i]->driver_private;
|
||||
+
|
||||
+ fbcon = drmModeGetFB(intel_mode->fd, intel_crtc->mode_crtc->buffer_id);
|
||||
+ if (fbcon != NULL) break;
|
||||
+ }
|
||||
+ if (fbcon == NULL) {
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
+ "Couldn't find an fbcon\n.");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ flink.handle = fbcon->handle;
|
||||
+ if (ioctl(intel_mode->fd, DRM_IOCTL_GEM_FLINK, &flink) < 0) {
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
+ "Couldn't flink fbcon handle\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ bo = drm_intel_bo_gem_create_from_name(intel->bufmgr,
|
||||
+ "fbcon", flink.name);
|
||||
+
|
||||
+ if (bo == NULL) {
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
+ "Couldn't allocate bo for fbcon handle\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ pixmap = GetScratchPixmapHeader(pScreen,
|
||||
+ fbcon->width, fbcon->height,
|
||||
+ fbcon->depth, fbcon->bpp,
|
||||
+ fbcon->pitch, NULL);
|
||||
+ if (pixmap == NULL) {
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
+ "Couldn't allocate pixmap fbcon contents\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ intel_set_pixmap_bo(pixmap, bo);
|
||||
+ drm_intel_bo_unreference(bo);
|
||||
+ drmModeFreeFB(fbcon);
|
||||
+
|
||||
+ return pixmap;
|
||||
+}
|
||||
+
|
||||
+void intel_copy_fb(ScrnInfoPtr pScrn)
|
||||
+{
|
||||
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
|
||||
+ intel_screen_private *intel = intel_get_screen_private(pScrn);
|
||||
+ PixmapPtr src, dst;
|
||||
+ unsigned int pitch = pScrn->displayWidth * intel->cpp;
|
||||
+ int savePMSize;
|
||||
+ int pixmap_size;
|
||||
+
|
||||
+ /* Ugly: this runs before CreateScratchPixmap() which normally calculates
|
||||
+ this number :(
|
||||
+ */
|
||||
+ pixmap_size = sizeof(PixmapRec) + dixPrivatesSize(PRIVATE_PIXMAP);
|
||||
+ savePMSize = pScreen->totalPixmapSize;
|
||||
+ pScreen->totalPixmapSize = BitmapBytePad(pixmap_size * 8);
|
||||
+
|
||||
+ src = intel_create_pixmap_for_fbcon(pScrn);
|
||||
+ if (src == NULL) {
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
+ "Couldn't create pixmap for fbcon\n");
|
||||
+ pScreen->totalPixmapSize = savePMSize;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* We dont have a screen Pixmap yet */
|
||||
+ dst = GetScratchPixmapHeader(pScreen,
|
||||
+ pScrn->virtualX, pScrn->virtualY,
|
||||
+ pScrn->depth, pScrn->bitsPerPixel,
|
||||
+ pitch,
|
||||
+ NULL);
|
||||
+ pScreen->totalPixmapSize = savePMSize;
|
||||
+ intel_set_pixmap_bo(dst,intel->front_buffer);
|
||||
+ intel->uxa_driver->prepare_copy(src, dst, -1, -1, GXcopy, FB_ALLONES);
|
||||
+
|
||||
+ intel->uxa_driver->copy(dst, 0, 0, 0, 0,
|
||||
+ pScrn->virtualX, pScrn->virtualY);
|
||||
+ intel->uxa_driver->done_copy(dst);
|
||||
+
|
||||
+ intel_batch_submit(pScrn);
|
||||
+
|
||||
+ (*pScreen->DestroyPixmap)(src);
|
||||
+ (*pScreen->DestroyPixmap)(dst);
|
||||
+
|
||||
+}
|
||||
+
|
||||
Bool
|
||||
intel_do_pageflip(intel_screen_private *intel,
|
||||
dri_bo *new_front,
|
||||
@@ -1584,6 +1688,8 @@ Bool intel_mode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
|
||||
unsigned int i;
|
||||
int has_flipping;
|
||||
|
||||
+ scrn->canDoBGNoneRoot = TRUE;
|
||||
+
|
||||
mode = calloc(1, sizeof *mode);
|
||||
if (!mode)
|
||||
return FALSE;
|
||||
diff --git a/src/intel_driver.c b/src/intel_driver.c
|
||||
index 7fc1c1a..40ff396 100644
|
||||
--- a/src/intel_driver.c
|
||||
+++ b/src/intel_driver.c
|
||||
@@ -1154,6 +1154,8 @@ static Bool I830EnterVT(int scrnIndex, int flags)
|
||||
|
||||
intel_set_gem_max_sizes(scrn);
|
||||
|
||||
+ intel_copy_fb(scrn);
|
||||
+
|
||||
if (!xf86SetDesiredModes(scrn))
|
||||
return FALSE;
|
||||
|
@ -1,45 +0,0 @@
|
||||
From e1f718b600029d43bb2e2e4a6b50e5a990c6d08d Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wolfe <cwolfe@chromium.org>
|
||||
Date: Mon, 5 Nov 2012 11:10:24 -0500
|
||||
Subject: [PATCH] xf86-video-intel: Avoid display corruption when unable to
|
||||
flip.
|
||||
|
||||
This replaces the previous patch to xorg-server for crosbug/33775.
|
||||
That change avoids calling ScheduleSwap when a flip would not be
|
||||
classically possible, so interferes with the upcoming per-crtc
|
||||
flip feature.
|
||||
|
||||
BUG=chromium-os:35796
|
||||
TEST=Rapidly minimize/restore/tile window so that the animation spans
|
||||
monitors, observe that none of the preview shadow is left behind.
|
||||
---
|
||||
src/intel_dri.c | 12 +++++++++---
|
||||
1 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/intel_dri.c b/src/intel_dri.c
|
||||
index 1227dbb..938a022 100644
|
||||
--- a/src/intel_dri.c
|
||||
+++ b/src/intel_dri.c
|
||||
@@ -1151,10 +1151,16 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
|
||||
|
||||
/* Flips need to be submitted one frame before */
|
||||
if (can_exchange(draw, front, back)) {
|
||||
- swap_type = DRI2_FLIP;
|
||||
- flip = 1;
|
||||
+ swap_type = DRI2_FLIP;
|
||||
+ flip = 1;
|
||||
+ } else {
|
||||
+ /* Using the DRI2_SWAP path defers the back-to-front blit until
|
||||
+ * the frame event handler. If another swap comes in before that
|
||||
+ * event executes, our two-frame damage tracking will copy from
|
||||
+ * the unfinished frame and cause corruption. To avoid this
|
||||
+ * problem we force an immediate blit here. */
|
||||
+ goto blit_fallback;
|
||||
}
|
||||
-
|
||||
swap_info->type = swap_type;
|
||||
|
||||
/* Correct target_msc by 'flip' if swap_type == DRI2_FLIP.
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,22 +0,0 @@
|
||||
diff --git a/src/intel_display.c b/src/intel_display.c
|
||||
index 84c7c08..a9dee28 100644
|
||||
--- a/src/intel_display.c
|
||||
+++ b/src/intel_display.c
|
||||
@@ -400,7 +400,6 @@ intel_crtc_apply(xf86CrtcPtr crtc)
|
||||
continue;
|
||||
|
||||
intel_output = output->driver_private;
|
||||
- intel_output_dpms_backlight(output, intel_output->dpms_mode, DPMSModeOn);
|
||||
intel_output->dpms_mode = DPMSModeOn;
|
||||
}
|
||||
}
|
||||
@@ -950,9 +949,6 @@ intel_output_dpms(xf86OutputPtr output, int dpms)
|
||||
intel_output->output_id,
|
||||
props->prop_id,
|
||||
dpms);
|
||||
- intel_output_dpms_backlight(output,
|
||||
- intel_output->dpms_mode,
|
||||
- dpms);
|
||||
intel_output->dpms_mode = dpms;
|
||||
drmModeFreeProperty(props);
|
||||
return;
|
@ -1,12 +0,0 @@
|
||||
diff --git a/src/intel_driver.c b/src/intel_driver.c
|
||||
index 9d1c4e8..3e4f664 100644
|
||||
--- a/src/intel_driver.c
|
||||
+++ b/src/intel_driver.c
|
||||
@@ -677,6 +677,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
|
||||
xf86ReturnOptValBool(intel->Options,
|
||||
OPTION_TRIPLE_BUFFER,
|
||||
TRUE);
|
||||
+ intel->use_triple_buffer = FALSE;
|
||||
xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Triple buffering? %s\n",
|
||||
intel->use_triple_buffer ? "enabled" : "disabled");
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,76 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-intel/xf86-video-intel-2.16.0.ebuild,v 1.1 2011/08/11 15:51:43 chithanh Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
XORG_DRI=dri
|
||||
inherit linux-info xorg-2
|
||||
|
||||
DESCRIPTION="X.Org driver for Intel cards"
|
||||
|
||||
KEYWORDS="amd64 ~ia64 x86 -x86-fbsd"
|
||||
IUSE="dri sna xvmc broken_partialswaps"
|
||||
|
||||
RDEPEND="x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
xvmc? (
|
||||
x11-libs/libXvMC
|
||||
)
|
||||
>=x11-libs/libxcb-1.5
|
||||
>=x11-libs/libdrm-2.4.23[video_cards_intel]
|
||||
sna? (
|
||||
>=x11-base/xorg-server-1.10
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=x11-proto/dri2proto-2.6"
|
||||
|
||||
PATCHES=(
|
||||
# Copy the initial framebuffer contents when starting X so we can get
|
||||
# seamless transitions.
|
||||
"${FILESDIR}/2.16.0-copy-fb.patch"
|
||||
# Prevent X from touching boot-time gamma settings.
|
||||
"${FILESDIR}/2.14.0-no-gamma.patch"
|
||||
# BLT ring hang fix.
|
||||
"${FILESDIR}/2.16.0-blt-hang.patch"
|
||||
# Disable backlight adjustments on DPMS mode changes.
|
||||
"${FILESDIR}/2.16.0-no-backlight.patch"
|
||||
# Avoid display corruption when unable to flip
|
||||
"${FILESDIR}/2.16.0-fix-blt-damage.patch"
|
||||
# Split framebuffer and flip crtcs indepenently.
|
||||
"${FILESDIR}/2.16.0-per-crtc-flip.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# Disable triple buffering since we need double buffering
|
||||
# to implement partial updates on top of flips
|
||||
if use broken_partialswaps; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}/2.16.0-no-triple.patch"
|
||||
)
|
||||
fi
|
||||
|
||||
for patch_file in "${PATCHES[@]}"; do
|
||||
epatch $patch_file
|
||||
done
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
xorg-2_pkg_setup
|
||||
CONFIGURE_OPTIONS="$(use_enable dri) --disable-xvmc --enable-kms-only"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if linux_config_exists \
|
||||
&& ! linux_chkconfig_present DRM_I915_KMS; then
|
||||
echo
|
||||
ewarn "This driver requires KMS support in your kernel"
|
||||
ewarn " Device Drivers --->"
|
||||
ewarn " Graphics support --->"
|
||||
ewarn " Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->"
|
||||
ewarn " <*> Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver) --->"
|
||||
ewarn " i915 driver"
|
||||
ewarn " [*] Enable modesetting on intel by default"
|
||||
echo
|
||||
fi
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST xf86-video-vesa-2.3.0.tar.bz2 264539 RMD160 7e7c11f6cc094bb898c57d26a70f6c4c0ab83d0f SHA1 4689b7c295d7a8d7326302dafecb812739617134 SHA256 8ed85a0e94523539d81d5ae6639fa22ceb1c1e3baf89128915db65d4d2900d7a
|
@ -1,12 +0,0 @@
|
||||
diff --git a/src/vesa.c b/src/vesa.c
|
||||
index 61d3550..1136ac3 100644
|
||||
--- a/src/vesa.c
|
||||
+++ b/src/vesa.c
|
||||
@@ -1299,3 +1299,7 @@ VESAMapVidMem(ScrnInfoPtr pScrn)
|
||||
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
|
||||
pVesa->ioBase = pScrn->domainIOBase;
|
||||
+#else
|
||||
+ pVesa->ioBase = 0;
|
||||
+#endif
|
||||
|
||||
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, DEBUG_VERB,
|
@ -1,55 +0,0 @@
|
||||
From 1f84310ddf49778f776a39810aa98211c812e8ab Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
Date: Wed, 19 Oct 2011 08:33:07 +0000
|
||||
Subject: Build fix for ABI Version 12
|
||||
|
||||
ABI Version 12 removes support for multiple PCI domains. If you need to
|
||||
use this driver on a system with more than one PCI domain, you should
|
||||
either port this driver to using libpciaccess directly or stick with an
|
||||
older server.
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
---
|
||||
diff --git a/src/vesa.c b/src/vesa.c
|
||||
index 1136ac3..5a0120c 100644
|
||||
--- a/src/vesa.c
|
||||
+++ b/src/vesa.c
|
||||
@@ -1268,14 +1268,16 @@ VESAMapVidMem(ScrnInfoPtr pScrn)
|
||||
& pVesa->base);
|
||||
}
|
||||
else
|
||||
- pVesa->base = xf86MapDomainMemory(pScrn->scrnIndex, 0, pVesa->pciInfo,
|
||||
- pScrn->memPhysBase, pVesa->mapSize);
|
||||
+ (void) pci_device_map_legacy(pVesa->pciInfo, pScrn->memPhysBase,
|
||||
+ pVesa->mapSize,
|
||||
+ PCI_DEV_MAP_FLAG_WRITABLE,
|
||||
+ & pVesa->base);
|
||||
|
||||
if (pVesa->base) {
|
||||
if (pVesa->mapPhys != 0xa0000)
|
||||
- pVesa->VGAbase = xf86MapDomainMemory(pScrn->scrnIndex, 0,
|
||||
- pVesa->pciInfo,
|
||||
- 0xa0000, 0x10000);
|
||||
+ (void) pci_device_map_legacy(pVesa->pciInfo, 0xa0000, 0x10000,
|
||||
+ PCI_DEV_MAP_FLAG_WRITABLE,
|
||||
+ & pVesa->VGAbase);
|
||||
else
|
||||
pVesa->VGAbase = pVesa->base;
|
||||
|
||||
@@ -1325,10 +1327,12 @@ VESAUnmapVidMem(ScrnInfoPtr pScrn)
|
||||
if (pVesa->mapPhys != 0xa0000) {
|
||||
(void) pci_device_unmap_range(pVesa->pciInfo, pVesa->base,
|
||||
pVesa->mapSize);
|
||||
- xf86UnMapVidMem(pScrn->scrnIndex, pVesa->VGAbase, 0x10000);
|
||||
+ (void) pci_device_unmap_legacy(pVesa->pciInfo, pVesa->VGAbase,
|
||||
+ 0x10000);
|
||||
}
|
||||
else {
|
||||
- xf86UnMapVidMem(pScrn->scrnIndex, pVesa->base, pVesa->mapSize);
|
||||
+ (void) pci_device_unmap_legacy(pVesa->pciInfo, pVesa->base,
|
||||
+ pVesa->mapSize);
|
||||
}
|
||||
#else
|
||||
xf86UnMapVidMem(pScrn->scrnIndex, pVesa->base, pVesa->mapSize);
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
@ -1,202 +0,0 @@
|
||||
diff -rup xf86-video-vesa-2.3.0.orig/src/vesa.c xf86-video-vesa-2.3.0.work/src/vesa.c
|
||||
--- xf86-video-vesa-2.3.0.orig/src/vesa.c 2010-01-04 11:19:13.000000000 -0800
|
||||
+++ xf86-video-vesa-2.3.0.work/src/vesa.c 2011-03-08 11:06:58.264579000 -0800
|
||||
@@ -143,8 +143,6 @@ vesaUpdatePacked(ScreenPtr pScreen, shad
|
||||
shadowUpdatePacked(pScreen, pBuf);
|
||||
}
|
||||
|
||||
-static Bool VESADGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen);
|
||||
-
|
||||
enum GenericTypes
|
||||
{
|
||||
CHIP_VESA_GENERIC
|
||||
@@ -1050,8 +1048,6 @@ VESAScreenInit(int scrnIndex, ScreenPtr
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- VESADGAInit(pScrn, pScreen);
|
||||
-
|
||||
xf86SetBlackWhitePixels(pScreen);
|
||||
miInitializeBackingStore(pScreen);
|
||||
xf86SetBackingStore(pScreen);
|
||||
@@ -1121,11 +1117,6 @@ VESACloseScreen(int scrnIndex, ScreenPtr
|
||||
shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen));
|
||||
xfree(pVesa->shadow);
|
||||
}
|
||||
- if (pVesa->pDGAMode) {
|
||||
- xfree(pVesa->pDGAMode);
|
||||
- pVesa->pDGAMode = NULL;
|
||||
- pVesa->nDGAMode = 0;
|
||||
- }
|
||||
pScrn->vtSema = FALSE;
|
||||
|
||||
pScrn->EnableDisableFBAccess = pVesa->EnableDisableFBAccess;
|
||||
@@ -1652,143 +1643,3 @@ VESADisplayPowerManagementSet(ScrnInfoPt
|
||||
VBEDPMSSet(pVesa->pVbe, mode);
|
||||
}
|
||||
|
||||
-/***********************************************************************
|
||||
- * DGA stuff
|
||||
- ***********************************************************************/
|
||||
-static Bool VESADGAOpenFramebuffer(ScrnInfoPtr pScrn, char **DeviceName,
|
||||
- unsigned char **ApertureBase,
|
||||
- int *ApertureSize, int *ApertureOffset,
|
||||
- int *flags);
|
||||
-static Bool VESADGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode);
|
||||
-static void VESADGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags);
|
||||
-
|
||||
-static Bool
|
||||
-VESADGAOpenFramebuffer(ScrnInfoPtr pScrn, char **DeviceName,
|
||||
- unsigned char **ApertureBase, int *ApertureSize,
|
||||
- int *ApertureOffset, int *flags)
|
||||
-{
|
||||
- VESAPtr pVesa = VESAGetRec(pScrn);
|
||||
-
|
||||
- *DeviceName = NULL; /* No special device */
|
||||
- *ApertureBase = (unsigned char *)(long)(pVesa->mapPhys);
|
||||
- *ApertureSize = pVesa->mapSize;
|
||||
- *ApertureOffset = pVesa->mapOff;
|
||||
- *flags = DGA_NEED_ROOT;
|
||||
-
|
||||
- return (TRUE);
|
||||
-}
|
||||
-
|
||||
-static Bool
|
||||
-VESADGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode)
|
||||
-{
|
||||
- DisplayModePtr pMode;
|
||||
- int scrnIdx = pScrn->pScreen->myNum;
|
||||
- int frameX0, frameY0;
|
||||
-
|
||||
- if (pDGAMode) {
|
||||
- pMode = pDGAMode->mode;
|
||||
- frameX0 = frameY0 = 0;
|
||||
- }
|
||||
- else {
|
||||
- if (!(pMode = pScrn->currentMode))
|
||||
- return (TRUE);
|
||||
-
|
||||
- frameX0 = pScrn->frameX0;
|
||||
- frameY0 = pScrn->frameY0;
|
||||
- }
|
||||
-
|
||||
- if (!(*pScrn->SwitchMode)(scrnIdx, pMode, 0))
|
||||
- return (FALSE);
|
||||
- (*pScrn->AdjustFrame)(scrnIdx, frameX0, frameY0, 0);
|
||||
-
|
||||
- return (TRUE);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-VESADGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
|
||||
-{
|
||||
- (*pScrn->AdjustFrame)(pScrn->pScreen->myNum, x, y, flags);
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-VESADGAGetViewport(ScrnInfoPtr pScrn)
|
||||
-{
|
||||
- return (0);
|
||||
-}
|
||||
-
|
||||
-static DGAFunctionRec VESADGAFunctions =
|
||||
-{
|
||||
- VESADGAOpenFramebuffer,
|
||||
- NULL, /* CloseFramebuffer */
|
||||
- VESADGASetMode,
|
||||
- VESADGASetViewport,
|
||||
- VESADGAGetViewport,
|
||||
- NULL, /* Sync */
|
||||
- NULL, /* FillRect */
|
||||
- NULL, /* BlitRect */
|
||||
- NULL, /* BlitTransRect */
|
||||
-};
|
||||
-
|
||||
-static void
|
||||
-VESADGAAddModes(ScrnInfoPtr pScrn)
|
||||
-{
|
||||
- VESAPtr pVesa = VESAGetRec(pScrn);
|
||||
- DisplayModePtr pMode = pScrn->modes;
|
||||
- DGAModePtr pDGAMode;
|
||||
-
|
||||
- do {
|
||||
- pDGAMode = xrealloc(pVesa->pDGAMode,
|
||||
- (pVesa->nDGAMode + 1) * sizeof(DGAModeRec));
|
||||
- if (!pDGAMode)
|
||||
- break;
|
||||
-
|
||||
- pVesa->pDGAMode = pDGAMode;
|
||||
- pDGAMode += pVesa->nDGAMode;
|
||||
- (void)memset(pDGAMode, 0, sizeof(DGAModeRec));
|
||||
-
|
||||
- ++pVesa->nDGAMode;
|
||||
- pDGAMode->mode = pMode;
|
||||
- pDGAMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE;
|
||||
- pDGAMode->byteOrder = pScrn->imageByteOrder;
|
||||
- pDGAMode->depth = pScrn->depth;
|
||||
- pDGAMode->bitsPerPixel = pScrn->bitsPerPixel;
|
||||
- pDGAMode->red_mask = pScrn->mask.red;
|
||||
- pDGAMode->green_mask = pScrn->mask.green;
|
||||
- pDGAMode->blue_mask = pScrn->mask.blue;
|
||||
- pDGAMode->visualClass = pScrn->bitsPerPixel > 8 ?
|
||||
- TrueColor : PseudoColor;
|
||||
- pDGAMode->xViewportStep = 1;
|
||||
- pDGAMode->yViewportStep = 1;
|
||||
- pDGAMode->viewportWidth = pMode->HDisplay;
|
||||
- pDGAMode->viewportHeight = pMode->VDisplay;
|
||||
-
|
||||
- pDGAMode->bytesPerScanline = pVesa->maxBytesPerScanline;
|
||||
- pDGAMode->imageWidth = pMode->HDisplay;
|
||||
- pDGAMode->imageHeight = pMode->VDisplay;
|
||||
- pDGAMode->pixmapWidth = pDGAMode->imageWidth;
|
||||
- pDGAMode->pixmapHeight = pDGAMode->imageHeight;
|
||||
- pDGAMode->maxViewportX = pScrn->virtualX -
|
||||
- pDGAMode->viewportWidth;
|
||||
- pDGAMode->maxViewportY = pScrn->virtualY -
|
||||
- pDGAMode->viewportHeight;
|
||||
-
|
||||
- pDGAMode->address = pVesa->base;
|
||||
-
|
||||
- pMode = pMode->next;
|
||||
- } while (pMode != pScrn->modes);
|
||||
-}
|
||||
-
|
||||
-static Bool
|
||||
-VESADGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen)
|
||||
-{
|
||||
- VESAPtr pVesa = VESAGetRec(pScrn);
|
||||
-
|
||||
- if (pScrn->depth < 8 || pVesa->mapPhys == 0xa0000L)
|
||||
- return (FALSE);
|
||||
-
|
||||
- if (!pVesa->nDGAMode)
|
||||
- VESADGAAddModes(pScrn);
|
||||
-
|
||||
- return (DGAInit(pScreen, &VESADGAFunctions,
|
||||
- pVesa->pDGAMode, pVesa->nDGAMode));
|
||||
-}
|
||||
Only in xf86-video-vesa-2.3.0.work/src: vesa.c~
|
||||
diff -rup xf86-video-vesa-2.3.0.orig/src/vesa.h xf86-video-vesa-2.3.0.work/src/vesa.h
|
||||
--- xf86-video-vesa-2.3.0.orig/src/vesa.h 2010-01-04 11:19:13.000000000 -0800
|
||||
+++ xf86-video-vesa-2.3.0.work/src/vesa.h 2011-03-08 11:01:24.443622000 -0800
|
||||
@@ -64,9 +64,6 @@
|
||||
/* Int 10 support */
|
||||
#include "xf86int10.h"
|
||||
|
||||
-/* Dga definitions */
|
||||
-#include "dgaproc.h"
|
||||
-
|
||||
#include "fb.h"
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
@@ -108,9 +105,6 @@ typedef struct _VESARec
|
||||
CARD32 windowAoffset;
|
||||
/* Don't override the default refresh rate. */
|
||||
Bool defaultRefresh;
|
||||
- /* DGA info */
|
||||
- DGAModePtr pDGAMode;
|
||||
- int nDGAMode;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
|
||||
Only in xf86-video-vesa-2.3.0.work/src: vesa.h~
|
@ -1,21 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-vesa/xf86-video-vesa-2.3.0.ebuild,v 1.3 2010/02/08 15:31:28 fauli Exp $
|
||||
|
||||
inherit x-modular
|
||||
|
||||
DESCRIPTION="Generic VESA video driver"
|
||||
KEYWORDS="-* ~alpha amd64 ~ia64 x86 ~x86-fbsd"
|
||||
RDEPEND=">=x11-base/xorg-server-1.0.99"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-proto/fontsproto
|
||||
x11-proto/randrproto
|
||||
x11-proto/renderproto
|
||||
x11-proto/xextproto
|
||||
x11-proto/xproto"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/no-dga.patch"
|
||||
"${FILESDIR}/2.3.0-r1-domainiobase.patch"
|
||||
"${FILESDIR}/2.3.0-r1-xf86MapDomainMemory.patch"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user