[-]
[+]
|
Added |
libdrm.changes
|
|
[-]
[+]
|
Changed |
libdrm.spec
^
|
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/Makefile.am
^
|
@@ -59,6 +59,8 @@
libdrm_la_LIBADD = @CLOCK_LIB@
libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm
+AM_CFLAGS = \
+ $(VALGRIND_CFLAGS)
libdrm_la_SOURCES = \
xf86drm.c \
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/Makefile.in
^
|
@@ -441,6 +441,9 @@
libdrm_la_LDFLAGS = -version-number 2:4:0 -no-undefined
libdrm_la_LIBADD = @CLOCK_LIB@
libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm
+AM_CFLAGS = \
+ $(VALGRIND_CFLAGS)
+
libdrm_la_SOURCES = \
xf86drm.c \
xf86drmHash.c \
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/build-aux/config.guess
^
|
@@ -1,10 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012, 2013 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2012-12-29'
+timestamp='2013-05-16'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -26,7 +24,7 @@
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
@@ -52,9 +50,7 @@
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -136,6 +132,27 @@
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -857,21 +874,21 @@
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -884,59 +901,54 @@
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -955,54 +967,57 @@
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/build-aux/config.sub
^
|
@@ -1,10 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012, 2013 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2012-12-29'
+timestamp='2013-04-24'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -70,9 +68,7 @@
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -256,13 +252,13 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc \
+ | arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
+ | d10v | d30v | dlx | dsp16xx | dvp \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
@@ -290,16 +286,17 @@
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
- | or32 \
+ | or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
@@ -369,7 +366,7 @@
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
@@ -407,12 +404,13 @@
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
@@ -810,6 +808,24 @@
basic_machine=m68k-atari
os=-mint
;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -1008,7 +1024,7 @@
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
@@ -1354,7 +1370,7 @@
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1372,7 +1388,7 @@
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
@@ -1500,9 +1516,6 @@
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1594,6 +1607,9 @@
mips*-*)
os=-elf
;;
+ or1k-*)
+ os=-elf
+ ;;
or32-*)
os=-coff
;;
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libdrm 2.4.51.
+# Generated by GNU Autoconf 2.69 for libdrm 2.4.52.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=DRI>.
#
@@ -591,8 +591,8 @@
# Identity of this package.
PACKAGE_NAME='libdrm'
PACKAGE_TARNAME='libdrm'
-PACKAGE_VERSION='2.4.51'
-PACKAGE_STRING='libdrm 2.4.51'
+PACKAGE_VERSION='2.4.52'
+PACKAGE_STRING='libdrm 2.4.52'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=DRI'
PACKAGE_URL=''
@@ -1388,7 +1388,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libdrm 2.4.51 to adapt to many kinds of systems.
+\`configure' configures libdrm 2.4.52 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1458,7 +1458,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libdrm 2.4.51:";;
+ short | recursive ) echo "Configuration of libdrm 2.4.52:";;
esac
cat <<\_ACEOF
@@ -1613,7 +1613,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libdrm configure 2.4.51
+libdrm configure 2.4.52
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2036,7 +2036,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libdrm $as_me 2.4.51, which was
+It was created by libdrm $as_me 2.4.52, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2905,7 +2905,7 @@
# Define the identity of the package.
PACKAGE='libdrm'
- VERSION='2.4.51'
+ VERSION='2.4.52'
cat >>confdefs.h <<_ACEOF
@@ -7141,7 +7141,7 @@
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -7159,10 +7159,7 @@
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
- powerpcle-*linux*)
- LD="${LD-ld} -m elf32lppclinux"
- ;;
- powerpc-*linux*)
+ ppc64-*linux*|powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7181,10 +7178,7 @@
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- powerpcle-*linux*)
- LD="${LD-ld} -m elf64lppc"
- ;;
- powerpc-*linux*)
+ ppc*-*linux*|powerpc*-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -10857,7 +10851,14 @@
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -10868,6 +10869,12 @@
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -11066,14 +11073,10 @@
# before this can be enabled.
hardcode_into_libs=yes
- # Add ABI-specific directories to the system library path.
- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
-
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -13811,7 +13814,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libdrm $as_me 2.4.51, which was
+This file was extended by libdrm $as_me 2.4.52, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13877,7 +13880,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libdrm config.status 2.4.51
+libdrm config.status 2.4.52
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/configure.ac
^
|
@@ -20,7 +20,7 @@
AC_PREREQ([2.63])
AC_INIT([libdrm],
- [2.4.51],
+ [2.4.52],
[https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
[libdrm])
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/freedreno/freedreno_device.c
^
|
@@ -135,6 +135,16 @@
return dev;
}
+/* like fd_device_new() but creates it's own private dup() of the fd
+ * which is close()d when the device is finalized.
+ */
+struct fd_device * fd_device_new_dup(int fd)
+{
+ struct fd_device *dev = fd_device_new(dup(fd));
+ dev->closefd = 1;
+ return dev;
+}
+
struct fd_device * fd_device_ref(struct fd_device *dev)
{
atomic_inc(&dev->refcnt);
@@ -147,6 +157,8 @@
drmHashDestroy(dev->handle_table);
drmHashDestroy(dev->name_table);
drmHashDelete(dev_table, dev->fd);
+ if (dev->closefd)
+ close(dev->fd);
dev->funcs->destroy(dev);
}
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/freedreno/freedreno_drmif.h
^
|
@@ -72,6 +72,7 @@
*/
struct fd_device * fd_device_new(int fd);
+struct fd_device * fd_device_new_dup(int fd);
struct fd_device * fd_device_ref(struct fd_device *dev);
void fd_device_del(struct fd_device *dev);
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/freedreno/freedreno_priv.h
^
|
@@ -84,6 +84,8 @@
struct fd_bo_bucket cache_bucket[14 * 4];
int num_buckets;
time_t time;
+
+ int closefd; /* call close(fd) upon destruction */
};
void fd_cleanup_bo_cache(struct fd_device *dev, time_t time);
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/include/drm/Makefile
^
|
@@ -189,16 +189,16 @@
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/robclark/src/mesa/drm/build-aux/missing aclocal-1.13
+ACLOCAL = ${SHELL} /home/kwg/Projects/drm/build-aux/missing aclocal-1.13
ALLOCA =
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 0
AR = ar
-AUTOCONF = ${SHELL} /home/robclark/src/mesa/drm/build-aux/missing autoconf
-AUTOHEADER = ${SHELL} /home/robclark/src/mesa/drm/build-aux/missing autoheader
-AUTOMAKE = ${SHELL} /home/robclark/src/mesa/drm/build-aux/missing automake-1.13
+AUTOCONF = ${SHELL} /home/kwg/Projects/drm/build-aux/missing autoconf
+AUTOHEADER = ${SHELL} /home/kwg/Projects/drm/build-aux/missing autoheader
+AUTOMAKE = ${SHELL} /home/kwg/Projects/drm/build-aux/missing automake-1.13
AWK = gawk
-CAIRO_CFLAGS = -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16
+CAIRO_CFLAGS = -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16
CAIRO_LIBS = -lcairo
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -215,16 +215,16 @@
ECHO_C =
ECHO_N = -n
ECHO_T =
-EGREP = /usr/bin/grep -E
+EGREP = /bin/grep -E
EXEEXT =
-FGREP = /usr/bin/grep -F
-GREP = /usr/bin/grep
+FGREP = /bin/grep -F
+GREP = /bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-LD = /usr/bin/ld -m elf_x86_64
+LD = /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
LDFLAGS =
LIBOBJS =
LIBS =
@@ -235,10 +235,10 @@
LN_S = ln -s
LTLIBOBJS =
MAINT =
-MAKEINFO = ${SHELL} /home/robclark/src/mesa/drm/build-aux/missing makeinfo
+MAKEINFO = ${SHELL} /home/kwg/Projects/drm/build-aux/missing makeinfo
MANIFEST_TOOL = :
MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
-MKDIR_P = /usr/bin/mkdir -p
+MKDIR_P = /bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT =
OBJDUMP = objdump
@@ -248,10 +248,10 @@
PACKAGE = libdrm
PACKAGE_BUGREPORT = https://bugs.freedesktop.org/enter_bug.cgi?product=DRI
PACKAGE_NAME = libdrm
-PACKAGE_STRING = libdrm 2.4.51
+PACKAGE_STRING = libdrm 2.4.52
PACKAGE_TARNAME = libdrm
PACKAGE_URL =
-PACKAGE_VERSION = 2.4.51
+PACKAGE_VERSION = 2.4.52
PATH_SEPARATOR = :
PCIACCESS_CFLAGS =
PCIACCESS_LIBS = -lpciaccess
@@ -261,19 +261,19 @@
PTHREADSTUBS_CFLAGS =
PTHREADSTUBS_LIBS =
RANLIB = ranlib
-SED = /usr/bin/sed
+SED = /bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
-VALGRIND_CFLAGS =
-VALGRIND_LIBS =
-VERSION = 2.4.51
+VALGRIND_CFLAGS = -I/usr/include/valgrind
+VALGRIND_LIBS = -L/usr/lib64/valgrind -lcoregrind-amd64-linux -lvex-amd64-linux -lgcc
+VERSION = 2.4.52
WARN_CFLAGS = -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Wdeclaration-after-statement -Wold-style-definition -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline
XSLTPROC = /usr/bin/xsltproc
-abs_builddir = /home/robclark/src/mesa/drm/include/drm
-abs_srcdir = /home/robclark/src/mesa/drm/include/drm
-abs_top_builddir = /home/robclark/src/mesa/drm
-abs_top_srcdir = /home/robclark/src/mesa/drm
+abs_builddir = /home/kwg/Projects/drm/include/drm
+abs_srcdir = /home/kwg/Projects/drm/include/drm
+abs_top_builddir = /home/kwg/Projects/drm
+abs_top_srcdir = /home/kwg/Projects/drm
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_DUMPBIN =
@@ -302,9 +302,9 @@
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = ${SHELL} /home/robclark/src/mesa/drm/build-aux/install-sh
+install_sh = ${SHELL} /home/kwg/Projects/drm/build-aux/install-sh
kernel_source =
-libdir = ${exec_prefix}/lib
+libdir = /usr/lib64
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
@@ -312,14 +312,14 @@
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
-pkgconfigdir = ${exec_prefix}/lib/pkgconfig
-prefix = /usr/local/xorg
+pkgconfigdir = /usr/lib64/pkgconfig
+prefix = /usr
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
-sysconfdir = ${prefix}/etc
+sysconfdir = /etc
target_alias =
top_build_prefix = ../../
top_builddir = ../..
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/include/drm/i915_drm.h
^
|
@@ -27,12 +27,36 @@
#ifndef _I915_DRM_H_
#define _I915_DRM_H_
-#include "drm.h"
+#include <drm.h>
/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints.
*/
+/**
+ * DOC: uevents generated by i915 on it's device node
+ *
+ * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch
+ * event from the gpu l3 cache. Additional information supplied is ROW,
+ * BANK, SUBBANK, SLICE of the affected cacheline. Userspace should keep
+ * track of these events and if a specific cache-line seems to have a
+ * persistent error remap it with the l3 remapping tool supplied in
+ * intel-gpu-tools. The value supplied with the event is always 1.
+ *
+ * I915_ERROR_UEVENT - Generated upon error detection, currently only via
+ * hangcheck. The error detection event is a good indicator of when things
+ * began to go badly. The value supplied with the event is a 1 upon error
+ * detection, and a 0 upon reset completion, signifying no more error
+ * exists. NOTE: Disabling hangcheck or reset via module parameter will
+ * cause the related events to not be seen.
+ *
+ * I915_RESET_UEVENT - Event is generated just before an attempt to reset the
+ * the GPU. The value supplied with the event is always 1. NOTE: Disable
+ * reset via module parameter will cause this event to not be seen.
+ */
+#define I915_L3_PARITY_UEVENT "L3_PARITY_ERROR"
+#define I915_ERROR_UEVENT "ERROR"
+#define I915_RESET_UEVENT "RESET"
/* Each region is a minimum of 16k, and there are at most 255 of them.
*/
@@ -195,8 +219,8 @@
#define DRM_I915_GEM_WAIT 0x2c
#define DRM_I915_GEM_CONTEXT_CREATE 0x2d
#define DRM_I915_GEM_CONTEXT_DESTROY 0x2e
-#define DRM_I915_GEM_SET_CACHEING 0x2f
-#define DRM_I915_GEM_GET_CACHEING 0x30
+#define DRM_I915_GEM_SET_CACHING 0x2f
+#define DRM_I915_GEM_GET_CACHING 0x30
#define DRM_I915_REG_READ 0x31
#define DRM_I915_GET_RESET_STATS 0x32
@@ -223,8 +247,8 @@
#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin)
#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin)
#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy)
-#define DRM_IOCTL_I915_GEM_SET_CACHEING DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_CACHEING, struct drm_i915_gem_cacheing)
-#define DRM_IOCTL_I915_GEM_GET_CACHEING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_CACHEING, struct drm_i915_gem_cacheing)
+#define DRM_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_CACHING, struct drm_i915_gem_caching)
+#define DRM_IOCTL_I915_GEM_GET_CACHING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_CACHING, struct drm_i915_gem_caching)
#define DRM_IOCTL_I915_GEM_THROTTLE DRM_IO ( DRM_COMMAND_BASE + DRM_I915_GEM_THROTTLE)
#define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT)
#define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT)
@@ -305,7 +329,14 @@
#define I915_PARAM_HAS_LLC 17
#define I915_PARAM_HAS_ALIASING_PPGTT 18
#define I915_PARAM_HAS_WAIT_TIMEOUT 19
-#define I915_PARAM_HAS_VEBOX 22
+#define I915_PARAM_HAS_SEMAPHORES 20
+#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21
+#define I915_PARAM_HAS_VEBOX 22
+#define I915_PARAM_HAS_SECURE_BATCHES 23
+#define I915_PARAM_HAS_PINNED_BATCHES 24
+#define I915_PARAM_HAS_EXEC_NO_RELOC 25
+#define I915_PARAM_HAS_EXEC_HANDLE_LUT 26
+#define I915_PARAM_HAS_WT 27
typedef struct drm_i915_getparam {
int param;
@@ -626,7 +657,11 @@
__u64 offset;
#define EXEC_OBJECT_NEEDS_FENCE (1<<0)
+#define EXEC_OBJECT_NEEDS_GTT (1<<1)
+#define EXEC_OBJECT_WRITE (1<<2)
+#define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_WRITE<<1)
__u64 flags;
+
__u64 rsvd1;
__u64 rsvd2;
};
@@ -672,6 +707,34 @@
/** Resets the SO write offset registers for transform feedback on gen7. */
#define I915_EXEC_GEN7_SOL_RESET (1<<8)
+/** Request a privileged ("secure") batch buffer. Note only available for
+ * DRM_ROOT_ONLY | DRM_MASTER processes.
+ */
+#define I915_EXEC_SECURE (1<<9)
+
+/** Inform the kernel that the batch is and will always be pinned. This
+ * negates the requirement for a workaround to be performed to avoid
+ * an incoherent CS (such as can be found on 830/845). If this flag is
+ * not passed, the kernel will endeavour to make sure the batch is
+ * coherent with the CS before execution. If this flag is passed,
+ * userspace assumes the responsibility for ensuring the same.
+ */
+#define I915_EXEC_IS_PINNED (1<<10)
+
+/** Provide a hint to the kernel that the command stream and auxilliary
+ * state buffers already holds the correct presumed addresses and so the
+ * relocation process may be skipped if no buffers need to be moved in
+ * preparation for the execbuffer.
+ */
+#define I915_EXEC_NO_RELOC (1<<11)
+
+/** Use the reloc.handle as an index into the exec object array rather
+ * than as the per-file handle.
+ */
+#define I915_EXEC_HANDLE_LUT (1<<12)
+
+#define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_HANDLE_LUT<<1)
+
#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
#define i915_execbuffer2_set_context_id(eb2, context) \
(eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK
@@ -708,21 +771,45 @@
__u32 busy;
};
-#define I915_CACHEING_NONE 0
-#define I915_CACHEING_CACHED 1
+/**
+ * I915_CACHING_NONE
+ *
+ * GPU access is not coherent with cpu caches. Default for machines without an
+ * LLC.
+ */
+#define I915_CACHING_NONE 0
+/**
+ * I915_CACHING_CACHED
+ *
+ * GPU access is coherent with cpu caches and furthermore the data is cached in
+ * last-level caches shared between cpu cores and the gpu GT. Default on
+ * machines with HAS_LLC.
+ */
+#define I915_CACHING_CACHED 1
+/**
+ * I915_CACHING_DISPLAY
+ *
+ * Special GPU caching mode which is coherent with the scanout engines.
+ * Transparently falls back to I915_CACHING_NONE on platforms where no special
+ * cache mode (like write-through or gfdt flushing) is available. The kernel
+ * automatically sets this mode when using a buffer as a scanout target.
+ * Userspace can manually set this mode to avoid a costly stall and clflush in
+ * the hotpath of drawing the first frame.
+ */
+#define I915_CACHING_DISPLAY 2
-struct drm_i915_gem_cacheing {
+struct drm_i915_gem_caching {
/**
- * Handle of the buffer to set/get the cacheing level of. */
+ * Handle of the buffer to set/get the caching level of. */
__u32 handle;
/**
* Cacheing level to apply or return value
*
- * bits0-15 are for generic cacheing control (i.e. the above defined
+ * bits0-15 are for generic caching control (i.e. the above defined
* values). bits16-31 are reserved for platform-specific variations
* (e.g. l3$ caching on gen7). */
- __u32 cacheing;
+ __u32 caching;
};
#define I915_TILING_NONE 0
@@ -962,4 +1049,4 @@
__u32 pad;
};
-#endif /* _I915_DRM_H_ */
+#endif /* _I915_DRM_H_ */
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/intel/intel_bufmgr.h
^
|
@@ -61,9 +61,8 @@
unsigned long align;
/**
- * Last seen card virtual address (offset from the beginning of the
- * aperture) for the object. This should be used to fill relocation
- * entries when calling drm_intel_bo_emit_reloc()
+ * Deprecated field containing (possibly the low 32-bits of) the last
+ * seen virtual card address. Use offset64 instead.
*/
unsigned long offset;
@@ -84,6 +83,13 @@
* MM-specific handle for accessing object
*/
int handle;
+
+ /**
+ * Last seen card virtual address (offset from the beginning of the
+ * aperture) for the object. This should be used to fill relocation
+ * entries when calling drm_intel_bo_emit_reloc()
+ */
+ uint64_t offset64;
};
enum aub_dump_bmp_format {
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/intel/intel_bufmgr_gem.c
^
|
@@ -212,6 +212,15 @@
bool reusable;
/**
+ * Boolean of whether the GPU is definitely not accessing the buffer.
+ *
+ * This is only valid when reusable, since non-reusable
+ * buffers are those that have been shared wth other
+ * processes, so we don't know their state.
+ */
+ bool idle;
+
+ /**
* Size in bytes of this buffer and its relocation descendents.
*
* Used to avoid costly tree walking in
@@ -382,7 +391,7 @@
(unsigned long long)bo_gem->relocs[j].offset,
target_gem->gem_handle,
target_gem->name,
- target_bo->offset,
+ target_bo->offset64,
bo_gem->relocs[j].delta);
}
}
@@ -567,11 +576,19 @@
struct drm_i915_gem_busy busy;
int ret;
+ if (bo_gem->reusable && bo_gem->idle)
+ return false;
+
VG_CLEAR(busy);
busy.handle = bo_gem->gem_handle;
ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
-
+ if (ret == 0) {
+ bo_gem->idle = !busy.busy;
+ return busy.busy;
+ } else {
+ return false;
+ }
return (ret == 0 && busy.busy);
}
@@ -894,6 +911,7 @@
bo_gem->bo.size = open_arg.size;
bo_gem->bo.offset = 0;
+ bo_gem->bo.offset64 = 0;
bo_gem->bo.virtual = NULL;
bo_gem->bo.bufmgr = bufmgr;
bo_gem->name = name;
@@ -1337,7 +1355,9 @@
int drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo)
{
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
+#ifdef HAVE_VALGRIND
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
+#endif
int ret;
/* If the CPU cache isn't coherent with the GTT, then use a
@@ -1687,7 +1707,7 @@
target_bo_gem->gem_handle;
bo_gem->relocs[bo_gem->reloc_count].read_domains = read_domains;
bo_gem->relocs[bo_gem->reloc_count].write_domain = write_domain;
- bo_gem->relocs[bo_gem->reloc_count].presumed_offset = target_bo->offset;
+ bo_gem->relocs[bo_gem->reloc_count].presumed_offset = target_bo->offset64;
bo_gem->reloc_target_info[bo_gem->reloc_count].bo = target_bo;
if (target_bo != bo)
@@ -1838,11 +1858,12 @@
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
/* Update the buffer offset */
- if (bufmgr_gem->exec_objects[i].offset != bo->offset) {
+ if (bufmgr_gem->exec_objects[i].offset != bo->offset64) {
DBG("BO %d (%s) migrated: 0x%08lx -> 0x%08llx\n",
- bo_gem->gem_handle, bo_gem->name, bo->offset,
+ bo_gem->gem_handle, bo_gem->name, bo->offset64,
(unsigned long long)bufmgr_gem->exec_objects[i].
offset);
+ bo->offset64 = bufmgr_gem->exec_objects[i].offset;
bo->offset = bufmgr_gem->exec_objects[i].offset;
}
}
@@ -1858,10 +1879,11 @@
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo;
/* Update the buffer offset */
- if (bufmgr_gem->exec2_objects[i].offset != bo->offset) {
+ if (bufmgr_gem->exec2_objects[i].offset != bo->offset64) {
DBG("BO %d (%s) migrated: 0x%08lx -> 0x%08llx\n",
- bo_gem->gem_handle, bo_gem->name, bo->offset,
+ bo_gem->gem_handle, bo_gem->name, bo->offset64,
(unsigned long long)bufmgr_gem->exec2_objects[i].offset);
+ bo->offset64 = bufmgr_gem->exec2_objects[i].offset;
bo->offset = bufmgr_gem->exec2_objects[i].offset;
}
}
@@ -2217,6 +2239,8 @@
drm_intel_bo *bo = bufmgr_gem->exec_bos[i];
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
+ bo_gem->idle = false;
+
/* Disconnect the buffer from the validate list */
bo_gem->validate_index = -1;
bufmgr_gem->exec_bos[i] = NULL;
@@ -2312,6 +2336,8 @@
drm_intel_bo *bo = bufmgr_gem->exec_bos[i];
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo;
+ bo_gem->idle = false;
+
/* Disconnect the buffer from the validate list */
bo_gem->validate_index = -1;
bufmgr_gem->exec_bos[i] = NULL;
@@ -2365,6 +2391,7 @@
if (ret != 0)
return -errno;
+ bo->offset64 = pin.offset;
bo->offset = pin.offset;
return 0;
}
@@ -3018,15 +3045,19 @@
drm_intel_context *context = NULL;
int ret;
+ context = calloc(1, sizeof(*context));
+ if (!context)
+ return NULL;
+
VG_CLEAR(create);
ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &create);
if (ret != 0) {
DBG("DRM_IOCTL_I915_GEM_CONTEXT_CREATE failed: %s\n",
strerror(errno));
+ free(context);
return NULL;
}
- context = calloc(1, sizeof(*context));
context->ctx_id = create.ctx_id;
context->bufmgr = bufmgr;
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/libkms/Makefile.am
^
|
@@ -31,6 +31,11 @@
libkms_la_SOURCES += radeon.c
endif
+if HAVE_EXYNOS
+libkms_la_SOURCES += exynos.c
+AM_CFLAGS += -I$(top_srcdir)/exynos
+endif
+
libkmsincludedir = ${includedir}/libkms
libkmsinclude_HEADERS = libkms.h
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/libkms/Makefile.in
^
|
@@ -83,6 +83,8 @@
@HAVE_VMWGFX_TRUE@am__append_1 = vmwgfx.c
@HAVE_NOUVEAU_TRUE@am__append_2 = nouveau.c
@HAVE_RADEON_TRUE@am__append_3 = radeon.c
+@HAVE_EXYNOS_TRUE@am__append_4 = exynos.c
+@HAVE_EXYNOS_TRUE@am__append_5 = -I$(top_srcdir)/exynos
subdir = libkms
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/libkms.pc.in $(top_srcdir)/build-aux/depcomp \
@@ -130,12 +132,14 @@
LTLIBRARIES = $(libkms_la_LTLIBRARIES)
libkms_la_DEPENDENCIES = ../libdrm.la
am__libkms_la_SOURCES_DIST = internal.h linux.c intel.c dumb.c api.c \
- vmwgfx.c nouveau.c radeon.c
+ vmwgfx.c nouveau.c radeon.c exynos.c
@HAVE_VMWGFX_TRUE@am__objects_1 = vmwgfx.lo
@HAVE_NOUVEAU_TRUE@am__objects_2 = nouveau.lo
@HAVE_RADEON_TRUE@am__objects_3 = radeon.lo
+@HAVE_EXYNOS_TRUE@am__objects_4 = exynos.lo
am_libkms_la_OBJECTS = linux.lo intel.lo dumb.lo api.lo \
- $(am__objects_1) $(am__objects_2) $(am__objects_3)
+ $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+ $(am__objects_4)
libkms_la_OBJECTS = $(am_libkms_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -342,11 +346,8 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CFLAGS = \
- $(WARN_CFLAGS) \
- -I$(top_srcdir)/include/drm \
- -I$(top_srcdir)
-
+AM_CFLAGS = $(WARN_CFLAGS) -I$(top_srcdir)/include/drm -I$(top_srcdir) \
+ $(am__append_5)
libkms_la_LTLIBRARIES = libkms.la
libkms_ladir = $(libdir)
libkms_la_LDFLAGS = -version-number 1:0:0 -no-undefined
@@ -356,7 +357,8 @@
#libkms_la_LIBADD += $(LIBUDEV_LIBS)
#endif
libkms_la_SOURCES = internal.h linux.c intel.c dumb.c api.c \
- $(am__append_1) $(am__append_2) $(am__append_3)
+ $(am__append_1) $(am__append_2) $(am__append_3) \
+ $(am__append_4)
libkmsincludedir = ${includedir}/libkms
libkmsinclude_HEADERS = libkms.h
pkgconfig_DATA = libkms.pc
@@ -444,6 +446,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumb.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exynos.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau.Plo@am__quote@
|
[-]
[+]
|
Added |
libdrm-2.4.52.tar.bz2/libkms/exynos.c
^
|
@@ -0,0 +1,207 @@
+/* exynos.c
+ *
+ * Copyright 2009 Samsung Electronics Co., Ltd.
+ * Authors:
+ * SooChan Lim <sc1.lim@samsung.com>
+ * Sangjin LEE <lsj119@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#define HAVE_STDINT_H
+#define _FILE_OFFSET_BITS 64
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "internal.h"
+
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include "xf86drm.h"
+
+#include "exynos_drm.h"
+
+struct exynos_bo
+{
+ struct kms_bo base;
+ unsigned map_count;
+};
+
+static int
+exynos_get_prop(struct kms_driver *kms, unsigned key, unsigned *out)
+{
+ switch (key) {
+ case KMS_BO_TYPE:
+ *out = KMS_BO_TYPE_SCANOUT_X8R8G8B8 | KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8;
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int
+exynos_destroy(struct kms_driver *kms)
+{
+ free(kms);
+ return 0;
+}
+
+static int
+exynos_bo_create(struct kms_driver *kms,
+ const unsigned width, const unsigned height,
+ const enum kms_bo_type type, const unsigned *attr,
+ struct kms_bo **out)
+{
+ struct drm_exynos_gem_create arg;
+ unsigned size, pitch;
+ struct exynos_bo *bo;
+ int i, ret;
+
+ for (i = 0; attr[i]; i += 2) {
+ switch (attr[i]) {
+ case KMS_WIDTH:
+ case KMS_HEIGHT:
+ case KMS_BO_TYPE:
+ break;
+ default:
+ return -EINVAL;
+ }
+ }
+
+ bo = calloc(1, sizeof(*bo));
+ if (!bo)
+ return -ENOMEM;
+
+ if (type == KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8) {
+ pitch = 64 * 4;
+ size = 64 * 64 * 4;
+ } else if (type == KMS_BO_TYPE_SCANOUT_X8R8G8B8) {
+ pitch = width * 4;
+ pitch = (pitch + 512 - 1) & ~(512 - 1);
+ size = pitch * ((height + 4 - 1) & ~(4 - 1));
+ } else {
+ return -EINVAL;
+ }
+
+ memset(&arg, 0, sizeof(arg));
+ arg.size = size;
+
+ ret = drmCommandWriteRead(kms->fd, DRM_EXYNOS_GEM_CREATE, &arg, sizeof(arg));
+ if (ret)
+ goto err_free;
+
+ bo->base.kms = kms;
+ bo->base.handle = arg.handle;
+ bo->base.size = size;
+ bo->base.pitch = pitch;
+
+ *out = &bo->base;
+
+ return 0;
+
+err_free:
+ free(bo);
+ return ret;
+}
+
+static int
+exynos_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out)
+{
+ switch (key) {
+ default:
+ return -EINVAL;
+ }
+}
+
+static int
+exynos_bo_map(struct kms_bo *_bo, void **out)
+{
+ struct exynos_bo *bo = (struct exynos_bo *)_bo;
+ struct drm_exynos_gem_map_off arg;
+ void *map = NULL;
+ int ret;
+
+ if (bo->base.ptr) {
+ bo->map_count++;
+ *out = bo->base.ptr;
+ return 0;
+ }
+
+ memset(&arg, 0, sizeof(arg));
+ arg.handle = bo->base.handle;
+
+ ret = drmCommandWriteRead(bo->base.kms->fd, DRM_EXYNOS_GEM_MAP_OFFSET, &arg, sizeof(arg));
+ if (ret)
+ return ret;
+
+ map = mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset);
+ if (map == MAP_FAILED)
+ return -errno;
+
+ bo->base.ptr = map;
+ bo->map_count++;
+ *out = bo->base.ptr;
+
+ return 0;
+}
+
+static int
+exynos_bo_unmap(struct kms_bo *_bo)
+{
+ struct exynos_bo *bo = (struct exynos_bo *)_bo;
+ bo->map_count--;
+ return 0;
+}
+
+static int
+exynos_bo_destroy(struct kms_bo *_bo)
+{
+ struct exynos_bo *bo = (struct exynos_bo *)_bo;
+ struct drm_gem_close arg;
+ int ret;
+
+ if (bo->base.ptr) {
+ /* XXX Sanity check map_count */
+ munmap(bo->base.ptr, bo->base.size);
+ bo->base.ptr = NULL;
+ }
+
+ memset(&arg, 0, sizeof(arg));
+ arg.handle = bo->base.handle;
+
+ ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_GEM_CLOSE, &arg);
+ if (ret)
+ return -errno;
+
+ free(bo);
+ return 0;
+}
+
+int
+exynos_create(int fd, struct kms_driver **out)
+{
+ struct kms_driver *kms;
+
+ kms = calloc(1, sizeof(*kms));
+ if (!kms)
+ return -ENOMEM;
+
+ kms->fd = fd;
+
+ kms->bo_create = exynos_bo_create;
+ kms->bo_map = exynos_bo_map;
+ kms->bo_unmap = exynos_bo_unmap;
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/libkms/internal.h
^
|
@@ -74,4 +74,6 @@
int radeon_create(int fd, struct kms_driver **out);
+int exynos_create(int fd, struct kms_driver **out);
+
#endif
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/libkms/linux.c
^
|
@@ -115,6 +115,10 @@
else if (!strcmp(name, "radeon"))
ret = radeon_create(fd, out);
#endif
+#ifdef HAVE_EXYNOS
+ else if (!strcmp(name, "exynos"))
+ ret = exynos_create(fd, out);
+#endif
else
ret = -ENOSYS;
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/m4/libtool.m4
^
|
@@ -1312,7 +1312,7 @@
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -1326,10 +1326,7 @@
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
- powerpcle-*linux*)
- LD="${LD-ld} -m elf32lppclinux"
- ;;
- powerpc-*linux*)
+ ppc64-*linux*|powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -1348,10 +1345,7 @@
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- powerpcle-*linux*)
- LD="${LD-ld} -m elf64lppc"
- ;;
- powerpc-*linux*)
+ ppc*-*linux*|powerpc*-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -2485,7 +2479,14 @@
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -2496,6 +2497,12 @@
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -2675,14 +2682,10 @@
# before this can be enabled.
hardcode_into_libs=yes
- # Add ABI-specific directories to the system library path.
- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
-
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/tests/kmstest/main.c
^
|
@@ -61,6 +61,7 @@
"radeon",
"nouveau",
"vmwgfx",
+ "exynos",
NULL
};
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/tests/modetest/modetest.c
^
|
@@ -693,6 +693,7 @@
uint32_t crtc_id;
char mode_str[64];
char format_str[5];
+ unsigned int vrefresh;
unsigned int fourcc;
drmModeModeInfo *mode;
struct crtc *crtc;
@@ -714,7 +715,8 @@
};
static drmModeModeInfo *
-connector_find_mode(struct device *dev, uint32_t con_id, const char *mode_str)
+connector_find_mode(struct device *dev, uint32_t con_id, const char *mode_str,
+ const unsigned int vrefresh)
{
drmModeConnector *connector;
drmModeModeInfo *mode;
@@ -726,8 +728,16 @@
for (i = 0; i < connector->count_modes; i++) {
mode = &connector->modes[i];
- if (!strcmp(mode->name, mode_str))
- return mode;
+ if (!strcmp(mode->name, mode_str)) {
+ /* If the vertical refresh frequency is not specified then return the
+ * first mode that match with the name. Else, return the mode that match
+ * the name and the specified vertical refresh frequency.
+ */
+ if (vrefresh == 0)
+ return mode;
+ else if (mode->vrefresh == vrefresh)
+ return mode;
+ }
}
return NULL;
@@ -789,7 +799,7 @@
for (i = 0; i < (int)pipe->num_cons; i++) {
mode = connector_find_mode(dev, pipe->con_ids[i],
- pipe->mode_str);
+ pipe->mode_str, pipe->vrefresh);
if (mode == NULL) {
fprintf(stderr,
"failed to find mode \"%s\" for connector %u\n",
@@ -1059,8 +1069,8 @@
if (pipe->mode == NULL)
continue;
- printf("setting mode %s@%s on connectors ",
- pipe->mode_str, pipe->format_str);
+ printf("setting mode %s-%dHz@%s on connectors ",
+ pipe->mode_str, pipe->mode->vrefresh, pipe->format_str);
for (j = 0; j < pipe->num_cons; ++j)
printf("%u, ", pipe->con_ids[j]);
printf("crtc %d\n", pipe->crtc->crtc->crtc_id);
@@ -1192,6 +1202,7 @@
const char *p;
char *endp;
+ pipe->vrefresh = 0;
pipe->crtc_id = (uint32_t)-1;
strcpy(pipe->format_str, "XR24");
@@ -1226,11 +1237,19 @@
arg = endp + 1;
- p = strchrnul(arg, '@');
+ /* Search for the vertical refresh or the format. */
+ p = strpbrk(arg, "-@");
+ if (p == NULL)
+ p = arg + strlen(arg);
len = min(sizeof pipe->mode_str - 1, (unsigned int)(p - arg));
strncpy(pipe->mode_str, arg, len);
pipe->mode_str[len] = '\0';
+ if (*p == '-') {
+ pipe->vrefresh = strtoul(p + 1, &endp, 10);
+ p = endp;
+ }
+
if (*p == '@') {
strncpy(pipe->format_str, p + 1, 4);
pipe->format_str[4] = '\0';
@@ -1323,7 +1342,7 @@
fprintf(stderr, "\n Test options:\n\n");
fprintf(stderr, "\t-P <crtc_id>:<w>x<h>[+<x>+<y>][*<scale>][@<format>]\tset a plane\n");
- fprintf(stderr, "\t-s <connector_id>[,<connector_id>][@<crtc_id>]:<mode>[@<format>]\tset a mode\n");
+ fprintf(stderr, "\t-s <connector_id>[,<connector_id>][@<crtc_id>]:<mode>[-<vrefresh>][@<format>]\tset a mode\n");
fprintf(stderr, "\t-v\ttest vsynced page flipping\n");
fprintf(stderr, "\t-w <obj_id>:<prop_name>:<value>\tset property\n");
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/xf86drm.h
^
|
@@ -92,8 +92,14 @@
typedef unsigned int drmSize, *drmSizePtr; /**< For mapped regions */
typedef void *drmAddress, **drmAddressPtr; /**< For mapped regions */
+#if (__GNUC__ >= 3)
+#define DRM_PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
+#else
+#define DRM_PRINTFLIKE(f, a)
+#endif
+
typedef struct _drmServerInfo {
- int (*debug_print)(const char *format, va_list ap);
+ int (*debug_print)(const char *format, va_list ap) DRM_PRINTFLIKE(1,0);
int (*load_module)(const char *name);
void (*get_perms)(gid_t *, mode_t *);
} drmServerInfo, *drmServerInfoPtr;
|
[-]
[+]
|
Changed |
libdrm-2.4.52.tar.bz2/xf86drmMode.c
^
|
@@ -41,6 +41,10 @@
#include <sys/ioctl.h>
#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86drmMode.h"
#include "xf86drm.h"
#include <drm.h>
@@ -49,6 +53,16 @@
#include <unistd.h>
#include <errno.h>
+#ifdef HAVE_VALGRIND
+#include <valgrind.h>
+#include <memcheck.h>
+#define VG(x) x
+#else
+#define VG(x)
+#endif
+
+#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
+
#define U642VOID(x) ((void *)(unsigned long)(x))
#define VOID2U64(x) ((uint64_t)(unsigned long)(x))
@@ -245,6 +259,7 @@
struct drm_mode_fb_cmd f;
int ret;
+ VG_CLEAR(f);
f.width = width;
f.height = height;
f.pitch = pitch;
@@ -335,6 +350,7 @@
struct drm_mode_crtc crtc;
drmModeCrtcPtr r;
+ VG_CLEAR(crtc);
crtc.crtc_id = crtcId;
if (drmIoctl(fd, DRM_IOCTL_MODE_GETCRTC, &crtc))
@@ -368,6 +384,7 @@
{
struct drm_mode_crtc crtc;
+ VG_CLEAR(crtc);
crtc.x = x;
crtc.y = y;
crtc.crtc_id = crtcId;
@@ -436,6 +453,7 @@
drmModeEncoderPtr r = NULL;
enc.encoder_id = encoder_id;
+ enc.crtc_id = 0;
enc.encoder_type = 0;
enc.possible_crtcs = 0;
enc.possible_clones = 0;
@@ -580,6 +598,7 @@
struct drm_mode_get_property prop;
drmModePropertyPtr r;
+ VG_CLEAR(prop);
prop.prop_id = property_id;
prop.count_enum_blobs = 0;
prop.count_values = 0;
|
[-]
[+]
|
Added |
libdrm.yaml
^
|
@@ -0,0 +1,73 @@
+Name: libdrm
+Summary: Direct Rendering Manager runtime library
+Version: 2.4.52
+Release: 1
+Group: System/Libraries
+License: MIT
+URL: http://dri.sourceforge.net
+Sources:
+ - http://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.bz2
+Description: |
+ %{summary}
+
+PkgConfigBR:
+ - pciaccess >= 0.10
+ - pthread-stubs
+ - udev
+UseAsNeeded: False
+Configure: reconfigure
+ConfigOptions:
+ - --enable-omap-experimental-api
+ - --enable-exynos-experimental-api
+ - --enable-freedreno-experimental-api
+SubPackages:
+ - Name: exynos
+ Summary: Direct Rendering Manager exynos api
+ Group: Development/Libraries
+ Description: |
+ %{summary}.
+
+ - Name: freedreno
+ Summary: Direct Rendering Manager freedreno api
+ Group: Development/Libraries
+ Description: |
+ %{summary}.
+
+ - Name: omap
+ Summary: Direct Rendering Manager omap api
+ Group: Development/Libraries
+ Description: |
+ %{summary}.
+
+ - Name: radeon
+ Summary: Direct Rendering Manager radeon api
+ Group: Development/Libraries
+ Description: |
+ %{summary}.
+
+ - Name: nouveau
+ Summary: Direct Rendering Manager nouveau api
+ Group: Development/Libraries
+ Description: |
+ %{summary}.
+
+ - Name: intel
+ Summary: Direct Rendering Manager intel api
+ Group: Development/Libraries
+ Description: |
+ %{summary}.
+
+ - Name: devel
+ Summary: Direct Rendering Manager development package
+ Group: Development/Libraries
+ Description: |
+ %{summary}.
+ Requires:
+ - "%{name}-exynos = %{version}-%{release}"
+ - "%{name}-freedreno = %{version}-%{release}"
+ - "%{name}-omap = %{version}-%{release}"
+ - "%{name}-radeon = %{version}-%{release}"
+ - "%{name}-nouveau = %{version}-%{release}"
+ - "%{name}-intel = %{version}-%{release}"
+ - kernel-headers
+
|