diff -Nru intel-gpu-tools-1.13/aclocal.m4 intel-gpu-tools-1.14/aclocal.m4 --- intel-gpu-tools-1.13/aclocal.m4 2015-12-02 16:47:57.000000000 +0000 +++ intel-gpu-tools-1.14/aclocal.m4 2016-03-01 16:02:42.000000000 +0000 @@ -20,32 +20,152 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# 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. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +dnl -*- mode: autoconf -*- -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +# serial 2 + +dnl Usage: +dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +AC_DEFUN([GTK_DOC_CHECK], +[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + + ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) + AC_MSG_CHECKING([for gtk-doc]) + PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) + AC_MSG_RESULT($have_gtk_doc) + + if test "$have_gtk_doc" = "no"; then + AC_MSG_WARN([ + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found.]) + fi + + dnl check for tools we added during development + dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that + dnl may not be writable by the user. Currently, automake requires that the + dnl test name must end in '.test'. + dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 + AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) + AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) + AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) + AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) + + dnl for overriding the documentation installation directory + AC_ARG_WITH([html-dir], + AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, + [with_html_dir='${datadir}/gtk-doc/html']) + HTML_DIR="$with_html_dir" + AC_SUBST([HTML_DIR]) + + dnl enable/disable documentation building + AC_ARG_ENABLE([gtk-doc], + AS_HELP_STRING([--enable-gtk-doc], + [use gtk-doc to build documentation [[default=no]]]),, + [enable_gtk_doc=no]) + + AC_MSG_CHECKING([whether to build gtk-doc documentation]) + AC_MSG_RESULT($enable_gtk_doc) + + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + AC_MSG_ERROR([ + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '[$]0'.]) + fi + + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) + fi + + dnl enable/disable output formats + AC_ARG_ENABLE([gtk-doc-html], + AS_HELP_STRING([--enable-gtk-doc-html], + [build documentation in html format [[default=yes]]]),, + [enable_gtk_doc_html=yes]) + AC_ARG_ENABLE([gtk-doc-pdf], + AS_HELP_STRING([--enable-gtk-doc-pdf], + [build documentation in pdf format [[default=no]]]),, + [enable_gtk_doc_pdf=no]) + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + AC_SUBST([AM_DEFAULT_VERBOSITY]) + + AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) + AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) + AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) + AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) +]) + +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29) +dnl +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -67,18 +187,19 @@ PKG_CONFIG="" fi fi[]dnl -])# PKG_PROG_PKG_CONFIG +])dnl PKG_PROG_PKG_CONFIG -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -88,8 +209,10 @@ $3])dnl fi]) -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -101,10 +224,11 @@ else pkg_failed=untried fi[]dnl -])# _PKG_CONFIG +])dnl _PKG_CONFIG -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -112,19 +236,17 @@ else _pkg_short_errors_supported=no fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED +])dnl _PKG_SHORT_ERRORS_SUPPORTED -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -178,16 +300,40 @@ AC_MSG_RESULT([yes]) $3 fi[]dnl -])# PKG_CHECK_MODULES +])dnl PKG_CHECK_MODULES -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -198,16 +344,18 @@ AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR +])dnl PKG_INSTALLDIR -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --with-noarch-pkgconfigdir parameter. +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -218,13 +366,15 @@ AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR +])dnl PKG_NOARCH_INSTALLDIR -# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------- -# Retrieves the value of the pkg-config variable for the given module. +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl @@ -233,7 +383,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl -])# PKG_CHECK_VAR +])dnl PKG_CHECK_VAR dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl @@ -659,13 +809,24 @@ fi]) # Test for the ability of xmlto to generate a text target +# +# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the +# following test for empty XML docbook files. +# For compatibility reasons use the following empty XML docbook file and if +# it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF AS_IF([test "$have_xmlto" = yes], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], - [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) + [# Try it again with a non-empty XML file. + cat > conftest.xml << "EOF" + +EOF + AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], + [have_xmlto_text=yes], + [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) rm -f conftest.xml AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) @@ -3514,7 +3675,6 @@ ]) # _AM_PROG_TAR m4_include([m4/as-compiler-flag.m4]) -m4_include([m4/gtk-doc.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff -Nru intel-gpu-tools-1.13/Android.mk intel-gpu-tools-1.14/Android.mk --- intel-gpu-tools-1.13/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/Android.mk 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,2 @@ +include $(call all-named-subdir-makefiles, lib tests tools benchmarks) + diff -Nru intel-gpu-tools-1.13/assembler/doc/Makefile.in intel-gpu-tools-1.14/assembler/doc/Makefile.in --- intel-gpu-tools-1.13/assembler/doc/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/assembler/doc/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -87,13 +87,13 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = assembler/doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -157,6 +157,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -201,6 +203,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -299,11 +302,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/assembler/gram.c intel-gpu-tools-1.14/assembler/gram.c --- intel-gpu-tools-1.13/assembler/gram.c 2015-12-02 16:17:41.000000000 +0000 +++ intel-gpu-tools-1.14/assembler/gram.c 2016-03-01 16:03:14.000000000 +0000 @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. 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 @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -956,7 +956,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 437 "gram.y" /* yacc.c:355 */ @@ -979,6 +979,8 @@ #line 981 "gram.c" /* yacc.c:355 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif @@ -1006,7 +1008,7 @@ /* Copy the second part of user declarations. */ -#line 1010 "gram.c" /* yacc.c:358 */ +#line 1012 "gram.c" /* yacc.c:358 */ /* Unqualified %code blocks. */ #line 570 "gram.y" /* yacc.c:359 */ @@ -1062,7 +1064,7 @@ } -#line 1066 "gram.c" /* yacc.c:359 */ +#line 1068 "gram.c" /* yacc.c:359 */ #ifdef short # undef short @@ -2839,55 +2841,55 @@ case 2: #line 625 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } -#line 2843 "gram.c" /* yacc.c:1646 */ +#line 2845 "gram.c" /* yacc.c:1646 */ break; case 3: #line 626 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = -(yyvsp[0].integer);} -#line 2849 "gram.c" /* yacc.c:1646 */ +#line 2851 "gram.c" /* yacc.c:1646 */ break; case 4: #line 629 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } -#line 2855 "gram.c" /* yacc.c:1646 */ +#line 2857 "gram.c" /* yacc.c:1646 */ break; case 5: #line 630 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); } -#line 2861 "gram.c" /* yacc.c:1646 */ +#line 2863 "gram.c" /* yacc.c:1646 */ break; case 6: #line 631 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); } -#line 2867 "gram.c" /* yacc.c:1646 */ +#line 2869 "gram.c" /* yacc.c:1646 */ break; case 7: #line 632 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); } -#line 2873 "gram.c" /* yacc.c:1646 */ +#line 2875 "gram.c" /* yacc.c:1646 */ break; case 8: #line 633 "gram.y" /* yacc.c:1646 */ { if ((yyvsp[0].integer)) (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); else YYERROR;} -#line 2879 "gram.c" /* yacc.c:1646 */ +#line 2881 "gram.c" /* yacc.c:1646 */ break; case 9: #line 634 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = -(yyvsp[0].integer);} -#line 2885 "gram.c" /* yacc.c:1646 */ +#line 2887 "gram.c" /* yacc.c:1646 */ break; case 10: #line 635 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-1].integer); } -#line 2891 "gram.c" /* yacc.c:1646 */ +#line 2893 "gram.c" /* yacc.c:1646 */ break; case 11: @@ -2895,7 +2897,7 @@ { compiled_program = (yyvsp[0].program); } -#line 2899 "gram.c" /* yacc.c:1646 */ +#line 2901 "gram.c" /* yacc.c:1646 */ break; case 13: @@ -2903,7 +2905,7 @@ { (yyval.reg) = (yyvsp[0].reg); } -#line 2907 "gram.c" /* yacc.c:1646 */ +#line 2909 "gram.c" /* yacc.c:1646 */ break; case 14: @@ -2911,7 +2913,7 @@ { (yyval.integer) = (yyvsp[0].integer); } -#line 2915 "gram.c" /* yacc.c:1646 */ +#line 2917 "gram.c" /* yacc.c:1646 */ break; case 15: @@ -2923,7 +2925,7 @@ (yyval.region).width = BRW_WIDTH_1; (yyval.region).horiz_stride = ffs(0); } -#line 2927 "gram.c" /* yacc.c:1646 */ +#line 2929 "gram.c" /* yacc.c:1646 */ break; case 16: @@ -2931,7 +2933,7 @@ { (yyval.region) = (yyvsp[0].region); } -#line 2935 "gram.c" /* yacc.c:1646 */ +#line 2937 "gram.c" /* yacc.c:1646 */ break; case 17: @@ -2939,7 +2941,7 @@ { (yyval.integer) = 1; } -#line 2943 "gram.c" /* yacc.c:1646 */ +#line 2945 "gram.c" /* yacc.c:1646 */ break; case 18: @@ -2947,7 +2949,7 @@ { (yyval.integer) = (yyvsp[0].integer); } -#line 2951 "gram.c" /* yacc.c:1646 */ +#line 2953 "gram.c" /* yacc.c:1646 */ break; case 19: @@ -2955,7 +2957,7 @@ { (yyval.integer) = (yyvsp[0].regtype).type; } -#line 2959 "gram.c" /* yacc.c:1646 */ +#line 2961 "gram.c" /* yacc.c:1646 */ break; case 20: @@ -2982,7 +2984,7 @@ insert_register(new_reg); } } -#line 2986 "gram.c" /* yacc.c:1646 */ +#line 2988 "gram.c" /* yacc.c:1646 */ break; case 23: @@ -2990,7 +2992,7 @@ { program_defaults.execute_size = (yyvsp[0].integer); } -#line 2994 "gram.c" /* yacc.c:1646 */ +#line 2996 "gram.c" /* yacc.c:1646 */ break; case 24: @@ -2998,7 +3000,7 @@ { program_defaults.register_type = (yyvsp[0].regtype).type; } -#line 3002 "gram.c" /* yacc.c:1646 */ +#line 3004 "gram.c" /* yacc.c:1646 */ break; case 30: @@ -3006,7 +3008,7 @@ { (yyval.program) = (yyvsp[-1].program); } -#line 3010 "gram.c" /* yacc.c:1646 */ +#line 3012 "gram.c" /* yacc.c:1646 */ break; case 31: @@ -3015,7 +3017,7 @@ brw_program_add_instruction(&(yyvsp[-2].program), &(yyvsp[-1].instruction)); (yyval.program) = (yyvsp[-2].program); } -#line 3019 "gram.c" /* yacc.c:1646 */ +#line 3021 "gram.c" /* yacc.c:1646 */ break; case 32: @@ -3024,7 +3026,7 @@ brw_program_init(&(yyval.program)); brw_program_add_instruction(&(yyval.program), &(yyvsp[-1].instruction)); } -#line 3028 "gram.c" /* yacc.c:1646 */ +#line 3030 "gram.c" /* yacc.c:1646 */ break; case 33: @@ -3033,7 +3035,7 @@ brw_program_add_relocatable(&(yyvsp[-2].program), &(yyvsp[-1].instruction)); (yyval.program) = (yyvsp[-2].program); } -#line 3037 "gram.c" /* yacc.c:1646 */ +#line 3039 "gram.c" /* yacc.c:1646 */ break; case 34: @@ -3042,7 +3044,7 @@ brw_program_init(&(yyval.program)); brw_program_add_relocatable(&(yyval.program), &(yyvsp[-1].instruction)); } -#line 3046 "gram.c" /* yacc.c:1646 */ +#line 3048 "gram.c" /* yacc.c:1646 */ break; case 35: @@ -3050,7 +3052,7 @@ { (yyval.program) = (yyvsp[-1].program); } -#line 3054 "gram.c" /* yacc.c:1646 */ +#line 3056 "gram.c" /* yacc.c:1646 */ break; case 36: @@ -3059,7 +3061,7 @@ brw_program_add_label(&(yyvsp[-1].program), (yyvsp[0].string)); (yyval.program) = (yyvsp[-1].program); } -#line 3063 "gram.c" /* yacc.c:1646 */ +#line 3065 "gram.c" /* yacc.c:1646 */ break; case 37: @@ -3068,7 +3070,7 @@ brw_program_init(&(yyval.program)); brw_program_add_label(&(yyval.program), (yyvsp[0].string)); } -#line 3072 "gram.c" /* yacc.c:1646 */ +#line 3074 "gram.c" /* yacc.c:1646 */ break; case 38: @@ -3077,7 +3079,7 @@ (yyval.program).first = NULL; (yyval.program).last = NULL; } -#line 3081 "gram.c" /* yacc.c:1646 */ +#line 3083 "gram.c" /* yacc.c:1646 */ break; case 39: @@ -3085,7 +3087,7 @@ { (yyval.program) = (yyvsp[-2].program); } -#line 3089 "gram.c" /* yacc.c:1646 */ +#line 3091 "gram.c" /* yacc.c:1646 */ break; case 55: @@ -3101,7 +3103,7 @@ GEN(&(yyval.instruction))->bits1.da1.src1_reg_file = BRW_ARCHITECTURE_REGISTER_FILE; GEN(&(yyval.instruction))->bits1.da1.src1_reg_type = BRW_REGISTER_TYPE_UD; } -#line 3105 "gram.c" /* yacc.c:1646 */ +#line 3107 "gram.c" /* yacc.c:1646 */ break; case 56: @@ -3117,7 +3119,7 @@ (yyval.instruction).reloc.first_reloc_target = (yyvsp[-1].src_operand).reloc_target; (yyval.instruction).reloc.first_reloc_offset = (yyvsp[-1].src_operand).imm32; } -#line 3121 "gram.c" /* yacc.c:1646 */ +#line 3123 "gram.c" /* yacc.c:1646 */ break; case 57: @@ -3147,7 +3149,7 @@ error(&(yylsp[-3]), "'ELSE' instruction is not implemented.\n"); } } -#line 3151 "gram.c" /* yacc.c:1646 */ +#line 3153 "gram.c" /* yacc.c:1646 */ break; case 58: @@ -3174,7 +3176,7 @@ (yyval.instruction).reloc.first_reloc_target = (yyvsp[0].src_operand).reloc_target; (yyval.instruction).reloc.first_reloc_offset = (yyvsp[0].src_operand).imm32; } -#line 3178 "gram.c" /* yacc.c:1646 */ +#line 3180 "gram.c" /* yacc.c:1646 */ break; case 59: @@ -3193,7 +3195,7 @@ (yyval.instruction).reloc.second_reloc_target = (yyvsp[0].src_operand).reloc_target; (yyval.instruction).reloc.second_reloc_offset = (yyvsp[0].src_operand).imm32; } -#line 3197 "gram.c" /* yacc.c:1646 */ +#line 3199 "gram.c" /* yacc.c:1646 */ break; case 60: @@ -3229,7 +3231,7 @@ error(&(yylsp[-3]), "'WHILE' instruction is not implemented!\n"); } } -#line 3233 "gram.c" /* yacc.c:1646 */ +#line 3235 "gram.c" /* yacc.c:1646 */ break; case 61: @@ -3239,7 +3241,7 @@ memset(&(yyval.instruction), 0, sizeof((yyval.instruction))); set_instruction_opcode(&(yyval.instruction), (yyvsp[0].integer)); } -#line 3243 "gram.c" /* yacc.c:1646 */ +#line 3245 "gram.c" /* yacc.c:1646 */ break; case 62: @@ -3258,7 +3260,7 @@ set_instruction_dest(&(yyval.instruction), &dst_null_reg); set_instruction_src0(&(yyval.instruction), &src_null_reg, NULL); } -#line 3262 "gram.c" /* yacc.c:1646 */ +#line 3264 "gram.c" /* yacc.c:1646 */ break; case 63: @@ -3277,7 +3279,7 @@ dst_null_reg.width = (yyvsp[-2].integer); set_instruction_dest(&(yyval.instruction), &dst_null_reg); } -#line 3281 "gram.c" /* yacc.c:1646 */ +#line 3283 "gram.c" /* yacc.c:1646 */ break; case 64: @@ -3299,7 +3301,7 @@ set_instruction_dest(&(yyval.instruction), &dst_null_reg); set_instruction_src0(&(yyval.instruction), &src_null_reg, NULL); } -#line 3303 "gram.c" /* yacc.c:1646 */ +#line 3305 "gram.c" /* yacc.c:1646 */ break; case 65: @@ -3339,7 +3341,7 @@ (yyval.instruction).reloc.first_reloc_target = (yyvsp[-1].src_operand).reloc_target; (yyval.instruction).reloc.first_reloc_offset = (yyvsp[-1].src_operand).imm32; } -#line 3343 "gram.c" /* yacc.c:1646 */ +#line 3345 "gram.c" /* yacc.c:1646 */ break; case 66: @@ -3362,7 +3364,7 @@ (yyvsp[-1].src_operand).reg.vstride = 2; /*encoded 2*/ set_instruction_src0(&(yyval.instruction), &(yyvsp[-1].src_operand), NULL); } -#line 3366 "gram.c" /* yacc.c:1646 */ +#line 3368 "gram.c" /* yacc.c:1646 */ break; case 67: @@ -3383,7 +3385,7 @@ get_type_size(GEN(&(yyval.instruction))->bits1.da1.dest_reg_type) * (1 << (yyvsp[-2].reg).width) == 64) GEN(&(yyval.instruction))->header.compression_control = BRW_COMPRESSION_COMPRESSED; } -#line 3387 "gram.c" /* yacc.c:1646 */ +#line 3389 "gram.c" /* yacc.c:1646 */ break; case 82: @@ -3406,7 +3408,7 @@ get_type_size(GEN(&(yyval.instruction))->bits1.da1.dest_reg_type) * (1 << (yyvsp[-3].reg).width) == 64) GEN(&(yyval.instruction))->header.compression_control = BRW_COMPRESSION_COMPRESSED; } -#line 3410 "gram.c" /* yacc.c:1646 */ +#line 3412 "gram.c" /* yacc.c:1646 */ break; case 95: @@ -3429,7 +3431,7 @@ get_type_size(GEN(&(yyval.instruction))->bits1.da1.dest_reg_type) * (1 << (yyvsp[-3].reg).width) == 64) GEN(&(yyval.instruction))->header.compression_control = BRW_COMPRESSION_COMPRESSED; } -#line 3433 "gram.c" /* yacc.c:1646 */ +#line 3435 "gram.c" /* yacc.c:1646 */ break; case 113: @@ -3453,7 +3455,7 @@ YYERROR; set_instruction_options(&(yyval.instruction), (yyvsp[0].options)); } -#line 3457 "gram.c" /* yacc.c:1646 */ +#line 3459 "gram.c" /* yacc.c:1646 */ break; case 116: @@ -3535,7 +3537,7 @@ GEN(&(yyval.instruction))->bits3.generic.end_of_thread = (yyvsp[0].options).end_of_thread; } } -#line 3539 "gram.c" /* yacc.c:1646 */ +#line 3541 "gram.c" /* yacc.c:1646 */ break; case 117: @@ -3560,7 +3562,7 @@ YYERROR; } -#line 3564 "gram.c" /* yacc.c:1646 */ +#line 3566 "gram.c" /* yacc.c:1646 */ break; case 118: @@ -3588,7 +3590,7 @@ if (set_instruction_src1(&(yyval.instruction), &(yyvsp[-1].src_operand), &(yylsp[-1])) != 0) YYERROR; } -#line 3592 "gram.c" /* yacc.c:1646 */ +#line 3594 "gram.c" /* yacc.c:1646 */ break; case 119: @@ -3642,7 +3644,7 @@ GEN(&(yyval.instruction))->bits3.generic_gen5.end_of_thread = !!((yyvsp[-2].integer) & EX_DESC_EOT_MASK); } } -#line 3646 "gram.c" /* yacc.c:1646 */ +#line 3648 "gram.c" /* yacc.c:1646 */ break; case 120: @@ -3697,7 +3699,7 @@ GEN(&(yyval.instruction))->bits3.generic_gen5.end_of_thread = !!((yyvsp[-2].integer) & EX_DESC_EOT_MASK); } } -#line 3701 "gram.c" /* yacc.c:1646 */ +#line 3703 "gram.c" /* yacc.c:1646 */ break; case 121: @@ -3730,7 +3732,7 @@ GEN(&(yyval.instruction))->bits3.generic_gen5.end_of_thread = !!((yyvsp[-2].integer) & EX_DESC_EOT_MASK); } } -#line 3734 "gram.c" /* yacc.c:1646 */ +#line 3736 "gram.c" /* yacc.c:1646 */ break; case 122: @@ -3757,7 +3759,7 @@ GEN(&(yyval.instruction))->bits2.send_gen5.sfid = (yyvsp[-2].integer); } } -#line 3761 "gram.c" /* yacc.c:1646 */ +#line 3763 "gram.c" /* yacc.c:1646 */ break; case 123: @@ -3765,7 +3767,7 @@ { (yyval.integer) = (yyvsp[0].integer); } -#line 3769 "gram.c" /* yacc.c:1646 */ +#line 3771 "gram.c" /* yacc.c:1646 */ break; case 124: @@ -3792,7 +3794,7 @@ (yyval.instruction).reloc.first_reloc_target = (yyvsp[0].src_operand).reloc_target; (yyval.instruction).reloc.first_reloc_offset = (yyvsp[0].src_operand).imm32; } -#line 3796 "gram.c" /* yacc.c:1646 */ +#line 3798 "gram.c" /* yacc.c:1646 */ break; case 125: @@ -3816,7 +3818,7 @@ if (set_instruction_src1(&(yyval.instruction), &(yyvsp[-2].src_operand), &(yylsp[-2])) != 0) YYERROR; } -#line 3820 "gram.c" /* yacc.c:1646 */ +#line 3822 "gram.c" /* yacc.c:1646 */ break; case 126: @@ -3832,7 +3834,7 @@ (yyval.instruction).reloc.second_reloc_target = (yyvsp[-1].src_operand).reloc_target; (yyval.instruction).reloc.second_reloc_offset = (yyvsp[-1].src_operand).imm32; } -#line 3836 "gram.c" /* yacc.c:1646 */ +#line 3838 "gram.c" /* yacc.c:1646 */ break; case 129: @@ -3850,7 +3852,7 @@ set_instruction_src0(&(yyval.instruction), ¬ify_src, NULL); set_instruction_src1(&(yyval.instruction), &src_null_reg, NULL); } -#line 3854 "gram.c" /* yacc.c:1646 */ +#line 3856 "gram.c" /* yacc.c:1646 */ break; case 130: @@ -3859,7 +3861,7 @@ memset(&(yyval.instruction), 0, sizeof((yyval.instruction))); set_instruction_opcode(&(yyval.instruction), (yyvsp[0].integer)); } -#line 3863 "gram.c" /* yacc.c:1646 */ +#line 3865 "gram.c" /* yacc.c:1646 */ break; case 133: @@ -3875,7 +3877,7 @@ GEN(&(yyval.instruction))->bits3.generic.msg_target = BRW_SFID_NULL; } } -#line 3879 "gram.c" /* yacc.c:1646 */ +#line 3881 "gram.c" /* yacc.c:1646 */ break; case 134: @@ -3919,7 +3921,7 @@ } } } -#line 3923 "gram.c" /* yacc.c:1646 */ +#line 3925 "gram.c" /* yacc.c:1646 */ break; case 135: @@ -3944,7 +3946,7 @@ GEN(&(yyval.instruction))->bits3.math.data_type = (yyvsp[0].integer); } } -#line 3948 "gram.c" /* yacc.c:1646 */ +#line 3950 "gram.c" /* yacc.c:1646 */ break; case 136: @@ -3957,7 +3959,7 @@ GEN(&(yyval.instruction))->bits3.generic.msg_target = BRW_SFID_MESSAGE_GATEWAY; } } -#line 3961 "gram.c" /* yacc.c:1646 */ +#line 3963 "gram.c" /* yacc.c:1646 */ break; case 137: @@ -4021,7 +4023,7 @@ GEN(&(yyval.instruction))->bits3.dp_read.msg_type = (yyvsp[-1].integer); } } -#line 4025 "gram.c" /* yacc.c:1646 */ +#line 4027 "gram.c" /* yacc.c:1646 */ break; case 138: @@ -4095,7 +4097,7 @@ GEN(&(yyval.instruction))->bits3.dp_write.send_commit_msg = (yyvsp[-1].integer); } } -#line 4099 "gram.c" /* yacc.c:1646 */ +#line 4101 "gram.c" /* yacc.c:1646 */ break; case 139: @@ -4165,7 +4167,7 @@ GEN(&(yyval.instruction))->bits3.dp_write.send_commit_msg = (yyvsp[-3].integer); } } -#line 4169 "gram.c" /* yacc.c:1646 */ +#line 4171 "gram.c" /* yacc.c:1646 */ break; case 140: @@ -4193,7 +4195,7 @@ GEN(&(yyval.instruction))->bits3.urb.complete = (yyvsp[0].integer); } } -#line 4197 "gram.c" /* yacc.c:1646 */ +#line 4199 "gram.c" /* yacc.c:1646 */ break; case 141: @@ -4224,7 +4226,7 @@ } } } -#line 4228 "gram.c" /* yacc.c:1646 */ +#line 4230 "gram.c" /* yacc.c:1646 */ break; case 142: @@ -4248,7 +4250,7 @@ error (&(yylsp[-9]), "Gen6- doesn't have vme function\n"); } } -#line 4252 "gram.c" /* yacc.c:1646 */ +#line 4254 "gram.c" /* yacc.c:1646 */ break; case 143: @@ -4271,7 +4273,7 @@ GEN(&(yyval.instruction))->bits3.generic_gen5.header_present = 1; } } -#line 4275 "gram.c" /* yacc.c:1646 */ +#line 4277 "gram.c" /* yacc.c:1646 */ break; case 144: @@ -4324,85 +4326,85 @@ } } } -#line 4328 "gram.c" /* yacc.c:1646 */ +#line 4330 "gram.c" /* yacc.c:1646 */ break; case 145: #line 1964 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 4334 "gram.c" /* yacc.c:1646 */ +#line 4336 "gram.c" /* yacc.c:1646 */ break; case 146: #line 1965 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 4340 "gram.c" /* yacc.c:1646 */ +#line 4342 "gram.c" /* yacc.c:1646 */ break; case 147: #line 1968 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 4346 "gram.c" /* yacc.c:1646 */ +#line 4348 "gram.c" /* yacc.c:1646 */ break; case 148: #line 1969 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 4352 "gram.c" /* yacc.c:1646 */ +#line 4354 "gram.c" /* yacc.c:1646 */ break; case 149: #line 1972 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 4358 "gram.c" /* yacc.c:1646 */ +#line 4360 "gram.c" /* yacc.c:1646 */ break; case 150: #line 1973 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 4364 "gram.c" /* yacc.c:1646 */ +#line 4366 "gram.c" /* yacc.c:1646 */ break; case 151: #line 1976 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_URB_SWIZZLE_TRANSPOSE; } -#line 4370 "gram.c" /* yacc.c:1646 */ +#line 4372 "gram.c" /* yacc.c:1646 */ break; case 152: #line 1977 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_URB_SWIZZLE_INTERLEAVE; } -#line 4376 "gram.c" /* yacc.c:1646 */ +#line 4378 "gram.c" /* yacc.c:1646 */ break; case 153: #line 1978 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_URB_SWIZZLE_NONE; } -#line 4382 "gram.c" /* yacc.c:1646 */ +#line 4384 "gram.c" /* yacc.c:1646 */ break; case 168: #line 1991 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 4388 "gram.c" /* yacc.c:1646 */ +#line 4390 "gram.c" /* yacc.c:1646 */ break; case 169: #line 1992 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 4394 "gram.c" /* yacc.c:1646 */ +#line 4396 "gram.c" /* yacc.c:1646 */ break; case 170: #line 1995 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 4400 "gram.c" /* yacc.c:1646 */ +#line 4402 "gram.c" /* yacc.c:1646 */ break; case 171: #line 1996 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 4406 "gram.c" /* yacc.c:1646 */ +#line 4408 "gram.c" /* yacc.c:1646 */ break; case 174: @@ -4411,7 +4413,7 @@ (yyval.reg) = (yyvsp[-1].symbol_reg).reg; (yyval.reg).hstride = resolve_dst_region(&(yyvsp[-1].symbol_reg), (yyvsp[0].integer)); } -#line 4415 "gram.c" /* yacc.c:1646 */ +#line 4417 "gram.c" /* yacc.c:1646 */ break; case 175: @@ -4425,7 +4427,7 @@ (yyval.reg).dw1.bits.writemask = (yyvsp[-1].reg).dw1.bits.writemask; (yyval.reg).type = (yyvsp[0].regtype).type; } -#line 4429 "gram.c" /* yacc.c:1646 */ +#line 4431 "gram.c" /* yacc.c:1646 */ break; case 176: @@ -4435,7 +4437,7 @@ (yyval.reg).hstride = resolve_dst_region(NULL, (yyvsp[-1].integer)); (yyval.reg).type = (yyvsp[0].regtype).type; } -#line 4439 "gram.c" /* yacc.c:1646 */ +#line 4441 "gram.c" /* yacc.c:1646 */ break; case 177: @@ -4445,7 +4447,7 @@ (yyval.reg).hstride = 1; (yyval.reg).type = BRW_REGISTER_TYPE_UW; } -#line 4449 "gram.c" /* yacc.c:1646 */ +#line 4451 "gram.c" /* yacc.c:1646 */ break; case 178: @@ -4455,7 +4457,7 @@ (yyval.reg).hstride = 1; (yyval.reg).type = BRW_REGISTER_TYPE_UD; } -#line 4459 "gram.c" /* yacc.c:1646 */ +#line 4461 "gram.c" /* yacc.c:1646 */ break; case 179: @@ -4465,7 +4467,7 @@ (yyval.reg).hstride = 1; (yyval.reg).type = BRW_REGISTER_TYPE_UD; } -#line 4469 "gram.c" /* yacc.c:1646 */ +#line 4471 "gram.c" /* yacc.c:1646 */ break; case 180: @@ -4475,7 +4477,7 @@ (yyval.reg).hstride = resolve_dst_region(NULL, (yyvsp[-1].integer)); (yyval.reg).type = (yyvsp[0].regtype).type; } -#line 4479 "gram.c" /* yacc.c:1646 */ +#line 4481 "gram.c" /* yacc.c:1646 */ break; case 185: @@ -4489,7 +4491,7 @@ memcpy(&(yyval.symbol_reg), dcl_reg, sizeof(*dcl_reg)); free((yyvsp[0].string)); // $1 has been malloc'ed by strdup } -#line 4493 "gram.c" /* yacc.c:1646 */ +#line 4495 "gram.c" /* yacc.c:1646 */ break; case 186: @@ -4497,7 +4499,7 @@ { (yyval.symbol_reg)=(yyvsp[0].symbol_reg); } -#line 4501 "gram.c" /* yacc.c:1646 */ +#line 4503 "gram.c" /* yacc.c:1646 */ break; case 187: @@ -4512,7 +4514,7 @@ (yyval.symbol_reg).reg.nr += (yyvsp[-1].integer); free((yyvsp[-3].string)); } -#line 4516 "gram.c" /* yacc.c:1646 */ +#line 4518 "gram.c" /* yacc.c:1646 */ break; case 188: @@ -4535,7 +4537,7 @@ } free((yyvsp[-5].string)); } -#line 4539 "gram.c" /* yacc.c:1646 */ +#line 4541 "gram.c" /* yacc.c:1646 */ break; case 189: @@ -4544,7 +4546,7 @@ (yyval.reg) = (yyvsp[0].reg); (yyval.reg).address_mode = BRW_ADDRESS_DIRECT; } -#line 4548 "gram.c" /* yacc.c:1646 */ +#line 4550 "gram.c" /* yacc.c:1646 */ break; case 190: @@ -4553,7 +4555,7 @@ (yyval.reg) = (yyvsp[0].reg); (yyval.reg).address_mode = BRW_ADDRESS_DIRECT; } -#line 4557 "gram.c" /* yacc.c:1646 */ +#line 4559 "gram.c" /* yacc.c:1646 */ break; case 191: @@ -4562,7 +4564,7 @@ (yyval.reg) = (yyvsp[0].reg); (yyval.reg).address_mode = BRW_ADDRESS_REGISTER_INDIRECT_REGISTER; } -#line 4566 "gram.c" /* yacc.c:1646 */ +#line 4568 "gram.c" /* yacc.c:1646 */ break; case 192: @@ -4571,7 +4573,7 @@ (yyval.reg) = (yyvsp[0].reg); (yyval.reg).address_mode = BRW_ADDRESS_REGISTER_INDIRECT_REGISTER; } -#line 4575 "gram.c" /* yacc.c:1646 */ +#line 4577 "gram.c" /* yacc.c:1646 */ break; case 200: @@ -4634,7 +4636,7 @@ (yyval.src_operand).reg.type = (yyvsp[0].integer); (yyval.src_operand).reg.dw1.ud = d; } -#line 4638 "gram.c" /* yacc.c:1646 */ +#line 4640 "gram.c" /* yacc.c:1646 */ break; case 202: @@ -4646,7 +4648,7 @@ (yyval.src_operand).reg.hstride = (yyvsp[-1].region).horiz_stride; (yyval.src_operand).default_region = (yyvsp[-1].region).is_default; } -#line 4650 "gram.c" /* yacc.c:1646 */ +#line 4652 "gram.c" /* yacc.c:1646 */ break; case 203: @@ -4664,7 +4666,7 @@ (yyval.src_operand).reg.negate = 0; (yyval.src_operand).reg.abs = 0; } -#line 4668 "gram.c" /* yacc.c:1646 */ +#line 4670 "gram.c" /* yacc.c:1646 */ break; case 204: @@ -4672,7 +4674,7 @@ { set_direct_src_operand(&(yyval.src_operand), &(yyvsp[0].reg), BRW_REGISTER_TYPE_UB); } -#line 4676 "gram.c" /* yacc.c:1646 */ +#line 4678 "gram.c" /* yacc.c:1646 */ break; case 205: @@ -4680,7 +4682,7 @@ { set_direct_src_operand(&(yyval.src_operand), &(yyvsp[0].reg), BRW_REGISTER_TYPE_UD); } -#line 4684 "gram.c" /* yacc.c:1646 */ +#line 4686 "gram.c" /* yacc.c:1646 */ break; case 206: @@ -4688,7 +4690,7 @@ { set_direct_src_operand(&(yyval.src_operand), &(yyvsp[0].reg), BRW_REGISTER_TYPE_UD); } -#line 4692 "gram.c" /* yacc.c:1646 */ +#line 4694 "gram.c" /* yacc.c:1646 */ break; case 207: @@ -4696,7 +4698,7 @@ { set_direct_src_operand(&(yyval.src_operand), &(yyvsp[0].reg), BRW_REGISTER_TYPE_UD); } -#line 4700 "gram.c" /* yacc.c:1646 */ +#line 4702 "gram.c" /* yacc.c:1646 */ break; case 208: @@ -4709,7 +4711,7 @@ } (yyval.src_operand).default_region = 1; } -#line 4713 "gram.c" /* yacc.c:1646 */ +#line 4715 "gram.c" /* yacc.c:1646 */ break; case 212: @@ -4720,7 +4722,7 @@ (yyval.reg).nr = (yyvsp[0].symbol_reg).reg.nr; (yyval.reg).subnr = (yyvsp[0].symbol_reg).reg.subnr; } -#line 4724 "gram.c" /* yacc.c:1646 */ +#line 4726 "gram.c" /* yacc.c:1646 */ break; case 217: @@ -4748,7 +4750,7 @@ (yyval.src_operand).reg.negate = (yyvsp[-4].integer); (yyval.src_operand).reg.abs = (yyvsp[-3].integer); } -#line 4752 "gram.c" /* yacc.c:1646 */ +#line 4754 "gram.c" /* yacc.c:1646 */ break; case 218: @@ -4770,7 +4772,7 @@ (yyval.src_operand).reg.type = (yyvsp[0].regtype).type; } } -#line 4774 "gram.c" /* yacc.c:1646 */ +#line 4776 "gram.c" /* yacc.c:1646 */ break; case 219: @@ -4790,7 +4792,7 @@ (yyval.src_operand).reg.abs = (yyvsp[-4].integer); (yyval.src_operand).reg.dw1.bits.swizzle = (yyvsp[-1].src_operand).reg.dw1.bits.swizzle; } -#line 4794 "gram.c" /* yacc.c:1646 */ +#line 4796 "gram.c" /* yacc.c:1646 */ break; case 221: @@ -4809,7 +4811,7 @@ (yyval.src_operand).reg.abs = (yyvsp[-4].integer); (yyval.src_operand).reg.dw1.bits.swizzle = (yyvsp[0].src_operand).reg.dw1.bits.swizzle; } -#line 4813 "gram.c" /* yacc.c:1646 */ +#line 4815 "gram.c" /* yacc.c:1646 */ break; case 222: @@ -4821,7 +4823,7 @@ (yyval.reg).subnr = (yyvsp[-2].reg).subnr; (yyval.reg).dw1.bits.indirect_offset = (yyvsp[0].integer); } -#line 4825 "gram.c" /* yacc.c:1646 */ +#line 4827 "gram.c" /* yacc.c:1646 */ break; case 223: @@ -4831,13 +4833,13 @@ (yyval.reg).subnr = (yyvsp[0].reg).subnr; (yyval.reg).dw1.bits.indirect_offset = 0; } -#line 4835 "gram.c" /* yacc.c:1646 */ +#line 4837 "gram.c" /* yacc.c:1646 */ break; case 224: #line 2377 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 4841 "gram.c" /* yacc.c:1646 */ +#line 4843 "gram.c" /* yacc.c:1646 */ break; case 226: @@ -4845,7 +4847,7 @@ { (yyval.integer) = (yyvsp[0].integer); } -#line 4849 "gram.c" /* yacc.c:1646 */ +#line 4851 "gram.c" /* yacc.c:1646 */ break; case 227: @@ -4854,7 +4856,7 @@ /* Default to subreg 0 if unspecified. */ (yyval.integer) = 0; } -#line 4858 "gram.c" /* yacc.c:1646 */ +#line 4860 "gram.c" /* yacc.c:1646 */ break; case 228: @@ -4865,7 +4867,7 @@ (yyval.reg).nr = (yyvsp[-1].integer); (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4869 "gram.c" /* yacc.c:1646 */ +#line 4871 "gram.c" /* yacc.c:1646 */ break; case 229: @@ -4876,7 +4878,7 @@ (yyval.reg).subnr = (yyvsp[-1].reg).subnr; (yyval.reg).dw1.bits.indirect_offset = (yyvsp[-1].reg).dw1.bits.indirect_offset; } -#line 4880 "gram.c" /* yacc.c:1646 */ +#line 4882 "gram.c" /* yacc.c:1646 */ break; case 230: @@ -4887,7 +4889,7 @@ (yyval.reg).nr = (yyvsp[-1].integer); (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4891 "gram.c" /* yacc.c:1646 */ +#line 4893 "gram.c" /* yacc.c:1646 */ break; case 231: @@ -4898,7 +4900,7 @@ (yyval.reg).subnr = (yyvsp[-1].reg).subnr; (yyval.reg).dw1.bits.indirect_offset = (yyvsp[-1].reg).dw1.bits.indirect_offset; } -#line 4902 "gram.c" /* yacc.c:1646 */ +#line 4904 "gram.c" /* yacc.c:1646 */ break; case 232: @@ -4912,7 +4914,7 @@ (yyval.reg).nr = BRW_ARF_ADDRESS | (yyvsp[-1].integer); (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4916 "gram.c" /* yacc.c:1646 */ +#line 4918 "gram.c" /* yacc.c:1646 */ break; case 233: @@ -4925,7 +4927,7 @@ (yyval.reg).nr = BRW_ARF_ACCUMULATOR | (yyvsp[-1].integer); (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4929 "gram.c" /* yacc.c:1646 */ +#line 4931 "gram.c" /* yacc.c:1646 */ break; case 234: @@ -4944,7 +4946,7 @@ (yyval.reg).nr = BRW_ARF_FLAG | (yyvsp[-1].integer); (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4948 "gram.c" /* yacc.c:1646 */ +#line 4950 "gram.c" /* yacc.c:1646 */ break; case 235: @@ -4958,7 +4960,7 @@ (yyval.reg).nr = BRW_ARF_MASK; (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4962 "gram.c" /* yacc.c:1646 */ +#line 4964 "gram.c" /* yacc.c:1646 */ break; case 236: @@ -4969,7 +4971,7 @@ (yyval.reg).nr = BRW_ARF_MASK; (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4973 "gram.c" /* yacc.c:1646 */ +#line 4975 "gram.c" /* yacc.c:1646 */ break; case 241: @@ -4982,7 +4984,7 @@ (yyval.reg).nr = BRW_ARF_MASK_STACK; (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4986 "gram.c" /* yacc.c:1646 */ +#line 4988 "gram.c" /* yacc.c:1646 */ break; case 242: @@ -4993,7 +4995,7 @@ (yyval.reg).nr = BRW_ARF_MASK_STACK; (yyval.reg).subnr = (yyvsp[0].integer); } -#line 4997 "gram.c" /* yacc.c:1646 */ +#line 4999 "gram.c" /* yacc.c:1646 */ break; case 245: @@ -5016,7 +5018,7 @@ (yyval.reg).subnr = 0; } } -#line 5020 "gram.c" /* yacc.c:1646 */ +#line 5022 "gram.c" /* yacc.c:1646 */ break; case 246: @@ -5033,7 +5035,7 @@ (yyval.reg).nr = BRW_ARF_STATE | (yyvsp[-1].integer); (yyval.reg).subnr = (yyvsp[0].integer); } -#line 5037 "gram.c" /* yacc.c:1646 */ +#line 5039 "gram.c" /* yacc.c:1646 */ break; case 247: @@ -5049,7 +5051,7 @@ (yyval.reg).nr = BRW_ARF_CONTROL | (yyvsp[-1].integer); (yyval.reg).subnr = (yyvsp[0].integer); } -#line 5053 "gram.c" /* yacc.c:1646 */ +#line 5055 "gram.c" /* yacc.c:1646 */ break; case 248: @@ -5060,7 +5062,7 @@ (yyval.reg).nr = BRW_ARF_IP; (yyval.reg).subnr = 0; } -#line 5064 "gram.c" /* yacc.c:1646 */ +#line 5066 "gram.c" /* yacc.c:1646 */ break; case 249: @@ -5071,7 +5073,7 @@ (yyval.reg).nr = BRW_ARF_NULL; (yyval.reg).subnr = 0; } -#line 5075 "gram.c" /* yacc.c:1646 */ +#line 5077 "gram.c" /* yacc.c:1646 */ break; case 250: @@ -5085,7 +5087,7 @@ (yyval.src_operand).reg.type = BRW_REGISTER_TYPE_D; (yyval.src_operand).imm32 = (yyvsp[0].integer) & 0x0000ffff; } -#line 5089 "gram.c" /* yacc.c:1646 */ +#line 5091 "gram.c" /* yacc.c:1646 */ break; case 251: @@ -5096,7 +5098,7 @@ (yyval.src_operand).reg.type = BRW_REGISTER_TYPE_D; (yyval.src_operand).reloc_target = (yyvsp[0].string); } -#line 5100 "gram.c" /* yacc.c:1646 */ +#line 5102 "gram.c" /* yacc.c:1646 */ break; case 252: @@ -5107,7 +5109,7 @@ (yyval.src_operand).reg.type = BRW_REGISTER_TYPE_D; (yyval.src_operand).reloc_target = (yyvsp[0].string); } -#line 5111 "gram.c" /* yacc.c:1646 */ +#line 5113 "gram.c" /* yacc.c:1646 */ break; case 253: @@ -5118,7 +5120,7 @@ (yyval.src_operand).reg.type = BRW_REGISTER_TYPE_D; (yyval.src_operand).imm32 = (yyvsp[0].integer); } -#line 5122 "gram.c" /* yacc.c:1646 */ +#line 5124 "gram.c" /* yacc.c:1646 */ break; case 254: @@ -5130,7 +5132,7 @@ (yyval.src_operand).reg.hstride = (yyvsp[-1].region).horiz_stride; (yyval.src_operand).default_region = (yyvsp[-1].region).is_default; } -#line 5134 "gram.c" /* yacc.c:1646 */ +#line 5136 "gram.c" /* yacc.c:1646 */ break; case 255: @@ -5146,7 +5148,7 @@ (yyval.src_operand).reg.width = (yyvsp[0].symbol_reg).src_region.width; (yyval.src_operand).reg.hstride = (yyvsp[0].symbol_reg).src_region.horiz_stride; } -#line 5150 "gram.c" /* yacc.c:1646 */ +#line 5152 "gram.c" /* yacc.c:1646 */ break; case 256: @@ -5162,7 +5164,7 @@ (yyval.src_operand).reg.width = (yyvsp[-1].region).width; (yyval.src_operand).reg.hstride = (yyvsp[-1].region).horiz_stride; } -#line 5166 "gram.c" /* yacc.c:1646 */ +#line 5168 "gram.c" /* yacc.c:1646 */ break; case 257: @@ -5170,7 +5172,7 @@ { (yyval.integer) = DEFAULT_DSTREGION; } -#line 5174 "gram.c" /* yacc.c:1646 */ +#line 5176 "gram.c" /* yacc.c:1646 */ break; case 258: @@ -5184,7 +5186,7 @@ (yyval.integer) = ffs((yyvsp[-1].integer)); } -#line 5188 "gram.c" /* yacc.c:1646 */ +#line 5190 "gram.c" /* yacc.c:1646 */ break; case 259: @@ -5197,7 +5199,7 @@ (yyval.region).horiz_stride = ffs(0); (yyval.region).is_default = 1; } -#line 5201 "gram.c" /* yacc.c:1646 */ +#line 5203 "gram.c" /* yacc.c:1646 */ break; case 260: @@ -5209,7 +5211,7 @@ (yyval.region).width = BRW_WIDTH_1; (yyval.region).horiz_stride = ffs(0); } -#line 5213 "gram.c" /* yacc.c:1646 */ +#line 5215 "gram.c" /* yacc.c:1646 */ break; case 261: @@ -5220,7 +5222,7 @@ (yyval.region).width = ffs((yyvsp[-3].integer)) - 1; (yyval.region).horiz_stride = ffs((yyvsp[-1].integer)); } -#line 5224 "gram.c" /* yacc.c:1646 */ +#line 5226 "gram.c" /* yacc.c:1646 */ break; case 262: @@ -5231,7 +5233,7 @@ (yyval.region).width = ffs((yyvsp[-3].integer)) - 1; (yyval.region).horiz_stride = ffs((yyvsp[-1].integer)); } -#line 5235 "gram.c" /* yacc.c:1646 */ +#line 5237 "gram.c" /* yacc.c:1646 */ break; case 263: @@ -5242,55 +5244,55 @@ (yyval.region).width = ffs((yyvsp[-3].integer)) - 1; (yyval.region).horiz_stride = ffs((yyvsp[-1].integer)); } -#line 5246 "gram.c" /* yacc.c:1646 */ +#line 5248 "gram.c" /* yacc.c:1646 */ break; case 266: #line 2761 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = program_defaults.register_type;(yyval.regtype).is_default = 1;} -#line 5252 "gram.c" /* yacc.c:1646 */ +#line 5254 "gram.c" /* yacc.c:1646 */ break; case 267: #line 2762 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = BRW_REGISTER_TYPE_F;(yyval.regtype).is_default = 0; } -#line 5258 "gram.c" /* yacc.c:1646 */ +#line 5260 "gram.c" /* yacc.c:1646 */ break; case 268: #line 2763 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = BRW_REGISTER_TYPE_UD;(yyval.regtype).is_default = 0; } -#line 5264 "gram.c" /* yacc.c:1646 */ +#line 5266 "gram.c" /* yacc.c:1646 */ break; case 269: #line 2764 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = BRW_REGISTER_TYPE_D;(yyval.regtype).is_default = 0; } -#line 5270 "gram.c" /* yacc.c:1646 */ +#line 5272 "gram.c" /* yacc.c:1646 */ break; case 270: #line 2765 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = BRW_REGISTER_TYPE_UW;(yyval.regtype).is_default = 0; } -#line 5276 "gram.c" /* yacc.c:1646 */ +#line 5278 "gram.c" /* yacc.c:1646 */ break; case 271: #line 2766 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = BRW_REGISTER_TYPE_W;(yyval.regtype).is_default = 0; } -#line 5282 "gram.c" /* yacc.c:1646 */ +#line 5284 "gram.c" /* yacc.c:1646 */ break; case 272: #line 2767 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = BRW_REGISTER_TYPE_UB;(yyval.regtype).is_default = 0; } -#line 5288 "gram.c" /* yacc.c:1646 */ +#line 5290 "gram.c" /* yacc.c:1646 */ break; case 273: #line 2768 "gram.y" /* yacc.c:1646 */ { (yyval.regtype).type = BRW_REGISTER_TYPE_B;(yyval.regtype).is_default = 0; } -#line 5294 "gram.c" /* yacc.c:1646 */ +#line 5296 "gram.c" /* yacc.c:1646 */ break; case 274: @@ -5299,49 +5301,49 @@ /* XXX change to default when pragma parse is done */ (yyval.integer) = BRW_REGISTER_TYPE_D; } -#line 5303 "gram.c" /* yacc.c:1646 */ +#line 5305 "gram.c" /* yacc.c:1646 */ break; case 275: #line 2776 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_REGISTER_TYPE_F; } -#line 5309 "gram.c" /* yacc.c:1646 */ +#line 5311 "gram.c" /* yacc.c:1646 */ break; case 276: #line 2777 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_REGISTER_TYPE_UD; } -#line 5315 "gram.c" /* yacc.c:1646 */ +#line 5317 "gram.c" /* yacc.c:1646 */ break; case 277: #line 2778 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_REGISTER_TYPE_D; } -#line 5321 "gram.c" /* yacc.c:1646 */ +#line 5323 "gram.c" /* yacc.c:1646 */ break; case 278: #line 2779 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_REGISTER_TYPE_UW; } -#line 5327 "gram.c" /* yacc.c:1646 */ +#line 5329 "gram.c" /* yacc.c:1646 */ break; case 279: #line 2780 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_REGISTER_TYPE_W; } -#line 5333 "gram.c" /* yacc.c:1646 */ +#line 5335 "gram.c" /* yacc.c:1646 */ break; case 280: #line 2781 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_REGISTER_TYPE_V; } -#line 5339 "gram.c" /* yacc.c:1646 */ +#line 5341 "gram.c" /* yacc.c:1646 */ break; case 281: #line 2782 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_REGISTER_TYPE_VF; } -#line 5345 "gram.c" /* yacc.c:1646 */ +#line 5347 "gram.c" /* yacc.c:1646 */ break; case 282: @@ -5349,7 +5351,7 @@ { (yyval.src_operand).reg.dw1.bits.swizzle = BRW_SWIZZLE_NOOP; } -#line 5353 "gram.c" /* yacc.c:1646 */ +#line 5355 "gram.c" /* yacc.c:1646 */ break; case 283: @@ -5357,7 +5359,7 @@ { (yyval.src_operand).reg.dw1.bits.swizzle = BRW_SWIZZLE4((yyvsp[0].integer), (yyvsp[0].integer), (yyvsp[0].integer), (yyvsp[0].integer)); } -#line 5361 "gram.c" /* yacc.c:1646 */ +#line 5363 "gram.c" /* yacc.c:1646 */ break; case 284: @@ -5365,7 +5367,7 @@ { (yyval.src_operand).reg.dw1.bits.swizzle = BRW_SWIZZLE4((yyvsp[-3].integer), (yyvsp[-2].integer), (yyvsp[-1].integer), (yyvsp[0].integer)); } -#line 5369 "gram.c" /* yacc.c:1646 */ +#line 5371 "gram.c" /* yacc.c:1646 */ break; case 289: @@ -5373,7 +5375,7 @@ { (yyval.reg).dw1.bits.writemask = BRW_WRITEMASK_XYZW; } -#line 5377 "gram.c" /* yacc.c:1646 */ +#line 5379 "gram.c" /* yacc.c:1646 */ break; case 290: @@ -5381,67 +5383,67 @@ { (yyval.reg).dw1.bits.writemask = (yyvsp[-3].integer) | (yyvsp[-2].integer) | (yyvsp[-1].integer) | (yyvsp[0].integer); } -#line 5385 "gram.c" /* yacc.c:1646 */ +#line 5387 "gram.c" /* yacc.c:1646 */ break; case 291: #line 2820 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5391 "gram.c" /* yacc.c:1646 */ +#line 5393 "gram.c" /* yacc.c:1646 */ break; case 292: #line 2821 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1 << BRW_CHANNEL_X; } -#line 5397 "gram.c" /* yacc.c:1646 */ +#line 5399 "gram.c" /* yacc.c:1646 */ break; case 293: #line 2824 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5403 "gram.c" /* yacc.c:1646 */ +#line 5405 "gram.c" /* yacc.c:1646 */ break; case 294: #line 2825 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1 << BRW_CHANNEL_Y; } -#line 5409 "gram.c" /* yacc.c:1646 */ +#line 5411 "gram.c" /* yacc.c:1646 */ break; case 295: #line 2828 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5415 "gram.c" /* yacc.c:1646 */ +#line 5417 "gram.c" /* yacc.c:1646 */ break; case 296: #line 2829 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1 << BRW_CHANNEL_Z; } -#line 5421 "gram.c" /* yacc.c:1646 */ +#line 5423 "gram.c" /* yacc.c:1646 */ break; case 297: #line 2832 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5427 "gram.c" /* yacc.c:1646 */ +#line 5429 "gram.c" /* yacc.c:1646 */ break; case 298: #line 2833 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1 << BRW_CHANNEL_W; } -#line 5433 "gram.c" /* yacc.c:1646 */ +#line 5435 "gram.c" /* yacc.c:1646 */ break; case 299: #line 2837 "gram.y" /* yacc.c:1646 */ { (yyval.imm32).r = imm32_d; (yyval.imm32).u.d = (yyvsp[0].integer); } -#line 5439 "gram.c" /* yacc.c:1646 */ +#line 5441 "gram.c" /* yacc.c:1646 */ break; case 300: #line 2838 "gram.y" /* yacc.c:1646 */ { (yyval.imm32).r = imm32_f; (yyval.imm32).u.f = (yyvsp[0].number); } -#line 5445 "gram.c" /* yacc.c:1646 */ +#line 5447 "gram.c" /* yacc.c:1646 */ break; case 301: @@ -5452,7 +5454,7 @@ (yyval.predicate).flag_subreg_nr = 0; (yyval.predicate).pred_inverse = 0; } -#line 5456 "gram.c" /* yacc.c:1646 */ +#line 5458 "gram.c" /* yacc.c:1646 */ break; case 302: @@ -5463,139 +5465,139 @@ (yyval.predicate).flag_subreg_nr = (yyvsp[-2].reg).subnr; (yyval.predicate).pred_inverse = (yyvsp[-3].integer); } -#line 5467 "gram.c" /* yacc.c:1646 */ +#line 5469 "gram.c" /* yacc.c:1646 */ break; case 303: #line 2858 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5473 "gram.c" /* yacc.c:1646 */ +#line 5475 "gram.c" /* yacc.c:1646 */ break; case 304: #line 2859 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5479 "gram.c" /* yacc.c:1646 */ +#line 5481 "gram.c" /* yacc.c:1646 */ break; case 305: #line 2860 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 5485 "gram.c" /* yacc.c:1646 */ +#line 5487 "gram.c" /* yacc.c:1646 */ break; case 306: #line 2863 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_NORMAL; } -#line 5491 "gram.c" /* yacc.c:1646 */ +#line 5493 "gram.c" /* yacc.c:1646 */ break; case 307: #line 2864 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN16_REPLICATE_X; } -#line 5497 "gram.c" /* yacc.c:1646 */ +#line 5499 "gram.c" /* yacc.c:1646 */ break; case 308: #line 2865 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN16_REPLICATE_Y; } -#line 5503 "gram.c" /* yacc.c:1646 */ +#line 5505 "gram.c" /* yacc.c:1646 */ break; case 309: #line 2866 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN16_REPLICATE_Z; } -#line 5509 "gram.c" /* yacc.c:1646 */ +#line 5511 "gram.c" /* yacc.c:1646 */ break; case 310: #line 2867 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN16_REPLICATE_W; } -#line 5515 "gram.c" /* yacc.c:1646 */ +#line 5517 "gram.c" /* yacc.c:1646 */ break; case 311: #line 2868 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ANYV; } -#line 5521 "gram.c" /* yacc.c:1646 */ +#line 5523 "gram.c" /* yacc.c:1646 */ break; case 312: #line 2869 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ALLV; } -#line 5527 "gram.c" /* yacc.c:1646 */ +#line 5529 "gram.c" /* yacc.c:1646 */ break; case 313: #line 2870 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ANY2H; } -#line 5533 "gram.c" /* yacc.c:1646 */ +#line 5535 "gram.c" /* yacc.c:1646 */ break; case 314: #line 2871 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ALL2H; } -#line 5539 "gram.c" /* yacc.c:1646 */ +#line 5541 "gram.c" /* yacc.c:1646 */ break; case 315: #line 2872 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ANY4H; } -#line 5545 "gram.c" /* yacc.c:1646 */ +#line 5547 "gram.c" /* yacc.c:1646 */ break; case 316: #line 2873 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ALL4H; } -#line 5551 "gram.c" /* yacc.c:1646 */ +#line 5553 "gram.c" /* yacc.c:1646 */ break; case 317: #line 2874 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ANY8H; } -#line 5557 "gram.c" /* yacc.c:1646 */ +#line 5559 "gram.c" /* yacc.c:1646 */ break; case 318: #line 2875 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ALL8H; } -#line 5563 "gram.c" /* yacc.c:1646 */ +#line 5565 "gram.c" /* yacc.c:1646 */ break; case 319: #line 2876 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ANY16H; } -#line 5569 "gram.c" /* yacc.c:1646 */ +#line 5571 "gram.c" /* yacc.c:1646 */ break; case 320: #line 2877 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_PREDICATE_ALIGN1_ALL16H; } -#line 5575 "gram.c" /* yacc.c:1646 */ +#line 5577 "gram.c" /* yacc.c:1646 */ break; case 321: #line 2880 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5581 "gram.c" /* yacc.c:1646 */ +#line 5583 "gram.c" /* yacc.c:1646 */ break; case 322: #line 2881 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 5587 "gram.c" /* yacc.c:1646 */ +#line 5589 "gram.c" /* yacc.c:1646 */ break; case 323: #line 2884 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } -#line 5593 "gram.c" /* yacc.c:1646 */ +#line 5595 "gram.c" /* yacc.c:1646 */ break; case 324: #line 2885 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } -#line 5599 "gram.c" /* yacc.c:1646 */ +#line 5601 "gram.c" /* yacc.c:1646 */ break; case 325: @@ -5603,7 +5605,7 @@ { (yyval.integer) = ffs(program_defaults.execute_size) - 1; } -#line 5607 "gram.c" /* yacc.c:1646 */ +#line 5609 "gram.c" /* yacc.c:1646 */ break; case 326: @@ -5618,19 +5620,19 @@ (yyval.integer) = ffs((yyvsp[-1].integer)) - 1; } -#line 5622 "gram.c" /* yacc.c:1646 */ +#line 5624 "gram.c" /* yacc.c:1646 */ break; case 327: #line 2905 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_INSTRUCTION_NORMAL; } -#line 5628 "gram.c" /* yacc.c:1646 */ +#line 5630 "gram.c" /* yacc.c:1646 */ break; case 328: #line 2906 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_INSTRUCTION_SATURATE; } -#line 5634 "gram.c" /* yacc.c:1646 */ +#line 5636 "gram.c" /* yacc.c:1646 */ break; case 329: @@ -5640,7 +5642,7 @@ (yyval.condition).flag_reg_nr = 0; (yyval.condition).flag_subreg_nr = -1; } -#line 5644 "gram.c" /* yacc.c:1646 */ +#line 5646 "gram.c" /* yacc.c:1646 */ break; case 330: @@ -5650,25 +5652,25 @@ (yyval.condition).flag_reg_nr = ((yyvsp[0].reg).nr & 0xF); (yyval.condition).flag_subreg_nr = (yyvsp[0].reg).subnr; } -#line 5654 "gram.c" /* yacc.c:1646 */ +#line 5656 "gram.c" /* yacc.c:1646 */ break; case 331: #line 2921 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BRW_CONDITIONAL_NONE; } -#line 5660 "gram.c" /* yacc.c:1646 */ +#line 5662 "gram.c" /* yacc.c:1646 */ break; case 343: #line 2937 "gram.y" /* yacc.c:1646 */ { memset(&(yyval.options), 0, sizeof((yyval.options))); } -#line 5666 "gram.c" /* yacc.c:1646 */ +#line 5668 "gram.c" /* yacc.c:1646 */ break; case 344: #line 2939 "gram.y" /* yacc.c:1646 */ { (yyval.options) = (yyvsp[-1].options); } -#line 5672 "gram.c" /* yacc.c:1646 */ +#line 5674 "gram.c" /* yacc.c:1646 */ break; case 345: @@ -5677,7 +5679,7 @@ (yyval.options) = (yyvsp[-2].options); add_option(&(yyval.options), (yyvsp[0].integer)); } -#line 5681 "gram.c" /* yacc.c:1646 */ +#line 5683 "gram.c" /* yacc.c:1646 */ break; case 346: @@ -5686,7 +5688,7 @@ (yyval.options) = (yyvsp[-1].options); add_option(&(yyval.options), (yyvsp[0].integer)); } -#line 5690 "gram.c" /* yacc.c:1646 */ +#line 5692 "gram.c" /* yacc.c:1646 */ break; case 347: @@ -5694,83 +5696,83 @@ { memset(&(yyval.options), 0, sizeof((yyval.options))); } -#line 5698 "gram.c" /* yacc.c:1646 */ +#line 5700 "gram.c" /* yacc.c:1646 */ break; case 348: #line 2958 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = ALIGN1; } -#line 5704 "gram.c" /* yacc.c:1646 */ +#line 5706 "gram.c" /* yacc.c:1646 */ break; case 349: #line 2959 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = ALIGN16; } -#line 5710 "gram.c" /* yacc.c:1646 */ +#line 5712 "gram.c" /* yacc.c:1646 */ break; case 350: #line 2960 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = SECHALF; } -#line 5716 "gram.c" /* yacc.c:1646 */ +#line 5718 "gram.c" /* yacc.c:1646 */ break; case 351: #line 2961 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = COMPR; } -#line 5722 "gram.c" /* yacc.c:1646 */ +#line 5724 "gram.c" /* yacc.c:1646 */ break; case 352: #line 2962 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = SWITCH; } -#line 5728 "gram.c" /* yacc.c:1646 */ +#line 5730 "gram.c" /* yacc.c:1646 */ break; case 353: #line 2963 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = ATOMIC; } -#line 5734 "gram.c" /* yacc.c:1646 */ +#line 5736 "gram.c" /* yacc.c:1646 */ break; case 354: #line 2964 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = NODDCHK; } -#line 5740 "gram.c" /* yacc.c:1646 */ +#line 5742 "gram.c" /* yacc.c:1646 */ break; case 355: #line 2965 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = NODDCLR; } -#line 5746 "gram.c" /* yacc.c:1646 */ +#line 5748 "gram.c" /* yacc.c:1646 */ break; case 356: #line 2966 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = MASK_DISABLE; } -#line 5752 "gram.c" /* yacc.c:1646 */ +#line 5754 "gram.c" /* yacc.c:1646 */ break; case 357: #line 2967 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = BREAKPOINT; } -#line 5758 "gram.c" /* yacc.c:1646 */ +#line 5760 "gram.c" /* yacc.c:1646 */ break; case 358: #line 2968 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = ACCWRCTRL; } -#line 5764 "gram.c" /* yacc.c:1646 */ +#line 5766 "gram.c" /* yacc.c:1646 */ break; case 359: #line 2969 "gram.y" /* yacc.c:1646 */ { (yyval.integer) = EOT; } -#line 5770 "gram.c" /* yacc.c:1646 */ +#line 5772 "gram.c" /* yacc.c:1646 */ break; -#line 5774 "gram.c" /* yacc.c:1646 */ +#line 5776 "gram.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff -Nru intel-gpu-tools-1.13/assembler/gram.h intel-gpu-tools-1.14/assembler/gram.h --- intel-gpu-tools-1.13/assembler/gram.h 2015-12-02 16:17:41.000000000 +0000 +++ intel-gpu-tools-1.14/assembler/gram.h 2016-03-01 16:03:14.000000000 +0000 @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. 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 @@ -471,7 +471,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 437 "gram.y" /* yacc.c:1909 */ @@ -494,6 +494,8 @@ #line 496 "gram.h" /* yacc.c:1909 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif diff -Nru intel-gpu-tools-1.13/assembler/lex.c intel-gpu-tools-1.14/assembler/lex.c --- intel-gpu-tools-1.13/assembler/lex.c 2015-12-02 16:17:40.000000000 +0000 +++ intel-gpu-tools-1.14/assembler/lex.c 2016-03-01 16:03:14.000000000 +0000 @@ -8,7 +8,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -141,7 +141,15 @@ /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -180,6 +188,13 @@ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -1123,7 +1138,7 @@ -#line 1127 "lex.c" +#line 1142 "lex.c" #define INITIAL 0 #define BLOCK_COMMENT 1 @@ -1210,7 +1225,12 @@ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1311,10 +1331,6 @@ register char *yy_cp, *yy_bp; register int yy_act; -#line 30 "lex.l" - -#line 1317 "lex.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -1341,6 +1357,11 @@ yy_load_buffer_state( ); } + { +#line 30 "lex.l" + +#line 1364 "lex.c" + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -1357,7 +1378,7 @@ yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -2797,7 +2818,7 @@ #line 475 "lex.l" ECHO; YY_BREAK -#line 2801 "lex.c" +#line 2822 "lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(BLOCK_COMMENT): case YY_STATE_EOF(CHANNEL): @@ -2934,6 +2955,7 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3809,7 +3831,7 @@ #define YYTABLES_NAME "yytables" -#line 475 "lex.l" +#line 474 "lex.l" diff -Nru intel-gpu-tools-1.13/assembler/Makefile.in intel-gpu-tools-1.14/assembler/Makefile.in --- intel-gpu-tools-1.13/assembler/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/assembler/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -90,14 +90,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ bin_PROGRAMS = intel-gen4asm$(EXEEXT) intel-gen4disasm$(EXEEXT) subdir = assembler ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -310,6 +310,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -354,6 +356,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -452,11 +455,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/assembler/test/Makefile.in intel-gpu-tools-1.14/assembler/test/Makefile.in --- intel-gpu-tools-1.13/assembler/test/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/assembler/test/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -87,14 +87,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ XFAIL_TESTS = subdir = assembler/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -363,6 +363,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -407,6 +409,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -505,11 +508,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/autogen.sh intel-gpu-tools-1.14/autogen.sh --- intel-gpu-tools-1.13/autogen.sh 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/autogen.sh 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,19 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +if ! type gtkdocize > /dev/null 2>&1; then + echo "EXTRA_DIST =" > gtk-doc.make + echo "CLEANFILES =" >> gtk-doc.make +else + gtkdocize || exit $? +fi + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure "$@" diff -Nru intel-gpu-tools-1.13/benchmarks/Android.mk intel-gpu-tools-1.14/benchmarks/Android.mk --- intel-gpu-tools-1.13/benchmarks/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/Android.mk 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,37 @@ +LOCAL_PATH := $(call my-dir) + +include $(LOCAL_PATH)/Makefile.sources + +#================# + +define add_benchmark + include $(CLEAR_VARS) + + LOCAL_SRC_FILES := $1.c + + LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM + LOCAL_CFLAGS += -DANDROID -UNDEBUG -include "check-ndebug.h" + LOCAL_CFLAGS += -std=gnu99 + # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit + LOCAL_CFLAGS += -Wno-error=return-type + # Excessive complaining for established cases. Rely on the Linux version warnings. + LOCAL_CFLAGS += -Wno-sign-compare + + LOCAL_MODULE := $1_benchmark + LOCAL_MODULE_TAGS := optional + LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt/benchmarks + + LOCAL_STATIC_LIBRARIES := libintel_gpu_tools + + LOCAL_SHARED_LIBRARIES := libpciaccess \ + libdrm \ + libdrm_intel + + include $(BUILD_EXECUTABLE) +endef + +#================# + +benchmark_list := $(benchmarks_PROGRAMS) + +$(foreach item,$(benchmark_list),$(eval $(call add_benchmark,$(item)))) diff -Nru intel-gpu-tools-1.13/benchmarks/gem_blt.c intel-gpu-tools-1.14/benchmarks/gem_blt.c --- intel-gpu-tools-1.13/benchmarks/gem_blt.c 2015-11-13 14:08:54.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_blt.c 2016-03-01 15:59:21.000000000 +0000 @@ -53,6 +53,37 @@ static int has_64bit_reloc; +static double +elapsed(const struct timespec *start, const struct timespec *end) +{ + return (end->tv_sec - start->tv_sec) + 1e-9*(end->tv_nsec - start->tv_nsec); +} + +static int baseline(uint64_t bytes, int milliseconds) +{ + struct timespec start, end; + const int size = 64*1024*1024; + int count = 0; + void *mem; + + mem = malloc(size); + if (mem == NULL) + return 1; + + clock_gettime(CLOCK_MONOTONIC, &start); + do { + memset(mem, count, size); + count++; + clock_gettime(CLOCK_MONOTONIC, &end); + if (elapsed(&start, &end) > 0.1) + break; + } while (1); + + free(mem); + + return ceil(1e-3*milliseconds/elapsed(&start, &end) * (count * size) / bytes); +} + static int gem_linear_blt(int fd, uint32_t *batch, int offset, @@ -147,27 +178,16 @@ return (b+2 - batch) * sizeof(uint32_t); } -static double elapsed(const struct timespec *start, const struct timespec *end) -{ - return (end->tv_sec - start->tv_sec) + 1e-9*(end->tv_nsec - start->tv_nsec); -} - -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) - err = -errno; - return err; -} +#define SYNC 0x1 -static int run(int object, int batch, int count, int set, int reps) +static int run(int object, int batch, int time, int reps, unsigned flags) { struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 exec[3]; struct drm_i915_gem_relocation_entry *reloc; uint32_t *buf, handle, src, dst; int fd, len, gen, size, nreloc; - int ring; + int ring, count; size = ALIGN(batch * 64, 4096); reloc = malloc(sizeof(*reloc)*size/32*2); @@ -237,10 +257,17 @@ if (execbuf.flags & LOCAL_I915_EXEC_HANDLE_LUT) execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + /* Guess how many loops we need for 0.1s */ + count = baseline((uint64_t)object * batch, 100); + if (flags & SYNC) { + time *= count / 2; + count = 1; + } + while (reps--) { double min = HUGE_VAL; - for (int s = 0; s < set; s++) { + for (int s = 0; s <= time / 100; s++) { struct timespec start, end; double t; @@ -265,20 +292,14 @@ int main(int argc, char **argv) { int size = 1024*1024; - int count = 1; int reps = 13; - int set = 30; + int time = 2000; int batch = 1; + unsigned flags = 0; int c; - while ((c = getopt (argc, argv, "c:r:s:b:S:")) != -1) { + while ((c = getopt (argc, argv, "Ss:b:r:t:")) != -1) { switch (c) { - case 'c': - count = atoi(optarg); - if (count < 1) - count = 1; - break; - case 's': size = atoi(optarg); if (size < 4096) @@ -286,9 +307,13 @@ break; case 'S': - set = atoi(optarg); - if (set < 1) - set = 1; + flags |= SYNC; + break; + + case 't': + time = atoi(optarg); + if (time < 1) + time = 1; break; case 'r': @@ -308,5 +333,5 @@ } } - return run(size, batch, count, set, reps); + return run(size, batch, time, reps, flags); } diff -Nru intel-gpu-tools-1.13/benchmarks/gem_create.c intel-gpu-tools-1.14/benchmarks/gem_create.c --- intel-gpu-tools-1.13/benchmarks/gem_create.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_create.c 2016-03-01 15:59:21.000000000 +0000 @@ -49,15 +49,6 @@ #define LOCAL_I915_EXEC_NO_RELOC (1<<11) #define LOCAL_I915_EXEC_HANDLE_LUT (1<<12) -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) - err = -errno; - return err; -} - - static double elapsed(const struct timespec *start, const struct timespec *end) { diff -Nru intel-gpu-tools-1.13/benchmarks/gem_exec_ctx.c intel-gpu-tools-1.14/benchmarks/gem_exec_ctx.c --- intel-gpu-tools-1.13/benchmarks/gem_exec_ctx.c 2015-11-27 14:38:53.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_exec_ctx.c 2016-03-01 15:59:21.000000000 +0000 @@ -45,23 +45,15 @@ #include "igt_stats.h" enum mode { NOP, CREATE, SWITCH, DEFAULT }; +#define SYNC 0x1 #define LOCAL_I915_EXEC_NO_RELOC (1<<11) #define LOCAL_I915_EXEC_HANDLE_LUT (1<<12) -static uint64_t elapsed(const struct timespec *start, - const struct timespec *end, - int loop) +static double elapsed(const struct timespec *start, + const struct timespec *end) { - return (1000000000ULL*(end->tv_sec - start->tv_sec) + (end->tv_nsec - start->tv_nsec))/loop; -} - -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) - err = -errno; - return err; + return (end->tv_sec - start->tv_sec) + 1e-9*(end->tv_nsec - start->tv_nsec); } static uint32_t batch(int fd) @@ -82,11 +74,11 @@ return create.ctx_id; } -static int loop(unsigned ring, int reps, enum mode mode) +static int loop(unsigned ring, int reps, enum mode mode, unsigned flags) { struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 gem_exec; - int count, fds[2], fd; + int fds[2], fd; uint32_t ctx; fd = fds[0] = drm_open_driver(DRIVER_INTEL); @@ -115,49 +107,49 @@ } ctx = gem_context_create(fd); - for (count = 1; count <= 1<<16; count <<= 1) { - igt_stats_t stats; - int n; - - igt_stats_init_with_size(&stats, reps); - - for (n = 0; n < reps; n++) { - struct timespec start, end; - int loops = count; - sleep(1); /* wait for the hw to go back to sleep */ - clock_gettime(CLOCK_MONOTONIC, &start); - while (loops--) { - uint32_t tmp; - switch (mode) { - case CREATE: - ctx = execbuf.rsvd1; - execbuf.rsvd1 = gem_context_create(fd); - break; - - case SWITCH: - tmp = execbuf.rsvd1; - execbuf.rsvd1 = ctx; - ctx = tmp; - break; - - case DEFAULT: - fd = fds[count & 1]; - break; - - case NOP: - break; - } - do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); - if (mode == CREATE) - gem_context_destroy(fd, ctx); + while (reps--) { + struct timespec start, end; + unsigned count = 0; + + sleep(1); /* wait for the hw to go back to sleep */ + + clock_gettime(CLOCK_MONOTONIC, &start); + do { + uint32_t tmp; + switch (mode) { + case CREATE: + ctx = execbuf.rsvd1; + execbuf.rsvd1 = gem_context_create(fd); + break; + + case SWITCH: + tmp = execbuf.rsvd1; + execbuf.rsvd1 = ctx; + ctx = tmp; + break; + + case DEFAULT: + fd = fds[count & 1]; + break; + + case NOP: + break; } - gem_sync(fd, gem_exec.handle); + do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); + count++; + if (mode == CREATE) + gem_context_destroy(fd, ctx); + + if (flags & SYNC) + gem_sync(fd, gem_exec.handle); + clock_gettime(CLOCK_MONOTONIC, &end); - igt_stats_push(&stats, elapsed(&start, &end, count)); - } + } while (elapsed(&start, &end) < 2.); + + gem_sync(fd, gem_exec.handle); - printf("%7.3f\n", igt_stats_get_trimean(&stats)/1000); - igt_stats_fini(&stats); + clock_gettime(CLOCK_MONOTONIC, &end); + printf("%7.3f\n", 1e6*elapsed(&start, &end) / count); } return 0; } @@ -165,11 +157,12 @@ int main(int argc, char **argv) { unsigned ring = I915_EXEC_RENDER; + unsigned flags = 0; enum mode mode = NOP; - int reps = 13; + int reps = 1; int c; - while ((c = getopt (argc, argv, "e:r:b:")) != -1) { + while ((c = getopt (argc, argv, "e:r:b:s")) != -1) { switch (c) { case 'e': if (strcmp(optarg, "rcs") == 0) @@ -203,10 +196,14 @@ reps = 1; break; + case 's': + flags |= SYNC; + break; + default: break; } } - return loop(ring, reps, mode); + return loop(ring, reps, mode, flags); } diff -Nru intel-gpu-tools-1.13/benchmarks/gem_exec_nop.c intel-gpu-tools-1.14/benchmarks/gem_exec_nop.c --- intel-gpu-tools-1.13/benchmarks/gem_exec_nop.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_exec_nop.c 2016-03-01 15:59:21.000000000 +0000 @@ -47,19 +47,12 @@ #define LOCAL_I915_EXEC_NO_RELOC (1<<11) #define LOCAL_I915_EXEC_HANDLE_LUT (1<<12) -static uint64_t elapsed(const struct timespec *start, - const struct timespec *end, - int loop) -{ - return (1000000000ULL*(end->tv_sec - start->tv_sec) + (end->tv_nsec - start->tv_nsec))/loop; -} +#define SYNC 0x1 -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) +static double elapsed(const struct timespec *start, + const struct timespec *end) { - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) - err = -errno; - return err; + return (end->tv_sec - start->tv_sec) + 1e-9*(end->tv_nsec - start->tv_nsec); } static uint32_t batch(int fd) @@ -70,11 +63,11 @@ return handle; } -static int loop(unsigned ring, int reps) +static int loop(unsigned ring, int reps, unsigned flags) { struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 gem_exec; - int count, fd; + int fd; fd = drm_open_driver(DRIVER_INTEL); @@ -93,26 +86,26 @@ return 77; } - for (count = 1; count <= 1<<16; count <<= 1) { - igt_stats_t stats; - int n; - - igt_stats_init_with_size(&stats, reps); - - for (n = 0; n < reps; n++) { - struct timespec start, end; - int loops = count; - sleep(1); /* wait for the hw to go back to sleep */ - clock_gettime(CLOCK_MONOTONIC, &start); - while (loops--) - do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); - gem_sync(fd, gem_exec.handle); + while (reps--) { + struct timespec start, end; + unsigned count = 0; + + gem_set_domain(fd, gem_exec.handle, I915_GEM_DOMAIN_GTT, 0); + sleep(1); /* wait for the hw to go back to sleep */ + + clock_gettime(CLOCK_MONOTONIC, &start); + do { + do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); + count++; + if (flags & SYNC) + gem_sync(fd, gem_exec.handle); clock_gettime(CLOCK_MONOTONIC, &end); - igt_stats_push(&stats, elapsed(&start, &end, count)); - } + } while (elapsed(&start, &end) < 2.); - printf("%7.3f\n", igt_stats_get_trimean(&stats)/1000); - igt_stats_fini(&stats); + gem_sync(fd, gem_exec.handle); + clock_gettime(CLOCK_MONOTONIC, &end); + + printf("%7.3f\n", 1e6*elapsed(&start, &end)/count); } return 0; } @@ -120,10 +113,11 @@ int main(int argc, char **argv) { unsigned ring = I915_EXEC_RENDER; - int reps = 13; + unsigned flags = 0; + int reps = 1; int c; - while ((c = getopt (argc, argv, "e:r:")) != -1) { + while ((c = getopt (argc, argv, "e:r:s")) != -1) { switch (c) { case 'e': if (strcmp(optarg, "rcs") == 0) @@ -144,10 +138,14 @@ reps = 1; break; + case 's': + flags |= SYNC; + break; + default: break; } } - return loop(ring, reps); + return loop(ring, reps, flags); } diff -Nru intel-gpu-tools-1.13/benchmarks/gem_latency.c intel-gpu-tools-1.14/benchmarks/gem_latency.c --- intel-gpu-tools-1.13/benchmarks/gem_latency.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_latency.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,613 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Chris Wilson + * + */ + +#define _GNU_SOURCE +#include + +#include "igt.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "drm.h" + +static int done; +static int fd; +static volatile uint32_t *timestamp_reg; + +#define REG(x) (volatile uint32_t *)((volatile char *)igt_global_mmio + x) +#define REG_OFFSET(x) ((volatile char *)(x) - (volatile char *)igt_global_mmio) + +static uint32_t read_timestamp_unlocked(void) +{ + return *timestamp_reg; +} +static uint32_t (*read_timestamp)(void) = read_timestamp_unlocked; + +#ifdef __USE_XOPEN2K +static pthread_spinlock_t timestamp_lock; +static uint32_t read_timestamp_locked(void) +{ + uint32_t t; + + pthread_spin_lock(×tamp_lock); + t = *timestamp_reg; + pthread_spin_unlock(×tamp_lock); + + return t; +} +static int setup_timestamp_locked(void) +{ + if (pthread_spin_init(×tamp_lock, 0)) + return 0; + + read_timestamp = read_timestamp_locked; + return 1; +} +#else +static int setup_timestamp_locked(void) +{ + return 0; +} +#endif + +struct consumer { + pthread_t thread; + + int go; + + igt_stats_t latency; + struct producer *producer; +}; + +struct producer { + pthread_t thread; + uint32_t ctx; + struct { + struct drm_i915_gem_exec_object2 exec[1]; + struct drm_i915_gem_execbuffer2 execbuf; + } nop_dispatch; + struct { + struct drm_i915_gem_exec_object2 exec[2]; + struct drm_i915_gem_execbuffer2 execbuf; + } workload_dispatch; + struct { + struct drm_i915_gem_exec_object2 exec[1]; + struct drm_i915_gem_relocation_entry reloc[1]; + struct drm_i915_gem_execbuffer2 execbuf; + } latency_dispatch; + + pthread_mutex_t lock; + pthread_cond_t p_cond, c_cond; + uint32_t *last_timestamp; + int wait; + int complete; + int done; + igt_stats_t latency, dispatch; + + int nop; + int nconsumers; + struct consumer *consumers; +}; + +#define LOCAL_EXEC_NO_RELOC (1<<11) +#define COPY_BLT_CMD (2<<29|0x53<<22|0x6) +#define BLT_WRITE_ALPHA (1<<21) +#define BLT_WRITE_RGB (1<<20) + +#define WIDTH 1024 +#define HEIGHT 1024 + +#define RCS_TIMESTAMP (0x2000 + 0x358) +#define BCS_TIMESTAMP (0x22000 + 0x358) +#define CYCLES_TO_NS(x) (80.*(x)) +#define CYCLES_TO_US(x) (CYCLES_TO_NS(x)/1000.) + +static uint32_t create_workload(int gen, int factor) +{ + const int has_64bit_reloc = gen >= 8; + uint32_t handle = gem_create(fd, 4096); + uint32_t *map = gem_mmap__cpu(fd, handle, 0, 4096, PROT_WRITE); + int i = 0; + + while (factor--) { + /* XY_SRC_COPY */ + map[i++] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB; + if (has_64bit_reloc) + map[i-1] += 2; + map[i++] = 0xcc << 16 | 1 << 25 | 1 << 24 | (4*WIDTH); + map[i++] = 0; + map[i++] = HEIGHT << 16 | WIDTH; + map[i++] = 0; + if (has_64bit_reloc) + map[i++] = 0; + map[i++] = 0; + map[i++] = 4096; + map[i++] = 0; + if (has_64bit_reloc) + map[i++] = 0; + } + map[i++] = MI_BATCH_BUFFER_END; + munmap(map, 4096); + + return handle; +} + +static void setup_workload(struct producer *p, int gen, + uint32_t scratch, + uint32_t batch, + int factor) +{ + struct drm_i915_gem_execbuffer2 *eb; + const int has_64bit_reloc = gen >= 8; + struct drm_i915_gem_relocation_entry *reloc; + int offset; + + reloc = calloc(sizeof(*reloc), 2*factor); + + p->workload_dispatch.exec[0].handle = scratch; + p->workload_dispatch.exec[1].relocation_count = 2*factor; + p->workload_dispatch.exec[1].relocs_ptr = (uintptr_t)reloc; + p->workload_dispatch.exec[1].handle = batch; + + offset = 0; + while (factor--) { + reloc->offset = (offset+4) * sizeof(uint32_t); + reloc->target_handle = scratch; + reloc->read_domains = I915_GEM_DOMAIN_RENDER; + reloc->write_domain = I915_GEM_DOMAIN_RENDER; + reloc++; + + reloc->offset = (offset+7) * sizeof(uint32_t); + if (has_64bit_reloc) + reloc->offset += sizeof(uint32_t); + reloc->target_handle = scratch; + reloc->read_domains = I915_GEM_DOMAIN_RENDER; + reloc++; + + offset += 8; + if (has_64bit_reloc) + offset += 2; + } + + eb = memset(&p->workload_dispatch.execbuf, 0, sizeof(*eb)); + eb->buffers_ptr = (uintptr_t)p->workload_dispatch.exec; + eb->buffer_count = 2; + eb->flags = I915_EXEC_BLT | LOCAL_EXEC_NO_RELOC; + eb->rsvd1 = p->ctx; +} + +static void setup_latency(struct producer *p, int gen) +{ + struct drm_i915_gem_execbuffer2 *eb; + const int has_64bit_reloc = gen >= 8; + uint32_t handle; + uint32_t *map; + int i = 0; + + handle = gem_create(fd, 4096); + if (gem_has_llc(fd)) + map = gem_mmap__cpu(fd, handle, 0, 4096, PROT_WRITE); + else + map = gem_mmap__gtt(fd, handle, 4096, PROT_WRITE); + + p->latency_dispatch.exec[0].relocation_count = 1; + p->latency_dispatch.exec[0].relocs_ptr = + (uintptr_t)p->latency_dispatch.reloc; + p->latency_dispatch.exec[0].handle = handle; + + /* MI_STORE_REG_MEM */ + map[i++] = 0x24 << 23 | 1; + if (has_64bit_reloc) + map[i-1]++; + map[i++] = REG_OFFSET(timestamp_reg); + p->latency_dispatch.reloc[0].offset = i * sizeof(uint32_t); + p->latency_dispatch.reloc[0].delta = 4000; + p->latency_dispatch.reloc[0].target_handle = handle; + p->latency_dispatch.reloc[0].read_domains = I915_GEM_DOMAIN_INSTRUCTION; + p->latency_dispatch.reloc[0].write_domain = 0; /* We lie! */ + p->latency_dispatch.reloc[0].presumed_offset = 0; + p->last_timestamp = &map[1000]; + map[i++] = 4000; + if (has_64bit_reloc) + map[i++] = 0; + + map[i++] = MI_BATCH_BUFFER_END; + + eb = memset(&p->latency_dispatch.execbuf, 0, sizeof(*eb)); + eb->buffers_ptr = (uintptr_t)p->latency_dispatch.exec; + eb->buffer_count = 1; + eb->flags = I915_EXEC_BLT | LOCAL_EXEC_NO_RELOC; + eb->rsvd1 = p->ctx; +} + +static uint32_t create_nop(void) +{ + uint32_t buf = MI_BATCH_BUFFER_END; + uint32_t handle; + + handle = gem_create(fd, 4096); + gem_write(fd, handle, 0, &buf, sizeof(buf)); + + return handle; +} + +static void setup_nop(struct producer *p, uint32_t batch) +{ + struct drm_i915_gem_execbuffer2 *eb; + + p->nop_dispatch.exec[0].handle = batch; + + eb = memset(&p->nop_dispatch.execbuf, 0, sizeof(*eb)); + eb->buffers_ptr = (uintptr_t)p->nop_dispatch.exec; + eb->buffer_count = 1; + eb->flags = I915_EXEC_BLT | LOCAL_EXEC_NO_RELOC; + eb->rsvd1 = p->ctx; +} + +static void measure_latency(struct producer *p, igt_stats_t *stats) +{ + gem_sync(fd, p->latency_dispatch.exec[0].handle); + igt_stats_push(stats, read_timestamp() - *p->last_timestamp); +} + +static void *producer(void *arg) +{ + struct producer *p = arg; + int n; + + while (!done) { + uint32_t start = read_timestamp(); + int batches; + + /* Control the amount of work we do, similar to submitting + * empty buffers below, except this time we will load the + * GPU with a small amount of real work - so there is a small + * period between execution and interrupts. + */ + gem_execbuf(fd, &p->workload_dispatch.execbuf); + + /* Submitting a set of empty batches has a two fold effect: + * - increases contention on execbuffer, i.e. measure dispatch + * latency with number of clients. + * - generates lots of spurious interrupts (if someone is + * waiting). + */ + batches = p->nop; + while (batches--) + gem_execbuf(fd, &p->nop_dispatch.execbuf); + + /* Finally, execute a batch that just reads the current + * TIMESTAMP so we can measure the latency. + */ + gem_execbuf(fd, &p->latency_dispatch.execbuf); + + /* Wake all the associated clients to wait upon our batch */ + p->wait = p->nconsumers; + for (n = 0; n < p->nconsumers; n++) + p->consumers[n].go = 1; + pthread_cond_broadcast(&p->c_cond); + + /* Wait for this batch to finish and record how long we waited, + * and how long it took for the batch to be submitted + * (including the nop delays). + */ + measure_latency(p, &p->latency); + igt_stats_push(&p->dispatch, *p->last_timestamp - start); + + /* Tidy up all the extra threads before we submit again. */ + pthread_mutex_lock(&p->lock); + while (p->wait) + pthread_cond_wait(&p->p_cond, &p->lock); + pthread_mutex_unlock(&p->lock); + + p->complete++; + } + + pthread_mutex_lock(&p->lock); + p->wait = p->nconsumers; + p->done = true; + for (n = 0; n < p->nconsumers; n++) + p->consumers[n].go = 1; + pthread_cond_broadcast(&p->c_cond); + pthread_mutex_unlock(&p->lock); + + return NULL; +} + +static void *consumer(void *arg) +{ + struct consumer *c = arg; + struct producer *p = c->producer; + + /* Sit around waiting for the "go" signal from the producer, then + * wait upon the batch to finish. This is to add extra waiters to + * the same request - increasing wakeup contention. + */ + do { + pthread_mutex_lock(&p->lock); + if (--p->wait == 0) + pthread_cond_signal(&p->p_cond); + while (!c->go) + pthread_cond_wait(&p->c_cond, &p->lock); + c->go = 0; + pthread_mutex_unlock(&p->lock); + if (p->done) + return NULL; + + measure_latency(p, &c->latency); + } while (1); +} + +static double l_estimate(igt_stats_t *stats) +{ + if (stats->n_values > 9) + return igt_stats_get_trimean(stats); + else if (stats->n_values > 5) + return igt_stats_get_median(stats); + else + return igt_stats_get_mean(stats); +} + +static double cpu_time(const struct rusage *r) +{ + return 10e6*(r->ru_utime.tv_sec + r->ru_stime.tv_sec) + + (r->ru_utime.tv_usec + r->ru_stime.tv_usec); +} + +#define CONTEXT 1 +#define REALTIME 2 +static int run(int seconds, + int nproducers, + int nconsumers, + int nop, + int workload, + unsigned flags) +{ + pthread_attr_t attr; + struct producer *p; + igt_stats_t platency, latency, dispatch; + struct rusage rused; + uint32_t nop_batch; + uint32_t workload_batch; + uint32_t scratch; + int gen, n, m; + int complete; + int nrun; + +#if 0 + printf("producers=%d, consumers=%d, nop=%d, workload=%d, flags=%x\n", + nproducers, nconsumers, nop, workload, flags); +#endif + + fd = drm_open_driver(DRIVER_INTEL); + gen = intel_gen(intel_get_drm_devid(fd)); + if (gen < 6) + return IGT_EXIT_SKIP; /* Needs BCS timestamp */ + + intel_register_access_init(intel_get_pci_device(), false); + + if (gen == 6) + timestamp_reg = REG(RCS_TIMESTAMP); + else + timestamp_reg = REG(BCS_TIMESTAMP); + + if (gen < 8 && !setup_timestamp_locked()) + return IGT_EXIT_SKIP; + + nrun = read_timestamp(); + usleep(1); + if (read_timestamp() == nrun) + return IGT_EXIT_SKIP; + + scratch = gem_create(fd, 4*WIDTH*HEIGHT); + nop_batch = create_nop(); + workload_batch = create_workload(gen, workload); + + p = calloc(nproducers, sizeof(*p)); + for (n = 0; n < nproducers; n++) { + if (flags & CONTEXT) + p[n].ctx = gem_context_create(fd); + + setup_nop(&p[n], nop_batch); + setup_workload(&p[n], gen, scratch, workload_batch, workload); + setup_latency(&p[n], gen); + + pthread_mutex_init(&p[n].lock, NULL); + pthread_cond_init(&p[n].p_cond, NULL); + pthread_cond_init(&p[n].c_cond, NULL); + + igt_stats_init(&p[n].latency); + igt_stats_init(&p[n].dispatch); + p[n].wait = nconsumers; + p[n].nop = nop; + p[n].nconsumers = nconsumers; + p[n].consumers = calloc(nconsumers, sizeof(struct consumer)); + for (m = 0; m < nconsumers; m++) { + p[n].consumers[m].producer = &p[n]; + igt_stats_init(&p[n].consumers[m].latency); + pthread_create(&p[n].consumers[m].thread, NULL, + consumer, &p[n].consumers[m]); + } + pthread_mutex_lock(&p->lock); + while (p->wait) + pthread_cond_wait(&p->p_cond, &p->lock); + pthread_mutex_unlock(&p->lock); + } + + pthread_attr_init(&attr); + if (flags & REALTIME) { +#ifdef PTHREAD_EXPLICIT_SCHED + struct sched_param param = { .sched_priority = 99 }; + pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); + pthread_attr_setschedpolicy(&attr, SCHED_FIFO); + pthread_attr_setschedparam(&attr, ¶m); +#else + return IGT_EXIT_SKIP; +#endif + } + for (n = 0; n < nproducers; n++) + pthread_create(&p[n].thread, &attr, producer, &p[n]); + + sleep(seconds); + done = true; + + nrun = complete = 0; + igt_stats_init_with_size(&dispatch, nproducers); + igt_stats_init_with_size(&platency, nproducers); + igt_stats_init_with_size(&latency, nconsumers*nproducers); + for (n = 0; n < nproducers; n++) { + pthread_join(p[n].thread, NULL); + + if (!p[n].complete) + continue; + + nrun++; + complete += p[n].complete; + igt_stats_push_float(&latency, l_estimate(&p[n].latency)); + igt_stats_push_float(&platency, l_estimate(&p[n].latency)); + igt_stats_push_float(&dispatch, l_estimate(&p[n].dispatch)); + + for (m = 0; m < nconsumers; m++) { + pthread_join(p[n].consumers[m].thread, NULL); + igt_stats_push_float(&latency, l_estimate(&p[n].consumers[m].latency)); + } + } + + getrusage(RUSAGE_SELF, &rused); + + switch ((flags >> 8) & 0xf) { + default: + printf("%d/%d: %7.3fus %7.3fus %7.3fus %7.3fus\n", + complete, nrun, + CYCLES_TO_US(l_estimate(&dispatch)), + CYCLES_TO_US(l_estimate(&latency)), + CYCLES_TO_US(l_estimate(&platency)), + cpu_time(&rused) / complete); + break; + case 1: + printf("%f\n", CYCLES_TO_US(l_estimate(&dispatch))); + break; + case 2: + printf("%f\n", CYCLES_TO_US(l_estimate(&latency))); + break; + case 3: + printf("%f\n", CYCLES_TO_US(l_estimate(&platency))); + break; + case 4: + printf("%f\n", cpu_time(&rused) / complete); + break; + } + + return 0; +} + +int main(int argc, char **argv) +{ + int time = 10; + int producers = 1; + int consumers = 0; + int nop = 0; + int workload = 0; + unsigned flags = 0; + int c; + + while ((c = getopt(argc, argv, "p:c:n:w:t:f:sR")) != -1) { + switch (c) { + case 'p': + /* How many threads generate work? */ + producers = atoi(optarg); + if (producers < 1) + producers = 1; + break; + + case 'c': + /* How many threads wait upon each piece of work? */ + consumers = atoi(optarg); + if (consumers < 0) + consumers = 0; + break; + + case 'n': + /* Extra dispatch contention + interrupts */ + nop = atoi(optarg); + if (nop < 0) + nop = 0; + break; + + case 'w': + /* Control the amount of real work done */ + workload = atoi(optarg); + if (workload < 0) + workload = 0; + if (workload > 100) + workload = 100; + break; + + case 't': + /* How long to run the benchmark for (seconds) */ + time = atoi(optarg); + if (time < 0) + time = INT_MAX; + break; + + case 'f': + /* Select an output field */ + flags |= atoi(optarg) << 8; + break; + + case 's': + /* Assign each producer to its own context, adding + * context switching into the mix (e.g. execlists + * can amalgamate requests from one context, so + * having each producer submit in different contexts + * should force more execlist interrupts). + */ + flags |= CONTEXT; + break; + + case 'R': + /* Run the producers at RealTime priority */ + flags |= REALTIME; + break; + + default: + break; + } + } + + return run(time, producers, consumers, nop, workload, flags); +} diff -Nru intel-gpu-tools-1.13/benchmarks/gem_mmap.c intel-gpu-tools-1.14/benchmarks/gem_mmap.c --- intel-gpu-tools-1.13/benchmarks/gem_mmap.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_mmap.c 2016-03-01 15:59:21.000000000 +0000 @@ -46,10 +46,10 @@ #define OBJECT_SIZE (1<<23) -static uint64_t elapsed(const struct timespec *start, - const struct timespec *end) +static double elapsed(const struct timespec *start, + const struct timespec *end) { - return 1000000000ULL*(end->tv_sec - start->tv_sec) + (end->tv_nsec - start->tv_nsec); + return (end->tv_sec - start->tv_sec) + 1e-9*(end->tv_nsec - start->tv_nsec); } int main(int argc, char **argv) @@ -58,11 +58,13 @@ enum map {CPU, GTT, WC} map = CPU; enum dir {READ, WRITE, CLEAR, FAULT} dir = READ; int tiling = I915_TILING_NONE; + struct timespec start, end; void *buf = malloc(OBJECT_SIZE); uint32_t handle; void *ptr, *src, *dst; - int reps = 13; - int c, size; + int reps = 1; + int loops; + int c; while ((c = getopt (argc, argv, "m:d:r:t:")) != -1) { switch (c) { @@ -140,38 +142,56 @@ dst = ptr; } - for (size = 1; size <= OBJECT_SIZE; size <<= 1) { - igt_stats_t stats; - int n; - - igt_stats_init_with_size(&stats, reps); + clock_gettime(CLOCK_MONOTONIC, &start); + switch (dir) { + case CLEAR: + case FAULT: + memset(dst, 0, OBJECT_SIZE); + break; + default: + memcpy(dst, src, OBJECT_SIZE); + break; + } + clock_gettime(CLOCK_MONOTONIC, &end); - for (n = 0; n < reps; n++) { - struct timespec start, end; + loops = 2 / elapsed(&start, &end); + while (reps--) { + clock_gettime(CLOCK_MONOTONIC, &start); + for (c = 0; c < loops; c++) { int page; - clock_gettime(CLOCK_MONOTONIC, &start); switch (dir) { case CLEAR: - memset(dst, 0, size); + memset(dst, 0, OBJECT_SIZE); break; case FAULT: + munmap(ptr, OBJECT_SIZE); + switch (map) { + case CPU: + ptr = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_WRITE); + break; + case GTT: + ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_WRITE); + break; + case WC: + ptr = gem_mmap__wc(fd, handle, 0, OBJECT_SIZE, PROT_WRITE); + break; + default: + abort(); + } for (page = 0; page < OBJECT_SIZE; page += 4096) { uint32_t *x = (uint32_t *)ptr + page/4; + __asm__ __volatile__("": : :"memory"); page += *x; /* should be zero! */ } break; default: - memcpy(dst, src, size); + memcpy(dst, src, OBJECT_SIZE); break; } - clock_gettime(CLOCK_MONOTONIC, &end); - - igt_stats_push(&stats, elapsed(&start, &end)); } - - printf("%7.3f\n", igt_stats_get_trimean(&stats)/1000); - igt_stats_fini(&stats); + clock_gettime(CLOCK_MONOTONIC, &end); + printf("%7.3f\n", OBJECT_SIZE / elapsed(&start, &end) * loops / (1024*1024)); } return 0; diff -Nru intel-gpu-tools-1.13/benchmarks/gem_userptr_benchmark.c intel-gpu-tools-1.14/benchmarks/gem_userptr_benchmark.c --- intel-gpu-tools-1.13/benchmarks/gem_userptr_benchmark.c 2015-11-16 10:39:02.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_userptr_benchmark.c 2016-03-01 15:59:21.000000000 +0000 @@ -58,17 +58,6 @@ #define PAGE_SIZE 4096 #endif -#define LOCAL_I915_GEM_USERPTR 0x33 -#define LOCAL_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + LOCAL_I915_GEM_USERPTR, struct local_i915_gem_userptr) -struct local_i915_gem_userptr { - uint64_t user_ptr; - uint64_t user_size; - uint32_t flags; -#define LOCAL_I915_USERPTR_READ_ONLY (1<<0) -#define LOCAL_I915_USERPTR_UNSYNCHRONIZED (1<<31) - uint32_t handle; -}; - static uint32_t userptr_flags = LOCAL_I915_USERPTR_UNSYNCHRONIZED; #define BO_SIZE (65536) @@ -83,30 +72,6 @@ userptr_flags = 0; } -static int gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t *handle) -{ - struct local_i915_gem_userptr userptr; - int ret; - - userptr.user_ptr = (uintptr_t)ptr; - userptr.user_size = size; - userptr.flags = userptr_flags; - if (read_only) - userptr.flags |= LOCAL_I915_USERPTR_READ_ONLY; - - ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr); - if (ret) - ret = errno; - igt_skip_on_f(ret == ENODEV && - (userptr_flags & LOCAL_I915_USERPTR_UNSYNCHRONIZED) == 0 && - !read_only, - "Skipping, synchronized mappings with no kernel CONFIG_MMU_NOTIFIER?"); - if (ret == 0) - *handle = userptr.handle; - - return ret; -} - static void **handle_ptr_map; static unsigned int num_handle_ptr_map; @@ -144,8 +109,7 @@ ret = posix_memalign(&ptr, PAGE_SIZE, size); igt_assert(ret == 0); - ret = gem_userptr(fd, (uint32_t *)ptr, size, 0, &handle); - igt_assert(ret == 0); + gem_userptr(fd, (uint32_t *)ptr, size, 0, userptr_flags, &handle); add_handle_ptr(handle, ptr); return handle; @@ -167,7 +131,7 @@ assert(posix_memalign(&ptr, PAGE_SIZE, PAGE_SIZE) == 0); oldflags = userptr_flags; gem_userptr_test_unsynchronized(); - ret = gem_userptr(fd, ptr, PAGE_SIZE, 0, &handle); + ret = __gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle); userptr_flags = oldflags; if (ret != 0) { free(ptr); @@ -379,9 +343,7 @@ for (i = 0, p = block; i < nr_bos[subtest]; i++, p += PAGE_SIZE) - ret = gem_userptr(fd, (uint32_t *)p, BO_SIZE, 0, - &handles[i]); - igt_assert(ret == 0); + gem_userptr(fd, (uint32_t *)p, BO_SIZE, 0, userptr_flags, &handles[i]); } if (nr_bos[subtest] > 0) @@ -427,7 +389,6 @@ char *ptr, *bo_ptr; uint32_t handle = 0; unsigned long iter = 0; - int ret; unsigned long map_size = BO_SIZE + PAGE_SIZE - 1; ptr = mmap(NULL, map_size, PROT_READ | PROT_WRITE, @@ -439,8 +400,7 @@ start_test(test_duration_sec); while (run_test) { - ret = gem_userptr(fd, bo_ptr, BO_SIZE, 0, &handle); - assert(ret == 0); + gem_userptr(fd, bo_ptr, BO_SIZE, 0, userptr_flags, &handle); gem_close(fd, handle); iter++; } @@ -456,7 +416,6 @@ uint32_t handles[10000]; int map[10000]; unsigned long iter = 0; - int ret; int i; unsigned long map_size = batch * BO_SIZE + PAGE_SIZE - 1; @@ -478,10 +437,8 @@ if (random) igt_permute_array(map, batch, igt_exchange_int); for (i = 0; i < batch; i++) { - ret = gem_userptr(fd, bo_ptr + map[i] * BO_SIZE, - BO_SIZE, - 0, &handles[i]); - assert(ret == 0); + gem_userptr(fd, bo_ptr + map[i] * BO_SIZE, BO_SIZE, + 0, userptr_flags, &handles[i]); } if (random) igt_permute_array(map, batch, igt_exchange_int); diff -Nru intel-gpu-tools-1.13/benchmarks/gem_wait.c intel-gpu-tools-1.14/benchmarks/gem_wait.c --- intel-gpu-tools-1.13/benchmarks/gem_wait.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/gem_wait.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,303 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Authors: - * Chris Wilson - * - */ - -#include "igt.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "drm.h" - -#define LOCAL_I915_EXEC_NO_RELOC (1<<11) -#define LOCAL_I915_EXEC_HANDLE_LUT (1<<12) - -#define COPY_BLT_CMD (2<<29|0x53<<22|0x6) -#define BLT_WRITE_ALPHA (1<<21) -#define BLT_WRITE_RGB (1<<20) -#define BLT_SRC_TILED (1<<15) -#define BLT_DST_TILED (1<<11) - -#define OBJECT 1024*1024 - -static int has_64bit_reloc; - -static int gem_linear_blt(int fd, - uint32_t *batch, - int offset, - uint32_t src, - uint32_t dst, - uint32_t length, - struct drm_i915_gem_relocation_entry *reloc) -{ - uint32_t *b = batch + offset/4; - int height = length / (16 * 1024); - - igt_assert_lte(height, 1 << 16); - - if (height) { - int i = 0; - b[i++] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB; - if (has_64bit_reloc) - b[i-1]+=2; - b[i++] = 0xcc << 16 | 1 << 25 | 1 << 24 | (16*1024); - b[i++] = 0; - b[i++] = height << 16 | (4*1024); - b[i++] = 0; - reloc->offset = (b-batch+4) * sizeof(uint32_t); - reloc->delta = 0; - reloc->target_handle = dst; - reloc->read_domains = I915_GEM_DOMAIN_RENDER; - reloc->write_domain = I915_GEM_DOMAIN_RENDER; - reloc->presumed_offset = 0; - reloc++; - if (has_64bit_reloc) - b[i++] = 0; /* FIXME */ - - b[i++] = 0; - b[i++] = 16*1024; - b[i++] = 0; - reloc->offset = (b-batch+7) * sizeof(uint32_t); - if (has_64bit_reloc) - reloc->offset += sizeof(uint32_t); - reloc->delta = 0; - reloc->target_handle = src; - reloc->read_domains = I915_GEM_DOMAIN_RENDER; - reloc->write_domain = 0; - reloc->presumed_offset = 0; - reloc++; - if (has_64bit_reloc) - b[i++] = 0; /* FIXME */ - - b += i; - length -= height * 16*1024; - } - - if (length) { - int i = 0; - b[i++] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB; - if (has_64bit_reloc) - b[i-1]+=2; - b[i++] = 0xcc << 16 | 1 << 25 | 1 << 24 | (16*1024); - b[i++] = height << 16; - b[i++] = (1+height) << 16 | (length / 4); - b[i++] = 0; - reloc->offset = (b-batch+4) * sizeof(uint32_t); - reloc->delta = 0; - reloc->target_handle = dst; - reloc->read_domains = I915_GEM_DOMAIN_RENDER; - reloc->write_domain = I915_GEM_DOMAIN_RENDER; - reloc->presumed_offset = 0; - reloc++; - if (has_64bit_reloc) - b[i++] = 0; /* FIXME */ - - b[i++] = height << 16; - b[i++] = 16*1024; - b[i++] = 0; - reloc->offset = (b-batch+7) * sizeof(uint32_t); - if (has_64bit_reloc) - reloc->offset += sizeof(uint32_t); - reloc->delta = 0; - reloc->target_handle = src; - reloc->read_domains = I915_GEM_DOMAIN_RENDER; - reloc->write_domain = 0; - reloc->presumed_offset = 0; - reloc++; - if (has_64bit_reloc) - b[i++] = 0; /* FIXME */ - - b += i; - } - - b[0] = MI_BATCH_BUFFER_END; - b[1] = 0; - - return (b+2 - batch) * sizeof(uint32_t); -} - -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) - err = -errno; - return err; -} - -static void waiter(int child) -{ - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 exec[3]; - struct drm_i915_gem_relocation_entry reloc[2*4096/32]; - uint32_t *buf, handle, src, dst; - int fd, len, gen, nreloc, last = 0; - int ring; - - fd = drm_open_driver(DRIVER_INTEL); - handle = gem_create(fd, 4096); - buf = gem_mmap__cpu(fd, handle, 0, 4096, PROT_WRITE); - - gen = intel_gen(intel_get_drm_devid(fd)); - has_64bit_reloc = gen >= 8; - - src = gem_create(fd, OBJECT); - dst = gem_create(fd, OBJECT); - - len = gem_linear_blt(fd, buf, 0, 0, 1, OBJECT, reloc); - - memset(exec, 0, sizeof(exec)); - exec[0].handle = src; - exec[1].handle = dst; - - exec[2].handle = handle; - if (has_64bit_reloc) - exec[2].relocation_count = len > 56 ? 4 : 2; - else - exec[2].relocation_count = len > 40 ? 4 : 2; - exec[2].relocs_ptr = (uintptr_t)reloc; - - ring = 0; - if (gen >= 6) - ring = I915_EXEC_BLT; - - memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)exec; - execbuf.buffer_count = 3; - execbuf.batch_len = len; - execbuf.flags = ring; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; - - if (__gem_execbuf(fd, &execbuf)) { - gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); - len = gem_linear_blt(fd, buf, 0, src, dst, OBJECT, reloc); - igt_assert(len == execbuf.batch_len); - execbuf.flags = ring; - gem_execbuf(fd, &execbuf); - } - gem_sync(fd, handle); - - if (execbuf.flags & LOCAL_I915_EXEC_HANDLE_LUT) { - src = 0; - dst = 1; - } - - nreloc = exec[2].relocation_count; - while (execbuf.batch_len + len <= 4096) { - last = len - 8; - len = gem_linear_blt(fd, buf, len - 8, - src, dst, OBJECT, - reloc + exec[2].relocation_count); - exec[2].relocation_count += nreloc; - } - munmap(buf, 4096); - - execbuf.batch_len = len; - gem_execbuf(fd, &execbuf); - usleep(0); - - execbuf.batch_len = len - last; - execbuf.batch_start_offset = last; - for (int loop = 0; loop < 16*1024; loop++) - gem_execbuf(fd, &execbuf); - usleep(0); - - execbuf.batch_len = len; - execbuf.batch_start_offset = 0; - gem_execbuf(fd, &execbuf); - - gem_sync(fd, handle); - - close(fd); -} - -static volatile int done; - -static void *thread(void *arg) -{ - volatile uint64_t *c = arg; - - while (!done) - ++*c; - - return NULL; -} - -static int run(int num_waiters) -{ - int num_cpus = sysconf(_SC_NPROCESSORS_ONLN); - pthread_t *threads = calloc(num_cpus, sizeof(pthread_t)); - uint64_t *counters = calloc(num_cpus, 8*sizeof(uint64_t)); - uint64_t count; - - for (int n = 0; n < num_cpus; n++) - pthread_create(&threads[n], NULL, thread, &counters[8*n]); - - igt_fork(child, num_waiters) - waiter(child); - igt_waitchildren(); - - done = 1; - for (int n = 0; n < num_cpus; n++) - pthread_join(threads[n], NULL); - - count = 0; - for (int n = 0; n < num_cpus; n++) - count += counters[8*n]; - printf("%llu\n", (long long unsigned)count); - - return 0; -} - -int main(int argc, char **argv) -{ - int num_waiters = 128; - int c; - - while ((c = getopt (argc, argv, "w:")) != -1) { - switch (c) { - case 'w': - num_waiters = atoi(optarg); - if (num_waiters < 1) - num_waiters = 1; - break; - } - } - - return run(num_waiters); -} diff -Nru intel-gpu-tools-1.13/benchmarks/Makefile.am intel-gpu-tools-1.14/benchmarks/Makefile.am --- intel-gpu-tools-1.13/benchmarks/Makefile.am 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/Makefile.am 2016-03-01 15:59:21.000000000 +0000 @@ -9,7 +9,7 @@ gem_exec_tracer_la_LDFLAGS = -module -avoid-version -no-undefined gem_exec_tracer_la_LIBADD = -ldl -gem_wait_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) -gem_wait_LDADD = $(LDADD) -lpthread +gem_latency_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) +gem_latency_LDADD = $(LDADD) -lpthread EXTRA_DIST=README diff -Nru intel-gpu-tools-1.13/benchmarks/Makefile.in intel-gpu-tools-1.14/benchmarks/Makefile.in --- intel-gpu-tools-1.13/benchmarks/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -89,22 +89,22 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ benchmarks_PROGRAMS = intel_upload_blit_large$(EXEEXT) \ intel_upload_blit_large_gtt$(EXEEXT) \ intel_upload_blit_large_map$(EXEEXT) \ intel_upload_blit_small$(EXEEXT) gem_blt$(EXEEXT) \ gem_create$(EXEEXT) gem_exec_ctx$(EXEEXT) \ gem_exec_nop$(EXEEXT) gem_exec_reloc$(EXEEXT) \ - gem_exec_trace$(EXEEXT) gem_mmap$(EXEEXT) gem_prw$(EXEEXT) \ - gem_set_domain$(EXEEXT) gem_userptr_benchmark$(EXEEXT) \ - gem_wait$(EXEEXT) kms_vblank$(EXEEXT) + gem_exec_trace$(EXEEXT) gem_latency$(EXEEXT) gem_mmap$(EXEEXT) \ + gem_prw$(EXEEXT) gem_set_domain$(EXEEXT) \ + gem_userptr_benchmark$(EXEEXT) kms_vblank$(EXEEXT) subdir = benchmarks ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -191,6 +191,15 @@ gem_exec_trace_DEPENDENCIES = $(top_builddir)/lib/libintel_tools.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_latency_SOURCES = gem_latency.c +gem_latency_OBJECTS = gem_latency-gem_latency.$(OBJEXT) +am__DEPENDENCIES_2 = $(top_builddir)/lib/libintel_tools.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_latency_DEPENDENCIES = $(am__DEPENDENCIES_2) +gem_latency_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gem_latency_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ gem_mmap_SOURCES = gem_mmap.c gem_mmap_OBJECTS = gem_mmap.$(OBJEXT) gem_mmap_LDADD = $(LDADD) @@ -216,15 +225,6 @@ $(top_builddir)/lib/libintel_tools.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -gem_wait_SOURCES = gem_wait.c -gem_wait_OBJECTS = gem_wait-gem_wait.$(OBJEXT) -am__DEPENDENCIES_2 = $(top_builddir)/lib/libintel_tools.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -gem_wait_DEPENDENCIES = $(am__DEPENDENCIES_2) -gem_wait_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gem_wait_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ intel_upload_blit_large_SOURCES = intel_upload_blit_large.c intel_upload_blit_large_OBJECTS = intel_upload_blit_large.$(OBJEXT) intel_upload_blit_large_LDADD = $(LDADD) @@ -296,14 +296,14 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = gem_exec_tracer.c gem_blt.c gem_create.c gem_exec_ctx.c \ - gem_exec_nop.c gem_exec_reloc.c gem_exec_trace.c gem_mmap.c \ - gem_prw.c gem_set_domain.c gem_userptr_benchmark.c gem_wait.c \ + gem_exec_nop.c gem_exec_reloc.c gem_exec_trace.c gem_latency.c \ + gem_mmap.c gem_prw.c gem_set_domain.c gem_userptr_benchmark.c \ intel_upload_blit_large.c intel_upload_blit_large_gtt.c \ intel_upload_blit_large_map.c intel_upload_blit_small.c \ kms_vblank.c DIST_SOURCES = gem_exec_tracer.c gem_blt.c gem_create.c gem_exec_ctx.c \ - gem_exec_nop.c gem_exec_reloc.c gem_exec_trace.c gem_mmap.c \ - gem_prw.c gem_set_domain.c gem_userptr_benchmark.c gem_wait.c \ + gem_exec_nop.c gem_exec_reloc.c gem_exec_trace.c gem_latency.c \ + gem_mmap.c gem_prw.c gem_set_domain.c gem_userptr_benchmark.c \ intel_upload_blit_large.c intel_upload_blit_large_gtt.c \ intel_upload_blit_large_map.c intel_upload_blit_small.c \ kms_vblank.c @@ -368,6 +368,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -412,6 +414,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -510,11 +513,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -525,8 +533,8 @@ benchmarks_LTLIBRARIES = gem_exec_tracer.la gem_exec_tracer_la_LDFLAGS = -module -avoid-version -no-undefined gem_exec_tracer_la_LIBADD = -ldl -gem_wait_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) -gem_wait_LDADD = $(LDADD) -lpthread +gem_latency_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) +gem_latency_LDADD = $(LDADD) -lpthread EXTRA_DIST = README all: all-am @@ -674,6 +682,10 @@ @rm -f gem_exec_trace$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_exec_trace_OBJECTS) $(gem_exec_trace_LDADD) $(LIBS) +gem_latency$(EXEEXT): $(gem_latency_OBJECTS) $(gem_latency_DEPENDENCIES) $(EXTRA_gem_latency_DEPENDENCIES) + @rm -f gem_latency$(EXEEXT) + $(AM_V_CCLD)$(gem_latency_LINK) $(gem_latency_OBJECTS) $(gem_latency_LDADD) $(LIBS) + gem_mmap$(EXEEXT): $(gem_mmap_OBJECTS) $(gem_mmap_DEPENDENCIES) $(EXTRA_gem_mmap_DEPENDENCIES) @rm -f gem_mmap$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_mmap_OBJECTS) $(gem_mmap_LDADD) $(LIBS) @@ -690,10 +702,6 @@ @rm -f gem_userptr_benchmark$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_userptr_benchmark_OBJECTS) $(gem_userptr_benchmark_LDADD) $(LIBS) -gem_wait$(EXEEXT): $(gem_wait_OBJECTS) $(gem_wait_DEPENDENCIES) $(EXTRA_gem_wait_DEPENDENCIES) - @rm -f gem_wait$(EXEEXT) - $(AM_V_CCLD)$(gem_wait_LINK) $(gem_wait_OBJECTS) $(gem_wait_LDADD) $(LIBS) - intel_upload_blit_large$(EXEEXT): $(intel_upload_blit_large_OBJECTS) $(intel_upload_blit_large_DEPENDENCIES) $(EXTRA_intel_upload_blit_large_DEPENDENCIES) @rm -f intel_upload_blit_large$(EXEEXT) $(AM_V_CCLD)$(LINK) $(intel_upload_blit_large_OBJECTS) $(intel_upload_blit_large_LDADD) $(LIBS) @@ -727,11 +735,11 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_reloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_trace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_tracer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_latency-gem_latency.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_mmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_prw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_set_domain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_userptr_benchmark.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_wait-gem_wait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_upload_blit_large.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_upload_blit_large_gtt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_upload_blit_large_map.Po@am__quote@ @@ -762,19 +770,19 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -gem_wait-gem_wait.o: gem_wait.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_wait_CFLAGS) $(CFLAGS) -MT gem_wait-gem_wait.o -MD -MP -MF $(DEPDIR)/gem_wait-gem_wait.Tpo -c -o gem_wait-gem_wait.o `test -f 'gem_wait.c' || echo '$(srcdir)/'`gem_wait.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gem_wait-gem_wait.Tpo $(DEPDIR)/gem_wait-gem_wait.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gem_wait.c' object='gem_wait-gem_wait.o' libtool=no @AMDEPBACKSLASH@ +gem_latency-gem_latency.o: gem_latency.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_latency_CFLAGS) $(CFLAGS) -MT gem_latency-gem_latency.o -MD -MP -MF $(DEPDIR)/gem_latency-gem_latency.Tpo -c -o gem_latency-gem_latency.o `test -f 'gem_latency.c' || echo '$(srcdir)/'`gem_latency.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gem_latency-gem_latency.Tpo $(DEPDIR)/gem_latency-gem_latency.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gem_latency.c' object='gem_latency-gem_latency.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_wait_CFLAGS) $(CFLAGS) -c -o gem_wait-gem_wait.o `test -f 'gem_wait.c' || echo '$(srcdir)/'`gem_wait.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_latency_CFLAGS) $(CFLAGS) -c -o gem_latency-gem_latency.o `test -f 'gem_latency.c' || echo '$(srcdir)/'`gem_latency.c -gem_wait-gem_wait.obj: gem_wait.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_wait_CFLAGS) $(CFLAGS) -MT gem_wait-gem_wait.obj -MD -MP -MF $(DEPDIR)/gem_wait-gem_wait.Tpo -c -o gem_wait-gem_wait.obj `if test -f 'gem_wait.c'; then $(CYGPATH_W) 'gem_wait.c'; else $(CYGPATH_W) '$(srcdir)/gem_wait.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gem_wait-gem_wait.Tpo $(DEPDIR)/gem_wait-gem_wait.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gem_wait.c' object='gem_wait-gem_wait.obj' libtool=no @AMDEPBACKSLASH@ +gem_latency-gem_latency.obj: gem_latency.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_latency_CFLAGS) $(CFLAGS) -MT gem_latency-gem_latency.obj -MD -MP -MF $(DEPDIR)/gem_latency-gem_latency.Tpo -c -o gem_latency-gem_latency.obj `if test -f 'gem_latency.c'; then $(CYGPATH_W) 'gem_latency.c'; else $(CYGPATH_W) '$(srcdir)/gem_latency.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gem_latency-gem_latency.Tpo $(DEPDIR)/gem_latency-gem_latency.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gem_latency.c' object='gem_latency-gem_latency.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_wait_CFLAGS) $(CFLAGS) -c -o gem_wait-gem_wait.obj `if test -f 'gem_wait.c'; then $(CYGPATH_W) 'gem_wait.c'; else $(CYGPATH_W) '$(srcdir)/gem_wait.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gem_latency_CFLAGS) $(CFLAGS) -c -o gem_latency-gem_latency.obj `if test -f 'gem_latency.c'; then $(CYGPATH_W) 'gem_latency.c'; else $(CYGPATH_W) '$(srcdir)/gem_latency.c'; fi` mostlyclean-libtool: -rm -f *.lo diff -Nru intel-gpu-tools-1.13/benchmarks/Makefile.sources intel-gpu-tools-1.14/benchmarks/Makefile.sources --- intel-gpu-tools-1.13/benchmarks/Makefile.sources 2015-11-23 17:46:24.000000000 +0000 +++ intel-gpu-tools-1.14/benchmarks/Makefile.sources 2016-03-01 15:59:21.000000000 +0000 @@ -11,10 +11,10 @@ gem_exec_nop \ gem_exec_reloc \ gem_exec_trace \ + gem_latency \ gem_mmap \ gem_prw \ gem_set_domain \ gem_userptr_benchmark \ - gem_wait \ kms_vblank \ $(NULL) diff -Nru intel-gpu-tools-1.13/build-aux/config.guess intel-gpu-tools-1.14/build-aux/config.guess --- intel-gpu-tools-1.13/build-aux/config.guess 2015-09-11 15:13:13.000000000 +0000 +++ intel-gpu-tools-1.14/build-aux/config.guess 2016-03-01 16:02:43.000000000 +0000 @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2015-08-20' # 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 @@ -168,20 +168,27 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -197,6 +204,13 @@ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -207,13 +221,13 @@ release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -235,6 +249,9 @@ *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -933,6 +950,9 @@ crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -1021,7 +1041,7 @@ echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} diff -Nru intel-gpu-tools-1.13/build-aux/config.sub intel-gpu-tools-1.14/build-aux/config.sub --- intel-gpu-tools-1.13/build-aux/config.sub 2015-09-11 15:13:13.000000000 +0000 +++ intel-gpu-tools-1.14/build-aux/config.sub 2016-03-01 16:02:43.000000000 +0000 @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2015-08-20' # 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 @@ -117,7 +117,7 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -255,11 +255,12 @@ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ + | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ @@ -305,7 +306,7 @@ | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -376,12 +377,13 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -428,12 +430,13 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,6 +521,9 @@ basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -1025,7 +1031,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 @@ -1373,7 +1379,7 @@ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ diff -Nru intel-gpu-tools-1.13/build-aux/install-sh intel-gpu-tools-1.14/build-aux/install-sh --- intel-gpu-tools-1.13/build-aux/install-sh 2015-09-11 15:13:13.000000000 +0000 +++ intel-gpu-tools-1.14/build-aux/install-sh 2016-03-01 16:02:43.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2013-12-25.23; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -324,34 +324,41 @@ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi - rmdir "$tmpdir/d" "$tmpdir" + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; diff -Nru intel-gpu-tools-1.13/build-aux/ltmain.sh intel-gpu-tools-1.14/build-aux/ltmain.sh --- intel-gpu-tools-1.13/build-aux/ltmain.sh 2015-09-11 15:13:09.000000000 +0000 +++ intel-gpu-tools-1.14/build-aux/ltmain.sh 2016-03-01 16:02:39.000000000 +0000 @@ -1,9 +1,12 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.2 +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 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. @@ -23,881 +26,2112 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --no-warn don't display warning messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 -TIMESTAMP="" -package_revision=1.3337 +VERSION="2.4.6 Debian-2.4.6-0.1" +package_revision=2.4.6 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 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. + +# 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 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. : ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" -dirname="s,/[^/]*$,," -basename="s,^.*/,," -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` -# Make sure we have an absolute path for reexecution: +# Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) - progdir=$func_dirname_result + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; *) - save_IFS="$IFS" + _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do - IFS="$save_IFS" + IFS=$_G_IFS test -x "$progdir/$progname" && break done - IFS="$save_IFS" + IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. -# Standard options: opt_dry_run=false -opt_help=false opt_quiet=false opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : + require_term_colors=: } -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} +## ----------------- ## +## Function library. ## +## ----------------- ## -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. - # bash bug again: - : -} -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors -# func_grep expression filename + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { + $debug_cmd + $GREP "$1" "$2" >/dev/null 2>&1 } -# func_mkdir_p directory-path +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { - my_directory_path="$1" - my_dir_list= + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do + while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" + _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac + case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : + $MKDIR "$_G_dir" 2>/dev/null || : done - IFS="$save_mkdir_p_IFS" + IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi } -# func_mktempdir [string] +# func_mktempdir [BASENAME] +# ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. +# given, BASENAME is the basename for that directory. func_mktempdir () { - my_template="${TMPDIR-/tmp}/${1-$progname}" + $debug_cmd - if test "$opt_dry_run" = ":"; then + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" + _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - if test ! -d "$my_tmpdir"; then + if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + _G_tmpdir=$_G_template-${RANDOM-0}$$ - save_mktempdir_umask=`umask` + func_mktempdir_umask=`umask` umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi - $ECHO "$my_tmpdir" + $ECHO "$_G_tmpdir" } -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. func_quote_for_eval () { + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) - func_quote_for_eval_unquoted_result="$1" ;; + _G_arg=$1 ;; esac - case $func_quote_for_eval_unquoted_result in + case $_G_arg in # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. + # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + _G_arg=\"$_G_arg\" ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac + + func_quote_for_expand_result=$_G_arg } -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () { + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 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. + +# 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 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd - func_quote_for_expand_result="$my_arg" + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + # Option defaults: + opt_verbose=false + opt_warning_types= - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + func_parse_options_result= - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} -# func_tr_sh -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } -# func_version -# Echo version message to standard output and exit. -func_version () +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () { - $opt_debug + $debug_cmd - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } -# func_usage -# Echo short help message to standard output and exit. -func_usage () + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE } -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. + +# func_help +# --------- +# Echo long help message to standard output and exit. func_help () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi + func_usage_message + $ECHO "$long_help_message" + exit 0 } -# func_missing_arg argname + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - $opt_debug + $debug_cmd - func_error "missing argument for $1." + func_error "Missing argument for '$1'." exit_cmd=exit } -# func_split_short_opt shortopt +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () { - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + $debug_cmd - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () { - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' + $debug_cmd - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} -exit_cmd=: +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + exit $? +} -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () { - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation + $debug_cmd -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} -# func_arith arithmetic-term... -func_arith () +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () { - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation + $debug_cmd + $warning_func ${1+"$@"} +} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" -# func_lo2o object -func_lo2o () +# Additional text appended to 'usage_message' in response to '--help'. +func_help () { - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation + $debug_cmd + func_usage_message + $ECHO "$long_help_message -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} -# func_fatal_configuration arg... +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." } # func_config +# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -915,17 +2149,19 @@ exit $? } + # func_features +# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" @@ -934,314 +2170,350 @@ exit $? } -# func_enable_tag tagname + +# func_enable_tag TAGNAME +# ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { - # Global variable: - tagname="$1" + # Global variable: + tagname=$1 - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # func_check_version_match +# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - else - cat >&2 <<_LT_EOF + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + fi + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF - fi + fi - exit $EXIT_MISMATCH - fi + exit $EXIT_MISMATCH + fi } -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + nonopt= + preserve_args= -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -func_append preserve_args " $opt" - ;; - --no-warning|--no-warn) - opt_warning=false -func_append preserve_args " $opt" - ;; - --no-verbose) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - # Validate options: +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - $opt_help || { - # Sanity checks first: - func_check_version_match + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } +func_add_hook func_validate_options libtool_validate_options +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + ## ----------- ## ## Main. ## ## ----------- ## +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -1249,13 +2521,13 @@ for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -1264,7 +2536,8 @@ # determined imposters. func_ltwrapper_script_p () { - func_lalib_p "$1" + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file @@ -1289,7 +2562,7 @@ { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file @@ -1308,11 +2581,13 @@ # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -1324,10 +2599,11 @@ # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1354,10 +2630,10 @@ # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case "$lt_sysroot:$1" in + case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" + func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. @@ -1374,7 +2650,8 @@ # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -1393,7 +2670,7 @@ for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. @@ -1418,7 +2695,7 @@ # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1434,15 +2711,15 @@ # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1450,7 +2727,7 @@ $opt_dry_run || { cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` + $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi @@ -1514,18 +2792,19 @@ # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { - $opt_debug + $debug_cmd + # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" + func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi @@ -1554,7 +2833,8 @@ # environment variable; do not put it in $PATH. func_cygpath () { - $opt_debug + $debug_cmd + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then @@ -1563,7 +2843,7 @@ fi else func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath @@ -1574,10 +2854,11 @@ # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { - $opt_debug + $debug_cmd + # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 @@ -1588,13 +2869,14 @@ # func_to_host_file_result to ARG1). func_convert_file_check () { - $opt_debug - if test -z "$2" && test -n "$1" ; then + $debug_cmd + + if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" - func_error " \`$1'" + func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: - func_to_host_file_result="$1" + func_to_host_file_result=$1 fi } # end func_convert_file_check @@ -1606,10 +2888,11 @@ # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { - $opt_debug + $debug_cmd + if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" - func_error " \`$3'" + func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. @@ -1618,7 +2901,7 @@ func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else - func_to_host_path_result="$3" + func_to_host_path_result=$3 fi fi } @@ -1630,9 +2913,10 @@ # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { - $opt_debug + $debug_cmd + case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" + $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in @@ -1646,7 +2930,7 @@ ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## -# invoked via `$to_host_file_cmd ARG' +# invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. @@ -1657,7 +2941,8 @@ # in func_to_host_file_result. func_to_host_file () { - $opt_debug + $debug_cmd + $to_host_file_cmd "$1" } # end func_to_host_file @@ -1669,7 +2954,8 @@ # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { - $opt_debug + $debug_cmd + case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 @@ -1687,7 +2973,7 @@ # Copy ARG to func_to_host_file_result. func_convert_file_noop () { - func_to_host_file_result="$1" + func_to_host_file_result=$1 } # end func_convert_file_noop @@ -1698,11 +2984,12 @@ # func_to_host_file_result. func_convert_file_msys_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1714,8 +3001,9 @@ # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. @@ -1731,11 +3019,12 @@ # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1747,12 +3036,13 @@ # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1765,13 +3055,14 @@ # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1781,7 +3072,7 @@ ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# -# invoked via `$to_host_path_cmd ARG' +# invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. @@ -1805,10 +3096,11 @@ to_host_path_cmd= func_init_to_host_path_cmd () { - $opt_debug + $debug_cmd + if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" + to_host_path_cmd=func_convert_path_$func_stripname_result fi } @@ -1818,7 +3110,8 @@ # in func_to_host_path_result. func_to_host_path () { - $opt_debug + $debug_cmd + func_init_to_host_path_cmd $to_host_path_cmd "$1" } @@ -1829,7 +3122,7 @@ # Copy ARG to func_to_host_path_result. func_convert_path_noop () { - func_to_host_path_result="$1" + func_to_host_path_result=$1 } # end func_convert_path_noop @@ -1840,8 +3133,9 @@ # func_to_host_path_result. func_convert_path_msys_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; @@ -1849,7 +3143,7 @@ func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1863,8 +3157,9 @@ # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" @@ -1883,14 +3178,15 @@ # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1904,15 +3200,16 @@ # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1927,8 +3224,9 @@ # func_to_host_file_result. func_convert_path_nix_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them @@ -1937,7 +3235,7 @@ func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1946,13 +3244,31 @@ # end func_convert_path_nix_to_cygwin +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1965,12 +3281,12 @@ case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1980,7 +3296,7 @@ case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; @@ -2009,12 +3325,12 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result @@ -2027,8 +3343,8 @@ # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; @@ -2043,13 +3359,13 @@ func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -2069,7 +3385,7 @@ case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -2078,8 +3394,8 @@ for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -2105,17 +3421,17 @@ func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -2127,16 +3443,16 @@ pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -2145,12 +3461,12 @@ # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -2158,7 +3474,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2180,11 +3496,11 @@ qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -2201,7 +3517,7 @@ func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2212,7 +3528,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2228,20 +3544,20 @@ fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then + if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi @@ -2250,7 +3566,7 @@ func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2261,7 +3577,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2281,7 +3597,7 @@ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -2291,7 +3607,7 @@ } $opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () @@ -2311,7 +3627,7 @@ Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -2330,16 +3646,16 @@ -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -2352,7 +3668,7 @@ -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -2371,7 +3687,7 @@ Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -2381,7 +3697,7 @@ Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -2407,7 +3723,7 @@ -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -2421,7 +3737,8 @@ -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information @@ -2441,20 +3758,20 @@ -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -2465,7 +3782,7 @@ Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -2473,17 +3790,17 @@ ;; *) - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo - $ECHO "Try \`$progname --help' for more information about other modes." + $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test "$opt_help" = :; then + if test : = "$opt_help"; then func_mode_help else { @@ -2491,7 +3808,7 @@ for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do @@ -2499,7 +3816,7 @@ func_mode_help done } | - sed '1d + $SED '1d /^When reporting/,/^Report/{ H d @@ -2516,16 +3833,17 @@ # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + || func_fatal_help "'$file' is not a file" dir= case $file in @@ -2535,7 +3853,7 @@ # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -2546,18 +3864,18 @@ if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -2565,18 +3883,18 @@ *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -2588,7 +3906,7 @@ # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= @@ -2601,12 +3919,12 @@ if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; esac @@ -2614,7 +3932,15 @@ func_append_quoted args "$file" done - if test "X$opt_dry_run" = Xfalse; then + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -2631,25 +3957,18 @@ done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug + $debug_cmd + libs= libdirs= admincmds= @@ -2663,11 +3982,11 @@ if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else - func_warning "\`$opt' is not a valid libtool archive" + func_warning "'$opt' is not a valid libtool archive" fi else - func_fatal_error "invalid argument \`$opt'" + func_fatal_error "invalid argument '$opt'" fi done @@ -2682,12 +4001,12 @@ # Remove sysroot references if $opt_dry_run; then for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done @@ -2712,7 +4031,7 @@ fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" @@ -2723,27 +4042,27 @@ echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" + $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo @@ -2762,18 +4081,20 @@ exit $EXIT_SUCCESS } -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -2800,7 +4121,7 @@ opts= prev= install_type= - isdir=no + isdir=false stripme= no_mode=: for arg @@ -2813,7 +4134,7 @@ fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg @@ -2831,7 +4152,7 @@ *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -2856,7 +4177,7 @@ func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else @@ -2878,19 +4199,19 @@ dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2899,7 +4220,7 @@ case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -2908,7 +4229,7 @@ # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -2928,7 +4249,7 @@ # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -2950,7 +4271,7 @@ fi func_dirname "$file" "/" "" - dir="$func_dirname_result" + dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then @@ -2964,7 +4285,7 @@ # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -2973,29 +4294,36 @@ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= ;; esac ;; @@ -3006,7 +4334,7 @@ if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -3017,14 +4345,14 @@ fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. @@ -3036,11 +4364,11 @@ # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -3050,11 +4378,11 @@ staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -3063,7 +4391,7 @@ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -3075,23 +4403,23 @@ *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -3119,19 +4447,19 @@ # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -3139,29 +4467,29 @@ func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { + $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else @@ -3198,10 +4526,10 @@ for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result @@ -3216,18 +4544,18 @@ done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$opt_mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -3235,16 +4563,17 @@ # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -3255,7 +4584,7 @@ "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -3263,34 +4592,36 @@ func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" @@ -3298,7 +4629,7 @@ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done @@ -3318,10 +4649,10 @@ # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -3331,7 +4662,7 @@ } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in @@ -3345,22 +4676,22 @@ fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" - name="$func_basename_result" + name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" + dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then + if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" + dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" @@ -3368,7 +4699,7 @@ fi fi $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then + if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" @@ -3424,6 +4755,11 @@ echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -3432,11 +4768,30 @@ void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -3478,9 +4833,7 @@ *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -3497,10 +4850,10 @@ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -3518,7 +4871,7 @@ esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -3532,6 +4885,32 @@ fi } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_win32_libid arg # return the library type of file 'arg' # @@ -3541,8 +4920,9 @@ # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -3552,16 +4932,29 @@ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -3593,7 +4986,8 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { - $opt_debug + $debug_cmd + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } @@ -3610,7 +5004,8 @@ # specified import library. func_cygming_dll_for_implib_fallback_core () { - $opt_debug + $debug_cmd + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ @@ -3646,8 +5041,8 @@ /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually @@ -3658,30 +5053,6 @@ $SED -e '/^\./d;/^.\./d;q' } -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified @@ -3695,16 +5066,17 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then + elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown - sharedlib_from_linklib_result="" + sharedlib_from_linklib_result= fi } @@ -3712,10 +5084,11 @@ # func_extract_an_archive dir oldlib func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -3724,7 +5097,7 @@ fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then + if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -3738,22 +5111,23 @@ # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -3765,7 +5139,7 @@ esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -3778,22 +5152,23 @@ cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do @@ -3815,7 +5190,7 @@ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } @@ -3830,7 +5205,7 @@ # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is +# will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -3841,7 +5216,7 @@ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -3898,9 +5273,9 @@ # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on +# /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match +# (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and @@ -3933,7 +5308,7 @@ # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } @@ -3944,7 +5319,7 @@ lt_dump_args_N=1; for lt_arg do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -3958,7 +5333,7 @@ *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -3968,7 +5343,7 @@ *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -4043,13 +5418,13 @@ test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -4066,7 +5441,7 @@ if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $ECHO \"\$relink_command_output\" >&2 + \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -4101,7 +5476,7 @@ fi # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" @@ -4121,7 +5496,7 @@ fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 @@ -4140,7 +5515,7 @@ cat < #include +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* declarations of non-ANSI functions */ -#if defined(__MINGW32__) +#if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined (other platforms) ... */ +/* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) +#if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) +#elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ +/* #elif defined other platforms ... */ #endif -#if defined(PATH_MAX) +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -4234,8 +5607,8 @@ # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -4268,10 +5641,10 @@ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#if defined(LT_DEBUGWRAPPER) +#if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; @@ -4300,11 +5673,16 @@ EOF cat < 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -5082,27 +6460,47 @@ # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $opt_debug + $debug_cmd + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -5146,10 +6544,11 @@ module=no no_install=no objs= + os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -5161,7 +6560,7 @@ vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -5169,15 +6568,15 @@ do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -5210,7 +6609,7 @@ # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result @@ -5227,21 +6626,21 @@ case $prev in bindir) - bindir="$arg" + bindir=$arg prev= continue ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -5249,9 +6648,9 @@ continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -5261,7 +6660,7 @@ continue ;; *) - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" @@ -5272,14 +6671,14 @@ esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -5297,7 +6696,13 @@ continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -5321,21 +6726,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5346,7 +6751,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5354,23 +6759,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5378,7 +6783,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5386,24 +6791,29 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -5415,7 +6825,7 @@ func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; @@ -5430,7 +6840,7 @@ continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; @@ -5470,7 +6880,7 @@ esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -5484,7 +6894,7 @@ -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -5516,7 +6926,7 @@ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -5550,9 +6960,9 @@ func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" @@ -5563,8 +6973,8 @@ *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in @@ -5599,7 +7009,7 @@ ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -5607,11 +7017,11 @@ ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework @@ -5620,16 +7030,16 @@ ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -5639,6 +7049,11 @@ continue ;; + -mllvm) + prev=mllvm + continue + ;; + -module) module=yes continue @@ -5668,7 +7083,7 @@ ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -5682,8 +7097,8 @@ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -5701,6 +7116,11 @@ continue ;; + -os2dllname) + prev=os2dllname + continue + ;; + -o) prev=output ;; -precious-files-regex) @@ -5788,14 +7208,14 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5804,15 +7224,15 @@ func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5835,7 +7255,7 @@ # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: @@ -5847,25 +7267,49 @@ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files + # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; *.$objext) @@ -5886,21 +7330,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5911,7 +7355,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5919,23 +7363,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5943,7 +7387,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5951,7 +7395,7 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; @@ -5967,11 +7411,11 @@ # A libtool-controlled library. func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= @@ -5986,7 +7430,7 @@ # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; esac # arg @@ -5998,9 +7442,9 @@ done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6009,20 +7453,23 @@ oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. @@ -6045,7 +7492,7 @@ # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6053,7 +7500,7 @@ func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -6085,7 +7532,7 @@ case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -6093,7 +7540,7 @@ prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -6105,29 +7552,32 @@ for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs @@ -6148,26 +7598,26 @@ esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6177,13 +7627,13 @@ continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -6191,31 +7641,22 @@ for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -6223,19 +7664,19 @@ old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -6244,15 +7685,25 @@ *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6265,18 +7716,18 @@ case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6287,13 +7738,13 @@ func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result @@ -6311,7 +7762,7 @@ lib=$func_resolve_sysroot_result ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -6322,21 +7773,26 @@ case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -6344,18 +7800,13 @@ echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6366,10 +7817,10 @@ esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" @@ -6382,22 +7833,20 @@ continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -6427,36 +7876,36 @@ done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -6464,26 +7913,26 @@ # Get the name of the library we link against. linklib= if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do - linklib="$l" + linklib=$l done fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -6497,40 +7946,40 @@ # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then + if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi @@ -6539,11 +7988,11 @@ name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi - case "$host" in + case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both @@ -6587,9 +8036,9 @@ if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -6599,14 +8048,14 @@ fi - if test "$linkmode" = prog && test "$pass" != link; then + if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= @@ -6618,14 +8067,14 @@ ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6635,15 +8084,15 @@ continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac @@ -6672,9 +8121,9 @@ esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -6683,19 +8132,19 @@ link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc*) + *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then + if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi @@ -6705,24 +8154,24 @@ # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -6750,43 +8199,43 @@ # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc*) + *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -6794,58 +8243,58 @@ linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$opt_mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then + if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$absdir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6854,10 +8303,10 @@ ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -6865,7 +8314,7 @@ *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi @@ -6875,15 +8324,15 @@ *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; @@ -6892,33 +8341,33 @@ fi fi - if test "$linkmode" = prog || test "$opt_mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6927,10 +8376,10 @@ ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -6938,43 +8387,43 @@ test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then + if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -6987,11 +8436,11 @@ fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -7005,12 +8454,12 @@ *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do @@ -7020,7 +8469,7 @@ func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; @@ -7029,12 +8478,12 @@ func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result @@ -7042,12 +8491,12 @@ dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -7055,35 +8504,35 @@ case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -7095,23 +8544,23 @@ fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do @@ -7121,12 +8570,12 @@ esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -7184,62 +8633,93 @@ eval $var=\"$tmp_libs\" done # for var fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then + if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" + oldlibs=$output func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -7248,10 +8728,10 @@ eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -7265,8 +8745,8 @@ esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" @@ -7275,21 +8755,21 @@ fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -7298,20 +8778,20 @@ fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -7319,42 +8799,45 @@ case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|linux|osf|windows|none) + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type '$version_type'" + ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -7362,30 +8845,30 @@ case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -7400,26 +8883,36 @@ # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -7430,69 +8923,74 @@ nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - func_append verstring ":${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -7506,42 +9004,45 @@ verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= else - versuffix=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" + func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= + test " " = "$libobjs" && libobjs= - if test "$opt_mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -7550,8 +9051,8 @@ case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue @@ -7567,11 +9068,11 @@ fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -7592,13 +9093,13 @@ *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in @@ -7608,7 +9109,7 @@ done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in @@ -7617,7 +9118,7 @@ esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -7641,7 +9142,7 @@ ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then + if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; @@ -7657,9 +9158,9 @@ # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -7688,20 +9189,20 @@ -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7731,20 +9232,20 @@ $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7781,24 +9282,24 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi - test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - if test "$want_nocaseglob" = yes; then + if test yes = "$want_nocaseglob"; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob @@ -7816,25 +9317,25 @@ # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7842,7 +9343,7 @@ echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7865,30 +9366,30 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test + potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7896,7 +9397,7 @@ echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7912,18 +9413,18 @@ done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" + newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test "X$deplibs_check_method" = "Xnone"; then + if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." @@ -7947,8 +9448,8 @@ ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then + if test yes = "$droppeddeps"; then + if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" @@ -7957,12 +9458,12 @@ if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7973,14 +9474,14 @@ echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then + if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -8026,7 +9527,7 @@ *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -8034,25 +9535,25 @@ dlname= # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Remove ${wl} instances when linking with ld. + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac - if test "$hardcode_into_libs" = yes; then + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8077,7 +9578,7 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then @@ -8091,8 +9592,8 @@ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -8102,19 +9603,19 @@ eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do @@ -8128,7 +9629,7 @@ delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi @@ -8137,31 +9638,31 @@ cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do - IFS="$save_ifs" + IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in @@ -8175,7 +9676,7 @@ try_normal_branch=no ;; esac - if test "$try_normal_branch" = yes \ + if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then @@ -8186,7 +9687,7 @@ output_la=$func_basename_result save_libobjs=$libobjs save_output=$output - output=${output_objdir}/${output_la}.nm + output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" @@ -8209,8 +9710,8 @@ break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -8218,16 +9719,16 @@ fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8246,11 +9747,11 @@ ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -8261,7 +9762,7 @@ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8270,18 +9771,18 @@ fi fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -8299,7 +9800,7 @@ fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -8332,8 +9833,8 @@ last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs @@ -8345,14 +9846,14 @@ func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi @@ -8367,7 +9868,7 @@ else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -8379,13 +9880,13 @@ func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -8395,10 +9896,10 @@ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -8410,9 +9911,9 @@ # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" @@ -8420,9 +9921,9 @@ output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -8431,16 +9932,16 @@ if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8448,7 +9949,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8457,7 +9958,7 @@ exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -8465,18 +9966,18 @@ fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8485,7 +9986,7 @@ export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - fi + } libobjs=$output # Restore the value of output. @@ -8499,7 +10000,7 @@ # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -8521,7 +10022,7 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -8529,11 +10030,12 @@ test "X$libobjs" = "X " && libobjs= fi - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8541,7 +10043,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8550,10 +10052,10 @@ exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -8573,39 +10075,39 @@ done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -8613,7 +10115,7 @@ ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -8626,17 +10128,19 @@ # the extraction. reload_conv_objs= gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else - gentop="$output_objdir/${obj}x" + gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8645,12 +10149,12 @@ fi # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - output="$obj" + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -8662,7 +10166,7 @@ exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -8672,12 +10176,12 @@ # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -8694,16 +10198,14 @@ output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -8717,11 +10219,11 @@ *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" ;; esac fi @@ -8757,7 +10259,7 @@ *) func_append new_libs " $deplib" ;; esac done - compile_deplibs="$new_libs" + compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" @@ -8781,7 +10283,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8804,7 +10306,7 @@ fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; @@ -8821,10 +10323,10 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -8832,7 +10334,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8857,45 +10359,43 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no + wrappers_required=false ;; *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 @@ -8908,12 +10408,12 @@ fi # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -8943,9 +10443,9 @@ fi fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. @@ -8962,27 +10462,28 @@ exit $EXIT_SUCCESS fi - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -9039,8 +10540,8 @@ func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -9061,7 +10562,7 @@ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -9084,25 +10585,27 @@ # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs @@ -9110,13 +10613,13 @@ fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -9137,7 +10640,7 @@ : else echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs @@ -9146,7 +10649,7 @@ for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -9215,18 +10718,18 @@ else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -9243,7 +10746,7 @@ case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -9258,31 +10761,31 @@ fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" + name=$func_basename_result func_resolve_sysroot "$deplib" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) @@ -9298,23 +10801,23 @@ *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -9324,34 +10827,34 @@ # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin @@ -9367,10 +10870,9 @@ case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then + if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname + tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -9379,7 +10881,7 @@ esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -9393,7 +10895,7 @@ # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -9419,7 +10921,7 @@ # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -9434,27 +10936,29 @@ exit $EXIT_SUCCESS } -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; + -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac @@ -9467,18 +10971,18 @@ for file in $files; do func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - odir="$dir/$objdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then + if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; @@ -9493,11 +10997,11 @@ elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -9511,7 +11015,7 @@ done test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$opt_mode" in + case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; @@ -9522,12 +11026,12 @@ uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -9543,21 +11047,19 @@ func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then + if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then + if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$opt_mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -9584,12 +11086,12 @@ # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -9598,7 +11100,7 @@ func_show_eval "$RM $rmfiles" 'exit_status=1' done - # Try to remove the ${objdir}s in the directories where we deleted files + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -9608,16 +11110,17 @@ exit $exit_status } -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi test -z "$opt_mode" && { - help="$generic_help" + help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -9628,7 +11131,7 @@ # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -9651,5 +11154,3 @@ # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff -Nru intel-gpu-tools-1.13/ChangeLog intel-gpu-tools-1.14/ChangeLog --- intel-gpu-tools-1.13/ChangeLog 2015-12-02 16:48:03.000000000 +0000 +++ intel-gpu-tools-1.14/ChangeLog 2016-03-11 12:55:27.000000000 +0000 @@ -1,27573 +1,3 @@ -commit 2db78a4995a8ee298ae0cd68879baf80407a0e5e -Author: Thomas Wood -Date: Wed Dec 2 16:46:39 2015 +0000 - - Update version to 1.13 and add the release date - - Signed-off-by: Thomas Wood - -commit 17c6b5caf37bccd4a38d7d310cb53ea23a23b5f8 -Author: Thomas Wood -Date: Wed Dec 2 16:45:42 2015 +0000 - - NEWS: Updates - - Signed-off-by: Thomas Wood - -commit 498fb6205e62c34495ea5ef09a9c156b9cf61f2f -Author: Thomas Wood -Date: Wed Dec 2 16:35:50 2015 +0000 - - docs: remove references to tests/NAMING-CONVENTION - - The tests/NAMING-CONVENTION file has been removed and its contents is - now included in the API documentation. - - Reported-by: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit 97bf3f9a55dbe20614479cbce63c0966f8e25df1 -Author: Thomas Wood -Date: Wed Dec 2 10:49:03 2015 +0000 - - tests/core_setmaster_vs_auth: add test description macro - - Signed-off-by: Thomas Wood - -commit 66dc90ed658fe345d98ef0f287df383c3b2f4a2c -Author: Thomas Wood -Date: Wed Dec 2 10:46:33 2015 +0000 - - tests/core_setmaster_vs_auth: use igt_simple_main - - This test has no subtests, so should use igt_simple_main. - - Signed-off-by: Thomas Wood - -commit b3ff11232681ab615794c293de8abfebb8921ad7 -Author: Thomas Wood -Date: Tue Dec 1 15:12:07 2015 +0000 - - docs: exclude gpgpu_fill.h - - gpgpu_fill.h is only used internally by the library. - - Signed-off-by: Thomas Wood - -commit 0874c770eb016c26c148323b7b7b3a7c2d829441 -Author: Thomas Wood -Date: Tue Dec 1 15:07:10 2015 +0000 - - docs: document intel_pipe_crc_source enum values - - Signed-off-by: Thomas Wood - -commit 683316cb886dced1674876f21c782836fe40f9ff -Author: Thomas Wood -Date: Mon Nov 30 16:36:16 2015 +0000 - - docs: add missing documentation for drm open functions - - Signed-off-by: Thomas Wood - -commit 0394844a478e500740389e2cbbf2fdee0c4054c7 -Author: Thomas Wood -Date: Mon Nov 30 15:35:46 2015 +0000 - - tests/gem_request_retire: add test description - - Cc: Tvrtko Ursulin - Signed-off-by: Thomas Wood - -commit 72b6bec370451ae722ddc1c5457f4cfa6a55b188 -Author: Jani Nikula -Date: Wed Nov 25 10:50:31 2015 +0200 - - tests: fix ddx_intel_after_fbdev to use intel_reg - - intel_reg_dumper is gone, replaced by 'intel_reg dump'. - - Signed-off-by: Jani Nikula - -commit 4fe60a6e1c1f2a8853d57c19c6c16be408d1cd19 -Author: Jani Nikula -Date: Wed Nov 25 10:46:40 2015 +0200 - - tools: fix intel_gpu_abrt to use intel_reg - - intel_reg_dumper is gone, replaced by 'intel_reg dump'. - - Signed-off-by: Jani Nikula - -commit 96d3658d0be9479168586f01101a493aa030c9d4 -Author: Jani Nikula -Date: Wed Nov 25 10:25:44 2015 +0200 - - scripts: remove display_debug.sh as obsolete - - The script uses the obsoleted and removed intel_reg_read tool. Rather - than mechanically fix this to use intel_reg, observe that the hardcoded - register offsets are platform specific. A quick glance suggests they are - for PCH split platforms with FDI, and as such useful only on a minority - of platforms. Remove the script as obsolete. - - If the need for such a script arises, it should be based around using - 'intel_reg dump' with display-only register spec files. - - Signed-off-by: Jani Nikula - -commit 5830a7a04be49516e947eaefb47c2d214da9d2ab -Author: Daniel Vetter -Date: Tue Dec 1 18:33:17 2015 +0100 - - tests: Add core_setmaster_vs_auth.c - - Embarrasingly I noticed that I need to git add the file when resolving - the conflict and manually applying my patch. But then I added the - wrong file ... Reported by Thomas Wood. - - Signed-off-by: Daniel Vetter - -commit 80546d45762a7b1e20885c557a08a41ef6d7fc10 -Author: Daniel Vetter -Date: Tue Dec 1 17:37:40 2015 +0100 - - tests/pm_rpm: Don't compare edid blob IDs - - The kernel is free to allocate blob ids however it wants to. And also - to reallocate them whenever it sees fit. The only thing we are allowed - to compare is the length and the actual date. - - Removing this bogus check makes drm-resources-equal on my snb. - - Cc: Paulo Zanoni - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90546 - Reviewed-by: Paulo Zanoni - Signed-off-by: Daniel Vetter - -commit 8133295d02730dfc800d974e673dcb4b07460911 -Author: Daniel Vetter -Date: Tue Dec 1 08:44:00 2015 +0100 - - tests: add core_setmaster_vs_auth - - Tests that master state isn't leaked to new masters by checking - that auth magics for the old master don't work any more. - - Based upon a simple test program provided by Thomas. - - v2: Use comment Thomas suggested on intel-gfx. - - Cc: Thomas Hellstrom - Signed-off-by: Daniel Vetter - -commit 92e83cb379cd36c72ce1a254a1b80320b21a3ae1 -Author: Daniel Vetter -Date: Mon Nov 30 16:03:46 2015 +0100 - - tests: Rename drm_auth to core_auth - - It really is a core drm testcase and not a libdrm testcase. While at it - also make it generic, since it is. - - Cc: Daniel Stone - Acked-by: Daniel Stone - Signed-off-by: Daniel Vetter - -commit 3b75839b795c3e206316f4423b1f9ae01c91d64c -Author: Chris Wilson -Date: Tue Dec 1 13:33:13 2015 +0000 - - lib: gem_set_caching() use drmIoctl() rather than ioctl() - - gem_set_caching() tries to be clever and detect when the ioctl isn't - supported (thereby skipping the test). However, it forget that we may be - acting on active objects and be subject to the usual EAGAIN/EINTR - errors. We can use the drmIoctl() to wrap the raw ioctl() in order to - get the automatic restart on the interrupted syscall. - - Signed-off-by: Chris Wilson - -commit 4cfcea4056ab78a8097b41e26748c940936cd411 -Author: Marius Vlad -Date: Fri Nov 27 20:08:33 2015 +0200 - - tests/pm_rpm tests for set_caching and set_tiling ioctl(s) - - v4: re-bind the gem objects each time before calling - disable_all_screens_and_wait(). - - v3: Use smaller sizes when allocating gem objects for caching tests. - - v2: use mmap to gtt instead off cpu and various style-changes. - - Signed-off-by: Marius Vlad - Reviewed-by: Imre Deak - Signed-off-by: Imre Deak - -commit d2a17f4bc4d466ac19fd00ae7fe7998d6626460e -Author: Paulo Zanoni -Date: Fri Oct 30 18:05:58 2015 -0200 - - kms_frontbuffer_tracking: add tilingchange subtest - - During the review of a recent FBC patch, Ville pointed a problem that - happens when we use the page flip IOCTL to switch between buffers that - have different tiling formats. This test should catch the problem - introduced by that patch - which was not merged, by the way, so the - test should be passing. - - Signed-off-by: Paulo Zanoni - -commit 98bb8428b2939311015b45ca59d7d9c65949c9bf -Author: Paulo Zanoni -Date: Thu Nov 5 17:54:31 2015 -0200 - - kms_frontbuffer_tracking: assert the stride changes at stridechange() - - We use igt_create_fb(), which decides the stride by itself: there's no - guarantee that making a buffer 512 pixels bigger is going to make its - stride change. - - I had a fix for this problem that was supposed to be applied before - this patch, but due to a rework request I'm changing the order of the - patches, so we should expect to hit this assertion for now. At least - the root cause of the problem is clear now. - - v2: Update the commit message due to the patch order changing. - - Signed-off-by: Paulo Zanoni - -commit f23ea58f1fbb7075d08bdbd85523d12270ce46a2 -Author: Paulo Zanoni -Date: Fri Oct 30 17:56:29 2015 -0200 - - kms_frontbuffer_tracking: expand badstride and stridechange - - Make those subtests try to change the stride using multiple APIs so we - can catch errors that affect full modesets, fast modesets and page - flips. - - Signed-off-by: Paulo Zanoni - -commit 340599c986ac84b3ed4e24188eca1b599caeb238 -Author: Paulo Zanoni -Date: Fri Oct 30 18:55:52 2015 -0200 - - kms_frontbuffer_tracking: move flip_type to struct test_mode - - Handle it just like we handle t->format. IMHO, it's better. - - Signed-off-by: Paulo Zanoni - -commit b4c58857e5059cd4df5ce6298fd1897ea859ba6c -Author: Paulo Zanoni -Date: Fri Oct 30 17:37:10 2015 -0200 - - kms_frontbuffer_tracking: do page flips using the planes API - - Add a new FLIP_PLANES enum so we can do "page flips" using it too. The - goal is to exercise the fast modeset paths on the Kernel. - - Signed-off-by: Paulo Zanoni - -commit d63413771fc9bc77e89dacecbc1bae6192444000 -Author: Paulo Zanoni -Date: Thu Nov 5 16:39:00 2015 -0200 - - lib/igt_fb: also pass the stride to igt_create_fb_with_bo_size() - - If the caller is going to specify a custom size, it's likely that he - will also specify a custom stride. The automatic stride picked by - create_bo_for_fb() is too huge for tiled buffers, so if the caller - wants smaller buffers, then he'll need a smaller stride too, otherwise - the Kernel will reject the addfb IOCTL due to stride * height being - bigger than the size. - - I want to make tests/kms_frontbuffer_tracking use - igt_create_fb_with_bo_size() so I can provide smaller buffers that - will fit into the CFB. I'm also planning to make all frontbuffers with - the same width/height/format have the same stride and size regardless - of tiling method so I can exercise specific code paths. - - Signed-off-by: Paulo Zanoni - -commit 1c68a71acc1f9ddd98bc1bd6ff1da700442c21aa -Author: Paulo Zanoni -Date: Thu Nov 5 16:24:06 2015 -0200 - - lib/igt_fb: fix open-coded ALIGN() - - Maybe this will help someone's life in the future. - - Signed-off-by: Paulo Zanoni - -commit cb7dd5d401acceb62197eddf3cc6f0860c49faa3 -Author: Paulo Zanoni -Date: Thu Nov 5 16:18:55 2015 -0200 - - lib/igt_fb: fix igt_create_fb_with_bo_size() documentation - - If we pass zero as the bo_size we won't get the minimum needed size, - we'll just get a size that works. The size is decided by - create_bo_for_fb(). The selected size is really not minimal for tiled - objects. - - We'll implement support for minimum size later. - - Signed-off-by: Paulo Zanoni - -commit 5cfc4e7967f76cdc92364014c8bf896ab6afa6bc -Author: Paulo Zanoni -Date: Thu Nov 5 10:42:49 2015 -0200 - - lib/igt_fb: fix fb->size when provided by the user - - I want to have a little more control over the size of the buffers in - kms_frontbuffer_tracking, so I decided to start calling - igt_create_fb_with_bo_size() instead of igt_create_fb(). The problem - is that create_bo_for_fb() returns its own calculated size as size_ret - instead of the actual used size. - - So we fix this by returning the actual size, the one used in - gem_create instead of the calculated size that's not used anywhere. - - Signed-off-by: Paulo Zanoni - -commit d44100ed233db46085b626c1d493856ca1900eab -Author: Chris Wilson -Date: Fri Nov 27 09:56:09 2015 +0000 - - benchmarks/gem_exec_ctx: Measure switching between fds - - Switching between fds also involves a context switch, include it amongst - the measurements. - - Signed-off-by: Chris Wilson - -commit 26507f3e21fe14b0fe5b3daec73c26f37bb2189a -Author: Chris Wilson -Date: Fri Nov 20 16:38:52 2015 +0000 - - igt/gem_cs_prefetch: Convert to intel_require_memory() - - Replace the open-coded memory check with intel_require_memory. - - Signed-off-by: Chris Wilson - -commit e10ba6b51c028ce945605d1f720c598c93e8ad8f -Author: Chris Wilson -Date: Wed Nov 25 14:19:15 2015 +0000 - - igt/drm_read: Clear O_NONBLOCK between tests - - Ensure that O_NONBLOCK isn't accidentally set when we want a nonblocking - file descroptor. - - Signed-off-by: Chris Wilson - -commit 32329b2e7dd9b6b69a397da0356bd1ebc6a45901 -Author: Mika Kuoppala -Date: Wed Nov 25 15:00:50 2015 +0200 - - tests/drm_import_export: Always loop with mutex held - - We assume that lock is held on start of the loop scope. - Some paths continuing inside loop didn't adhere to this - assumption, causing segfault on unlocking an already - unlocked mutex. Fix this by re-aquiring lock always. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93013 - Cc: Michał Winiarski - Cc: Thomas Wood - Signed-off-by: Mika Kuoppala - Reviewed-by: Michał Winiarski - -commit 3b1a55874d151c8044b0168de4b6d9351ced69d4 -Author: Chris Wilson -Date: Wed Nov 25 10:46:53 2015 +0000 - - igt/drm_read: Check handling of pagefault on destination buffer - - In theory, this should force i915_gem_fault() when we first use the - buffer (and not at mmap time) and so prevent a __copy_to_user_inatomic() - from writting to the buffer. - - Signed-off-by: Chris Wilson - -commit d84e62478bf2c34d610467a98826d64c321b839b -Author: Joonas Lahtinen -Date: Fri Nov 20 13:57:11 2015 +0200 - - lib/igt_core: Prefer CLOCK_MONOTONIC_RAW - - CLOCK_MONOTONIC_RAW is not affected by NTP, so it should be THE clock - used for timing execution of tests. - - When fetching either the starting or ending time of a test, show the - time as -1.000s. - - v6: - - Whitespace corrections (Chris) - - v5: - - Do not use C99 style comments (Chris) - - v4: - - Introduce time_valid macro (Chris) - - Reduce amount of boilerplate code for calculating elapsed time - - v3: - - Do not exit directly from handler (Chris) - - Show elapsed time as -1 if it is not calculable - - v2: - - Cache the used clock (Chris) - - Do not change the clock during execution - - Spit out and error if monotonic time can not be read - - Cc: Thomas Wood - Reviewed-by: Chris Wilson - Signed-off-by: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit 4bc68b1baa8ad288a695eedf4e1638e07e5ab9a1 -Author: Wayne Boyer -Date: Fri Nov 13 13:40:24 2015 -0800 - - lib/kbl: Add Kabylake GT4 PCI IDs - - Add the Kabylake GT4 PCI IDs as defined in this kernel patch. - - commit 8b10c0cf21ec84618d4bf02c73c0543500ece68d - Author: Deepak S - Date: Wed Oct 28 12:21:12 2015 -0700 - drm/i915/kbl: Add Kabylake GT4 PCI ID - - Signed-off-by: Wayne Boyer - Signed-off-by: Thomas Wood - -commit 526a63ec6bfa4dfedb9ae27284b604ec37132a16 -Author: Wayne Boyer -Date: Fri Nov 13 13:40:23 2015 -0800 - - lib/kbl: move KBL check from IS_SKYLAKE() to IS_GEN9() - - Remove the KBL check from IS_SKYLAKE() following the kernel definition. - Then, add the KBL check to IS_GEN9(). - - The idea is to avoid confusion. On the kernel side, the mix of SKY - and KBL was nacked so the platforms are split. - - Signed-off-by: Wayne Boyer - Signed-off-by: Thomas Wood - -commit b088e305750c9df7b5d3a16f01fd2a7dba22177f -Author: Matt Turner -Date: Fri Nov 13 16:45:13 2015 -0800 - - tools/aubdump: Link with -ldl. - - aubdump.c uses dlsym(), so it needs to link with -ldl. Otherwise: - - /bin/sh: symbol lookup error: /usr/lib64/intel_aubdump.so: undefined symbol: dlsym - - Signed-off-by: Matt Turner - Signed-off-by: Thomas Wood - -commit dcdf21beb8fb40c4061e7dbcf0a021c6513d5090 -Author: Tvrtko Ursulin -Date: Thu Nov 19 15:02:15 2015 +0000 - - igt/gem_request_retire: Provoke context destruction with active VMAs - - Test designed to trigger the - WARN_ON(!list_empty(&ppgtt->base.active_list)) - in i915_gem_context_clean. - - v2: - Simplify execbuf building and the test itself. Cleanup code. (Chris Wilson) - - v3: - Removed asserts done by the helpers already. (Chris Wilson) - - Signed-off-by: Tvrtko Ursulin - Cc: Chris Wilson - Cc: Daniel Vetter - -commit b68a6428db3d1a31d7662c03eb86a7b4cd4e37be -Author: Chris Wilson -Date: Sun Nov 22 20:50:31 2015 +0000 - - benchmarks: Add a set-domain benchmark - - Benchmark the overhead of changing from GTT to CPU domains and vice - versa. Effectively this measures the cost of a clflush, and how well the - driver can avoid them. - - Signed-off-by: Chris Wilson - -commit 59f076a0898ce4c226bcc116d429f685009b268c -Author: Chris Wilson -Date: Fri Nov 20 11:23:37 2015 +0000 - - drmtest: Use standard gem_execbuf() calls in gem_quiescent_gpu() - - Now that we have better ioctl wrappers, let's make us of them. The - advantage should be in improved error reporting in case - gem_quiescent_gpu() ever fails. - - Signed-off-by: Chris Wilson - -commit b718f50f92cf7ed825c90ff54940cb155d110a2c -Author: Mika Kuoppala -Date: Fri Nov 6 13:52:53 2015 +0200 - - lib: Add Skylake Intel Graphics GT4 PCI IDs - - Add Skylake Intel Graphics GT4 PCI IDs. - - Signed-off-by: Mika Kuoppala - Reviewed-by: Damien Lespiau - -commit 8a8717eee305b2a9f58b9f5c31adc2a8847361bf -Author: Chris Wilson -Date: Wed Nov 18 12:49:24 2015 +0000 - - overlay: Show power consumption without i915-pmu - - The power metter was not showing up due to an erroneous check for a - failure to open the i915 perf interface. - - Reported-by: Marius Vlad - Signed-off-by: Chris Wilson - -commit 938b9306be240ada0e592f2bf59f428c6e0e5717 -Author: Vivek Kasireddy -Date: Wed Nov 4 16:10:15 2015 -0800 - - igt/kms_rotation_crc: Add a new subtest to exhaustively test for fence leaks (v3) - - In this subtest, as a first step, MAX_FENCES+1 number of framebuffers are - created backed up by objects that have multiple GGTT views (normal and - rotated). Next, we have the i915 driver instantiate a normal view followed - by a rotated view. We continue doing the above MAX_FENCES + 1 times. - - v2: - - Add a igt_require() to check if there is enough GTT space left for - MAX_FENCES+1 framebuffers. (Tvrtko) - - Make data2 local to test_plane_rotation_exhaust_fences(). (Tvrtko) - - If there is a failure, deallocate all the previously allocated - framebuffers before asserting. - - v3: Close the gem handle if set_tiling or addfb fails. (Tvrtko) - - Cc: Tvrtko Ursulin - Signed-off-by: Vivek Kasireddy - Reviewed-by: Tvrtko Ursulin - Signed-off-by: Tvrtko Ursulin - -commit 92a803ffb0c8a3e68dc8bac207c34a4ed78b724f -Author: Ville Syrjälä -Date: Sun Nov 15 15:40:02 2015 +0200 - - tests/kms_3d: Use XRGB8888 instead of ARGB8888 - - We don't allow ARGB8888 anymore on primary planes on most platforms, - so use XRGB8888 instead as the format. - - Signed-off-by: Ville Syrjälä - -commit cba86e980f60b1e15f6a59c8fa60fa54288361da -Author: Ville Syrjälä -Date: Sun Nov 15 14:24:46 2015 +0200 - - tests/kms_3d: Use igt_assert_eq() - - Would be nice to see how many stereo modes we managed to extract from - the EDID if it doesn't match the expected 13. So use igt_assert_eq() - which prints the real count on failure. - - Signed-off-by: Ville Syrjälä - -commit e42936d86b52c6804da41755df7155cafded5eb2 -Author: Ville Syrjälä -Date: Wed Nov 11 18:19:06 2015 +0200 - - tests/kms_addfb_basic: Add clobbered-modifier subtest - - Make sure the kernel doesn't clobber the modifiers when the user didn't - pass any. - - Signed-off-by: Ville Syrjälä - -commit 4d8983bcdff43e95897031d7e1fef24170df5235 -Author: Ville Syrjälä -Date: Wed Nov 11 20:25:11 2015 +0200 - - lib/kms: Pass fb_id=0 to setcrtc in kmstest_unset_all_crtcs() - - The setcrtc ioctl ignores the fb_id when there's no mode specified. - So passing -1 doens't make much sense. When there is a more, -1 means - to preserve the current fb. - - Signed-off-by: Ville Syrjälä - -commit 29cd8a092e09bc72535d83d55b5800c3aa21440a -Author: Ville Syrjälä -Date: Wed Nov 11 15:07:00 2015 +0200 - - tests/kms_flip: Add a note that the test was skipped when modeset fails - - Signed-off-by: Ville Syrjälä - -commit a09880d1c38343148e824b6a54db3046fb32986d -Author: Ville Syrjälä -Date: Tue Nov 10 19:22:11 2015 +0200 - - tests/kms_flip: Modeset pipes in reverse order - - To make more multi-pipe tests run on IVB, do the modesets in the reverse - order (ie. pipe C first, pipe A last). This way pipe B can't reserve the - 2 shared FDI lanes before pipe C is set up. - - Signed-off-by: Ville Syrjälä - -commit 5bb87dc0e563fe9fd54dde7b38732d28c3d2fa2e -Author: Ville Syrjälä -Date: Tue Nov 10 19:31:33 2015 +0200 - - tests/kms_flip: Disable all pipes before each test - - Currently kms_flip leaks the state of the pipes from one subtest to the - next. Meaning a single pipe test can actually have two or more pipes - actually up and running, and similarly a two pipe test can have three - pipes running. - - This is particularly nasty on IVB since one of the pipes still running - but not actually part of the test maybe have reserved the shared FDI - lanes, thus preventing one of the pipes taking part in the test from - being enabled. - - To avoid such problems explicitly disable all pipes before each - subtests. - - v2: Use kmstest_unset_all_crtcs() (Paulo) - - Signed-off-by: Ville Syrjälä - -commit 2f894820ac216c9aef8db3008acb2492cae3bce1 -Author: Ville Syrjälä -Date: Tue Nov 10 19:07:20 2015 +0200 - - tests/kms_flip: Use human readable pipe and connector names - - Print the pipes and connectors in a human readable form instead of using - the integer IDs. - - Signed-off-by: Ville Syrjälä - -commit c8beadb811bdc2b9c21f95144852f3e55867b546 -Author: Derek Morton -Date: Wed Nov 11 14:46:58 2015 +0000 - - tests/gem_exec_nop: Improved test run time - - Reduced the Sleep period to 200mS and reduced the repetition count to 7 - to decrease the test run time significantly. - - v2: Changed uS to us - v3: removed the output formatting change as the issue will be addressed - in a seperate patch from Thomas Wood. - v4: mS -> ms - - Signed-off-by: Derek Morton - Signed-off-by: Thomas Wood - -commit 464424dcee9b22cf66bd33f5be5e93397aa15e24 -Author: Maarten Lankhorst -Date: Thu Nov 12 13:33:42 2015 +0100 - - tests/kms_setmode: Handle MST correctly. - - There is a MST encoder for each crtc, and each MST connector - will be connected to the encoder bound to that crtc. - - This breaks the kms_setmode assertion that is only 1 encoder per - connector, so make an exception to that rule for displayport. - - Signed-off-by: Maarten Lankhorst - -commit 4c14aa18c18f578825253769e97901bc963b40d2 -Author: Chris Wilson -Date: Thu Nov 12 10:50:17 2015 +0000 - - benchmarks/gem_blt: Fixup a couple of non-llc foibles - - When extending the batch for multiple copies, we need to remember to - flag it as being in the CPU write domain so that the new values get - flushed out to main memory before execution. We also have to be careful - not to specify NO_RELOC for the extended batch as the execobjects will - have been updated but we write the wrong presumed offsets. Subsequent - iterations will be correct and we can tell the kernel then to skip the - relocations entirely. - - Signed-off-by: Chris Wilson - -commit 143a2160583a3223ebfc1fd1376a23cec1b81484 -Author: Chris Wilson -Date: Thu Nov 12 09:29:07 2015 +0000 - - igt/gem_mmap_gtt: Require SET_TILING to work before doing large tiled tests - - Older generations are more limited in how much they can fence, and the - limits is enforced in the SET_TILING ioctl. So if it reports an EINVAL, - we cannot perform the tiled test and may just skip it instead. - - Signed-off-by: Chris Wilson - -commit 0c26652911986e2b1f666f662459a9e240428dc6 -Author: Chris Wilson -Date: Wed Nov 11 16:37:16 2015 +0000 - - igt/gem_concurrent_all: Add testcases that split the copying across rings - - More inter-ring concurrency tests. - - Signed-off-by: Chris Wilson - -commit 790f1f804b062c47fb1bf686bfa3b0f2e69ee947 -Author: Thomas Wood -Date: Mon Nov 9 17:17:24 2015 +0000 - - lib: add a environment variable to control output - - Disable output of terminal control characters and progress meters when - IGT_PLAIN_OUTPUT is set in the environment. - - Cc: Derek Morton - Signed-off-by: Thomas Wood - -commit fca7b1b5fd2d61dfec6a612f1a2798270d1f8a4e -Author: Thomas Wood -Date: Thu Oct 29 17:01:17 2015 +0000 - - lib: highlight subtest results on terminals - - Make subtest results easier to identify by making them bold when the output - is a terminal. - - Signed-off-by: Thomas Wood - -commit 3dce57a699e1481bbe7b2e4c52a7643654e2da19 -Author: Thomas Wood -Date: Tue Nov 10 14:16:00 2015 +0000 - - tests/kms_force_connector: reset connectors and edid on exit - - Signed-off-by: Thomas Wood - -commit a8f63574307b0914214256a04939799bde2cffb9 -Author: Thomas Wood -Date: Tue Nov 3 11:02:23 2015 +0000 - - tests/kms_force_connector: clear forced edid in reset - - Signed-off-by: Thomas Wood - -commit 5652985a54849176a6b07a481b61fc72df3a6b09 -Author: Thomas Wood -Date: Thu Oct 29 16:38:57 2015 +0000 - - tests/kms_force_connector: use comparison macros - - Use the comparison macros to make debug output clearer. - - v2: fix incorrect comparison - - Signed-off-by: Thomas Wood - -commit d01433900906017f16034b60c710cae9581e7755 -Author: Thomas Wood -Date: Mon Nov 2 17:04:20 2015 +0000 - - tests/kms_force_connector: add an option to reset connector force states - - v2: add missing igt_exit call and fix reset_connectors definition - - Signed-off-by: Thomas Wood - -commit 01e1fca5828004954cdb1757409edd99d4b790c3 -Author: Thomas Wood -Date: Mon Nov 2 15:50:27 2015 +0000 - - tests/kms_force_connector: skip if the required connector is connected - - Signed-off-by: Thomas Wood - -commit 2e5a43d29613fcb9e780b9c804d86b578bc8d56b -Author: Thomas Wood -Date: Mon Nov 2 15:48:52 2015 +0000 - - lib: add documentation for igt_display_init/fini - - Signed-off-by: Thomas Wood - -commit 5570060d331c0942405503a4398864241c1c55ef -Author: Thomas Wood -Date: Mon Nov 2 15:39:12 2015 +0000 - - tests/kms_force_connector: free the display struct when no longer needed - - Signed-off-by: Thomas Wood - -commit e9ed1a37fcbb6c3f08bc714cdf5851202f532125 -Author: Thomas Wood -Date: Mon Nov 2 10:29:23 2015 +0000 - - tests/kms_fbc_crc: ensure context is initialized correctly - - Initialization was included in commit a976d7e (tests/kms_fbc_crc: - refactor context handling code), but won't be executed since it is - declared before the first label within a switch statement. - - kms_fbc_crc.c:178:2: warning: ‘context’ may be used uninitialized in this function [-Wmaybe-uninitialized] - rendercopy(batch, context, - ^ - kms_fbc_crc.c:271:22: note: ‘context’ was declared here - drm_intel_context *context = NULL; - - ^ - Cc: Paulo Zanoni - Signed-off-by: Thomas Wood - Reviewed-by: Paulo Zanoni - -commit 0986b432f874db0f263958fa07feb1a83ba1bae4 -Author: Thomas Wood -Date: Mon Nov 2 10:20:15 2015 +0000 - - lib: add PIPE_ANY to the pipe enum - - This avoids compiler warnings about invalid enum values. - - Signed-off-by: Thomas Wood - -commit 2643793255084362e02bb1ca2ab5031de2d5dc59 -Author: Thomas Wood -Date: Mon Nov 2 10:18:27 2015 +0000 - - Fix comparison of unsigned integers - - Signed-off-by: Thomas Wood - -commit 52a393a3116f91157bc62d735db297d027d8724b -Author: Thomas Wood -Date: Mon Nov 2 10:16:16 2015 +0000 - - tests: remove duplicate struct member initializers - - Signed-off-by: Thomas Wood - -commit 24b7bbc7267a58d44173682da64d4dd9d32134ec -Author: Thomas Wood -Date: Mon Nov 2 10:02:51 2015 +0000 - - tests: remove unnecessary igt_exit calls - - Signed-off-by: Thomas Wood - -commit 36b8143c224b47f743d8881514bb348b9ee1d102 -Author: Thomas Wood -Date: Mon Nov 2 10:02:08 2015 +0000 - - Add missing noreturn attribute to various functions - - Signed-off-by: Thomas Wood - -commit 3bc3ab27eac6eace4c90c8da92b4e7570110263b -Author: Chris Wilson -Date: Tue Nov 10 14:04:17 2015 +0000 - - benchmarks: Add README - - Add a README to introduce the ezbench.sh benchmark runner. - - Signed-off-by: Chris Wilson - -commit 5cabb8c543d42c2473d11c3e6cb65bf5746b4cae -Author: Chris Wilson -Date: Tue Nov 10 13:40:40 2015 +0000 - - benchmarks/gem_blt: Report peak throughput - - Report the highest throughput measured from a large set of runs to - improve sensitivity. - - Signed-off-by: Chris Wilson - -commit 3b0e3360811aa39bb6b5368bbcbfa62ffdc3d266 -Author: Chris Wilson -Date: Mon Nov 9 20:37:07 2015 +0000 - - lib: Add missing #include - - A forgotten fixup to allow instdone.h to compile. - - Signed-off-by: Chris Wilson - -commit 70ee5084213c27733f723a7d3f597764bba38dcf -Author: Chris Wilson -Date: Mon Nov 9 08:58:59 2015 +0000 - - lib: Make instdone initialisation fail gracefully - - Just report that we don't recognise the chipset rather than explode. - - Signed-off-by: Chris Wilson - -commit 134e32378a242e846a6e553ad80317a4a56b13b9 -Author: Ben Widawsky -Date: Thu Nov 5 16:56:11 2015 -0800 - - igt/intel_aubdump: Use the right ring - - This prevents the simulator from barfing when it sees commands from another - ring. I've been using this locally for a very long time. - - Signed-off-by: Ben Widawsky - Reviewed-by: Kristian Høgsberg - -commit bc37e0297c38348cd4e47b1dacc376bd94725ec2 -Author: Daniel Stone -Date: Wed Jul 8 13:23:27 2015 +0000 - - kms_atomic: Add basic atomic modesetting tests - - Add tests for KMS atomic modesetting, to exercise the basic interface - and test failure/corner cases. Should ensure coherency between the - legacy and atomic interfaces. - - v2: New patch. - v3: Disable connector checking for now, as it was causing GPU hangs on - newer kernels. - v4: Rebase. - v5: Use do_ioctl or do_ioctl_err consistently. Use igt_assert_*() - helper macros rather than igt_assert() directly. - Move assertions into helper/check functions. Define atomic commit - helper. - v6: Use do_ioctl_err, and define macros to move errors to - actual callsite, rather than helper functions. - - Co-authored-by: Micah Fedke - Signed-off-by: Daniel Stone - -commit b7a555e997ec43ed005f6b22707dd698e0147f64 -Author: Daniel Stone -Date: Tue Oct 20 22:36:13 2015 +0100 - - tests/core_prop_blob: Add multiple blobs per connection - - This should hit the bug fixed in: - commit 8731b269f01e16193390c7276e70530366b8d626 - Author: Maneet Singh - Date: Thu Oct 8 10:10:24 2015 -0400 - - drm: Correct arguments to list_tail_add in create blob ioctl - - Arguments passed to list_add_tail were reversed resulting in deletion - of old blob property everytime the new one is added. - - Fixes - - commit e2f5d2ea479b9b2619965d43db70939589afe43a - Author: Daniel Stone - Date: Fri May 22 13:34:51 2015 +0100 - - drm/mode: Add user blob-creation ioctl - - Signed-off-by: Maneet Singh - [seanpaul tweaked commit subject a little] - Signed-off-by: Sean Paul - Cc: stable@kernel.org # v4.2 - Reviewed-by: Daniel Stone - Reviewed-by: Jani Nikula - Signed-off-by: Dave Airlie - - which was introduced with the initial blob support in: - commit e2f5d2ea479b9b2619965d43db70939589afe43a - Author: Daniel Stone - Date: Fri May 22 13:34:51 2015 +0100 - - drm/mode: Add user blob-creation ioctl - - Add an ioctl which allows users to create blob properties from supplied - data. Currently this only supports modes, creating a drm_display_mode from - the userspace drm_mode_modeinfo. - - v2: Removed size/type checks. - Rebased on new patches to allow error propagation from create_blob, - as well as avoiding double-allocation. - - Signed-off-by: Daniel Stone - Reviewed-by: Maarten Lankhorst - Tested-by: Sean Paul - Signed-off-by: Daniel Vetter - - Signed-off-by: Daniel Stone - -commit de7ccdd083579c82a1be0c028acf38617fb8c2ca -Author: Daniel Stone -Date: Thu Oct 1 14:16:48 2015 +0100 - - tests: Run igt.cocci - - Signed-off-by: Daniel Stone - -commit f735015ed36f1e188d1107fd6b0969801df17c86 -Author: Daniel Stone -Date: Wed Oct 7 17:16:44 2015 +0100 - - lib/tests: Add igt_assert_*() self-tests - - Make sure our igt_assert variants are doing something that looks vaguely - like the right thing. - - Signed-off-by: Daniel Stone - -commit f40a984413a9c06e5d382b248ba79ac7c17d2531 -Author: Chris Wilson -Date: Tue Nov 3 16:43:48 2015 +0000 - - igt/gem_userptr_blits: Correct the number of objects required - - Since we allocate 2 times count number of objects, that is the number of - objects we should be using when checking for sufficient RAM to use for - the test. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=92799 - Signed-off-by: Chris Wilson - -commit ce65232cf5039798045767c65f2110f3b2a8ffd0 -Author: Chris Wilson -Date: Fri Oct 30 15:50:12 2015 +0000 - - benchmarks/gem_wait: Remove pthread_cancel() - - Apparently the pthread shim on Android doesn't have pthread cancellation, - so use the plain old volatile to terminate the CPU hogs. - - Signed-off-by: Chris Wilson - -commit 9024a72d29150f05e2ad62aa088d19a662bbf815 -Author: Chris Wilson -Date: Fri Oct 30 15:01:33 2015 +0000 - - benchmark/gem_wait: poc for benchmarking i915_wait_request overhead - - One scenario under recent discussion is that of having a thundering herd - in i915_wait_request - where the overhead of waking up every waiter for - every batchbuffer was significantly impacting customer throughput. This - benchmark tries to replicate something to that effect by having a large - number of consumers generating a busy load (a large copy followed by - lots of small copies to generate lots of interrupts) and tries to wait - upon all the consumers concurrenctly (to reproduce the thundering herd - effect). To measure the overhead, we have a bunch of cpu hogs - less - kernel overhead in waiting should allow more CPU throughput. - - Signed-off-by: Chris Wilson - -commit fe548fab0a63f95b729f0df4137753212e75375e -Author: Vivek Kasireddy -Date: Thu Oct 22 18:34:03 2015 -0700 - - igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier (v3) - - The main goal of this subtest is to trigger the following warning in - the function i915_gem_object_get_fence(): - if (WARN_ON(!obj->map_and_fenceable)) - - To trigger this warning, the subtest first creates a Y-tiled object and - an associated framebuffer with the Y-fb modifier. Furthermore, to - prevent the map_and_fenceable from being set, we make sure that - the object does not have a normal VMA by refraining from rendering to the - object and by setting the rotation property upfront before calling commit. - - v2: Do not call paint_squares and just use one output. - - v3: Convert an if condition to igt_require and move the plane rotation - requirement further up before the fb allocation. - - Cc: Tvrtko Ursulin - Signed-off-by: Vivek Kasireddy - Reviewed-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit a2c67866fb447a5d00abb3061b0d735df30fd40c -Author: Paulo Zanoni -Date: Tue Oct 20 18:46:26 2015 -0200 - - kms_frontbuffer_tracking: remove opt.only_feature - - That option is not needed anymore since: - - commit 982934625ac67234c6d85c6cf29a5a487e54d4f0 - Author: Thomas Wood - Date: Wed Sep 16 14:36:24 2015 +0100 - lib: allow wildcard matching when specifying subtests - - In fact, using "--run-subtest 'fbc-*'" is better than using --fbc-only - due to how SKIPs are handled. In the former, only the tests matching - the expression are tried, so the number of SKIPs only contains the - number of tests on the specified pattern that were skipped. If you - used --fbc-only, all the non-fbc tests would count as SKIPs, so it - would be harder to know which of the tests marked as skipped were - actual FBC tests. - - Signed-off-by: Paulo Zanoni - -commit efc2e39a458317d02e9f72b9eb277347c858ca59 -Author: Paulo Zanoni -Date: Tue Oct 20 16:16:04 2015 -0200 - - kms_frontbuffer_tracking: add stridechange subtest - - This is a corner case not exercised by the other subtests. The test is - expected to pass both with the current Kernel tree and with the - patches that are on the mailing list. - - The patches currently on the mailing list change how the CFB is - allocated, and this subtest is designed to make sure everything still - works as expected. - - Signed-off-by: Paulo Zanoni - -commit 196179a2bcab12da8b35d730d8fb0e8cf2c10a87 -Author: Paulo Zanoni -Date: Tue Oct 20 16:02:52 2015 -0200 - - kms_frontbuffer_tracking: add flag to not assert feature status - - This will be used by the stridechange subtest. - - Signed-off-by: Paulo Zanoni - -commit a4697fc8baf1d3f61531ec164b9b9cbae37583ed -Author: Paulo Zanoni -Date: Mon Oct 19 11:14:44 2015 -0200 - - kms_frontbuffer_tracking: unset crtcs after getting the base blue CRC - - This fixes the failures for cases where you use --run-subtest to run - single subtests that don't use any drawing patterns. - - Signed-off-by: Paulo Zanoni - -commit 3660bd4e9c79105bfd6f10442772660b61549792 -Author: Ville Syrjälä -Date: Thu Oct 22 19:55:38 2015 +0300 - - tests/kms_flip: Dump the timestamps, counters, etc. with higher debug levels - - Signed-off-by: Ville Syrjälä - -commit 75cf16e5854e232b5d3caba0bfb063d76866a6e4 -Author: Ville Syrjälä -Date: Wed Oct 16 22:43:04 2013 +0300 - - tests/kms_flip: Improve the accuracy of out frame time calculation - - Don't use the rounded vrefresh info to predict the frame duration. - Instead calculate if from the clock. - - Signed-off-by: Ville Syrjälä - -commit 8a17af80e0732cb6ce5e7348dcb2d56a7b870e1d -Author: Ville Syrjälä -Date: Thu Oct 22 18:44:56 2015 +0300 - - lib: Skip suspend/hibernate tests if the system doesn't support them - - Do a dry run with rtcwake first to determine if the system even supports - the intended suspend state. If not, skip the test. - - Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3. - - Signed-off-by: Ville Syrjälä - -commit 47db6fbd99f1c8b127269b124948da7049298963 -Author: Ville Syrjälä -Date: Thu Oct 22 18:38:50 2015 +0300 - - tests/kms_pipe_crc_basic: Skip invalid pipe/port combos - - Don't try to test invaliud pipe/port combos. Fixes the test on - VLV w/ DSI since the pipe<->DSI port mapping is fixed. Should also - fix other platforms with similar restrictions. - - Signed-off-by: Ville Syrjälä - -commit 46ec33e847eef3292a2f3b4f4a037cfb161cfeee -Author: Chris Wilson -Date: Tue Oct 20 14:40:50 2015 +0100 - - igt/gem_concurrent_all: Add snoop concurrency tests - - Another caching mode worth exploring for bad flushing behaviour. - - Signed-off-by: Chris Wilson - -commit 5ec54d8a2165f5095ec70b9bdb9ae583fead39c2 -Author: Chris Wilson -Date: Mon Oct 19 11:36:17 2015 +0100 - - Update CONTEXT_PARAM for GTT_SIZE reporting - - Add the new PARAM identifier for reporting the context's GTT size. - - Signed-off-by: Chris Wilson - -commit a22719358d8fc7d4261829847e1ace042575a723 -Author: Chris Wilson -Date: Wed Oct 14 14:17:55 2015 +0100 - - lib: Fix querying context GTT size - - We need a new ioctl to find the correct GTT size to use when submitting - execbuffers (as opposed to wishing to know the global GTT size). - - Signed-off-by: Chris Wilson - -commit cd99ddead3815aacaa483f27548a3f5e1a7d9353 -Author: Matt Roper -Date: Thu Oct 15 16:54:32 2015 -0700 - - kms_cursor_crc: Add test for unthrottled cursor movement - - We've had bugs in the past that caused cursor updates to be synced to - vblank, resulting in sluggish cursor movement. Add a test to try to - make sure we don't regress and reintroduce these bugs. - - Cc: kalyan.kondapally@intel.com - Signed-off-by: Matt Roper - Signed-off-by: Thomas Wood - -commit e3ac13e16a4a1311e8e73f242e878d74c2063341 -Author: Chris Wilson -Date: Fri Oct 16 11:01:42 2015 +0100 - - tests/gem_pwrite_snooped: Fix use of GCC pragmas - - Apparently GCC treats the #pragma directive as a code block and so we - returned unconditionally from memchr_inv() on the first byte fubaring - the test. - - commit b04691b3e8e62bd105f0f4d8d3b9e7da187f0c90 - Author: Thomas Wood - Date: Tue Sep 8 11:16:46 2015 +0100 - - tests/gem_pwrite_snooped: disable const cast warning - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92227 - Signed-off-by: Chris Wilson - -commit 0ab76a22d111b903cd3ee0ba8d20dfeb34608361 -Author: Derek Morton -Date: Wed Oct 14 17:32:58 2015 +0100 - - benchmarks/gem_blt: Include igt.h in gem_blt.c - - To fix a build error on android - - Signed-off-by: Derek Morton - Signed-off-by: Thomas Wood - -commit f050dc663d6a24e2ad0441ee3f7066ebee5e3f8c -Author: Derek Morton -Date: Wed Oct 14 17:23:00 2015 +0100 - - tests/core_prop_blob: Fix core_prop_blob for android - - core_prop_blob was using ioctls not in the android kernel. Added a - igt_require_propblob() function and local defines/structures so the - test will compile and skip on kernels where the feature is unsupported. - - v2: moved igt_require_propblob() to core_prop_blob.c (Daniel Vetter) - Moved gem_blt.c to a seperate patch (Thomas Wood) - - Signed-off-by: Derek Morton - [Thomas: fix compiler warning] - Signed-off-by: Thomas Wood - -commit 061a38fca0474ef5e20a5fa5ff086fcc4c4181a6 -Author: Tvrtko Ursulin -Date: Wed Oct 7 12:18:52 2015 +0100 - - kms_rotation_crc: Exercise page flips with 90 degree rotation - - Do some page flipping on the rotated plane just to exercise - that code path. - - v2: Actually render to flip fb and fixed flip counter. - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Cc: Arun R Murthy - Signed-off-by: Thomas Wood - -commit 1a593d2a5dfa1bd006742828338953358113cb6f -Author: Matt Roper -Date: Tue Oct 6 17:04:49 2015 -0700 - - kms_universal_plane: Add gen9-specific test - - Gen9 adds some new capabilities not present on previous platforms - (primary plane windowing, 90/270 rotation, etc.). Add a new subtest to - check how these new features interact with the use of the universal - plane API. - - For now we just check whether pageflips work as expected in a windowed - setting. We may want to add some rotation testing in future patches. - - Signed-off-by: Matt Roper - Signed-off-by: Thomas Wood - -commit 5bc210a5b5d060a4053d3ad9266123abefb4840a -Author: Rodrigo Vivi -Date: Mon Oct 5 15:48:22 2015 -0700 - - lib/kbl: Add Kabylake PCI IDs - - Also, following kernel definition Kabylake is Skylake. - - Signed-off-by: Rodrigo Vivi - Signed-off-by: Thomas Wood - -commit 3e9726b33736f7fd7a349785ab6693e33647240a -Author: Lu, Han -Date: Thu Jun 25 14:39:33 2015 +0800 - - tools/intel_audio_dump: add support for Broxton - - This patch adds support for dumping audio registers of Broxton. - - Signed-off-by: Lu, Han - Signed-off-by: Thomas Wood - -commit f52e7ec7876603b4edb0bff412255f8f1624ecc4 -Author: Ville Syrjälä -Date: Fri Oct 9 19:11:39 2015 +0300 - - Replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with gem_mmap__{cpu,gtt,wc}() - - gem_mmap__{cpu,gtt,wc}() already has the assert built in, so replace - __gem_mmap__{cpu,gtt,wc}() + igt_assert() with it. - - Mostly done with coccinelle, with some manual help: - @@ - identifier I; - expression E1, E2, E3, E4, E5, E6; - @@ - ( - - I = __gem_mmap__gtt(E1, E2, E3, E4); - + I = gem_mmap__gtt(E1, E2, E3, E4); - ... - - igt_assert(I); - | - - I = __gem_mmap__cpu(E1, E2, E3, E4, E5); - + I = gem_mmap__cpu(E1, E2, E3, E4, E5); - ... - - igt_assert(I); - | - - I = __gem_mmap__wc(E1, E2, E3, E4, E5); - + I = gem_mmap__wc(E1, E2, E3, E4, E5); - ... - - igt_assert(I); - ) - - Signed-off-by: Ville Syrjälä - Stochastically-reviwewed-by: Chris Wilson - -commit b8a77dd6c8e9f73493b2f86f293ff9c06fc08049 -Author: Ville Syrjälä -Date: Fri Oct 9 18:29:28 2015 +0300 - - Make gem_mmap__{cpu,gtt,wc}() assert on failure - - Rename the current gem_mmap__{cpu,gtt,wc}() functions into - __gem_mmap__{cpu,gtt,wc}(), and add back wrappers with the original name - that assert that the pointer is valid. Most callers will expect a valid - pointer and shouldn't have to bother with failures. - - To avoid changing anything (yet), sed 's/gem_mmap__/__gem_mmap__/g' - over the entire codebase. - - Signed-off-by: Ville Syrjälä - Stochastically-reviwewed-by: Chris Wilson - -commit 106fe21373f9c3eadcd95fb4b48e452f9b328ffa -Author: Ville Syrjälä -Date: Fri Oct 9 18:36:24 2015 +0300 - - lib: Die if framebuffer GTT mapping fails - - Cairo helpfully allocates a new buffer for us when - cairo_image_surface_create_for_data() is called with a NULL ptr. That - means if gem_mmap__gtt() fails, we get a totally silent failure and - nothing ever drawn into the framebuffer. Very confusing. - - Put in an igt_assert() to make sure we managed to mmap something. - - Signed-off-by: Ville Syrjälä - Stochastically-reviwewed-by: Chris Wilson - -commit 7eaae3c2013b6d4bdf11570d3fb9d95eb4978976 -Author: Ville Syrjälä -Date: Fri Oct 9 18:19:34 2015 +0300 - - Sprinkle igt_assert(ptr) after gem_mmap__{cpu,gtt,wc} - - Do the following - ptr = gem_mmap__{cpu,gtt,wc}() - +igt_assert(ptr); - - whenever the code doesn't handle the NULL ptr in any kind of - specific way. - - Makes it easier to move the assert into gem_mmap__{cpu,gtt,wc}() itself. - - Mostly done with coccinelle, with some manual cleanups: - @@ - identifier I; - @@ - <... when != igt_assert(I) - when != igt_require(I) - when != igt_require_f(I, ...) - when != I != NULL - when != I == NULL - ( - I = gem_mmap__gtt(...); - + igt_assert(I); - | - I = gem_mmap__cpu(...); - + igt_assert(I); - | - I = gem_mmap__wc(...); - + igt_assert(I); - ) - ...> - - Signed-off-by: Ville Syrjälä - Stochastically-reviwewed-by: Chris Wilson - -commit 91d295cf06aeee733b57ec87933dba47ed2c8440 -Author: Ville Syrjälä -Date: Fri Oct 9 17:00:29 2015 +0300 - - Remove gem_mmap__{cpu,gtt,wc} return value MAP_FAILED asserts - - gem_mmap__{cpu,gtt,wc} never return MAP_FAILED, it gets converted to - NULL internally. So don't go asserting that the returned value is - not MAP_FAILED. - - Done with coccinelle: - @@ - type T; - identifier I; - @@ - ( - I = gem_mmap__gtt(...); - | - I = gem_mmap__cpu(...); - | - I = gem_mmap__wc(...); - ) - ... - ( - - igt_assert(I != MAP_FAILED); - + igt_assert(I); - | - - igt_assert(I && I != MAP_FAILED); - + igt_assert(I); - | - - igt_assert(I != (T *) MAP_FAILED); - + igt_assert(I); - | - - igt_assert(I != NULL); - + igt_assert(I); - ) - - Signed-off-by: Ville Syrjälä - Stochastically-reviwewed-by: Chris Wilson - -commit 8986bbc0ce83c1df4c314c9c04d30608cacae98b -Author: Ville Syrjälä -Date: Fri Oct 9 16:59:13 2015 +0300 - - lib: Document that gem_mmap__{cpu,gtt,wc} return NULL on failure - - Signed-off-by: Ville Syrjälä - Stochastically-reviwewed-by: Chris Wilson - -commit 9792e7b58095dc03e63c105c494308ed771168f6 -Author: Ville Syrjälä -Date: Fri Oct 9 16:47:05 2015 +0300 - - s/gem_mmap/gem_mmap__gtt/ - - Get rid of the gem_mmap() alias of gem_mmap__gtt(). I don't see any - point in having it. - - Signed-off-by: Ville Syrjälä - Stochastically-reviwewed-by: Chris Wilson - -commit bfea74a9f64a900bcb90f946b38746781017449f -Author: Paulo Zanoni -Date: Thu Sep 24 15:13:58 2015 -0300 - - kms_frontbuffer_tracking: add fliptrack subtest - - The current upstream Kernel code stops and then restarts FBC at every - page flip. I am working on patches to keep FBC enabled all the time, - so this brings the possibility of having the hardware tracking - mechanism looking at the old buffer instead of the new one. This test - should catch this problem. - - Signed-off-by: Paulo Zanoni - -commit f0c067ddb327c6cf7d6c9becaa293b2aa5491007 -Author: Paulo Zanoni -Date: Mon Oct 5 16:57:53 2015 -0300 - - kms_frontbuffer_tracking: don't mode unset when checking sink CRC support - - There's no reason to do a mode unset since we don't care about whether - FBC or PSR are enabled or disabled. This should save about a second - for each time you invoke the program. - - Signed-off-by: Paulo Zanoni - -commit c1daf330e9c4fb0d7aca596a78d81e21ccdaba2f -Author: Paulo Zanoni -Date: Fri Oct 2 18:12:54 2015 -0300 - - kms_frontbuffer_tracking: add scaledprimary subtest - - It's not testing a lot since we lack the Kernel Stolen Memory Checker, - but some day this will be useful. - - Signed-off-by: Paulo Zanoni - -commit bb2ebe92ef2df31d051e11642f0e122fa9a56683 -Author: Paulo Zanoni -Date: Thu Sep 24 18:25:24 2015 -0300 - - kms_frontbuffer_tracking: set the universal planes cap in the setup - - ... instead of just setting it for the fullscreen_plane subtest and - then unsetting it. We want to use it more, so just make sure all the - code knows how to deal with multiple planes per CRTC. - - This also allows us to do some upfront caching of the plane - information, so the code for the tests gets simpler. - - There's a new test that's going to use all these changes. - - Signed-off-by: Paulo Zanoni - -commit 68cb0de70c76b15d47b8fb2c25acf6f855554858 -Author: Paulo Zanoni -Date: Thu Sep 17 15:58:54 2015 -0300 - - kms_frontbuffer_tracking: change pattern 1's last rect to 1x1 - - Make sure the tracking mechanism is able to track a write in the very - last pixel. - - Signed-off-by: Paulo Zanoni - -commit f974422c21ebcc3de2c0a3c530321ba652992ba2 -Author: Paulo Zanoni -Date: Mon Aug 24 16:30:04 2015 -0300 - - lib/igt_fb: don't forget to close parens on message printed - - Restore the anxiety levels back to the normal values. - - Signed-off-by: Paulo Zanoni - -commit bbd193b478b4baf40d2a527cac16c271479696cd -Author: Daniel Stone -Date: Mon Mar 16 20:06:55 2015 +0000 - - tests: Add blob-property test - - Exercises the new blob-creation ioctl, testing lifetimes and behaviour - of user-created blobs, as well as exercising all the invariant - conditions we guarantee from modes exposed as blob properties. - - v2: Renamed to core_prop_blob, skip test if blob not available. - v3: No changes. - v4: Consistently return 0/errno. - v5: Use do_ioctl_err and igt_assert_fd. - Use igt_assert_*() helper macros rather than direct igt_assert(). - - Signed-off-by: Daniel Stone - Reviewed-by: Daniel Vetter - -commit 668c053e6a63469cb88dac8f89fea0159e1377b4 -Author: Daniel Stone -Date: Thu Oct 1 14:16:23 2015 +0100 - - lib/igt.cocci: De-opencode ioctls - - Use do_ioctl and do_ioctl_err where possible. - - Signed-off-by: Daniel Stone - -commit c8cec6b88511f43b5c0301864081fe6ca6e39049 -Author: Daniel Stone -Date: Thu Oct 1 13:02:38 2015 +0100 - - lib/drmtest: Add do_ioctl_err to expect failure - - do_ioctl demands that the ioctl returns success; add a variant named - do_ioctl_err, which expects the ioctl to fail, and demands a particular - result. - - Signed-off-by: Daniel Stone - -commit 31821fce59d6ce3288b5b8e0f18f60417b76c61a -Author: Daniel Stone -Date: Thu Oct 1 13:25:48 2015 +0100 - - lib/igt.cocci: Add greater-than to igt_assert_lt* - - Change m >= n patterns to igt_assert_lte(n, m), and ditto for strict - greater-than. - - Signed-off-by: Daniel Stone - -commit 6ead44d70bde0aed4ceac5311f3eec599125a554 -Author: Daniel Stone -Date: Thu Oct 1 13:26:36 2015 +0100 - - lib/igt_core: Add igt_assert_fd - - Skip open-coding and assert that fds are valid. - - Signed-off-by: Daniel Stone - -commit 715a17bb35a09a6889664bc7df14495bc068e06d -Author: Daniel Stone -Date: Thu Oct 1 13:00:12 2015 +0100 - - lib/igt_core: Add igt_assert_neq_*() variants - - Similar to igt_assert_eq_*(), add variants for non-equality of types - other than int. - - Signed-off-by: Daniel Stone - -commit c9112dca9e82288b887e248a5982df94c8ec1c04 -Author: Daniel Vetter -Date: Fri Oct 2 12:56:16 2015 +0200 - - lib/core: Fix docs for igt_assert_lt(e) - - Logical negation is hard. - - v2: The second integer isn't plural (Daniel). - - Cc: "Morton, Derek J" - Signed-off-by: Daniel Vetter - Reviewed-by: Daniel Stone - Signed-off-by: Daniel Vetter - -commit d878e18dfd37eb6dd3517d601f4e779349e25ebc -Author: Chris Wilson -Date: Tue Oct 6 17:03:02 2015 +0100 - - benchmarks/gem_blt: Fix compilation after rebase and add batch-size - - Add an option to do more than one copy per batch. - - Signed-off-by: Chris Wilson - -commit 8253e7dc84af43d6c757185e5c6ff463feaaf637 -Author: Chris Wilson -Date: Mon Oct 5 09:31:59 2015 +0100 - - benchmarks: Measure BLT performance - - Execute N blits and time how long they complete to measure both GPU - limited bandwidth and submission overhead. - - Signed-off-by: Chris Wilson - -commit 1b492e311ce13fe4bc42f1edd5479441662d4855 -Author: Derek Morton -Date: Thu Oct 1 16:09:02 2015 +0100 - - benchmarks: Fix build errors on Android M-Dessert - - Android M-Dessert treats implicit declaration of function warnings - as errors resulting in igt failing to build. - - This patch fixes the errors by including missing header files as - required. Mostly this involved including igt.h in the benchmarks. - - Signed-off-by: Derek Morton - Signed-off-by: Daniel Vetter - -commit 983dfe5b68e2e18006cee78811ff387735386fa1 -Author: Ville Syrjälä -Date: Tue Jul 21 14:05:24 2015 +0300 - - tests/pm_rc6_residency: Measure the sleep duration - - The code is confused about the units of CODE_TIME. The comment - says 50 microsseconds, but the actual code makes it 50 - milliseconds. Avoid the whole mess by measuring the sleep - duration ourselves. Since the time measurement is taken around - the whole operation it obviously includes a bit of extra, but - at least it's much less than the fixed 50 ms. - - For instance on one VLV board I now get something like this: - - Residency in rc6 or deeper state: 3002 ms (ratio to expected duration: 0.98) - + Residency in rc6 or deeper state: 3001 ms (sleep duration 3003 ms) (ratio to expected duration: 1.00) - so the reported ratio is now much closer to reality. - - Reviewed-by: Imre Deak - Signed-off-by: Ville Syrjälä - -commit 571942f0c43451b48b0d47d80c70ff2808908317 -Author: Ander Conselvan de Oliveira -Date: Wed May 27 10:33:41 2015 +0300 - - testdisplay: Fix segfault after first modeset fails - - When testing all modes on a connector with a single mode, if the modeset - fails, the code attempts to remove fb_info[-1], because old_fb still has - the inital value of -1. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90625 - Signed-off-by: Ander Conselvan de Oliveira - Signed-off-by: Thomas Wood - -commit 93f1250013c6c2533f840820a62a717aa33dbd88 -Author: Thomas Wood -Date: Fri Sep 25 09:36:34 2015 +0100 - - lib: fix fopen mode in igt_debugfs_search - - Reported-by: Tvrtko Ursulin - Signed-off-by: Thomas Wood - -commit 6c89204da77a721c9f6c2c77908ca9502a246df8 -Author: Thomas Wood -Date: Wed Sep 23 16:52:24 2015 +0100 - - lib: add igt_debugfs_search - - Add igt_debugfs_search to search each line in a debugfs file for a - specified substring. - - Signed-off-by: Thomas Wood - -commit 1ea96af776a853303240fe6ec414aeed3316c24b -Author: Tvrtko Ursulin -Date: Thu Sep 24 12:05:07 2015 +0100 - - gem_ppgtt: Test VMA leak on context destruction - - Test that VMAs associated with a context are cleaned up when - contexts are destroyed. - - In practice this emulates the leak seen between fbcon and X server. - Every time the X server exits we gain one VMA on the fbcon frame - buffer object as externally visible via for example - /sys/kernel/debug/dri/0/i915_gem_gtt. - - v2: Use igt_debugfs_open, getline and strstr instead of home-brewed - string matching. (Thomas Wood) - - v3: Rebase for drm_open_driver. - - Signed-off-by: Tvrtko Ursulin - Cc: Thomas Wood - Signed-off-by: Thomas Wood - -commit 2442f595d23b919bdc61d117b85a55304d6535a5 -Author: Thomas Wood -Date: Thu Sep 24 11:35:19 2015 +0100 - - lib/tests: explicitly raise SIGSEGV - - Dereferencing a NULL pointer is undefined behaviour and may not always - result in a segmentation fault. Explicitly raise the SIGSEGV signal to - test handling of this signal. - - v2: include signal.h (Derek Morton) - - Signed-off-by: Thomas Wood - -commit 9edf293c4566ffdc0937c800035dd2d215355674 -Author: Thomas Wood -Date: Thu Sep 24 11:04:34 2015 +0100 - - gem_storedw_loop: fix segfault when listing subtests - - Commit fb66cd5 (tests/gem_storedw_loop: Fix use after free for bufmgr) - introduced a segmentation fault when listing subtests because - drm_intel_bufmgr_destroy is called with NULL. Move this and the call to - the close function inside an igt_fixture block to prevent them being - called when listing subtests. - - Cc: Robert Beckett - Cc: Jesse Barnes - Cc: Daniel Vetter - Signed-off-by: Thomas Wood - -commit fb66cd5c346d91407f43879582da80781eed7c97 -Author: Robert Beckett -Date: Tue Sep 22 19:02:39 2015 +0100 - - tests/gem_storedw_loop: Fix use after free for bufmgr - - Move bufmgr destruction to end of tests. This avoids use after free on - successive tests. - - This could be squashed with the following patch to aid bisectability: - - commit 0679702150157706a6def66b893b29c16345f4db - Author: Jesse Barnes - Date: Wed Aug 5 16:06:31 2015 -0700 - - tests/gem_storedw_loop: add new store_dword test to unify per-ring ones v2 - - Signed-off-by: Robert Beckett - Cc: Jesse Barnes - Reviewed-by: Jesse Barnes - Signed-off-by: Daniel Vetter - -commit a16704261fc12259a2e61c00c3cef7be568d71f9 -Author: Daniele Ceraolo Spurio -Date: Wed Sep 9 09:46:56 2015 +0100 - - tests/gem_ctx_param_basic.c: fix non-root-set-no-zeromap subtest - - The test expects an ioctl failure when it tries to set - CONTEXT_PARAM_NO_ZEROMAP from a non-root process. However, there is no - requirement in the kernel for the user to be root to set this parameter, - so the test is failing (it never passed as far as I'm aware of). - Fix the test by making it expect a successful ioctl completion. - - Signed-off-by: Daniele Ceraolo Spurio - Reviewed-by: Jesse Barnes - Signed-off-by: Thomas Wood - -commit ad4f3206dc05dcd1a65c9da08deb2b5d65e7a760 -Author: Thomas Wood -Date: Wed Sep 16 15:21:09 2015 +0100 - - m4: remove unused macros - - The requirement for these macros was removed in commit af97918 (tools: - remove quick_dump). - - Reported-by: Ben Widawsky - Signed-off-by: Thomas Wood - -commit 982934625ac67234c6d85c6cf29a5a487e54d4f0 -Author: Thomas Wood -Date: Wed Sep 16 14:36:24 2015 +0100 - - lib: allow wildcard matching when specifying subtests - - This allows multiple subtests to be specified using standard wildcard - characters when using the --run-subtest command line option. - - Signed-off-by: Thomas Wood - -commit b883b3066848957376d841cb4ffdf2d5646315c8 -Author: Thomas Wood -Date: Tue Sep 15 17:04:11 2015 +0100 - - scripts: add quick-testlist.py - - Add a script to take a piglit results file and create a list of tests - that ran in under 60 seconds. This list can be used by the --test-list - option of piglit. - - v2: exclude incomplete tests - - Signed-off-by: Thomas Wood - -commit 1f9e0550455be4b219954a026407dd23ec21b299 -Author: Thomas Wood -Date: Fri Sep 11 15:15:13 2015 +0100 - - Update version to 1.12 and add the release date - - Signed-off-by: Thomas Wood - -commit c5902bffe3ff4d6c1dc77b97651fc3b3ff04e049 -Author: Thomas Wood -Date: Fri Sep 11 15:13:00 2015 +0100 - - NEWS: Updates - - Signed-off-by: Thomas Wood - -commit 21111730832f8139a215cf8ba66471ef7e992984 -Author: Micah Fedke -Date: Fri Aug 14 14:36:36 2015 +0000 - - tests: update core_getstats to run on any platform - - Signed-off-by: Micah Fedke - Signed-off-by: Thomas Wood - -commit fd282fb9d48c265533af91a291da368ac4c626e9 -Author: Micah Fedke -Date: Fri Aug 14 14:35:46 2015 +0000 - - tests: update core_getclient to run on any platform - - Signed-off-by: Micah Fedke - Signed-off-by: Thomas Wood - -commit 75c9e92efb9522d6f2c455dc35ba169c1d67ad52 -Author: Micah Fedke -Date: Thu Aug 13 14:05:52 2015 +0000 - - tests: update core_getversion to run on any platform - - Signed-off-by: Micah Fedke - Signed-off-by: Thomas Wood - -commit 253544f7a376d02d306a111019ef102a79acc4f3 -Author: Micah Fedke -Date: Thu Aug 13 13:59:23 2015 +0000 - - tests: update core_get_client_auth to run on any platform - - Signed-off-by: Micah Fedke - Signed-off-by: Thomas Wood - -commit f91e93fa40cf76a0d78c4f022ff94e554fd73032 -Author: Micah Fedke -Date: Wed Jul 22 20:32:06 2015 +0000 - - lib: remove support for deprecated drm_open_any*() calls - - Signed-off-by: Micah Fedke - Signed-off-by: Thomas Wood - -commit c81d293aed94fea9c48899187016a1b28f8989d5 -Author: Micah Fedke -Date: Wed Jul 22 21:54:02 2015 +0000 - - convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci - - Apply the new API to all call sites within the test suite using the following - semantic patch: - - // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls - @@ - identifier i =~ "\bdrm_open_any\b"; - @@ - - i() - + drm_open_driver(DRIVER_INTEL) - - @@ - identifier i =~ "\bdrm_open_any_master\b"; - @@ - - i() - + drm_open_driver_master(DRIVER_INTEL) - - @@ - identifier i =~ "\bdrm_open_any_render\b"; - @@ - - i() - + drm_open_driver_render(DRIVER_INTEL) - - @@ - identifier i =~ "\b__drm_open_any\b"; - @@ - - i() - + __drm_open_driver(DRIVER_INTEL) - - Signed-off-by: Micah Fedke - Signed-off-by: Thomas Wood - -commit e2241805a43e2cbd5287010e90005542845b48cd -Author: Micah Fedke -Date: Wed Jul 22 21:42:51 2015 +0000 - - lib: adding drm_open_driver() interface - - The drm_open_driver*() functions replace the drm_open_any*() functions and - provide the same utility, but in a way that is platform agnostic, not - intel-specific. This opens the path for adopting intel-gpu-tools to non-intel - platforms. - - This commit renames the calls and adds the chipset parameter which can be used - to restrict the opening to a specific hardware family. For example, - drm_open_driver(DRIVER_INTEL) will only return a valid fd if an intel GPU is - found on the system, along with performing intel-specific initialization stuff - like gem_quiescent_gpu(), et al. If OPEN_ANY_GPU is specified, the first - available drm device of any type will be opened. - - Other hardware type flags may be added in the future. - - The drm_open_any*() calls are retained as aliases of - drm_open_driver*(OPEN_ANY_GPU) but will be removed in a subsequent patch. - - Signed-off-by: Micah Fedke - Signed-off-by: Thomas Wood - -commit 2bacd07eb3be30fd30ed4fa4645901683b1c6b09 -Author: Thomas Wood -Date: Thu Sep 10 11:40:43 2015 +0100 - - lib: don't use igt_warn in signal handlers - - igt_wan and other log functions are not async-signal safe, so should not - be used in signal handlers. - - Reported-by: Paulo Zanoni - Signed-off-by: Thomas Wood - -commit bcd3e1f33f136399659c7b1549be3bae467abaf4 -Author: Derek Morton -Date: Wed Sep 9 17:51:35 2015 +0100 - - tools/Android.mk: Fix compile error in intel_reg.c - - The patch "tools: install the register definition files" caused - a build error on android as it added 'PKGDATADIR' which was not - defined in the Android build environment. This patch adds that - define to tools/Android.mk. It also copies the files it points - to so they are actually in the target file system. - - v2: Added local variable for tool path - - Signed-off-by: Derek Morton - Signed-off-by: Thomas Wood - -commit 3546514791e159e94ba3baf73cc2bad65a7a0f20 -Author: Thomas Wood -Date: Tue Sep 8 16:49:24 2015 +0100 - - null_state_gen: add const to intel_batch_state_copy data - - The data is not modified by the function and is often declared const. - - Signed-off-by: Thomas Wood - -commit fdecc1b5afbdcdb20fa98c642cea7fa1dc1a8944 -Author: Thomas Wood -Date: Tue Sep 8 17:13:43 2015 +0100 - - tools/aubdump: remove void pointer arithmetic - - A gcc extension allows void pointer arithmetic by treating the size of - void as 1, but this generates a warning when -Wpointer-arith is used. - - Signed-off-by: Thomas Wood - -commit 2155d1eb546f1b4082374266323cbb709f1e6659 -Author: Ville Syrjälä -Date: Fri Sep 11 15:27:32 2015 +0300 - - tools/intel_bios_reader: Add MIPI device type - - Decode the MIPI [sic] device type. - - Signed-off-by: Ville Syrjälä - -commit d8313c30021f039a5d9d380b28a7d20e0c70f1f8 -Author: Ville Syrjälä -Date: Fri Sep 11 15:01:16 2015 +0300 - - tools/intel_bios_reader: Decode the device type bits - - Each bit in the device type is supposed to mean something. Decode their - meaning. - - Signed-off-by: Ville Syrjälä - -commit a02305260eaba0da622cacc8308adbeffa467db7 -Author: Ville Syrjälä -Date: Fri Sep 11 14:47:59 2015 +0300 - - tools/intel_bios_reader: Print the child dev handle - - Signed-off-by: Ville Syrjälä - -commit b701bb14c6fc82edfb07c2f6087b96e36dd48efe -Author: Ville Syrjälä -Date: Wed Mar 25 20:23:30 2015 +0200 - - intel_bios_reader: Don't explode looking for the devid - - Check that the offset where expect to find the device id is withing the - BIOS image, instead of accessing whatever (if anything) happens to be - there. - - Signed-off-by: Ville Syrjälä - -commit b1e756451c59b342a9d15433379bf543ddedd56b -Author: Ville Syrjälä -Date: Wed Mar 25 13:36:52 2015 +0200 - - intel_bios_reader: Read the child device size from VBT - - New stuff has been added to the end of the child device block at various - times, so using a hardcoded size for the block is a bad idea. - Fortunately the size of the block is listed in the VBT just before the - blocks themselves, so grab it from there. - - Signed-off-by: Ville Syrjälä - -commit c137ac71584467424f8a7bbb40825fa6250093c5 -Author: Ville Syrjälä -Date: Wed Sep 9 17:00:56 2015 +0300 - - tools/intel_display_poller: Align DSPSURF to 128k to appease gen4/vlv/chv - - gen4/vlv/chv require DSPSURF to be 128k aligned. Try to respect that - in order to avoid ugly glitches. - - Signed-off-by: Ville Syrjälä - -commit a8b85ea21b053145527a848b51b57f5c0cfa003e -Author: Ville Syrjälä -Date: Wed Sep 9 16:47:29 2015 +0300 - - tools/intel_display_poller: Make pipe name alphabetic - - Instead of raw numbers the user can now specify the pipe - as 'a',b'... or 'A','B'... - - Signed-off-by: Ville Syrjälä - -commit 01a2a4d85d71b1b7f6f4d5239d207b821ae01b55 -Author: Ville Syrjälä -Date: Wed Aug 19 17:00:09 2015 +0300 - - tools/intel_display_poller: Try to fix pipe<->plane handling on gen2/3 - - Check the pipe assignment for each plane (excluding plane C since the - kernel doesn't use that one) and pick the first one that's assigned to - the target pipe. - - Signed-off-by: Ville Syrjälä - -commit ba139493a6f8e35ba6cecd5058ff93fb12848465 -Author: Ville Syrjälä -Date: Fri Jun 5 17:09:25 2015 +0300 - - tools/intel_display_poller: Add CHV support - - Add CHV support by adding a pipe_offset[] thingy (like we have in the - kernel) to deal with the wonky register offsets. - - Signed-off-by: Ville Syrjälä - -commit 7d2f1d7d9ed44d45b91ebdda9fe25d90cbaa92ab -Author: Ville Syrjälä -Date: Wed Aug 19 17:34:45 2015 +0300 - - tools/intel_reg: Print the potential port names in the help text - - v2: Repaint with Jani's favorite color - - Signed-off-by: Ville Syrjälä - -commit fb8131545f386348403fba32dc22c79b4aa110af -Author: Ville Syrjälä -Date: Wed Aug 19 17:12:14 2015 +0300 - - tools/intel_reg: Set register stride to 1 for VGA registers - - VGA registers are generally 8 bits long, so set the stride to 1 byte. - - Signed-off-by: Ville Syrjälä - -commit 88fed9fbca693834ae2e636adc7941cee57930d7 -Author: Mika Kuoppala -Date: Fri Aug 28 17:51:45 2015 +0300 - - tools/intel_reg: Use pci device from config on write - - Use the pre configured pci device from config also - in write path. - - Cc: Jani Nikula - Signed-off-by: Mika Kuoppala - Reviewed-by: Jani Nikula - Signed-off-by: Thomas Wood - -commit 6eed1b5eb4ba09435c9b4cd63fb302121009c188 -Author: Ander Conselvan de Oliveira -Date: Wed Aug 26 11:29:06 2015 +0300 - - kms_addfb_basic: Require fb modifiers for unused field tests - - The drm core doesn't check unused fields of ADDFB2 for pre-FB_MODIFIERS - userspace, so use igt_require_fb_modifiers(). Also, the size of the - ioctl changed with the addition of the modifiers, so it is necessary to - use the LOCAL_ version of it, otherwise some data may get truncated. - - v2: Improve commit message. (Thomas) - Remove one spurious change to use LOCAL_DRM_IOCTL_ADDFB2. (Thomas) - - Signed-off-by: Ander Conselvan de Oliveira - Signed-off-by: Thomas Wood - -commit 2269997cff0f7700566f80359971a723d0b0212b -Author: Daniele Ceraolo Spurio -Date: Thu Sep 3 17:13:58 2015 +0100 - - tests/gem_bad_reloc: use correct page table size - - 2 subparts of gem_bad_reloc check that the reloc address is below the - global gtt boundary. However, when executing from ppgtt the reloc - address can be greater than that and still be a valid address. - - To be sure that we're using the right upper limit, select it based on - the ppgtt mode. - - Cc: Michel Thierry - Signed-off-by: Daniele Ceraolo Spurio - Reviewed-by: Michel Thierry - Signed-off-by: Thomas Wood - -commit b04691b3e8e62bd105f0f4d8d3b9e7da187f0c90 -Author: Thomas Wood -Date: Tue Sep 8 11:16:46 2015 +0100 - - tests/gem_pwrite_snooped: disable const cast warning - - Disable -Wcast-qual temporarily to allow memchr_inv to return non-const - data (similar to memchr), without causing a compiler warning. - - Cc: Ville Syrjälä - Signed-off-by: Thomas Wood - -commit 84cfa9e4d271dddd4211ed9a3b94549934fa8819 -Author: Thomas Wood -Date: Mon Sep 7 14:59:54 2015 +0100 - - tests: remove gem_storedw_loop_* tests - - These have been replaced by subtests in gem_storedw_loop. - - Signed-off-by: Thomas Wood - Reviewed-by: Daniel Vetter - -commit 1dcace30184c812f1e12ee10cc827accce140cc0 -Author: Thomas Wood -Date: Mon Sep 7 11:32:05 2015 +0100 - - build: fix unused-result warnings - - Signed-off-by: Thomas Wood - -commit f0381d1abebfc5b7e24a835dfe1c2344396c0304 -Author: Thomas Wood -Date: Mon Sep 7 09:26:01 2015 +0100 - - lib: various documentation fixes - - Signed-off-by: Thomas Wood - -commit de2470ea4fb7b7df698e0f7651cb250707709c05 -Author: Thomas Wood -Date: Mon Sep 7 16:05:11 2015 +0100 - - intel_reg: ensure "intel_reg help" always works - - Signed-off-by: Thomas Wood - -commit 9ecb50e5c55c4d287f9f083b41d5e51b6a9d9ad2 -Author: Thomas Wood -Date: Fri Sep 4 14:46:45 2015 +0100 - - tools: install the register definition files - - Install the register definition files and use them by default in - intel_reg. - - v2: remove redundant path check - - Suggested-by: Jani Nikula - Signed-off-by: Thomas Wood - -commit af9791849467a3437e0920c8f08c5a646302da7d -Author: Thomas Wood -Date: Tue Aug 25 11:30:11 2015 +0100 - - tools: remove quick_dump - - Remove quick_dump as it has been replaced by the intel_reg tool and move - the register definition files to tools/registers. - - Signed-off-by: Thomas Wood - Acked-by: Jani Nikula - -commit 2142a15d49f85175677ff360833869afe9c79b58 -Author: Thomas Wood -Date: Thu Sep 3 09:56:18 2015 +0100 - - tests/gem_storedw_loop: remove redundant ppgtt check - - All tests require ppgtt, so checking for it later on has no effect. - - Signed-off-by: Thomas Wood - -commit 673aab8a0afd538463fa96da263e56537f413dfd -Author: Thomas Wood -Date: Tue Aug 25 16:23:28 2015 +0100 - - tests/gem_storedw_loop: skip on gen6 bsd - - MI_STORE_DATA is broken on gen6 bsd. - - Signed-off-by: Thomas Wood - -commit b9d27f03c7cdfdb66734b5164916a501dd787036 -Author: Thomas Wood -Date: Wed Aug 26 12:05:13 2015 +0100 - - tools/null_state_gen: fix various compiler warnings - - Add the debug and warning flags to cflags and fix the resulting issues. - - Signed-off-by: Thomas Wood - -commit 4ee6709e3bd98eb52f4c4c22f58fecf9750f26eb -Author: Thomas Wood -Date: Thu Aug 27 14:34:08 2015 +0100 - - tests/tools: add --as-needed to linker flags - - Add --as-needed to the linker flags to reduce the number of shared - library dependencies, since not all the tests and tools use all the - libraries required by the helper library (for example, many tests do not - use cairo). This helps portability of the binaries and also makes a - very small improvement to the execution speed and memory consumption. - - Signed-off-by: Thomas Wood - -commit 88cbb41ade5a66f96b7cd3844ce86f43d192afa0 -Author: Thomas Wood -Date: Tue Aug 25 10:34:46 2015 +0100 - - lib/gpgpu_fill.c: fix file permissions - - Signed-off-by: Thomas Wood - -commit 4c63f54de9b7f0a6d49807c15c63e952ac4afdf8 -Author: Ander Conselvan de Oliveira -Date: Fri Aug 21 16:49:33 2015 +0300 - - gem_storedw_loop: Skip test if device doesn't have requested ring - - The VEBOX ring is not available in generations before Haswell, so make - tests that use it skip instead of fail in previous gens. - - Signed-off-by: Ander Conselvan de Oliveira - Signed-off-by: Thomas Wood - -commit d3d56bf2afb45fb8a5f5dabbf41ced53d21252f3 -Author: Tim Gore -Date: Wed Aug 19 12:10:16 2015 +0100 - - tests/gem_ctx_exec.c: only hang the ring we are testing - - In the reset-pin-leak test we were calling - igt_set_stop_rings(STOP_RING_DEFAULTS) which sets the - stop_rings bits for all gpu engines. But we only submit - work to the render engine. When TDR is enabled (as it is - in Android currently) only the render engine gets reset, - which clears the stop_rings bit for the render engine but - not for the other engines. This causes the test to fail on - the second iteration because stop_rings is not clear. - - So just set the stop_rings bit for the engine we are going - to hang, namely the render engine. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 71b85f9713cd48d589f607afc81d090b2afc2ed4 -Author: Paulo Zanoni -Date: Mon Aug 24 18:22:04 2015 -0300 - - kms_frontbuffer_tracking: print the status when it's not what we expect - - Printing the status on an unexpected failure is always the first thing - I do. So do this always. - - Signed-off-by: Paulo Zanoni - -commit a07d0a47be984ccb93c6bd968905bd13b7a3cfd9 -Author: Paulo Zanoni -Date: Mon Aug 24 18:01:47 2015 -0300 - - kms_frontbuffer_tracking: add slow_draw() subtest - - It fails on my SKL machine. - - Signed-off-by: Paulo Zanoni - -commit 229110442a4814b87859e2833688feb2881a2274 -Author: Paulo Zanoni -Date: Mon Aug 24 17:04:25 2015 -0300 - - kms_frontbuffer_tracking: wait for PSR to be HW Enabled & Active - - Make sure PSR is fully there. - - Signed-off-by: Paulo Zanoni - -commit c1fe951b8a08a4a42ede295cfa478cca8e230c22 -Author: Paulo Zanoni -Date: Mon Aug 24 17:02:12 2015 -0300 - - kms_frontbuffer_tracking: add options for setting the shared fb X/Y - - I'm using this to debug some aspects of the GTT tracking. - - While at it, do a small rename and fix the ASCII art. - - Signed-off-by: Paulo Zanoni - -commit 5e68ad9f8223f721c03f9915ac909ccab8a1433a -Author: Chris Wilson -Date: Fri Aug 21 22:26:42 2015 +0100 - - benchmarks/gem_exec_reloc: Allow profiling 0 relocs - - Signed-off-by: Chris Wilson - -commit 05f5e16eafb400669524265d1a506c0e6ae18c53 -Author: Thomas Wood -Date: Fri Aug 21 14:13:16 2015 +0100 - - lib: fix distcheck issues - - Signed-off-by: Thomas Wood - -commit 804e11f40defc1c53722914a449c6b2dcdbbf9a2 -Author: Thomas Wood -Date: Mon Aug 17 17:57:43 2015 +0100 - - lib: add a single include header - - Add a header that includes all the headers for the library. This allows - reorganisation of the library without affecting programs using it and - also simplifies the headers that need to be included to use the library. - - Signed-off-by: Thomas Wood - -commit a11879a4ab8840dae96867445ac27d100fc798d9 -Author: Thomas Wood -Date: Mon Aug 17 15:27:18 2015 +0100 - - assembler: remove built sources with make clean - - Built sources are generated by "make all", so should be removed by "make - clean". This also ensures "distcleancheck" passes. - - Signed-off-by: Thomas Wood - -commit c37b2352020accd261e28d71ad71e96d62d6ddb5 -Author: Mika Kuoppala -Date: Tue Aug 18 17:44:38 2015 +0300 - - tests/drv_hangman: Adjust to 64bit bb offsets - - commit e1f123257a1f7d3af36a31a0fb2d4c6f40039fed - Author: Michel Thierry - Date: Wed Jul 29 17:23:56 2015 +0100 - - drm/i915: Expand error state's address width to 64b - - changed the batch buffer address to be 64b. Fix the parsing - of gtt offset accordingly. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91638 - Cc: Akash Goel - Cc: Michel Thierry - Reviewed-by: Michel Thierry - Signed-off-by: Mika Kuoppala - -commit 0e25e5d92dd4303deb46f0a70dd097676e2842a8 -Author: Jani Nikula -Date: Thu Jun 18 15:17:47 2015 +0300 - - igt: remove deprecated reg access tools in favor of intel_reg - - intel_iosf_sb_read, intel_iosf_sb_write, intel_reg_dumper, - intel_reg_read, intel_reg_snapshot, intel_reg_write, intel_vga_read, and - intel_vga_write have been deprecated in favor of intel_reg. Remove the - deprecated tools. intel_reg does everything they do, and more. - - Signed-off-by: Jani Nikula - -commit 9b73ce43fecc71533603849f35dd3bd1233a0eea -Author: Chris Wilson -Date: Sun Aug 16 12:12:53 2015 +0100 - - overlay: Fix min frequency detection on BYT/BSW - - Signed-off-by: Chris Wilson - -commit 64590c7b768dc8d8dd962f812d5ff5a39e7e8b54 -Author: Paulo Zanoni -Date: Fri Aug 14 16:08:07 2015 -0300 - - kms_frontbuffer_tracking: reduce the FBC wait timeout to 2s - - Just like we did for PSR, let's do it for FBC. FBC gets reenabled in - just 50ms, so the 5000ms timeout is huge. On the other hand, we only - pay the 5000ms timeout full price 9 times when running - kms_frontbuffer_tracking --fbc-only, so this change shouldn't save too - much time. - - Signed-off-by: Paulo Zanoni - -commit f4db3b18841263f8f617a9f7f0aaf14fab7196d1 -Author: Paulo Zanoni -Date: Fri Aug 14 15:56:34 2015 -0300 - - kms_frontbuffer_tracking: reduce the PSR wait timeout to 2s - - PSR only takes up to 100ms to be enabled, but we were using 5000ms - timeouts. The problem with PSR is that the MMAP_GTT tests have to - assert that PSR is disabled and stays disabled during the whole - timeout, so that 5s cost is a little to high when we consider that we - do the full 5s wait 74 times when running kms_frontbuffer_tracking - --psr-only. - - By reducing to 2s we still make sure we're safe, since we're waiting - 20x the time PSR needs to get reenabled, and we reduce the runtime of - running kms_frontbuffer_tracking --psr-only from 14m10s to 10m29s. - - Signed-off-by: Paulo Zanoni - -commit 77b8af218cd2648f4d3ff671126c9d2500cade6e -Author: Chris Wilson -Date: Fri Aug 14 20:35:18 2015 +0100 - - benchmark/gem_exec_trace: Inline everything - - Avoid the globals and make the dispatch one huge function and hope GCC - works some magic. - - Signed-off-by: Chris Wilson - -commit a64e6c39b13c2a59d807cab9d4faefd4aaa49d0c -Author: Chris Wilson -Date: Fri Aug 14 20:31:48 2015 +0100 - - benchmark/gem_exec_tracer: Tweak to handle SNA - - SNA starts by feeding in deliberately bad ioctls in order to detect the - kernel interface versions. A quick solution is to always feed it to the - ioctl and only record the trace if it is valid. - - Signed-off-by: Chris Wilson - -commit 78120d8158555fd393eb73e7dc992388b6d03f05 -Author: Paulo Zanoni -Date: Wed Aug 12 15:42:15 2015 -0300 - - kms_frontbuffer_tracking: add subtests for rgb565 and rgb101010 - - Make sure valid formats work properly and invalid formats keep the - features disabled. - - Signed-off-by: Paulo Zanoni - -commit c3fb972ee9616d62f16d311fffdcb06c44ec46ec -Author: Paulo Zanoni -Date: Fri Aug 14 14:48:38 2015 -0300 - - kms_frontbuffer_tracking: fix psr-farfromfence assertions - - We're using GTT draws and they disable PSR. This test is mostly for - FBC anyway. - - Signed-off-by: Paulo Zanoni - -commit d675cf3ed7c7099fe8fa42e3f27d8fc200852275 -Author: Paulo Zanoni -Date: Fri Aug 14 14:09:08 2015 -0300 - - kms_frontbuffer_tracking: split prepare_subtest() in two functions - - And remove duplicated code by calling prepare_subtest_data() on - rte_subtest(). - - Signed-off-by: Paulo Zanoni - -commit 6de5b0611245c4949b5655890b47905eea71c34a -Author: Paulo Zanoni -Date: Fri Aug 14 10:43:21 2015 -0300 - - kms_frontbuffer_tracking: remove duplicated pairs on multidraw - - If we already tested the combination of m1+m2, don't test m2+m1 later: - the drawing pattern used already has 4 squares, so we're already - testing the "m2 followed by m1" case. - - This should reduce the test time from about 60s to about 30s. - - Signed-off-by: Paulo Zanoni - -commit a2904ead7487c6eba5d3ea8b93d7a9f45e883355 -Author: Paulo Zanoni -Date: Tue Jul 21 11:02:26 2015 -0300 - - kms_frontbuffer_tracking: SKIP if not enough stolen is available - - This is not an FBC bug. - - Signed-off-by: Paulo Zanoni - -commit f62a683acd1b8eb7626b9b1251e4c4e860f8c2f7 -Author: Paulo Zanoni -Date: Wed Aug 12 16:22:57 2015 -0300 - - kms_frontbuffer_tracking: use all drawing methods on multidraw_subtest - - Instead of having a single pair of methods per subtest. Having this in - pairs is not very useful since we end doing all the drawing methods - per subtest anyway. - - This saves a few modesets, which makes eDP slightly faster - about 22s - on my local machine. - - Signed-off-by: Paulo Zanoni - -commit b53bcf789b2619d786b25effcc83a461aaf0610b -Author: Paulo Zanoni -Date: Wed Aug 12 11:50:58 2015 -0300 - - kms_frontbuffer_tracking: improve support for multiple pixel formats - - We now have per-pixel-format FBs and CRC values. Also t->format to - indicate the format we're using on the subtest. We still only use the - default RGB888 format (AKA FORMAT_DEFAULT) for all tests since - multiplying the current number of tests by the number of new pixel - formats doesn't sound like a great idea. - - With this, it should be really easy to add new tests that use - different pixel formats. - - Also, if you want a full IGT run on a specific pixel format, all you - need to do is to change FORMAT_DEFAULT. - - Signed-off-by: Paulo Zanoni - -commit 3b176007899e81aa6254131d09a9693b13bdbcd6 -Author: Paulo Zanoni -Date: Tue Aug 11 15:40:35 2015 -0300 - - kms_frontbuffer_tracking: add information about more formats - - We're not using those formats yet, but a simple change to create_fb() - allows us to use these formats without problems now. - - Signed-off-by: Paulo Zanoni - -commit 606f039decec8623250979beb6f141ce4fa2f13c -Author: Paulo Zanoni -Date: Tue Aug 11 11:50:12 2015 -0300 - - kms_frontbuffer_tracking: introduce enum color - - We want to add support for different pixel formats and the current - hardcoded pixel values won't work with that. So add enum color and - its auxiliary functions so we can decide the pixel values based on the - chosen color enum. - - Signed-off-by: Paulo Zanoni - -commit 7009b10c429c33ea7258997901ee8ec1c67f75c7 -Author: Paulo Zanoni -Date: Tue Aug 11 10:36:46 2015 -0300 - - kms_frontbuffer_tracking: don't pass the format to create_fb() - - It is create_fb() who is going to decide the buffer format based on - the arguments provided by the caller. This is another step for the - non-XRGB8888 support. - - Signed-off-by: Paulo Zanoni - -commit e4b94900b560e38b8a8e1ff672a53621688f5987 -Author: Paulo Zanoni -Date: Tue Aug 11 10:26:46 2015 -0300 - - kms_frontbuffer_tracking: add a wrapper for igt_create_fb() - - The wrapper will do a few additional things when we add support for - formats different than XRGB8888. - - Signed-off-by: Paulo Zanoni - -commit 445182f26bd48bfefdec7064a7f4afafc8f52a1e -Author: Paulo Zanoni -Date: Thu Aug 13 19:02:34 2015 -0300 - - kms_frontbuffer_tracking: fix MMAP_WC assertions on PSR - - Now that the MMAP_WC operations call the dirty ioctl, PSR gets - reenabled after some time. So we have to adjust op_disables_psr() to - take that into account. - - Signed-off-by: Paulo Zanoni - -commit 9113c9aa9be5626d4d12a794c70860097ae59c1f -Author: Paulo Zanoni -Date: Thu Aug 13 17:37:06 2015 -0300 - - lib/igt_draw: break if we already wrote every pixel - - Due to the nature of accessing a tiled buffer in an untiled way, we - used to loop through the whole buffer all the time. Add a small - mechanism to just break in case we know we already wrote every pixel - we should have written. - - On kms_frontbuffer_tracknig/fbc-2p-primscrn-pri-shrfb-draw-pwrite - (with a 3200x1800 primary screen and a 1920x1080 secondary screen), I - could reduce the runtime from ~7.53s to ~6.01s. - - Signed-off-by: Paulo Zanoni - -commit 9194f4efdf89d9c2e9ab79a232e642b8664fa54f -Author: Paulo Zanoni -Date: Thu Aug 13 17:25:31 2015 -0300 - - lib/igt_draw: fix pwrite_tiled() - - Don't forget to flush in case we're in the last iteration of the loop. - This fixes failures of kms_frontbuffer_tracking when used with - --use-small-modes on eDP monitors. - - Signed-off-by: Paulo Zanoni - -commit caaf3b869f2be2758ba836244f07ad25c35ec7d5 -Author: Paulo Zanoni -Date: Mon Aug 3 14:41:35 2015 -0300 - - lib/igt_draw: add support for RGB565 and XRGB2101010 - - We need to test those pixel formats on the FBC code, so let's make - sure the drawing library works on them first. - - v2: Update the gtkdoc (Daniel). - - Signed-off-by: Paulo Zanoni - -commit a1fce7490c72c45c79cff89a39dee0b59a8f4c71 -Author: Paulo Zanoni -Date: Thu Aug 13 13:49:42 2015 -0300 - - lib/igt_core: use print("%s", #expr) instead of print(#expr) - - If I have a program with the following: - - igt_skip_on(i % 2 == 0); - igt_skip_on_f(i % 2 == 0, "i:%d\n", i); - igt_require(i % 2 == 0); - igt_require_f(i % 2 == 0, "i:%d\n", i); - - then I'll get compiler error messages complaining about format - conversions related to the '%' character used in the mod operation. So - put the whole string as a %s argument to avoid interpreting '%' and - any other possible chars. - - Signed-off-by: Paulo Zanoni - -commit 87a5f2d7762b5b8398c5f5899d796bb78dc827b7 -Author: Jesse Barnes -Date: Thu Aug 13 13:28:38 2015 -0700 - - tests/kms_setmode: mark simple clone test as basic - - Should cover simple, single CRTC mode sets. - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit e5839d240aa7adf759b39043f7d16f53e30a8da7 -Author: Jesse Barnes -Date: Thu Aug 13 13:26:30 2015 -0700 - - tests/kms_flip: add basic tests for flip, flip vs dpms, and flip modeset v2 - - Simple variants that don't do multiple output or interruptible testing. - - v2: add vblank variant, remove duplication (Daniel) - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 5134f2c96d53db6ac37a4d0311eb9808ae20a80e -Author: Jesse Barnes -Date: Thu Aug 13 13:14:12 2015 -0700 - - tests/pm_rpm: mark RTE and D3 tests as basic - - These always need to pass for basic PM functionality. - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 68d1b532fae03768012d0c16a2c0dd03eea64fcb -Author: Jesse Barnes -Date: Thu Aug 13 13:13:23 2015 -0700 - - tests/pm_backlight: mark simple test as basic - - We should be able to adjust the backlight and observe changes in sysfs. - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit ec4b76872d232faa7846e7c201e7fcfc98c682a9 -Author: Jesse Barnes -Date: Thu Aug 13 13:12:06 2015 -0700 - - tests/kms_addfb: mark simple fb creation tests as basic v2 - - We should always be able to create simple and tiled objects. - - v2: make the whole test basic (Daniel) - add to .gitignore - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 503420944d7359ea280f6445186bedcdfaceb698 -Author: Jesse Barnes -Date: Fri Aug 14 08:45:08 2015 -0700 - - tests/gem_tiled_pread: mark normal tests as basic v2 - - These simple tests should always pass. - - v2: drop pwrite variant as it's more of a stress test (Daniel) - add to .gitignore - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 5001640718d29daa8619647eff45f9e3e74fd151 -Author: Jesse Barnes -Date: Thu Aug 13 13:08:52 2015 -0700 - - tests/gem_pread/pwrite: mark normal tests as basic - - These should always pass. - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit c51c1ed7761082b99f2f39efcf43ee8e4df2c6ae -Author: Jesse Barnes -Date: Thu Aug 13 13:07:34 2015 -0700 - - tests/gem_mmap_gtt: mark basic access and copy tests as basic v2 - - These ones should always pass and are fairly quick. - - v2: add more tests (Daniel) - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 90c47b294741089a25480e1ef73ec4d0cc5d666c -Author: Jesse Barnes -Date: Thu Aug 13 13:05:34 2015 -0700 - - tests/gem_mmap: mark basic object creation tests as basic - - We should be able to create small and moderate sized objects quickly and - without errors. - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit b0d8d73d8b7e5befd613e49610cb22287a8a60f2 -Author: Jesse Barnes -Date: Thu Aug 13 12:58:25 2015 -0700 - - tests/drv_getparams: mark EU and subslice fetch as basic v2 - - Fundamental and simple functionality. - - v2: make whole test basic (Daniel) - add to .gitignore - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit e920d719b20f3b79e2c70dc59ae3f9858b65a639 -Author: Jesse Barnes -Date: Thu Aug 13 12:57:22 2015 -0700 - - tests/gem_flink, prime_self_import: mark flink and prime tests as basic v2 - - They're testing basic functionality and don't involve stress or race - induction. - - v2: use gem_flink and prime_self_import tests instead (Daniel) - add to .gitignore - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit dc9505a405cd6232f4dd6e7d7243a3df497b2f32 -Author: Jesse Barnes -Date: Wed Aug 5 16:09:35 2015 -0700 - - tests/drv_module_reload_basic: use linear_blits after module_reload for sanity check - - Reduces runtime a lot... - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 4409c8328442790317fb08503b646611dc807ced -Author: Jesse Barnes -Date: Wed Aug 5 16:09:17 2015 -0700 - - tests/drv_module_reload: rename drv_module_reload to include in BATs - - Absolutely-acked-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 0679702150157706a6def66b893b29c16345f4db -Author: Jesse Barnes -Date: Wed Aug 5 16:06:31 2015 -0700 - - tests/gem_storedw_loop: add new store_dword test to unify per-ring ones v2 - - There was a lot of duplication going on... Mark as basic while we're at - it as these should never fail. - - v2: add to .gitignore - - Reviewed-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit d568f69d5da9e4cc7bb7f1c405b3b8a17ac77fe3 -Author: Chris Wilson -Date: Fri Aug 14 13:40:01 2015 +0100 - - igt/gem_mmap: Add one more extra large bo - - Daniel complained that all the tests in gem_mmap.c were too quick. This - one aims to rectify that by double checking that if we mmap a buffer - larger enough to force swapping, everything still works. - - Also fix the test to exercise the different object sizes! - - Signed-off-by: Chris Wilson - -commit 8af62be2ada2d4a2c618a48548f4248ef397582f -Author: Chris Wilson -Date: Fri Aug 14 14:04:54 2015 +0100 - - lib: Allow caller to use uint64_t sizes with intel_require_memory() - - Allow the caller to ask how many extra large objects can be created and - still fit into memory. - - Signed-off-by: Chris Wilson - -commit 5c07135b7bd23ce0beae67cfd8a71ac63f543859 -Author: Mika Kuoppala -Date: Thu Aug 13 15:51:16 2015 +0300 - - tools/null_state/gen9: Send all components in VF state - - Fix - - commit 59cdc16b1a6f069f944ff17851a59edf8f72d45d - Author: Arun Siluvery - Date: Fri Jul 31 16:27:07 2015 +0100 - - tools/null_state/gen9: Send atleast one valid component in VF state - - to honor the Reviewed-by, send all four components as noted by - Ben in his review. - - Cc: Ben Widawsky - Cc: Arun Siluvery - Signed-off-by: Mika Kuoppala - -commit c049096eb627661182f76bc5d99b8c17c1e8b3d3 -Author: Paulo Zanoni -Date: Wed Aug 12 19:31:52 2015 -0300 - - kms_frontbuffer_tracking: don't test SPR or CUR on multidraw - - The goal of the multidraw subtest is to check if alternating drawing - methods can somehow break the feature. The plane we're drawing to - really shouldn't matter here - we have other tests to make sure - drawing on the different planes works correctly. So after this patch - we'll only run the multidraw subtest for the primary plane, not for - sprite and cursors anymore. - - This makes "--no-edp --fbc-only --1p-only" go from 2m29s to 1m40s on - my machine. - - Of course, we can still run these tests with the --show-hidden flag. - - Signed-off-by: Paulo Zanoni - -commit 78d076268cfb0319f9f44678905ac1a9ac989951 -Author: Paulo Zanoni -Date: Wed Aug 12 16:49:11 2015 -0300 - - kms_frontbuffer_tracking: don't test CUR or SPR planes on FBS_SHARED - - We already tested these planes for FBS_INDIVIDUAL, and there are no - reasons to believe those planes will behave differently under - FBS_SHARED, so save some time avoiding potentially useless tests. - - This makes "--no-edp --fbc-only --1p-only" go from 2m49s to 2m29s on - my machine. - - Signed-off-by: Paulo Zanoni - -commit 59cdc16b1a6f069f944ff17851a59edf8f72d45d -Author: Arun Siluvery -Date: Fri Jul 31 16:27:07 2015 +0100 - - tools/null_state/gen9: Send atleast one valid component in VF state - - A programming restriction exists for this instruction, atleast one component - of one valid vertex element must be enabled. - - Cc: Ben Widawsky - Cc: Chris Wilson - Signed-off-by: Arun Siluvery - Reviewed-by: Ben Widawsky - Signed-off-by: Mika Kuoppala - -commit dd82494724c1c11ceeeaac66a2ed0113ec13f8e4 -Author: Arun Siluvery -Date: Wed Aug 12 12:26:01 2015 +0100 - - lib/rendercopy_gen9: Setup Push constant pointer before sending BTP commands - - From Gen9, by default push constant command is not committed to the shader unit - untill the corresponding shader's BTP_* command is parsed. This is the - behaviour when set shader is enabled. This patch updates the batch to follow - this requirement otherwise it results in gpu hang. - - Set shader need to be disabled if legacy behaviour is required. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959 - Cc: Ben Widawsky - Cc: Joonas Lahtinen - Cc: Mika Kuoppala - Signed-off-by: Arun Siluvery - Tested-by: Mika Kuoppala - Reviewed-by: Joonas Lahtinen - Signed-off-by: Mika Kuoppala - -commit 8a68ec14536c802b2d869f2356d978346bf234f4 -Author: Mika Kuoppala -Date: Tue Aug 11 15:25:37 2015 +0300 - - lib/rendercopy_gen9: WaBindlessSurfaceStateModifyEnable - - Don't set the size of bindless surface state on rendercopy. - And as of doing so, take into account the workaround for setting - the command size. - - This was tried during hunting for - https://bugs.freedesktop.org/show_bug.cgi?id=89959. But no - impact was found. - - Cc: Arun Siluvery - Reviewed-by: Arun Siluvery - Signed-off-by: Mika Kuoppala - -commit d524a964fc88ec52002609d15cb8ccfc50cbc18a -Author: Derek Morton -Date: Thu Aug 13 11:27:35 2015 +0100 - - benckmarks/Android.mk: Fix building benchmarks for Android - - The commit "benchmarks: Do not install to system-wide bin/" changed - the benchmark file list from bin_PROGRAMS to benchmarks_PROGRAMS. - However Android.mk was not updated, resulting in IGT failing to - build for Android. - This commit adds that change. It also adds LOCAL_MODULE_PATH to - specify where the built benchmarks should be put. - - v2: I discovered that the existing definitions of LOCAL_MODULE_PATH - were creating what should have been an invalid path. Not sure how it - was ever working previously, but fixed now. - - Signed-off-by: Derek Morton - Signed-off-by: Thomas Wood - -commit 33bc41aa4108a0177372004d0b8f689e22bbd5ff -Author: Kristian Høgsberg Kristensen -Date: Mon Aug 10 15:40:04 2015 -0700 - - aubdump: Write header after figuring out the gen - - We have to defer figuring out the gen until we have a PCI ID, which we - don't have for sure until the first execbuffer2 ioctl. We can't write - the file header until we have the gen since we need to know the size of - offsets in the file format. Move the call to write_header() into the - dump_execbuffer2() where we have the gen. - - Signed-off-by: Kristian Høgsberg Kristensen - -commit 3156305aceb790d410580ea44f145119359292e6 -Author: Kristian Høgsberg Kristensen -Date: Mon Aug 10 15:37:47 2015 -0700 - - aubdump: Handle 48 bit ppgtt dumping - - Put 48 bit block offsets in the AUB file and track the bo offsets with - uint64_t. - - Signed-off-by: Kristian Høgsberg Kristensen - -commit 8a7c386f0a302be1c099804ab67f32c6965d3c7d -Author: Thomas Wood -Date: Wed Aug 12 16:33:09 2015 +0100 - - tests: update .gitignore - - Add missing entry to .gitignore and sort alphabetically. - - Signed-off-by: Thomas Wood - -commit a149fb238a38bd663171a19c8b3a536fbae158db -Author: Ville Syrjälä -Date: Tue Aug 11 19:11:12 2015 +0300 - - tests/gem_pwrite_snooped: Verify set_caching vs. pwrite clflush behaviour - - The test does the following - 1. set_domain src GTT - 2. set_caching src NONE - 3. pwrite src - 4. set_caching src CACHED - 5. blt src->dst - 6. pread dst - 7. verify data matches - - Signed-off-by: Ville Syrjälä - -commit 62426feec5343603ee67dd296674edda1871a7fb -Author: Ville Syrjälä -Date: Tue Jul 21 13:56:20 2015 +0300 - - tests/kms_pwrite_crc: Use drmModeSetPlane() instead of igt_plane_set_fb() - - igt_plane_set_fb()+igt_display_commit() have too much overhead, and that - causes the cache to get flushed before we flip, making the test - useless, at least on machines with small LLC. Switch to - drmModeSetPlane() to reduce the chance that the cache gets flushed - before we grab the crc. - - Still nowhere near 100% reliable on my IVB laptop with 3 MiB LLC, - but at least it can now hit the problem occasioanally. My desktop - IVB with 8 MiB LLC seems to hit it rather reliably. - - Signed-off-by: Ville Syrjälä - -commit adfc294384d2ee20d085e98f249fe73d1f4c4055 -Author: Daniel Vetter -Date: Fri Aug 7 19:27:30 2015 +0200 - - tests: Document ABI extension catchers - - Our invalid-flags/params testcases are meant to catch abi extensions - by just testing for the next available flag/param. Unfortunately we - need that since without those we forgot to write testcases for these - new flags way too often :( - - But it's not entirely clear why this is, so document this trick with - comments. - - Also gem_wait wasn't this paranoid, so change the testcase to be so. - - Signed-off-by: Daniel Vetter - -commit 5b0a8433fd0ff35062f0b1d3f50f5e04e76b576b -Author: Daniel Vetter -Date: Fri Aug 7 19:12:07 2015 +0200 - - lib/core: Add igt_reset_timeout - - Convenience wrapper suggested by Chris for igt_set_timeout(0, NULL). - - v2: While at it add an empty line in kms_flip to make - set/reset_timeout a visual block. - - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 370c9897230b4d4973d0a2ab641901081108d97b -Author: Daniel Vetter -Date: Fri Aug 7 19:01:23 2015 +0200 - - lib/core: Add optional reason for timeout failure - - "Timed out" isn't a terribly informative message, allow users to set - something more informative. Inspired by a request from Jesse. - - Cc: Jesse Barnes - Reviewed-by: Jesse Barnes - Signed-off-by: Daniel Vetter - -commit 24617ef82a4c58766675b3f1e4c194ca37fe9744 -Author: David Weinehall -Date: Fri Aug 7 15:53:57 2015 +0300 - - tests/gem_ctx_param_basic: support NO_ZEROMAP - - Signed-off-by: David Weinehall - Signed-off-by: Daniel Vetter - -commit 38b3bd6b7c09cdd8041e6b775933f69e0141efd3 -Author: Chris Wilson -Date: Tue Aug 11 12:57:38 2015 +0100 - - benchmarks: Add a microbenchmark for relocation overhead - - Allow specification of the many different busyness modes and relocation - interfaces, along with the number of buffers to use and relocations. - - Signed-off-by: Chris Wilson - -commit 98bcc18572f914b27cda07fc1ceae5b48a74fe51 -Author: Chris Wilson -Date: Mon Aug 10 18:51:03 2015 +0100 - - benchmarks/gem_exec_trace: Unmap each trace after replay - - Just on the off chance someone is replaying a bunch of traces, remember - to cleanup up. - - Signed-off-by: Chris Wilson - -commit b483e68173465408649e11122ee78060af9394f7 -Author: Chris Wilson -Date: Mon Aug 10 18:45:00 2015 +0100 - - benchmarks/gem_exec_trace: Mark the mmap as sequentially read - - Use madvise(MADV_SEQUENTIAL) to let the kernel optimise for our - straightforward sequential read pattern. - - Signed-off-by: Chris Wilson - -commit 3911621d0d23aced7feb1569b39f7fb52b309681 -Author: Chris Wilson -Date: Mon Aug 10 18:17:47 2015 +0100 - - benchmarks: Rename the gem_exec_trace tracer module - - Now that we actually install the benchmarks into a sane location, - slightly abuse it to put the tracer for gem_exec_trace alongside. - - Signed-off-by: Chris Wilson - -commit d9462e61f9b43828d6132679485a92108b60b2c8 -Author: Chris Wilson -Date: Mon Aug 10 16:08:31 2015 +0100 - - benchmarks/gem_exec_trace: Clear all new bo handles - - When reallocing the bo array, remember to set the new entries to 0. - - Signed-off-by: Chris Wilson - -commit 4c74a683c10ddfb2232cdb93f03c03295dde1201 -Author: Chris Wilson -Date: Fri Jul 24 14:13:49 2015 +0100 - - benchmarks: Do not install to system-wide bin/ - - These benchmarks are first-and-foremost development tools, not aimed at - general users. As such they should not be installed into the system-wide - bin/ directory, but installed into libexec/. - - v2: Now actually install beneath ${libexec} - - Signed-off-by: Chris Wilson - -commit 0393e7288ba3a640fcc9f0d8b15d7dee231a039c -Author: Chris Wilson -Date: Sun Aug 9 17:39:41 2015 +0100 - - benchmarks: Record and replay calls to EXECBUFFER2 - - This slightly idealises the behaviour of clients with the aim of - measuring the kernel overhead of different workloads. This test focuses - on the cost of relocating batchbuffers. - - A trace file is generated with an LD_PRELOAD intercept around - execbuffer, which we can then replay at our leisure. The replay replaces - the real buffers with a set of empty ones so the only thing that the - kernel has to do is parse the relocations. but without a real workload - we lose the impact of having to rewrite active buffers. - - Signed-off-by: Chris Wilson - -commit 74a806808618dad614d7ffb61d4562915695bbf8 -Author: Chris Wilson -Date: Sat Aug 8 21:31:08 2015 +0100 - - overlay: Handle execlists not setting the rings as active - - Signed-off-by: Chris Wilson - -commit 06aed34d384fc348c4bb52f302bbcf2c6c68bb3c -Author: Chris Wilson -Date: Sat Aug 8 20:54:49 2015 +0100 - - overlay: Add Broadwell+ ids from kernel i915_pciids.h - -commit 9c15167c611bbac1e702eb064044ec687bfa3703 -Author: Kristian Høgsberg -Date: Fri Aug 7 14:57:19 2015 -0700 - - tools/aubdump: Get PCI ID from getparam ioctl when we can - - Instead of doing an extra getparam ioctl to discover the PCI ID, we - can snoop it when the application queries it. - - Signed-off-by: Kristian Høgsberg - -commit 5f4fad31829b1c6dfcddb633d65e9e7066818cff -Author: Kristian Høgsberg -Date: Fri Aug 7 14:51:27 2015 -0700 - - tools/aubdump: Don't rely on open for discovering the drm fd - - DRI3 passes the drm fd over X protocol and as such we can't rely on - hooking open to discover the drm fd. Instead we look for drm ioctl - codes in the ioctl wrapper. If we don't have a drm fd and see - something that looks like a drm ioctl, we stat the fd to see if it's a - drm fd. If it is, we save it for later so we don't have to do an - extra stat on every ioctl. We can then drop the open wrapper, but we - keep the close wrapper so we can invalidate our cached drm_fd if it's - closed. - - Signed-off-by: Kristian Høgsberg - -commit db0f28aee8b7f95a10139993096d60ba2a89c6a5 -Author: Jesse Barnes -Date: Thu Aug 6 14:35:34 2015 -0700 - - Revert "tests/gem_ctx_param_basic: fix invalid params" - - This reverts commit 0b45b0746f45deea11670a8b2c949776bbbef55c. - - We want to check against our local copy of the params so we can at least - potentially catch new flag additions. - - Requested-by: Daniel Vetter - Signed-off-by: Jesse Barnes - -commit 0b45b0746f45deea11670a8b2c949776bbbef55c -Author: Jesse Barnes -Date: Thu Aug 6 13:12:46 2015 -0700 - - tests/gem_ctx_param_basic: fix invalid params - - Use -1 as the invalid param since we've added more since this test was - created, causing expected EINVAL failures to return an unexpected error - code. - - Signed-off-by: Jesse Barnes - -commit 1ae1d290bf0b0c0f6a1e8f81d47c2a4f5a51714a -Author: Derek Morton -Date: Mon Jul 27 11:30:58 2015 +0100 - - benchmarks/Android.mk, tools/Android.mk: Fix android build error - - Recently added tools / benckmarks have the same module name as - existing tests. Android does not allow duplicate modules. This - patch appends _benchmark and _tool to the module names used when - building benckmarks and tools to prevent clashes with tests of - the same name. - - Signed-off-by: Derek Morton - Signed-off-by: Daniel Vetter - -commit 995f2738adece4f7423f9ce9ac34ab0477844840 -Author: Paulo Zanoni -Date: Mon Jul 13 14:04:25 2015 -0300 - - lib: add igt_debugfs_read() - - A helpful function for when you want to read a whole debugfs file to a - string and don't want to worry about opening and closing file - descriptors and asserting buffer sizes. - - We've been using this already for kms_frontbuffer_tracking and - kms_fbcon_fbt, so the only test with new code here is kms_fbc_crc. - - Also notice that for kms_fbc_crc we had to increase the buffer size - since the file can sometimes be bigger than 64 bytes - depending on - the reason why FBC is disabled. - - Of course, there are probably many other programs we can patch, but - I'm not doing this now. - - v2: Add the macro to wrap sizeof() (Daniel). - v3: Add documentation for the macro too (Daniel). - - Signed-off-by: Paulo Zanoni - -commit ffd7321c701411c6ffb4aa5b983aacb92289908c -Author: Paulo Zanoni -Date: Wed Jul 8 16:00:45 2015 -0300 - - kms_frontbuffer_tracking: use the dirty ioctl after MMAP_WC calls - - We can't add this to igt_draw since igt_draw doesn't care whether it's - writing on a frontbuffer or not. - - PS: the ENOSYS is for Kernels without the patch implementing the - IOCTL. - - Signed-off-by: Paulo Zanoni - -commit cd33b47a47251eadd21815bfd2ecc8529c7bcf6d -Author: Paulo Zanoni -Date: Tue Aug 4 16:25:17 2015 -0300 - - tests/gem_mmap_wc: don't fail if the Kernel is too old for the getparam flag - - Just don't check the drmIoctl() return code: the "if (val)" should be - enough to prevent any problems. - - v2: Don't SKIP, just proceed (Chris). - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89739 - Cc: Chris Wilson - Reviewed-by: Chris Wilson - Signed-off-by: Paulo Zanoni - -commit 5f9bc98a55d8077f1b42e953d573c4e655832bfa -Author: Kristian Høgsberg Kristensen -Date: Wed Aug 5 11:55:09 2015 -0700 - - configure.ac: Fix chmod on intel_aubdump the right way - - autoconf executes the init commands after each file it creates, - causing these errors at configure time: - - ... - chmod: cannot access 'tools/intel_aubdump': No such file or directory - config.status: creating tools/Makefile - chmod: cannot access 'tools/intel_aubdump': No such file or directory - config.status: creating tools/intel_aubdump - config.status: creating tools/quick_dump/Makefile - ... - - Once it creates intel_aubdump, the errors go away. When I first added - the chmod command, I already had a tools/intel_aubdump in my tree and - didn't get the error. - - Split the intel_aubdump creation into its own AC_CONFIG_FILES() - invocation to avoid this. - - Signed-off-by: Kristian Høgsberg Kristensen - -commit 78e2a2f245fa66773f34ea68bdbcc2c62d382a9b -Author: Kristian Høgsberg Kristensen -Date: Wed Aug 5 11:53:17 2015 -0700 - - tools: Use right #include path for i915_drm.h - - pkg-config adds /usr/include/libdrm to the include path so we only need i915_drm.h - - Signed-off-by: Kristian Høgsberg Kristensen - -commit 86de4c60f38b0ff180cbaa64fcf992fc49546099 -Author: Kristian Høgsberg Kristensen -Date: Tue Aug 4 15:11:51 2015 -0700 - - configure.ac: Fix the intel_aubdump chmod to use topbuilddir - - Signed-off-by: Kristian Høgsberg Kristensen - -commit 220c7d1f91e590be74866710d786833938c18c40 -Author: Kristian Høgsberg Kristensen -Date: Tue Aug 4 15:00:50 2015 -0700 - - tools/aubdump: Add --device option for overriding device ID - - This lets us capture AUB traces for platforms different from the one - we're running on. - - Signed-off-by: Kristian Høgsberg Kristensen - -commit f47bdba8b0504661b5d291a8639f156cda993379 -Author: Kristian Høgsberg Kristensen -Date: Tue Aug 4 09:36:53 2015 -0700 - - tools/aubdump.c: Also define struct drm_i915_gem_userptr for compatibility - - Oops, we obviously also need to define the argument struct for userptr. - - Signed-off-by: Kristian Høgsberg Kristensen - -commit e4fa17df026d6b5d68ee221d177049cdd1ad6924 -Author: Kristian Høgsberg Kristensen -Date: Fri Jul 31 14:26:15 2015 -0700 - - tools/aubdump: #define DRM_IOCTL_I915_GEM_USERPTR if kernel headers don't - - Fix compile error on older kernels. - - Signed-off-by: Kristian Høgsberg Kristensen - -commit 0b5faefba35ab05bfe637964e0e8fb1075e3dd0a -Author: Kristian Høgsberg Kristensen -Date: Fri Jul 31 13:44:07 2015 -0700 - - tools: Add man page for intel_aubdump - - Signed-off-by: Kristian Høgsberg Kristensen - -commit e6a5d799fcdba567535a434789e107164072c15b -Author: Kristian Høgsberg Kristensen -Date: Wed Jul 29 23:12:16 2015 -0700 - - tools: Add LD_PRELOAD-based AUB dumper tool - - This does everything the aub dump functionality in libdrm does, but - without being part of libdrm. This moves the very developer oriented - functionality out of core libdrm and adds some flexibility in how we - activate it (we can specify filename, for example). Most importantly, - this lets us dump aub files for tools and/or drivers that don't use - libdrm, without having to add that code to each of those projects. - - The tool is used much like strace or valgrind. For example: - - $ intel_aubdump -v --output=stuff.aub -- glxgears -geometry 500x500 - - will launch glxgears with its options and enable aub dumping and pass - the -v and --output=stuff.aub options to the aub dumper. - - Signed-off-by: Kristian Høgsberg Kristensen - -commit 6bd42ce9c74f2b6d27b0263191295de232050ab5 -Author: Daniel Vetter -Date: Wed May 20 16:50:14 2015 +0200 - - tests/kms_addfb: Add testcass for garbage in unused planes - - Signed-off-by: Daniel Vetter - -commit 0591af9c76f21b1d9afd067adc6946799fc29179 -Author: Chris Wilson -Date: Tue Jul 28 20:02:54 2015 +0100 - - igt/gem_streaming_writes: Reorder setting EXEC_OBJECT_WRITE - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90944 - Signed-off-by: Chris Wilson - -commit 40ebf95163dcb233b556bb97e9864497623d7328 -Author: Chris Wilson -Date: Tue Jul 28 18:59:47 2015 +0100 - - igt/gem_streaming_writes: Bind into the GTT early - - If we are using a streaming GGTT write into the source, we need to - trigger an early fault in order to obtain a mappable offset. This is - required when later we start reserving execbuf object top-down to try - and avoid mappable space! - - Signed-off-by: Chris Wilson - -commit cd306d4e650d5280a40b15fe076f41eba081c0a0 -Author: Chris Wilson -Date: Fri Jul 24 18:54:11 2015 +0100 - - benchmark: Measure allocation time for objects - - A basic measurement, how fast can we create and populate an object with - backing storage? - - Signed-off-by: Chris Wilson - -commit 42a386b83bf6693826432111fc7564254c14df95 -Author: Chris Wilson -Date: Fri Jul 24 16:34:26 2015 +0100 - - benchmarks: Measure mmap fault latency - - Signed-off-by: Chris Wilson - -commit e984d4965fa98b3071893143c65e6232ff4053ec -Author: Chris Wilson -Date: Wed Jul 22 15:01:47 2015 +0100 - - benchmarks: Benchmarkify gem_exec_ctx - - Measure the overhead of execution when doing nothing, switching between - a pair of contexts, or creating a new context every time. - - Signed-off-by: Chris Wilson - -commit d49a868378f88685aadc601f9d5a9ae435565ece -Author: Michał Winiarski -Date: Fri Jul 24 16:43:33 2015 +0200 - - tests/drm_import_export: Add tests for prime/flink sharing races - - It is possible to race between unreference of the underlying BO and - importing it from prime_fd/name. Verify that the behaviour of libdrm - is consistent for prime/flink. - - v2: more comments in source file, dropped extra whitespace - - Signed-off-by: Michał Winiarski - Cc: Thomas Wood - Signed-off-by: Thomas Wood - -commit e14507ce987a0cfb0ba9dec39afcb08a9ebc0453 -Author: Chris Wilson -Date: Fri Jul 24 14:15:49 2015 +0100 - - benchmarks: Add kms_vblank to .gitignore - - Signed-off-by: Chris Wilson - -commit d88981f62bdcaafeb393bac22db6719d43de88c7 -Author: Chris Wilson -Date: Thu Jul 23 15:18:22 2015 +0100 - - benchmarks: Measure round-trip time for an immediate vblanks - - By measuring both the query and the event round trip time, we can make a - reasonable estimate of how long it takes for the query to send the - vblank following an interrupt. - - Signed-off-by: Chris Wilson - -commit af510c249d6d374267a2052da202ea7c3a6b20cf -Author: Chris Wilson -Date: Thu Jul 23 12:27:38 2015 +0100 - - benchmarks: gem_prw add the read/write switch to getopt - - In my haste to merge the two gem_pread/gem_pwrite, I forgot to write up - the command line switch to getopt. - - Signed-off-by: Chris Wilson - -commit f8628a2c9808fe191c98111a1d58d728f8d20e90 -Author: Chris Wilson -Date: Wed Jul 22 16:53:34 2015 +0100 - - benchmarks: Add simple mmap benchmarks - - Signed-off-by: Chris Wilson - -commit f689e2aa813340eb499ffe04369647044887c073 -Author: Chris Wilson -Date: Wed Jul 22 16:53:34 2015 +0100 - - benchmarks: Add simple pread/pwrite benchmarks - - Signed-off-by: Chris Wilson - -commit b7c33e09394d8d59eac3d0fc581f7190e031947d -Author: Chris Wilson -Date: Wed Jul 22 15:01:47 2015 +0100 - - benchmarks: Benchmarkify gem_exec_nop - - Signed-off-by: Chris Wilson - -commit a64cf28719a0d23d611c72a0a7cf369562330de9 -Author: Thomas Wood -Date: Mon Jul 20 18:08:29 2015 +0100 - - man: ensure rst files are included in the distribution tarball - - Signed-off-by: Thomas Wood - -commit 367691297072d56f497a9b9f9c486c79bb5ecb16 -Author: Dominik Zeromski -Date: Fri Jul 17 11:25:45 2015 +0200 - - lib/gpgpu_fill: Add SKL support - - SKL changed state base address command. - - Cc: Thomas Wood - Signed-off-by: Dominik Zeromski - Signed-off-by: Thomas Wood - -commit a017c2905a615d514ae38c8c624d70ef0b11be91 -Author: Dominik Zeromski -Date: Fri Jul 17 11:25:44 2015 +0200 - - lib/gpgpu_fill: Add BDW support - - BDW changed structure of surface state and interface descriptors. - Commands like state base address, gpgpu walker were extended. - - Cc: Thomas Wood - Signed-off-by: Dominik Zeromski - Signed-off-by: Thomas Wood - -commit ed816d560ce5a1d80a005a452ee0e4295ac1698f -Author: Dominik Zeromski -Date: Fri Jul 17 11:25:43 2015 +0200 - - lib: Move gpgpu_fill code to separate file - - The gpgpu fill utility functions are used in separate test so it's - logical to keep them in separate file. This is similar to what media - spin test did in the past. - - Functionally only gpgpu kernel changed. Send instruction payload size - was reduced. Since offset is incremented by 0x10 bytes there is no point - in using larger writes. - - Cc: Thomas Wood - Signed-off-by: Dominik Zeromski - [Thomas: Fix typo of gpgpu_fill.h in Makefile.sources] - Signed-off-by: Thomas Wood - -commit 3c294a8fa3a3692bab5abe579375edf96ee3b081 -Author: Derek Morton -Date: Fri Jul 17 10:15:39 2015 +0100 - - Android.mk: Disable tools that do not build for android - - Disable the tools / demo code that do not currently build - for android until they can be fixed. - - Affected tools / demos - intel_display_crc - intel_sprite_on - - v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO - flag. - v3: removed intel_reg from the skip list as Thomas has prepared - a patch to fix it for Android. - - Signed-off-by: Derek Morton - Signed-off-by: Thomas Wood - -commit e65c69b995590ccd7f209b1e516819b1248d4e38 -Author: Thomas Wood -Date: Thu Jul 16 17:39:59 2015 +0100 - - lib: exit immediately if igt_fail is called in an exit handler - - Exit immediately if the test is already exiting and igt_fail is called. - This can happen if an igt_assert fails in an exit handler. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91349 - Signed-off-by: Thomas Wood - -commit 51576b7ad67074bbee6da0e0ff96d783dbd4ea3f -Author: Thomas Wood -Date: Thu Jul 16 11:53:11 2015 +0100 - - tools/Android.mk: add any extra program sources - - v2: remove unintended change and fix source file duplication errors - (Derek Morton) - - Cc: Derek Morton - Signed-off-by: Thomas Wood - -commit 80f1553780d0d167cca8bd456a7deb3ff5d9e58e -Author: Thomas Wood -Date: Thu Jul 16 11:41:32 2015 +0100 - - intel_reg: support platforms without sys/io.h - - Based on an idea from Jani Nikula. - - Cc: Jani Nikula - Cc: Derek Morton - Signed-off-by: Thomas Wood - -commit 0705ce6d15320a153c137b4a2119496a7f9c49f1 -Author: Chris Wilson -Date: Sun Jul 19 18:08:20 2015 +0100 - - igt/stats: Fixup tests to compile after interface changes - - Signed-off-by: Chris Wilson - -commit d9c3f0b50cd4f27191a721fe64f47fdc0754f9ef -Author: Chris Wilson -Date: Sun Jul 19 12:44:59 2015 +0100 - - tools: Add a simple stats generator 'igt_stats' - - A rudimentary tool on top of the igt_stats library. Reads a list of - numbers from stdin or from a file and prints the estimate of the central - location, aka average. - - Signed-off-by: Chris Wilson - -commit 8506cdcaa59ba90fcccda762d9307528d9f4c5c7 -Author: Chris Wilson -Date: Sun Jul 19 15:01:42 2015 +0100 - - lib: Allow storing floating point values in igt_stats - - We don't always have precise integers with which to store, so allow - degrading to double precision floating point based on available input. - - Signed-off-by: Chris Wilson - -commit fdefdd48f61b39d2af825ccdba11fafcaf58031a -Author: Michał Winiarski -Date: Thu Jul 16 13:19:09 2015 +0200 - - tests/gem_reg_read: Extend and check for valid 36b counter - - When reading the timestamp register with single 64b read, we are observing - invalid values on x86_64: - - [f = valid counter value | X = garbage] - - i386: 0x0000000fffffffff - x86_64: 0xffffffffXXXXXXXX - - Test checks if the counter is moving and increasing. - Add a check to see if we can use (reg | 1) flag to get a proper 36b timestamp, - shifting the value on x86_64 if we can't. - - v2: More iterations of monotonic test, comments, minor fixups (Chris) - v3: Skip tests if reg_read is not supported - - Cc: Chris Wilson - Reviewed-by: Chris Wilson - Signed-off-by: Michał Winiarski - Signed-off-by: Damien Lespiau - -commit 32c898849bd4f087e5b816b6e9e842edd5ce81d6 -Author: Chris Wilson -Date: Wed Jul 15 16:18:10 2015 +0100 - - igt/gem_eio: Waiting on a hung batch should report -EIO - - If we are waiting on a handle, and its request is cancelled due to a - hang, we should report that explicitly through the ABI. - - Signed-off-by: Chris Wilson - -commit 7f952bd976416196f628c42a8d7bf77fe3c1540f -Author: Paulo Zanoni -Date: Mon Jul 13 14:09:30 2015 -0300 - - kms_frontbuffer_tracking: don't keep debugfs open - - Make the code smaller and simpler, also ready for when we move - debugfs_read() to lib/. - - Signed-off-by: Paulo Zanoni - -commit 1048aa9aa5a9f095800ba41318af9ea351e943e9 -Author: Paulo Zanoni -Date: Thu Jul 9 13:32:16 2015 -0300 - - tests: add kms_fbcon_fbt - - This test should test the interactions between fbcon and the - frontbuffer tracking infrastructure. - - Right now the PSR test fails, but as soon as we merge the following - kernel patches, the test wills tart passing: - - drm/i915: PSR: Flush means invalidate + flush - - drm/i915: fbdev restore mode needs to invalidate frontbuffer - - drm/i915: fbdev_set_par reliably invalidating frontbuffer - - I didn't want to make this a subtest of kms_frontbuffer_tracking just - because when I wrote it, I really didn't have in mind the fact that - someone might just close the DRM fd in the middle of a subtest. - - After this commit we'll have a little bit of duplicated code among - tests. I'll clean this up later. - - v2: - - Refactor the code a little bit. - - Add the suspend subtests. - - Signed-off-by: Paulo Zanoni - -commit 7c5a218cc31e95f5b8b74dba80488ca37b9d85fd -Author: Paulo Zanoni -Date: Mon Jul 13 17:30:43 2015 -0300 - - kms_frontbuffer_tracking: implement suspend subtest - - Make sure we survive suspend/resume. - - Signed-off-by: Paulo Zanoni - -commit 1c389f69f0b188edd47eca1901f62ba36a59f37f -Author: Paulo Zanoni -Date: Mon Jul 13 17:08:17 2015 -0300 - - kms_frontbuffer_tracking: allow passing a NULL pattern - - So we don't need to initialize CRCs we won't use. This makes the - modesetfrombusy and badstride tests a little faster. - - Signed-off-by: Paulo Zanoni - -commit 91f097aefa29ff0d6b0b97f204f2bd1e3e5f0c3d -Author: Paulo Zanoni -Date: Mon Jul 13 16:56:06 2015 -0300 - - kms_frontbuffer_tracking: simplify subtest enumeration - - Just a small bikeshed. - - Signed-off-by: Paulo Zanoni - -commit 04d1311fc3d2127d609b5c5e670bf9887652cb17 -Author: Paulo Zanoni -Date: Mon Jul 13 16:08:36 2015 -0300 - - kms_frontbuffer_tracking: add farfromfence subtest - - Make sure we notice in case our crtc->y handling is still wrong. - - Signed-off-by: Paulo Zanoni - -commit cb3861a9e3f1bc12765160345bb0dd1d543f5086 -Author: Paulo Zanoni -Date: Fri Jul 10 17:53:25 2015 -0300 - - kms_frontbuffer_tracking: implement badstride test - - Test strides that are either completely invalid or just result in - disabled FBC. - - Signed-off-by: Paulo Zanoni - -commit 4deb562659edc1b4d53024b6ef6e183b4f94f768 -Author: Paulo Zanoni -Date: Tue Jul 14 12:45:04 2015 -0300 - - configure: require libdrm >= 2.4.55 - - And drop the now unnecessary universal plane definitions. The 2.4.55 - version is already quite old, so we should be fine. - - Thanks to Thomas Wood for quickly spotting this. - - Signed-off-by: Paulo Zanoni - -commit 19e4632407cfe9fdfe5e067dfaaeaef4d5bf669f -Author: Paulo Zanoni -Date: Mon Jul 13 16:14:55 2015 -0300 - - kms_frontbuffer_tracking: only force std_1024_mode on HSW - - Since on BDW the big modes work fine, I want to test them without - having to recompile the test every time. Let's make std_1024_mode part - of opt.small_modes. - - Signed-off-by: Paulo Zanoni - -commit a7cfd224ba9b2c6735875e27f480b6bbd40ae4d9 -Author: Paulo Zanoni -Date: Mon Jul 13 11:08:02 2015 -0300 - - kms_frontbuffer_tracking: remove enum feature_status - - After the last commit, it's not really needed anymore, so let's get - rid of it: less code lines and less non-standard enums. - - Signed-off-by: Paulo Zanoni - -commit 775fd7771565c7820eeb2406d12bec3ddbfe252d -Author: Paulo Zanoni -Date: Fri Jul 10 17:55:42 2015 -0300 - - kms_frontbuffer_tracking: improve checks for disabled features - - Make sure the features are disabled and stay disabled. Otherwise we - could just wrongly think they are disabled while they are just in the - process of being enabled. - - Signed-off-by: Paulo Zanoni - -commit ca97e784558d48915e3d9056b98c028d46e0c799 -Author: Paulo Zanoni -Date: Fri Jul 10 17:20:23 2015 -0300 - - kms_frontbuffer_tracking: rename enum fbs - - I tried explaining these to people twice and realized how bad the - current naming was. Let's hope the new one is better. - - The downside is that the tests were renamed and patches mentioning - them can't be fixed. - - Signed-off-by: Paulo Zanoni - -commit b0427442f90a82707cd2ffe0ee94ed73549d9ffe -Author: Paulo Zanoni -Date: Fri Jul 10 12:50:27 2015 -0300 - - kms_frontbuffer_tracking: add different ways to flip - - So we can make sure all code paths are properly exercised and lead to - proper frontbuffer tracking. - - Signed-off-by: Paulo Zanoni - -commit a1d4b553a75a70baad2b08cf53ef62fd65ea4856 -Author: Paulo Zanoni -Date: Fri Jul 10 15:25:47 2015 -0300 - - kms_frontbuffer_tracking: fix fullscreen subtest assertions - - Only really assert FBC_DISABLED in case the primary plane is actually - disabled. If the sprite plane is covering the whole screen but the - primary plane is still enabled, FBC can remain enabled. - - Signed-off-by: Paulo Zanoni - -commit 344dab22e994ab1d5ccf6241d6bf099eeeeaf8cf -Author: Paulo Zanoni -Date: Fri Jul 10 15:54:34 2015 -0300 - - kms_frontbuffer_tracking: avoid huge strides during normal operation - - We want to restrict huge strides to the yet-to-be-implemented - stride-size-specific subtest. - - Signed-off-by: Paulo Zanoni - -commit c2d656c5d67909537e61cd6e940038e91f558ac2 -Author: Paulo Zanoni -Date: Wed Jul 8 15:49:09 2015 -0300 - - kms_frontbuffer_tracking: don't hardcode the X/Y big FB offset - - While debugging the test failures I tried different values for the - offsets, so having a central place to change them is the only sane - way. - - Signed-off-by: Paulo Zanoni - -commit 9ca8a1bade2a4d267857ecb5f107f207a6ca3107 -Author: Paulo Zanoni -Date: Mon Jul 13 14:13:46 2015 -0300 - - pm_rpm: remove pm_status_fd declaration - - This was forgotten since we moved some code to igt_aux.c a long time - ago. - - Signed-off-by: Paulo Zanoni - -commit b81f7db593a74daeb8c8e4216743fa985a7c03de -Author: Matt Roper -Date: Wed Jul 1 15:45:21 2015 -0700 - - kms_universal_plane.c: Update sanity checks for gen9 - - SKL and BXT have some new plane capabilities that previous generations - didn't have; we need to update some of our universal plane tests to - expect success rather than failure when running on these platforms. - - Signed-off-by: Matt Roper - -commit 8ad1e4077879a111f341dbfd2e0fee84efc9f57e -Author: Abdiel Janulgue -Date: Tue Jun 16 13:37:44 2015 +0300 - - tests/gem_exec_params: check invalid flags for Resource Streamer - - Make sure resource streamer flags works only in correct ring in - addition to checking next flag after the RS boundary fails. - - v2: Make sure we reject RS on pre-hsw. - v3: Don't skip 1<<15 for the exec flags (Jani Nikula) - - Cc: Daniel Vetter - Signed-off-by: Abdiel Janulgue - Signed-off-by: Thomas Wood - -commit ec9e5996d1c54d71c1c9cd14755ec6eddfdb0680 -Author: Damien Lespiau -Date: Thu Jul 2 14:59:25 2015 +0100 - - build: Don't use automake's conditional in a Makefile.sources - - I just remembered that those Makefile.sources files where also - included by the Android build system, so we can't use automake's - conditionals in there. - - So, we want to use GNU make's one. Unfortunately, after all those years, - GNU automake still doesn't do anything useful with GNU make's ifeq: - - lib/Makefile.sources:66: error: else without if - - automake will helpfully signal that the 'else' corresponding to the - 'ifeq' doesn't have a corresponding 'if'. Well, yeah, thanks. - - Fortunately, we can work around this by cunningly inserting a space - before 'ifeq', 'else' and 'endif' and fool automake's regex-based - checks. - - Signed-off-by: Damien Lespiau - -commit 64295c67e908d59606fafe35e2d2363802c7faec -Author: Damien Lespiau -Date: Thu Jul 2 11:24:02 2015 +0100 - - build: Add -lm to tests - - Since the introduction of igt_stats and its usage in gem_exec_nop, we - need to link the tests against libm. My rebasing bot complained when - linking gem_exec_nop: - - lib/igt_stats.c:492: undefined reference to `sqrt' - - Signed-off-by: Damien Lespiau - -commit e5653d5f1d1b349ec320b056d3e6e17008c256a7 -Author: Damien Lespiau -Date: Wed Jul 1 23:40:36 2015 +0100 - - build: Add an option to not use the git hash in version - - When developing, it's quite annoying that the version changes every - commit, causing the library to be rebuild and every single binary - re-linked. - - Add a config option to skip that. - - I remember Ville asking for this "feature" as well. - - v2: Option is now called --disable-git-hash (Thomas) - Various spelling mistakes (Thomas) - - Cc: Ville Syrjälä - Signed-off-by: Damien Lespiau - -commit 0a01a190f6f7b2256d6efdd49018f43023f389dd -Author: Damien Lespiau -Date: Wed Jul 1 23:02:31 2015 +0100 - - build: Add DEBUG_FLAGS to tools and self-tests - - Makes using GDB better on those binaries. - - Signed-off-by: Damien Lespiau - -commit 390653acfb47664ffebe07a6928fa6b0fc18f4e8 -Author: Damien Lespiau -Date: Tue Jun 30 00:15:15 2015 +0100 - - aux: Don't evaluate several times the arguments of min() and max() - - Signed-off-by: Damien Lespiau - -commit 643aab2249992f4c4ad75e98ef3d43f3c6700895 -Author: Damien Lespiau -Date: Thu Jul 2 00:16:07 2015 +0100 - - stats: Add wikipedia links to get_trimean() and get_iqm() - - Useful knowledge for anyone looking at the documentation and following - the linkes. - - Signed-off-by: Damien Lespiau - -commit d01ebbd97ddb323564c75bfaaa374011fde4cd38 -Author: Thomas Wood -Date: Mon Jun 29 16:47:14 2015 +0100 - - docs: various documentation fixes - - Signed-off-by: Thomas Wood - -commit 8a109f94b9205222f79f20350750b39dd4b068cd -Author: Thomas Wood -Date: Mon Jun 29 14:42:52 2015 +0100 - - docs: fix duplicated ID error - - Signed-off-by: Thomas Wood - -commit 85f6d82d3ccde981382b784b67a5cc2b19dfa4bb -Author: Thomas Wood -Date: Mon Jun 29 14:37:13 2015 +0100 - - docs: fix "no link" warning - - igt_save_module_param is an internal static function and therefore isn't - included in the public API documentation. - - Signed-off-by: Thomas Wood - -commit f01e0552d6b94d7eb2d87e388ba5be596234886c -Author: Thomas Wood -Date: Mon Jun 29 14:31:06 2015 +0100 - - docs: add the annotation glossary - - Signed-off-by: Thomas Wood - -commit 5d80872009d4f3509e7e2b7a236b27d5002aff15 -Author: Thomas Wood -Date: Mon Jun 29 11:03:39 2015 +0100 - - docs: override section id to avoid '/' in filenames - - The section id is generated from the section title and is used to create - the html output filename, which therefore causes problems if it includes - a '/' character. - - Cc: Damien Lespiau - Signed-off-by: Thomas Wood - -commit 614895fec12a66376167c23294157a8f69014e54 -Author: Chris Wilson -Date: Wed Jul 1 20:51:54 2015 +0100 - - igt/gem_exec_nop: Control boost/idle frequencies - - Signed-off-by: Chris Wilson - -commit b43070987e8b926e7b487e7717e8b58197fd03cf -Author: Chris Wilson -Date: Wed Jul 1 13:53:07 2015 +0100 - - igt/gem_exec_nop: Wait between runs - - In order to keep the GPU in a consistent state between samples, we have - to wait for it to fall asleep before proceeding. - - For fun hook up igt_stats. - - Signed-off-by: Chris Wilson - -commit 2d305f61995cc896aaa1d3be01c33d90515c22e0 -Author: Chris Wilson -Date: Wed Jul 1 18:52:46 2015 +0100 - - stats: Add trimean - - https://en.wikipedia.org/wiki/Trimean - - The trimean is a the most efficient 3-point L-estimator (estimator - of central tendency, i.e. average), even more robust than the - median at estimating the average of a sample population. - - Signed-off-by: Chris Wilson - -commit 19135a34471ec4da4d7cc8493c371b8c38879f0b -Author: Chris Wilson -Date: Wed Jul 1 13:50:02 2015 +0100 - - stats: Add the interquartile mean (IQM) - - https://en.wikipedia.org/wiki/Interquartile_mean - - The IQM is a truncated mean and so is very similar to the scoring - method used in sports that are evaluated by a panel of judges: - discard the lowest and the highest scores; calculate the mean - value of the remaining scores. - - It's useful to hide outliers in measurements (due to cold cache etc), - without having to worry too much about the actual distribution. - - Signed-off-by: Chris Wilson - -commit 669b5da2bc4ef8d80405aef96ebb831a39608db4 -Author: Damien Lespiau -Date: Tue Jun 30 00:15:15 2015 +0100 - - tools: Add an intel_firmware_decode tool - - So we can inspect fw headers. Sample output: - - Firmware: skl_dmc_ver1_18.bin (7892 bytes) - CSS header (128 bytes) - module_type: DMC (9) - header_len: 32 - header_ver: 0x10000 - module_id: 0x0 - module_vendor: 0x0 - date: 0x7df060c - size: 1973 - key_size: 0 - modulus_size: 0 - exponent_size: 0 - version: 1.18 (0x10012) - kernel_header_info: 0x0 - Package header (256 bytes) - header_len: 64 - header_ver: 1 - num_entries: 3 - Firmware #1 - stepping: A.* - offset: 4294967295 - Firmware #2 - stepping: B.* - offset: 4294967295 - Firmware #3 - stepping: *.* - offset: 0 - 0x7f0867143000 - 0x7f0867143180 - signature: 0x40403e3e - header_len: 128 - header_ver: 1 - dmcc_ver: 520 - project: 0x900 - fw_size: 1845 - fw_version: 0x10008 - mmio_count: 3 - write(0x0008f074, 0x00002fc0) - write(0x0008f004, 0x02500204) - write(0x0008f034, 0xc003b400) - - Signed-off-by: Damien Lespiau - -commit ad411e2d5de78b621f6e9c628f8a96bd79425057 -Author: Joonas Lahtinen -Date: Fri Jun 26 14:52:34 2015 +0300 - - tests/gem_ringfill: Add {render,blitter}-forked-1 subtests. - - Add forking subtests to gem_ringfill. Tests cause consistent GPU - hangs on SKL. - - v2: Removed noop parts. - v3: - - Allow executing the tests in order too (Chris Wilson). - - Rename the tests to -forked-1 - - Cc: Mika Kuoppala - Cc: Chris Wilson - Signed-off-by: Joonas Lahtinen - [ickle: Extend to cover forked-N] - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959 - -commit 46f277b90b998560eb0cf895f71ca667d2ef8a39 -Author: Damien Lespiau -Date: Sat Jun 27 18:03:15 2015 +0100 - - stats: Exercise the reallocation paths - - Signed-off-by: Damien Lespiau - -commit 66e0bf66da4b06d9495025b053d4d7fe73c86fc7 -Author: Damien Lespiau -Date: Sat Jun 27 17:49:40 2015 +0100 - - stats: Spwan igt_init_with_size() from igt_init() - - It's all about good looking APIs. - - Signed-off-by: Damien Lespiau - -commit 00432ff260beba0bf6535d7fd1c0275de303ed57 -Author: Damien Lespiau -Date: Sat Jun 27 17:34:51 2015 +0100 - - stats: Allow the underlying arrays to grow at will - - Chris mentioned he wanted to be able to measure a variable "for one - second" and use igt_stats to store them. That's one case where we don't - know the number of data points upfront. - - We should really support that, so here it is. - - v2: Just free ->sorted when a new capacity is needed. - ensure_sorted_values() will then reallocate the array to the new - capacity on demand (Chris) - - Signed-off-by: Damien Lespiau - -commit 817ea87b6edab2d25a2994f076562ee03aa91fc6 -Author: Damien Lespiau -Date: Sat Jun 27 16:42:50 2015 +0100 - - stats: Test we do correctly invalidate the sorted array - - Chris had a doubt, and I was lazy and didn't do a similar test for the - quartiles/median than for the mean (test_invalidate_mean()). Plug that - gap. - - Signed-off-by: Damien Lespiau - -commit fabde384a33324dc9a9c55c1f4003196ec90564c -Author: Damien Lespiau -Date: Sat Jun 27 15:49:26 2015 +0100 - - stats: Add support for the interquartile range (IQR) - - IQR is a good measure of dispersion. - - Signed-off-by: Damien Lespiau - -commit 1b8997b3f89f5c7632782d2e7f8509a0f8176891 -Author: Damien Lespiau -Date: Sat Jun 27 15:33:58 2015 +0100 - - stats: Add support for quartiles (and thus median) - - More stuff, quite useful characteristics of a dataset. - - Signed-off-by: Damien Lespiau - -commit 3839bacde884a0d8ce55956b3221175a0078844b -Author: Damien Lespiau -Date: Sat Jun 27 15:32:23 2015 +0100 - - stats: Add a bulk version of _push() - - In case we want to push a bunch of values in one go. - - Signed-off-by: Damien Lespiau - -commit 2fe286985f825128142f56df5dc806a78338b308 -Author: Damien Lespiau -Date: Sat Jun 27 15:31:19 2015 +0100 - - stats: Use igt_assert_eq_double() when asserting on doubles - - Lucky enough to have exact values, == works! - - Signed-off-by: Damien Lespiau - -commit 0a38e977c026fee3a499946652263b2adfe7c27c -Author: Damien Lespiau -Date: Sat Jun 27 15:26:50 2015 +0100 - - lib: Add double versions of igt_assert_cmp() and igt_assert_eq() - - Signed-off-by: Damien Lespiau - -commit 23888526c7c979a40218bb8bc669fb383d86c5c3 -Author: Damien Lespiau -Date: Sat Jun 27 15:26:13 2015 +0100 - - docs: Add documentation for igt_assert_cmpuint() - - Signed-off-by: Damien Lespiau - -commit f660d0a054d559b47525d42e2a4b55057ec8e417 -Author: Damien Lespiau -Date: Sat Jun 27 15:16:22 2015 +0100 - - docs: Add documentation for igt_assert_u32() - - Signed-off-by: Damien Lespiau - -commit 4dca31b2d60019f9cdeb35b1922126cbbe1cb7af -Author: Damien Lespiau -Date: Sat Jun 27 11:16:52 2015 +0100 - - docs: Fix a "libraray" typo - - Signed-off-by: Damien Lespiau - -commit 0e4c175e04abadc1f0f76e3c144debf1527cf057 -Author: Damien Lespiau -Date: Sat Jun 27 11:12:01 2015 +0100 - - stats: Add igt_stats_get_range() - - Somewhat useful, for instance to size an histogram. - - Signed-off-by: Damien Lespiau - -commit 4a89a841a11cb872f9b0b0959c306fcb96f87d75 -Author: Damien Lespiau -Date: Sat Jun 27 09:45:42 2015 +0100 - - stats: Add functions to retrieve min/max values of the dataset - - Signed-off-by: Damien Lespiau - -commit 87009f3d7b155bc2c650d1395f74a2c6e80f0cf6 -Author: Damien Lespiau -Date: Sat Jun 27 09:41:57 2015 +0100 - - stats: Factor out a fixture to initialize stats - - We're going to use this simple fixture once more, might as well make a - function instead of copy/pasting code. - - Signed-off-by: Damien Lespiau - -commit 17ed69fbb817bff6f76d3e3beffc2fd30abdf187 -Author: Damien Lespiau -Date: Fri Jun 26 18:19:42 2015 +0100 - - stats: Add a note about the standard deviation derived from unbiased variance - - Signed-off-by: Damien Lespiau - -commit da123adeae70863c967e14035f272b89371a5fd5 -Author: Damien Lespiau -Date: Fri Jun 26 18:04:34 2015 +0100 - - stats: Add a getter for the population property - - Signed-off-by: Damien Lespiau - -commit 3a5cf84317197cdac88196cda76c6a7e08943f20 -Author: Damien Lespiau -Date: Fri Jun 26 17:02:09 2015 +0100 - - stats: Add a way to specify if the data set is a population or a sample - - This changes how we compute the variance. We want an unbiased variance - when reasoning about a sample. - - Signed-off-by: Damien Lespiau - -commit a2f6fd3725f50919c79694f1e24c1dec2752c875 -Author: Damien Lespiau -Date: Fri Jun 26 16:57:55 2015 +0100 - - stats: Add gtkdoc section for igt_stats - - Signed-off-by: Damien Lespiau - -commit 087a8d1c63b3d5863a14ff10002fde683b295592 -Author: Damien Lespiau -Date: Fri Jun 26 14:31:58 2015 +0100 - - stats: Add header gards - - Sigh. - - Signed-off-by: Damien Lespiau - -commit 6ebd8c2dc3291bd5776a0511e61a019a1444497f -Author: Damien Lespiau -Date: Fri Jun 26 14:28:41 2015 +0100 - - doc: Remove i-g-t/intel prefixes and capitalize section titles - - Looks better! - - Signed-off-by: Damien Lespiau - -commit 203c3841fc6bf9bd2b71ff9ce8e86874375eec1e -Author: Damien Lespiau -Date: Fri Jun 26 13:55:01 2015 +0100 - - stats: Zero the whole structure at init() time - - Because the structure started small, I initialized every member - directly, but that means that the new fields added weren't properly - initialized (sigh!). Zero the whole thing first then. - - Also, the punishment for introducing a bug should be to write the - corresponding unit test. It's not a perfect one, but I'll take it. - - Signed-off-by: Damien Lespiau - -commit 76ea7b913373d1291a95706dfede7e48a812777e -Author: Damien Lespiau -Date: Fri Jun 26 00:20:44 2015 +0100 - - tests/stats: Make sure we properly invalidate the cached mean - - Sure, that's an implementation details, but make sure we do recompute - the mean when we add a new value. - - Signed-off-by: Damien Lespiau - -commit 515cec1210764241153f5d46d70ba5e943201b14 -Author: Damien Lespiau -Date: Thu Jun 25 23:59:21 2015 +0100 - - stats: Add a way to retrieve the standard deviation - - Signed-off-by: Damien Lespiau - -commit 05c10f940f9df3a5b24e2a0b476052fbe5a22282 -Author: Damien Lespiau -Date: Thu Jun 25 23:57:49 2015 +0100 - - stats: Use an algorithm popularised by Knuth to compute mean and variance - - Suggested-by: Chris Wilson - Signed-off-by: Damien Lespiau - -commit 9986282c2bb4508a1fd9b774e30e1f4e405ac82e -Author: Damien Lespiau -Date: Fri Jun 26 00:16:48 2015 +0100 - - tests/igt_stats: Call igt_stats_fini() to not leak the array - - Sure, it'll be freed at exit(), but might as well be a bit pedantic. - - Signed-off-by: Damien Lespiau - -commit e55a11d3ebceaf777dba369076e8e842a8479360 -Author: Damien Lespiau -Date: Thu Jun 25 23:44:20 2015 +0100 - - stats: Be more precise and talk about mean, not average - - There are several types of averages eg. mean, median and mode. - - Signed-off-by: Damien Lespiau - -commit e86557ca9fa24bb3c73a8168b0866169f7606d0c -Author: Paulo Zanoni -Date: Thu Jun 25 14:19:24 2015 -0300 - - lib/igt_draw: move to the GTT domain before using GTT mmaps - - With this, we don't need to worry about what happened to the buffer - before. - - Reviewed-by: Chris Wilson - Signed-off-by: Paulo Zanoni - -commit 6cc553adf298e6244fbdb5fe03841c00ddda29ad -Author: Paulo Zanoni -Date: Thu Jun 25 14:12:56 2015 -0300 - - lib/igt_core: fflush stdout after printing subtest results - - I often run "sudo ./test 2>&1 | tee output.txt", and when we're - succeeding - never printing to stderr - the output gets buffered and - is never flushed (because it doesn't point to a terminal), so I never - know which test is running. With this fflush, I'm able to know when - each test finishes. - - v2: Add blank line too (Chris) - - Reviewed-by: Chris Wilson - Signed-off-by: Paulo Zanoni - -commit f78574101ffc3388ba7a948a6f5310358cdeaab2 -Author: Chris Wilson -Date: Fri Jun 26 11:41:44 2015 +0100 - - igt/gem_fenced_exec_thrash: Tidy testing of expected execbuf errors - - Signed-off-by: Chris Wilson - -commit c69b13578399915f71f4ccc10cae188c31381c6a -Author: Derek Morton -Date: Fri Jun 26 11:36:00 2015 +0100 - - igt/gem_fenced_exec_thrash: Fix memory leak between tests - - gem_fenced_exec_thrash was not freeing any resources between - subtests. On 1Gb android systems this resulted in the test - failing with an OOM error. - - Added cleanup code to free BOs at the end of each subtest. - - Signed-off-by: Derek Morton - -commit eeda401391de3ab434dcdd1d1b441a24660a0fd3 -Author: Paulo Zanoni -Date: Thu Jun 25 10:56:34 2015 -0300 - - kms_frontbuffer_tracking: GTT mmap writes disable PSR - - And they keep it disabled until something else enables it. So let's - consider this on the draw subtests. - - With this, some PSR tests that were failing will now start passing. - - Signed-off-by: Paulo Zanoni - -commit 053f33ad1c3e8604b2c33a6ca87539a2ec684742 -Author: Paulo Zanoni -Date: Thu Jun 25 10:47:09 2015 -0300 - - kms_frontbuffer_tracking: use CPU mmaps for fill_fb_region() - - Because the GTT mmaps "permanently" disable PSR and this can mess - some of our assertions. So let's just use the CPU domain to keep the - implementation simple. - - With this, some PSR tests that were failing will now start passing. - - Signed-off-by: Paulo Zanoni - -commit 7a4ded7b87956b9bcfb0d33ed2368633ec2dc239 -Author: Paulo Zanoni -Date: Wed Jun 24 19:04:26 2015 -0300 - - kms_frontbuffer_tracking: remove offscreen-{cur,spr} subtests - - It doesn't make sense to write on the sprite/cursor plane of the - "offscreen" screen. The pick_target() function was just returning the - offscreen_fb pointer for those cases, so we were not really testing - any cursor or sprite code. So the tests were just the same as - offscreen-pri. - - That kills 24 subtests for each feature (72 in total). - - Signed-off-by: Paulo Zanoni - -commit ce3b47bac89d46633bd8b55842590080ab9d246d -Author: Paulo Zanoni -Date: Mon Jun 22 19:18:29 2015 -0300 - - tests/kms_frontbuffer_tracking: add modesetfrombusy test - - This test exercies the dev_priv->fb_tracking.busy_bits bug I recently - found and Daniel fixed. - - Cc: Daniel Vetter - Signed-off-by: Paulo Zanoni - -commit de774ed31e678da3f0fe0a51c4c1165161ee399a -Author: Damien Lespiau -Date: Thu Jun 25 17:38:19 2015 +0100 - - skl_compute_wrpll: Don't try other dividers if we find a 0 central freq deviation - - Paulo suggested that we could short-circuit the search for a good - divider if we find a 0 deviation of the DCO frequency from the central - frequency. - - Out of the 373 test frequencies, 34 hit that fast path. - - Suggested-by: Paulo Zanoni - Signed-off-by: Damien Lespiau - -commit 26336385ac1f32ce2a0160558d08af9d090c4286 -Author: Damien Lespiau -Date: Thu Jun 25 17:48:50 2015 +0100 - - skl_compute_wrpll: Sync a comment with from the kernel code - - Might as well try to keep the code in both this test and the kernel as - close as possible. - - Signed-off-by: Damien Lespiau - -commit dfebf08d9a21146e4d53ddb684e71b934d96bc59 -Author: Damien Lespiau -Date: Thu Jun 25 14:18:34 2015 +0100 - - skl_compute_wrpll: Fix the mininum deviation computation - - Paulo noticed that, because we were only comparing positive deviations - with positive deviations and negative deviations with negative - deviations, we weren't actually always using the absolute minimal - deviation at all. - - This improves the average deviation across all tested frequencies (373): - - before: average deviation: 215.13 - after: average deviation: 194.47 - - Signed-off-by: Damien Lespiau - -commit afdaeabbcfd9a2fd1b27b8742681d52d12161dd0 -Author: Damien Lespiau -Date: Thu Jun 25 12:21:27 2015 +0100 - - skl_compute_wrpll: Cycle through dividers, then central freqs - - Follow Paulo's comment on the corresponding kernel patch. - - This means we also have to move the break when we have cycled through - the even dividers as well. - - This improves the number of even dividers used across the tested - frequencies (373) (at the expense of a slightly worse average deviation, - but "even dividers take precedence over a lower deviation". - - before: - even/odd dividers: 338/35 - average deviation: 206.52 - - after: - even/odd dividers: 363/10 - average deviation: 215.13 - - Signed-off-by: Damien Lespiau - -commit efd2895f2380bf87f6821e3ab89005070e9d1925 -Author: Damien Lespiau -Date: Thu Jun 25 12:17:23 2015 +0100 - - skl_compute_wrpll: Print the average deviation - - It's interesting to watch the effect of some algorithm tweaks on the - average deviation between the central freq and the dco freq. A metric - we'd like to minimize. - - Signed-off-by: Damien Lespiau - -commit 06f5f7065fccc5fbb9f65f6f7d348624e2fa0d2b -Author: Damien Lespiau -Date: Thu Jun 25 12:07:56 2015 +0100 - - lib: Add a tiny utility function to compute averages - - The master plan would be to get a bit more stats in it, at least the - standard deviation and confidence interval. Just need the average for - now. - - Signed-off-by: Damien Lespiau - -commit 484e27542d79f78e467004fec5a5192ac6006b34 -Author: Daniel Vetter -Date: Mon Jun 15 17:09:11 2015 +0200 - - tests/kms_fbc_crc: Don't force fbc on old platforms - - It's simply a bit too scary on pre-gen6 and imo not worth the bother - really until someone starts to implement all the hacks an w/a required - on these platforms. On later platforms the issues are just with - correctness and performance hence no risk for hanging machines. - - Cc: Paulo Zanoni - Signed-off-by: Daniel Vetter - -commit 44d444acaa8cfd61ea25c82fb7c3bff5f41f0835 -Author: Chris Wilson -Date: Wed Jun 24 17:01:21 2015 +0100 - - overlay: Enable locale - - Enabling locale allows us to use thousand separators and other such - human touches in the output. - - Signed-off-by: Chris Wilson - -commit 453792c501b4553ed3c4135057249e300d3c0362 -Author: Chris Wilson -Date: Wed Jun 24 11:26:33 2015 +0100 - - lib: Enable locale dependent output to a terminal - - If we are in an interactive session, enable the locale. This allows for - features like setting thousand separators for printing large values. By - only enabling it for interactive terminals, we avoid changing outputs - for the test scripts (leaving them as the "C" locale). - - Note this mainly affects the testcases, or binaries built using libigt. - Other binaries need to be localised separately. - - Signed-off-by: Chris Wilson - Reviewed-by: Michel Thierry - -commit 7eb5f079491e5c078cf44d5ddb52824bb2c6bfb0 -Author: Paulo Zanoni -Date: Tue Jun 23 12:55:04 2015 -0300 - - tests/kms_frontbuffer_tracking: rename set_screens_for_test - - Rename it to prepare_subtest. This function used to be much smaller - when I decided its name. - - Signed-off-by: Paulo Zanoni - -commit 7756e8844538050c1e4efde28147ca7e0753df27 -Author: Paulo Zanoni -Date: Tue Jun 23 10:49:54 2015 -0300 - - tests/kms_frontbuffer_tracking: simplify flib_subtest fb handling - - Get rid of fb2_region, use params->fb directly instead. - - Signed-off-by: Paulo Zanoni - -commit 77e1bac6eb4588c00bbc2e431d9f2594675a18bd -Author: Paulo Zanoni -Date: Tue Jun 23 10:38:19 2015 -0300 - - tests/kms_frontbuffer_tracking: simplify wait_user() calls - - I often add new temoprary wait_user() calls when debugging things, and - having to add "if (opt.step)" is annoying, so let's make the step - level check inside wait_user(). As a bonus, our huge macro is 2 lines - shorter. - - Signed-off-by: Paulo Zanoni - -commit 969cb3c575ac4618b3a3484f78a9644484f9c7e8 -Author: Paulo Zanoni -Date: Thu Jun 18 14:57:37 2015 -0300 - - tests/kms_frontbuffer_tracking: not all eDP panels support sink CRC - - And require sink CRC support for PSR, since the pipe CRC is not - exactly useful there. - - v2: Check for ENOTTY (Rodrigo). - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91019 - Signed-off-by: Paulo Zanoni - -commit 471ebbed535a73d129e4d717f5b80a2af163eb0c -Author: Derek Morton -Date: Tue Jun 23 17:06:01 2015 +0100 - - igt/gem_fence_thrash: Reduce memory usage - - On android platforms with 1Gb RAM gem_fence_thrash was failing - with an out of memory error. - This patch causes gem_close() to be called when a handle is - no longer required rather than relying on the cleanup when - the fd is closed. This greatly improves the memory footprint - of the test allowing it to run on 1Mb systems. - - Also fixed a leak of the 'threads' variable. - - v2: Simplified as per Chris Wilson's suggestion. - - Signed-off-by: Derek Morton - [ickle: fix mmap leak from bo_copy()] - Reviewed-by: Chris Wilson - -commit 154192a6805adc879b2fb0d08ff9d89e25b04fa0 -Author: Thomas Wood -Date: Fri Jun 19 09:22:55 2015 +0100 - - NEWS: Post-release bump - - Signed-off-by: Thomas Wood - -commit 0e528af623c735ab4bf0d5bbdc64cbdffc82674d -Author: Chris Wilson -Date: Mon Jun 22 15:48:54 2015 +0100 - - igt: Add gem_exec_alignment - - Simple test to see whether the kernel obey's the user's request - alignemnt. - - Signed-off-by: Chris Wilson - -commit eb7d60e430ae63e36c77f2d95a0cea93017f0b71 -Author: Chris Wilson -Date: Wed Jun 17 18:29:49 2015 +0100 - - igt: Add gem_eio for inducing expected EIO - - A few entry points in the GEM API are expected to raise EIO if we - encounter a wedged GPU. This testcase aims to do so by first injecting a - GPU hang with GPU resets disabled (thus causing the GPU to become wedged) - and then exercises the various API to check for the expected errors. - - Signed-off-by: Chris Wilson - -commit 4fbce7e462ab488fc11037adb571bb3a807459ba -Author: Chris Wilson -Date: Thu Jun 18 10:38:04 2015 +0100 - - testdisplay_hotplug: Add missing #include - - testdisplay_hotplug.c: In function ‘hotplug_event’: - testdisplay_hotplug.c:46:14: error: storage size of ‘s’ isn’t known - struct stat s; - ^ - testdisplay_hotplug.c:54:2: error: implicit declaration of function ‘fstat’ [-Werror=implicit-function-declaration] - fstat(drm_fd, &s); - ^ - testdisplay_hotplug.c:54:2: warning: nested extern declaration of ‘fstat’ [-Wnested-externs] - testdisplay_hotplug.c:46:14: warning: unused variable ‘s’ [-Wunused-variable] - struct stat s; - ^ - Signed-off-by: Chris Wilson - -commit c83299d1fda4b8c67562999d61817177d422d52e -Author: Chris Wilson -Date: Mon Jun 15 14:51:54 2015 +0100 - - lib: Use HAS_GPU_RESET rather than opencode our guess - - Uses kernel commit 49e4d842f0d0892c3d26c93a81b9f22c1467030e - Author: Chris Wilson - Date: Mon Jun 15 12:23:48 2015 +0100 - - drm/i915: Report to userspace if we have a (presumed) working GPU reset - - to determine whether the kernel has a working GPU reset before injecting - a hang (and so skip tests requring hang recovery if not available). - -commit a5633c406c4ae93abc7fce8ff59d2c021a6aa45e -Author: Derek Morton -Date: Thu May 28 13:02:30 2015 +0100 - - lib/tests/igt_segfault Add unit test to test segfault handling - - Unit test to check a segfaulting subtest is handled correctly. - - v2: Added script to check subtest results - v3: Removed script. Updated test to use fork to monitor return status. - v4: Added igt_segfault to .gitignore - - Signed-off-by: Derek Morton - Signed-off-by: Daniel Vetter - -commit 4b944c92eb85c3cdf6526e65a1a746c979de55bd -Author: Damien Lespiau -Date: Thu Jun 4 18:31:04 2015 +0100 - - pm_rpm: Update the debugfs filename - - v2: Try to open i915_pc8_status first to make the transition (or just - running on older kernels) better. (Paulo) - - Signed-off-by: Damien Lespiau - -commit b88212c036fbd909d70b8388fc8fffb1fac75e5b -Author: Thomas Wood -Date: Thu Jun 11 16:08:23 2015 +0100 - - Update version to 1.11 and add the release date - - Signed-off-by: Thomas Wood - -commit 0cc16b37ab9b3f8d5687380f83c0361c9de1beb6 -Author: Thomas Wood -Date: Thu Jun 11 16:06:33 2015 +0100 - - NEWS: Updates - - Signed-off-by: Thomas Wood - -commit aa75f373978756aba32ac9c009740ac45e2eb180 -Author: Thomas Wood -Date: Mon Jun 8 16:41:34 2015 +0100 - - tools: print a warning for tools replaced by intel_reg - - Cc: Jani Nikula - Signed-off-by: Thomas Wood - -commit 87f15fc3da374082933aef4d2183f319e596c9ba -Author: Thomas Wood -Date: Mon Jun 8 10:16:00 2015 +0100 - - overlay: update .gitignore - - Signed-off-by: Thomas Wood - -commit d8acd24bdb0210e1b590cebc58ddcd266045ae08 -Author: Paulo Zanoni -Date: Tue Dec 2 10:40:05 2014 -0200 - - tests: add kms_frontbuffer_tracking - - This is a new test that should exercise the frontbuffer tracking - feature of the Kernel in a number of different ways. We use different - drawing methods, we use the primary, cursor and sprite planes, we can - test both on single and dual pipes, also on buffers not associated - with any CRTCs, etc. - - We currently have assertions for both FBC and PSR, and we also have a - "nop" test mode that should disable both FBC and PSR, and can be - used for debugging. - - This test is also capable of testing both FBC and PSR even if they are - disabled by default on the Kernel: the test knows how to change the - i915.ko parameters and then set them back after testing. - - I am getting a significant number of failures when I run this test, - which means we have some work to do on the Kernel. - - I also still have a small list of additional subtests that I plan to - add to this test, and those tests are documented on the main function. - - v2: - - Use igt_debugfs_open() (Thomas). - - Use igt_test_description() (Thomas). - - Don't check drm_open_any_master()'s result (Thomas). - - Use igt_require_f() in some cases (Thomas). - - Standardize some assertions. - - Use the new module param functions. - - Check if FBC is supported by the chipset. - - Add new subtests (multidraw, enum fbs, fbc+psr). - - Make tests a little shorter. - - Reorganize which tests ara ran by default. - - Better comments everywhere. - - Rebase. - - v3: - - Fix a small typo. - - Improve the log messages a little bit more. - - Signed-off-by: Paulo Zanoni - -commit 75b286e821bd5cf056c5a786f347943360486143 -Author: Paulo Zanoni -Date: Tue Jun 2 12:03:45 2015 -0300 - - tests/kms_psr_sink_crc: test even if PSR is disabled by default - - Use the igt_set_module_param_int() call to enable it, then restore the - previous value after we are done testing. - - With this, we can change the psr_enabled() function to psr_possible(): - the only requirement should be that we have a PSR capable sink. The - test should now be able to make "Source_OK" and "Enabled" become true - whenever it wants. - - Cc: Rodrigo Vivi - Signed-off-by: Paulo Zanoni - -commit a4dbdeffc2995a0b84efb3bdfc9e460b731d7af5 -Author: Paulo Zanoni -Date: Tue Jun 2 10:54:27 2015 -0300 - - tests/kms_fbc_crc: run even if FBC is disabled by default - - We may not be perfect, but if we don't even test, we will probably - only get worse over time. - - The function called makes sure we restore whatever was the original - FBC parameter when we exit the test, so this should not affect the - other tests. - - Signed-off-by: Paulo Zanoni - -commit d9ff9b3971121acdaedf45d95acceabbb1391547 -Author: Paulo Zanoni -Date: Mon Jun 1 19:06:10 2015 -0300 - - lib/igt_aux: add functions to manipulate i915.ko parameters - - Some i915.ko features have very nice IGT tests, which are never - executed because the features are disabled by default. This leads to - unnoticed regressions both in the Kernel and in the IGT tests. We - have seen this multiple times, for example, on FBC and PSR. - - We want to be able to run IGT and actually test these - disabled-by-default features in order to make sure we at least don't - break them even more. Sometimes they may be disabled for some specific - reason, and we don't want to increase the set of reasons without - noticing. - - To help solving this problem, this commit adds some helper functions - that should make it easier to change certain i915.ko parameters and - then restore their original values at the end of the test. With this, - I'm hoping QA will be able to detect any regressions and automatically - bisect them - or, with PRTS, reject the patches before they are even - merged. - - Signed-off-by: Paulo Zanoni - -commit 46a1791958f45cf1b15720b40aaca9306dd5227f -Author: Paulo Zanoni -Date: Tue May 26 11:11:52 2015 -0300 - - tests/template: add IGT_TEST_DESCRIPTION - - So people that write tests based on the template don't forget to use - the macro. - - Signed-off-by: Paulo Zanoni - -commit 6b418f0264883871955d82058b1d36f710f810b4 -Author: Imre Deak -Date: Mon Jun 8 19:08:06 2015 +0300 - - tests/gem_storedw_batches_loop: add subtest for cached mappings - - v2: - - add a subtest for uncached mappings too for LLC platforms where the - default is cached mapping (Chris) - - Signed-off-by: Imre Deak - -commit c5a6147a1be440c2d5457f392775e583b2eba8f3 -Author: Chris Wilson -Date: Mon Jun 8 15:56:33 2015 +0100 - - overlay: Fix parsing of gem-objects for '[k]' clients - - Apparently '[]' are not non-whitespace characters and break '%s'. - - Signed-off-by: Chris Wilson - -commit fd772e32a23157fc29649070a6a5e94d70ae02f8 -Author: Damien Lespiau -Date: Fri Jun 5 15:51:40 2015 +0100 - - build: Add the automake subdir-objects option - - automake 1.14 was complaining here: - - overlay/Makefile.am:44: warning: source file 'x11/x11-window.c' is in a - subdirectory, but option 'subdir-objects' is disabled. - - Signed-off-by: Damien Lespiau - -commit c221e0942031a8c7518fd04f346920df766ce6fe -Author: Tim Gore -Date: Wed Jun 3 09:20:21 2015 +0100 - - tests/gem_reset_stats : mask off ring_stop bits - - Function check_gpu_ok checks to make sure that any hangs - have cleared by testing for (flags == 0). Some tests set - the STOP_RINGS_ALLOW_BAN and STOP_RINGS_ALLOW_ERRORS flags - but these do not get cleared by an individual ring reset, - (a feature added recently to the driver), leading the - check_gpu_ok function to think that the gpu is still hung. - - So I mask the flags with STOP_RING_ALL, to ignore the mode - bits and look only at the bits that stop the rings. - - Once gpu_check_ok sees that the gpu is not hung I write 0 - to stop_rings in order to clear it completely. This is - because igt_set_stop_rings will only write to stop_rings - if either a) they are currently 0 or b) we are writing 0. - If we leave the mode bits set then subsequent calls to - igt_set_stop_rings to create hangs will fail. - - Signed-off-by: Tim Gore - -commit a5a6d40ca8a6a809678eda695ee54a085c05b949 -Author: Chris Wilson -Date: Wed Jun 3 13:57:21 2015 +0100 - - igt/gem_streaming_writes: Reorder src/dst to avoid executing on snooped - - During the streaming setup, we execute a dummy batch in order to bind - the objects into the GTT and query their offsets. For this, we should - not use a snooped buffer for the dummy batch, or else we may anger the - GPU. Given that we have a choice, use the other buffer for the dummy - batch. - - Signed-off-by: Chris Wilson - -commit 85ee6e7b366713aca9d98d587f03eb7583f38830 -Author: Tvrtko Ursulin -Date: Mon Jun 1 11:11:15 2015 +0100 - - gem_userptr_benchmark: Test overlapping bo mmu notifier performance impact - - Current userptr kernel implementation downgrades tracking VMA ranges (real - userspace ones) to an inefficient linear walk for any process which has - instantiated overlapping userptr objects. - - This adds a test which shows the performance cliff on, most visibly, generic - userspace mmap(2) and munmap(2) operations between unsync, non-overlapping - and overlapping userptr objects. - - Signed-off-by: Tvrtko Ursulin - Cc: Chris Wilson - Cc: Thomas Daniel - -commit 977730084647d32b98019924b81b281bef942689 -Author: Chris Wilson -Date: Tue Jun 2 11:15:16 2015 +0100 - - igt/gem_streaming_writes: Map the whole batch for CPU accesses - - The llc cpu path only partially mapped the batch buffer so confused the - CS when attempting to execute an empty batch. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90809 - Signed-off-by: Chris Wilson - -commit 0d16473df4ed29c9836b03090c78debfb9a7e3e6 -Author: Ville Syrjälä -Date: Fri May 8 17:46:21 2015 +0300 - - tests/kms_3d: Reduce the number of expected stereo 3D modes - - Currently the test expects to find 15 stereo 3D modes, however the - number of stereo modes we get from the current kernel EDID parser - is actually 13. - - The extra two modes we had previously were GTF modes, which are no - longer getting added by the kernel since we have corresponding - CEA/DMT modes available. So having the GTF modes in the list was - not actually intentional. - - The kernel commit that change the behaviour: - commit bfcd74d2aeda25a78f7cc92f80650218b1bce0ca - Author: Ville Syrjälä - Date: Thu Apr 2 17:02:11 2015 +0300 - - drm/edid: Add DMT modes with ID > 0x50 - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90368 - Signed-off-by: Ville Syrjälä - -commit f386741932a5a6ce4db185f91445b8ad63ed1b02 -Author: Antti Koskipaa -Date: Thu May 28 14:44:54 2015 +0300 - - tests/pm_backlight: Add backlight test - - This is a basic sanity test of the backlight sysfs interface. - - v2: - - Add jani's suggestion for immediate readback - - Remove unused parameter from test_and_verify() - - Add fade test - - Issue: VIZ-3377 - Signed-off-by: Antti Koskipaa - Reviewed-by: Jani Nikula - Signed-off-by: Thomas Wood - -commit b1e40e97c89a82b6f574af298214ea599b089264 -Author: Mike Mason -Date: Wed May 27 08:25:06 2015 -0700 - - scripts/run-tests.sh: add option to not retry incomplete tests on resume - - This patch utilizes piglit's new --no-retry option. That option - prevents incomplete tests from being retried when resuming a - test run. This is necessary because retrying tests that cause - a crash or reboot prevents a test run from being resumed. - - This patch also adds -s to the piglit command line. The -s option - forces test logs to be synced to disk after every test. - Without it, some logs can be lost if a test causes a crash - or reboot, making it impossible to resume the test run at the - correct point. - - Signed-off-by: Mike Mason - Signed-off-by: Thomas Wood - -commit f49723872bf02788872f02e37df3e48682b5ef9b -Author: Derek Morton -Date: Mon May 18 14:37:31 2015 +0100 - - lib/igt_core.c: Flag the test as failing after a segfault - - fatal_signal_handler() was trapping fatal errors but not - flagging the test as failing or setting an exit code. - The result was that the test would return Ok or Skipped - depending on what the other subtests did even though one - of the subtests had segfaulted. - - Signed-off-by: Derek Morton - Signed-off-by: Daniel Vetter - -commit 95019c2a3c4ed5943ad16e17c8dcf36fd6492adc -Author: Yunlian Jiang -Date: Tue May 26 10:22:31 2015 -0700 - - debugger: remove unnecessary struct per_thread_data - - This removes unnecessary 'struct per_thread_data' and avoids the - compilation error 'variable length array in structure extension - will never be supported' by clang. The bug entry is - https://code.google.com/p/chromium/issues/detail?id=476001 - - Cc: Benjamin Widawsky - Cc: Thomas Wood - Signed-off-by: Yunlian Jiang - Signed-off-by: Thomas Wood - -commit 88c9a82318bae6bf97e55bf1a28018708aca2200 -Author: Derek Morton -Date: Tue May 26 15:19:17 2015 +0100 - - lib: Enable building unit tests on android - - Add a make file for android so the unit tests can be built. - Enabled asserts for the library code so the unit test behaviour - is correct. - - Signed-off-by: Derek Morton - Signed-off-by: Thomas Wood - -commit f2a5896bdddc595489a61cb0e0051de8d43a2591 -Author: Tvrtko Ursulin -Date: Fri May 22 11:00:45 2015 +0100 - - kms_rotation_crc: Update rotation direction for kernel changes - - commit 1e8df16778b0d8fd8102b3ee799b028f8f961089 - Author: Sonika Jindal - Date: Wed May 20 13:40:48 2015 +0530 - - drm/i915/skl: Swapping 90 and 270 to be compliant with Xrand - - Changed the rotation direction so IGT needs to be told. - - Reviewed-by: Sonika Jindal - Signed-off-by: Tvrtko Ursulin - Cc: Ville Syrjälä - Cc: Sonika Jindal - Signed-off-by: Damien Lespiau - -commit 308b0e856b503f953a21d98f2b808e8fdd67004f -Author: Chris Wilson -Date: Wed May 20 14:51:46 2015 +0100 - - igt/gem_linear_blits: tidy - - Be clean and use memset(0) on ioctl args before use and downgrade some - of the lesser informatic messages to just debug. - - Signed-off-by: Chris Wilson - -commit e93fbc2873b411f9e42d49f758fc9eb845c2ad1b -Author: Chris Wilson -Date: Tue May 19 22:03:04 2015 +0100 - - igt/gem_streaming_write: Add a variant to exercise CS - - Another issue in streaming writes is into the batch buffer. - - Signed-off-by: Chris Wilson - -commit 3d1f9a223627b44fdaf89a5b848a9705429a80a1 -Author: Chris Wilson -Date: Tue May 19 15:18:58 2015 +0100 - - igt/gem_streaming_writes: Remember to markup the write target! - - Signed-off-by: Chris Wilson - -commit 65fec5e5836cb347e99d22320ec3ff776ddf2a1f -Author: Chris Wilson -Date: Tue May 19 14:51:43 2015 +0100 - - igt/gem_streaming_writes: Add more validation steps - - Inalcude a pre-pass to check that the non-streaming, partial writes - work. - - Signed-off-by: Chris Wilson - -commit c0a0725fad11bb7911420cf9b49f8a2ccdf35071 -Author: Damien Lespiau -Date: Tue May 19 15:04:03 2015 +0100 - - list-workarounds: Print the line where the parsing error occured - - Useful to understand the warnings the scripts prints. - - Signed-off-by: Damien Lespiau - -commit 554aac5f3e349cb5e6cd99f42826893abf564d85 -Author: Imre Deak -Date: Fri May 15 17:30:58 2015 +0300 - - tests/pm_rc6_residency: fix check if RC6P or RC6PP is enabled - - The test checks the residency in a given RC6 state or any deeper states - that are also enabled. For example the RC6 subtest checks the combined - residency in RC6/RC6P/RC6PP. Since the kernel reported value for the RC6 - residency doesn't include the RC6P or RC6PP residency we need to adjust - the RC6 value accordingly. A similar adjustment is needed for the RC6P - subtest. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90369 - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit 2b47e219be73bb03993fc0d0a78dd7db93c3321b -Author: Imre Deak -Date: Fri May 15 17:29:37 2015 +0300 - - tests/pm_rc6_residency: fix counter readout in case of wrap-around - - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit 05e9edb2b938143677254cab1d122cd8b0ecd4c0 -Author: Imre Deak -Date: Fri May 15 16:58:30 2015 +0300 - - tests/pm_rc6_residency: remove redundant idle loops - - Currently the test runs a separate idle loop when reading out each RC6 - counter. But there is no need for this, we can have a signle idle loop - and read out all the counters at once. - - This prepares for an upcoming patch where we need to consider the RC6P - and RC6PP counters as well when checking RC6. - - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit a2ce95eb9ec1b90a5697d8f8c41ae781328e29bf -Author: Imre Deak -Date: Fri May 15 16:31:09 2015 +0300 - - tests/pm_rc6_residency: sanitize the RC6 enabled mask check - - The way the test checks for the RC6 enabled mask atm doesn't work: - calling igt_success outside of any subtests doesn't have any effect. - This means the test will run a 11 second idle loop for each RC6 state - regardless if the platform supports these or have them enabled. Fix this - by checking explicitly if a given RC6 state is enabled before reading - out/checking the corresponding counter. - - With this fix we can also get rid of the GEN6/IVB checks, since the RC6 - mask check makes them redundant. We still need the VLV/CHV checks, since - media RC6 doesn't have a separate bit in the mask. - - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit a76591a4be53b608c5cb9793227aa4a957a2f7b1 -Author: Imre Deak -Date: Fri May 15 16:22:23 2015 +0300 - - tests/pm_rc6_residency: factor out the code to measure residencies - - The upcoming patches will add some additional logic around reading out - the counter values, so factor out the readout code to prepare for those - patches. - - No functional change. - - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit 7883bc8c1cdf3b1cde32acceb4bd4b4c2575ff32 -Author: Imre Deak -Date: Fri May 15 16:15:33 2015 +0300 - - tetst/pm_rc6_residency: sanitize counter check function arguments - - The counter check function (residency_accuracy) cares only about the - counter delta, so no need to pass it the start/stop values separately. - Simplify things to prepare for the upcoming patches. - - No functional change. - - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit a572fb15f350be2c002b53a97cae6ceefb155df8 -Author: Imre Deak -Date: Tue May 12 16:29:32 2015 +0300 - - tests/pm_rc6_residency: simplify the residency counter check - - The temporary vars only obfuscated things, so get rid of them. Also - remove some redundant asserts and info messages. - - The only functional change is that the counter delta will be checked - only against a percentage based accuracy range (90%-100%) and not - against a hard-coded limit (RC6_FUDGE). The two checks serve the same - purpose and the former one is clearer. - - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit 5253af92ad6811d7c02b75355b3a47a60961b60a -Author: Damien Lespiau -Date: Fri May 15 19:37:12 2015 +0100 - - lib/bxt: Update the Broxton PCI IDs - - Cc: Imre Deak - Reviewed-by: Imre Deak - Signed-off-by: Damien Lespiau - -commit d819b7ee358de3972ee453221a4c2c99decb5c32 -Author: Derek Morton -Date: Fri May 15 11:24:55 2015 +0100 - - tests/Android.mk: Treat all KMS tests as Cairo dependent - - If ANDROID_HAS_CAIRO is not set, automatically add all - kms tests to the skip_tests_list. - - Building for android currently fails due to the addition of - new kms tests. Rather than just adding the new tests to the - exclusion list, autogenerating a list of all kms tests and - excluding them will reduce future maintainance. - - Signed-off-by: Derek Morton - Signed-off-by: Damien Lespiau - -commit fa4396d0917aae72633cc4d0c8e14222ec494c84 -Author: Damien Lespiau -Date: Thu May 14 15:38:40 2015 +0100 - - gem_bad_blit: Make the BAD_GTT_TEST address more than 32 bits - - gem_bad_blit.c: In function ‘bad_blit’: - gem_bad_blit.c:89:3: warning: right shift count >= width of type [enabled by default] - OUT_BATCH(BAD_GTT_DEST >> 32); /* Upper 16 bits */ - - v2: remove extraneous () - - Signed-off-by: Damien Lespiau - -commit 15f60217cc79950702afe599b567bdf8fbd5ce75 -Author: Damien Lespiau -Date: Thu May 14 14:49:59 2015 +0100 - - intel_display_crc: A new tool to play with display CRCs - - The CRC debug interface is a bit more than a simple textual file in - debugfs as there are a small command language to control what we want - from them. - - This tool starts, slowly, by allowing us to dump the pipe CRCs whenever - we want. It can be handy to check what is the current CRC when we reach - a certain state on the screen (when using --interactive-debug for - instance) against a known CRC. - - Signed-off-by: Damien Lespiau - -commit fd6846c99f00e265f558cf0106c833b96caf977f -Author: Damien Lespiau -Date: Thu May 14 14:19:01 2015 +0100 - - lib: Add a user data pointer to the argument parsing functions - - It can be useful to have one of those to carry state between the handler - parsing the options and the rest of the test. Right now the only thing - we can do is to use global variables for that. - - Signed-off-by: Damien Lespiau - -commit 7a5e1c6f0aebcfabecc3db96cb87add894530326 -Author: Thomas Wood -Date: Thu May 14 16:38:01 2015 +0100 - - tests: match gem_create prototype in igt_eviction_test_ops create function - - This avoids a warning when using gem_create as the create function. - - Signed-off-by: Thomas Wood - -commit aa6c63463feaba83efb893b4e69e0d334f99afea -Author: Thomas Wood -Date: Thu May 14 16:24:01 2015 +0100 - - igt.cocci: don't use igt_assert_neq to compare pointers - - igt_assert_neq can only compare integers, not pointers. - - Signed-off-by: Thomas Wood - -commit 6141aa2dad814ba8e1254c8e8213f1ba3ae6835a -Author: Thomas Wood -Date: Thu May 14 16:00:25 2015 +0100 - - docs: various documentation fixes - - Fix various typos, add missing parameter documentation, include the - igt_draw section and update the list of ignored headers. - - Signed-off-by: Thomas Wood - -commit 1f6f6c07bd5bed8540dd309c3f5eac9270955f72 -Author: Derek Morton -Date: Thu May 14 09:59:44 2015 +0100 - - tests/gem_cpu_reloc: Fix gem_cpu_reloc OOM failure - - On android with small memory footprints gem_cpu_reloc can fail - due to OOM. - - Refactor gem_cpu_reloc into 2 tests, a basic test which performs - 10 relocations and a full test which skips if there is insufficient - memory. - - Changed the memory required test to better estimate the actual - RAM used. - - v2: Addresed comments from Thomas Wood - - Signed-off-by: Derek Morton - Signed-off-by: Thomas Wood - -commit 1a80f90b7d0f804b39342fcd676f307e03216454 -Author: Paulo Zanoni -Date: Thu May 7 14:14:07 2015 -0300 - - tests/kms_fb_crc: fix the reference CRC checking - - Now we get the reference CRCs on separate untiled FBs just to make - sure FBC is not there to mess the CRC computation. We also get the - reference CRCs for buffers that were drawn in the same way that we - draw them during the tests, so we can finally get rid of that FIXME - comment we have! - - With this, kms_fbc_crc now actually tests something instead of just - wasting CPU cycles... - - Fixes regression introduced by: - - commit 562bbe12f6fb75811a746c742a28d32a17b26aa9 - Author: Daniel Vetter - Date: Fri Feb 27 22:04:18 2015 +0100 - tests: Remove usage of igt_crc_equal and _non_null - - Cc: Daniel Vetter - Signed-off-by: Paulo Zanoni - -commit 31906084dea4f3570fea3a0a377a18665be14ba9 -Author: Paulo Zanoni -Date: Thu May 7 13:50:17 2015 -0300 - - tests/kms_fbc_crc: extract fill_mmap_{cpu,gtt}() - - Just like we have fill_render() and fill_blt(). I'm also going to use - fill_mmap_gtt() for the code that generates the reference CRCs. - - Signed-off-by: Paulo Zanoni - -commit b3faeb16fe455497e93846979f21ca08d598d0fe -Author: Paulo Zanoni -Date: Thu May 7 12:16:01 2015 -0300 - - tests/kms_fbc_crc: make the blt test draw the same pattern - - ... as the other drawing tests: single white pixel at top/left of the - screen, instead of painting the whole screen blue. - - This will make it much easier to fix the CRC checking code. - - Signed-off-by: Paulo Zanoni - -commit 5d3c2a6353bfb10f328d65812d7a08145103f422 -Author: Paulo Zanoni -Date: Wed May 6 19:20:17 2015 -0300 - - tests/kms_fbc_crc: extract check_crc() - - To remove some duplicated code. When we finally fix that FIXME, the - code will get a little bigger too. - - Signed-off-by: Paulo Zanoni - -commit a976d7e44abb9d4e4540a8d072cdf55a7e0ea37b -Author: Paulo Zanoni -Date: Wed May 6 19:15:37 2015 -0300 - - tests/kms_fbc_crc: refactor context handling code - - Just a small modification to make the code a little easier to - understand, IMHO. - - Signed-off-by: Paulo Zanoni - -commit fceed3a585cfcc5d2f412f11029a5a2ff3af3726 -Author: Paulo Zanoni -Date: Wed May 6 19:10:46 2015 -0300 - - tests/kms_fbc_crc: unify flip handling - - Just a small simplification to make the code a little easier to - understand, and to help us when we further split drawing vs flipping - later. - - Signed-off-by: Paulo Zanoni - -commit 036401d42c83ab61514fa529ea9e3647a2c8b40f -Author: Paulo Zanoni -Date: Tue May 5 18:05:54 2015 -0300 - - tests/kms_fbc_crc: increase the FBC wait timeout - - Now that we moved to the frontbuffer tracking scheme, it may take a - long time for FBC to be updated after it is invalidated: 300ms is not - enough anymore. - - The problem starts when i915_gem_execbuffer2() indirectly calls - intel_fb_obj_invalidate(), which disables FBC. After this, FBC only - gets reenabled when i915_gem_retire_work_handler() happens and - indirectly calls intel_frontbuffer_flush(). Notice that while FBC is - not yet enabled, the screen contents are correct, so this shouldn't - really be a bug. - - Previous versions of this patch were replacing the gem_bo_busy() calls - with gem_sync(), but after some discussion we concluded this was not - the correct way to handle the problem, so let's just increase the - timeout so we can kill those subtest failures. - - Signed-off-by: Paulo Zanoni - -commit 8c3ac50b00d08daa4b0794d96e76cf78f1253940 -Author: Paulo Zanoni -Date: Tue May 5 17:38:49 2015 -0300 - - tests/kms_fbc_crc: exec_nop() can also invalidate FBC - - So make sure that, at prepare_test(), we wait for FBC to be enabled - again after we run the exec_nop() call. Since after this happens, we - just assert fbc_enabled() at test_crc() instead of waiting for it to - be enabled. - - This is now needed because we moved to software frontbuffer tracking, - so it can take some considerable time for FBC to be reenabled after it - is disabled. - - A previous version of this patch was just calling gem_sync() after - exec_nop(). - - Signed-off-by: Paulo Zanoni - -commit 641d535a03ada74a3088309609a16c79076e6ccc -Author: Paulo Zanoni -Date: Wed May 6 15:23:51 2015 -0300 - - lib/debugfs: wait_for_keypress("crc") when collecting CRC - - Let's just steal the "crc" namespace and add this by default to - igt_pipe_crc_collect_crc() instead of adding more calls to other - tests. If tests want special waits on just some of their collect_crc() - calls, they can use another name instead of "crc". - - This is very useful when developing, especially when the CRC we get is - wrong: we want to look at the screen to see what's going on before we - can think about how to fix the problem. So let's add this to the lib - instead of adding this to every single test I need to debug. - - v2: Add some documentation (Daniel). - - Signed-off-by: Paulo Zanoni - -commit 3db5762384a9495241c1e80ce315a2092e83686a -Author: Mike Mason -Date: Tue May 5 17:14:55 2015 -0700 - - scripts/run-tests.sh: use single combined test list - - i-g-t now creates a single combined test list for tests with - and without subtests. This patch adapts run-tests.sh to that - change. - - Signed-off-by: Mike Mason - Signed-off-by: Thomas Wood - -commit e949c42b496a3cd4f69a2c1953a58d4c1d1f7b46 -Author: Damien Lespiau -Date: Tue May 12 16:39:45 2015 +0100 - - quick_dump: Expand the WM cursor registers - - The tool I used to generate that list doesn't support expanding the list - of registers when dealing with something like CUR_WM_A_*. Expand it by - hand for now (tm). - - Remove CUR_PAL_${pipe}_* for the same reason (and because it's not very - useful to have). - - Signed-off-by: Damien Lespiau - -commit 2ce298cf13f023d50132658e1ff7569e7507c5c6 -Author: Chris Wilson -Date: Tue May 12 15:25:03 2015 +0100 - - igt/gem_stream_writes: Use execbuf LUT to shave a few cycles off dispatch - - Since our goal is to have concurrent read/writes of GPU buffers, we want - to spend as little time in between as possible. - - Signed-off-by: Chris Wilson - -commit 27cf5847dc9f14417b4a51a0b21213ba8ff04ebd -Author: Daniele Ceraolo Spurio -Date: Tue May 12 13:09:30 2015 +0100 - - tests/gem_cs_tlb: fix hardcoded ring id - - The test has 4 subparts, one for each ring, but internally they all - submit to ring 0. Fix it to use the provided ring_id - - Signed-off-by: Daniel Vetter - -commit 980ccf124a87c05aa11c2406d9cf1575e1e3c08e -Author: Tvrtko Ursulin -Date: Tue May 12 11:06:37 2015 +0100 - - igt_kms: Do not reset plane position on assigning a fb - - commit a26f9f9ad0e679c7ce413a25d34f6914e1174151 - Author: chandra konduru - Date: Mon Mar 30 13:52:04 2015 -0700 - - i-g-t: Adding plane scaling test case - - Started doing this and broke kms_rotation_crc. - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: chandra konduru - Signed-off-by: Daniel Vetter - -commit c3bd608fc51620145d29a3ded97370c27cb0ab0c -Author: Tvrtko Ursulin -Date: Tue May 12 11:06:36 2015 +0100 - - igt_kms: Merge condition in igt_plane_set_fb - - There were two paths for fb and !fb. - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: chandra konduru - Cc: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 759bb7ac98eaa830fb94af59c3d743adbf465cc7 -Author: Tvrtko Ursulin -Date: Tue May 12 11:06:35 2015 +0100 - - igt_kms: Avoid NULL ptr deref when commiting disabled planes - - I think; - - commit a26f9f9ad0e679c7ce413a25d34f6914e1174151 - Author: chandra konduru - Date: Mon Mar 30 13:52:04 2015 -0700 - - i-g-t: Adding plane scaling test case - - introduced a condition where it attempts to update a disabled plane because - of the newly introduced size_changed flag which is set for disabled frame - buffers. Result is a NULL ptr deref in igt_drm_plane_commit (plane->fb->src_x). - - Start recognising this case as disabled plane and act accordingly. - - v2: Split out igt_plane_set_fb cleanup. (Thomas Wood) - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: chandra konduru - Cc: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 8a5736b496b193ee0211ac34e69e43744e167425 -Author: Tvrtko Ursulin -Date: Tue May 12 11:06:34 2015 +0100 - - kms_flip_tiling: New tiling tests, including Y/Yf - - New subtests to excercise flips from tiled to tiled and from - linear to tiled frame buffers. - - These will catch display programming issues like not preserving the - tiling mode in page flips or not re-programming the watermarks. - - v2: Cleanup crc object after failing subtests. - - v3: - * Wait for page flip completion instead of vblank. (Chris Wilson) - * Added linear->tiled flip tests to catch watermark programming issues. - - v4: - * Refactored for less code. - * Check crc after page flip to ensure it happened. (Chris Wilson) - * Skip rather than fail when flip fails. (Chris Wilson) - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: Chris Wilson - Cc: Daniel Vetter - Signed-off-by: Daniel Vetter - -commit b6d26c2a4858d3e6dd70f3278861b333c2758b72 -Author: chandra konduru -Date: Mon May 11 11:51:56 2015 -0700 - - i-g-t: Update kms_panel_fitting to work on other platforms - - kms_panel_fitting currently enabled for SKL only, but as - panel_fitters are available on prior platforms, enable this - kms test for them too. - - Signed-off-by: chandra konduru - Signed-off-by: Daniel Vetter - -commit f5dd258cc7276be30d699d68f7c6952b04067529 -Author: Chris Wilson -Date: Tue May 12 10:02:59 2015 +0100 - - igt/gem_streaming_writes: Build in a self-test - - Use the first pass to write all values prior to the initial execbuf to - verify that the copy itself is true. Subsequent passes then focus on - verifying that writing values whilst the GPU is reading from - neighbouring values is then correct. - - Signed-off-by: Chris Wilson - -commit a5a010c82d07db6c0397ba7e5f50c00683a5c5f3 -Author: Chris Wilson -Date: Tue May 12 09:28:34 2015 +0100 - - igt/gem_mmap/huge-bo: Fix cut'n'paste error - - One paste too many before pushing. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90411 - Signed-off-by: Chris Wilson - -commit 357073c257fddea385a94923024ad142cb3056ec -Author: Chris Wilson -Date: Mon May 11 17:35:35 2015 +0100 - - igt/gem_streaming_writes: Trim number of batch buffers allocated - - Reduce memory usage for batches by a factor of 64 - which we immediately - spend some of in increasing the stress. - - Signed-off-by: Chris Wilson - -commit 5f932c4dad73b276fda5b2a44b15fc922af1a35e -Author: Damien Lespiau -Date: Mon May 11 19:31:26 2015 +0100 - - quick_dump/skl: Add more pipe/plane registers - - With the recent developments, add scaler and NV12 registers to the dump. - Also add the cursor registers that were missing in the first batch. - - Signed-off-by: Damien Lespiau - -commit f6155ac30c0f195845200174abc41d71279bef49 -Author: Damien Lespiau -Date: Mon May 11 17:53:44 2015 +0100 - - build: Add missing line continuation - - When -lrt was added, it was missing a '\' at the end of line. Add it. - - Cc: Tim Gore - Cc: Thomas Wood - Signed-off-by: Damien Lespiau - -commit 09ea86eac13d319fe6a1b84b0b1ff1db1bb86189 -Author: Damien Lespiau -Date: Mon May 11 16:36:51 2015 +0100 - - kms_cursor_crc: Move comment to the appropriate place - - Signed-off-by: Damien Lespiau - -commit 672238dbf76704019d6248e6031479afb8888d3f -Author: Chris Wilson -Date: Mon May 11 15:06:30 2015 +0100 - - igt: Add gem_streaming_writes - - This tries to replicate the missing barrier observed when using - asynchronous mmap(wc) on byt. - - Signed-off-by: Chris Wilson - -commit d9dd33c0d93d5d1a1f9ff3a4a5059367931cadae -Author: Damien Lespiau -Date: Mon May 11 15:08:58 2015 +0100 - - lib: Add missing '\n' to error message - - Those messages where missing a new line at the end. Take the opportunity - to re-format the messages to fit in the 80 chars limit. - - Signed-off-by: Damien Lespiau - -commit 9b0a32dc80b6b0c0f35d06fc833f29510efccd72 -Author: Chris Wilson -Date: Sun May 10 09:09:54 2015 +0100 - - lib/core: Limit fatal signal CRASH reporting to the fatal signals - - Signed-off-by: Chris Wilson - -commit cb57cdc6327f100ade8d205f6bd2da05cf78c3a4 -Author: Damien Lespiau -Date: Thu May 7 18:17:32 2015 +0100 - - skl_compute_wrpll: Prefer even dividers - - Signed-off-by: Damien Lespiau - -commit b3ef2986caebe89adc3fa8a967503f738c38a4da -Author: Damien Lespiau -Date: Thu May 7 18:17:08 2015 +0100 - - skl_compute_wrpll: Count how many even/odd dividers we compute - - Signed-off-by: Damien Lespiau - -commit 8d1739dd84070d8bad0b2940b0026f14cb50f13d -Author: Damien Lespiau -Date: Thu May 7 16:54:21 2015 +0100 - - skl_compute_wrpll: Make sure we respect the DCO frequency constraints - - We might as well verify that we have a semblance of all being in order - by making sure the DCO frequency is within the expected bounds. - - Signed-off-by: Damien Lespiau - -commit acbcdbd8b71604fc0578894eb8f19d926fd8e55b -Author: Damien Lespiau -Date: Tue May 5 16:31:37 2015 +0100 - - skl_compute_wrpll: Add a way to test the SKL WRPLL algorithm - - I had various problems (infinite loops, unable to compute dividers for - certain frequencies) after implementing a BSpec update. Much easier to - debug that in userspace. - - Signed-off-by: Damien Lespiau - -commit 5dbeebc8aadab79047aab978766d8a5677de9b2d -Author: Damien Lespiau -Date: Tue May 5 15:45:21 2015 +0100 - - compute_wrpll: Rename ddi_compute_wrpll to hsw_compute_wrpll - - We're going to add the SKL version, time to rename the HSW/BDW one. - - Signed-off-by: Damien Lespiau - -commit 09f4175889a2107691a9e21d27d74fcd572121b0 -Author: Chris Wilson -Date: Fri May 8 16:44:40 2015 +0100 - - igt/gem_mmap_gtt: Add pagefault-of-doom failure case - - This is a test that should be a showcase for partial views... - - Signed-off-by: Chris Wilson - -commit 578795ff9549f680d426879cf19ef6124a51fcc4 -Author: Chris Wilson -Date: Fri May 8 14:35:37 2015 +0100 - - lib: Teach igt to handle signal failures gracefully - - If we see a fatal signal in a subtest, fail. - - Signed-off-by: Chris Wilson - -commit be955173d0481dd7f5dabe4a8531811d17e66470 -Author: Chris Wilson -Date: Fri May 8 11:43:50 2015 +0100 - - igt/gem_mmap_gtt: Check GTT mmapping of large tiled objects - - Move function CPU mmap test of large bo to gem_mmap, and include a - page-by-page copy between two huge objects (as we have had many bugs - triggering pagefault-of-doom for full apertures before). - - Signed-off-by: Chris Wilson - -commit cf9f48e704030b606260919f2da4c4287e51c4af -Author: Paulo Zanoni -Date: Thu Feb 19 15:41:15 2015 -0200 - - lib: add igt_draw - - For all those IGT tests that need an easy way to draw rectangles on - buffers using different methods. Current planned users: FBC and PSR - CRC tests. - - There is also a tests/kms_draw_crc program to check if the library is - sane. - - v2: - Move the test from lib/tests to tests/ (Daniel). - - Add igt_require() to filter out the swizzling/tiling methods we - don't support (Daniel). - - Simplify reloc handling on the BLT case (Daniel). - - Document enum igt_draw_method (Daniel). - - Document igt_draw_get_method_name() (Paulo). - v3: - Add IGT_DRAW_MMAP_WC (Chris). - - Implement the other trivial swizzling methods (Chris). - - Remove the gem_sync() calls (Chris). - - Signed-off-by: Paulo Zanoni - -commit 8d3023c15bcc9890ab7b89fa8ae4564a295078c2 -Author: Paulo Zanoni -Date: Tue May 5 16:20:05 2015 -0300 - - tests/kms_fbc_crc: fix debugfs read - - Commit 47f6b1305cc3752f318a555b932e194e1500c1d8 completely broke this - test due to the fread() assertion. When we're reading the debugfs file - we really don't care about how many bytes we read because the number - is not constant and we just use strstr() later. Change the assertion - to make it check for at least 1 byte read, just to make sure no one - changes that again. - - Regression introduced by: - commit 47f6b1305cc3752f318a555b932e194e1500c1d8 - Author: Thomas Wood - Date: Wed Mar 25 16:42:57 2015 +0000 - igt.cocci: check the return values of various functions - - Cc: Thomas Wood - Signed-off-by: Paulo Zanoni - -commit 159562c8251d3bd27d338ea7ac6a2936becd05c2 -Author: Daniele Ceraolo Spurio -Date: Wed May 6 15:01:30 2015 +0100 - - tests/gem_ppgtt: Check for vm leaks with flink and ppgtt - - Using imported objects should not leak i915 vmas (and vms). - - In practice this simulates Xorg importing fbcon and leaking (or not) one vma - per Xorg startup cycle. - - v2: use low-level ioctl wrappers and bo offset to check the leak (Chris) - v3: use the flinked bo as batch (Chris) - v4: add check on offset, remove unneeded assignments (Chris) - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniele Ceraolo Spurio (v2+) - Reviewed-by: Chris Wilson - Cc: Chris Wilson - Cc: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit aa720ffaf59da0802fe58bd5850075432f644f40 -Author: Daniel Vetter -Date: Wed May 6 11:38:06 2015 +0200 - - lib/mmio: One more s/OUTRET/OUTREG/ - - A those typos ... - - Signed-off-by: Daniel Vetter - -commit 9bb2ca3a83efd528c11c8515ad85456d53717619 -Author: Daniel Vetter -Date: Wed Mar 25 21:15:34 2015 +0100 - - lib/batchbuffer: Fix COLOR_BLIT_COPY_BATCH_START - - Reviewed-by: Paulo Zanoni - Signed-off-by: Daniel Vetter - -commit c0ed7d344af4d60d2c9663041233c3e0fbc2dc38 -Author: Paulo Zanoni -Date: Tue Mar 24 17:35:10 2015 -0300 - - tests/kms_fbc_crc: remove redundant information from data_t - - While it is nice to have shorter names for the most-accessed - variables, it makes the code more difficult to read since it's not - clear to the code reader whether that "gem_handle" is from some FB or - something else. The reader also has to audit the code to see if, for - example, the value of data->handle[0] stays consistent with - data->fb[0].gem_handle all the tame or if at some point the value is - replaced with something else. So remove the redundant information, - making it explicit that we're using the gem handles and FB IDs of the - framebuffers all the time. - - Signed-off-by: Paulo Zanoni - -commit 235e87de450714df9982fb86fae2dd5a9e8e2980 -Author: Paulo Zanoni -Date: Tue Mar 24 17:11:05 2015 -0300 - - tests/kms_fbc_crc: use igt_pipe_crc_collect_crc() - - Instead of its hardcoded implementation. - - Signed-off-by: Paulo Zanoni - -commit 26ff2c7daac88e12969530a62703913ba9ee0fe3 -Author: Paulo Zanoni -Date: Fri Dec 5 13:40:00 2014 -0200 - - tests/kms_fbc_crc: add wait_for_fbc_enabled() - - The code has a common pattern of "wait 300ms, then check if FBC is - enabled". Most of the time FBC is enabled in either 50ms or 0ms, so - introduce wait_for_fbc_enabled(), which can return much earlier if FBC - is actually enabled before the 300ms timeout. - - Signed-off-by: Paulo Zanoni - -commit 9bb04d3aa6a2b1b86e091967e312a19ce337df4d -Author: Paulo Zanoni -Date: Wed Dec 3 16:12:49 2014 -0200 - - lib: add igt_wait() - - Just a little helper for code that needs to wait for a certain - condition to happen. It has the nice advantage that it can survive the - signal helper. - - Despite the callers added in this patch, there is another that will go - in a separate patch, and another in a new IGT test file that I plan to - push later. - - v2: Check COND again before returning in case we hit the timeout. - - Signed-off-by: Paulo Zanoni - -commit a734ac2058fd0cce842a4290335c0697d89b2d63 -Author: Jani Nikula -Date: Tue Apr 28 13:31:30 2015 +0300 - - rename global mmio variable to igt_global_mmio - - Global variable names should reflect the fact that they are indeed - global, and at the very least they should not be as short as just - "mmio". Rename mmio to igt_global_mmio. - - Signed-off-by: Jani Nikula - -commit db84a8cf143f5d343220eb1d85a20b8b3da4036c -Author: Jani Nikula -Date: Tue Apr 28 11:39:22 2015 +0300 - - tests/gen7_forcewake_mt: use local mmio variable - - igfx_get_mmio() uses the global mmio variable by accident. Use a local - variable instead. - - The intention is to rename the global variable later on, so shadowing it - here does not matter. - - Signed-off-by: Jani Nikula - -commit 0bbbc6360fb1b7adf325ada1bdf7e200ceb8c5c4 -Author: Jani Nikula -Date: Tue Apr 28 13:34:13 2015 +0300 - - intel_vga_{read,write}: use INREG and OUTREG - - Use INREG and OUTREG instead of using mmio directly. - - Signed-off-by: Jani Nikula - -commit 33c2e8b083953401949a9540f47ebb5770e4b543 -Author: Jani Nikula -Date: Tue Apr 28 13:25:35 2015 +0300 - - intel_display_poller: use INREG and OUTREG - - Use INREG and OUTREG instead of using mmio directly. - - Signed-off-by: Jani Nikula - -commit fb1515c170b01575dc18d24879dd20bc300db22d -Author: Jani Nikula -Date: Wed Apr 15 15:50:19 2015 +0300 - - intel_watermark: switch to INREG - - Use INREG instead of using mmio directly. - - Signed-off-by: Jani Nikula - -commit 12d785bcd47396b477cca206e5db2158d02ffd5b -Author: Jani Nikula -Date: Wed Apr 15 15:47:34 2015 +0300 - - intel_reg_{read,write}: switch to INREG and OUTREG - - Use INREG and OUTREG instead of using mmio directly. - - Signed-off-by: Jani Nikula - -commit 87eb37c86b5c4212e48cae1a05a9c21b7ff03e3e -Author: Jani Nikula -Date: Wed Apr 15 15:45:25 2015 +0300 - - intel_reg_checker: switch to INREG - - Use INREG instead of using mmio directly. - - Signed-off-by: Jani Nikula - -commit e9f4c5f9b92ade8465414d3a461d490bf7861476 -Author: Jani Nikula -Date: Wed Apr 15 15:39:55 2015 +0300 - - intel_backlight: switch to INREG and OUTREG - - Use INREG and OUTREG instead of using mmio directly. - - Signed-off-by: Jani Nikula - -commit 510ac32db14e5e847aaf998992f69768c7fffc41 -Author: Jani Nikula -Date: Wed Apr 15 15:42:00 2015 +0300 - - intel_reg: switch to INREG and OUTREG - - Use INREG and OUTREG instead of using mmio directly. - - Signed-off-by: Jani Nikula - -commit 23b7f089207e44244ecc5757a2be5263db08581b -Author: Jani Nikula -Date: Tue Apr 28 11:52:42 2015 +0300 - - lib: add 16 and 8 bit versions of INREG and OUTREG - - Add INREG8, INREG16, OUTREG8, and OUTREG16. While at it, cleanup doc - comments of INREG and OUTREG. - - Signed-off-by: Jani Nikula - -commit 30e84df0c110971cc07cc81fdbf66aa9e7840bc6 -Author: David Herrmann -Date: Mon May 4 20:15:54 2015 +0200 - - tests: add drm_auth tests for generic DRM-auth-magic testing - - This adds tests/drm_auth.c which tests for drmGetMagic() and - drmAuthMagic() deficiencies. - - Signed-off-by: David Herrmann - Signed-off-by: Daniel Vetter - -commit 3be592001b6944433490d491596694ca66bd134f -Author: Michel Thierry -Date: Tue Apr 14 16:42:58 2015 +0100 - - igt/gem_ctx_exec: Add lrc lite restore subtest - - Exercise lite-restore (re-submit a context that is currently running), - by queueing several small batchbuffers. - - This test helps to validate WaIdleLiteRestore. - - Signed-off-by: Michel Thierry - -commit c4ec47b46d7e716f153a904c5a5b5b01a5afc7de -Author: Chris Wilson -Date: Sun May 3 09:16:25 2015 +0100 - - igt/gem_exec_lut_handle: Force slow relocation path - - Signed-off-by: Chris Wilson - -commit c317b788c09e047c951b36a4a8acbce9f8d2f03e -Author: Tvrtko Ursulin -Date: Thu Apr 30 12:27:54 2015 +0100 - - igt_fb: Close the image file when we are done with it - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Thomas Wood - -commit 48a27bcaf6a284235c41ce196b4969a472f264e6 -Author: Tim Gore -Date: Mon Apr 27 16:17:50 2015 +0100 - - lib/igt_core.c : only disable low mem killer once - - The call to low_mem_killer_disable(true) was being done - from within function oom_adjust_for_doom. However, - oom_adjust_for_doom gets called from 3 places. We only - want the call to low_mem_killer_disable(true) to happen - during common_init, so call it from here instead of from - oom_adjust_for_doom. - - v2:Thomas Wood pointed out that the initial call to disable - the low_mem_killer does not get made when we are just - listing subtests; so I have qualified the call from the - exit handler, which re-enables the low_mem_killer, with - if (!igt_only_list_subtests()). - For belt and braces I have also made low_mem_killer_disable - idempotent, so multiple calls to disable or re-enable are - safe. - - Signed-off-by: Tim Gore - [Thomas: small coding style fix] - Signed-off-by: Thomas Wood - -commit 637f0455da91c91eedae1245464b45f0c3f7310e -Author: Tvrtko Ursulin -Date: Mon Apr 27 12:29:11 2015 +0100 - - kms_rotation_crc: Do not leak framebuffers during test duration - - Test used to call prepare_crtc twice in the plane loop and leaked two - framebuffers per [subtest]x[pipe]x[plane]. - - What the loops really wants to do, instead of second invocation of - prepare_crtc, is to just turn on the display with the unrotated fb to - verify that the plane property has been restored by the VT transition - from previous to graphics mode. - - To enable that factor out code which does that from prepare_crtc into - commit_crtc and call it instead. - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Signed-off-by: Thomas Wood - -commit 4650d3406cd2e1378b215793730b59c065c230d4 -Author: Jani Nikula -Date: Tue Apr 14 22:33:33 2015 +0300 - - man: add man page for intel_reg in reStructured text format - - Produce the intel_reg man page from rst using rst2man. Also facilitate - writing any man page in reStructured text, as long as rst2man is - available. - - v2: configure check for rst2man, credits to Thomas Wood for that. - - Signed-off-by: Jani Nikula - -commit 30a1360f6abeed5f7aaaa069380d07f94ae9a036 -Author: Tvrtko Ursulin -Date: Wed Apr 29 13:24:34 2015 +0100 - - igt_fb: Transfer existing content to Cairo surface for Y/Yf frame buffers - - Rendering into Y and Yf tiled frame buffers with Cairo was losing the - previous content ie. was starting from black. This is different than the - behaviour with linear and X tiled so make it the same by blitting the - initial content when creating the rendering context. - - Signed-off-by: Tvrtko Ursulin - Cc: Damien Lespiau - Signed-off-by: Damien Lespiau - -commit fc69bb0de5f072be45e327bfff0efade6880a1a9 -Author: Chris Wilson -Date: Mon Apr 27 21:05:33 2015 +0100 - - igt/gem_exec_big: Check 64bit relocation values - - On gen8, we should check that the full 64bit relocation value is - correct, and we should be sure to poison the relocation offset between - runs. - - Signed-off-by: Chris Wilson - -commit 40b45bace325b13519c4ddc71eb64665c7796350 -Author: Thomas Wood -Date: Mon Apr 27 17:34:41 2015 +0100 - - tools: add missing header to distributed sources - - Make sure all the sources for intel_reg are included in the - distribution. - - Signed-off-by: Thomas Wood - -commit bad8834ee77e7defb3e1ceb150b07bf6e82d4693 -Author: Thomas Wood -Date: Mon Apr 27 15:32:41 2015 +0100 - - tools: update .gitignore - - Signed-off-by: Thomas Wood - -commit a3e336e4614613e30b2bb2cd21b76c1c69614475 -Author: Joonas Lahtinen -Date: Fri Apr 24 10:38:58 2015 +0300 - - tests/gem_mmap_gtt: Use PAGE_SIZE instead of hard coded value - - Now that there is PAGE_SIZE define, use it. - - Signed-off-by: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit dbf6468f90f864decc79cb5c5802cb4d230fb46d -Author: Tvrtko Ursulin -Date: Wed Apr 22 16:46:48 2015 +0100 - - kms_rotation_crc: Use main test for negative cases - - Saves a good amount of code duplication by supporting expected - failures from the main loop. - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Reviewed-by: Sonika Jindal - Signed-off-by: Thomas Wood - -commit 6f5d400ae9323a7c1c616d591876f29ca0ad0f10 -Author: Tvrtko Ursulin -Date: Wed Apr 22 16:46:47 2015 +0100 - - kms_rotation_crc: No need to square the buffer in paint - - Now that size is calculated in a single place and correct geometry passed in, - paint squares does not need to concern itself with it. - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Reviewed-by: Sonika Jindal - Signed-off-by: Thomas Wood - -commit b769a7c96b4ccf33b9ea75f4d99856995b5ac571 -Author: Tvrtko Ursulin -Date: Wed Apr 22 16:46:46 2015 +0100 - - kms_rotation_crc: Consolidate plane and cursor code paths - - There can only be one, either a plane or a cursor, in each subtest so there - is no need for two framebuffer varilables and also some codepaths can be - unified. - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Reviewed-by: Sonika Jindal - Signed-off-by: Thomas Wood - -commit e23a818c180bfd81ec2eeb1e9ac55223f4bf9658 -Author: Tvrtko Ursulin -Date: Wed Apr 22 16:46:45 2015 +0100 - - kms_rotation_crc: Negative test does not need to render anything - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Reviewed-by: Sonika Jindal - Signed-off-by: Thomas Wood - -commit 148c0d22816f170284edc4232fc58bff58bd1e28 -Author: Tvrtko Ursulin -Date: Wed Apr 22 16:46:44 2015 +0100 - - kms_rotation_crc: Remove unused variable in negative test - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Reviewed-by: Sonika Jindal - Signed-off-by: Thomas Wood - -commit d9011062404a37929bcfb7f1dbfbd9d901215e6f -Author: Tvrtko Ursulin -Date: Wed Apr 22 16:46:43 2015 +0100 - - kms_rotation_crc: Framebuffer used for initial modeset does not need to be painted - - It is just there to light up the display using the full modeset. Also renamed it - from fb_full to fb_modeset to be more descriptive. - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Reviewed-by: Sonika Jindal - Signed-off-by: Thomas Wood - -commit 4dd79d13c94a48c1d346eddb4936d0990c55fdab -Author: Tvrtko Ursulin -Date: Wed Apr 22 16:46:42 2015 +0100 - - kms_rotation_crc: Local framebuffers do not need to be global - - Signed-off-by: Tvrtko Ursulin - Cc: Sonika Jindal - Reviewed-by: Sonika Jindal - Signed-off-by: Thomas Wood - -commit 019ae907ffcb6c4470ddb114a4d0de9634dc4fef -Author: Chris Wilson -Date: Sun Apr 26 12:16:44 2015 +0100 - - lib: Fix types for gem_mmap* - - Signed-off-by: Chris Wilson - -commit fb950bc17ff8dfa3235535a12f0c4dcde281b2e3 -Author: Chris Wilson -Date: Mon Apr 13 19:04:13 2015 +0100 - - lib: Cache static queries - - We frequently check for device capabilities, for which we can safely - assume that there is but one on a system and so cache the first query - value and return it for all future queries. The benefit is to reduce - dmesg debug spam which helps when either bringing up a test or trying to - track down why a test fails. - - Signed-off-by: Chris Wilson - -commit 10f903aa23932e8bce383ee56db8aaefd73dfb28 -Author: Chris Wilson -Date: Sun Apr 26 11:21:10 2015 +0100 - - igt/gem_pwrite: Check that mmap(wc) succeeds - - Signed-off-by: Chris Wilson - -commit cd812a4e89db0150bfcff6d91ffffea37dc106c9 -Author: Chris Wilson -Date: Sun Apr 26 11:18:28 2015 +0100 - - igt/gem_pwrite: Delete unused mmap(wc) for the big CPU test - - Signed-off-by: Chris Wilson - -commit 49bcdc84a3e420a420bce9798b683a02273373f4 -Author: Chris Wilson -Date: Sun Apr 26 10:39:06 2015 +0100 - - igt/gem_pwrite: Also test surfaces larger than the GTT - - Go big or go home! - - Signed-off-by: Chris Wilson - -commit 236bab5cfd2d225d1eeec32d4bfa5f0757952975 -Author: Chris Wilson -Date: Sun Apr 26 11:11:55 2015 +0100 - - lib: Fix types for gem_create() - - Signed-off-by: Chris Wilson - -commit 263da26b9c2ce33a4b6aac05acf97b21fe51d70f -Author: Chris Wilson -Date: Sun Apr 26 10:16:39 2015 +0100 - - intel-gpu-overlay: Improve error message for failure to open an output - - Signed-off-by: Chris Wilson - -commit be6e32b9254f2740da0a287caf2eaa1d745b77a3 -Author: Chris Wilson -Date: Sun Apr 26 10:13:49 2015 +0100 - - igt/gem_pwrite: Test handling of larger than mappable buffers - - Signed-off-by: Chris Wilson - -commit dfda0b6aeccef464cc6f1af60d8ea16c11fb13f7 -Author: Jani Nikula -Date: Wed Dec 10 14:27:07 2014 +0200 - - intel_reg: introduce one intel_reg tool to rule them all - - Three Tools for the Elven-kings under the sky, - Seven for the Dwarf-lords in their halls of stone, - Nine for Mortal Men doomed to die, - One for the Dark Lord on his dark throne - In the Land of Mordor where the Shadows lie. - One Tool to rule them all, One Tool to find them, - One Tool to bring them all and in the darkness bind them - In the Land of Mordor where the Shadows lie. - - J.R.R. Tolkien's epigraph to The Lord of The Tools - | sed 's/Ring/Tool/g' - - Introduce intel_reg as the one Intel graphics register multitool to - replace intel_reg_read, intel_reg_write, intel_iosf_sb_read, - intel_iosf_sb_write, intel_vga_read, intel_vga_write, intel_reg_dumper, - intel_reg_snapshot, and quick_dump.py. - - Signed-off-by: Jani Nikula - -commit e1ce5eac338f44deda488a44db04faceea12f13a -Author: Sonika Jindal -Date: Wed Apr 22 16:44:05 2015 +0530 - - kms_rotation_crc: Adding test for 90/270 rotation - - Adding 90/270 rotation testcase for primary and sprite planes. - - v2: Added position test for sprite. Checking for gen > 9 for 90/270. - Some cleanup and rebase. - v3: Added test for unsupported tiling and unsupported pixel format for 90/270 - v4: Added the legacy commit to initiate modeset in the negative test(Tvrtko) - - Signed-off-by: Sonika Jindal - Reviewed-by: Tvrtko Ursulin - Signed-off-by: Thomas Wood - -commit 7ef80c0a980bc6b2cb58de7aec443b343ac0d33e -Author: Sonika Jindal -Date: Tue Apr 7 13:59:03 2015 +0530 - - lib/igt_kms: Let set_property return the result - - Return the return value of the set_property ioctl and add check for - the failure. - - Signed-off-by: Sonika Jindal - Reviewed-by: Tvrtko Ursulin - Signed-off-by: Thomas Wood - -commit 7aeecc197bcf586fe5b8e2091cf3e647991382f9 -Author: Tim Gore -Date: Wed Apr 22 10:29:08 2015 +0100 - - tests/Android.mk : skip kms_legacy_colorkey if no cairo - - test kms_legacy_colorkey depends on cairo, so add it to - the list of test not to build unless "ANDROID_HAS_CAIRO" - is set. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 20ad3e55fbd33f4400d16d4186befd7e2e5d19ac -Author: Tim Gore -Date: Tue Apr 21 17:08:17 2015 +0100 - - tools/quick_dump/makefile.am: add -lrt to get clock_gettime - - Attempting to build IGT on linux without libunwind fails - due to tools/quick_dump not linking the rt library, - causing an undefined symbol error for clock_gettime. - Adding -lrt to the list of libraries in Makefile.am fixes - this. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 52888df084f51899e7e873a24f6c1aa5c66dd191 -Author: Tim Gore -Date: Tue Apr 21 14:53:03 2015 +0100 - - lib/drmtest.h : fix mmap64 again - - In android mmap64 was redirected to mmap2 because mmap64 - was not alway available. But now mmap2 has been removed - from 64 bit android builds (and mmap64 is available), so - update preprocessor conditional to check for __x86_64__. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 5b7edb9cb010fc770f069a2fbba2782ea3ee6936 -Author: Thomas Wood -Date: Mon Apr 20 12:35:01 2015 +0100 - - docs: avoid escaping characters in documentation comments - - Avoid having to escape certain characters in documentation comments by - not allowing docbook markup tags. Markdown formatting in documentation - comments is still supported. - - Signed-off-by: Thomas Wood - -commit cc9110c44733f63d1c81fc546becf7b22fbac394 -Author: Mike Mason -Date: Fri Apr 17 15:10:35 2015 -0700 - - tests/tools_test: Find tools in source or installed locations - - Signed-off-by: Mike Mason - Signed-off-by: Thomas Wood - -commit 36ecc3180a8404c5c9a4ac4db09e69d9679f0aab -Author: Rodrigo Vivi -Date: Tue Apr 14 18:04:01 2015 -0700 - - tests/kms_psr_sink_crc: Make render size and stride based on modified fb size - - Signed-off-by: Rodrigo Vivi - -commit c35247596033c8bd2fd4d834f3941a7075aa84c8 -Author: Rodrigo Vivi -Date: Fri Mar 13 12:11:54 2015 -0400 - - test/kms_psr_sink_crc: Add dpms off/on tests. - - Signed-off-by: Rodrigo Vivi - -commit 782d5e7a032d1a34ef7f45970a5d8025ec47aece -Author: Rodrigo Vivi -Date: Fri Mar 13 12:10:20 2015 -0400 - - test/kms_psr_sink_crc: Split plane setup operations - - No functional changes. This reorg will allow to do some - operations like dpms off/on with different places to wait - for psr to get active. - - Signed-off-by: Rodrigo Vivi - -commit fd9ef1b8c87e0016c8820aed0d42542894430b85 -Author: Rodrigo Vivi -Date: Fri Mar 13 12:28:07 2015 -0400 - - tests/kms_psr_sink_crc: remove timeout option from wait_psr_entry. - - No functional changes. Just making timeout unique for any case. - - Signed-off-by: Rodrigo Vivi - -commit ae9c685133c5a1f30418d6fda1ce898c11c7053c -Author: Rodrigo Vivi -Date: Tue Dec 9 20:44:11 2014 -0500 - - lib/igt_aux: Introduce igt_interactive_debug_manual_check. - - This is an extention of igt_debug_wait_for_keypress that also can have - customized message and return key pressed. - - v2: This is actualy a v2. V1 was an extension of original - igt_debug_wait_for_keypress but it was nacked. - - v3: Make [Y/n] check inside aux function as suggested by Daniel. - Also renaming and adding first use case along with the axu function. - - v4: Simplify function name and make it assert pressed key - is different from n/N as suggested by Daniel. - - Cc: Daniel Vetter - Signed-off-by: Rodrigo Vivi - -commit e1ac04462d94a9f51335b9f3849ce0bb29b534e4 -Author: Rodrigo Vivi -Date: Fri Dec 5 20:03:43 2014 -0500 - - tests/kms_psr_sink_crc: Add manual mode. - - Sink CRC is the most reliable way to test PSR. However in some platforms - apparently auto generated packages force panel to keep calculating CRC invalidating - our current sink crc check over debugfs. - - So, this manual test help us to find possible gaps on this platforms where we cannot - trust on sink crc checks. - - v2: Accept Daniel's suggestions: - * Avoid strcpy - * don't override assert definition - * Make --interactive-debug for every testcases instead using local --manual - - v3: Sink CRC can be unreliable for other platforms as well so let's skip and warn - when we detect the misbehaviour instead hardcoded per platform. - - Cc: Daniel Vetter - Signed-off-by: Rodrigo Vivi - -commit b7b2ecbaefc86debf858141e3d8712a28cfb2b21 -Author: Rodrigo Vivi -Date: Fri Dec 5 20:03:31 2014 -0500 - - tests/kms_psr_sink_crc: Make plane_move visible to human eyes - - this will allow manual tests when crc isn't available. - - Signed-off-by: Rodrigo Vivi - -commit 00992f7d86b6c821030738932a722c581fd75b5d -Author: Rodrigo Vivi -Date: Fri Dec 5 20:01:41 2014 -0500 - - tests/kms_psr_sink_crc: Make mmaps visible to human eyes - - this will allow manual tests when crc isn't available. - - Signed-off-by: Rodrigo Vivi - -commit f20690d864b5483026a9147bb1cab2b009a87de4 -Author: Rodrigo Vivi -Date: Fri Dec 5 19:45:37 2014 -0500 - - tests/kms_psr_sink_crc: Make render visible to human eyes - - This will allow manual tests when crc isn't available. - - v2: Remove unused and non-sense buf->size and decrease buf->stride a bit as suggested by Daniel. - - v3: Fix v2 mistake and get buf->size back with a value that makes more sense. - TBD: to be changed for variable size depending on modified fb size on following patch - - Cc: Daniel Vetter - Signed-off-by: Rodrigo Vivi - -commit 3cb21246c1310c2f34c2dc99c893cab060333cb0 -Author: Rodrigo Vivi -Date: Fri Dec 5 19:43:34 2014 -0500 - - tests/kms_psr_sink_crc: Make blt visible to human eyes - - This will allow manual tests when crc isn't available. - - Signed-off-by: Rodrigo Vivi - -commit 1cbe7dd54cc95281407f10e55f51a201b526b245 -Author: Thomas Wood -Date: Thu Apr 16 17:40:28 2015 +0100 - - tests: update .gitignore - - Signed-off-by: Thomas Wood - -commit 2b74b2bb3358f80c72240d1a5ea6f304b21fba8d -Author: Ville Syrjälä -Date: Fri Mar 27 20:51:46 2015 +0200 - - tests: Add kms_legacy_colorkey - - Add a quick test to make sure the legacy set colorkey ioctl only works - for sprite planes. - - v2: Drop igt_fixtures - - Signed-off-by: Ville Syrjälä - -commit 4271b15f3c8df92f7f0e5201b292644d66da0054 -Author: Ville Syrjälä -Date: Thu Apr 9 21:23:06 2015 +0300 - - quick_dump: Fix undefined symbols from libunwind - - ../../lib/.libs/libintel_tools.a(igt_core.o): In function `print_backtrace': - intel-gpu-tools/lib/igt_core.c:981: undefined reference to `_Ux86_64_getcontext' - intel-gpu-tools/lib/igt_core.c:982: undefined reference to `_ULx86_64_init_local' - intel-gpu-tools/lib/igt_core.c:983: undefined reference to `_ULx86_64_step' - intel-gpu-tools/lib/igt_core.c:987: undefined reference to `_ULx86_64_get_proc_name' - - Signed-off-by: Ville Syrjälä - -commit 3dff4af5e053b9b64b1167621088ed8eea9e3222 -Author: Ville Syrjälä -Date: Thu Apr 9 21:20:25 2015 +0300 - - quick_dump: Don't allow undefined symbols in _chipset.so - - Every time _chipset.so has undefined symbols we fail to notice it - at build time and then get to wonder why quick_dump fails to actually - work. Pass -Wl,--no-undefined to the linker to get a build time error - instead of the current runtime error. - - Signed-off-by: Ville Syrjälä - -commit beddb3be3ffcd61b67a5d541134a5e76685e6f14 -Author: Chris Wilson -Date: Tue Apr 14 19:02:19 2015 +0100 - - igt/gem_exec_lut_handle: Hide exec latency - - The first test tries to rewrite relocations in an active batch, which is - a useful test and measurement. However, the overhead of the exec may - dominate and so we want a measurement without that overhead as well. - Using a pool of batches should allow for the oldest to idle whilst we - setup the next (and so the wait should be non-existent). - - Signed-off-by: Chris Wilson - -commit ecb03266b208bd95d160b8fb32d14fda87c5eb10 -Author: Thomas Wood -Date: Mon Apr 13 17:37:22 2015 +0100 - - lib: load images from the data directory in igt_paint_image - - Update igt_paint_image so that it can read images from the package data - directory. - - Signed-off-by: Thomas Wood - -commit 90dadcd0da63d70155bb4c5a40c80a4f5c3e821c -Author: Thomas Wood -Date: Mon Apr 13 12:09:48 2015 +0100 - - lib: use a critical warning when unable to open a data file - - Signed-off-by: Thomas Wood - -commit 8b3082a40e9a17fcd411aabc5c24c2e2ada5c13a -Author: chandra konduru -Date: Mon Mar 30 13:53:00 2015 -0700 - - i-g-t: Adding panel fitting test case - - This patch is adding i-g-t test case to test panel fitting usages. - - v2: - -use new tiled types when calling igt_create_fb (me) - - Signed-off-by: chandra konduru - [Thomas: convert test to use igt_simple_main] - Signed-off-by: Thomas Wood - -commit a26f9f9ad0e679c7ce413a25d34f6914e1174151 -Author: chandra konduru -Date: Mon Mar 30 13:52:04 2015 -0700 - - i-g-t: Adding plane scaling test case - - This patch is adding i-g-t plane scaling test case to test couple basic - display plane scaling usages. Additional test scenarios can be added later. - - v2: - -Added iterative scaling to visually observe scaling (me) - - v3: - -Added a flag to control primary plane scaling (me) - - v4: - -Use new tiled types when calling igt_create_fb (me) - - Signed-off-by: chandra konduru - [Thomas: convert test to use igt_simple_main] - Signed-off-by: Thomas Wood - -commit ace4208702c59205754507bec0c9ae4401a4f865 -Author: chandra konduru -Date: Mon Mar 30 13:44:32 2015 -0700 - - i-g-t: Adding test case to test background color. - - Adding i-g-t test case to test display crtc background color. - - v2: - - Added IGT_TEST_DESCRIPTION() (Thomas Wood) - - Added to .gitignore (Thomas Wood) - - Added additional details to function header (Thomas Wood) - - Simplified igt_main (Thomas Wood) - - v3: - - rebased to latest master (me) - - took sleep calls out (Daniel) - - use new tiled types when calling igt_create_fb (me) - - Signed-off-by: chandra konduru - [Thomas: convert test to use igt_simple_main] - Signed-off-by: Thomas Wood - -commit e371b3fbad2e45cfe669953ef4203e9f44659f65 -Author: Joonas Lahtinen -Date: Tue Apr 14 14:14:57 2015 +0300 - - tests/gem_mmap_gtt: add huge BO test - - Add a straightforward test that allocates a BO that is bigger than - (by 1 page currently) the mappable aperture, tests mmap access to it - by CPU directly and through GTT in sequence. - - Currently it is expected for the GTT access to gracefully fail as - all objects are attempted to get pinned to GTT completely for mmap - access. Once the partial view support is merged to kernel, the test - should pass for all parts. - - v2: - - Corrected BO domain handling (Chris Wilson) - - Check again after GTT access for added paranoia (Chris Wilson) - - v3: - - Avoid flush by using pread (Chris Wilson) - - Free gtt_pattern buffer too. - - v4: - - Add more comments (Tvrtko Ursulin) - - Use igt_require (Tvrtko Ursulin) - - v5: - - Remove wrong message from igt_require_f (Tvrtko Ursulin) - - After digging deeper to it, just igt_assert that the CPU - mapping needs to succeed. - - Cc: Tvrtko Ursulin - Cc: Chris Wilson - Signed-off-by: Joonas Lahtinen - Reviewed-by: Tvrtko Ursulin - [Thomas: remove unused label] - Signed-off-by: Thomas Wood - -commit 577fb75ed88d01f86dbfa593d90cb91ebfa37a2b -Author: Joonas Lahtinen -Date: Wed Apr 8 15:55:41 2015 +0300 - - tests/gem_mmap_gtt: clarify BO domain setting functions - - Add suffix and complementary function for CPU domain. - - v2: - - Change function signatures to be consistent with the rest - - Signed-off-by: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit 629759c2d1fea11a111ee79faf6afd08ff4c99d2 -Author: Thomas Wood -Date: Thu Apr 9 16:34:12 2015 +0100 - - NEWS: Updates - - Signed-off-by: Thomas Wood - -commit c06bba1256d8435fbcea45e54897ad533ad8c1e9 -Author: Thomas Wood -Date: Thu Apr 9 17:08:07 2015 +0100 - - tests: install the test list - - Cc: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit e72686b83b0bb51a0266d61c3024a5f5a6e17af7 -Author: Thomas Wood -Date: Fri Mar 13 14:15:46 2015 +0000 - - tests: create a single combined test list - - All tests now respond in a consistent way such that separate lists for - tests with and without subtests are no longer necessary. - - v2: fix other references to the test list - - Signed-off-by: Thomas Wood - -commit cff102ebb264eb86554651c7cbf259b4342b76c3 -Author: Thomas Wood -Date: Thu Apr 9 09:27:54 2015 +0100 - - lib: use test failure status for igt_set_timeout - - Use a failure status code for timeout to avoid confusion between tests - that take too long to execute versus a failure due to an operation - taking longer than expected. - - v2: Add a "timed out" message before exiting. (Daniel Vetter) - Fix the timeout library check by disabling hard errors in xfail - tests, since these share the same exit status as test failure. - - Signed-off-by: Thomas Wood - -commit b47032e191f0afb8d2dabf90889eee6dac8fc0e1 -Author: Thomas Wood -Date: Thu Apr 9 09:24:12 2015 +0100 - - lib: add a define for test failure exit status - - Signed-off-by: Thomas Wood - -commit 41fe1d1a4452891a297cea427a338c8769fc5c26 -Author: Chris Wilson -Date: Mon Apr 13 11:54:18 2015 +0100 - - lib: Implement gem_sync() using WAIT - - When synchronising to rendering, we only want to wait for it to complete - and avoid the cache-domain side-effects of SET_DOMAIN if possible. This - has the advantage of speeding up a few tests (and thereby making the - actual test more explicit in terms of kernel operations). Of course some - tests may be reliant on the side-effects... - - Signed-off-by: Chris Wilson - Reviewed-by: Daniel Vetter - -commit 9fd6e07369837ee268097e7aae4c8dea05431fa1 -Author: Chris Wilson -Date: Mon Apr 13 10:48:08 2015 +0100 - - igt/prime_self_import: Ensure driver state is consistent between counts - - Similar to gem_flink_race, we need to make sure that when we count - objects, the driver is in an identical state. We do this by flushing all - work before counting. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90003 - Signed-off-by: Chris Wilson - -commit 2e526ae9cd05f4f2c2e166071b78c68564e191aa -Author: Chris Wilson -Date: Sun Apr 12 13:32:17 2015 +0100 - - igt/gem_flink_race: Explicitly quiesce the GPU before counting objects - - By explicitly quiescing the GPU we force it to a known and ideally - identical state when counting objects. In particular, this should make - the batch-pool status the same and not cause us to detect a negative - leak. - - Signed-off-by: Chris Wilson - -commit 007ff02cbcf008628476948cad8e9ea08c6f5f26 -Author: Chris Wilson -Date: Fri Apr 10 09:48:46 2015 +0100 - - igt/gem_mmap_wc: Explicitly check for use-after-close - - We already rely on the mmap(object) surviving close(), but make the test - explicit and early. - - Secondly, we don't technically need to call set_domain after writing - through the CPU then reading through WC, since the CPU cache is - consistent for those two paths. Test it. - - Signed-off-by: Chris Wilson - -commit d36465d5205c5510ca4078346e47e8f3afc432e2 -Author: liu,lei -Date: Thu Apr 9 21:17:33 2015 +0800 - - Correct kms_fbc_crc case - - Debugfs i915_fbc_status shows "FBC unsupported on this chipset" - not "unsupported by this chipset" if the platform doesn't support - FBC feature. That typo will cause case fail on some platforms such - as byt, bsw. - - Signed-off-by: Lei Liu - -commit b556c9e8e5f53874da902c0c54442ef3eb56353e -Author: Shuang He -Date: Tue Apr 19 04:16:06 2011 +0800 - - tests: Fix duplicate 'kms_flip_event_leak' entry in tests/Makefile.sources - - Or, it will cause piglit failure to run I-G-T test case - - Signed-off-by: Shuang He - Signed-off-by: Daniel Vetter - -commit 1f6a64ee8078ac32c2986ee9f043c55ce6f22542 -Author: Chris Wilson -Date: Wed Apr 8 21:32:58 2015 +0100 - - igt/gem_exec_lut_handle: Put some operations back! - - In order to force relocations, we have to remember to clear the presumed - offsets that get filled in by each pass. - - Signed-off-by: Chris Wilson - -commit e22525064d357a65f480873ef9d28985e9957237 -Author: Chris Wilson -Date: Wed Apr 8 20:22:11 2015 +0100 - - igt/gem_exec_lut_handle: Trim a few operations from submission - - Move all the execbuffer construction upfront and do it once per round, - rather than per relocation pass. It helps reduce runtime, but more - importantly it removes the test overhead from out of the kernel - measurement. - - Signed-off-by: Chris Wilson - -commit 9d98ccb860f529ef0bef4bdffe0733ce348f1d6f -Author: Thomas Wood -Date: Wed Apr 8 11:46:39 2015 +0100 - - tests: use standard install prefix for programs, scripts and data - - Use the pkglibexec and pkgdata prefixes rather than setting bindir and - datadir. This also removes the extra 'tests' directory from within the - package libexec and data directories. - - Cc: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit 4e11307e0786d6a4fac014136c914c019aa9abb4 -Author: Thomas Wood -Date: Wed Apr 8 11:23:05 2015 +0100 - - tests: ensure scripts and data are included in the distribution - - Prefix the test scripts and data variables with dist_ to ensure they are - included in the distribution. - - Cc: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit 564dfd45a99e688c0a450f911adb864f4d5bd6b5 -Author: Thomas Wood -Date: Thu Apr 2 11:50:01 2015 +0100 - - tests/kms_fbc_crc: fix fread() return value assertion - - Use 1 as the element size to check the number of bytes returned is - greater than 0, rather than checking the number of elements returned. - - This fixes a regression from commit 47f6b13 (igt.cocci: check the - return values of various functions). - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89833 - Signed-off-by: Thomas Wood - -commit 074d8b440ef37eeb5fc8195a84a8c970f385a563 -Author: Imre Deak -Date: Tue Mar 31 20:32:36 2015 +0300 - - tools/intel_reg_dumper: fix PIPECONF decode - - - decode the register for BXT too - - decode interlace on VLV/CHV too - - don't decode rotation and bpc on platforms where these fields are not defined - - Signed-off-by: Imre Deak - -commit 07a58707c3e3310c8cd87b7fdf53526090fad748 -Author: Imre Deak -Date: Tue Mar 31 20:32:35 2015 +0300 - - tools/intel_reg_dumper: fix DSPCNTR decode for BXT - - Signed-off-by: Imre Deak - -commit 7027227ca24dc4acfa93e772074b111cb0734d65 -Author: Imre Deak -Date: Tue Mar 31 20:32:34 2015 +0300 - - tools/intel_bios_read: fix SSC freq for BXT - - On BXT the SSC reference frequency is fixed 100MHz. - - Signed-off-by: Imre Deak - -commit 790398bbbdc759882255c6f19537c138bfa094a6 -Author: Damien Lespiau -Date: Tue Mar 31 20:32:33 2015 +0300 - - list-workarounds/bxt: Add Broxton to the list of valid platorms - - Signed-off-by: Damien Lespiau - -commit ab7619b5d2d6ef16dfee86f0bdfc4dbea3c6e931 -Author: Damien Lespiau -Date: Tue Mar 31 20:32:32 2015 +0300 - - lib/bxt: Add Broxton PCI ids - - v2: Rebase on top of the SKL upstreaming - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit 6cd0ea090cc12dd1fb62a7ced97179ffc6dbb588 -Author: Imre Deak -Date: Tue Mar 31 20:32:31 2015 +0300 - - lib/intel_chipset: fix HAS_PCH_SPLIT on GEN9 - - In the next patch we'll add support for BXT which is GEN9, but doesn't - have PCH, so fix the macro accordingly. - - No functional change. - - Signed-off-by: Imre Deak - -commit f0cbfb64dfff5fd1d44cf2986f8f85656ee61882 -Author: Imre Deak -Date: Tue Mar 31 20:32:30 2015 +0300 - - lib/intel_chipset: fix HAS_PCH_SPLIT on CHV - - CherryView is GEN8 but doesn't have PCH so fix the macro accordingly. - - Signed-off-by: Imre Deak - -commit 1dc4884875b1fa9f2e7ea82f26b6f361249426b8 -Author: Imre Deak -Date: Tue Mar 31 20:32:29 2015 +0300 - - tools/intel_bios_reader: fix SSC freq for VLV/CHV - - VLV/CHV has a fixed 100MHz SSC reference frequency. - - Signed-off-by: Imre Deak - -commit d9a25af39c873199210ce06209254ed456a06263 -Author: Jani Nikula -Date: Wed Apr 1 12:08:59 2015 +0300 - - README: Update dependencies - - Add libunwind-dev, sort the list. - - Signed-off-by: Jani Nikula - -commit 7968098fb7bdb086d611f543832591064d88397c -Author: Jeff McGee -Date: Fri Apr 3 18:01:12 2015 -0700 - - tests/pm_sseu: Require Gen8+ early in setup - - Pre-Gen8 devices should be skipped early instead of failing - when test resources are not found. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89822 - Signed-off-by: Jeff McGee - -commit a6c3b32622d3d1cd2f3cb67255cd006b99d3fabb -Author: Chris Wilson -Date: Mon Apr 6 10:37:41 2015 +0100 - - igt/kms_vblank: Simple accuracy test - - Queue 60 event to arrive at the same vblank from different points in - time and make sure it just works. - - Signed-off-by: Chris Wilson - -commit 43a1f64e7222e9b5a8d7cb2b887002a8b539452e -Author: Chris Wilson -Date: Fri Apr 3 09:25:02 2015 +0100 - - igt/gem_cpu_reloc: Pretty print execbuf failures - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85672 - Signed-off-by: Chris Wilson - -commit 71de427b53582348f96974920dd40d4b4d3163a0 -Author: Chris Wilson -Date: Fri Apr 3 09:07:09 2015 +0100 - - igt/gem_persistent_relocs: Add note about known byt/full-ppgtt issue - - References: https://bugs.freedesktop.org/show_bug.cgi?id=84859 - Signed-off-by: Chris Wilson - -commit e8457edba6c41c4d44758e28adabf864be764c00 -Author: Chris Wilson -Date: Thu Apr 2 20:14:07 2015 +0100 - - igt/gem_exec_blt: Prevent assertion failure when running as a test load - - gem_exec_blt is used by other scripts to provide a background load, for - example by drv_missed_irq. This mode doesn't act like a normal test and - igt complains bitterly about it. - - Let's just ignore igt here. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=88041 - Signed-off-by: Chris Wilson - -commit 8938e1ed474bc4eb6598d5da01bb7001d4e9627d -Author: Tim Gore -Date: Wed Apr 1 16:56:38 2015 +0100 - - tests/Android.mk : skip kms_pipe_b_c_ivb if no cairo - - test kms_pipe_b_c_ivb depends on cairo, so add it to - the list of test not to build unless "ANDROID_HAS_CAIRO" - is set. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit ebb46bb2e2138b5f864a3fdff21d013d03e7931f -Author: Tim Gore -Date: Wed Apr 1 16:36:59 2015 +0100 - - tests/gem_concurrent.c: rename to gem_concurrent_all - - Recent patch #7763349a9a87.. renamed gem_concurrent_blit.c - to gem_concurrent.c and then added entries to Makefile.am - to make two identical executeables (but with different - names) from this source file. This executeable changes its - behaviour based on argv[0]. But, this has broken the - Android build, which does not use autotools. - - This patch instead renames the source file to match - the name of one executable (gem_concurrent_all.c) and - creates a second source file which simply #includes the - first. The Makefile.am entries are also removed. - This restores the simple test.c -> test executeable - relationship seen in the rest of IGT and allows the - Android build system to work without parsing Makfile.am - or having to incorporate a special workaround for this - test. - - Signed-off-by: Tim Gore - Reviewed-by: Chris Wilson - Signed-off-by: Thomas Wood - -commit a95033fdbcf32ea64ad2b75f38315489ee1c2042 -Author: Joonas Lahtinen -Date: Tue Mar 31 15:53:17 2015 +0300 - - tests: install test programs to libexec - - Install the test programs by default so that they can be packaged. - - Tested with the testdisplay test so that it still runs after the - modifications as it depends on a data file to be present. Need to - pass -r option to enable QR code display on success (PNG data file). - - Packaging is useful when building a complete software stack for a - DUT from scratch. This should bring us closer to achieving a - built-from-scratch testing workflow. - - Package maintainers can always decide to ignore the installed files. - - v2: - - Install more tests including scripts and their data - - v3: - - Add clarification to commit message about why we do this. - (Chris Wilson & Thomas Wood) - - Change libexec into pkglibexec to comply to standard - (Thomas Wood) - - Do not install $(common_files). (Thomas Wood) - - Make it really obvious the installed files are tests by using - tests directory name to avoid any confusion with packagers. - - v4: - - Fixed commit message. - - v5: - - Add file locator helper to retain backwards compatibility. - (Thomas Wood) - - Test with testdisplay -r option that draws the .png file. - - Cc: Chris Wilson - Cc: Thomas Wood - Signed-off-by: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit 590e47c94fd81a182e24b41a715d84491df8cea8 -Author: Chris Wilson -Date: Thu Apr 2 11:37:23 2015 +0100 - - igt/kms_vblank: Include a test for comparing blocking drmWaitVblank - - The other aspect of the spinlock/interrupt on-off overhead is that when - we wait for vblank it immediately turns off, and then we immediately turn - it back on for the next wait. - - Signed-off-by: Chris Wilson - -commit 992f9f6403b95b9822cb651b38d14a95bebc4e73 -Author: Ander Conselvan de Oliveira -Date: Mon Mar 30 14:38:19 2015 +0300 - - tests: Add test for pipe B and C interactions in IVB - - The tests exercise different combinations of enabling pipe B with modes - that require more than 2 lanes and then enabling pipe C. - - v2: Added a couple more tests for different pipe transitions. (Ander) - Use custom modes to make the test reliable. (Daniel) - - v3: Add IGT_TEST_DESCRIPTION. (Thomas) - Rename test to kms_pipe_b_c_ivb. (Ander) - - v4: Fix subtest enumeration. (Thomas) - - Signed-off-by: Ander Conselvan de Oliveira - Signed-off-by: Thomas Wood - -commit 9aeff2b5c57982a5ffd17881e62e94404b10834b -Author: Ander Conselvan de Oliveira -Date: Mon Mar 30 10:03:00 2015 +0300 - - lib/kms: Add a way to override an output's mode - - So that it is possible to use a custom mode with the simplified mode set API. - - v2: Add documentation for igt_output_override_mode(). (Thomas) - - Signed-off-by: Ander Conselvan de Oliveira - Signed-off-by: Thomas Wood - -commit 2f0e3cdcab423e86efc8e5aee113844ccd7b5295 -Author: Thomas Wood -Date: Mon Mar 30 13:19:32 2015 +0100 - - lib/tests: add missing library flags - - Signed-off-by: Thomas Wood - -commit 04b1526f9dc2ef08b5be2a56e6b8fd770a313872 -Author: Thomas Wood -Date: Fri Mar 27 15:21:41 2015 +0000 - - lib: add debug flags - - Signed-off-by: Thomas Wood - -commit ea453dbb4aaed2a4e59b608b0af0fd41916bf256 -Author: Thomas Wood -Date: Fri Mar 27 14:30:06 2015 +0000 - - gem_exec_blt: fix subtest enumeration - - Wrap the sysfs_read and sysfs_write calls in an igt_fixture block so - they are not executed during subtest enumeration. - - Cc: Chris Wilson - Signed-off-by: Thomas Wood - -commit af3e32cee27e99e461e727bdfb6127421ef09fbc -Author: Chris Wilson -Date: Mon Mar 30 17:01:51 2015 +0100 - - igt/gem_evict_everything: Simplify mlocked_evictions - - igt_fork/igt_waitchildren already perform the magic required to raise - errors based on the exit error code of the child, so take advantage of - that and kill the overlycomplicated message passing! - - Signed-off-by: Chris Wilson - -commit 9c6e6db03d41d3e075b0e231302810e522854817 -Author: Chris Wilson -Date: Mon Mar 30 11:09:44 2015 +0100 - - Revert "tests/gem_exec_lut_handle" - - This reverts commit a5934091b84e3f8804fb3fed35374c5a976dd07e. - - Unnerf igt/gem_exec_lut_handle. Sadly completely breaking the - measurement is not a good excuse to hide regressions. - -commit 068f9ceb628b3d721bf3d74c7932afc01a70905c -Author: Chris Wilson -Date: Wed Dec 3 09:05:54 2014 +0000 - - igt/gem_evict_everything: Use mlock to reduce available memory - - The idea here is to check what happens when a large process requests - memory from us - we create and utilize a bunch of surfaces then have to - relinquish some but continue using the whole working set (so as to force - reloads). - - Signed-off-by: Chris Wilson - -commit b9b82fdc5fdcbc43d0720b6aaf79e1f00f407d3a -Author: Chris Wilson -Date: Sun Mar 29 14:11:28 2015 +0100 - - igt/gem_exec_parse: Use a macro for pretty printing the test failure - - By moving the assert up a level, we get an much improved assertion - failure message (e.g. it includes the batch string that fails). - - Signed-off-by: Chris Wilson - -commit a1e4ec4a68ff1144249aa2f98c6834d296ee2061 -Author: Chris Wilson -Date: Sun Mar 29 14:10:53 2015 +0100 - - igt/gem_cs_prefetch: Use gem_execbuf for pretty printing of failures - - Signed-off-by: Chris Wilson - -commit 11291fd52f53d3c729d5ef4e5b2090f38c36cf69 -Author: Chris Wilson -Date: Thu Mar 26 20:52:00 2015 +0000 - - igt/gem_exec_(blt|nop): IGT magic - - $ ./gem_exec_nop --list-subtests - render - bsd - blt - vebox - gem_exec_nop: igt_core.c:946: igt_skip: Assertion `in_fixture' failed. - - Signed-off-by: Chris Wilson - -commit 47f6b1305cc3752f318a555b932e194e1500c1d8 -Author: Thomas Wood -Date: Wed Mar 25 16:42:57 2015 +0000 - - igt.cocci: check the return values of various functions - - Add rules to fix unused-result warnings when compiling with - _FORTIFY_SOURCE defined and apply them to the library and tests. - - Acked-by: Daniel Vetter - Signed-off-by: Thomas Wood - -commit 0c4dd28d2d3b39216f9d041119ebf34cc44b7df7 -Author: Thomas Wood -Date: Tue Mar 24 17:33:02 2015 +0000 - - docs: limit the number of subtests listed - - Avoid producing long lists of subtests in the documentation and instead - provide instructions on how to obtain the full list. - - Signed-off-by: Thomas Wood - -commit 76dad7f41475347f99e8a8ce6af67020dfd7c0f1 -Author: Thomas Wood -Date: Mon Mar 23 11:46:25 2015 +0000 - - Add default debug flags for tests - - Include debugging symbols in tests by default to improve stack traces - and also set the compiler optimisation level to improve the debugging - experience. - - Signed-off-by: Thomas Wood - -commit 277ca2b992c766581ef6ef01ea210808f456fbe0 -Author: Thomas Wood -Date: Fri Mar 13 17:02:12 2015 +0000 - - lib: print a stack trace when a test assertion fails - - Add an optional dependency on libunwind to print stack traces when a - test assertion fails. - - Acked-by: Daniel Vetter - Signed-off-by: Thomas Wood - -commit 2659cbbf643f2fdbf2f9acf8008edd4c6980cd2f -Author: Chris Wilson -Date: Thu Mar 26 12:09:57 2015 +0000 - - igt/gem_exec_(nop|blt): Repeat measurements at min/max GPU frequencies - - Signed-off-by: Chris Wilson - -commit 7763349a9a878ca58de4fb559edcbf81040da07b -Author: Chris Wilson -Date: Thu Mar 26 08:11:43 2015 +0000 - - igt/gem_concurrent_blit: Separate out the combinatorial explosion - - Apparently nobody else likes testing and debugging GEM coherency issues. - However, this also means that QA is skipping these vital tests. Split - out a set of canaries into igt/gem_concurrent_blit and keep the rest in - igt/gem_concurrent_all. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89497 - Signed-off-by: Chris Wilson - -commit c666a19e0c16821a1ccd2a2ea7dda549d19c67d1 -Author: Chris Wilson -Date: Fri Mar 20 22:37:00 2015 +0000 - - igt/gem_exec_blt: Repeat measurement and average - - Through away the unstable outliers for a more consistent measurement. - - Signed-off-by: Chris Wilson - -commit cd8d3809a6e49b0bd9da53b17217f99b3c86243a -Author: Chris Wilson -Date: Tue Mar 24 09:15:12 2015 +0000 - - igt/gem_exec_nop: Repeat and average to stabilize measurements - - Signed-off-by: Chris Wilson - -commit 4f78f9ffa23f777604c617c48c0b850301c3086e -Author: Chris Wilson -Date: Mon Mar 23 20:57:02 2015 +0000 - - igt/gem_exec_blt: Do a warmup run first - - Sometimes it takes a pass for the GPU to come up to full speed, so do a - "cold" pass first. - - Signed-off-by: Chris Wilson - -commit 6259d0a36b0aa2fd6fc37bdfd9bbede34334d771 -Author: Chris Wilson -Date: Sun Mar 22 10:33:57 2015 +0000 - - igt/gem_exec_blt: Repeat measurements for stablity - - Signed-off-by: Chris Wilson - -commit 2fa35c7316c26a469c0076a1a98c0b0a715b3386 -Author: Chris Wilson -Date: Thu Mar 19 08:29:51 2015 +0000 - - lib/core: Silence internally used signals - - We use SIGTERM to kill off child processes. We use it a lot. Reporting - everytime we use it is just spam. Treat the similar user signals - (SIGINT, SIGQUIT and the should-never-have-been SIGPIPE) similarly to - reduce noise. - - Signed-off-by: Chris Wilson - Cc: Thomas Wood - -commit 559987fc01f16f010681fedff69ffe8fb2231d50 -Author: Mika Kuoppala -Date: Tue Mar 24 13:03:26 2015 +0200 - - tools/intel_error_decode: Add gen8+ fault data encodings - - These two registers contains the 48bit fault address. - - Reviewed-by: Michel Thierry - Signed-off-by: Mika Kuoppala - -commit f96bfb8e8c62b7e3f6340579fec5be6bb6d50b8e -Author: Mika Kuoppala -Date: Mon Mar 23 11:33:37 2015 +0200 - - tools/intel_error_decode: Add decodings for FAULT_REG - - Add decodings for FAULT_REG - - v2: fix fault encodings and ignore addr type for gen8+ (Michel) - fix engine mask - - Reviewed-by: Michel Thierry - Signed-off-by: Mika Kuoppala - -commit 0a2ef9c3490eda9b5e28c936bbe7655ff7a05bd7 -Author: Mika Kuoppala -Date: Mon Mar 23 11:35:14 2015 +0200 - - tools/intel_error_decode: Add ERROR decodings for gen8 - - Add ERROR decodings for gen8 - - Reviewed-by: Michel Thierry - Signed-off-by: Mika Kuoppala - -commit 1cfcca66ec79feb9dbfcad7b7849eddaf026d2cf -Author: Ville Syrjälä -Date: Wed Mar 25 10:53:59 2015 +0200 - - tools: Update .gitignore - - Ignore intel_watermark and unignore the, now extinct, intel_dpio_{read,write}. - - Signed-off-by: Ville Syrjälä - -commit 07707aff752db9e406608fb2ed998bfc35a6f422 -Author: Jeff McGee -Date: Tue Mar 24 16:20:19 2015 -0700 - - tests/pm_sseu: Create new test pm_sseu - - New test pm_sseu is intended for any subtest related to the - slice/subslice/EU power gating feature. The sole initial subtest, - 'full-enable', confirms that the slice/subslice/EU state is at - full enablement when the render engine is active. Starting with - Gen9 SKL, the render power gating feature can leave SSEU in a - partially enabled state upon resumption of render work unless - explicit action is taken. - - v2: Add test description and apply recommendations of igt.cocci - (Thomas Wood). - v3: Skip instead of fail if debugfs entry i915_sseu_status is not - available. - - Signed-off-by: Jeff McGee - Tested-by: Lei Liu - Signed-off-by: Thomas Wood - -commit aef4605f7c42df222761f6735375f499586d9d25 -Author: Jeff McGee -Date: Thu Mar 12 10:52:08 2015 -0700 - - lib: Add media spin - - The media spin utility is derived from media fill. The purpose - is to create a simple means to keep the render engine (media - pipeline) busy for a controlled amount of time. It does so by - emitting a batch with a single execution thread that spins in - a tight loop the requested number of times. Each spin increments - a counter whose final 32-bit value is written to the destination - buffer on completion for checking. The implementation supports - Gen8, Gen8lp, and Gen9. - - v2: Apply the recommendations of igt.cocci. - - Signed-off-by: Jeff McGee - Tested-by: Lei Liu - Signed-off-by: Thomas Wood - -commit 301b9e4bb389a968cfae79a1bea07834436165b8 -Author: Jeff McGee -Date: Tue Mar 24 11:30:57 2015 -0700 - - tests/drv_getparams: Skip instead of fail on EINVAL - - Avoid failing on older kernels where the GETPARAM interfaces - don't exist. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89669 - Signed-off-by: Jeff McGee - -commit 9ba93c43cfb19c5a82a1d6f20f2d3140c8ca80bf -Author: Tim Gore -Date: Tue Mar 24 14:16:04 2015 +0000 - - tests/gem_tiled_fence_blits: split into subtests - - The gem_tiled_fence_blits test tends to get oom killed - on low memory (< 4GB) Android systems. This is because the - test tries to allocate (sysinfo.totalram * 9 / 10) in - buffer objects and the remaining 10% of memory is not - always enough for the Android system. - As with a similar issue with gem_render_linear_blits, - this problem is resolved by splitting into subtests. - A "basic" subtest uses minimal memory buffers to test - the basic operation, and a "normal" subtest which is - skipped if there is insufficient memory. - - I also took the opportunity to cull some numeric literals. - - Signed-off-by: Tim Gore - -commit 4d2577e0ddbec1f0be919b113a3eccb0afb53886 -Author: Ville Syrjälä -Date: Wed Dec 10 21:17:36 2014 +0200 - - tools/intel_watermark: Tool to decode watermark registers - - The watermark registers on the gmch platform are a bit of a mess. Add - a tool to make some sense of them. While at it decode the ilk-bdw wm - registers as well. SKL+ is left out for now since it's a very different - beast. - - Signed-off-by: Ville Syrjälä - -commit e5e7a5307113cb7622e6b3da4d66f681e9fe3a40 -Author: Ville Syrjälä -Date: Mon Mar 16 13:19:48 2015 +0200 - - lib: Add i854 PCI ID - - Signed-off-by: Ville Syrjälä - -commit 978881801e6cb69e27f9a3b016bc7b88d3b13a1d -Author: Ville Syrjälä -Date: Thu Feb 5 19:29:20 2015 +0200 - - tools/intel_iosf_sb_read: Support different register strides - - Some IOSF SB units ogranize their registers in a pecualiar way. Even - though the registers are 32 bits wide, the register offsets only - increment by one when going from one register to the next. Correctly - deal with this when dumping several consecutive registers. - - Signed-off-by: Ville Syrjälä - -commit bd692becf70acfe0829033f8a33680d3d54fcfb2 -Author: Ville Syrjälä -Date: Thu Feb 5 20:04:29 2015 +0200 - - tools/intel_iosf_sb_read: Add -c command line option like intel_reg_read - - Add a command line option '-c ' that can be used to read set of - consecutive registers without having to specify the offset for each of - them. - - Signed-off-by: Ville Syrjälä - -commit dcb3edf2a971b2c00cace8bf2c052f76c24af56b -Author: Ville Syrjälä -Date: Thu Feb 5 20:04:29 2015 +0200 - - tools/intel_iosf_sb_*: Support reading/writing multiple registers at once - - Allow the user to specify a list of registers to read, and register/value - pairs to write. - - Signed-off-by: Ville Syrjälä - -commit 0461e8cf4314ee43ef4440ebdaf68eff2c57e5a2 -Author: Ville Syrjälä -Date: Thu Feb 5 16:50:07 2015 +0200 - - tools/intel_iosf_sb_*: Use getopt() to parse the options - - I want to add some command line options so switch to getopt() to make - that easier. - - Signed-off-by: Ville Syrjälä - -commit 38e3c58cba951ff43f8314edfd0adb8082d81f8b -Author: Ville Syrjälä -Date: Thu Feb 5 19:44:40 2015 +0200 - - tools/intel_iosf_sb_*: Replace if ladder with an array and bsearch() - - Replace the silly strcasecmp() if ladder with and array that maps the - unit names to port numbers. And keep the thing sorted so we can do - the lookup with bsearch() for extra speed :) - - Signed-off-by: Ville Syrjälä - -commit 29ebc68313a8dee9b98fac1b337f9bf60b3bfb0a -Author: Ville Syrjälä -Date: Thu Feb 5 16:18:17 2015 +0200 - - tools: Remove intel_dpio_{read,write} tools - - intel_dpio_{read,write} as redundant as intel_iosf_sb_{read,write} - handle the same task. - - The difference between the tools was the opcode used to read/write the - registers, but with DPIO both opcodes work just fine, so there's no need - for both sets of tools. - - Signed-off-by: Ville Syrjälä - -commit 0129b02c7bb9cbff81974cbbaeebc4529d823bb4 -Author: Ville Syrjälä -Date: Thu Feb 5 16:17:06 2015 +0200 - - toos/intel_iosf_sb_*: Fix DPIO IOSF SB port number - - The correct port is 0x12, not 0x13 which is actually GPIO_NC. - - Signed-off-by: Ville Syrjälä - -commit ac28ecefe04ef2961baa78b949e05d87eee55e3f -Author: Ville Syrjälä -Date: Mon Mar 16 13:36:50 2015 +0200 - - lib: Allow 32bit addresses for IOSF-SB registers - - Signed-off-by: Ville Syrjälä - -commit 0a3ef582daa961047dabf3008177f60db8984b03 -Author: Ville Syrjälä -Date: Thu Feb 5 16:12:11 2015 +0200 - - lib: Change IOSF SB devfn to 0.0 - - The devfn field in the IOSF SB messages is only relevant when there's a - real PCI bus or some other multifunction device behind a single port. - Otherwise the port number itself is enough to uniquely identify the - target. In fact some IOSF SB targets reject the access when devfn is not - 0.0 (eg. GPIO_NC on BYT). - - Signed-off-by: Ville Syrjälä - -commit 06a9c3566462e04d47c3006daeb4ff0c89c5d043 -Author: Damien Lespiau -Date: Tue Mar 24 03:27:08 2015 +0000 - - quick_dump/skl: Add power well registers - - Signed-off-by: Damien Lespiau - -commit 392e8ee75fcbc4da7c972aaa03931c22ed8485e4 -Author: Jesse Barnes -Date: Mon Mar 23 12:49:08 2015 -0700 - - tests/pm_rps: add test descriptions - - Document a copule of the subtests with their purpose, methods, and - expected results. - - Reviewed-by: Ben Widawsky - Signed-off-by: Jesse Barnes - -commit 1765838e34d96c7eb2288cf899ab19f819fa5cb0 -Author: Daniel Vetter -Date: Mon Mar 23 11:00:20 2015 +0100 - - tests/gem_tiled_swapping: Fix up L-shaped testing - - I've fumbled this, resulting in this this skipping everywhere. - Unfortunately no QA test report for this regression ... - - Signed-off-by: Daniel Vetter - -commit a5934091b84e3f8804fb3fed35374c5a976dd07e -Author: Daniel Vetter -Date: Wed Mar 18 11:15:12 2015 +0100 - - tests/gem_exec_lut_handle - - Reduce default number of repeats a lot. High repeat count is only - useful for microbenchmarking, not that much for regression testing. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87131 - Signed-off-by: Daniel Vetter - -commit a5c6b8df8b7bc46a8664044faa7566ce56fa06a8 -Author: Daniel Vetter -Date: Fri Mar 13 18:02:45 2015 +0100 - - tests/kms_cursor_crc: Add dpms and suspend tests - - There was some confusion about whether we restore cursors correctly - after dpms and suspend/resume. Apparently we still do! - - Signed-off-by: Daniel Vetter - -commit d297e58529217cb70e79639b13608f458332b2d0 -Author: Daniel Vetter -Date: Thu Mar 5 11:02:03 2015 +0100 - - lib: Only warn about suspicious CRCs - - It is theoretically possible to hit these in the wild, so only warn - about them. Dropping the test is probably too much since these caught - some real bugs in the past. - - Signed-off-by: Daniel Vetter - -commit 562bbe12f6fb75811a746c742a28d32a17b26aa9 -Author: Daniel Vetter -Date: Fri Feb 27 22:04:18 2015 +0100 - - tests: Remove usage of igt_crc_equal and _non_null - - Tests should positively check for crc matches, not for mismatches. - Enforce this by only exposing and igt_assert function for comparing - crcs. - - For the few tests which didn't just do this as consistency checks but - to do functional tests add FIXME comments that some reference crc - values are missing. - - Signed-off-by: Daniel Vetter - -commit e588f6dfa6f022120d5a55ef96994dbbc33d0dc9 -Author: Daniel Vetter -Date: Fri Feb 27 20:37:29 2015 +0100 - - lib/debugfs: Add igt_assert_crc_equal - - Because of hash collisions tests should only ever compare crc - checksums for equality. Checking for inequality can result in random - failures. - - To ensure this only expose and igt_assert function and use that. - Follow-up patches will rework the code for tests which don't follow - this requirement and try to compare for CRC inequality. - - v2: Rebase on top of Matt's kms_plane changes. - - Signed-off-by: Daniel Vetter - -commit 4fec18e5e0cbbf384b8a49febd9dc650f2712bad -Author: Daniel Vetter -Date: Fri Feb 27 20:24:15 2015 +0100 - - lib/core: add interactive debug point to igt_fail - - Useful for inspecting the screen state in kms tests when they fail. - - Also move the screen clearing in kms_cursor_crc to the bottom. - - Signed-off-by: Daniel Vetter - -commit e7d26df4198af40c92292cb4209fd803fa02062f -Author: Chris Wilson -Date: Thu Mar 19 15:24:52 2015 +0000 - - igt/kms_vblank: Simple harness for measuring speed of drmWaitVBlank - - Signed-off-by: Chris Wilson - -commit a72d4056291efd2571105cbb0a254a9cde13c6c6 -Author: Chris Wilson -Date: Wed Mar 18 14:15:22 2015 +0000 - - igt/gem_concurrent_blit: Test copying over itself - - Suggested by Lionel Landwerlin as a means to emulate video decode - workloads. - - Signed-off-by: Chris Wilson - -commit ea4aa70f3c83a942ee34868ade1eba126b15d879 -Author: Chris Wilson -Date: Thu Mar 19 08:36:25 2015 +0000 - - igt/gem_wait: When waiting for infinity, an infinity remains - - Incorrect testing of out parameters leads to bug noise... - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89494#c4 - Signed-off-by: Chris Wilson - -commit 1d0aa69f55fdb31662946f1cb472dda31347d89b -Author: Chris Wilson -Date: Wed Mar 18 08:46:14 2015 +0000 - - igt/gem_exec_nop: Enlighten the failure error message - - References: https://bugs.freedesktop.org/show_bug.cgi?id=89633 - Signed-off-by: Chris Wilson - -commit 484c1a6f1cf97d3d1ff757cddd8f77accc89790a -Author: Chris Wilson -Date: Wed Mar 18 08:33:54 2015 +0000 - - igt/gem_read_read_speed: Speed up batch submission - - Create the RCS and BCS batches once and reuse them to avoid the - rewriting and relocation overhead on every submission - the goal is to - focus on the interring synchronisation overhead. - - Signed-off-by: Chris Wilson - -commit d3e9316b441bc172f5936e787879d1d13f1f7a01 -Author: Chris Wilson -Date: Wed Mar 18 08:33:22 2015 +0000 - - lib/batch: Fix range checks for blits - - Signed-off-by: Chris Wilson - -commit 233808a58db1f62d773b03f9dad599924170aca6 -Author: Chris Wilson -Date: Wed Mar 18 08:36:37 2015 +0000 - - lib/batch: Trivial compile fix for 32-bit builds - - intel_batchbuffer.c: In function 'fill_object': - intel_batchbuffer.c:589:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] - obj->relocs_ptr = (uint64_t)relocs; - ^ - intel_batchbuffer.c: In function 'exec_blit': - intel_batchbuffer.c:598:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] - exec.buffers_ptr = (uint64_t)objs; - - Signed-off-by: Chris Wilson - -commit a172676488def584cfe8d0340c7e5ef4b7f81d74 -Author: Chris Wilson -Date: Mon Mar 16 16:29:57 2015 +0000 - - igt/gem_concurrent_blt: Test overwrite source used for read-read optimisation - - Signed-off-by: Chris Wilson - -commit 35b0ac99fc4bb05ea98c2588a0c77a26f1964f70 -Author: Chris Wilson -Date: Mon Mar 16 11:55:46 2015 +0000 - - igt/gem_concurrent_blit: Exercise concurrent reads - - Since we are considering implementing read-read optimisations for mixed - engine workloads, make sure that we at least have a few tests that check - for coherency when doing so. - - Signed-off-by: Chris Wilson - -commit 99b5ee8aaad4920582b0143fe2e02c7149c4cf41 -Author: Chris Wilson -Date: Thu Jan 22 10:03:45 2015 +0000 - - igt/gem_concurrent_blit: Move buffer allocation after requires - - The choice is to either move the igt_require from the buffer allocation - (and allow the allocation to fail) inside the igt_fixture, or move the - buffer allocation to the subtest. Moving it to the subtest has the - advantage of ensuring that every test has the same initial state (no - chance of leaking state across tests) and speeding up running a single - subtest. - - Note this is necessary in order to run igt/gem_concurrent_blit on older - kernels, otherwise the requirement for mmap(wc) causes us to skip the - majority of tests. - - Signed-off-by: Chris Wilson - -commit ed7e33451e91e1b4cde7553ccbe31e09562c87f7 -Author: Chris Wilson -Date: Mon Mar 16 15:14:14 2015 +0000 - - igt: Add benchmark for read-read optimisation - - Signed-off-by: Chris Wilson - -commit 505645c2ab90404067c7817072a1b8eda316e67e -Author: Daniel Vetter -Date: Fri Mar 13 17:57:03 2015 +0100 - - tests: Rename core_getparams to drv_getparams - - Signed-off-by: Daniel Vetter - -commit ae339f0977cc02ceb9e39ad458f7d8cfbf3c9fd6 -Author: Jeff McGee -Date: Thu Mar 12 17:26:25 2015 -0700 - - tests/core_getparams: Create new test core_getparams - - New test core_getparams consists of 2 subtests, each one testing - the ability of userspace to query the correct value of a GT config - attribute: subslice total or EU total. drm/i915 implementation of - these queries is required for Cherryview and Gen9+ devices (non- - simulated). - - v2: Duplicate small amount of new libdrm functionality to avoid - bumping libdrm version requirement (Daniel). Convert some - igt_asserts to the appropriate comparison variants. Add a - test description. - v3: Actually use the LOCAL GETPARAM defines. Otherwise can't build - against older libdrm as intended by v2. - - For: VIZ-4636 - Signed-off-by: Jeff McGee - Reviewed-by: Zhigang Gong - Signed-off-by: Daniel Vetter - -commit 7655606532afb0dcfa6d11a5af83ed9beac5d1fa -Author: Daniel Vetter -Date: Fri Mar 13 09:37:49 2015 +0100 - - NEWS: Post-release bump - - Let's prep for more cool stuff! - - Signed-off-by: Daniel Vetter - -commit e3e659163f0dcb4bc5de852190a0478092784234 -Author: Thomas Wood -Date: Thu Mar 12 17:06:54 2015 +0000 - - Update version to 1.10 and add the release date - - Signed-off-by: Thomas Wood - -commit 3b8e121552b2bd0c9023fbec0b88da36a27ce42c -Author: Thomas Wood -Date: Thu Mar 12 17:01:57 2015 +0000 - - lib: small documentation fixes - - Signed-off-by: Thomas Wood - -commit 595575b9cbdc705edc6f1ac6a3fbf2ceb45bf5ba -Author: Thomas Wood -Date: Thu Mar 12 16:32:17 2015 +0000 - - Remove old entries from .gitignore files - - Signed-off-by: Thomas Wood - -commit a6c40c7665287305fe838b6871a26bcfecad9c0a -Author: Thomas Wood -Date: Thu Mar 12 14:59:20 2015 +0000 - - lib: move igt_interactive_debug into igt_core.c - - igt_interactive_debug should be defined in igt_core.c, rather than the - header, to avoid it being defined more than once. - - Reported-by: Damien Lespiau - Signed-off-by: Thomas Wood - -commit dde047fe2c84e2519a8ed24db4ac9c794285bbd1 -Author: Damien Lespiau -Date: Thu Mar 12 14:31:15 2015 +0000 - - lib/fb: Use PRIx64 for uint64_t in format string - - Fix the following warning: - - igt_fb.c: In function 'igt_create_fb_with_bo_size': - igt_fb.c:414:2: warning: format '%llx' expects argument of type - 'long long unsigned int', but argument 9 has type 'uint64_t' [-Wformat=] - - igt_debug("%s(width=%d, height=%d, format=0x%x [bpp=%d], tiling=%llx, size=%d\n", - - introduced by commit: - - commit e36091d1c7010e825897dc4487f9985ab353973b - Author: Tvrtko Ursulin - Date: Tue Mar 3 14:11:01 2015 +0000 - - tiling: Convert framebuffer helpers to use fb modifiers - - Cc: Tvrtko Ursulin - Signed-off-by: Damien Lespiau - -commit b1177831abedbf7dac323c6e67c2ec7c56c88009 -Author: Tvrtko Ursulin -Date: Tue Mar 3 14:11:06 2015 +0000 - - tests/kms_flip_tiling: Exercise Y tiling modes on Gen9+ - - Signed-off-by: Tvrtko Ursulin - -commit 7b8ba120b956e706f2cdea831233973f0ee079fa -Author: Damien Lespiau -Date: Tue Mar 3 14:11:05 2015 +0000 - - testdisplay/skl: Add command line options for Yb/Yf tiled fbs - - Signed-off-by: Damien Lespiau - -commit ff451a6d439f76ddc51cc0a374f086ace4dab680 -Author: Damien Lespiau -Date: Tue Mar 3 14:11:04 2015 +0000 - - lib: Allow the creation of Ys/Yf tiled FBs - - There's no fencing for those tiling layouts, so we create a linear bo - for cairo to play with, and when cairo is finished with it, we do a fast - copy blit to the fb BO with its final tiling. - - v2: Move to correct domain after CPU is done with the object (-EINVAL). (Tvrtko Ursulin) - Correct arguments passed in to framebuffer creation (segfault). (Tvrtko Ursulin) - Pass zero stride to kernel as it expects for Yf&Ys. (Tvrtko Ursulin) - - v3: Rebase for gem_mmap__cpu changes. (Tvrtko Ursulin) - - v4: Rebase for addfb2.5. (Tvrtko Ursulin) - - Signed-off-by: Damien Lespiau - Signed-off-by: Tvrtko Ursulin - -commit eb93c1b33ef6eebe53646003e951e54a3e68bc5e -Author: Tvrtko Ursulin -Date: Tue Mar 3 14:11:03 2015 +0000 - - lib/igt_fb: Use new ADDFB2 extension for new tiling modes - - Signed-off-by: Tvrtko Ursulin - -commit c7bac3c62ab27045ceec898787435bbb5678b015 -Author: Tvrtko Ursulin -Date: Tue Mar 3 14:11:02 2015 +0000 - - lib: Add support for new extension to the ADDFB2 ioctl. - - New functionality accessesed via the __kms_addfb wrapper. - - Signed-off-by: Tvrtko Ursulin - -commit e36091d1c7010e825897dc4487f9985ab353973b -Author: Tvrtko Ursulin -Date: Tue Mar 3 14:11:01 2015 +0000 - - tiling: Convert framebuffer helpers to use fb modifiers - - This converts the IGT API only, underneath legacy set_tiling is still used. - - v2: One got away in kms_flip. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Damien Lespiau - -commit 672e88acb72bf58f322af928b2bc636d14aa9f21 -Author: Damien Lespiau -Date: Tue Mar 3 14:11:00 2015 +0000 - - lib: Provide a raw version of the gen9 fast copy blits - - So we can use it with bare kernel types, without going through libdrm - bos. - - v2: Don't forget the object handle. (Tvrtko) - Correct surface pitch calculation. (Tvrtko) - - Signed-off-by: Damien Lespiau - Signed-off-by: Tvrtko Ursulin - -commit 6533d113a9710429115bee26d1f372e1a06701df -Author: Damien Lespiau -Date: Tue Mar 3 14:10:59 2015 +0000 - - lib: Split two helpers to build fast copy's dword0 and dword1 - - Again, these helpers will be useful for a raw version of the gen9 fast - copy. - - Signed-off-by: Damien Lespiau - -commit 130221b3b5be3ad03bd0ac2b12d8b009eaf540d4 -Author: Damien Lespiau -Date: Tue Mar 3 14:10:58 2015 +0000 - - lib: Don't give a struct igt_buf * to fast_copy_pitch() - - So we can use this function in a "raw" (ie without igt_buf) version. - - Signed-off-by: Damien Lespiau - -commit cbd927cd35473c88bf5e2f5f42e61af612eaa75e -Author: Damien Lespiau -Date: Tue Mar 3 14:10:57 2015 +0000 - - lib/skl: Add gen9 specific igt_blitter_fast_copy() - - v2: Adjust for BB handling changes. (Tvrtko Ursulin) - Correct XY_FAST_COPY_DST_TILING_Yf. (Tvrtko Ursulin) - - v3: New tiling modes are not defined in the kernel any more. (Tvrtko Ursulin) - - Signed-off-by: Damien Lespiau - Signed-off-by: Tvrtko Ursulin - -commit 0c15e068a587fbb144ba6d689b402b95cd51470e -Author: Tvrtko Ursulin -Date: Tue Mar 3 14:10:56 2015 +0000 - - tests/kms_addfb: Y tiled testcases - - v2: Moved all init into fixtures. - - Signed-off-by: Tvrtko Ursulin - -commit 0a087733d24fcb2b80584b23e931533d72828770 -Author: Tvrtko Ursulin -Date: Tue Mar 3 14:10:54 2015 +0000 - - tests/kms_addfb: Add support for fb modifiers - - Just a few basic tests to make sure fb modifiers can be used and - behave sanely when mixed with the old set_tiling API. - - v2: - * Review feedback from Daniel Vetter: - 1. Move cap detection into the subtest so skipping works. - 2. Added some gtkdoc comments. - 3. Two more test cases. - 4. Removed unused parts for now. - - v3: - * Removed two tests which do not make sense any more after the - fb modifier rewrite. - - v4: - * Moved gtkdoc comments into .c file. - * Moved all initialization into fixtures. - * Rebased for fb modifier changes. - - v5: - * Added bad modifier subtest. - - Signed-off-by: Tvrtko Ursulin - -commit f59935c0ce878d20f1a34ae814a778bf476c36f8 -Author: Chris Wilson -Date: Wed Mar 11 08:40:23 2015 +0000 - - igt/kms_psr_sink_crc: Prettify i915_edp_psr_status failures - - Change the formatting asserts into requires and add the contents into - the debug log. - - Signed-off-by: Chris Wilson - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89525 - -commit 07be8fec156ba8405f2aafa3a37fe29d06893f05 -Author: Matt Roper -Date: Thu Mar 5 15:01:00 2015 -0800 - - igt.cocci: Replace igt_assert() with igt_assert_CMP() where possible - - The integer comparison macros give us better error output by including - the actual values that failed the comparison. - - Signed-off-by: Matt Roper - Signed-off-by: Daniel Vetter - -commit 14a3d88a0967718124fc3b6c111a877203da025f -Author: Matt Roper -Date: Wed Mar 4 10:50:53 2015 -0800 - - tests/kms_plane: Ensure planes recover from DPMS - - i915 was using the main atomic 'disable plane' to turn off sprite planes - during a CRTC disable. This was problematic because it modified the - plane state, preventing us from recovering the original state later. - One such case was that during a DPMS OFF followed by a DPMS ON, any - sprite planes would not be restored properly. - - Let's add a test that toggles DPMS off and on and ensures that the CRC - remains the same (i.e., planes are successfully restored unchanged). - - Signed-off-by: Matt Roper - Signed-off-by: Daniel Vetter - -commit b8db5d60e0f19c46142f22f9dcbe4d7b6d166b9f -Author: Chris Wilson -Date: Fri Mar 6 08:49:52 2015 +0000 - - lib/core: Make the start of the debug output more clear - - I missed the quiet "Log start" between the test failure and the debug - output (and so was very confused by the repetition). You have to shout - at me! - - v2: Thomas suggested I make the end of the logging clear as well. Since - I completely missed that there was a end marker, he must be right! - - Signed-off-by: Chris Wilson - Cc: Thomas Wood - -commit e23accf43753055430064fa02efe7d33ab11564f -Author: Chris Wilson -Date: Fri Mar 6 08:37:09 2015 +0000 - - igt/gem_wait: Test negative timeouts - - The user should be able to specify a negative timeout to indefinitely - wait upon a bo becoming idle. - - Signed-off-by: Chris Wilson - -commit 15559e6cb613fe152f71471643de0ac0c12332d4 -Author: Chris Wilson -Date: Fri Mar 6 08:47:06 2015 +0000 - - igt/gem_wait: Timeout parameter to the WAIT ioctl is signed - - So convert from uint64_t to int64_t. The distinction becomes important - when you realise what test we were missing... - - Signed-off-by: Chris Wilson - -commit 50158de8122fabdb34b8f9dd5cf43a2d9c72e0b4 -Author: Daniel Vetter -Date: Thu Mar 5 09:42:29 2015 +0100 - - NEWS: Update to prep for release - - Signed-off-by: Daniel Vetter - -commit ee5c119c0cfe990ada07ae47a22f4d7f05b415d5 -Author: Tim Gore -Date: Tue Mar 3 10:43:43 2015 +0000 - - tests/gem_render_tiled_blits: split into subtests - - The gem_render_tiled_blits test tends to get oom killed - on low memory (< 4GB) Android systems. This is because the - test tries to allocate (sysinfo.totalram * 9 / 10) in - buffer objects and the remaining 10% of memory is not - always enough for the Android system. - A similar issue with gem_render_linear_blits was resolved - by creating several subtests. A "basic" subtest that uses - minimal memory buffers to test the basic operation, and - two stress tests which are skipped if there is insufficient - memory. The first stress test uses more memory than the - graphics apperture and the second uses enough to ensure - that swap space is used (if present). - This patch makes the same changes to gem_render_tiled_blits. - - v2: Following comments from Daniel Vetter: - a) Use igt_main macro instead of "open coding", and - b) cull some leading spaces - - Signed-off-by: Tim Gore - -commit 9f90aabc66cd62b328c16e6917dc76baafd3ab5e -Author: Tim Gore -Date: Tue Mar 3 10:23:00 2015 +0000 - - tests/gem_render_linear_blits: split into two subtests - - The gem_render_linear_blits test tends to get oom killed - on low memory (< 4GB) Android systems. This is because the - test tries to allocate (sysinfo.totalram * 9 / 10) in - buffer objects and the remaining 10% of memory is not - always enough for the Android system. - After a discussion with Chris Wilson I have split this - test into a "basic" and an "apperture-thrash" subtest, - in the same way as gem_linear_blits. The basic test - uses just two buffer objects and the apperture-thrash - test is skipped if there is insuffiecient memory. - - v2: Following comment from Chris Wilson: - a) Remove the command line option for count. - b) Add a third subtest to ensure swap is tested - - v3: Replace some leading spaces with tabs - - v4: Follwing comment from Daniel Vetter: - a) Use igt_main macro instead of "open coding", and - b) cull some more leading spaces - - Signed-off-by: Tim Gore - -commit 043f5869586c471991b7cdb97a542901ab662ef6 -Author: Mika Kuoppala -Date: Fri Feb 13 19:04:49 2015 +0200 - - tools/intel_gtt: Add support for gen8 - - Add 64bit ptes and 8MB mmiobar offset for gen8 - - Cc: Ville Syrjälä - Cc: Ben Widawsky - Acked-by: Ben Widawsky - Signed-off-by: Mika Kuoppala - -commit 5e4fc0c48c9a44689ec1593f356a8f22e1ca6bb8 -Author: Daniel Vetter -Date: Tue Nov 18 14:39:14 2014 +0100 - - tests/gem_tiled_swapping: Skip on L-shaped memory - - The only thing the kernel can do is pin the buffers, which essentially - means no swapped tiled objects. - - Signed-off-by: Daniel Vetter - -commit f26d8a04c3938845d4db07cf6587b29e287dc2dc -Author: Paulo Zanoni -Date: Fri Feb 27 15:05:39 2015 -0300 - - tests/pm_rpm: I2C VGA detection is unreliable - - We fail to detect some VGA monitors using our I2C method, leading to - bug reports from QA. If you look at the dmesg of these cases, you'll - see the Kernel complaining about EDID reading mostly FFs and then - disabling bit-mangling. Since we don't want to reimplement everything - the Kernel does, let's just accept the fact that some VGA outputs - won't be properly detected. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84273 - Signed-off-by: Paulo Zanoni - -commit f45698df8b6b4d9375acc8e668fc54f81250fd2f -Author: Daniel Vetter -Date: Fri Feb 27 19:32:33 2015 +0100 - - lib/igt_core: don't add newlines in logging functions - - igt_kms extensively uses line continuation when dumping state updates - at the debug level. They got badly mangled with the recent changes to - for the log handling functions. Two separate fixes: - - Don't prepend domain and other metainformation when it's just a - continuation line. - - Dont add newlines when dumping the log recorder. - - If someone interleaves different log level messages this will go awry, - but really just don't do that. - - Cc: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 305fb1db5c1ec231b1cef3fd4c2106bc36ef48d8 -Author: Daniel Vetter -Date: Fri Feb 27 16:24:25 2015 +0100 - - lib: add igt_assert_lt - - Found one user in gem_wait.c - - Signed-off-by: Daniel Vetter - -commit e3f8eb58e64954f80207ff147de3eccba96769cd -Author: Daniel Vetter -Date: Fri Feb 27 16:18:40 2015 +0100 - - tests/kms_universal_planes: Inline igt_assert(ret == 0) checks - - This way the debug output in case of failures is nicer since we dump - the entire test condition. - - Also replace one open-coded igt_assert_eq. - - Signed-off-by: Daniel Vetter - -commit 59d8d663cdac2d1f8e876d53f328e414a993c610 -Author: Matt Roper -Date: Thu Feb 26 19:00:19 2015 -0800 - - kms_universal_plane: Check for cursor fb leaks - - We've been leaking the framebuffers that get created inside the - legacy -> universal cursor compatibility layer and nobody noticed. Add - an i-g-t test to check debugfs and ensure we end up the same number of - framebuffers we started with after performing cursor operations. - - Cc: Chris Wilson - Signed-off-by: Matt Roper - Signed-off-by: Daniel Vetter - -commit d73c5eb97747c899eda2648e238711f6d516b4c9 -Author: Marc Herbert -Date: Thu Feb 26 18:43:43 2015 -0800 - - lib/igt_kms.c: igt_require -> igt_require_f("two displays required\n") - - The bare "Test requirement: modes" message is too cryptic, I had to go and - read the source code to understand the missing requirement. - - Signed-off-by: Marc Herbert - Signed-off-by: Daniel Vetter - -commit 8e0a0c9de658931454ba2a549d922e7e9f534dea -Author: Deepak S -Date: Thu Feb 26 21:10:29 2015 +0530 - - tests/pm_rc6_residency: Add media_rc6_residency_counter subtest - - Added new media_rc6_residency_subtest for chv & vlv. - - Signed-off-by: Deepak S - Signed-off-by: Daniel Vetter - -commit af02ef4a483184dbd9a549e98f40a1975aa204fe -Author: Deepak S -Date: Thu Feb 26 21:10:28 2015 +0530 - - tests/pm_rc6_residency: Fix proper residency calculation - - With current code we are not considering the RC6 residency during sysfs - read. This is causing test to fail due to incorrect residency_accuracy check - This patch consider code time spent for accuracy check - - Signed-off-by: Deepak S - Signed-off-by: Daniel Vetter - -commit d5579f472e103e7cafb7bb10d5c52246c3d1f072 -Author: Daniel Vetter -Date: Thu Feb 26 16:32:43 2015 +0100 - - tests/drv_suspend: Unrename tests - - Renaming tests massively confuses QA's test result tracking and - blacklisting. So except when really good reasons are around we - shouldn't do it. - - Here I think just adding the -hibernat suffix and leaving test names - unchanged is enough. - - Cc: David Weinehall - Cc: Imre Deak - Signed-off-by: Daniel Vetter - -commit 26f40811d70cdb80d81edea13c1d2ee55074d196 -Author: Thomas Wood -Date: Fri Feb 20 11:31:01 2015 +0000 - - lib: small documentation fixes - - Signed-off-by: Thomas Wood - -commit d9224c3479e70be31612f881d180666e1dbead93 -Author: Thomas Wood -Date: Thu Feb 19 15:19:57 2015 +0000 - - lib/tests: update .gitignore - -commit 4ff4ea601a0bfeceb7f291af2c3410ad547af760 -Author: Thomas Wood -Date: Thu Feb 19 13:58:06 2015 +0000 - - lib: print the signal name to stderr when handling a signal - - Print the received signal name to stderr when handling a signal. This - uses an array of handled signal names since strsignal() only provides - descriptions. - - Signed-off-by: Thomas Wood - -commit aecad4fc2ea86f5377c443a4f15ea91d3e0d614c -Author: Thomas Wood -Date: Wed Feb 18 15:47:07 2015 +0000 - - tests: remove extra file - - Remove a file accidentally added in commit 6f582f7 (tests: Add - gem_ctx_param_basic). - - Cc: Daniel Vetter - Signed-off-by: Thomas Wood - -commit 8fb19782f82f25249aaed0ff0e5fa6601dbb0e9d -Author: Thomas Wood -Date: Wed Feb 18 16:19:59 2015 +0000 - - lib: remove handled option arguments from argv - - Remove options from argv that have been handled by getopt to allow - additional non-option parameters to be processed in the test application. - - This fixes issues when using options such as --debug with tests that accept - additional non-option parameters. - - Signed-off-by: Thomas Wood - -commit 55cc132b3219fbbf8c5705c674ef0f9a9b53d593 -Author: Thomas Wood -Date: Tue Feb 17 15:10:13 2015 +0000 - - lib: use defines for igt_simple_init and igt_subtest_init - - Using defines removes an extra function call and prepares for changes - to the command line argument handling. - - Signed-off-by: Thomas Wood - -commit efddb93680c5c5ca2d0c0c9c9af497908c1fa6f7 -Author: Thomas Wood -Date: Tue Feb 17 11:52:29 2015 +0000 - - tests: improve pipe enumeration - - Signed-off-by: Thomas Wood - -commit 0f3a5809e7801d4f48759ce4ffda764fcd7fb6bb -Author: Praveen Paneri -Date: Wed Feb 25 14:26:21 2015 +0530 - - tests/gem_bad_blit.c : Fix dst address for Gen8 onwards - - Gen8 Onwards use 48 bit addressing for src and dst base - addresses. This patch fixes this for destination base address. - - Signed-off-by: Praveen Paneri - Signed-off-by: Daniel Vetter - -commit c6d18ee56ba2f148e9146acd832c530b53aab096 -Author: Marc Herbert -Date: Tue Feb 24 12:29:22 2015 -0800 - - lib/igt_kms.c: remove tests dependency on VT /dev/tty0 - - Required to run on any recent, freon-based and X11-free ChromeOS release. - - v2: - - igt_debug() instead of igt_warn() - - return KD_GRAPHICS instead of -1UL - - print previous mode in debug statements. Among others this help a tiny - bit with the now confusing debug output ("cannot change" immediately - followed by a misleading "mode changed"). - - Signed-off-by: Marc Herbert - Signed-off-by: Daniel Vetter - -commit 7890b09348ce8d494298ac9a308df25d526fe3ea -Author: David Weinehall -Date: Wed Feb 11 16:46:02 2015 +0200 - - tests/drv_suspend: hibernation test - - intel-gpu-tools currently has a bunch of tests for suspend, - but currently none (that I could find) for hibernate. - - Attached is a rudimentary patch to add said test. It does so - by repurposing the drv_suspend driver to handle both suspend - and hibernate, since the difference is miniscule. - - I decided to split the suspend/autoresume functions in - igt_aux.c though, to be able to leave the igt_system_uspend_autoresume() - function unchanged (the other option would be to - introduce a boolean function argument and have that - decide what parameters to pass to rtcwake). - - The timeout passed to rtcwake probably needs tuning (it might - even need to be dynamically adjusted, since the time hibernation takes - varies wildly depending on the amount of non-cache memory in use). - - Signed-off-by: David Weinehall - Reviewed-by: Imre Deak - -commit 5b93daf5cb40f79b948029588f059b0b61638590 -Author: Chris Wilson -Date: Wed Feb 18 16:06:15 2015 +0000 - - lib: Use strtol not strtod for overiding the PCI ID - - Simply to avoid the roundtrip through floating points and any extra - headaches from worrying about the implications - - Signed-off-by: Chris Wilson - -commit eaa7e6183cedee10acfa321ac3c66bfe58c0ed5a -Author: Chris Wilson -Date: Wed Feb 18 15:58:06 2015 +0000 - - lib: Cache DRM device id to reduce number of ioctls - - The DRM device id for the igfx is fixed, since there can only be one in - the system. So once we query it for the first time we can safely report - that value on every subsequent request, cutting out a lot of noisy - ioctls from inside tests. - - Signed-off-by: Chris Wilson - -commit a22548fec06faba738a2d59b45b54704e4757685 -Author: Thomas Wood -Date: Mon Feb 16 11:17:11 2015 +0000 - - lib: small documentation fixes - - Signed-off-by: Thomas Wood - -commit f8fd4c977a9dd32992bf5f244bde0b817f7e2c82 -Author: Thomas Wood -Date: Tue Jan 20 15:31:51 2015 +0000 - - lib: print recent log messages to stderr when a test or subtest fails - - Signed-off-by: Thomas Wood - -commit a5f21726cdf542bf3c8e9ac6b7c0ab99a03596f9 -Author: Thomas Wood -Date: Mon Jan 19 15:27:51 2015 +0000 - - lib: add a ring buffer for log entries - - Signed-off-by: Thomas Wood - -commit 89201c5328280a00c027fba404459de91b546a80 -Author: Matt Roper -Date: Mon Jan 26 09:23:51 2015 -0800 - - tests/kms_universal_plane: Fix subtest enumeration - - We shouldn't use the contents of data.display to determine which pipes - to run subtests on since this structure is initialized in an igt_fixture - and won't contain any useful data when enumerating subtests (i.e., - --list-subtests won't return anything). - - Instead, just assume we have three pipes in the main loop and ensure - that each subtest will skip if we don't really have that many. - - Signed-off-by: Matt Roper - Signed-off-by: Thomas Wood - -commit e8e28931b1c1c7b412474963d7a89bc307636950 -Author: Lu, Han -Date: Thu Feb 12 08:41:59 2015 +0800 - - tools/intel_audio_dump: add support for Skylake - - This patch adds support for dumping audio registers of Skylake. - - Signed-off-by: Lu, Han - -commit cd6644230b557bb3f5d19e499efb265ba6ed2787 -Author: Damien Lespiau -Date: Fri Feb 13 08:48:52 2015 +0000 - - quick_dump: Add interrupt and PPAT registers to the SKL dump - - Signed-off-by: Damien Lespiau - -commit 3c8aa2fb6ef9ac2526af27c5b14d51552768d5c3 -Author: Daniel Vetter -Date: Fri Feb 13 14:54:25 2015 +0100 - - tests/gem_ctx_param_basic: Include header, not source - - Oops. Reported by Tim Gore. - - Signed-off-by: Daniel Vetter - -commit 3cd45dec2e4be3edacdfc233089b6bd3651fa595 -Author: Daniel Vetter -Date: Tue Feb 10 17:46:43 2015 +0100 - - lib/igt_gt: Document and consolidate - - Also move forcewake and stop_rings code from igt_debugfs to igt_gt - since it fits better. And move the hang injection fork helpers from - igt_aux to igt_gt, too. - - Also push the intel_gen call into igt_hang_ring while at it. - - Signed-off-by: Daniel Vetter - -commit 25c4347078f181a938eaaefbed7e2e27c9dc1a3f -Author: Daniel Vetter -Date: Sat Feb 7 12:45:49 2015 +0100 - - doc: Consolidate naming conventions into docbook - - Duplication just means it gets out of sync. - - Also update they keyword list in the Makefile, not everything was listed. - And add a new "invalid" keyword. - - While at it update NEWS. - - Signed-off-by: Daniel Vetter - -commit 14185f04bd7c5fb2052a3e6454ceda5b46c37a61 -Author: Daniel Vetter -Date: Sat Feb 7 12:38:56 2015 +0100 - - tests/gem_wait: Adjust makefile - - I've forgotten to do this in - - commit e4753d2d96fbb88077e70820793137f45f02c9ba - Author: Daniel Vetter - Date: Mon Sep 29 14:42:33 2014 +0200 - - tests/gem_wait_render_timeout: Convert to subtests - - Signed-off-by: Daniel Vetter - -commit 2eca38eab9ccb4bc41ceda4992614ffb311ce4f7 -Author: Daniel Vetter -Date: Sat Feb 7 12:37:48 2015 +0100 - - lib/igt_aux: s/swap/igt_swap/ - - It collides with the subtest naming convention glossary entry for swap. - Which makes the docbook xml stuff unhappy. - - Signed-off-by: Daniel Vetter - -commit 3e9b4e37e68da2b866e9cebf7ceb6624617e353b -Author: Daniel Vetter -Date: Fri Feb 6 23:10:26 2015 +0100 - - tests: Align subtest with naming convention - - Yeah, historically grown but we should try to be somewhat consistent. - It helps with filtering testcases. - - Signed-off-by: Daniel Vetter - -commit bf5035a728b4f0cd06e7205bc1911069ff224433 -Author: Daniel Vetter -Date: Fri Feb 6 23:09:45 2015 +0100 - - tests/gem_ppgtt: Start rcs before bcs for context tests - - This way the igt_require for the ctx support is hit before we've - launched a bazillion threads and need to wait until they're all done. - - Signed-off-by: Daniel Vetter - -commit 7a03ddf994f089e795c2b6c4122fdf490f11bef0 -Author: Daniel Vetter -Date: Fri Feb 6 23:06:00 2015 +0100 - - tests: Add invalid pad tests for ctx create/destroy - - We've missed them, and the kernel isn't nasty enough and forgot to - check them. To add these tests convert the existing create/destroy - tests over to subtests. - - v2: Do the basic create/destroy in ctx_bad_destroy in a fixture - so that all the tests skip properly. - - Signed-off-by: Daniel Vetter - -commit 6f582f70e1b344c6d0e20f312f376892553af55e -Author: Daniel Vetter -Date: Fri Feb 6 17:54:46 2015 +0100 - - tests: Add gem_ctx_param_basic - - Boring ioctl validation. Luckily no gaps found while doing it. - - v2: git add ftw! - - v3: Fixes: - - - args->size is an outparam for get, adjust test. - - Pick an invalid param, not an invalid ioctl number ... tsk. - - Signed-off-by: Daniel Vetter - -commit 75c075cb263bf33259d26692b4f093f84276915c -Author: Daniel Vetter -Date: Fri Feb 6 17:13:59 2015 +0100 - - lib/ioctl: Document ctx param functions - - And move them so that they're grouped with the other context wrappers. - - Signed-off-by: Daniel Vetter - -commit 364efcdf9b1f90ec0befda9b1097434c88a1eb18 -Author: Daniel Vetter -Date: Fri Feb 6 17:13:27 2015 +0100 - - tests/gem_reset_stat: Use new ctx helpers - - A bit more invasive since getting rid off all the places meant - to flatten some of the control flow with implicit igt_require. - - Signed-off-by: Daniel Vetter - -commit ccc4261dc3d369a3463aa1b8ecbc676d69e337b8 -Author: Daniel Vetter -Date: Fri Feb 6 17:12:45 2015 +0100 - - tests/gem_ctx_*: Use helpers - - Signed-off-by: Daniel Vetter - -commit 09b8211d4136d6f7767652ddf73dfb0b7c1213a2 -Author: Daniel Vetter -Date: Fri Feb 6 17:15:13 2015 +0100 - - lib/ioctl: Add gem_context_destroy helpers - - We also need a raw version for some tests. - - Signed-off-by: Daniel Vetter - -commit 8d21b39251615d3516522a9fe56f77e9bf9fdc62 -Author: Daniel Vetter -Date: Fri Feb 6 11:10:25 2015 +0100 - - lib/ioctls: make gem_context_set/get_param infallible - - We have separate require checks already, so these failing is a bug in - the test logic. - - Signed-off-by: Daniel Vetter - -commit 15801b4dadfef1e754d415414ad931be639c85bf -Author: Daniel Vetter -Date: Fri Feb 6 11:06:11 2015 +0100 - - igt/ioctls: doc for gem_mmap - - Just spotted while driving around. gtkdoc needs the full parameter - list otherwise it doesn't recognize it as a function. So add them. - - Signed-off-by: Daniel Vetter - -commit a3e34ce258aae0602c38fd8020d49f1fd1c7a83f -Author: Daniel Vetter -Date: Fri Feb 6 11:05:28 2015 +0100 - - lib/ioctl: gem_ prefix for igt_require_mmap_wc - - We stick to the overall prefix even for magic require functions. - - Signed-off-by: Daniel Vetter - -commit c18b2d57a98c061845e0ec31bfffc90e03356aaa -Author: Daniel Vetter -Date: Fri Feb 6 10:53:10 2015 +0100 - - lib/ioctl: api polish for gem_context_has_param - - Just push the igt_require down to align with the usual style. - - Signed-off-by: Daniel Vetter - -commit c66b2425e706bec5ce6df8664d19b06e047eb0ee -Author: Daniel Vetter -Date: Fri Feb 6 10:49:20 2015 +0100 - - lib/gt: api polish for igt_can_hang_ring - - Align with common igt library style: - - Push the igt_require into the function. - - Push the intel_gen into the function. - - Signed-off-by: Daniel Vetter - -commit 9ca2cc12b4a11c20b41479e94ac8837321c0a2b1 -Author: Matt Roper -Date: Mon Feb 2 11:07:55 2015 -0800 - - kms_cursor_crc: Kernel now checks for integer overflow - - As of kernel commit - - commit a679064a7e9e8799177a64a31668a34a1bc6a4f1 - Author: Matt Roper - Date: Fri Jan 30 16:22:37 2015 -0800 - - drm/i915: Switch planes from transitional helpers to full atomic helpers - - the kernel now checks for cursor coordinates that would result in - integer overflow and returns -ERANGE, similar to the checking that was - already done for other plane types. We update kms_cursor_crc here to - reflect this small behavior change: - * Check for success at extreme boundary conditions INT_MAX-{width,height} - rather than INT_MAX - * Add new check for success at SHRT_MAX; if the driver were to - internally use short values and overflow, we could have the cursor - reappear on the screen. - * Add a test for failure with proper error code at INT_MAX-{width,height}+1 - - Signed-off-by: Matt Roper - -commit 9846e7f2c57dc7c36d5d6f64e4a9fc7f50feda33 -Author: Ben Widawsky -Date: Tue Jan 27 17:59:06 2015 -0800 - - gem_render_copy: Provide an all pixels check - - Signed-off-by: Ben Widawsky - Reviewed-by: Imre Deak - -commit 38a0c41340109a9f0b365e514147c20f95248aea -Author: Thomas Wood -Date: Wed Jan 28 16:49:31 2015 +0000 - - lib/tests: check that invalid subtest names are rejected - - Signed-off-by: Thomas Wood - -commit f0516f3d3537d57aa0885212082668db2c4d5df9 -Author: Thomas Wood -Date: Wed Jan 28 16:30:54 2015 +0000 - - lib/tests: verify subtest enumeration output - - Check that the subtest list is not empty if using --list-subtests - returns with an exit code of 0, and that the list is empty if it returns - with 79. - - Signed-off-by: Thomas Wood - -commit 16cfa37a505aaafd26b09b463a562c6985453fae -Author: Thomas Wood -Date: Tue Jan 27 14:12:27 2015 +0000 - - lib: add exit status message to simple tests - - Add an exit status message to simple tests, similar to the one printed - for subtests. This includes the test outcome and the time taken to run - the test. - - Signed-off-by: Thomas Wood - -commit 9942a404379c1a021a6d26b8b2fcd9b70818a971 -Author: Thomas Wood -Date: Tue Jan 27 14:10:15 2015 +0000 - - lib: add subtest start and exit status code messages to debug output - - Signed-off-by: Thomas Wood - -commit 2b05ecfb0625ddf4b8cced18c471063aa23e2768 -Author: Thomas Wood -Date: Mon Jan 26 16:59:53 2015 +0000 - - lib: validate subtest names - - Subtest names should only contain '-', '_' and alphanumeric characters. - - Signed-off-by: Thomas Wood - -commit 61737903ad4d4423516a41538d1ce4cf7287da0e -Author: Thomas Wood -Date: Mon Jan 26 16:09:40 2015 +0000 - - lib: print warning and critical messages when listing subtests - - These messages are sent to stderr and could indicate an issue when - enumerating subtests. - - Signed-off-by: Thomas Wood - -commit a228223ffaf38fa758eea58258cfe745b6cde4b6 -Author: Thomas Wood -Date: Mon Jan 26 16:09:09 2015 +0000 - - lib: warning messages should be sent to stderr - - This is a regression from commit df11a0f (lib: add a critical warning - level). - - Signed-off-by: Thomas Wood - -commit bef692d9f3556caf3e901de62f3b24d1aec5798e -Author: Michał Winiarski -Date: Tue Feb 3 20:13:56 2015 +0100 - - tests/gem_userptr_blits: Race between close and invalidate - - It was possible for invalidate range start mmu notifier callback to race - with releasing userptr object. If the object is released prior to - taking a spinlock in the callback, we'll encounter a null pointer - dereference. - - v2: Moved expressions inside igt_assert(), added mem barrier (Chris) - - Cc: Chris Wilson - Signed-off-by: Michał Winiarski - Reviewed-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 87edb519408746d31110ea4a01cfbf0734433cb8 -Author: Imre Deak -Date: Thu Jan 29 00:03:19 2015 -0800 - - rendercopy/gen9: fix gem_render_copy 3d state setup - - Without emitting the default 3DSTATE_WM_DEPTH_STENCIL state the test - will fail. - - Signed-off-by: Imre Deak - -commit 51d87b80493169f68bf1cda0eb2f6715310fe45c -Author: Thomas Daniel -Date: Mon Jan 19 16:34:51 2015 +0000 - - tests/prime_self_import: further fix object counts - - A previous commit: - - commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84 - Author: Mika Kuoppala - Date: Fri Mar 28 10:52:46 2014 +0200 - - lib/drmtest: don't dup quiescent fd - - introduced a regression for drm object leak checking. A following commit: - - commit 8741c2289f17e9bcb740a01cad4764a71c918eea - Author: Mika Kuoppala - Date: Wed May 7 16:46:19 2014 +0300 - - tests/gem_flink_race,prime_self_import: fix object counts - - fixed the regression for some cases but missed the export-vs-gem_close-race - subtest. Note that test behaviour depends on whether the subtest is run as - part of the whole prime_self_import test (fail), or as a single subtest (pass). - Using execlists on Gen8+ reverses the pass/fail due to lazy context allocation - which is presumably why this has now been noticed. - - This commit applies the same fix to the export-vs-gem_close-race subtest. - - Cc: Mika Kuoppala - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87627 - Signed-off-by: Thomas Daniel - Reviewed-by: Mika Kuoppala - Signed-off-by: Mika Kuoppala - -commit 7848d214729a366eca937a63ec8ea025988203d2 -Author: Chris Wilson -Date: Tue Jan 27 09:38:34 2015 +0000 - - igt/gem_tiled_wc: Use correct offsets - - A last moment "tidification" in - - commit 5e9fac54918e424d928bc15b90e4c65d4cfdd356 - Author: Chris Wilson - Date: Thu Jan 22 07:52:09 2015 +0000 - - igt/gem_tiled_wc: Fix! Finish! - - wreaked havoc again. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88816 - Signed-off-by: Chris Wilson - -commit ebd8b32bc6f5046815e00a6bee7f7f6650591cce -Author: Libin Yang -Date: Thu Jan 15 09:20:47 2015 +0800 - - tools/intel_audio_dump: add details dump for Cherryview - - This patch adds the details dump for audio registers of Cherryview. - - Signed-off-by: Libin Yang - Reviewed-by: Zhenyu Wang - -commit fa94e01ee71ee97a07a38802e9771b885b51eeeb -Author: Thomas Wood -Date: Tue Jan 20 11:14:42 2015 +0000 - - docs: fix parsing issue - - Use entities for the special characters '<' and '>' to avoid "" being - treated as a tag. - - Signed-off-by: Thomas Wood - -commit 6011508afed046d60eebf44f51e52a76c326a591 -Author: Daniel Vetter -Date: Thu Jan 22 10:01:28 2015 +0100 - - tests/gem_concurrent_blit: Fix indent - - Thrown up my brain's parser for a moment ;-) - - Signed-off-by: Daniel Vetter - -commit fbcc7ba20f5a45a6e2fc9e74a68608ebc804ec29 -Author: Daniel Vetter -Date: Thu Jan 22 09:43:10 2015 +0100 - - tests/gem_concurrent_blt: Adjust subtest naming - - Our tooling doesn't cope with () in the testnames (piglit becomes all - confused apparently) and the naming convention says to use "blt" and - "render". - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88220 - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88349 - Signed-off-by: Daniel Vetter - -commit 9f952940c00f002acb0cef5a5d6251d45be8ff2c -Author: Zhipeng Gong -Date: Tue Jan 13 08:50:21 2015 +0800 - - test/gem_dummy_reloc_loop: add tests for dual bsd ring - - Signed-off-by: Zhipeng Gong - Signed-off-by: Daniel Vetter - -commit f8d47cb70dae434571c6fe5ae39a0fc4909ba7fa -Author: Zhipeng Gong -Date: Tue Jan 13 08:50:20 2015 +0800 - - tests/gem_exec_params: check the invalid flags for dual bsd ring - - v2: add more tests to address Daniel's comments(Zhipeng) - - Signed-off-by: Zhipeng Gong - Signed-off-by: Daniel Vetter - -commit 17937a0114b29a273152c4c2df72c5b1a992b07c -Author: Zhipeng Gong -Date: Tue Jan 13 08:50:19 2015 +0800 - - i-g-t: check whether kernel has dual bsd ring - - v2: change the number to be consistent with upstream (Zhipeng) - - Signed-off-by: Zhipeng Gong - Signed-off-by: Daniel Vetter - -commit 5e9fac54918e424d928bc15b90e4c65d4cfdd356 -Author: Chris Wilson -Date: Thu Jan 22 07:52:09 2015 +0000 - - igt/gem_tiled_wc: Fix! Finish! - - It helps when testing whether tiled data read back through a linear - mmaping to first tile the data. And not repeatedly unmapping the linear - map stops it from segfaulting. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88686 - Signed-off-by: Chris Wilson - -commit 3d65ff780d6d7a1b354bd530942a194a97f73dca -Author: Rodrigo Vivi -Date: Mon Jan 12 10:21:58 2015 -0800 - - lib: s/IGT_DEBUG_INTERACTIVE/--interactive-debug=var - - Use cmdline variable for interactive debug instead of env var. - - v2: Make interactive-debug domain optional and use "all" when not set. - - Signed-off-by: Rodrigo Vivi - Signed-off-by: Daniel Vetter - -commit eeff390598f6bf7292a9775cc6c470207f90a128 -Author: Ander Conselvan de Oliveira -Date: Mon Jan 19 15:43:57 2015 +0200 - - kms_plane: Add test that suspends/resumes before getting crc - - This adds a test that does a suspend/resume cycle between configuring - a plane and getting the crc value for the pipe. The intention is to - test if the user requested stated is restored properly, instead of - being clobbered by the state read out from the hardware. - - Signed-off-by: Ander Conselvan de Oliveira - Signed-off-by: Daniel Vetter - -commit a29f28eba975388aed43c83dd6ed3ec2a869f4ce -Author: Chris Wilson -Date: Mon Jan 19 09:42:25 2015 +0000 - - igt/drv_module_reload: Check more carefully for a live driver - - As drm_open_any() now quietly fails if there is no driver, this - nullifies the effectiviness of using gem_exec_nop as the test for a good - reload. Combine with gem_alive (and guarantee that gem_alive can detect - a dead driver, putting lie to - - commit 032f30cb38bb03562ee7fde19cd278b1d8ac31a9 - Author: Thomas Wood - Date: Tue Jan 13 13:33:57 2015 +0000 - - lib: remove unnecessary checks on the drm_open_any return value - - ) first. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88573 - Signed-off-by: Chris Wilson - -commit 20d6e0f41b3b70a89946e5271bc4ffa7695be1b0 -Author: Tim Gore -Date: Fri Jan 16 09:12:15 2015 +0000 - - tools/intel_gpu_frequency: remove use of getsubopt - - getsubopt is not available in android. The "get" option - doesn't really need sub-options, just display all the - current frequency settings (as per discussion with - Ben Widawsky) - - Ben v2: Remove the -geff example in the header - Fixed another typo for the --set while there (found by Dave Gordon) - - Signed-off-by: Tim Gore - Reviewed-by: Ben Widawsky - -commit 0167619bbcc6b45b4045a85468007ecc9f606c71 -Author: Thomas Wood -Date: Wed Dec 17 11:37:31 2014 +0000 - - lib: use critical log level for assertion failure messages - - Signed-off-by: Thomas Wood - -commit df11a0f4a83a78ca63e04ff915a77e33cf8422fe -Author: Thomas Wood -Date: Tue Dec 16 15:18:20 2014 +0000 - - lib: add a critical warning level - - Signed-off-by: Thomas Wood - -commit 032f30cb38bb03562ee7fde19cd278b1d8ac31a9 -Author: Thomas Wood -Date: Tue Jan 13 13:33:57 2015 +0000 - - lib: remove unnecessary checks on the drm_open_any return value - - drm_open_any always returns a valid file descriptor, so there is no need - to check the return value. - - Signed-off-by: Thomas Wood - -commit 07e9f3edb9dd8e99c2511b6b8c4cf750a5dbe536 -Author: Tim Gore -Date: Mon Jan 12 09:50:22 2015 +0000 - - lib/Android.mk: add -DHAVE_LINUX_KD_H to fix android build - - commit cf93bc8df9f5f94a0aedc8b52bad0ad4e036737c by Alan Coopersmith - (introduced to enable solaris builds) reqires HAVE_LINUX_KD_H to be set - in order for kd.h to get picked up in igt_kms.c. This is not currently - set in the Android makefile so Android builds are broken. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 6e2fd6f64d156e9abdb3f4c51e4589fb77ec74dd -Author: Thomas Wood -Date: Tue Jan 13 11:53:49 2015 +0000 - - tools: add intel_gpu_frequency to .gitignore - - intel_gpu_frequency was added in commit 5fb26d1 (intel_gpu_frequency: A - tool to manipulate Intel GPU frequency), but wasn't added to .gitignore. - - Cc: Ben Widawsky - Signed-off-by: Thomas Wood - -commit c1d8293cc79350aa0ee803c7408a9c970f8eebc8 -Author: Thomas Wood -Date: Tue Jan 13 11:50:02 2015 +0000 - - intel_gpu_frequency: fix array bounds warning - - Add a parameter for the size of the act_upon array in the parse function - since its size cannot be calculated with ARRAY_SIZE from just the - pointer. - - Cc: Ben Widawsky - Signed-off-by: Thomas Wood - -commit a263cc87958de96acd77fdae6bf8a09bdf46204e -Author: Chris Wilson -Date: Thu Jan 15 09:36:05 2015 +0000 - - igt/gem_tiled_swapping: Cycle through the bo a couple of times - - In order to exercise coherency across swapin/swapout of the same bo, - explicitly loop over all bo a couple of times. - - Signed-off-by: Chris Wilson - -commit d3bf83af031a2e1c937b3f66fd3fbaec72864525 -Author: Chris Wilson -Date: Thu Jan 15 08:49:59 2015 +0000 - - igt/gem_mmap_wc/set-cache-level: Exercise set-cache-level WARNing - - With the introduction of mmap(wc) and its unbound GTT write domain, we - can now hit the warning inside set-cache-level, complaining about the - failure to do correct cpu cache tracking. - - Signed-off-by: Chris Wilson - -commit 3ea7a2807214900edfdfc171968d7c2e22890c0b -Author: Chris Wilson -Date: Wed Jan 14 14:33:29 2015 +0000 - - igt/gem_exec_big: Don't try to repeatedly munmap(NULL) - - Signed-off-by: Chris Wilson - -commit 3214a27b5ba7cd621b091f1d0702e069a750c054 -Author: Chris Wilson -Date: Tue Jan 13 09:17:29 2015 +0000 - - igt/gem_mmap_wc: Reorder gem_close() - - Unlike a GTT mmap, a WC mmap does not have a direct reference to the - object, only to the backing storage. If we want to control the domain - correctly for mmap(wc), we have to keep the bo reference around. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88356 - Signed-off-by: Chris Wilson - -commit 5fb26d1469f95ea93df2f047f57c0cdcf27da5d7 -Author: Ben Widawsky -Date: Sat Jan 10 14:36:20 2015 -0800 - - intel_gpu_frequency: A tool to manipulate Intel GPU frequency - - WARNING: very minimally tested - - In general you should not need this tool. Its primary purpose is for - benchmarking, and for debugging performance issues. - - For many kernel releases now sysfs has supported reading and writing the GPU - frequency. Therefore, this tool provides no new functionality. What it does - provide is an easy to package (for distros) tool that handles the most common - scenarios. - - v2: - Get rid of -f from the usage message (Jordan) - Add space before [-s (Jordan) - Add a -c/--custom example (Jordan) - Add a setting for resetting to hardware default (Ken) - Replicate examples in commit message in the source code. (me) - - v3: - Its not It's (me) - Add --help/-h to usage - Add Version + man page - Rename tool to intel_gpu_frequency, from intel_frequency - Remove "sudo" from the examples - - Signed-off-by: Ben Widawsky - Reviewed-by: Jordan Justen - Cc: Kenneth Graunke - - Here are some sample usages: - $ intel_gpu_frequency --get=cur,min,max,eff - cur: 200 MHz - min: 200 MHz - RP1: 200 MHz - max: 1200 MHz - - $ intel_gpu_frequency -g - cur: 200 MHz - min: 200 MHz - RP1: 200 MHz - max: 1200 MHz - - $ intel_gpu_frequency -geff - RP1: 200 MHz - - $ intel_gpu_frequency --set min=300 - $ intel_gpu_frequency --get min - cur: 300 MHz - min: 300 MHz - RP1: 200 MHz - max: 1200 MHz - - $ intel_gpu_frequency --custom max=900 - $ intel_gpu_frequency --get max - cur: 300 MHz - min: 300 MHz - RP1: 200 MHz - max: 900 MHz - - $ intel_gpu_frequency --max - $ intel_gpu_frequency -g - cur: 1200 MHz - min: 1200 MHz - RP1: 200 MHz - max: 1200 MHz - - $ intel_gpu_frequency -e - $ intel_gpu_frequency -g - cur: 200 MHz - min: 200 MHz - RP1: 200 MHz - max: 200 MHz - - $ intel_gpu_frequency --max - $ intel_gpu_frequency -g - cur: 1200 MHz - min: 1200 MHz - RP1: 200 MHz - max: 1200 MHz - - $ intel_gpu_frequency --min - $ intel_gpu_frequency -g - cur: 200 MHz - min: 200 MHz - RP1: 200 MHz - max: 200 MHz - -commit cdbc514b4144b614b6ca296c0817828b6a20aa26 -Author: Chris Wilson -Date: Mon Jan 12 12:57:27 2015 +0000 - - igt/gem_exec_big: Use mmap(wc) to speed up verification - - Signed-off-by: Chris Wilson - -commit b65903b7db6c625526e29b2023e50661e584f1a0 -Author: Chris Wilson -Date: Mon Jan 12 10:42:03 2015 +0000 - - igt/gem_exec_big: Also test a large batch with a large number of relocs - - Signed-off-by: Chris Wilson - -commit 9917744176cfe694d51d77ac2eff173d9662e7b8 -Author: Yang, Libin -Date: Mon Jan 12 01:38:34 2015 +0000 - - tools/intel_audio_dump: add support for Cherryview - - This patch adds support for dumping audio registers of Cherryview. - - Signed-off-by: Libin Yang - -commit 67eb20c8a3569aa18d3378d8fe54cd78396a2c16 -Author: Ben Widawsky -Date: Sat Jan 10 11:00:22 2015 -0800 - - tools/Makefile: Alphabetize the list - - Signed-off-by: Ben Widawsky - Reviewed-by: Jordan Justen - -commit 1dddf32df97f1f1c5269d1bc3ece1d6183277603 -Author: Chris Wilson -Date: Tue Nov 18 09:45:56 2014 +0000 - - igt/gem_exec_big: Increase stress - - We should be able to execute batches up to the full GTT size (give or - take fragmentation), so let's try! - - Signed-off-by: Chris Wilson - -commit a315476a6ba07f83631a60355bd01a6f73ced50b -Author: Chris Wilson -Date: Sat Sep 6 08:16:27 2014 +0100 - - igt/gem_evict_(alignment|everything): contend with GPU hangs - - Signed-off-by: Chris Wilson - -commit ce79b7aa8010d848d4e9c417bcba375eac958f60 -Author: Chris Wilson -Date: Thu Sep 4 13:57:17 2014 +0100 - - igt/gem_reloc_vs_hang: Inject hangs! - - Signed-off-by: Chris Wilson - -commit 5ae9ecaf55ee3263f17ac3837b0dfdd6626cca51 -Author: Chris Wilson -Date: Thu Sep 4 13:16:52 2014 +0100 - - igt/gem_pread_after_blit: Inject hangs! - - Signed-off-by: Chris Wilson - -commit 16bafdf5bf0248c02ea9824aca003b2a23d464be -Author: Chris Wilson -Date: Thu Sep 4 09:26:24 2014 +0100 - - igt/gem_concurrent_blit: Inject hangs before verifying contents - - After setting up the copy operations, add a hanging batch. This should - mean that we complete the copy and the compare then races against the - GEM reset. Hopefully, this will catch driver bugs where the target - object is no longer accessible after the hang. - - Note: hang injection is disabled until the required kernel interface is - completed. But there are useful additional tests here... - - Signed-off-by: Chris Wilson - -commit 25cf0551c7d210c8c085c109891dc97a2cc61e27 -Author: Chris Wilson -Date: Tue Jan 6 09:59:47 2015 +0000 - - igt/gem_ctx_thrash: Tweak resource limits - - On some systems (ok, most systems!) we may need to enlarge the allowed - number of open files in order to create enough fd to fill the aperture. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87572 - Signed-off-by: Chris Wilson - -commit eaa1e8e127205a9517bfc89275cd8723e8b09ed2 -Author: Chris Wilson -Date: Tue Jan 6 10:06:41 2015 +0000 - - ioct_wrappers: Add some mmap(wc) blurb dropped between authors - - Signed-off-by: Chris Wilson - -commit 33d52a854375581321eb7ae36b06705425fb482f -Author: Alan Coopersmith -Date: Tue Dec 23 19:07:14 2014 -0800 - - Skip MADV_DOFORK & MADV_DONTFORK calls on OS'es that don't support them - - Signed-off-by: Alan Coopersmith - Signed-off-by: Daniel Vetter - -commit 843beb152bb948c972e573448be02ea0a902f3ea -Author: Alan Coopersmith -Date: Tue Dec 23 19:07:13 2014 -0800 - - Don't try to use CLOCK_MONOTONIC_COARSE on OS'es that don't support it - - Signed-off-by: Alan Coopersmith - Signed-off-by: Daniel Vetter - -commit 95ea5d5c0b0342ec95899c6d33311b6ff40732b3 -Author: Alan Coopersmith -Date: Tue Dec 23 19:07:12 2014 -0800 - - Provide sighandler_t fallback for non-GNU-libc platforms - - Signed-off-by: Alan Coopersmith - Signed-off-by: Daniel Vetter - -commit f04b9dfba00b724879b0310a5d1442196afcc24e -Author: Alan Coopersmith -Date: Tue Dec 23 19:07:11 2014 -0800 - - Need to #include for basename() on Solaris - - Signed-off-by: Alan Coopersmith - Signed-off-by: Daniel Vetter - -commit 99e6defbe79d3a41f967b55d33ce1a856914e797 -Author: Alan Coopersmith -Date: Tue Dec 23 19:07:10 2014 -0800 - - Use pthread calls instead of raw syscalls on non-Linux systems - - Raw system calls aren't portable to other kernels. - - Signed-off-by: Alan Coopersmith - Signed-off-by: Daniel Vetter - -commit cf93bc8df9f5f94a0aedc8b52bad0ad4e036737c -Author: Alan Coopersmith -Date: Tue Dec 23 19:07:09 2014 -0800 - - Solaris needs to #include instead of - - Signed-off-by: Alan Coopersmith - Signed-off-by: Daniel Vetter - -commit f7766d1c77ffef757e05cbd6c6ed110cdd830045 -Author: Alan Coopersmith -Date: Tue Dec 23 19:07:08 2014 -0800 - - Fix #ifdef check for _SC_AVPHYS_PAGES in intel_get_avail_ram_mb() - - Check for the sysconf value used here, not the one used in the - previous function. - - Signed-off-by: Alan Coopersmith - Signed-off-by: Daniel Vetter - -commit f3e1a3d9f8cc366a1e0dbda42f3da9d37064fcd0 -Author: Akash Goel -Date: Fri Jan 2 16:33:34 2015 +0530 - - igt/gem_mmap_wc: Add the invalid flags subtest - - A new subtest added to validate the new version of gem_mmap ioctl, - for creating the wc mappings, on yet to be supported flags. - - v2: Removed the flags checking for older kernels (Daniel) - - Signed-off-by: Akash Goel - Signed-off-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit f2a045f851fa46b2674d455fd5560bdc1fe21a0c -Author: Chris Wilson -Date: Fri Jan 2 16:33:33 2015 +0530 - - igt/gem_concurrent_blit: Exercise wc mappings - - Signed-off-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit d95736906d7acea3f52a16076c70f0907684afb5 -Author: Chris Wilson -Date: Fri Jan 2 16:33:32 2015 +0530 - - igt/gem_fence_upload: Add comparison against wc mmaps - - Signed-off-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 58865891ba31914eb35f56a553ff7056e3443b06 -Author: Chris Wilson -Date: Fri Jan 2 16:33:31 2015 +0530 - - igt/gem_gtt_speed: compare against WC mmaps - - Signed-off-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit e70c789909efee8da5c483dc84361418c1d43018 -Author: Chris Wilson -Date: Fri Jan 2 16:33:30 2015 +0530 - - igt/gem_tiled_wc: Exercise wc mmaps with swizzling - - This exercises both the wc mmappings and the extended get_tiling ioctl. - Userspace cannot handle bit17 swizzling through wc mmaps (because bit17 - requires swizzling based on the actual physical address of the page - - which is unknown to userspace) and so we need an extended get_tiling - ioctl to report the actual as well as the logical swizzling on an - object. We then check that the contents of the object are tiled and - swizzled correctly when viewed through a wc mmap. - - Signed-off-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit a464fb758e102cb3af90e23e002472a9faac340b -Author: Chris Wilson -Date: Fri Jan 2 16:33:29 2015 +0530 - - igt/gem_mmap_wc: Exercise mmap(wc) interface - - Signed-off-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit c49a7e9163c2ee30c4bfe930dc0418cf5e2eb0d4 -Author: Chris Wilson -Date: Mon Jan 5 14:34:58 2015 +0000 - - lib/core: Fix compile error from rebasing - - s/KMSG_INFO/KERN_INFO/ - - Signed-off-by: Chris Wilson - -commit d8bf7e17cb5b4b734071563f330a20e41cc6acc4 -Author: Chris Wilson -Date: Mon Jan 5 14:07:31 2015 +0000 - - lib/core: Show the exitcode in kmsg as well - - This provides symmetry with logging the start of the test via kmsg. - - Signed-off-by: Chris Wilson - -commit cb512b6470fa848c9b351c2090cd3e3f588cfc5f -Author: Vincent Cheng -Date: Wed Dec 31 10:39:51 2014 +0000 - - tools/intel_gpu_abrt: Fix bashism - - intel-gpu-tools ships a #!/bin/sh script that has bash-specific syntax - (which breaks on distros such as Debian and Ubuntu where /bin/sh is a - symlink to something other than bash). - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87888 - -commit eb799b29947a9030aca7d808e97190635636c8de -Author: Chris Wilson -Date: Sun Dec 21 13:53:27 2014 +0000 - - overlay: Hide kworker threads in overview - - The kworker threads are used for flip handling and other non-userspace - driver tasks. They are non-blocking and so do not impact upon how - userspace performs, but they do obscure that information in the - overview. - - Signed-off-by: Chris Wilson - -commit 0be9766952333dc54a0c568bc487660c0caf5edf -Author: Chris Wilson -Date: Sun Dec 21 13:50:34 2014 +0000 - - overlay: A couple of valgrind pleasers - - Make sure we initialise values to keep valgrind happy - - Signed-off-by: Chris Wilson - -commit 7f9d14aa516527f6abf77b4df294acfa832d0dc6 -Author: Chris Wilson -Date: Sun Dec 21 13:49:25 2014 +0000 - - overlay: Negative modulus - - Don't use a negative index into the array if the desired element is - negative, just wrap around properly into the ring for the chart. - - Signed-off-by: Chris Wilson - -commit c537cdb08eb7a862b50fab2d66aa40f8efaaf933 -Author: Chris Wilson -Date: Thu Dec 18 16:21:16 2014 +0000 - - igt/gem_ctx_thrash/threads: Allow bo resuse - - We already allocate enough objects to thrash the ppGTT VMs, so allow us - to reuse the batch buffers for some efficiency gains and through the - contention more towards the ctx->vm. - - Signed-off-by: Chris Wilson - -commit 4bde75434999568db4868adfcdc9f93fcb7c49c4 -Author: Chris Wilson -Date: Thu Dec 18 16:20:10 2014 +0000 - - igt/gem_ctx_thread/processes: Serialise after forking children - - Play nice, especially with the subtest, and wait for the children to - exit before finishing the test. If we don't we end up with a fork bomb - for some unknown reason... - - Signed-off-by: Chris Wilson - -commit 9f389d00cf83248fa31f626a5a4a3f5ac7c07a75 -Author: Chris Wilson -Date: Thu Dec 18 11:45:30 2014 +0000 - - igt/gem_ctx_thrash: Boost workloads - - Now that we are no longer busy-spinning inside random(), we can spend - more time exercising i915.ko - - Signed-off-by: Chris Wilson - -commit 14c661599b0a9af9169779b9ffcffa4bbbb7bb3d -Author: Chris Wilson -Date: Thu Dec 18 11:44:52 2014 +0000 - - lib/gen8: Make rendercopy threadsafe - - Signed-off-by: Chris Wilson - -commit 71e9e9c564419cd1f4563c628dc80e707a512065 -Author: Chris Wilson -Date: Thu Dec 18 09:08:13 2014 +0000 - - lib: random() is too slow - - random() being a good multithread-safe RNG is too slow to be used in - stress tests, especially for a seemingly trivial task of randomising the - order of an array. - - Signed-off-by: Chris Wilson - -commit 6999b70a8438789c3afaad0cb76cf364bd4274c1 -Author: Tim Gore -Date: Wed Dec 17 10:44:11 2014 +0000 - - Demos/Android.mk: build intel_sprite_on - - This reverts the effect of two commits - 06fb6c233dd82aac766aa9206644f6eff668ca99 - 264e1ac10ac14a098a78cc9f96c4e7cabb124ee5 - - Both of these were to stop demos/intel_sprite_on - from being built, but the first was just broken. - - So this commit re-enables building intel_sprite_on. - However, intel_sprite_on will not build in recent - Android trees. To overcome this the version - of IGT kept in the Android repository will carry a patch - to intel_sprite_on, and the automatic build test of - IGT on android will patch the freedesktop code on the fly. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit f73697aa8b9131f4bbcd438c66d45b24254d92c7 -Author: Thomas Wood -Date: Wed Dec 17 14:34:47 2014 +0000 - - NEWS: New heading for 1.10 - - Signed-off-by: Thomas Wood - -commit 959a7db668f19715e7d85f7899a3c38428c4deed -Author: Chris Wilson -Date: Tue Dec 16 12:12:51 2014 +0000 - - igt: Add gem_ctx_thrash to fill the GGTT with contexts - - Signed-off-by: Chris Wilson - -commit 739790d7eda4866538386f2a24e597c700c24c49 -Author: Daniel Vetter -Date: Wed Dec 17 09:05:10 2014 +0100 - - tests/gem_exec_blt: Add subtest that uses dumb buffers - - Just to make sure this keeps working since a patch to WARN_ON using - dumb buffers in execbuf was accidentally merged. - - Signed-off-by: Daniel Vetter - -commit 6262f353bb04112becc8679f63b1caaf083f1484 -Author: Thomas Wood -Date: Fri Dec 12 15:26:36 2014 +0000 - - Update version to 1.9 and add the release date - - Signed-off-by: Thomas Wood - -commit 06fb6c233dd82aac766aa9206644f6eff668ca99 -Author: Tim Gore -Date: Fri Dec 12 14:29:00 2014 +0000 - - Demos/Android.mk: dont build intel_sprite_on - - intel_sprite_on wont build on Android. Previous - attempt to disable was just wrong! - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 267b352c4fd161a5e96d0a569cdc1f7a3191e90e -Author: Thomas Wood -Date: Fri Dec 12 14:28:38 2014 +0000 - - NEWS: Updates - - Signed-off-by: Thomas Wood - -commit f59bbf7e8f6b0b5208e6cc11e01537a93ae93706 -Author: Thomas Wood -Date: Fri Dec 12 14:18:07 2014 +0000 - - lib: fix a few documentation warnings - - Signed-off-by: Thomas Wood - -commit a11117e42fabc3228d21a4786584acbe9840f1dc -Author: Tim Gore -Date: Fri Dec 12 12:14:33 2014 +0000 - - Android.mk: replace std=c99 with std=gnu99 - - The android makefiles were passing the -std=c99 flag to the - compiler which disables the typeof keyword. This causes a - build fail for a recent addition to igt_aux.h. - Change this to -std=gnu99, which is the flag used in the - linux build - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 264e1ac10ac14a098a78cc9f96c4e7cabb124ee5 -Author: Tim Gore -Date: Fri Dec 12 11:55:21 2014 +0000 - - Demos/Android.mk: dont build intel_sprite_on - - intel_sprite_on wont build on Android. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 6414707bdc318a0bed4c3ae2fe404e27f3cd377c -Author: Joonas Lahtinen -Date: Thu Dec 11 15:11:53 2014 +0200 - - lib: Fix out of tree build of version.h - - Write the version.h.tmp file into the build directory instead of source - directory. This allows out of tree building when those two are not the - same. - - Signed-off-by: Joonas Lahtinen - Signed-off-by: Thomas Wood - -commit 42b02c284ed24871528df8f1b3eaad7fe1554fd9 -Author: Thomas Wood -Date: Mon Dec 8 11:12:51 2014 +0000 - - lib: add a function to lock memory into RAM - - Add a function to lock memory into RAM and use it in the - gem_tiled_swapping test to reduce the amount of allocated memory - required to force swapping. This also reduces the amount of time - required for the test to complete, since the data set is smaller. - - The following durations were recorded with gem_tiled_swapping on a - haswell system before the change: - - Subtest non-threaded: SUCCESS (55.889s) - Subtest threaded: SUCCESS (810.532s) - - and after: - - Subtest non-threaded: SUCCESS (11.804s) - Subtest threaded: SUCCESS (268.336s) - - v2: add various assertions and requirements and make sure - gem_tiled_swapping works on systems with less RAM (Daniel Vetter) - - v3: fix allocation size calculation - - Signed-off-by: Thomas Wood - -commit 5fe9c88bdad9bf54013b58f2324b7b47d92ca09d -Author: Thomas Wood -Date: Tue Dec 2 11:37:26 2014 +0000 - - lib: add optional log domain filtering - - v2: add an "application" filter for the default domain (used by - applications) - - Signed-off-by: Thomas Wood - -commit 8161a21762b552d97fe6bde8d4fd441d9cd10f61 -Author: Thomas Wood -Date: Tue Dec 2 10:54:54 2014 +0000 - - lib: introduce log domains - - Log domains can be used to identify the source of log messages, such as - the test being run or the helper library. - - v2: Add separate domains for different parts of the helper library and - use an empty default domain for applications. - Expand the log output to include the process name and the log level - of the message in addition to the domain and pid. - Print the expanded message only for warning and debug messages. - - v3: check for glibc before using program_invocation_short_name - - Signed-off-by: Thomas Wood - -commit 85b74d5c14506bbae53ab02408102645e071a206 -Author: Thomas Wood -Date: Tue Dec 2 10:53:47 2014 +0000 - - tests/gem_tiled_swapping: use igt_info logging wrapper - - Signed-off-by: Thomas Wood - -commit 16f1506ff605127121249d35a233d1ba438ffeef -Author: Thomas Wood -Date: Wed Dec 10 16:24:03 2014 +0000 - - tests: replace 3D test images - - Use images with a smaller file size, created by saving the left and - right stereo output of glxgears. - - Signed-off-by: Thomas Wood - -commit bdbf78db018d0d1854ea4274d983cf32e57a7d74 -Author: Thomas Wood -Date: Wed Dec 10 14:47:45 2014 +0000 - - tools: add missing copyright headers - - Signed-off-by: Thomas Wood - -commit f3ae3deb4f7266cd761a6c81ea2263ced23c2fc3 -Author: Thomas Wood -Date: Fri Dec 5 14:46:28 2014 +0000 - - NEWS: Updates - - Signed-off-by: Thomas Wood - -commit e80922eba61e71bbaae3febf5c69f0ed00809591 -Author: Thomas Wood -Date: Fri Dec 5 14:07:53 2014 +0000 - - Add a MAINTAINERS file - - Acked-by: Daniel Vetter - Signed-off-by: Thomas Wood - -commit 84f23415c4a82ed3bd230701b2c085ca5dd699a3 -Author: Thomas Wood -Date: Wed Oct 29 11:18:27 2014 +0000 - - Update README - - Signed-off-by: Thomas Wood - -commit 5d46f68eab1cb6bdaa52eff33bcb0d61149eca3d -Author: Ville Syrjälä -Date: Tue Dec 9 22:33:16 2014 +0200 - - tests/kms_cursor_crc: Restore the valid pipe/connector combo check - - The valid pipe/connector combo check was lost in - commit 57259d714d3fe1170cf931af72648219856a9918 - Author: Daniel Vetter - Date: Mon Nov 24 16:08:32 2014 +0100 - - lib/igt_debugfs: Don't setup crc in _new - - Restore it to make the test again useful on CHV. - - Cc: Daniel Vetter - Signed-off-by: Ville Syrjälä - -commit b6f68c10b4ee2b730baeb8129aba36b5210ac291 -Author: Ville Syrjälä -Date: Tue Dec 9 14:44:02 2014 +0200 - - tests/kms_mmio_vs_cs_flip: Count valid tests for all crtcs - - Report SKIP only if none of the pipe/connector combos worked, instead of - trying to report for each pipe separately. - - Signed-off-by: Ville Syrjälä - -commit 1b6eb414f36f3728f5c0393d8f4eefee74abdce9 -Author: Ville Syrjälä -Date: Tue Dec 9 15:27:59 2014 +0200 - - lib/igt_debugfs: Throw away the two first CRCs - - On CHV we sometimes see not just one but two bad CRCs. No real idea - what would cause that, but let's just throw away the second CRC as - well to gain some stability for the tests. - - Signed-off-by: Ville Syrjälä - -commit 01153e7d5f0b8d4edb0306c2a27030d2757235f4 -Author: Damien Lespiau -Date: Tue Dec 9 17:10:42 2014 +0000 - - drv_hangman: Remove unused function - - Signed-off-by: Damien Lespiau - -commit d49ef76e98d5966c31f6b960dcc1530103b42ae9 -Author: Damien Lespiau -Date: Tue Dec 9 17:07:22 2014 +0000 - - kms_cursor_crc: Remove value to 'return' in a void function - - Signed-off-by: Damien Lespiau - -commit c252c77dbfae6c7ed4d9a67b2bf545c468c2e205 -Author: Jani Nikula -Date: Wed Feb 12 16:29:54 2014 +0200 - - tools: terminate getopt_long long option arrays properly - - The last element of the long options array has to be filled with zeros. - - Signed-off-by: Jani Nikula - -commit f333981e1a2f5e7a16d030469c29b53c914a831c -Author: Ville Syrjälä -Date: Fri Nov 28 09:30:45 2014 +0200 - - tests/kms_flip: Target the back buffer with the dummy load - - Aim the dummy load to the current back buffer instead if the front - buffer. Assuming the idea is to get the next flip to be stuck behind - the dummy load? - - Signed-off-by: Ville Syrjälä - -commit 092682a3e5a48bf3555fdb7c4931fecc1df09f9e -Author: Ville Syrjälä -Date: Thu Nov 27 16:51:34 2014 +0200 - - tests/kms_flip: Calibrate the dummy load delay in kms_flip - - Try to tune the dummy load to ~1 second. The calibration happens the - first time dummy load is generated. - - v2: Actually do the number of ops intended and - calibrate to 1 second and not 2 - - Signed-off-by: Ville Syrjälä - -commit b0cb1e1f9d4b16a13c0afc16c809039fbb288213 -Author: Ville Syrjälä -Date: Wed Dec 3 15:25:25 2014 +0200 - - tests/kms_flip: Use fixed size (2kx2k) buffers for dummy load - - Make the dummy load independent of the display resolution by using a - two fixed size dummy bos to generate the load. As a final step do - another copy from one of the dummy bos to the fb to make sure there's - a dependency between the dummy load and any subsequent operation on - the fb. - - Signed-off-by: Ville Syrjälä - -commit 21db302c9bf8eb936f37f627aea40d3e431fc36c -Author: Ville Syrjälä -Date: Wed Dec 3 14:59:22 2014 +0200 - - tests/kms_flip: Refactor blit code - - Pull the code to emit a single blit to a separate function. - - Signed-off-by: Ville Syrjälä - -commit 8032f526ef1d075e303342b7741db35faadfd00f -Author: Ville Syrjälä -Date: Wed Dec 3 14:51:16 2014 +0200 - - tests: Run lib/igt.cocci - - Found some open coded min()/max()/swap() macros. - - Signed-off-by: Ville Syrjälä - -commit e1bdab9973ffdb5477666a384b011fa012965758 -Author: Ville Syrjälä -Date: Fri Nov 28 11:11:17 2014 +0200 - - lib/igt.cocci: Deal with min/max/swap - - Replace open coded min/max/swap with the macro invocation. - - Signed-off-by: Ville Syrjälä - -commit 1658edceee85bd5f57e8dd39075f1d127260d5b6 -Author: Ville Syrjälä -Date: Fri Nov 28 10:03:38 2014 +0200 - - lib: Add swap() macro - - swap() will swap its two arguments while keeping the required - tmp variable hidden. Makes for neater code. - - Signed-off-by: Ville Syrjälä - -commit b32b5327a20b3747890235c362b093439b854f59 -Author: Imre Deak -Date: Thu Dec 4 17:23:05 2014 +0200 - - tests/pm_rps: vlv: round middle point to freq supported by HW - - When setting the calculated middle frequency value the test assumes that - the HW/kernel rounds this value according to a 50MHz step value. This is - not so at least on VLV/CHV, on my B0 BYT-M for example this step value - is 22MHz, so there the test will fail. - - To fix this get the nearest supported value by setting the target - frequency as a min or max frequency and read it back. The kernel will - round the returned value to the nearest supported. - - v2: - - remove the 50MHz rounding that was done for non-VLV platforms, the new - way of rounding should provide the correct value for all platforms - (Ville) - - Acked-by: Daniel Vetter - Signed-off-by: Imre Deak - -commit f70afed4c7abd95fc3250141a1e36587e31f7c87 -Author: Imre Deak -Date: Thu Dec 4 17:05:25 2014 +0200 - - tests/pm_rps: vlv: load gpu for idle min/max tests - - When changing the sysfs GT min/max frequencies, the kernel won't - explicitly change the current frequency, unless it becomes out of bound - based on the new min/max values. The test happens to work on non-VLV - platforms because on those the kernel resets the current frequency - unconditionally (to adjust the RPS interrupt mask as a side-effect) and - that will lead to an RPS interrupt setting the minimum frequency. - - To fix this load the GPU after decreasing the min frequency and before - checking the current frequency. This should set the current frequency to - the minimum. - - Acked-by: Daniel Vetter - Signed-off-by: Imre Deak - -commit aabf2d095269ae4cb8e77dd61e5c0c16e602c1d8 -Author: Imre Deak -Date: Thu Dec 4 16:40:19 2014 +0200 - - tests/pm_rps: vlv: wait for freq to settle - - At least on VLV when forcing a new GT frequency by writing to the - min/max freq sysfs entries the kernel doesn't wait until the new - frequency settles, so the subsequent readback check might fail. To fix - this wait until the current frequency is between the min/max values - using a 10ms timeout. - - Acked-by: Daniel Vetter - Signed-off-by: Imre Deak - -commit 470071d4aba10f85b3728cf24acd792a273c1d28 -Author: Chris Wilson -Date: Mon Dec 8 07:49:49 2014 +0000 - - igt/drm_read: Require that pipe 0 is active - - As we require a pipe enabled to generate vblanks, the first step is to - then to check that pipe 0 is active or else skip the test. - - Signed-off-by: Chris Wilson - -commit 819e68f2ed0064f48250a4ed8e5135026c90b514 -Author: Chris Wilson -Date: Fri Dec 5 13:12:37 2014 +0000 - - igt/drm_read: Abuse read(drm) - - Check that the more obvious userspace error conditions are handled by - the kernel, ideally without loss of data. These include nonblocking - waits, passing invalid buffers and passing buffers of the incorrect - length. - - Signed-off-by: Chris Wilson - -commit b64704673e2a4d891386a1200150e679216b6d60 -Author: Chris Wilson -Date: Fri Dec 5 11:04:42 2014 +0000 - - intel_error_decode: Decode the ERROR register on Sandybridge and Ivybridge - - Signed-off-by: Chris Wilson - -commit 88ff1cec3a830fc467b91efb7e1dcdb4d82a0e17 -Author: Damien Lespiau -Date: Thu Dec 4 13:42:12 2014 +0000 - - gem_bad_reloc: Don't flip-flop between SKIP and PASS - - Here is a cheap way for this test to give consistent results. This - doesn't change the usefulness of this test, hopefully. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85270 - Acked-by: Daniel Vetter - Signed-off-by: Damien Lespiau - -commit b3cce757b5e8c0d6b40e2c401e5391162d58e8c6 -Author: Thomas Wood -Date: Thu Dec 4 11:13:04 2014 +0000 - - tests: add gem_gpgpu_fill to .gitignore - - gem_gpgpu_fill was added in commit 4ec8479 (tests: Add gem_gpgpu_fill), - but wasn't added to .gitignore. - - Cc: Zhenyu Wang - Signed-off-by: Thomas Wood - -commit c76f35386c2533e9959be37feca0e80d252fec30 -Author: Thomas Wood -Date: Wed Dec 3 14:38:45 2014 +0000 - - lib: always reset connectors after the state is forced - - Install the exit handler to reset connector states whenever - kmstest_force_connector is called, so that the connector states are - always reset even if a test fails. - - Signed-off-by: Thomas Wood - -commit 8d82e5b5efb56bdf1aa2eae8a3d82817854e119b -Author: Thomas Wood -Date: Wed Oct 8 16:16:39 2014 +0100 - - lib: remove igt_edid.h - - This has been replaced by igt_kms_get_base_edid(). - - Signed-off-by: Thomas Wood - -commit 304c874b58c0a65dcc5442c50099d048d4fe0633 -Author: Thomas Wood -Date: Wed Oct 8 15:24:36 2014 +0100 - - tests: use base edid - - Use the base edid for testing, which includes several different display - modes. - - Signed-off-by: Thomas Wood - -commit 43da3e706b955751506073e1c0e959209f6c7cf4 -Author: Thomas Wood -Date: Wed Oct 8 14:49:36 2014 +0100 - - tests/kms_force_connector: split into subtests - - v2: fix the initial mode count - - Signed-off-by: Thomas Wood - -commit 273a06dc9b68f9c6d78431de23a12ad7364bff99 -Author: Thomas Wood -Date: Wed Oct 8 14:11:30 2014 +0100 - - igt_kms: add a base edid - - Add a basic edid block that includes several different display modes. - - Signed-off-by: Thomas Wood - -commit b2ac2642a9b5448761086bdb8ae1a1e2974b3995 -Author: Thomas Wood -Date: Fri Nov 28 11:02:44 2014 +0000 - - tests: add more test descriptions - - Add more test descriptions based on exiting comments. - - Signed-off-by: Thomas Wood - -commit 029dee797965357dbcbe5a097731701e4d965d82 -Author: Thomas Wood -Date: Fri Nov 28 11:37:33 2014 +0000 - - docs: treat the test description as cdata - - Enclose the test description in cdata tags since the test descriptions - come from the tests themselves and may not be escaped for use in xml. - - Signed-off-by: Thomas Wood - -commit a5425a101cd38941961c13f97b56aa0683f64f8e -Author: Thomas Wood -Date: Wed Nov 19 15:44:00 2014 +0000 - - docs: add a glossary of test name terms - - Add a glossary of test name terms based on the details in - tests/NAMING-CONVENTION. - - Signed-off-by: Thomas Wood - -commit bc6dc7efdb65a6f5ac01cc2c306951dd9dd92fc4 -Author: Thomas Wood -Date: Wed Nov 26 18:20:03 2014 +0000 - - docs: add exit status documentation - - Signed-off-by: Thomas Wood - -commit e4e18faffc21cceb1f45c6bbfad9f1ceacdccf05 -Author: Thomas Wood -Date: Fri Nov 28 11:49:49 2014 +0000 - - docs: add subtest lists to test descriptions - - Signed-off-by: Thomas Wood - -commit 7d2ab7083b46d30335cdb01006ae8af021578ea2 -Author: Thomas Wood -Date: Mon Nov 17 11:51:51 2014 +0000 - - docs: split the test program documentation into sections - - Signed-off-by: Thomas Wood - -commit 4ec8479c53f187cc435f118d90f73ffa43887cd0 -Author: Zhenyu Wang -Date: Wed Dec 3 19:09:13 2014 +0800 - - tests: Add gem_gpgpu_fill - - This is simply a copy of gem_media_fill but using new - GPGPU fill operation. - - v2: Use general fill func pointer. - - Signed-off-by: Zhenyu Wang - -commit 10c6ad3805489819047ee24379bb1e7ab08ead1d -Author: Zhenyu Wang -Date: Wed Dec 3 19:05:09 2014 +0800 - - lib: Add GPGPU fill - - This is to add fill operation using GPGPU pipeline which is similar to - current media fill. This can be used to simply verify GPGPU pipeline - and help to enable it on newer HW, currently it works on Gen7 only and - will add support on later platform. - - Now this sets very simply thread group dispatch for one thread per - thread group on SIMD16 dispatch. So the fill shader just uses thread - group ID for buffer offset. - - v2: No new fill func typedef but adapt to igt_fillfunc_t. - - Signed-off-by: Zhenyu Wang - -commit 106f0bf965ac5ba8e5553e3e1b39396750bedc74 -Author: Zhenyu Wang -Date: Wed Dec 3 18:56:39 2014 +0800 - - lib: rename igt_media_fillfunc_t typedef to igt_fillfunc_t - - This makes fill function more general to prepare for other - fill method using GPGPU pipeline. - - Signed-off-by: Zhenyu Wang - -commit 4e5c16c17ed14831aaa369877d78788ad23ce388 -Author: Tim Gore -Date: Mon Dec 1 14:42:37 2014 +0000 - - tests/drv_hangman: remove check for other drm clients - - This test will not run on Android as the coreu service - remains running even after the android system is stopped. - Coreu is a client of drm and when the test finds this it - fails an assert. - Coreu is started by the init process and there is no - tidy, non invasive way to stop it (init just restarts it). - Coreu isn't doing anything and would not be expected to - interfere with this test. In addition, all the other - igt tests just rely on the user/test script to ensure - that there are no other drm clients, so this test can - do the same. On Android we must rely on coreu being - dormant when this test runs. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit 77b52f1881c0c62732a1deef8b900e50f1f22301 -Author: Tim Gore -Date: Tue Nov 18 14:59:25 2014 +0000 - - tests/Android.mk: Add kms_pwrite_crc to cairo test list - - kms_pwrite_crc was recently added and requires cairo, so - add this to the list of tests to exclude if cairo is not - avaiable - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit e06a7448d894392a294d89959fc1cf4e6a01fd19 -Author: Ville Syrjälä -Date: Fri Nov 28 11:13:45 2014 +0200 - - tests/kms_flip: Fix assert about vblank wait duration - - If we wait for one vblank, we may end up returning almost immediately, - so trying to assert anything but >0 about the minimum duration is - bogus. - - Instead wait for two vblanks and then we can assert that we should have - be blocked for at least one frame. And move the upper bound to a little - over two frames to match. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79050 - Signed-off-by: Ville Syrjälä - -commit ddf0f097764da6fdc50ab40c33bef7a0c08d54e3 -Author: Tim Gore -Date: Fri Nov 28 14:46:24 2014 +0000 - - tests/gem_ring_sync_copy: reduce memory usage - - gem_ring_sync_copy uses a lot of memory and gets OOM killed on smaller - systems (eg android devices). Most of the allocation is for "busy work" - to keep the render rings busy and for this we can just re-use the same - few buffers over and over. This enables the test to be run on low end - devices. - - Reviewed-by: Damien Lespiau - Signed-off-by: Tim Gore - Signed-off-by: Damien Lespiau - -commit dbac905600c37f180618e6b4467cafbb6c3f8f2a -Author: Thomas Wood -Date: Tue Nov 25 14:10:04 2014 +0000 - - lib: ensure subtests are not added to simple tests - - Simple tests do not support subtests, so fail if igt_subtest is used in - one. - - Signed-off-by: Thomas Wood - -commit 3bebf3dd011cb7acf280d4deb02723718149a99c -Author: Thomas Wood -Date: Tue Nov 25 14:03:40 2014 +0000 - - tests: use subtests in gem_tiled_swapping - - Signed-off-by: Thomas Wood - -commit ae3a9466316d61ab336f43d06e6ed8bc5025389a -Author: Thomas Wood -Date: Tue Nov 25 11:59:37 2014 +0000 - - lib: fix symbol names in documentation comments - - Signed-off-by: Thomas Wood - -commit b8f193bbbff1a322296969ded5a4c3f9fd759c6d -Author: Gagandeep S Arora -Date: Thu Nov 13 23:42:46 2014 +0530 - - demos/intel_sprite_on: Added support to compile intel_sprite_on on Android. - - Added Android.mk for intel_sprite_on. - - v2: Addressed review comments by Daniel Vetter. - - Moved the cairo independent functions from igt_kms.c to igt_aux.c. - - Signed-off-by: Gagandeep S Arora - Signed-off-by: Thomas Wood - -commit dad4694b004a65455523abbb0c7f9839d7125dae -Author: Thomas Wood -Date: Mon Nov 24 14:16:25 2014 +0000 - - lib: fix igt_reset_connectors - - Use igt_debugfs_open to open the connector file, since the - forced_connectors array now only stores the connector path relative to - the debugfs path. Also add some extra error checking to ensure a test - failure if the reset fails. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85829 - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 57259d714d3fe1170cf931af72648219856a9918 -Author: Daniel Vetter -Date: Mon Nov 24 16:08:32 2014 +0100 - - lib/igt_debugfs: Don't setup crc in _new - - The problem is that this causes writes to registers, and if the pipe - is off they might go nowhere (e.g. when runtime pm is enabled). - Furthermore we can only really check once the modeset setup is done, - but again most tests set up the CRC structure before calling - igt_commit and friends. We could add crc restore support to the - kernel's rpm code, but that will end up being rather invasive and - fragile hard-to-test code. - - Now originally this was needed back when CRC support wasn't available - everywhere. But that's fixed now. - - So given all this just drop that sanity check and make sure that we - only touch the debugfs file (and so the hw state) when we know the - pipe is running in the desired configuration. - - A complementary kernel patch will try to catch offenders by returning - -EIO if the pipe is off. - - v2: Forgot to git add one hunk. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092 - Signed-off-by: Daniel Vetter - -commit d8078911f63494eba67f8f07ffb56c4bdeae7bc9 -Author: Daniel Vetter -Date: Tue Nov 18 15:17:43 2014 +0100 - - tests/kms_render: gen2/3 can't do 10bpc - - So skip those. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86236 - Signed-off-by: Daniel Vetter - -commit 08f0e1c625571533bbef9a591d4ae4ce65c4144d -Author: Daniel Vetter -Date: Tue Nov 18 13:49:29 2014 +0100 - - tests/prime_self_import: Track leaked objects accurately - - drm_open_any keeps a buffer handle around for the cleanup sync work, - so we can only grab the buffer count after the latst drm_open_any - call. Otherwise we'll detect a fake leak. - - This broke in - - commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84 - Author: Mika Kuoppala - Date: Fri Mar 28 10:52:46 2014 +0200 - - lib/drmtest: don't dup quiescent fd - - since that additional open drm fd keeps a gem object for the default - context around. Hence why this also only blows up on gen6+ - earlier - platforms don't have hw context support. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79821 - Cc: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 120d6d1b2c8b3f036058bf2d24d08602dea69ec9 -Author: Daniel Vetter -Date: Tue Nov 18 10:39:38 2014 +0100 - - lib/aux: Make it clear that rtcwake failures aren't bugs - - Because QA has a bunch of shitty machines with old distros and tends - to re-port this all the time. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=82232 - Signed-off-by: Daniel Vetter - -commit 16f99ee419f56bf7b56657c78ecaa22ccf0c2982 -Author: Daniel Vetter -Date: Mon Nov 17 14:46:50 2014 +0100 - - lib/os: Push simulation test down into intel_require_memory - - This has the upside that we'll never forget to add it to thrashing - tests. But we'll also never miss to move it when adding basic - functionality tests to existing binaries. Chris already started this - refining work in e.g. - - commit d77eda6614a1955717f224be023dedf74eb7735d - Author: Chris Wilson - Date: Fri Nov 14 07:45:40 2014 +0000 - - igt/gem_linear_blits: Require that we do the full test - - by moving igt_skip_on_simulation into subtests. - - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit a535cdedfbd280c5e07be1c2445e09973836509a -Author: Daniel Vetter -Date: Mon Nov 17 14:43:33 2014 +0100 - - lib/os: Pust igt_require into memory check function - - More in line with the usual igt pattern and simplifies the code - - every called just wrapped it in igt_require. - - Signed-off-by: Daniel Vetter - -commit aa63fc740c510ed44c1a8dc0fc00f0c92c0581a2 -Author: Thomas Wood -Date: Fri Nov 7 14:45:01 2014 +0000 - - configure: update bug reporting url - - Signed-off-by: Thomas Wood - -commit f674a1f61fe1e63209ba3fab05313ba14ffd071e -Author: Chris Wilson -Date: Fri Nov 14 07:45:40 2014 +0000 - - igt/gem_tiled_blits: Require that we do the full test - - Signed-off-by: Chris Wilson - -commit d77eda6614a1955717f224be023dedf74eb7735d -Author: Chris Wilson -Date: Fri Nov 14 07:45:40 2014 +0000 - - igt/gem_linear_blits: Require that we do the full test - - Signed-off-by: Chris Wilson - -commit b35b1505f762839b0e9a0f8a146804444566a92a -Author: Imre Deak -Date: Thu Nov 13 13:33:54 2014 +0200 - - tests/pm_rpm: add gem-evict-pwrite subtest - - This triggers a device suspended WARN in the kernel in - gen6_ggtt_insert_entries() while calling the GEM pwrite ioctl. - - The sequence is suggested by Daniel. - - Signed-off-by: Imre Deak - Reviewed-by: Daniel Vetter - -commit f12ed8305807975e232e42fd34ad75e1147a788e -Author: Ville Syrjälä -Date: Thu Nov 13 17:24:57 2014 +0200 - - tests/kms_pwrite_crc: Add pwrite vs display coherency test - - Add a test to verify that pwriting to a future scanout buffer works - correctly. The specific problem occurs when the buffer is already - UC/WT before the pwrite, not the current scanout buffer, and not - currently in the CPU write domain. With the buggy kernel no clflush - will be performed after the pwrite, and hence we end up with cache - dirt on the display. - - The problem only affects LLC platforms (non-LLC would clflush anyway - after pwrite), but we can let the test run on all platforms. - - v2: Fix typos in commit message and add to .gitignore - - Signed-off-by: Ville Syrjälä - -commit ebab9f080b24ac11507e872fcfdf58ea9cb7e6fc -Author: Thomas Wood -Date: Thu Nov 13 11:47:19 2014 +0000 - - lib: only skip subsequent tests if a timeout occurs outside of a subtest - - Make timeout behaviour more consistent with igt_fail, where subsequent - subtests are only skipped if the failure occurs outside of a subtest. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718 - Signed-off-by: Thomas Wood - -commit f6aa80ca18f3dc5fe751c941fb1af6b4b44d21ef -Author: Thomas Wood -Date: Mon Nov 10 15:09:51 2014 +0000 - - tests/kms_flip: add a timeout for the nonblocking-read test - - kms_flip/nonblocking-read will block indefinitely if it fails, so - introduce a timeout to indicate test failure. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718 - Signed-off-by: Thomas Wood - -commit 34424138bcee87dc8e3c7555f28aa2642668e2e8 -Author: Thomas Wood -Date: Fri Nov 7 16:25:59 2014 +0000 - - lib/tests: add a test for igt_set_timeout - - Signed-off-by: Thomas Wood - -commit 6ee3337b28b3598da723099d43ae14fac96d06e5 -Author: Daniel Vetter -Date: Fri Nov 7 10:40:32 2014 +0100 - - tests/gem_exec_parse: Go OCD about C-style comments - - Cc: Brad Volkin - Signed-off-by: Daniel Vetter - -commit bf31ed80e097d6d69c436a5070f6ab6d0a5d08b6 -Author: Brad Volkin -Date: Mon Nov 3 11:19:00 2014 -0800 - - tests/gem_madvise: set execbuf.batch_len before doing an execbuf - - The command parser's batch_len optimization causes the parser to - reject this batch as not having an MI_BATCH_BUFFER_END because - the length was not set correctly. - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit c1fdc2f0e95714e20b157e318f07110219a2237f -Author: Brad Volkin -Date: Mon Nov 3 11:18:59 2014 -0800 - - tests/gem_exec_parse: fix batch_len setting for cmd-crossing-page - - The size of the batch buffer passed to the kernel is significantly - larger than the size of the batch buffer passed to the function. A - proposed optimization as part of the batch copy kernel series is to - use batch_len for the copy and parse operations, which leads to a - false "batch without MI_BATCH_BUFFER_END" failure for this test. - - To fix this, modify the test to set batch_start_offset and batch_len - such that they define the range of actual commands in the batch, - including a few of the surrounding nops for alignment purposes. - - v2: update batch_start_offset as well - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 4dd6e0edcf4fb2dd52fafa8b448ce87fafc4125d -Author: Thomas Wood -Date: Wed Nov 12 10:47:30 2014 +0000 - - configure: require automake 1.12 - - The check tests require AM_TESTS_ENVIRONMENT, which was added in - automake 1.12. - - Signed-off-by: Thomas Wood - -commit 10aacc73348f77c8ca01f02730710d8d23fb04de -Author: Thomas Wood -Date: Wed Nov 12 10:39:41 2014 +0000 - - tests: ensure the script based tests are included in the distribution - - TESTS_scripts was accidentally removed from EXTRA_DIST in commit 685e577 - (Move library selftests to lib/tests). - - Cc: Daniel Vetter - Signed-off-by: Thomas Wood - -commit 50d539efebbd71b4f5499e69d0768e69dceae09a -Author: Mika Kuoppala -Date: Fri Nov 7 15:33:34 2014 +0200 - - tests/gem_reset_stats: add defer-hangcheck test - - to see if one can fool hangcheck by keeping non hanging - ring busy - - v2: break from loop instead of return (Daniel Vetter) - - Cc: Chris Wilson - Signed-off-by: Mika Kuoppala - -commit c049c39f357295ecfc4d0795b5b3b1e35b04ac58 -Author: Thomas Wood -Date: Mon Nov 3 13:48:51 2014 +0000 - - tests: use igt_debugfs where possible - - Signed-off-by: Thomas Wood - -commit 4f689d52e7e6a511fb0de21ccc0b938d57ce6f41 -Author: Thomas Wood -Date: Thu Oct 30 15:54:44 2014 +0000 - - tests/drm_lib.sh: add a "--help-description" option - - Signed-off-by: Thomas Wood - -commit 895204fc6257f8ce2cae380f98cab4fd753251a1 -Author: Thomas Wood -Date: Thu Oct 30 15:54:02 2014 +0000 - - testdisplay: add a test description - - Signed-off-by: Thomas Wood - -commit 98188b4b416fe066f8d7c8ea18b4186c3381223b -Author: Thomas Wood -Date: Tue Oct 14 15:02:54 2014 +0100 - - docs: include descriptions for the test programs - - v2: fix various distcheck issues - - Signed-off-by: Thomas Wood - -commit e6fec38cf7151596d3f9ead99ea5386be7a7b6de -Author: Thomas Wood -Date: Tue Oct 14 13:46:57 2014 +0100 - - Build the docs directory last - - Ensure that other components are built before generating the - documentation. - - v2: build the docs directory after any optional directories - - Signed-off-by: Thomas Wood - -commit 3d0dca47c6fdec0720aca8016af9a889a0eb3409 -Author: Thomas Wood -Date: Mon Oct 13 11:40:12 2014 +0100 - - docs: add some test descriptions - - Signed-off-by: Thomas Wood - -commit f8b3c704af190fcf49f358ea1395ad8fb8b5b5cb -Author: Thomas Wood -Date: Fri Oct 10 16:56:20 2014 +0100 - - lib: add the ability to include a description with a test - - The IGT_TEST_DESCRIPTION macro can be used to define a description for a - test. - - v2: Remove semicolon from end of macro (Damien Lespiau) - Add API documentation for the macro. - - Signed-off-by: Thomas Wood - -commit c06016798cbd24c24283dbdb3ac2762834d04bcf -Author: Thomas Wood -Date: Fri Oct 31 15:45:09 2014 +0000 - - configure: fix issues when running outside the source tree - - Signed-off-by: Thomas Wood - -commit ce0d34d73d240a95193a4a6f82adfe5f4844bb66 -Author: Thomas Wood -Date: Fri Oct 31 15:00:03 2014 +0000 - - testdiplay: add a "--help" option - - Signed-off-by: Thomas Wood - -commit db425d69f62690a95048fde6d5dc515686bfa9ac -Author: Thomas Wood -Date: Fri Oct 31 12:32:22 2014 +0000 - - testdisplay: ensure invalid long option exit status is non-zero - - The optopt variable is not set if an invalid long option is used, so - check the current option character instead. - - Signed-off-by: Thomas Wood - -commit b441e6ac2ac98ee2f365683f339c8802d238043f -Author: Thomas Wood -Date: Fri Oct 31 11:45:16 2014 +0000 - - lib/tests: don't use hard error status to indicate test failure - - An exit status of 99 is reported separately in the test summary as an - error, rather than as a test failure. - - Signed-off-by: Thomas Wood - -commit 03a4ad16d17b201ba719bc48d2fb2de341a1cf2f -Author: Thomas Wood -Date: Fri Oct 31 11:38:02 2014 +0000 - - lib/tests: fix tests and test list location - - The igt_command_line.sh script was moved by commit 685e577 (Move library - selftests to lib/tests), but the location of the tests and the test - lists was not updated. - - Cc: Daniel Vetter - Signed-off-by: Thomas Wood - -commit 86bb6072a6e104e59ebbea2b41d4d86aeed134dc -Author: Thomas Wood -Date: Wed Nov 5 15:58:54 2014 +0000 - - tools/quick_dump: don't include generated sources in the distribution - - This also ensures that "make dist" works even if SWIG is not available. - - BUILT_SOURCES is not required because the files are already explicit - dependencies of other rules. - - v2: make sure SWIG is not invoked with the incorrect output filename - - Signed-off-by: Thomas Wood - -commit 2c44d6316a15170a5e2897488729f3d6868e0a1c -Author: Zhao Yakui -Date: Thu Nov 6 16:02:31 2014 +0800 - - Mediafill/skl: Remove redundant field to fix GPU hang - - After applying the commit(982f7eb238a0898c456e0574dee7c4507738d75f), the - OUT_RELOC is updated on Broadwell and later, which is to handle the - 64-bit field of gfx address internally. In such case some commands - should be fixed, otherwise GPU hang will be triggered when running - gem_media_fill. (It is already fixed on Broadwell) - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Damien Lespiau - -commit c68028936b83a316c7360fe2dc1276cf2424c116 -Author: Zhao Yakui -Date: Thu Nov 6 16:02:30 2014 +0800 - - Rendercopy/skl: Remove redundant field to fix GPU hang - - After applying the commit(982f7eb238a0898c456e0574dee7c4507738d75f), the - OUT_RELOC is updated on Broadwell and later, which is to handle the - 64-bit field of gfx address internally. In such case some commands - should be fixed, otherwise GPU hang will be triggered when running - rendercopy. (It is already fixed on Broadwell) - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Damien Lespiau - -commit e34240d4c18bfef1895fad6e8ce9cc80c844ac14 -Author: Brad Volkin -Date: Tue Nov 4 14:00:43 2014 -0800 - - tests/drv_hangman: skip a few asserts when using the cmd parser - - This test has a few checks that batch buffer addresses in the error - state match the expected address for the userspace supplied batch. - But the batch buffer copy piece of the command parser means that - the logged addresses are actually _supposed_ to be different. So - skip just those checks. - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit a973aabed04bb00686b9fd4ce4c1d83ad9b8b0e7 -Author: Chris Wilson -Date: Tue Nov 4 16:34:40 2014 +0000 - - tests: Remove spurious binaries from gem_tiled_wb commit - - commit c45216b26d223ffd7f68c5794870214445a64b5c - Author: Chris Wilson - Date: Tue Nov 4 07:30:57 2014 +0000 - - igt/gem_tiled_wb: Exercise CPU mmaps with swizzling - - brought along a few interlopers. - -commit 83757d7b393e61502fdf331f8239da8acc34213c -Author: Daniel Vetter -Date: Tue Nov 4 17:24:55 2014 +0100 - - tests/prime_nv_test: Skip cpu mmap testcase - - It's not implemented yet, so no point in running the test really. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68638 - Signed-off-by: Daniel Vetter - -commit fbc673023803b197453af3c7b985c941f654a8fb -Author: Chris Wilson -Date: Tue Nov 4 12:13:11 2014 +0000 - - igt/gem_tiled_wb: Remove extraneous mmap(wc) requirement - - Signed-off-by: Chris Wilson - -commit c45216b26d223ffd7f68c5794870214445a64b5c -Author: Chris Wilson -Date: Tue Nov 4 07:30:57 2014 +0000 - - igt/gem_tiled_wb: Exercise CPU mmaps with swizzling - - This exercises the the extended get_tiling ioctl in order to determine - proper swizzling for direct access to objects through WB. - Userspace cannot handle bit17 swizzling through wc mmaps (because bit17 - requires swizzling based on the actual physical address of the page - - which is unknown to userspace) and so we need an extended get_tiling - ioctl to report the actual as well as the logical swizzling on an - object. - - Signed-off-by: Chris Wilson - -commit 6fff1f8787687a08f66c28007abe1f1edebd5124 -Author: Chris Wilson -Date: Tue Nov 4 12:06:17 2014 +0000 - - ioctl_wrappers: Pass in offset to CPU mmaps - - Signed-off-by: Chris Wilson - -commit 676ccf862c4039f8e9cea8fb23bea053f9f5cf83 -Author: Chris Wilson -Date: Tue Nov 4 07:40:11 2014 +0000 - - igt/gem_linear_blits: Add sufficient RAM check - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85834 - Signed-off-by: Chris Wilson - -commit e6228509664190a24cb1c22ac597ace8f79ecdd7 -Author: Thomas Wood -Date: Wed Oct 29 12:26:09 2014 +0000 - - lib/igt_core.h: add debug messages for test requirements - - Signed-off-by: Thomas Wood - -commit d950f37be32a2bcf1a3da867bed3f9f397fb912d -Author: Thomas Wood -Date: Wed Oct 29 12:03:22 2014 +0000 - - lib/igt_core.h: fix igt_skip_on_f requirement message - - Signed-off-by: Thomas Wood - -commit 5a61421a02fe40a1dcf9f8575d5a5c136da3fdd4 -Author: Thomas Wood -Date: Wed Oct 29 17:20:52 2014 +0000 - - lib/tests: use the "check_" prefix for tests - - The "check_" prefix ensures the test programs are not installed and are - only built when "make check" is run. - - Signed-off-by: Thomas Wood - -commit b78d142a1583e850713474d8053bea643247b8af -Author: Thomas Wood -Date: Wed Oct 29 17:18:06 2014 +0000 - - build: fix distcheck - - Fix distcheck issues introduced by commit 685e577 (Move library - selftests to lib/tests). - - Cc: Daniel Vetter - Signed-off-by: Thomas Wood - -commit ab5f7eace1857e60b6432dcabde98089380e5e74 -Author: Thomas Wood -Date: Wed Oct 29 16:17:41 2014 +0000 - - lib: ensure the library is built before the tests - - This fixes the build problems introduced by commit 685e577 (Move library - selftests to lib/tests). - - Cc: Daniel Vetter - Signed-off-by: Thomas Wood - -commit ad5cb25d702d7c5faada1de6f9208114a189cab1 -Author: Gagandeep S Arora -Date: Sat Sep 13 01:26:04 2014 +0530 - - demos/intel_sprite_on: Added support to display all sprites. - - Extended intel_sprite_on functionality to display all the - available sprite planes on a particular connector. - - Signed-off-by: Gagandeep S Arora - Signed-off-by: Thomas Wood - -commit b6715d9aa7af22316c356d62a917bb034bab7c5f -Author: Daniel Vetter -Date: Wed Oct 29 13:31:15 2014 +0100 - - tests: Reenable testdisplay - - This seems to have been accidentally disabled in - - commit 982f7eb238a0898c456e0574dee7c4507738d75f - Author: Chris Wilson - Date: Fri Aug 29 15:19:57 2014 +0100 - - Prepare for 64bit relocation addresses - - Apparently no one noticed. - - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 97f33912555cd15915ce2b8637bdd05ea0632943 -Author: Daniel Vetter -Date: Wed Oct 29 13:28:55 2014 +0100 - - tests/testdisplay: Fix test status check fumble - - This is a regression from - - 4306538d1d3f60877866c39c9ca953cc5e541dae is the first bad commit - commit 4306538d1d3f60877866c39c9ca953cc5e541dae - Author: Daniel Vetter - AuthorDate: Thu Oct 2 11:18:20 2014 +0200 - Commit: Daniel Vetter - CommitDate: Thu Oct 2 11:34:55 2014 +0200 - - tests: Sprinkle missing igt_exit() where needed. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85582 - Signed-off-by: Daniel Vetter - -commit c15e6933bc5b9b224818ff43060cb0a436e24345 -Author: Daniel Vetter -Date: Tue Oct 28 10:54:32 2014 +0100 - - Add CONTRIBUTING file - - i-g-t has become a fairly big project with lots of people involved, so - lets document the basics and formalize the current process a bit. - - Also use this opportunity to announce Thomas Wood as igt maintainer - once more. - - v2: Recommend --subject-prefix="PATCH i-g-t" as suggested by Damien. - - v3: Clean out contributing-related information from README. - - Cc: Thomas Wood - Cc: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit 685e57736a2c5da2e955ffd2f0027e4b42e397f7 -Author: Daniel Vetter -Date: Mon Oct 27 15:08:50 2014 +0100 - - Move library selftests to lib/tests - - Again they're not really igt testcases so are in the way of - running spatch unconditionally. Move them someplace else. - - Signed-off-by: Daniel Vetter - -commit 9d6a2cacf6796c8e06e4b7432c5f795d4ee56d8b -Author: Daniel Vetter -Date: Mon Oct 27 14:51:55 2014 +0100 - - Move watermark code from tests to tools - - They're now igt tests, and so if you blindly run lib/igt.cocci with - spatch on tests/*c they get mangled. Move them away, but still keep - them as noinst targets. - - Signed-off-by: Daniel Vetter - -commit 15972aa8666781ad557f17ed4b5d689cdb657d78 -Author: Paulo Zanoni -Date: Fri Oct 24 17:40:04 2014 -0200 - - tests/pm_rpm: add system-suspend-{execbuf,modeset} subtests - - We were having a problem where the system-suspend test was passing, - but then the next test - gem-execbuf-stress - was failing because of - bugs caused by the suspend subtest. So add a single test that emulates - the same problem, and another test that just sets a mode after resume. - This way, we should be reproducing the problem even if you don't run - the tests in the order they are defined. - - Signed-off-by: Paulo Zanoni - -commit cba3088619745f509a10d1339db2cd279913e051 -Author: Damien Lespiau -Date: Wed Oct 15 23:13:30 2014 +0100 - - skl_ddb_allocation: Respect the minimum number of blocks - - Signed-off-by: Damien Lespiau - -commit 7296e09ee7f17e6d564e52cf64ee900670849429 -Author: Ville Syrjälä -Date: Tue May 27 21:33:10 2014 +0300 - - tests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURF - - Make sure DSPSURF will change during the panning operation - in flip-vs-panning-vs-hang. - - This will now test agains bugs between the kernel's mmio vs. - CS flip race handling and GPU resets. If the kernel is buggy - if will fail to notice that the panning operation changed the - base address before the GPU reset had a chance to deal with the - pending page flips, and so the flip would never complete due to - DSPSURFLIVE not matching the expected value. - - Signed-off-by: Ville Syrjälä - Signed-off-by: Daniel Vetter - -commit e497600fb73d138e51a641f7792f11822c20a929 -Author: Chris Wilson -Date: Fri Oct 24 07:40:04 2014 +0100 - - igt/gem_userptr_blits/dmabuf: Map the right pointer for !llc - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85354#c2 - Signed-off-by: Chris Wilson - -commit eae9f724f2335d8b44ef884e24b1590c3b0a3a33 -Author: Mika Kuoppala -Date: Mon Sep 15 13:01:31 2014 +0300 - - tests/gem_workarounds: adapt to constant wa list from driver - - Driver now returns the constant values that were set once - on ring initialization time. Extend the simple interface - check to all gens (i915_wa_registers needs to be present). - Due to delay when render context is visible on cpu side, - wait gpu to execute something on default context to get rid - of undeterministic behaviour by sometimes getting all ones. - - Cc: Arun Siluvery - Signed-off-by: Mika Kuoppala - -commit 8b556f7c8fc8b16fdeb7d23adb0e2fb54a8982fc -Author: Daniel Vetter -Date: Thu Oct 23 17:54:44 2014 +0200 - - tests/*: lib/igt.cocci found something! - - Signed-off-by: Daniel Vetter - -commit 47246981b2497f7a767506fec6f9993d4772183a -Author: Sonika Jindal -Date: Thu Oct 23 08:48:50 2014 -0700 - - kms_rotation_crc: Add test for cursor rotation (v2) - - v2: Slight rebasing onto latest i-g-t codebase (Matt). - - Signed-off-by: Sonika Jindal - Reviewed-by: Matt Roper - Signed-off-by: Matt Roper - Signed-off-by: Daniel Vetter - -commit 4f6a6cbdfff104cd2382c09909d89bbda010dc29 -Author: Mika Kuoppala -Date: Mon Oct 20 13:27:55 2014 +0300 - - lib: fix #define max - - Regression from: - - commit be4710a541b517b5f8663448bffed5656d59b47b - Author: Thomas Wood - Date: Fri Oct 10 11:20:35 2014 +0100 - - lib: add common min and max macros - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85218 - Tested-by: Guo Jinxian - Signed-off-by: Mika Kuoppala - -commit 18cb650318bb2c910f95d7c7df6625110ed1a590 -Author: Chris Wilson -Date: Thu Oct 23 07:55:54 2014 +0100 - - igt/gem_userptr_blits/dmabuf: Provide partial coverage on !llc platforms - - Without LLC, we cannot assume coherency between system RAM and the GTT. - If we try to use the GTT with snooped memory, the machine may lock up, - so the kernel prevents us from doing so, causing the test to fail. - However, we still do want to verify that we can access the userptr - through a dmabuf, so just check that we can make a copy from it using - the GPU and ignore the GTT cross-checking. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85354 - Signed-off-by: Chris Wilson - -commit ac2079596c0a8119f77d58ae3d5e3f8e13e5b96d -Author: Paulo Zanoni -Date: Tue Oct 21 11:45:59 2014 -0200 - - lib/igt_aux: move audio RPM code to igt_setup_runtime_pm() - - If we don't enable audio runtime PM, the audio driver won't release - its reference, the refcount won't ever become zero, so we will never - actually runtime suspend. So move this code from pm_rpm.c to - igt_aux.c, so kms_flip - and any other IGT test case using RPM - can - benefit from it. - - Previously, if you ran pm_rpm before running the other tests - or if - you just didn't have snd_hda_intel loaded - you wouldn't notice this - bug. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893 - Reviewed-by: Daniel Vetter - Signed-off-by: Paulo Zanoni - -commit a06071c0cf66f1a077563fb3ffa15856a57db18d -Author: Brad Volkin -Date: Wed Oct 15 14:52:42 2014 -0700 - - tests/gem_exec_parse: test for chained batch buffers - - libva makes extensive use of chained batch buffers. The batch - buffer copy portion of the command parser has the potential to - break chained batches, so add a simple test to make sure that - doesn't happen. - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit bba1cd0091b3e8e987f15dac1f38d233b5b0ee78 -Author: Paulo Zanoni -Date: Tue Oct 14 13:52:58 2014 -0300 - - tests/kms_cursor_crc: HSW/BDW only have square cursors - - When I look at cursor_size_ok() (from the Kernel's intel_display.c), I - see that only 845g and i865g support non-square cursors, so SKIP the - tests on HSW/BDW instead of failing them. - - This problem happened because support for non-square cursors was being - developed for HSW/BDW, but it ended up not being merged due to a small - problem and priority changes. Let's make those tests SKIP until we - have proper support on the Kernel: after that, we can revert this - patch. - - v2: Improve commit message. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84268 - Signed-off-by: Paulo Zanoni - -commit fc6d464a59ca33257b31ed8273681250a0807e9e -Author: Paulo Zanoni -Date: Tue Oct 14 16:01:10 2014 -0300 - - lib/igt_aux: make igt_wait_for_pm_status() resist the signal helper - - If the signal helper is active, the usleep() calls return earlier, and - we may end up returning false way before the 10s timeout, failing the - subtests. This currently happens on the kms_flip RPM interruptible - subtests. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893 - Signed-off-by: Paulo Zanoni - -commit 06de0e7f297d3f0e7747edea6252201ff43846b9 -Author: Thomas Wood -Date: Wed Oct 15 12:10:13 2014 +0100 - - tests/kms_force_connector: fix assertion when VGA is already connected - - Compare the number of modes available when the edid is reset with the - number before the edid was overridden. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82230 - Signed-off-by: Thomas Wood - -commit 1a0ae51f512860e89a7a5978d76a8c280e9324eb -Author: Thomas Wood -Date: Thu Oct 16 17:29:55 2014 +0100 - - tests: add a check for command line handling - - Check that command line handling works consistently across all tests. - - Signed-off-by: Thomas Wood - -commit d02ffe46bb89305a81d249ba75afe84835bbe70e -Author: Thomas Wood -Date: Thu Oct 16 16:35:44 2014 +0100 - - drm_lib.sh: add standard command line options - - Signed-off-by: Thomas Wood - -commit 48394471c58462fe3c245b27e730db7a8aedf29a -Author: Thomas Wood -Date: Thu Oct 16 14:23:24 2014 +0100 - - configure: include the skylake quick_dump files in EXTRA_DIST - - Signed-off-by: Thomas Wood - -commit d2595d765008ddc0cb6fa7ac4c8a4ecf45c6268e -Author: Thomas Wood -Date: Thu Oct 16 13:59:37 2014 +0100 - - quick_dump: fix distcheck - - Commit 711a17a (quick_dump: Move base_display.txt to indivual platforms) - renamed base_display.txt to common_display.txt, but didn't update - Makefile.am accordingly. Since common_display.txt is now included in the - platform files, it is automatically included in $(QUICK_DUMP_EXTRA_DIST) - and therefore just the reference to base_display.txt needs removing. - - Cc: Damien Lespiau - Signed-off-by: Thomas Wood - -commit be4710a541b517b5f8663448bffed5656d59b47b -Author: Thomas Wood -Date: Fri Oct 10 11:20:35 2014 +0100 - - lib: add common min and max macros - - Signed-off-by: Thomas Wood - -commit d4e3b6a0f5cd759182a53e2bc51a3d3f317a81f0 -Author: Thomas Wood -Date: Wed Oct 8 17:06:58 2014 +0100 - - lib: various documentation fixes - - Signed-off-by: Thomas Wood - -commit 303fe742fcdd7da6f03f948a4e41b529ee39613a -Author: Damien Lespiau -Date: Mon Oct 13 15:14:15 2014 +0100 - - skl_ddb_allocation: Make 'end' exclusive in the DDB allocation entry - - Ville suggested that we should use the same semantics as C arrays to - reduce the number of those pesky +1/-1 in the allocation code. - - Signed-off-by: Damien Lespiau - -commit f951943055f9af516d87f221076b6a690df1ee7a -Author: Damien Lespiau -Date: Mon Apr 28 07:11:04 2014 +0100 - - skl_ddb_allocation: Add checks on the DDB entries - - Signed-off-by: Damien Lespiau - -commit 69a465d22a9d06045f76621dfba46861adb6456c -Author: Damien Lespiau -Date: Mon Apr 28 05:56:31 2014 +0100 - - skl_ddb_allocation: Add a standalone version of the DDB allocator - - This is useful to debug the allocation algorithm. - - Signed-off-by: Damien Lespiau - -commit e11b7100c9c8d4e74a4d4439b1519ea50741fda5 -Author: Thomas Wood -Date: Thu Oct 9 16:44:12 2014 +0100 - - tests/kms_force_connect: skip if a VGA connector is not available - - v2: rename "connector" to "vga_connector" to improve the skip message - (Chris Wilson) - - Suggested-by: Paulo Zanoni - Signed-off-by: Thomas Wood - -commit 5209ec142dc1f5380c2c9d12c5b28d15b4311cdf -Author: Thomas Wood -Date: Thu Oct 9 16:29:20 2014 +0100 - - tests/kms_force_connector: ensure igt_exit is called at exit - - Since commit 5782eca (lib/igt_core.c: disable lowmemorykiller during - tests), igt_exit needs to be called before the test exits. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84771 - Cc: Tim Gore - Signed-off-by: Thomas Wood - -commit 5c7d54eae5cbf9fd74cd8bd755b90d0edb1283dc -Author: Rodrigo Vivi -Date: Tue Oct 14 10:19:13 2014 -0700 - - tests/pm_rc6_residency: Split RC6p and RC6pp. - - sysfs interface for rc6 has been changed to only expose deep RC6 file to the platorms - that really support them, aka SNB and IVB. - - So let's split this test and only test RC6p and RC6pp on these platforms. - - Reference: https://bugs.freedesktop.org/show_bug.cgi?id=84886 - Signed-off-by: Rodrigo Vivi - -commit e7abb635162a3729f5a86419420f0192b557fcde -Author: Paulo Zanoni -Date: Tue Oct 14 15:09:22 2014 -0300 - - tests/pm_rpm: use igt_assert_eq() on COMPARE() - - A few weeks ago we were hitting this assertion, and the _eq macro is - more useful when you're debugging. - - Signed-off-by: Paulo Zanoni - -commit 97715d5f0fad67da1d8e06db8f9d5a3c1d1aa51c -Author: Paulo Zanoni -Date: Tue Oct 14 14:59:36 2014 -0300 - - tests/pm_rpm: fix some compilation warnings - - warning: ignoring return value of ‘write’, declared with attribute - warn_unused_result [-Wunused-result] - - Signed-off-by: Paulo Zanoni - -commit 7308e3a92be0529eaff26bc488f86924db09b688 -Author: Paulo Zanoni -Date: Tue Oct 14 14:42:23 2014 -0300 - - tests/pm_rpm: reduce the number of rounds on the stress tests - - With the current Kernel, it takes more than 10 minutes to run - modeset-stress-extra-wait on BYT with eDP, and we don't really want - IGT subtests that take more than 10 minutes to run: QA reports them as - bugs. - - Since, as far as I remember, any of these RPM race condition bugs we - had could always be triggered with just 4-5 rounds of testing, let's - tune down the number of rounds we test: - - Before: - rounds = (--quick option used) ? 10 : 50; - - After: - rounds = (--quick option used) ? 10 : 40; - rounds = (wait_flags & WAIT_EXTRA) ? rounds / 2 : rounds; - - This should make all subtests be way above the 10m limit. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84897 - Signed-off-by: Paulo Zanoni - -commit 8aa7fdaee8afe569544ffd33f5c3ebac27d2da5b -Author: Chris Wilson -Date: Tue Oct 14 10:10:42 2014 +0100 - - igt/gem_bad_reloc: Handle real offset being 0 - - Signed-off-by: Chris Wilson - -commit cd5ed4529693c00863405fcf29d9b27d91f3fe28 -Author: Chris Wilson -Date: Tue Oct 14 09:27:40 2014 +0100 - - igt/gem_negative_reloc: Execute a BLT operation with a negative reloc - - Signed-off-by: Chris Wilson - -commit a0b5c6d2ee784a8ea49534050087b3c630a41bc4 -Author: Rodrigo Vivi -Date: Fri Oct 10 08:18:28 2014 -0700 - - Revert "tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc." - - This reverts - commit d92fbc23138b1014e8574daf29dbb06b8c81aa7a. - Author: Rodrigo Vivi - Date: Tue Sep 9 12:25:47 2014 -0400 - - tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc. - - Sink CRC is fixed on kernel to wait as many vblanks as needed. It was fixed b - commit ad9dc91b6e21266bfc6f466db4b95e10211f31ee - Author: Rodrigo Vivi - Date: Tue Sep 16 19:18:12 2014 -0400 - - drm/i915: Fix Sink CRC - - This this fix in place we don't need this extra 2 vblanks on test case itself - - Signed-off-by: Rodrigo Vivi - -commit 9c8ee51be25c6c27c97a6898a71bc7f79439f9dc -Author: Rodrigo Vivi -Date: Fri Oct 10 08:14:32 2014 -0700 - - Revert "tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc." - - This reverts - commit d190a1f9668680c7a429110c91f8faa27949b220. - Author: Rodrigo Vivi - Date: Wed Sep 3 21:26:29 2014 -0400 - - tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc. - - Sink CRC is fixed on kernel to wait as many vblanks as needed. It was fixed by: - commit ad9dc91b6e21266bfc6f466db4b95e10211f31ee - Author: Rodrigo Vivi - Date: Tue Sep 16 19:18:12 2014 -0400 - - drm/i915: Fix Sink CRC - - This this fix in place we don't need this extra 2 vblanks on test case itself. - - Signed-off-by: Rodrigo Vivi - -commit ca6b63f588183cc4ba19d54c2901e84491084692 -Author: Mika Kuoppala -Date: Fri Oct 10 16:59:00 2014 +0300 - - tools/null_state_gen: Add copyright notice to state output - - along with info about what generated it. - - Signed-off-by: Mika Kuoppala - -commit f246f1ed0c2f5eb0c0dc7d92b3d678ecdbf03539 -Author: Armin Reese -Date: Fri Sep 5 13:58:11 2014 -0700 - - tools/null_state_gen: Add GEN9 golden context batch buffer creation - - Modifications to 'null_state_gen' so it can generate GEN9 - golden context batch buffer source for SKL. - - v2: - rebased on top of gen8 changes (Mika) - - fixed state base address command size (Mika) - - base address size macro as pages (Mika) - - v3: - rebased on top of current master (Mika) - - removed obsolete #includes (Mika) - - added copyright (Mika) - - render and component packing added (Mika) - - Cc: Damien Lespiau - Cc: Armin Reese - Cc: Volkin, Bradley D - Reviewed-by: Volkin, Bradley D (v2) - Signed-off-by: Armin Reese (v1) - Signed-off-by: Mika Kuoppala - -commit 0e8ac72d5d608d82a91bb5232badfb872589ac14 -Author: Mika Kuoppala -Date: Mon Sep 8 10:49:59 2014 +0300 - - tools/null_state_gen: Add Gen8 golden state - - Previously we didn't have a clear understanding what is necessary - for a pipeline state to be properly initialized. So we had to improvise - and use a stripped out render copy. - - Now we have a more clear understanding so switch out render copy based - frankenstate to state we can call golden state. - - v2: - export intel_batch_state_offset - - add 3DSTATE_RASTER (Bradley Volkin) - - Cc: Volkin, Bradley D - Signed-off-by: Mika Kuoppala - -commit b69659c3f5ed285bd218350deeff52761aec3d10 -Author: Mika Kuoppala -Date: Mon Sep 8 10:41:38 2014 +0300 - - tools/null_state_gen: Add macro to emit commands with null state - - In null/golden context there are multiple state commands where - the actual state is always zero. For more compact batch representation - add a macro which just emits command and the rest of the state as zero. - - v2: - Be more verbose about length bias (Bradley Volkin) - - strip out unrelated state_offset declaration (Bradley Volkin) - - Cc: Volkin, Bradley D - Signed-off-by: Mika Kuoppala - -commit a1f847cba91b9e542e37bb80895d8f8909319dd3 -Author: Mika Kuoppala -Date: Thu Oct 9 18:39:05 2014 +0300 - - tools/null_state_gen: Limit the total state len to 4096 bytes - - Currently our kernel side buffer object is only one page. - Limit the amount of dwords to 1024 to enforce this. - - Signed-off-by: Mika Kuoppala - -commit b498d81f152760b2a58d53ac3acb5269f44a253d -Author: Mika Kuoppala -Date: Thu Oct 9 18:35:49 2014 +0300 - - tools/null_state_gen: Add more debug output - - Be more verbose about the state size we generate. - - Signed-off-by: Mika Kuoppala - -commit c283ead78c4cb5cd56d0a7e74ebc43970ff5741d -Author: Mika Kuoppala -Date: Thu Oct 9 19:10:48 2014 +0300 - - tools/null_state_gen: Add copyrights - - to files where they were missing. - - Signed-off-by: Mika Kuoppala - -commit b7d80d104758fb4c90723246aed943c0097c6156 -Author: Adam Sampson -Date: Tue Oct 7 17:41:18 2014 +0100 - - Don't use += to append to a shell variable. - - POSIX only requires "=" to be supported; "+=" works in bash but not in - dash. - - Signed-off-by: Adam Sampson - Signed-off-by: Thomas Wood - -commit 432a4b488110561bc4dc8a50665b60380fb50e04 -Author: Adam Sampson -Date: Tue Oct 7 17:41:17 2014 +0100 - - Use = rather than == in test. - - The POSIX standard only requires test to support "="; "==" works in bash - but not in dash. Other comparisons in configure.ac use "=" already. - - Signed-off-by: Adam Sampson - Signed-off-by: Thomas Wood - -commit c7551bf7ccee3ce52dc51b4684716c4b10b80604 -Author: Chris Wilson -Date: Wed Oct 8 10:44:06 2014 +0100 - - igt/kms_flip/nonblocking_read: Demonstrate that O_NONBLOCK is a myth - - Signed-off-by: Chris Wilson - -commit 7041edfd144035f987001bd4f4a367d403cad912 -Author: Damien Lespiau -Date: Wed Oct 8 10:25:48 2014 +0100 - - quick_dump: Drop common_display.txt from VLV/CHV - - Those registers are big core registers and weren't really relevant for - VLV/CHV. Drop them from the dump then. - - Suggested-by: Ville Syrjälä - Signed-off-by: Damien Lespiau - -commit 7f8228955f3f3eef42e6fc61f4fa95b37b36df75 -Author: Damien Lespiau -Date: Mon Oct 6 17:42:33 2014 +0100 - - quick_dump/skl: Make quick_dump SKL aware - - Signed-off-by: Damien Lespiau - -commit d0a412597b92208d13d640013a2b277bd22f6c11 -Author: Damien Lespiau -Date: Mon Oct 6 15:10:35 2014 +0100 - - quick_dump/skl: Add some display registers - - Signed-off-by: Damien Lespiau - -commit 711a17ac753161500c5901e9f4d85ad8906b2a8b -Author: Damien Lespiau -Date: Mon Oct 6 18:32:51 2014 +0100 - - quick_dump: Move base_display.txt to indivual platforms - - SKL will have a whole separate display regs file, so merge - base_display.txt into each platform file. - - Signed-off-by: Damien Lespiau - -commit 2faf5a8665bba9ab7ad64ac6aa8c13be8f176d7d -Author: Damien Lespiau -Date: Mon Oct 6 16:30:39 2014 +0100 - - quick-dump: Make quick dump link against libintel_tools - - Because quick-dump was only selecting a few files in lib/ and we move - stuff around and/or add new dependencies we were failing to provide the - necessary symbols to the shim library providing python bindings. And so - we had a run-time error: - - Traceback (most recent call last): - File "./tools/quick_dump/quick_dump.py", line 17, in - import chipset - File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset.py", line 28, in - _chipset = swig_import_helper() - File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset.py", line 24, in swig_import_helper - _mod = imp.load_module('_chipset', fp, pathname, description) - File "/usr/lib64/python3.3/imp.py", line 183, in load_module - return load_dynamic(name, filename, file) - ImportError: /home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/_chipset.so: undefined symbol: kmstest_pipe_name - - So, let's simplify maintainance and just link against the library we're - building and using elsewhere. - - Signed-off-by: Damien Lespiau - -commit d4c1bb7aab2d2d7ed3eb3225f937f55f591f1ae4 -Author: Damien Lespiau -Date: Mon Oct 6 16:49:05 2014 +0100 - - gem_wait: Use PRIu64 in format string - - ../../tests/gem_wait.c: In function ‘render_timeout’: - ../../tests/gem_wait.c:182:3: warning: format ‘%llu’ expects argument of type - ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] - - igt_info("Finished with %llu time remaining\n", timeout); - - Cc: Daniel Vetter - Signed-off-by: Damien Lespiau - -commit af79fce66d023b300f308ec78289c616c81037d3 -Author: Damien Lespiau -Date: Mon Oct 6 18:23:33 2014 +0100 - - overlay: Fix compilation warning when not having xrandr - - Signed-off-by: Damien Lespiau - -commit 6b964c93f7322ee6b27ad0c2a26280e17e56ec23 -Author: Damien Lespiau -Date: Mon Oct 6 18:19:58 2014 +0100 - - gem_seqno_wrap: Remove unused variable - - Signed-off-by: Damien Lespiau - -commit 5c0139c3046a390204c6339468b22779f76460b1 -Author: Daniel Vetter -Date: Mon Oct 6 08:32:49 2014 +0200 - - tests/gem_wait: Don't close drmfd in subtest - - I didn't notice this on the machine I developed it since the original - wait testcase fails there. Oops. - - Signed-off-by: Daniel Vetter - -commit 764772c3c8059a6a9d1a569d9c4bd180e11c4d33 -Author: Tim Gore -Date: Thu Oct 2 16:26:32 2014 +0100 - - lib/Android.mk: add define of IGT_DATADIR for igt_fb.c - - Since the igt_create_stereo_fb function moved into igt_fb.c - we need to add the definition of IGT_DATADIR in the Android - makefile in order to build the cairo dependent tests. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 4306538d1d3f60877866c39c9ca953cc5e541dae -Author: Daniel Vetter -Date: Thu Oct 2 11:18:20 2014 +0200 - - tests: Sprinkle missing igt_exit() where needed. - - Yay for breaking piles of tests. - - This regression has been introduced with - - commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce - Author: Tim Gore - Date: Wed Oct 1 13:25:20 2014 +0100 - - lib/igt_core.c: disable lowmemorykiller during tests - - Cc: Tim Gore - Signed-off-by: Daniel Vetter - -commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce -Author: Tim Gore -Date: Wed Oct 1 13:25:20 2014 +0100 - - lib/igt_core.c: disable lowmemorykiller during tests - - Several IGT tests cycle through a lot of GEM memory and - when running these tests on Android they tend to get - killed by the lowmemorykiller. The lowmemorykiller really - is not usefull in this context and is just preventing the - test from doing its job. This commit adds a function to - disable the lowmemorykiller by writing "9999" to its - oom adj parameter, which means it will never "select" - any process to kill. The normal linux oom killer is still - there to protect the kernel. - The low memory killer is disabled during the common - init function and then re-enabled by the exit handler. - To make this work for single tests the exit handler is now - installed in the common init function also so that it is - invoked for all tests. - This is just a hack to get round the fact that the i915 - driver uses the concept of purgeable memory which is not - understood by the lowmemorykiller. If this ever gets - fixed then this patch can be removed. - - Signed-off-by: Tim Gore - [danvet: A bit of polish (coding style, static and rename - check_igt_exit to common_exit_handler, drop the is_disabled check - since we only call this once now).] - Signed-off-by: Daniel Vetter - -commit 20c8eba84ce4f108b5a980fe7278da5853655c1d -Author: Daniel Vetter -Date: Wed Oct 1 12:12:43 2014 +0200 - - NEWS: Updates - - Signed-off-by: Daniel Vetter - -commit 711199b8ecb2fa07918e7061ff3b208efcaaa237 -Author: Daniel Vetter -Date: Tue Sep 30 18:44:15 2014 +0200 - - lib/aux: Print progress output at INFO level - - With the structured logging it makes more sense to tune this down a - bit. Also, this way it is consistent with Thomas Wood's new activity - indicator helper. - - Spotted while discussing Thomas' patch with him. - - v2: Thomas noticed that I've forgotten the fflush. Extract - igt_interactive_info for both igt_progress and igt_print_activity. - - v3: Interactive output should go to stderr. Also extract the "is this - a terminal" check. - - Cc: Thomas Wood - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 6a8d33c2bb81f071715864c2e563ac17ae4f9967 -Author: Thomas Wood -Date: Tue Sep 30 17:05:39 2014 +0100 - - lib: add a function to indicate activity - - Signed-off-by: Thomas Wood - -commit c2d5519906f3b7d75b4fbf14c61c5f54d9d75214 -Author: Thomas Wood -Date: Mon Sep 29 12:08:31 2014 +0100 - - tests/sysfs_l3_parity: fix warnings in test enumeration - - Source drm_lib.sh before skipping the test to ensure that subtest - enumeration is always handled correctly. - - Signed-off-by: Thomas Wood - -commit 756764a4e78ac8b6ea294924d272431f98f695ca -Author: Thomas Wood -Date: Fri Sep 26 15:16:21 2014 +0100 - - lib: ensure any buffers are flushed before fork - - Flush any buffers before forking to prevent duplicated output. - - Signed-off-by: Thomas Wood - -commit 519f377ddd6d43b7824f94f09eb3d3cabc39c6b9 -Author: Thomas Wood -Date: Fri Sep 26 14:24:52 2014 +0100 - - doc: various spelling and typo fixes - - Signed-off-by: Thomas Wood - -commit c256af5d448dcaef1d4100c2bdbe25656909197d -Author: Imre Deak -Date: Thu Sep 18 18:31:29 2014 +0300 - - test/kms, pm: use drm_open_any_master - - These tests require DRM master right, so make sure they have it from the - beginning. This gives an early indication if another DRM master is running - and makes the given test skip (with a proper explanation of the reason) - instead of exiting with error. - - Signed-off-by: Imre Deak - -commit bfda78cd33b6562306c8c42e83047149f2ff6984 -Author: Imre Deak -Date: Thu Sep 18 18:25:37 2014 +0300 - - tests/pm_rpm: factor out drm_open_any_master - - Signed-off-by: Imre Deak - -commit 781a0485aca871d6b0278afacea724b97f6f59c1 -Author: Xiang, Haihao -Date: Fri Apr 11 21:57:21 2014 +0800 - - lib/skl: Return the render copy and media fill functions - - Signed-off-by: Xiang, Haihao - [Ben: Reordered if tree] - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 20e9cf38b7c3aa0725eb282ecf446f0e9b4344ad -Author: Zhao Yakui -Date: Tue Feb 11 10:48:47 2014 +0800 - - mediafill/skl: Follow spec to configure media sampler DOP clock gating in PIPELINE_SELECTION - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit d2e4eb3619fa61013f7704f55d0516fb380ac49b -Author: Zhao Yakui -Date: Tue Feb 11 10:48:46 2014 +0800 - - mediafill/skl: Follow spec to configure FORCE_MEDIA_AWAKE in PIPELINE_SELECTION - - The FORCE_MEDIA_AWAKE bit is added for the PIPELINE_SELECTION command and - some instructions requires that the media enginee is awake. - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 54465b8ac5d97560a27f04683448ab74b466a89a -Author: Zhao Yakui -Date: Tue Feb 11 10:48:45 2014 +0800 - - mediafill/skl: Follow the spec to add pipeline_select mask - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 17371958dbe6de8a92bf3e0e98b37ddb12241c17 -Author: Zhao Yakui -Date: Tue Feb 11 10:48:44 2014 +0800 - - mediafill/skl: follow the spec to update STATE_BASE_ADDRESS command - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 31e94ad28b5fab3373e6c7bf10b7894ca89cfb0a -Author: Zhao Yakui -Date: Tue Feb 11 10:48:43 2014 +0800 - - mediafill/skl: Start the gen9 media_fill from the gen8 version - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 8dc95202c8c241c50f2e17d3734fc6cb004c076e -Author: Zhao Yakui -Date: Thu Jan 23 13:26:12 2014 +0800 - - assembler/skl: update the extdesc field for SEND instruction - - The send instruction on gen9 uses the 32bit immediate instead of 6bit immediate - for the extended message descriptors. And some bits of SEND instruction are defined - as the extdesc field. - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit d6ff0b3f1f78c16a2754454c6134a999affa7f4c -Author: Zhao Yakui -Date: Thu Jan 23 13:26:11 2014 +0800 - - assembler/skl: Add more cache agent for write(...) - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit e48666947df43814b89c4280e2c2208274628542 -Author: Zhao Yakui -Date: Thu Jan 23 13:26:10 2014 +0800 - - assembler/skl: update read(...) - - READ(...) is used for Render Target read and Media Block read. But there is no - sampler cache agent on gen9. At the same time two message types don't - share the same cache agent any more. So a parameter is needed for cache agent. - The 2th parameter of read(...) is not used for gen6/gen7/gen8. Hence it is - reused as cache agent for SKL as that on ILK. - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 504f5594e7f2e78ec828a3b30bbb749a3bc91472 -Author: Zhao Yakui -Date: Thu Jan 23 13:26:09 2014 +0800 - - assembler/skl: Redefine the cache agent type for some fixed functions - - The different cache agent type is defined for SKL although it still uses - the same function ID as the previous generations. - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 2149d6e5f8856f195236e9d414fbce880c81debf -Author: Damien Lespiau -Date: Tue Feb 5 12:10:44 2013 +0000 - - assembler/skl: Add gen 9 to the -g option - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit fe4e4c176c7d3ae9ba59d4a40f12f83a29b6151c -Author: Xiang, Haihao -Date: Fri Apr 11 21:57:20 2014 +0800 - - rendercopy/skl: Set the URB VS start address to 4 - - A value less than 4 might result in GPU hang on simulation - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 5b46cd335d8323c8b0c48c2c004f983605e25433 -Author: Zhao Yakui -Date: Wed Jan 22 09:37:26 2014 +0800 - - rendercopy/skl: Follow the spec to add the Pipeline selection mask - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 8e62f78999281ad4bc7b9981b127830d0d3796d9 -Author: Zhao Yakui -Date: Wed Jan 22 09:37:25 2014 +0800 - - rendercopy/skl: Emit 3DSTATE_WM_HZ_OP - - This is from that on BDW. Without it, the pixel pipeline can't work well. - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 833e47662436094646f8510e7f9e7b3edd3d6b89 -Author: Zhao Yakui -Date: Wed Jan 22 09:37:24 2014 +0800 - - rendercopy/skl: Fix the 3DSTATE_DS instruction length - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 7628268952c586120e879310e542556d6a387abe -Author: Zhao Yakui -Date: Wed Jan 22 09:37:23 2014 +0800 - - rendercopy/skl: Fix the STATE_BASE_ADDRESS instruction length - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit 77a9ed7da2ef28cd80da68a97c1f409bc7d5eacf -Author: Zhao Yakui -Date: Wed Jan 22 09:37:22 2014 +0800 - - rendercopy/skl: Set Instruction Buffer size Modify Enable to 1 - - This is ported from that on BDW. - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit e539e91cf5d1d127abc9652dd2213a1997e54fb3 -Author: Zhao Yakui -Date: Wed Jan 22 09:37:21 2014 +0800 - - rendercopy/skl: update instruction length - - This is ported from that on BDW. - - v2: Only bump the prefix when we need to program the instruction - differently with the previous generations. - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - Signed-off-by: Damien Lespiau - -commit f04bf00c0d4e3b19fea63ad1d0b959575baf43b5 -Author: Zhao Yakui -Date: Wed Jan 22 09:37:20 2014 +0800 - - rendercopy/skl: Pass the context to rendercopy function on SKL - - Reviewed-by: Damien Lespiau - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - -commit ecd659e000dc3165c33793b7da612863738dc1c5 -Author: Damien Lespiau -Date: Wed Feb 27 14:57:35 2013 +0000 - - rendercopy/skl: Update 3DSTATE_SBE - - SBE has now to be explicitely told which channels of which components - are used by the pixel shader. - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit e5b850cb340a7dde8e6907a6de28d0ba825d1cb2 -Author: Damien Lespiau -Date: Wed Feb 27 14:57:34 2013 +0000 - - rendercopy/skl: Set the 3DSTATE_VF state - - This is to ensure the "Component Packing Enable" bit is set to 0. - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit aa7f9cf881a50370cdf49c6210d8224c32943d24 -Author: Damien Lespiau -Date: Wed Feb 27 14:57:33 2013 +0000 - - rendercopy/skl: Start the gen9 rendercopy from the gen8 version - - v2 (Ben): Rebased on: - commit ea11d103e0617e33bce6f11328521d15b13422b0 - Author: Oscar Mateo - Date: Tue Nov 12 11:50:35 2013 +0000 - - build: list all test/tool/lib source files in their own Makefile.sources - - v3: (Ben): Rebased on the doc/API rework. Probably needs review - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit 334f657e981e2f2278d26516f0ebd559f2ebbfb7 -Author: Damien Lespiau -Date: Fri May 31 15:34:04 2013 +0100 - - list-workarounds/skl: Add Skylake to the list of valid platorms - - Signed-off-by: Damien Lespiau - -commit 4d95a1551b1606789650e43e9dfe0df128066b81 -Author: Damien Lespiau -Date: Thu Feb 14 15:32:36 2013 +0000 - - skl: initialize instdone bits for gen9 - - gen9 uses the same bits as gen8. - - Signed-off-by: Damien Lespiau - Reviewed-by: Jesse Barnes - Signed-off-by: Ben Widawsky - -commit 256831cd8832a39ffd5fbd38e561d31dcc4e8f96 -Author: Damien Lespiau -Date: Thu Feb 14 15:32:35 2013 +0000 - - skl: Add gen9 to intel_gen() - - Signed-off-by: Damien Lespiau - Reviewed-by: Jesse Barnes - Signed-off-by: Ben Widawsky - -commit 91ebcd0c54d365a633a7465a9d57f8c24c886af7 -Author: Damien Lespiau -Date: Fri Dec 6 16:07:22 2013 -0800 - - skl: Add SKL PCI ids - - v2: Update to the latest PCI ids - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit 0eaa18061bee4b4b0c182d112db189019f01f49a -Author: Daniel Vetter -Date: Mon Sep 29 14:50:57 2014 +0200 - - tests/gem_wait: argument validation tests - - Shockingly we don't check for 0 flags! - - Signed-off-by: Daniel Vetter - -commit e4753d2d96fbb88077e70820793137f45f02c9ba -Author: Daniel Vetter -Date: Mon Sep 29 14:42:33 2014 +0200 - - tests/gem_wait_render_timeout: Convert to subtests - - I want to add a bunch of api tests besides the functional - "render-timeout" testcase. - - Signed-off-by: Daniel Vetter - -commit 5da8b8db02df768ba560e7522f69106246a0590c -Author: Daniel Vetter -Date: Mon Sep 29 14:24:26 2014 +0200 - - tests/gem_wait_render_timeout: Drop local structs - - We're long past the point where libdrm has these. - - Signed-off-by: Daniel Vetter - -commit f33fa71481caa308f141797033cd2bc6479630fc -Author: Tim Gore -Date: Mon Sep 29 13:34:30 2014 +0100 - - lib/igt_core: make single/simple tests use igt_exit - - Currently tests that use igt_simple_main will simply call - "exit()" if they pass, making it difficult to ensure that - any required cleanup is done. At present this is not an - issue, but it will be when I submit a patch to turn off the - lowmemorykiller for all tests. - - Signed-off-by: Tim Gore - [danvet: Also update api docs.] - Signed-off-by: Daniel Vetter - -commit 32a0308e2da1ed5871e21ca81822fc0c8aa73f9e -Author: Damien Lespiau -Date: Fri Sep 26 16:48:02 2014 +0100 - - kms_cursor_crc: Remove two unused local variables - - Signed-off-by: Damien Lespiau - -commit f2775039b1d2f3c24876622e4528604496de8abc -Author: Chris Wilson -Date: Fri Sep 26 10:22:33 2014 +0100 - - igt/gem_userptr_blits: Test interruptible create-destroy - - In order to exercise https://bugs.freedesktop.org/show_bug.cgi?id=84207 - we need to interrupt the mmu_notifier_register with a signal. This is - likely to be quite difficult, but let's just try running the - create-destroy test in an interruptible loop for 5s. - - Signed-off-by: Chris Wilson - -commit 3e766b8255efb6c994e6501be2af44b4bdc4d191 -Author: Chris Wilson -Date: Fri Sep 26 07:55:49 2014 +0100 - - igt/gem_concurrent_blit: Only read back a few GTT values - - Due to the nature of the test, we can be reasonably sure that it is - either all copied or not. So we can sacrificing testing the entire - buffer for the expected value in order to speed up the test by only - testing along the diagonal. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84354 - Signed-off-by: Chris Wilson - -commit 3205a9167fca34db8eb177a9050faf1b4115e9fa -Author: Daniel Vetter -Date: Tue Sep 23 15:15:51 2014 +0200 - - tests/kms_psr_sink_crc: Use options - - Env variables are a bit more annoying since much harder to discover. - With options you can just see what they do with --help. - - Cc: Rodrigo Vivi - Reviewed-by: Rodrigo Vivi - Signed-off-by: Daniel Vetter - -commit 4b81e9ca7df84d3c8775ebf0332f7444cafe8e77 -Author: Chris Wilson -Date: Fri Sep 19 16:40:00 2014 +0100 - - igt/gem_reloc_vs_gpu: Fix reloc.presumed_offset value - - Since the last patched value does not match the presumed relocation - value we submit to the kernel, it occasionally makes mistakes. Also note - that the libdrm interface makes the same presumptive mistake, and would - easily be broken by a threaded environment. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77793 - Signed-off-by: Chris Wilson - -commit c3eca6f7d3a788eab0102c4a3ded606ec851a0b2 -Author: Daniel Vetter -Date: Fri Sep 19 09:31:52 2014 +0200 - - tests/drm_import_export: Add subtest for prime - - Cc: Rafal Sapala - Signed-off-by: Daniel Vetter - -commit a018d60f631443f09da0a2adffc7255a0687f0d8 -Author: Daniel Vetter -Date: Thu Sep 18 17:34:27 2014 +0200 - - tests: Add drm_import_export - - Multithreaded test to validate the (lack of) locking in the flink/open - code in libdrm-intel. Based on a testcase from Rafel Sapala. - - Cc: Rafal Sapala - Signed-off-by: Daniel Vetter - -commit 25c55d3fc26ec415e0ed290b7d3cda0e15209f66 -Author: Ville Syrjälä -Date: Fri Sep 12 18:03:25 2014 +0300 - - tests/kms_cursor_crc: Add basic non-square cursor testing - - To minimally verify that non-square cursors work on the platforms where - they're supported perform the tests first with WxH cursor and then - repeat with WxH/3 cursor. - - Signed-off-by: Ville Syrjälä - -commit 7b76754e0ee3b84e703f823dd89aa94d75c011e7 -Author: Ville Syrjälä -Date: Fri Sep 12 20:18:04 2014 +0300 - - lib: Add igt_plane_set_size() - - Allow tests to specify the plane size instead of assuming that the - entire FB will be scanned out. - - To keep the current tests working without having to sprinkle - igt_plane_set_size() calls all over the place, make - igt_plane_set_fb() reset the plane size to the FB size. - - Signed-off-by: Ville Syrjälä - -commit b4fe481d4f2ccebc125185a4c5cb652b71513723 -Author: Ville Syrjälä -Date: Thu Aug 28 16:52:53 2014 +0300 - - tools: Remove punit and nc reg read/write tools - - intel_iosf_sb_{read,write} provide the same functionality. - - intel_dpio_{read,write} are still left in place since they use a - ifferent opcode to do the register access. Need to verify if - both opcodes work. - - Signed-off-by: Ville Syrjälä - -commit b23329f08662e6d15220006cffa0344231b27b04 -Author: Ville Syrjälä -Date: Thu Aug 28 16:50:53 2014 +0300 - - toos/intel_iosf_sb: Add symbolic unit names - - Add a bunc of symbolic sideband unit names so that you don't have to go - trawling through the sideband HAS every time you want to poke at - something with the tool. You can still specify the port manually though - if you know them by heart already. - - Signed-off-by: Ville Syrjälä - -commit b39eb28c256ecdf4f60dab08dba4bbc36294a576 -Author: Ville Syrjälä -Date: Thu Aug 28 16:32:46 2014 +0300 - - tools: Allow iosf-sb utils to work on chv - - Unlike the kernel IS_VALLEYVIEW() doesn't cover chv in igt. Add the - appropriate IS_CHERRYVIEW() checks to the various sideband poking tools. - - Signed-off-by: Ville Syrjälä - -commit 50534460dd2034bd4cbdabd803fa2680cbc7b490 -Author: Rodrigo Vivi -Date: Wed Sep 17 10:35:55 2014 -0400 - - tools/intel_reg_dumper: Shows fences and rp debug regs on BDW+. - - v2: a more generic fix to cover current and future platforms (Damien). - - Reviewed-by: Damien Lespiau - Signed-off-by: Rodrigo Vivi - -commit 1244fc6b9bc56cdf1584e919230796082b93f371 -Author: Chris Wilson -Date: Tue Sep 16 08:17:00 2014 +0100 - - igt/pm_rps: Fix STORE_DWORD for pre-gen8 - - gen8 actually changed the command layout, not just extended the - relocation value. Oh well. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=83915 - Signed-off-by: Chris Wilson - -commit 137877f16b7d026fa1bc17797604e17de2af7e92 -Author: Daniel Vetter -Date: Tue Sep 9 11:43:10 2014 +0200 - - NEWS: New heading for 1.9 - - Should be done post-release. - - Cc: Rodrigo Vivi - Cc: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 4779655c6f9c8c6c4599fd39cdff1f66d0f373b3 -Author: Chris Wilson -Date: Fri Sep 12 11:09:41 2014 +0100 - - lib: Try harder to drop-caches - - If at first we don't succeed, try again. (For as long as the errno says - to at least!) - - Signed-off-by: Chris Wilson - -commit f81d8eba4fb4448e6ea777aa2072c3b9f277e7cb -Author: Chris Wilson -Date: Fri Sep 12 09:11:55 2014 +0100 - - igt/kms_render: Iterate only through the formats - - When testing each format, iterate through the formats and not randomly - through the modes. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83788 - Signed-off-by: Chris Wilson - -commit 855dc6284d97931dbe59725cfc7b0b160b0a37b2 -Author: Chris Wilson -Date: Fri Sep 12 09:08:41 2014 +0100 - - igt/gem_userptr_blits: GTT mmaping a userptr requires llc - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83790 - Signed-off-by: Chris Wilson - -commit 3a1751ef34c32c5d288a328d855bec49ad0eaf9f -Author: Chris Wilson -Date: Fri Sep 12 06:46:28 2014 +0100 - - igt/pm_rps: Fix the batch count for emitting the flush - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81858#c2 - Signed-off-by: Chris Wilson - -commit 62f4d56676468cc6b7e1fb900ccf120d68352f65 -Author: Rodrigo Vivi -Date: Tue Sep 9 19:04:48 2014 -0400 - - tests: Kill pm_psr - - kms_psr_sink_crc check psr activity, residency and exit for screen updates. - So this test is useless. - - Signed-off-by: Rodrigo Vivi - -commit d190a1f9668680c7a429110c91f8faa27949b220 -Author: Rodrigo Vivi -Date: Wed Sep 3 21:26:29 2014 -0400 - - tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc. - - Signed-off-by: Rodrigo Vivi - -commit 1447d83e8ecc0689be2b3e933d1d21b042474ea7 -Author: Rodrigo Vivi -Date: Wed Sep 3 18:18:15 2014 -0400 - - tests/kms_psr_sink_crc: Fix blt submission - - Putting back a missing dword. - - Signed-off-by: Rodrigo Vivi - -commit 25aa69d0a00435432f85ee86b30a2981411fbbbb -Author: Rodrigo Vivi -Date: Tue Sep 9 13:10:51 2014 -0400 - - tests/kms_psr_sink_crc: Check color ref CRC - - Black screen is forbidden on this test. So let's fail if sink crc shows - it is back. - - Also there are many cases where we know for shure it should be all green, - so let's check for them. - - Instead of checking colors we could print with sw using cairo and check if we - have identical crc like cursor testcases. However with PSR the chance of artifacts - is low and chance of getting blank screen or unchanged screen is high. So even drawing - on sw and comparing both CRCs we can have the same result. However the risk is that - screen never changed. So the safest way is to compare if screen changed and check - the green color when we know it should be green or not green. - - v2: Hardcoded green was simply wrong because green CRC can change depending - on display.Split R, G and B on CRC and bitewise them with mask to verify - it is green. - - Signed-off-by: Rodrigo Vivi - -commit d4e6a5197002b51644bc01d4f7926c4b4d726933 -Author: Rodrigo Vivi -Date: Fri Aug 29 19:12:54 2014 -0400 - - tests/kms_psr_sink_crc: Fix all testcases. - - In order to get all test cases fixed and the matrix planes-operations working - it was needed to use the common new igt kms functions for all cases. - Previously only sprite testcase was using it. - - Fixed the fb colors in a way to make tests more clear and be impossible to see - black screen during the tests. - - Signed-off-by: Rodrigo Vivi - -commit 99efdc0cdbeeb9f1695c668c673c31957d78954b -Author: Rodrigo Vivi -Date: Tue Sep 9 17:58:45 2014 -0400 - - tests/kms_psr_sink_crc: Start splitting tests in test_planes and operations. - - This will allow us to test input/write oprations on any kind of plane. - - At this point PLANE_ONOF is just the new name of TEST_SPRITE and - PLANE_MOVE is the one for TEST_CURSOR_MOVE. They will be extended and fixed - on the following patche(s). - - v2: fix conflict after changing previous patch - - Signed-off-by: Rodrigo Vivi - -commit 52b0e78a94ebcb8761dd7d0eadb8deaab8abedf4 -Author: Rodrigo Vivi -Date: Fri Aug 29 18:19:55 2014 -0400 - - tests/kms_psr_sink_crc: Cleaning up tests a bit - - This is needed to be able to split tests in a matrix that tests different - input/write methods and operations for different type of planes. - - Signed-off-by: Rodrigo Vivi - -commit fb004a6b029d2338aef869a1f25b9925688d3106 -Author: Rodrigo Vivi -Date: Wed Sep 3 17:53:35 2014 -0400 - - tests/kms_psr_sink_crc: Removing context tests. - - This tests are unecessary. Mainly now with the software tracking for PSR. - - Signed-off-by: Rodrigo Vivi - -commit 1ab044518a22ac0c44067de9f90f4a828c2f7482 -Author: Rodrigo Vivi -Date: Fri Aug 29 17:58:31 2014 -0400 - - tests/kms_psr_sink_crc: Adding test debug options - - Just to make life easier and be eable to easily test with - PSR disabled to know exactly what to expect when running it - for real - - v3: Use igt_debug helpers and add env option for running with psr disabled - on this test without have to recompile like v1 or changing igt infrastructure like v2. - I tried to add --disable-psr or local --dry-run but than it fails to print subtests - so this was the safest way. - - Signed-off-by: Rodrigo Vivi - -commit e90847f57a0446130b92c9c638da6299f37639b5 -Author: Rodrigo Vivi -Date: Fri Aug 22 09:37:08 2014 -0700 - - tests/kms_psr_sink_crc: Fix edp_psr debugfs interface - - Tests were broken on platforms that doesn't have psr or on new kernel that contains new interface. - A lot more need to be done to get these tests really useful, but for now lets avoid it breaking - tests framework. - - v2: Doesn't duplicate kernel's HAS_PSR. skip based on debugfs output. - - Signed-off-by: Rodrigo Vivi - -commit d92fbc23138b1014e8574daf29dbb06b8c81aa7a -Author: Rodrigo Vivi -Date: Tue Sep 9 12:25:47 2014 -0400 - - tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc. - - Signed-off-by: Rodrigo Vivi - -commit 1d7b062621fa291d3412f47265d0ba603b65cc96 -Author: Rodrigo Vivi -Date: Wed Sep 3 19:01:08 2014 -0400 - - tests/kms_sink_crc_basic: Simplify test by using igt_kms functions - - v2: sink CRC R, G and B might change depending on display. So let's split the - colors and bitwise them. - - Signed-off-by: Rodrigo Vivi - -commit 107151ce9f82955191a7fd6a2e6bfd5ff8cc5aea -Author: Chris Wilson -Date: Tue Sep 9 16:27:57 2014 +0100 - - igt/gem_ppgtt: Create secondary contexts and mm - - Signed-off-by: Chris Wilson - -commit 961578f47133d7310e9531d31e7ea5e743ed6b50 -Author: Chris Wilson -Date: Tue Sep 9 14:17:08 2014 +0100 - - test: Exercise full ppgtt switching between multiple fd - - Load up both rings with lots of fighting between multiple contexts. - - Signed-off-by: Chris Wilson - -commit d9d3f4b0d23a7ea2147f33ab40558edd6128f3ac -Author: Rodrigo Vivi -Date: Mon Sep 8 22:43:46 2014 -0400 - - bump version to 1.8 and add the release date - - Signed-off-by: Rodrigo Vivi - -commit cdf0ea825ec529fe4f9e63d503da11d0a3cdee1c -Author: Chris Wilson -Date: Mon Sep 8 12:52:31 2014 +0100 - - igt/gem_cpu_reloc: Terminate the bad batch - - gen2 will read the batch up until it reaches the end as defined by the - MI_BATCH_BUFFER_END command. Play nice and make sure that it does end on a - MI_BB_END. - - Signed-off-by: Chris Wilson - -commit be6bb4ce4a413df5ec385523313a4e2a3894d4c8 -Author: Chris Wilson -Date: Sun Sep 7 15:52:10 2014 +0100 - - igt/kms_flip_tiling: Use the associated pipe for the output - - This stops us from using an illegal pipe, such as pipe 0 for LVDS on - PNV. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82280 - Signed-off-by: Chris Wilson - -commit b76f1d8b03aa506624a8a9d7fab915758bd0dec5 -Author: Chris Wilson -Date: Mon Sep 8 10:28:41 2014 +0100 - - igt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLC - - Signed-off-by: Chris Wilson - -commit ac3d06094a635bfeb0c6d6752f7f7bfbc21ecf2a -Author: Chris Wilson -Date: Sat Sep 6 18:14:35 2014 +0100 - - igt/kms_universal_plane: Only test existing planes - - Only attempt to test the number of planes that exist on the device so as - not to trigger spurious failures. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82233 - Signed-off-by: Chris Wilson - -commit 5eeb1f34d4bd16ef22e9252e876dd93c28c73b3c -Author: Chris Wilson -Date: Sat Sep 6 17:25:01 2014 +0100 - - igt/drv_missed_irq_hang: Increase busy load - - The test relies on having to wait upon the GPU at some point and so - simulating a missed interrupt. If there is insufficient load on the GPU, - we can complete the task before we even wait. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=71334 - Signed-off-by: Chris Wilson - -commit d35cc3ea8c0023eb8aadf3e946b1c759c6e29b3a -Author: Chris Wilson -Date: Sat Sep 6 12:41:28 2014 +0100 - - aux: Squelch warning when emitting progress indicator - - commit 1649ef0d1f5c0e4f995a437bd24f1574a8b5100f - Author: Daniel Vetter - Date: Tue Aug 26 15:26:21 2014 +0200 - - lib/igt_* Use igt macros in igt libaries - - went a little too far here as the replacement macro was too clever. - - Signed-off-by: Chris Wilson - -commit fb9c9e3adcc18b137b8931bc4f6fb05ca4d19863 -Author: Chris Wilson -Date: Sat Sep 6 12:21:25 2014 +0100 - - core: Prettify igt_require_f output - - Signed-off-by: Chris Wilson - -commit 9df77d566409fcef90c7ea63bb6d3df8d8c76dde -Author: Chris Wilson -Date: Sat Sep 6 12:08:13 2014 +0100 - - lib/igt_fb: Ignore RGB888 - - None of our display hardware supports the packed 24-bit format, so stop - trying to use it and causing test failures. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78873&list_id=465068 - Signed-off-by: Chris Wilson - -commit db4cc747fac2692d3b947992384d21a253e2a264 -Author: Chris Wilson -Date: Sat Sep 6 12:07:49 2014 +0100 - - lib/igt_fb: Add debug output for creating fb - - Signed-off-by: Chris Wilson - -commit 91a432721c2b16aa6610bd9c89bbee7763552f77 -Author: Chris Wilson -Date: Sat Sep 6 08:40:04 2014 +0100 - - core: Display subtest walltime - - Signed-off-by: Chris Wilson - -commit f675f6771b1a3eaca6981ad78d2f1521f379347a -Author: Thomas Wood -Date: Thu Sep 4 11:35:01 2014 +0100 - - lib: keep a list of modified connectors to reset - - Avoid calling functions in igt_reset_connectors that are not safe to use - in signal handlers by keeping a list of connectors that have been - modified, instead of enumerating all connectors. - - v2: add space for a sentinel NULL value on forced_connectors and print a - warning when the connector limit is reached (Chris Wilson) - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83498 - Cc: Paulo Zanoni - Signed-off-by: Thomas Wood - -commit 48da0e69adbf086c560a4e3175a16b85a1662bbd -Author: Thomas Wood -Date: Thu Sep 4 17:00:16 2014 +0100 - - tests/kms_3d: skip if connectors cannot be forced - - Signed-off-by: Thomas Wood - -commit d3c83b203372a00f846a3858711aae7ba290d570 -Author: Thomas Wood -Date: Thu Sep 4 16:56:17 2014 +0100 - - lib: don't force HDMI or DP connectors on HSW and BDW - - Forcing HDMI or DP connectors on these platforms doesn't currently work, - so fail early to allow the test to skip if required. - - v2: restrict to HSW and BDW (Daniel Vetter) - - Signed-off-by: Thomas Wood - -commit 3aac97107ed386885cfb78f16e0c15a1042fe8cc -Author: Thomas Wood -Date: Fri Aug 29 17:54:10 2014 +0100 - - lib/igt_fb: ensure igt_create_fb parameters are consistent - - Make sure the parameters in the prototype and implementation of - igt_create_fb match and are complete so that the documentation is - correct. - - Signed-off-by: Thomas Wood - -commit 5303ce8076b03a02f891090367d2abc53f9588b7 -Author: Thomas Wood -Date: Wed Aug 20 11:13:34 2014 +0100 - - tests: add kms_3d test - - Add a test to verify creation and use of 3D stereo modes. - - v2: update for API changes - - Signed-off-by: Thomas Wood - -commit 4cb194669782d759e60bad3fa61e3efc0ee7c7ec -Author: Thomas Wood -Date: Mon Aug 4 16:14:51 2014 +0100 - - lib: move create_stereo_fb from testdisplay to igt_fb - - Move create_stereo_fb from testdisplay to igt_create_stereo_fb in igt_fb - so that it can be used in other tests. - - v2: update for new igt_create_fb API - add parameters for format and tiling - remove some old debug code - - Signed-off-by: Thomas Wood - -commit a124b1a430bf47f31fcff0614dbc00dbe2794dcf -Author: Thomas Wood -Date: Wed Jul 30 11:10:49 2014 +0100 - - lib: add kmstest_edid_add_3d - - kmstest_edid_add_3d adds an EDID extension block with 3D support to a - copy of the specified EDID. - - v2: Avoid using an invalid CEC SPA (Clint Taylor) - - Signed-off-by: Thomas Wood - -commit 4a604dee6003d3c377a2984ce288f7e9b8fdf85b -Author: Mika Kuoppala -Date: Fri Aug 1 21:19:56 2014 +0300 - - tools/null_state_gen: build cmd and state space separately - - Instead of building batch directly to memory, build into cmd and - state arrays. This representation allows us more flexibility in batch - state expression and batch generation/relocation. - - As a bonus, we can also attach the line information that produced the - batch data to help debugging. - - There is no change in the output states produced. This can be considered - as a preparatory patch to help introduce gen8 golden state. - - Signed-off-by: Mika Kuoppala - -commit b77145dd489ef4e05799aa734927b9f9e77710d2 -Author: Mika Kuoppala -Date: Fri Aug 1 21:19:55 2014 +0300 - - lib: Add MI_LOAD_REGISTER_IMM - - Signed-off-by: Mika Kuoppala - -commit c5ad1c329564cdfc4b99596e5d02f5b6b16edea2 -Author: Mika Kuoppala -Date: Fri Aug 1 21:19:54 2014 +0300 - - lib/gen6_render: fix GEN6_3DSTATE_VF_STATISTICS define - - We dont use this pre CTG and we will need it for gen8 golden state. - - Signed-off-by: Mika Kuoppala - -commit f0023fa8f54a9f7f8b65699b08f2692093f101dd -Author: Mika Kuoppala -Date: Fri Aug 1 21:19:53 2014 +0300 - - lib/rendercopy: fix a typo in define - - No functional changes - - Signed-off-by: Mika Kuoppala - -commit ba614bea44d2a1661312a8465791d9e844e55f8b -Author: Mika Kuoppala -Date: Fri Aug 1 21:19:52 2014 +0300 - - tools/null_state_gen: terminate relocs with -1 - - as this was already changed in kernel. - - Signed-off-by: Mika Kuoppala - -commit c49542af073687a5dc66eaef19c31eeaf5766a86 -Author: Daniel Vetter -Date: Fri Sep 5 08:51:27 2014 +0200 - - lib/igt_aux: Improve wait_for_keypress helper a bit - - - Use keys in just one env variable to enable/disable it. - - Add an informational message so that the users knows when to press - the key (more useful over ssh than when run on the terminal ofc). - - Improve the documentation so that it's clearer how to use this - when running tests. - - Cc: Rodrigo Vivi - Cc: Damien Lespiau - Acked-by: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit a16ebccaee426ef96b0894e3af733360d88ce4d7 -Author: Paulo Zanoni -Date: Wed Sep 3 14:47:21 2014 -0300 - - igt_core: zero exit_handler_count before forking - - If we don't reset exit_handler_count before forking, we may have a - case where the forked process is killed before it even does - "exit_handler_count = 0": in that case, it is still finishing forking. - When that happens, we may end up calling our exit handlers. On the - specific bug I'm investigating, we call igt_reset_connnectors(), which - ends up in a deadlock inside malloc_atfork. If we attach gdb to the - forked process and get a backtrace, we have: - - (gdb) bt - 0 __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95 - 1 0x00007f15634d36bf in _L_lock_10524 () from /lib/x86_64-linux-gnu/libc.so.6 - 2 0x00007f15634d12ef in malloc_atfork (sz=139729840351352, caller=) at arena.c:181 - 3 0x00007f15640466a1 in drmMalloc () from /usr/lib/x86_64-linux-gnu/libdrm.so.2 - 4 0x00007f1564049ad7 in drmModeGetResources () from /usr/lib/x86_64-linux-gnu/libdrm.so.2 - 5 0x0000000000408f84 in igt_reset_connectors () at igt_kms.c:1656 - 6 0x00000000004092dc in call_exit_handlers (sig=15) at igt_core.c:1130 - 7 fatal_sig_handler (sig=15) at igt_core.c:1154 - 8 - 9 0x00007f15634cce60 in ptmalloc_unlock_all2 () at arena.c:298 - 10 0x00007f156350ca3f in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:188 - 11 0x000000000040a029 in __igt_fork_helper (proc=proc@entry=0x610fc4 ) at igt_core.c:910 - 12 0x000000000040459d in igt_fork_signal_helper () at igt_aux.c:110 - 13 0x0000000000402ab7 in __real_main63 () at bug.c:76 - 14 0x000000000040296e in main (argc=, argv=) at bug.c:63 - - After doing some searches for "stuck at malloc_atfork", it seems to me - we probably shouldn't be doing any malloc calls at this point of the - code, so the best way to do that is to make sure we can't really run - the exit handlers. - - So on this patch, instead of resetting the exit handlers after - forking, we reset them before forking, and then restore the original - value on the parent process. - - I can reproduce this problem by running "./kms_flip --run-subtest - 2x-flip-vs-modeset" under an infinite loop. Usually after a few - hundred calls, we end up stuck on the deadlock mentioned above. QA - says this problem happens every time, but I'm not sure what is the - difference between our environments that makes the race condition so - much easier for them. - - The kms_flip.c problem can be considered a regression introduced by: - commit eef768f283466b6d7cb3f08381f72ccf3951dc99 - Author: Thomas Wood - Date: Wed Jun 18 14:28:43 2014 +0100 - tests: enable extra connectors in kms_flip and kms_pipe_crc_basic - - even though this commit is not the one that introduced the real - problem. - - It is also possible to reproduce this problem with a few modifications - to template.c: - - Add a call to igt_enable_connectors() inside the first fixture. - - Add igt_fork_signal_helper() and igt_stop_signal_helper() calls - around subtest B. - - Note that the crucial piece is that the parent actively kills helper - children, and if we skip tests this can happen _really_ fast. See e.g. - - commit a031a1bf93b828585e7147f06145fc5030814547 - Author: Daniel Vetter - Date: Fri Sep 13 16:43:22 2013 +0200 - - lib/drmtest: ducttape over fork race - - for past hilarity in this area. - - Cc: Thomas Wood - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81367 - Signed-off-by: Paulo Zanoni - Signed-off-by: Daniel Vetter - -commit 081887504a72878fc5f54778af68ebd9404b4e04 -Author: Chris Wilson -Date: Wed Sep 3 13:38:30 2014 +0100 - - igt/gem_concurrent_blit: Move igt_require() out of children - - Otherwise the test infrastructure throws a fit. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83420 - Signed-off-by: Chris Wilson - -commit 3309f54e8f15d2d82544b00abff2215f50ca27b2 -Author: Chris Wilson -Date: Sat Jul 26 11:42:20 2014 +0100 - - igt/gem_gtt_hog: Convert opencoded fork()/wait() over to igt_fork() - - No reason not to use the common infrastructure here. - - Signed-off-by: Chris Wilson - -commit a54faca98717eda0e192139bd72f110bd5a98c90 -Author: Daniel Vetter -Date: Wed Sep 3 12:51:33 2014 +0200 - - NEWS: Updates in anticipation of the next release - - Signed-off-by: Daniel Vetter - -commit 4bff3ee012a05b92b5779a0cb8e74a575f74a878 -Author: Damien Lespiau -Date: Sat Aug 30 22:46:41 2014 +0100 - - gem_workarounds: intel_wa_registers is now prefixed with i915 - - Signed-off-by: Damien Lespiau - Reviewed-by: Arun Siluvery - Signed-off-by: Daniel Vetter - -commit f473a5543eb601473e2b23e6ff7bff0f468bd3d0 -Author: Chris Wilson -Date: Mon Sep 1 07:23:30 2014 +0100 - - rendercopy/gen8: Fix vertex buffer relocation - - I was thrown by the routine calling itself gen7 when in it gen8 specific - and required 64bit relocation fixes. - - Signed-off-by: Chris Wilson - -commit c12f292b1d8bbc61b65f1dfc3fd4a9e1e286dbee -Author: Chris Wilson -Date: Sun Aug 31 16:14:40 2014 +0100 - - igt/gem_concurrent_blit: Use the preallocated dummy bo for temporary copies - - Use the existing allocation, saves having to make fresh allocations in - the innermost loop - trimming code and potential failure paths. - - Signed-off-by: Chris Wilson - -commit d6af0043bdde1413a3ccdc4e82d3f5b95b3ae271 -Author: Chris Wilson -Date: Sat Aug 30 14:48:36 2014 +0100 - - batch: Fix typo in BLIT_BATCH_BEGIN - - Signed-off-by: Chris Wilson - -commit 10552b5ca6c193e0c696e96c9f5e0d6142f4d8ee -Author: Chris Wilson -Date: Sat Aug 30 11:44:51 2014 +0100 - - batch: Specify number of relocations to accommodate - - Since relocations are variable size, depending upon generation, it is - easier to handle the resizing of the batch request inside the - BEGIN_BATCH macro. This still leaves us with having to resize commands - in a few places - which still need adaption for gen8+. - - Signed-off-by: Chris Wilson - -commit 255bade1ea98e642fe6d01c9dee8d5e8661bd816 -Author: Chris Wilson -Date: Fri Aug 29 21:25:14 2014 +0100 - - igt/gem_seqno_wrap: Use debugfs singleton - - This has the added advantage of automounting debugfs for us. - - Signed-off-by: Chris Wilson - -commit 982f7eb238a0898c456e0574dee7c4507738d75f -Author: Chris Wilson -Date: Fri Aug 29 15:19:57 2014 +0100 - - Prepare for 64bit relocation addresses - - This reveal that quite a few locations were writing relocation offsets - but only allowing for 32 bit addresses. To reveal such places in active - tests, we also now double check that we do not use more batch space than - declared. - - Signed-off-by: Chris Wilson - -commit 86055df9682948ef26b06b94a3856676d638e2fb -Author: Chris Wilson -Date: Fri Aug 29 17:36:29 2014 +0100 - - igt/gem_concurrent_blit: Apply some fence pressure as well - - As before, we also want to race against access through the fence - registers. This overlaps slightly with gem_set_tiling_vs_blt, but the - different access pattern should make it useful. - - Signed-off-by: Chris Wilson - -commit d28b9d27bf6c1c5e0dae591985442a25bbecab86 -Author: Chris Wilson -Date: Fri Aug 29 17:30:40 2014 +0100 - - igt: Tweak the igt_assert_cmpint macro - - Minor tweak to embed the constant format string rather than passing it - to the vararg printf. - - Signed-off-by: Chris Wilson - -commit fbfa754e8dce1553e024310eb7b7ed9469ed238b -Author: Chris Wilson -Date: Fri Aug 29 19:28:34 2014 +0100 - - lib/batchbuffer: Guard intel_blt_copy with even more asserts - - Assert that the source/destination bounds are within the pitch and size - of the associated bo. - - Signed-off-by: Chris Wilson - -commit 23d961e950e92bb00c7cb29fa73499af568e7571 -Author: Chris Wilson -Date: Fri Aug 29 14:49:59 2014 +0100 - - lib/batchbuffer: Store the gen in a local variable - - Reduce lookups and improve code clarity. - - Signed-off-by: Chris Wilson - -commit 822cc6a5655db6c210204ca349dbbed05ee1838b -Author: Mike Mason -Date: Tue Aug 26 13:31:27 2014 -0700 - - scripts: Add capability to resume interrupted run-tests.sh session - - Piglit provides a 'resume' feature that can restart an interrupted - test run at the point where it stopped. This patch adds that - feature to run_tests.sh. - - Signed-off-by: Mike Mason - [Thomas: remove additional new line from end of file] - Signed-off-by: Thomas Wood - -commit 59c55626f93eabafe4617f4aca6ec11545340d9d -Author: Chris Wilson -Date: Fri Aug 29 13:11:37 2014 +0100 - - igt/gem_concurrent_blit: Add ring race checks - - Similar to the previous commit, we also want to check that every - pipeline is serialised correctly. This extends the test to include - render copies as well as blits. - - Signed-off-by: Chris Wilson - -commit 6c428a6c060a23dc948f198f7a63096bd2739875 -Author: Chris Wilson -Date: Fri Aug 29 13:11:37 2014 +0100 - - igt/gem_concurrent_blit: Add GPU-vs-GPU checks - - In future, we may allow reordering of GPU batches. This implements a - simple race detector by extending the current CPU-vs-GPU checks. - - Signed-off-by: Chris Wilson - -commit 3b94d3f8ce21c92d3209e73ab48fda64beb0037e -Author: Chris Wilson -Date: Fri Aug 29 13:11:40 2014 +0100 - - igt: Prettify igt_assert_eq() failure messages - - This just improves the language about the exact failure to reduce - confusion. - - Signed-off-by: Chris Wilson - -commit d0a41b47ea5ed1ac5ca45f83d2917c6ad41b644a -Author: Arun Siluvery -Date: Tue Aug 26 14:50:28 2014 +0100 - - igt/gem_workarounds: igt to test workaround registers - - Some of the workarounds are lost followed by a gpu reset, suspend/resume; - this patch adds a test which compares register state before and after - the test scenario. - - This test currently verifies only bdw workarounds. - - v2: address patch cleanup comments (ThomasW) - Add binary to ignore list and use igt_debugfs helper fns - to read debugfs file and igt_info for printing debug info. - - v2.1: address minor comments from Daniel - use igt_main as opposed to normal main - - Signed-off-by: Arun Siluvery - [danvet: Drop igt_exit, it's already in igt_main.] - Signed-off-by: Daniel Vetter - -commit 2ef19ad79a07d862a2dc799ab2e71d2ad91c9065 -Author: Rémi Cardona -Date: Mon Aug 18 01:09:15 2014 +0200 - - shader-debugger: Force file/stdout IO as UTF-8 - - Not all locales on linux are UTF-8, the most notable being the C locale. - Python will use the ASCII codec for stream IO in this case and will barf - on the Copyright sign at the top of .g4a files. - - Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=519434 - Signed-off-by: Rémi Cardona - Signed-off-by: Damien Lespiau - -commit 257a51ec955b178ed07e4797a7d36f35a8cc82fe -Author: Daniel Vetter -Date: Tue Aug 26 15:26:34 2014 +0200 - - lib: Use igt macros more - - Stragglers. - - Signed-off-by: Daniel Vetter - -commit 1649ef0d1f5c0e4f995a437bd24f1574a8b5100f -Author: Daniel Vetter -Date: Tue Aug 26 15:26:21 2014 +0200 - - lib/igt_* Use igt macros in igt libaries - - Except in igt_core since that would lead to some hilarious recursions. - - v2: Don't fflush any more, spotted by Chris. - - Signed-off-by: Daniel Vetter - -commit 71ac5de5a4473d20fb11cb454f62d8e5c90f020c -Author: Daniel Vetter -Date: Tue Aug 26 15:13:06 2014 +0200 - - lib/intel_* Use igt checks and macros - - Various stuff all over. Most done with the igt.cocci spatch, but - with a few fixups by hand. And add igt_core.h includes where needed. - - Signed-off-by: Daniel Vetter - -commit baa6f8b34f54b68c15fc86d86de77d954e458aac -Author: Daniel Vetter -Date: Tue Aug 26 15:03:40 2014 +0200 - - lib/rendercopy*: Use igt_assert - -commit 4428151960b71a2ca4c83e8da3f4b0b826a8a26c -Author: Sonika Jindal -Date: Tue Aug 19 12:01:25 2014 +0530 - - kms_rotation_crc: Calling commit2 instead of legacy commit - - Since planes are universal now, using commit2 so that drmModeSetPlane can be - called for primary plane as well instead of drmModeSetCrtc. drmModeSetPlane will - update the x,y,w,h for the plane. - - Cc: Damien Lespiau - - Signed-off-by: Sonika Jindal - Signed-off-by: Daniel Vetter - -commit c1cf0d81389e8cc696a233aa357130f97e1b9a4c -Author: Wendy Wang -Date: Tue Aug 26 14:38:49 2014 +0800 - - Merge two subtests for pm_rc6_residency IGT case - - Combine two subtests(rc6_residency_check and rc6_residency_counter) - into one subtest(residency_accuracy) - - Signed-off-by: Daniel Vetter - -commit 50166d2a20b72d008e5991a157a45cd9a77e4dea -Author: Damien Lespiau -Date: Tue Aug 19 11:55:22 2014 +0100 - - lib/fb: Assert, instead of silently failing, when creating fbs - - We were either returning 0, or a negative value cast to an unsigned int - for errors and the clients of that API weren't exactly checking - anything. - - We're in luck, we can take shortcuts in a testing library to just assert - when an expected error occurs. - - Signed-off-by: Damien Lespiau - -commit 54397cafed108e54e98f109b8fd6cb4fdc729823 -Author: Damien Lespiau -Date: Tue Aug 19 11:40:07 2014 +0100 - - lib/fb: Replace straight igt_fail() by asserts with debug messages - - Signed-off-by: Damien Lespiau - -commit d9ffb7dfc3e9a36e63561f0e3a995275a445f87f -Author: Damien Lespiau -Date: Fri Jun 20 12:02:09 2014 +0100 - - testdisplay: Make the desired tiling mode an unsigned int - - We may be able to scan out more tiling formats in the future. - - Signed-off-by: Damien Lespiau - -commit 5f16ef6f28b97d16301d10b7a137a3d0fdcb0927 -Author: Damien Lespiau -Date: Mon Aug 18 16:55:57 2014 +0100 - - pm_rpm: Adjust to the new igt_create*fb() API - - Signed-off-by: Damien Lespiau - -commit 9317f39a5e3729ac128c960a3e21d7234239b2db -Author: Damien Lespiau -Date: Mon Jun 23 15:28:07 2014 +0100 - - pm_lpsp: Adjust to the new igt_create.*fb() API - - Signed-off-by: Damien Lespiau - -commit 210f76c4969d9b8ed74230116d4d212a6f503e73 -Author: Damien Lespiau -Date: Mon Jun 23 15:27:17 2014 +0100 - - kms_sink_crc_basic: Adjust to the new igt_create.*fb() API - - Signed-off-by: Damien Lespiau - -commit ab4cb9d7ce4b69e25447cc7c161cc12cb9b879cf -Author: Damien Lespiau -Date: Mon Jun 23 15:26:34 2014 +0100 - - kms_setmode: Adjust to the igt_create.*fb() API - - Signed-off-by: Damien Lespiau - -commit 0d4cf057f518b079b7aa3d55f0ee14903b5abbcc -Author: Damien Lespiau -Date: Mon Jun 23 15:25:39 2014 +0100 - - kms_render: Adjust to the new igt_create.*fb() API - - Signed-off-by: Damien Lespiau - -commit 3149b8e903ecdbd7fadbbfcd9d3fdddf11b444a7 -Author: Damien Lespiau -Date: Mon Jun 23 15:24:49 2014 +0100 - - kms_psr_sink_crc: Adjust to the new igt_create.*fb() API - - Signed-off-by: Damien Lespiau - -commit 4a8c6346e53f1fbda34a0d7d376b2a906716a38a -Author: Damien Lespiau -Date: Mon Aug 18 16:50:07 2014 +0100 - - kms_plane: Adjust to the new igt_create.*fb() API - - Signed-off-by: Damien Lespiau - -commit b013b2117964529f8e693f5da2c865258b2af42d -Author: Damien Lespiau -Date: Mon Jun 23 15:21:21 2014 +0100 - - kms_pipe_crc_basic: Adjust to the new igt_create.*fb() API - - Signed-off-by: Damien Lespiau - -commit fd1317bd25944feebbd553a7c85395beb6842df0 -Author: Damien Lespiau -Date: Mon Jun 23 15:19:25 2014 +0100 - - kms_mmio_vs_cs_flip: Adjust to the new igt_create_.*fb() API - - Signed-off-by: Damien Lespiau - -commit 876fe198c7a47a427d49347141a70cc3f5607a55 -Author: Damien Lespiau -Date: Mon Jun 23 15:18:00 2014 +0100 - - kms_flip_tiling: Adjust to the new igt_create_.*fb() API - - Signed-off-by: Damien Lespiau - -commit d71031cd7455fa2119215abca651e816ad0807a1 -Author: Damien Lespiau -Date: Mon Jun 23 15:16:54 2014 +0100 - - kms_flip: Adjust to the new igt_create_fb*() API - - Signed-off-by: Damien Lespiau - -commit 3a930273a05790570fb1986bc36f67bbf6a7af3b -Author: Damien Lespiau -Date: Mon Jun 23 15:13:46 2014 +0100 - - kms_fence_pin_leak: Use I915_TILING_X to create fbs - - Signed-off-by: Damien Lespiau - -commit 66d31332ddaadf8d92ff761747d51716f5a0f5da -Author: Damien Lespiau -Date: Mon Jun 23 15:12:48 2014 +0100 - - kms_fbc_crc: Use I915_TILING_X to create fbs - - Signed-off-by: Damien Lespiau - -commit 0c14af65eaf0d052a8263fadd53c825282576608 -Author: Damien Lespiau -Date: Mon Jun 23 15:11:12 2014 +0100 - - kms_cursor_crc: Use I915_TILING_NONE to create fbs - - Signed-off-by: Damien Lespiau - -commit 378e61e4d872136d9d106bcaae1fcafb5ce1c460 -Author: Damien Lespiau -Date: Mon Jun 23 14:53:24 2014 +0100 - - lib: Change the fb creation functions to take fully qualified tiling formats - - In the future, we'll need more than X tiling here. So give a full enum - instead of bool meaning X-tiled. - - It's fine to do this change without updating the users just yet as - 'true' happens to be I915_TILING_X. - - Signed-off-by: Damien Lespiau - -commit 4d2f511cee49db9b8f1ebf93b9835d871dfb9a9e -Author: Mike Mason -Date: Mon Aug 18 10:43:49 2014 -0700 - - tests: Fix seg fault when gem_mmap is run without specifying a subtest - - gem_mmap seg faults when all tests are run together. This occurs because - the new-object subtest closes the gem object, but short-mmap assumes - it still exists. Thus gem_mmap__cpu() returns nil for addr and memset() - seg faults. This patch makes new-object and short-mmap create and - close their own gem objects. - - Signed-off-by: Mike Mason - Signed-off-by: Thomas Wood - -commit e9da093b13c572b50c84ea2ec19244c8e2b78f08 -Author: Mike Mason -Date: Mon Aug 18 10:43:09 2014 -0700 - - scripts: Allow multiple -t and -x regular expressions for run-tests.sh - - Piglit allows multiple -t and -x regular expressions to be - given on the command line. This patch enables run-tests.sh to - support that as well. - - Signed-off-by: Mike Mason - Signed-off-by: Thomas Wood - -commit 75365eb01b7cb530426d84ea5357ed7b31575337 -Author: Tim Gore -Date: Mon Aug 18 14:56:43 2014 +0100 - - intel-gpu-tools: skip kms_flip_event_leak unless we have cairo - - kms_flip_event_leak depends on cairo, so add it to the - list of tests to skip (in Android.mk) if ANDROID_HAS_CAIRO - is not set to 1. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 79c0c9622c870a4e562dfe7b7e5b3625f73c61d1 -Author: Mike Mason -Date: Fri Aug 15 19:14:12 2014 +0000 - - Add kms_flip_event_leak to .gitignore - - This patch just adds kms_flip_event_leak to tests/.gitignore. - - Signed-off-by: Mike Mason - Signed-off-by: Thomas Wood - -commit 1bec6cb2c241ec449cd75579041506d1708bd341 -Author: Thomas Wood -Date: Thu Aug 14 14:06:37 2014 +0100 - - tests: check plane rotation is reset after the VT mode is restored - - Make sure the rotation is reset after the VT mode is restored by - collecting the unrotated CRC and comparing with the CRC value after VT mode - has been restored. The CRC is used to ensure the hardware state is checked, - rather than any software state. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=82236 - Signed-off-by: Thomas Wood - -commit fcb324c2cca6549cd95fb84269622feb72c90cbd -Author: Thomas Wood -Date: Thu Aug 14 13:59:02 2014 +0100 - - lib: add igt_restore_vt_mode - - Add a function to restore the previous VT mode after - igt_set_vt_graphics_mode is called. - - Signed-off-by: Thomas Wood - -commit 5c7bcb11bea366ede55e839656f4d03f150b2ca3 -Author: Daniel Vetter -Date: Tue Aug 12 12:10:20 2014 +0200 - - lib/igt_kms: doc for the remaining kmstest_ functions - - Plus a bit an overview section explaining the split in the library - a - few people (everyone except me it seems) didn't really understand it. - - v2: Fix typo'ed s/kmstest_set_vt_graphics_mode/kmstest_get_pipe_from_crtc_id/ - in a doc comment spotted by Imre. - - Signed-off-by: Daniel Vetter - -commit 1cad834261e5792f19406faf111235737da15191 -Author: Daniel Vetter -Date: Tue Aug 12 11:57:32 2014 +0200 - - lib/igt_kms: Simplify return value of kmstest_get_connector_config - - A plain bool is enough. - - Signed-off-by: Daniel Vetter - -commit 81dfcaba88f2a6f04830b7da2fd7d79cf6120a40 -Author: Daniel Vetter -Date: Tue Aug 12 11:56:41 2014 +0200 - - lib/igt_kms: Simplify return value of kmstest_get_connector_default_mode - - A plain bool is good enough, no need for fancy negative error values. - - Signed-off-by: Daniel Vetter - -commit 3b39bfff60967c13dbadae8ff051819d78c6bd2f -Author: Daniel Vetter -Date: Tue Aug 12 11:31:44 2014 +0200 - - lib/igt_kms: Shuffle kmtests_ functions - - Group them a bit both in the header and .c file, and make sure they - appear in the same order in both. - - Signed-off-by: Daniel Vetter - -commit 33f0884f3c711551a89483e438a6cf18af8ab25e -Author: Daniel Vetter -Date: Tue Aug 12 11:23:09 2014 +0200 - - lib/igt_kms: set_vt_graphics_mode is a low-level helper - - So give it a kmstest_ prefix and shuffle it around a bit. - - Signed-off-by: Daniel Vetter - -commit 9a15b5a5e2cb0ab34c0e11dc53a183919664157f -Author: Daniel Vetter -Date: Tue Aug 12 11:13:03 2014 +0200 - - lib/igt_kms: doc for type2str functions - - Also shuffle things around a bit to make sure the order in the header - matches the order in the .c file. - - Signed-off-by: Daniel Vetter - -commit 27a19de059259ef2944f7bfd61082862e6f277e4 -Author: Daniel Vetter -Date: Tue Aug 12 11:04:49 2014 +0200 - - lib/igt_kms: Clean up the other _name functions/macros - - And remove sprite_name, redundant and won't work due to lack of - dev_priv. - - Signed-off-by: Daniel Vetter - -commit dd8fba44cd1759e5cffc84d47f2c9b92c1e2ae8b -Author: Daniel Vetter -Date: Tue Aug 12 11:00:37 2014 +0200 - - lib/igt_kms: Unify pipe name helpers - - And add api doc while at it. - - Signed-off-by: Daniel Vetter - -commit fb38cf260ba6ed45b514b7a2c21f733c51caeb90 -Author: Daniel Vetter -Date: Tue Aug 12 10:32:41 2014 +0200 - - tests/kms_cursor_crc: Align opening { - - Signed-off-by: Daniel Vetter - -commit 2ce0691cd5237ebf06d617acb2a33d418178f883 -Author: Chris Wilson -Date: Tue Aug 12 15:29:25 2014 +0100 - - igt/gem_cpu_reloc: Update the memory requirements - - Use intel_check_memory() for accuracy and beautification - - Signed-off-by: Chris Wilson - -commit eda904c9d787bd085be3803529c7f23f81ec174b -Author: Ville Syrjälä -Date: Tue Aug 5 23:06:04 2014 +0300 - - tests: Add kms_flip_event_leak test - - kms_flip_event_leak will issue a page flip and close the file - descriptor before the flip has finished. This may cause the kernel - to leak the page flip event. The test itself won't actually fail but - if the kernel notices the leak and WARNs piglit will report a failure. - - Signed-off-by: Ville Syrjälä - -commit 5a06d361b5941466ef1941bb6010f179dbb6f66e -Author: Paulo Zanoni -Date: Fri Aug 8 11:24:34 2014 -0300 - - tests/pm_rpm: refactor the modesetting code - - Refactor the code so the params for the modesets are always stored and - don't have to be recomputed every time. With this, we can get rid of - our FB caching structures, and we now also allow the subtests that do - special modesets to reuse the parameters used on the default modesets, - just changing whatever they want. - - The biggest win here is that the test case subfunctions get smaller - and simpler to read and write. - - Signed-off-by: Paulo Zanoni - -commit 5a978121d36ceb0ac6b372475d03c98a8db72e7e -Author: Paulo Zanoni -Date: Thu Aug 7 16:36:04 2014 -0300 - - tests/pm_rpm: add disable_or_dpms_all_screens() - - And its and_wait() version. The goal is to extract common code - patterns into functions/macros, so the code for the test cases gets - easier to read and write. - - Signed-off-by: Paulo Zanoni - -commit 189205984224e5a66d4dcfc85f4072202d91b633 -Author: Paulo Zanoni -Date: Fri Aug 8 11:12:42 2014 -0300 - - tests/pm_rpm: add macros to disable/enable screens and wait - - This should make the test case functions better to read and write. - - Signed-off-by: Paulo Zanoni - -commit f6ffa3ca7f6d845d76cad95e2d5f0f8fdd84932a -Author: Paulo Zanoni -Date: Thu Aug 7 16:03:08 2014 -0300 - - tests/pm_rpm: add wait_for_suspended() calls to test_one_plane - - Make sure we do all operations while really runtime suspended, so we - can actually test things. - - Signed-off-by: Paulo Zanoni - -commit a17f0604ef31ed310fbdcbb64324fcb39f08b908 -Author: Paulo Zanoni -Date: Wed Aug 6 18:50:57 2014 -0300 - - tests/pm_rpm: add subtests for fences - - Daniel thought fences were not surviving runtime PM on DPMS, so we - wrote this test to check. The good news is that the test passed, so - there's no need for a Kernel patch, at least on the Kernel I tested. - - Signed-off-by: Paulo Zanoni - -commit d52365677ef808ffa43bf5e9d53ed0814edd3dd5 -Author: Paulo Zanoni -Date: Wed Aug 6 14:31:53 2014 -0300 - - igt_kms: add kmstest_unset_all_crtcs() - - Both pm_rpm.c and pm_lpsp.c call it "disable_all_screens", but let's - give it a name that better describes what the implementation does. - - v2: Rename to kmstest_unset_all_crtcs (Daniel). - - Signed-off-by: Paulo Zanoni - -commit da458758e7d8d10b520146591312ae0407a0da6b -Author: Paulo Zanoni -Date: Wed Aug 6 12:33:48 2014 -0300 - - tests/pm_rpm: use kmstest_get_property() - - So we can reduce the code size. - - v2: Rebase after the rename to kmstest_get_property. - - Signed-off-by: Paulo Zanoni - -commit 4924b78368fa44f96fa61f6bcf402d4a55f8d4de -Author: Paulo Zanoni -Date: Wed Aug 6 12:14:56 2014 -0300 - - igt_kms: document and export kmstest_get_property() - - So we can use it on pm_rpm.c. - - v2: Rename to kmstest_get_property (Daniel) - - Signed-off-by: Paulo Zanoni - -commit 053c10432254d2d58c33346f0ef08f024c3781ce -Author: Paulo Zanoni -Date: Wed Aug 6 12:03:57 2014 -0300 - - igt_kms: optionally return the property from get_property - - So we can use this function on places that also need the property - pointer, without having to call drmModeGetProperty() again with the - returned id. - - Signed-off-by: Paulo Zanoni - -commit 18d8ea7fe451ee73606d82b060f02e06fae16fc2 -Author: Paulo Zanoni -Date: Wed Aug 6 11:48:56 2014 -0300 - - igt_kms: pass drm_fd instead of igt_display_t on some functions - - Since these functions only really use the drm_fd. The goal is to be - able to reuse these functions on programs that don't use the - igt_display_t structure. - - Signed-off-by: Paulo Zanoni - -commit 61920c68d847dcc920fff27f857e03debc76a9a4 -Author: Paulo Zanoni -Date: Tue Aug 5 18:44:47 2014 -0300 - - igt_kms: don't get drmModeRes just to free it later - - Stress testing malloc is not our goal :) - - Signed-off-by: Paulo Zanoni - -commit bfb5a757751d6f8e6f7ed02f6cb76d006cd0e990 -Author: Paulo Zanoni -Date: Wed Aug 6 14:55:33 2014 -0300 - - tests/pm_rpm: add subtests for planes and cursors - - These tests should trigger WARNs on Kernels that don't have the most - recent fixes. - - v2: - Merge both the cursor and planes patches into one so it's easier - to update them. - - Extend the tests a little bit to exercise fences. - - Fix bug found by Matt to enable the test to run on older Kernels - - Signed-off-by: Paulo Zanoni - -commit 17d63e49685ac51d62ba2dba80167de96e1b6c5f -Author: Sean V Kelley -Date: Tue Aug 5 13:53:49 2014 -0700 - - lib/chv: CHV media pipeline command sequence - - Enable gem_media_fill test for CHV platform. In addition to differences in - media IP blocks from Broadwell, the command sequence also differs for - programming the media pipeline, e.g., should not send a MEDIA_STATE_FLUSH - right before the MI_BATCH_BUFFER_END of batch buffers using MEDIA_OBJECT. - Uses explicit IS_BROADWELL / IS_CHERRYVIEW to distinguish in gen8 media - fill handling. - - Signed-off-by: Sean V Kelley - Reviewed-by: Xiang, Haihao - Signed-off-by: Daniel Vetter - -commit ac31f19264d45df63fdd6591d66ae57060d1ee5e -Author: Gaurav K Singh -Date: Wed Jul 16 19:39:33 2014 +0530 - - intel_bios_reader: Add support to dump MIPI Sequence block #53 - - Signed-off-by: Gaurav K Singh - Signed-off-by: Damien Lespiau - -commit 525044ba32a9fa848c9fb36e8bd96211d6b38e12 -Author: Gaurav K Singh -Date: Wed Jul 16 19:39:32 2014 +0530 - - intel_bios_reader: Add support to dump MIPI Configuration Block #52 - - Signed-off-by: Gaurav K Singh - Signed-off-by: Damien Lespiau - -commit ff6b068ecd1d231af466d043454279e6cddcb3d1 -Author: Thomas Wood -Date: Thu Jul 31 16:26:55 2014 +0100 - - testdisplay: ignore invalid subtest options - - testdisplay does not have any subtests and should therefore exit with - the appropriate exit code if the --list-subtests or --run-subtest - options are used. - - Signed-off-by: Thomas Wood - -commit de1e877be5fe9ac83477a8ca416708f3d078b731 -Author: Chris Wilson -Date: Mon Jul 28 08:58:32 2014 +0100 - - core: Add all kernel log levels - - And notice that INFO is 6 not 5. This is because I had intended to use - KERN_NOTICE anyway... - - Signed-off-by: Chris Wilson - -commit 9b500dbf6b0b3a68b1de90888c11a873202c98cd -Author: Thomas Wood -Date: Mon Jul 28 16:43:19 2014 +0100 - - Update .gitignore files - - Signed-off-by: Thomas Wood - -commit bb48429a6c6057b51358ce0d506916431d982897 -Author: Thomas Wood -Date: Mon Jul 28 16:01:27 2014 +0100 - - lib: don't abort if forcing the connector state fails - - Ensure tests using igt_enable_connectors can still run even if the - relevant debugfs files are not available. - - Signed-off-by: Thomas Wood - -commit c3ba7740c113d318d030ac408883c3303ca781bb -Author: Thomas Wood -Date: Mon Jul 28 15:37:16 2014 +0100 - - lib: check test options for conflicts - - Check any test specific options for conflicts with the standard set of - options. - - Signed-off-by: Thomas Wood - -commit fc5e25750f96b9c05919e757baf2a54996ba4942 -Author: Thomas Wood -Date: Fri Jul 25 16:54:41 2014 +0100 - - lib: avoid getopt value conflicts with tests - - Most tests use a printable character as the value for getopt to return, - so avoid conflicts by using non-printing values for the standard options. - - v2: fix "-h" short option - - Signed-off-by: Thomas Wood - -commit 8fc4107c911826f7e0900797e36b24010230e30d -Author: Thomas Wood -Date: Fri Jul 25 15:35:36 2014 +0100 - - testdisplay: set a non-zero exit code if getopt detected an error - - Signed-off-by: Thomas Wood - -commit 2fae99bf2cc69eed3ef71ba4d71f640463de57c3 -Author: Ben Widawsky -Date: Tue Jul 29 16:54:48 2014 -0700 - - lib: Add ndebug to the headers - - If you don't do this, it is excluded from the tarball generated by make - distcheck. - - 1.6 and 1.7 both are not buildable as a result. - - Signed-off-by: Ben Widawsky - -commit 21e9422b01a196dbb6f4c079d352978d81d55f32 -Author: Daniel Vetter -Date: Tue Jul 29 18:46:09 2014 +0200 - - tests/gem_ringfill: add interruptible mode - - Should be useful to test intel_ring_begin restart behaviour a bit. - - Signed-off-by: Daniel Vetter - -commit 660a7ffdbade6ea0854df881ce316cfc64500826 -Author: Damien Lespiau -Date: Mon Jun 30 16:19:05 2014 +0100 - - testdisplay: Destroy the cairo context once the fb is painted - - Signed-off-by: Damien Lespiau - -commit 0db75bb3f91fc058c56650100f75cea5204c6af6 -Author: Damien Lespiau -Date: Mon Jun 30 16:34:20 2014 +0100 - - lib: Don't take a reference to the surface in get_cairo_surface() - - We don't need to keep a reference to the surface, the cairo context will - keep a reference to it until we destroy it. - - Signed-off-by: Damien Lespiau - -commit 72357f3de04ab9aa57b046b666e02090641f0aa4 -Author: Damien Lespiau -Date: Fri Jul 11 14:45:37 2014 +0100 - - lib: NULLify ->cairo_surface once unmapped - - Just a matter of not leaving dangling pointers around. - - Signed-off-by: Damien Lespiau - -commit 4aadbc817b3ff72cb44fac2aece3affe19c04f18 -Author: Damien Lespiau -Date: Mon Jun 23 16:41:43 2014 +0100 - - lib: Split the GTT mapping out of get_cairo_surface() - - This is preparation work for when we need a different way to get a - linear buffer we can use with cairo. - - Signed-off-by: Damien Lespiau - -commit f5959af8a5887fb991c4a24daa8017331614e6b0 -Author: Damien Lespiau -Date: Mon Jun 23 19:47:19 2014 +0100 - - lib: Remove unused field from struct igt_fb - - Signed-off-by: Damien Lespiau - -commit e48c495572ae1e07aa3f48e801caec351a370c4b -Author: Chris Wilson -Date: Sun Jul 27 15:39:58 2014 +0100 - - igt/pm_rps: Fix assertion in load_helper_stop - - The load_helper isn't killed by the signal, but it exits gracefully. So - update the assertion to check for the successful exit. - - Signed-off-by: Chris Wilson - -commit a6e6c5bdcf93376a505abff3ae510d8275727028 -Author: Chris Wilson -Date: Fri Jul 25 17:34:06 2014 +0100 - - drmtest: First check that driver is i915 - - Before issuing any i915 specific ioctls, check the driver is i915 - otherwise we make other drivers emit nasty errors at the start of every - test. - - Signed-off-by: Chris Wilson - -commit fcbc5028aef6a8691c87d9153c93246f7904e307 -Author: Thomas Wood -Date: Fri Jul 25 13:53:12 2014 +0100 - - quick_dump: fix distcheck - - version.h is now generated in the libs directory, so make sure it is - correctly included in the compiler flags. - - Signed-off-by: Thomas Wood - -commit 57bd86068a319b218796d0bea92258b44ee143a0 -Author: Tim Gore -Date: Thu Jul 24 17:38:22 2014 +0100 - - intel-gpu-tools: fix version.h creation in android - - commit 743dc7997aa9f5210055896940d87c88983dcda6 - breaks the build under Android because version.h - is not created. This happens because the android - make executes from the ANDROID_BUILD_TOP directory - rather than from the directory containing the source - files, so we need to differentiate between Android - and linux builds. This is V2 of this patch based on - Thomas Wood's suggestion. - - Signed-off-by: Tim Gore - [Thomas: Fix distcheck issues] - Signed-off-by: Thomas Wood - -commit 8408e00e623b52f18ad0795122593741197fa2f4 -Author: Thomas Wood -Date: Thu Jul 24 17:45:48 2014 +0100 - - testdisplay: only set terminal attributes when in foreground process group - - The Piglit test runner for intel-gpu-tools creates a new process group - for the test processes, so attempting to set terminal attributes causes - the process to receive SIGTTOU and be stopped. Since the test is not run - interactively in this case, the issue can be avoided by not setting - terminal attributes if the process is not in the foreground process - group. - - Signed-off-by: Thomas Wood - -commit b9e7637542364f9834c620ce2ee3b4ca11ba6f27 -Author: Chris Wilson -Date: Fri Jul 25 14:29:47 2014 +0100 - - core: Inject program name into dmesg - - Write the program name if !list_only so that we associate oops with - simple tests. - - Signed-off-by: Chris Wilson - -commit e0dffbdeda010a0114e16fb7b2e3adb7336acff4 -Author: Chris Wilson -Date: Fri Jul 25 14:28:51 2014 +0100 - - core: Improve phrasing for test requirements - - Signed-off-by: Chris Wilson - -commit 72b12636492cdf1c97eb1fec313165720f741cca -Author: Tim Gore -Date: Thu Jul 24 14:54:27 2014 +0100 - - intel-gpu-tools: add sys/wait.h to pm_rps.c - - commit 745945546f7366a413a3a51a37f90caa3a227b1d - breaks the build under Android because some of the - macros used in pm_rps.c are defined in sys/wait.h - which is not included. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit 93d07ab8986f383a679faffc795c71a955f67945 -Author: Daniel Vetter -Date: Fri Jul 25 09:28:56 2014 +0200 - - NEWS: Don't forget new universal plane commit for igt_kms - - Suggest by Matt Roper. - - Signed-off-by: Daniel Vetter - -commit 52915fc88a3948eab9e6f243b81285420897ab95 -Author: Chris Wilson -Date: Thu Jul 24 12:46:00 2014 +0100 - - core: Inject subtest message into dmesg - - One of the side-effects we test for are kernel oops and knowing the - guilty subtest can help speed up debugging. We can write to /dev/kmsg to - inject messages into dmesg, so let's do so before the start of every - test. - - Signed-off-by: Chris Wilson - -commit 66e46630f8ba04060d73e18e46a956bf25201fc4 -Author: Chris Wilson -Date: Thu Jul 24 12:00:57 2014 +0100 - - igt_core: Read manpages more carefully for WNOHANG - - /me hides - - I thought it said it would not return for a signal and stopped thinking. - - Signed-off-by: Chris Wilson - -commit 745945546f7366a413a3a51a37f90caa3a227b1d -Author: Chris Wilson -Date: Thu Jul 24 11:44:45 2014 +0100 - - igt_core: Refactor igt_stop_helper() to use igt_wait_helper() - - Reduce code duplication as the igt_stop_helper can reuse - igt_wait_helper() to replace its own waiting routine. - - Signed-off-by: Chris Wilson - -commit bd3cf81e982d191715a68b6432c3820e9ba733ff -Author: Chris Wilson -Date: Thu Jul 24 11:41:59 2014 +0100 - - core: Only use signalsafe functions inside signal handlers - - The atexit() and signal() callbacks both need to only use signalsafe - functions - that excludes the use of assert. So simplify - fork_helper_exit_handler() and children_exit_handler(). - - __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95 - 0x00007fd630883d2b in _L_lock_13840 () from /lib/x86_64-linux-gnu/libc.so.6 - 0x00007fd630881df8 in __GI___libc_realloc (oldmem=0xfcb010, bytes=88) at malloc.c:3025 - 0x00007fd63087111b in _IO_vasprintf (result_ptr=0x7fff35dc4780, format=, args=args@entry=0x7fff35dc4658) at vasprintf.c:84 - 0x00007fd630852907 in ___asprintf (string_ptr=string_ptr@entry=0x7fff35dc4780, format=format@entry=0x7fd63097f718 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n") at asprintf.c:35 - 0x00007fd63082dd92 in __assert_fail_base (fmt=0x7fd63097f718 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x40cff5 "ret == 0", file=file@entry=0x4108d1 "igt_core.c", line=line@entry=872, function=function@entry=0x410ea0 <__PRETTY_FUNCTION__.8052> "children_exit_handler") at assert.c:57 - 0x00007fd63082dee2 in __GI___assert_fail (assertion=assertion@entry=0x40cff5 "ret == 0", file=file@entry=0x4108d1 "igt_core.c", line=line@entry=872, function=function@entry=0x410ea0 <__PRETTY_FUNCTION__.8052> "children_exit_handler") at assert.c:101 - 0x000000000040b03f in children_exit_handler (sig=) at igt_core.c:872 - 0x000000000040b089 in call_exit_handlers (sig=2) at igt_core.c:1029 fatal_sig_handler (sig=2) at igt_core.c:1053 - 0x00007fd6308bfe63 in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:130 - 0x00007fd630bd6045 in __fork () at ../nptl/sysdeps/unix/sysv/linux/pt-fork.c:25 - 0x000000000040c51a in __igt_fork () at igt_core.c:900 - 0x00000000004036c2 in forking_evictions (ops=0x614360 , surface_size=1048576, flags=5, trash_surfaces=, working_surfaces=338, fd=4) at eviction_common.c:203 - test_forking_evictions (size=1048576, flags=5, count=338, fd=4) at gem_userptr_blits.c:1086 - main (argc=1, argv=0x7fff35dc5328) at gem_userptr_blits.c:1478 - - Reported-by: Tvrtko Ursulin - Signed-off-by: Chris Wilson - -commit 8b3ded404c25bf23221e3b5ff2cc873107185781 -Author: Tvrtko Ursulin -Date: Tue Jul 22 11:14:51 2014 +0100 - - igt/gem_userptr_blits: Fix multi-threaded mm stress tester - - Two parts to the fix: - 1. Do not use pthread_cancel since not available on Android. - 2. Do not assert in the thread since that does not get propagated - to the process. Rather pass out any failures so we know test - did not work as expected. - - Signed-off-by: Tvrtko Ursulin - Cc: Tim Gore - Reviewed-by: Tim Gore - -commit 700bdf1401f1596d25024fd1038e782708bf39e5 -Author: Tvrtko Ursulin -Date: Tue Jul 22 12:33:49 2014 +0100 - - igt/gem_userptr_blits: Fix forked access test - - copy() blit helper assumes a certain object size much larger than a page size. - - Signed-off-by: Tvrtko Ursulin - Cc: Chris Wilson - Reviewed-by: Chris Wilson - -commit bffef22bfd0fc80e8196df8bf33970aee9683e5d -Author: Daniel Vetter -Date: Wed Jul 23 22:32:09 2014 +0200 - - NEWS: Updates - -commit 3efcb8c8ee3bade05cd01edf809f803a376f24a5 -Author: Daniel Vetter -Date: Wed Jul 23 21:14:24 2014 +0200 - - tests/pm_rpm: Convert to new optparsing - - Thomas missed the add-hoc parameter parsing in here, which did break - things for Paulo since the core now fails for unknown options. - - Convert them over to the new infrastructure, which has the nice upside - that we can remove the comments and put them into the usage available - with --help. - - Cc: Thomas Wood - Cc: Paulo Zanoni - Tested-by: Paulo Zanoni - Signed-off-by: Daniel Vetter - -commit 556ebc7a7cdec2f5cfa90c8503e0a7e9493154c5 -Author: Daniel Vetter -Date: Wed Jul 23 14:35:22 2014 +0200 - - lib/drm_lib.sh: Bare-bones long option parsing - - Just enough to stay compatible with simple subtests. - - Signed-off-by: Daniel Vetter - -commit 91f536dc42c667b908072ee064fd150826349ec6 -Author: Daniel Vetter -Date: Wed Jul 23 14:21:27 2014 +0200 - - tests: Move root check to lib/drm_lib.sh - - All tests want that anyway. - - Signed-off-by: Daniel Vetter - -commit 8cb89f7c4cb764a819410e05440cc9dcb9f8df1f -Author: Chris Wilson -Date: Wed Jul 23 18:35:02 2014 +0100 - - linux: placate drop_caches and pass it a '\n' - - Apparently it doesn't have much effect without the newline. - - Signed-off-by: Chris Wilson - -commit 743dc7997aa9f5210055896940d87c88983dcda6 -Author: Thomas Wood -Date: Tue Jul 22 14:53:18 2014 +0100 - - build: improve version.h generation - - Move version.h generation into lib/Makefile.sources so that it can be - shared between the Autotools and Android build systems. Also make sure the - "updating version.h" message is only displayed when version.h actually - changes and remove unnecessary includes of version.h. - - This also includes changes from Tvrtko Ursulin to prevent a build from - within the git repository failing when git is not available. - - Signed-off-by: Thomas Wood - Cc: Tvrtko Ursulin - -commit 784344ef8896e47af13fbb4377b020f33ce4c93c -Author: Thomas Wood -Date: Wed Jul 23 16:29:39 2014 +0100 - - lib: add an exit code to use when invalid options are specified - - Signed-off-by: Thomas Wood - -commit 561d519e67f31c81d338601ce859d32188c4bd7b -Author: Thomas Wood -Date: Wed Jul 23 10:38:24 2014 +0100 - - lib: add a command line option to enable debug output in tests - - Add --debug as a common command line option for all tests to enable - debug output. - - Signed-off-by: Thomas Wood - -commit c584d5c671fd81881e39b032771398cf705b4bf4 -Author: Thomas Wood -Date: Mon Jul 21 16:17:06 2014 +0100 - - lib: always warn about unknown options - - All tests can now register extra options, so there should not be any - unknown options. - - Signed-off-by: Thomas Wood - -commit 80d2c9bf82800b3cfc988879067c0e38947e5879 -Author: Thomas Wood -Date: Mon Jul 21 15:57:16 2014 +0100 - - tests: convert simple tests to use igt_simple_init_parse_opts - - Convert simple tests to use igt_simple_init_parse_opts if they require - extra options. - - Signed-off-by: Thomas Wood - -commit 82b424a419e48e08ae112345ba517a81609ce7eb -Author: Thomas Wood -Date: Fri Jul 18 17:17:34 2014 +0100 - - lib: don't ignore unknown options in multi-tests - - None of the current tests have additional options that might make use of - any unknown options and igt_subtest_init_parse_opts is available that - integrates additional option parsing. - - Signed-off-by: Thomas Wood - -commit e2cef00896a3b68c4f91c94254c0d44fa36f3ad0 -Author: Thomas Wood -Date: Fri Jul 18 16:49:07 2014 +0100 - - lib: add igt_simple_init_parse_opts - - This function allows simple tests to register additional command line - options. - - Signed-off-by: Thomas Wood - -commit 94ac74ebb889909579e3b872fd29514280c99300 -Author: Thomas Wood -Date: Fri Jul 18 16:24:34 2014 +0100 - - lib: move option parsing into common_init - - Move option parsing into common_init so it can be shared between simple - tests and tests with subtests. This allows for more common command line - behaviour across all tests. - - Signed-off-by: Thomas Wood - -commit e73008bae32de18c86808da0f3393683af92c697 -Author: Thomas Wood -Date: Fri Jul 18 14:17:35 2014 +0100 - - tests: remove unused getopt header includes - - Signed-off-by: Thomas Wood - -commit e057b86109e67191448d6610e441cbca81513d68 -Author: Thomas Wood -Date: Fri Jul 18 14:10:27 2014 +0100 - - lib: warn when attempting to run an unknown subtest - - Signed-off-by: Thomas Wood - -commit bf57e93f508244b13bf9848e37f03c7cd8f9ac94 -Author: Tvrtko Ursulin -Date: Wed Jul 23 13:33:18 2014 +0100 - - igt/gem_userptr_benchmark: Fix for upstream ioctl number - - Hardcoding has upsides and downsides. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit 70e6ed92abbca575f03f5a28402ef1eb9a6b97b8 -Author: Chris Wilson -Date: Mon Jul 21 16:15:24 2014 +0100 - - linux: Flush page/buffer cache before querying available memory - - Signed-off-by: Chris Wilson - -commit 784b77257b023b5debb05dceb397b4ba6092ae21 -Author: Chris Wilson -Date: Mon Jul 21 09:12:43 2014 +0100 - - igt/gem_userptr_blits: New tests, old issues - - Introduce a new test to keep that we clean up on process exit (if the - userptr is busy or it has been gtt mmapped). This revealed a few bugs in - the existing tests so clean those up. - - Signed-off-by: Chris Wilson - -commit acca724b42252d608b18373be82a2dfa817d4225 -Author: Chris Wilson -Date: Mon Jul 21 07:57:25 2014 +0100 - - Quieten valgrind - - Clear all the ioctl structs to zero before use as valgrind does not our - ioctls and so complains about undefined bytes being passed to syscalls. - - Signed-off-by: Chris Wilson - -commit 4f7d4dcae56e5f993f3f0b331556d4df3b0b33ab -Author: Chris Wilson -Date: Mon Jul 21 07:54:29 2014 +0100 - - Use SIGTERM in replace of SIGQUIT - - SIGTERM is the normal signal to use when instructing a process to exit. - The only difference is that an unhandled SIGQUIT is meant to generate a - coredump, which is not what we want, but in practice I encountered an - issue where SIGTERM seemed to be deliverable more reliably than SIGQUIT - (in tests using multiple signal helpers). - - Signed-off-by: Chris Wilson - -commit 4d4f4b213ca95dad59bdf8080d7bb034aa2d307a -Author: Chris Wilson -Date: Sat Jul 19 11:59:42 2014 +0100 - - igt/kms_flip: Skip if headless - - If there are no connectors, we cannot perform any pageflips and so we - have nothing to test. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73640&list_id=446828 - Signed-off-by: Chris Wilson - -commit d0dc2c5b6a22f88d0c7288d134173320c58c8d50 -Author: Paulo Zanoni -Date: Wed Jul 16 16:10:30 2014 -0300 - - tests/pm_rpm: add dpms-mode-unset{,-non}-lpsp subtests - - These tests currently trigger WARNs on our Kernel. Let's make sure we - fix the bug and it never comes back. - - Signed-off-by: Paulo Zanoni - -commit 8a3853c8121367d055acea2f7fb483095b971bf9 -Author: Thomas Wood -Date: Thu Jul 17 11:19:04 2014 +0100 - - core: increase the exit handler limit - - Increase the maximum number of exit handlers since some tests now - require more that the previous limit. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81320 - Signed-off-by: Thomas Wood - -commit 428060c555526c988f4120718f8a000e59ac8c7b -Author: Daniel Vetter -Date: Tue Jul 15 10:21:37 2014 +0200 - - lib/igt.cocci: Add s/assert/igt_assert/ - - People use it way too often, and it upsets the test library. The only - valid places to use this is of igt infrastructure self-tests where you - need to check something _without_ all the other abi use checks - igt_fail and friends do. For those tests just #define an internal - assert to hide it. - - Signed-off-by: Daniel Vetter - -commit 43784baa1346a36f99a84a06cfc83c11b507c03e -Author: Daniel Vetter -Date: Tue Jul 15 10:12:55 2014 +0200 - - tests/gem_userptr_blits: Polish - - - Drop return values for test functions - we rely on the implicit - control flow from igt_ checks. - - Don't use assert directly, this upsets the test flow logic (and - results in a CRASH result instead of FAIL). - - Cc: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit abbfecb01511d4f542302148b6240561c0269007 -Author: Tvrtko Ursulin -Date: Mon Jul 14 14:19:17 2014 +0100 - - tests/gem_userptr_blits: Race between object creation and multi-threaded mm ops - - Userptr v23 was not thread safe against memory map operations and object - creation from separate threads. MMU notifier callback would get triggered - on a partially constructed object causing a NULL pointer dereference. - - This test excercises that path a bit. In my testing it would trigger it - every time and easily, but unfortunately a test pass here does not guarantee - the absence of the race. - - v2: Added explicit cancellation point and removed the stop flag. - Use only igt_assert(). - - Signed-off-by: Tvrtko Ursulin - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 3f50598fb7399bafed01f7b44f4a4f5a85a9f13c -Author: Daniel Vetter -Date: Mon Jul 14 23:02:18 2014 +0200 - - lib/igt_core: Fixup gtkdoc for logging functions - - Without the () gtkdoc won't recognize them as function references. - - Signed-off-by: Daniel Vetter - -commit bcb2c65a14c37433598404bf4d8c3a8dfc7a842a -Author: Damien Lespiau -Date: Mon Jul 14 18:01:05 2014 +0100 - - tests: Move gem_render_copy_redux to the list of multi-subtests tests - - Can we find a way to fix those for good? My preference goes to not - having that single/multi split but always have a test being a list of - one or more subtests. - - Signed-off-by: Damien Lespiau - -commit 5a98fe9d4ae7431a9c65579dcc0ac32ff3e83adf -Author: Daniel Vetter -Date: Mon Jul 14 14:42:23 2014 +0200 - - lib: Add argc/argv to igt_simple_init - - There's a pile of ideas around to add generally useful options like - --debug to all igt tests. Or unify the runtime behaviour between - simple and subtest tests a bit more. - - The first step to get there is to add argc/argv to igt_simple_init so - that we can get at the argument list. - - Cc: Tim Gore - Cc: Thomas Wood - Signed-off-by: Daniel Vetter - -commit c7be53c7cb9aa7159ea316b56be119efd436ec17 -Author: Tim Gore -Date: Fri Jul 11 15:31:39 2014 +0100 - - intel-gpu-tools: Dont build kms_force_connector if no cairo - - kms_force_connector is a new test that requires cairo. - I have added it to the list of tests not to build on - Android unless ANDROID_HAS_CAIRO is set. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit b3d038a2b930724f1e1b45d1b149efa72ab2cbf0 -Author: Chris Wilson -Date: Mon Jul 14 10:30:36 2014 +0100 - - igt/gem_userptr_blits: Add missing RAM check before coherency tests - - -ENOCOFFE. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=79237 - Signed-off-by: Chris Wilson - -commit 52ac9a4b57f20f2dc019a973237f2f97ddb0ebf3 -Author: Chris Wilson -Date: Mon Jul 14 10:30:36 2014 +0100 - - igt/gem_userptr_blits: Add missing RAM check before coherency tests - - References: https://bugs.freedesktop.org/show_bug.cgi?id=79237 - Signed-off-by: Chris Wilson - -commit e74dd22ff89e007e637f16f661f06d4857a54224 -Author: Chris Wilson -Date: Sat Jul 12 09:06:39 2014 +0100 - - igt/gem_close_race: Increase GPU load - - Increate the GPU load slightly, but mitigate the CPU overhead from - clflushing by keeping the object alive using flink. This has also the - side-effect of magnifying the desired busy-close race. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=71029 - Signed-off-by: Chris Wilson - -commit b9c705f4da0b3817462c544e04bead926bfaf75d -Author: Chris Wilson -Date: Thu Jul 3 11:18:02 2014 +0100 - - overlay: Baytrail needs a custom GPU frequency parser - - Signed-off-by: Chris Wilson - -commit 98165d60bec04d258eeb9623550e58a8bc2f3906 -Author: Chris Wilson -Date: Fri Jul 11 23:36:15 2014 +0100 - - igt/gem_close_race: Trim object size - - The challenge here is to race GPU activity versus the gem_close. Using a - large objects makes the window of GPU activity larger - except on !llc - systems we then incur massive overhead from clflush, likely destroying - any race (due to mutex contention). And that mutex contention is - amplified by the number of cores - bad news for Baytrail. - - Give up and make the objects smaller and hope that the test is run - frequently enough to catch the race. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=71029 - Signed-off-by: Chris Wilson - -commit f796d9958b2b85696b572a4c686c758eb0323c2b -Author: Chris Wilson -Date: Fri Jul 11 20:38:38 2014 +0100 - - igt/gem_tiled_swapping: Speed up slightly - - The exercise is moving tiled objects in and out of swap. They are moved - en-block and we test them all, therefore we can randomly test different - bytes from each buffer to have reasonable coverage of all tiles. This - shifts the bulk of the work from checking the tiled bo to kswapd. - - Signed-off-by: Chris Wilson - -commit cfc692232898d435b8fbfc7a69fda382ffc83315 -Author: Chris Wilson -Date: Fri Jul 11 20:38:30 2014 +0100 - - configure: Only build overlay if dri2proto is present - - Instead of making dri2proto mandatory, disable intel-gpu-overlay if it - is not installed. - - Signed-off-by: Chris Wilson - -commit 8bf115ed9922e435cd26abd55639b089b285c8e0 -Author: Daniel Vetter -Date: Fri Jul 11 17:41:27 2014 +0200 - - lib/igt.cocci: Add stanza for for_each_pipe - - Damien dodged this ... - - Also run the script while at it. - - v2: Don't just capture identifiers for pipe, but also expressions. - - Signed-off-by: Daniel Vetter - -commit 7bf0f7fc58b524f269981c873ca120dbe1c0ae67 -Author: Damien Lespiau -Date: Fri Jun 20 00:14:52 2014 +0100 - - lib: Extract gem_get_tiling() from a couple of tests. - - Signed-off-by: Damien Lespiau - -commit 92a2b292df74408c42a3668c9f4d1a3aed194bfc -Author: Damien Lespiau -Date: Thu Jul 10 18:39:17 2014 +0100 - - kms_rotation_crc: Use the igt_kms enum to encode the plane rotation - - Signed-off-by: Damien Lespiau - -commit a58f8b93b41db4061b3a931feaae2f2c57fb8616 -Author: Damien Lespiau -Date: Thu Jul 10 18:37:36 2014 +0100 - - kms_rotation_crc: Remove unnecessary includes - - Turns out we didn't need most of them. - - Signed-off-by: Damien Lespiau - -commit 1a754396673d99d51cd4d5821bee32d5f6425f4c -Author: Damien Lespiau -Date: Wed Jul 9 14:00:59 2014 +0100 - - kms_rotation_crc: Always use the primary plane to compute the reference CRC - - Trying to disable the primary planes isn't exactly working at the - moment. W/A it until it works. - - Signed-off-by: Damien Lespiau - -commit 282f5605b02a2fc0f1c1547d59e39810962112dd -Author: Damien Lespiau -Date: Thu Jul 10 17:44:28 2014 +0100 - - kms_rotation_crc: Document the two steps in prepare_crtc() - - Signed-off-by: Damien Lespiau - -commit 05f3897dc183a6ff409e146247e3f681610295cb -Author: Damien Lespiau -Date: Wed Jul 9 21:24:26 2014 +0100 - - kms_rotation_crc: Don't compile the test on Android with no cairo support - - Signed-off-by: Damien Lespiau - -commit f7a37f02f76521485fc7195b0d46e70fe7b2105e -Author: Damien Lespiau -Date: Wed Jul 9 21:23:27 2014 +0100 - - kms_rotation_crc: Add the test to .gitignore - - Signed-off-by: Damien Lespiau - -commit 8767a794bb7a1584f02da49b85ecf849d64ff36b -Author: Damien Lespiau -Date: Wed Jul 9 12:03:50 2014 +0100 - - kms_rotation_crc: Properly paint the whole frame buffer - - The -1 meant we weren't properly filling the whole fb. - - Signed-off-by: Damien Lespiau - -commit 1bcac4dcb35c7035ecc11ed0ce8d195f4d977dfc -Author: Damien Lespiau -Date: Tue Jul 8 19:27:39 2014 +0100 - - kms_rotation_crc: Don't commit with no fb set up - - prepare_crtc() was trying to commit a display state without any fb to - scan out... - - Signed-off-by: Damien Lespiau - -commit c4564e0a51dcbe6489dd02853908a8f4cdb6055a -Author: Damien Lespiau -Date: Tue Jul 8 19:24:24 2014 +0100 - - kms_rotation_crc: Allow the sprite test to run even without universal planes - - Signed-off-by: Damien Lespiau - -commit 2eaa50f02e2cf9b8ed545eee333110cae2c552db -Author: Damien Lespiau -Date: Tue Jul 8 18:56:15 2014 +0100 - - kms_rotation_crc: No need to test for NULL before freeing the pipe CRC object - - igt_pipe_crc_free() does that check already. - - Signed-off-by: Damien Lespiau - -commit 05f90b03088f1b66dbfbb29b64aafe6b1ca164ae -Author: Damien Lespiau -Date: Tue Jul 8 18:51:25 2014 +0100 - - kms_rotation_crc: Remove plane from the state - - having everythin in the data_t structure makes it hard to understand - what should be set when. Replace that by explicit function parameters. - - Signed-off-by: Damien Lespiau - -commit fe8373d4376817de93d9bfc278005f2c67dcba50 -Author: Damien Lespiau -Date: Tue Jul 8 18:48:35 2014 +0100 - - kms_rotation_crc: Remove the sleep(2) - - One can inspect the output of the igt_kms API by setting - IGT_DISPLAY_WAIT_AT_COMMIT=1. - - Signed-off-by: Damien Lespiau - -commit ffc954e739fb58b3ad4336a42a35c417df875253 -Author: Damien Lespiau -Date: Tue Jul 8 18:46:57 2014 +0100 - - kms_rotation_crc: Remove 'output' from the state - - This restore the balance between prepare_crtc() and cleanup_crtc(), both - now taking the output as a parameter. - - Signed-off-by: Damien Lespiau - -commit b146e8128d8ca5327f2a8d306e9cdeab855d9639 -Author: Damien Lespiau -Date: Tue Jul 8 18:45:16 2014 +0100 - - kms_rotation_crc: Remove the test on output->valid - - This test is already done by the for_each_connected_output() macro. - - Signed-off-by: Damien Lespiau - -commit aef475b6f92522a0ca4bb58047f8015c5fd3f32e -Author: Damien Lespiau -Date: Tue Jul 8 18:43:44 2014 +0100 - - kms_rotation_crc: Use for_each_pipe() - - Signed-off-by: Damien Lespiau - -commit 8843bef2808acca89222b12c16aa3f09b777c848 -Author: Damien Lespiau -Date: Tue Jul 8 18:38:05 2014 +0100 - - kms_rotation_crc: Remove now unnecessary defines - - Signed-off-by: Damien Lespiau - -commit 39abe7790f675a7d46cab2e04043b278615c0b0a -Author: Damien Lespiau -Date: Tue Jul 8 18:36:32 2014 +0100 - - kms_rotation_crc: Use igt_plane_set_rotation() - - More code we can remove from the test. - - Signed-off-by: Damien Lespiau - -commit 8facccfae4c05275ae2fb31bb1948b1fea9a7687 -Author: Damien Lespiau -Date: Tue Jul 8 18:28:53 2014 +0100 - - kms_rotation_crc: Don't store 'pipe' in the state - - This variable is only needed for prepare_crtc(), need need to put it in - the test state. - - Signed-off-by: Damien Lespiau - -commit f7250d041d09b5fc83d8c98c3230696317c97cc7 -Author: Damien Lespiau -Date: Tue Jul 8 18:27:10 2014 +0100 - - kms_rotation_crc: Don't store rotate in the test state - - We don't use it anywhere else than the test function. - - Signed-off-by: Damien Lespiau - -commit eb81a922c7958e8680c95febca588314129ff790 -Author: Damien Lespiau -Date: Tue Jul 8 18:20:51 2014 +0100 - - kms_rotation_crc: Always disable the plane in cleanup - - There's no need for this check, always use set_fb(NULL) on the plane. - - Signed-off-by: Damien Lespiau - -commit 13e979c7649eeb90fbd1abaaec61bcb3028acfc9 -Author: Damien Lespiau -Date: Tue Jul 8 18:13:47 2014 +0100 - - kms_rotation_crc: Unify the two tests - - The only difference is which plane we are talking about. So we really - need one function here with a paramater. - - Well, almost. For the primary plane we need to ensure we support - unviversal planes. - - Signed-off-by: Damien Lespiau - -commit 063d22ecea7f3ffedb29a037f7b29694f22012ce -Author: Damien Lespiau -Date: Tue Jul 8 18:06:44 2014 +0100 - - kms_rotation_crc: Just store the igt_plane_t in data - - Now that we're always using an igt_plane_t, we can get rid of ->type to - use ->directly without those switch() or if()/else - - Signed-off-by: Damien Lespiau - -commit 0b3a30ee5a2668897e14c99dac8ba0b2ed7bb94d -Author: Damien Lespiau -Date: Tue Jul 8 18:01:59 2014 +0100 - - kms_rotation_crc: Skip the tests if rotation is not supported - - This happens when the kernel lacks the rotation patches. - - Signed-off-by: Damien Lespiau - -commit 5edab97f7fa646639335166912ec443d27735fad -Author: Damien Lespiau -Date: Tue Jul 8 17:51:07 2014 +0100 - - kms_rotation_crc: Style issue: binary operators need spaces before and after - - Signed-off-by: Damien Lespiau - -commit 7ae5d9b34769581bea037fd35e5110e449cd58de -Author: Damien Lespiau -Date: Tue Jul 8 17:49:03 2014 +0100 - - kms_rotation_crc: Use drm_plane from igt_plane_t - - So we don't need all that extra code to grab the drm_plane structure for - the primary_plane. - - Signed-off-by: Damien Lespiau - -commit 7e7c6254410c08a2d0785edefac65d158b2c3b6d -Author: Damien Lespiau -Date: Tue Jul 8 13:59:42 2014 +0100 - - kms_rotation_crc: Remove useless comments - - A typical example of what comments shouldn't be: - - case DRM_PLANE_TYPE_PRIMARY: /* primary */ - - Well, yes!, it's written just there, PRIMARY! - - Signed-off-by: Damien Lespiau - -commit 19743a14357fbc23a0e91d8302ed60a5690530df -Author: Damien Lespiau -Date: Tue Jul 8 12:59:03 2014 +0100 - - kms_rotation_crc: Factor out common primary/sprite code in prepare_crtc() - - This results in less code, always a good thing. Also, we only really - need one reference CRC. - - Signed-off-by: Damien Lespiau - -commit 92b29b18ca62d1e1cadf338f1b883a49d3e63a01 -Author: Damien Lespiau -Date: Tue Jul 8 12:49:03 2014 +0100 - - kms_rotation_crc: Factor out the square drawing function - - Making function to the similar things is very common in programming. - Let's do it once again. - - Cairo being a drawing library, it can be used to do the rotation! - - Signed-off-by: Damien Lespiau - -commit 78fac765238e4b21dd21cf2d105f26955a2f41d8 -Author: Damien Lespiau -Date: Tue Jul 8 12:28:41 2014 +0100 - - kms_rotation_crc: Fix style issue: single statement conditionals - - Signed-off-by: Damien Lespiau - -commit de9c1687f91b8c24b78ca10edc7166743dca5024 -Author: Damien Lespiau -Date: Tue Jul 8 12:26:38 2014 +0100 - - kms_rotation_crc: Fix style issue: '{' at the end of lines - - Signed-off-by: Damien Lespiau - -commit 1025a114c6b188dab2680c577288372f5986e0e0 -Author: Damien Lespiau -Date: Tue Jul 8 12:18:47 2014 +0100 - - kms_rotation_crc: Require universal planes for the testing primary rotation - - Otherwise the test will fail instead of just skipping. - - Signed-off-by: Damien Lespiau - -commit 143984a4f14ab22b5495411e006644caa7d6cb7a -Author: Damien Lespiau -Date: Tue Jul 8 12:10:44 2014 +0100 - - kms_rotation_crc: Test the validity of the output first - - So we don't need code to unwind what we just did. - - Signed-off-by: Damien Lespiau - -commit 9cf7e8d35fb331626a03992f68e9856eafe3997d -Author: Damien Lespiau -Date: Tue Jul 8 12:08:20 2014 +0100 - - kms_rotation_crc: Update the copyright to have this year as well - - Signed-off-by: Damien Lespiau - -commit bbd5e2ec6c7e9ae7f8eed94305e6640b4c3adc7f -Author: Damien Lespiau -Date: Tue Jul 8 12:02:42 2014 +0100 - - kms_rotation_crc: Align a few wrapped lines to the opening brace - - Signed-off-by: Damien Lespiau - -commit f00f767ceaa0ee790bbe7dd71d8210fa417483c1 -Author: Damien Lespiau -Date: Tue Jul 8 11:58:43 2014 +0100 - - kms_rotation_crc: Make more functions static - - More of the same. This time no need to move code around, just adding - static. - - Signed-off-by: Damien Lespiau - -commit 0506f106233552b7b19c89d851f004a5bf236828 -Author: Damien Lespiau -Date: Tue Jul 8 11:55:20 2014 +0100 - - kms_rotation_crc: Make check_plane_type() static - - Clearly, someone tried to solve the following warning: - kms_rotation_crc.c:189:6: warning: no previous prototype for ‘check_plane_type’ [-Wmissing-prototypes] - - Without really understanding what was the warning about. Make - check_plane_type() static and move it before its user to get rid of the forward - declaration. - - Signed-off-by: Damien Lespiau - -commit e3611394cc72540cfa7c8cd39339bd405336ba1f -Author: Sonika Jindal -Date: Wed Jun 18 14:27:27 2014 +0530 - - tests/kms_rotation_crc: IGT for 180 degree HW rotation - - Testcase for 180 degree HW rotation - - Cc: sagar.a.kamble@intel.com - - Signed-off-by: Sonika Jindal - -commit 753352cb3cdd3a2c71c4279913109b2e3e6e9b90 -Author: Damien Lespiau -Date: Tue Jul 8 18:43:22 2014 +0100 - - igt_kms: Introduce a for_each_pipe() macro - - Signed-off-by: Damien Lespiau - -commit 068efd8d9fc5ae02e928622a989d91b3e9c851d0 -Author: Damien Lespiau -Date: Tue Jul 8 16:02:05 2014 +0100 - - igt_kms: Add support for setting plane rotation - - Signed-off-by: Damien Lespiau - -commit b2eb48576f2422591fe338e21a46757b2e331985 -Author: Damien Lespiau -Date: Tue Jul 8 15:23:05 2014 +0100 - - igt_kms: Add a way to query of the plane supports rotation - - Signed-off-by: Damien Lespiau - -commit 143c3a757521de907889803b011ac2bb308b4e1a -Author: Damien Lespiau -Date: Tue Jul 8 14:56:54 2014 +0100 - - igt_kms: Provide a get_plane_property() shorthand - - So one doesn't have to write the plane type all the time. - - Signed-off-by: Damien Lespiau - -commit 33842d594044f13d3079d961df2894921be10cc5 -Author: Damien Lespiau -Date: Tue Jul 8 14:34:16 2014 +0100 - - igt_kms: Factor out a generic get_property() out of get_drm_plane_type() - - Signed-off-by: Damien Lespiau - -commit bebcb582fc40901a2aea4ab43fef3e273ad3b074 -Author: Daniel Vetter -Date: Fri Jul 11 10:24:30 2014 +0200 - - lib/igt_core: Don't log when listing subtests - - I've noticed some spam in the userptr list ... - - Signed-off-by: Daniel Vetter - -commit d3cfe28a1a4cc39044dbfd494370a903c39f2649 -Author: Thomas Wood -Date: Fri Jul 11 10:47:43 2014 +0100 - - README: update the test run instructions - - Describe using the new run-tests.sh script and also update the Piglit - instructions now that using a symlink is no longer supported. - - Signed-off-by: Thomas Wood - -commit ee62ca48e7cf0e2088e40227940677c9d4e675e0 -Author: Thomas Wood -Date: Tue Jul 1 11:35:16 2014 +0100 - - scripts: add a script to help run tests with Piglit - - Add a script to facilitate running the tests with Piglit by providing - simplified options for listing, filtering and creating summaries of test - runs. - - Signed-off-by: Thomas Wood - -commit b81020526f1d08840f9ee87d31e958ddca4cce8a -Author: Thomas Wood -Date: Wed Jul 9 10:38:05 2014 +0100 - - lib: allow the edid to be reset - - Signed-off-by: Thomas Wood - -commit eef768f283466b6d7cb3f08381f72ccf3951dc99 -Author: Thomas Wood -Date: Wed Jun 18 14:28:43 2014 +0100 - - tests: enable extra connectors in kms_flip and kms_pipe_crc_basic - - Signed-off-by: Thomas Wood - -commit b6ed9fb0d9a68cd3e07154b80e78e60778a4887b -Author: Thomas Wood -Date: Wed May 28 14:06:01 2014 +0100 - - lib: add igt_enable_connectors and igt_reset_connectors - - igt_enable_connectors forces connectors to be enabled where doing so is - known to work well. igt_reset_connectors resets the force state on all - connectors. - -commit 13cd79c128b21d0de7d419d2ebfa8219d6190035 -Author: Thomas Wood -Date: Tue May 27 14:47:25 2014 +0100 - - lib: add the ability to set an EDID data block on a connector - - Add a function to set an EDID data block on a connector and include a - set of generic EDID blocks for testing. - - Signed-off-by: Thomas Wood - -commit 37ffb22d3cf684a6443d68698716dbd8428f495a -Author: Thomas Wood -Date: Fri May 16 17:22:46 2014 +0100 - - lib: add function to change connector states - - Add an API function and a test program to force a particular state on a - connector. - - v2: mask the correct part of the minor number to get the card number (Chris - Wilson) - - Signed-off-by: Thomas Wood - -commit 9b6ae3cb6f7894b7c3e9eb89da5d89fef7f9ba91 -Author: Chris Wilson -Date: Fri Jul 11 10:38:32 2014 +0100 - - igt/gem_userptr_blits: Verify that userptr bo work on unshared memory - - If the parent passes a userptr to some private memory, we expect to - still be able to use the userptr in the child. - - Signed-off-by: Chris Wilson - -commit 9344aa78e8ad1eb36e7cf17686907d4259d34235 -Author: Chris Wilson -Date: Fri Jul 11 10:16:54 2014 +0100 - - igt/gem_userptr_blits: Shared memory allocations - - The forked tests allocate the bo (and thus for userptr, the memory) in - the parent and pass them to all children. The difference for userptr is - that we allocate system memory which the kernel then copies into each - child. As the children need to access the memory for their checks, it - does need to be shared - so allocate the userptr from shared memory! - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80208 - Signed-off-by: Chris Wilson - -commit f47ee31dd5d5a5099ed6f5d4a59a12a2f83c8cae -Author: Chris Wilson -Date: Fri Jul 11 10:15:19 2014 +0100 - - Wait for any pid in order to reap failure quicker - - When waiting for the forked tests, we can respond quicker to a failure - (such as oom) by waiting for any child to exit rather than waiting for - each child in order. Then when we see that a test failed, we can kill - all other children before aborting. - - Signed-off-by: Chris Wilson - -commit 3777d42303cf9d285a5337d71623d52402cb3021 -Author: Daniel Vetter -Date: Thu Jul 10 20:19:18 2014 +0200 - - NEWS: Updates - - Signed-off-by: Daniel Vetter - -commit 282482db70188a3cbc653cebbf407715373255d1 -Author: Daniel Vetter -Date: Thu Jul 10 20:04:19 2014 +0200 - - tests: Run igt.cocci - - New stuff caught. - - Plus manually simplify the massive igt_fail_on_f(file == NULL, ...) to - a simple igt_assert(file). We already print the errno (if - applicapable) and the condition, which is equally informative. - - Cc: Yi Sun - Cc: Matt Roper - Cc: Wendy Wang - Signed-off-by: Daniel Vetter - -commit 329f7a3734331cb57895a675d4fc87c261f338bd -Author: Daniel Vetter -Date: Thu Jul 10 19:46:46 2014 +0200 - - drv_module_reload: Unbind the right console driver - - We want to unbind fbcon, but only fbcon and only if it's there. - - This was broken by the recent patch in 3.16-rc to kick out the vgacon - driver. I've forgotten to push out the relevant fix from the machine - used to create the kick vgacon patches. - - v2: Dropped duplicated /, spotted by Damien. - - Reported-by: Damien Lespiau - Cc: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit 82e3d3379b7204bd81033c96b6279b537186ed85 -Author: Damien Lespiau -Date: Thu Jul 10 14:03:37 2014 +0100 - - drv_module_reload: Don't declare success when failing - - We weren't returning straight away when failing to unload the driver, so - the test happilly executed gem_suspend and printed ""module successfully - loaded again". - - Signed-off-by: Damien Lespiau - -commit e16d4a2d68d163da81397ff7f1e00d063f0d700c -Author: Damien Lespiau -Date: Wed Jul 9 11:40:16 2014 +0100 - - core: Apply the same treatment to the in errno message in __igt_fail_assert() - - Just like the it was done for the requirement message, display the errno - message only if errno is set, and display it at the end of the assert - message. - - Reviewed-by: Daniel Vetter - Signed-off-by: Damien Lespiau - -commit 41454622506d2d060cba8c6f1cbe98a359936a2b -Author: Damien Lespiau -Date: Wed Jul 9 11:36:27 2014 +0100 - - core: Only display the errno message if errno is set - - Reviewed-by: Daniel Vetter - Signed-off-by: Damien Lespiau - -commit b2d1a598aba4fe6b4128a0eb99f6da95a9fc70fc -Author: Damien Lespiau -Date: Wed Jul 9 11:32:22 2014 +0100 - - core: Put the requirement failure messages together - - The errno message was a bit in the middle here, it makes more sense to - group the messages about why the test requirement wasn't met together. - - Reviewed-by: Daniel Vetter - Signed-off-by: Damien Lespiau - -commit 1e5570e28a399f57d025c36f9d3547683ba0c3d4 -Author: Mika Kuoppala -Date: Wed Jun 18 14:34:04 2014 +0300 - - lib/gen6_render: removed duplicate defines - - Textually the same so no harm was done and no warnings - from compiler either. - - Signed-off-by: Mika Kuoppala - -commit 6b986a2044a2708f900454d7e23fcd0bbf68879d -Author: Daniel Vetter -Date: Wed Jul 9 20:45:54 2014 +0200 - - tests/gem_render_copy_redux needs legacy drm nodes - - ... since it uses flink. Fixes a regression due to: - - commit 6d6dfcfb883818b40b58bac61cc72cab428a7a03 - Author: David Herrmann - AuthorDate: Sun Mar 16 14:38:40 2014 +0100 - - drm: enable render-nodes by default - - Cc: David Herrmann - Signed-off-by: Daniel Vetter - -commit f705ef158ac7448d1f3c48f853da884ac548b603 -Author: Tim Gore -Date: Tue Jul 8 10:04:28 2014 +0100 - - intel-gpu-tools: Dont build kms_univeral_plane if no cairo - - kms_univeral_plane is a new test that requires cairo. - I have added it to the list of tests not to build on - Android unless ANDROID_HAS_CAIRO is set. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit c5b9615b83910f5a5c19fc84d938ea643f4e3009 -Author: Damien Lespiau -Date: Wed Jul 9 11:05:06 2014 +0100 - - kms_plane: Specify the pipe when grabbing reference CRCs - - When changing the pipe we were using, test_grab_crc() wasn't correctly - setting the pipe constraint before waiting for the CRC on the pipe, and - so we ended up waiting for a CRC on a pipe that wasn't lit up. - - Signed-off-by: Damien Lespiau - -commit 8d60b8267e97f9b04e42912262c170c473d4f061 -Author: Damien Lespiau -Date: Mon Jul 7 14:41:15 2014 +0100 - - kms_plane: Add a debug message when grabbing the CRC of a colored fb - - Signed-off-by: Damien Lespiau - -commit b5333b416f6a206a583684b0fba9265c0badbd6c -Author: Yi Sun -Date: Fri May 23 08:28:47 2014 +0800 - - kms_plane: Add panning test for primary plane - - Get CRCs of a full red and a full blue surface as reference. - - Create a big framebuffer that is twice width and twice height as the - current display mode. - - Fill the top left quarter with red, bottom right quarter with blue - Check the scanned out image with the CRTC at position (0, 0) of the - framebuffer and it should be the same CRC as the full red fb - Check the scanned out image with the CRTC at position (hdisplay, - vdisplay) and it should be the same CRC as the full blue fb - - v2: Fix a few things here and there (Damien) - - Cc: Lei Liu - Cc: Yi Sun - Signed-off-by: Lei Liu - Signed-off-by: Yi Sun - Signed-off-by: Damien Lespiau - -commit de538cfc7cd649216801829daffe602f4efee08a -Author: Damien Lespiau -Date: Mon Jul 7 13:30:41 2014 +0100 - - kms_plane: Make the gathering of reference CRCs test agnostic - - We're going to add tests for panning. Both position and panning tests - share the need to grab reference CRCs of single coloured fb, so let's - separate this function from the position test. - - Cc: Lei Liu - Cc: Yi Sun - Signed-off-by: Damien Lespiau - -commit 202b2b9567606a016edf8293048ca4d67d9eba4f -Author: Damien Lespiau -Date: Mon Jul 7 15:17:56 2014 +0100 - - pipe_crc: Make collect_crc() ensure the CRC looks somewhat valid - - Signed-off-by: Damien Lespiau - -commit 09196af60d0e7dc8b06ac78e5998d29bde66b065 -Author: Damien Lespiau -Date: Mon Jul 7 15:16:51 2014 +0100 - - pipe_crc: Warn if the CRC values is 0xffffffff - - This is what we read when the CRC logic in in a powered down well. We - really don't want that to happen. - - In theory, it's possible 0xffffffff to be a valid CRC value, so I don't - assert here. - - Signed-off-by: Damien Lespiau - -commit 4f83c4efa85bdb1cfadf0e4b44588ec581f2682b -Author: Damien Lespiau -Date: Mon Jul 7 15:08:33 2014 +0100 - - lib: Reset 'position_changed' after a drmModeSetCrtc() - - So the next commit won't trigger a drmModeSetCrtc() if the primary plane - doesn't have any update needing it. - - This shouldn't be a problem at the moment as we don't allow the primary - plane to be of a different size than the CRTC viewport, but it will most - likely change in the future and we don't want to have that bug there. - - Signed-off-by: Damien Lespiau - -commit 089e8d0a6b4b702ada745e948ae4303fd9457389 -Author: Damien Lespiau -Date: Wed May 28 18:59:09 2014 +0100 - - kms_pipe_crc_basic: Add a bit a debugging output - - Signed-off-by: Damien Lespiau - -commit 017f146c57c381a77bf3295f234744fae67e1a5c -Author: Damien Lespiau -Date: Wed May 28 17:55:06 2014 +0100 - - kms_pipe_crc_basic: Make the number of CRCs a parameter - - Let's make the test a bit more generic and have the number of CRCs we're - collecting a define so it can be changed easily. - - Signed-off-by: Damien Lespiau - -commit f18700b304cf86c030a2e7721c8f2c189805972f -Author: Damien Lespiau -Date: Wed May 28 17:40:05 2014 +0100 - - kms_pipe_crc_basic: Cycle between 2 differently colored buffer - - Instead of just testing if the CRCs are stable, we also test 2 different - fbs to make sure that the CRC is actually changing. - - Signed-off-by: Damien Lespiau - -commit dbb80a63b434f544e291a8a3997a511378f3b992 -Author: Damien Lespiau -Date: Wed May 28 17:33:32 2014 +0100 - - kms_pipe_crc_basic: Split the main test function a bit more - - Let's put the per-output test in its own function to get rid of 1 level - of indentation. We'll need it to cycle through 2 different framebuffers - to make sure we compute different CRCs if the fbs are different. - - Signed-off-by: Damien Lespiau - -commit c8b8f8abf60de1fdaafc798ebc6f73880a4e4225 -Author: Matt Roper -Date: Mon Jul 7 09:08:29 2014 -0700 - - lib/kms: Provide universal plane #define's - - There hasn't been a libdrm release containing the universal plane - definitions yet, so add them to igt_kms to allow compilation to succeed - in the meantime. - - Signed-off-by: Matt Roper - Signed-off-by: Daniel Vetter - -commit 80a4a4fd43aff81dea8822ab4756ed99b7b13e66 -Author: Daniel Vetter -Date: Mon Jul 7 17:54:30 2014 +0200 - - tests/gem_exec_parse: use gem_uses_aliasing_ppgtt - - Suggested by Brad Volking. - - Signed-off-by: Daniel Vetter - -commit d078035ca44dae1ec4e026fc294f4c0213027890 -Author: Daniel Vetter -Date: Tue Jun 17 23:47:49 2014 +0200 - - tests/kms_psr_sink_crc: Fix delayed gtt/cpu write tests - - - Drop the flip from the name - we don't do that. And the blt is - really just to have a bit of fun with the domain tracking. - - - The real test is 1) dirty with gpu 2) grab 1st crc 3) set_domain for - cpu access 4) wait a long time 5) dirty more with cpu 6) grab 2nd - crc. - - This fixes failures since with the old tests we wouldn't have noticed - the cpu rendering really. - - Signed-off-by: Daniel Vetter - -commit 838f321b9ff1ef897ab032ecc3bbb56d8d65f53f -Author: Damien Lespiau -Date: Thu Jul 3 15:50:53 2014 +0100 - - kms_universal_plane: Don't assert outside of fixtures/subtests - - Doing otherwise breaks listing the subtests. The test was throwing an - error out when universal planes were disabled as well because of that. - - Cc: Matt Roper - Signed-off-by: Damien Lespiau - -commit 3f46e815589ac5c0e9ba2d5ab94e7eff09527a8d -Author: Matt Roper -Date: Mon Jun 30 16:44:30 2014 -0700 - - tests/kms_cursor_crc: Call drmModeMoveCursor() directly - - We're calling drmModeSetCursor() to change the cursor image and never - actually doing a display commit (aside from when we display the cursor), - so call the move ioctl directly rather than igt_plane_set_position() to - ensure the changes actually take effect. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 07087ada293b18823ca10762bc7e28740bb0e6bf -Author: Matt Roper -Date: Mon Jun 30 16:44:29 2014 -0700 - - tests/kms_cursor_crc: Combine data_t and test_data_t - - If a subtest fails, cleanup_crtc() never gets called and then the - test_data_t structure for the test is lost, including the CRC file - descriptor that we never got a chance to release; this causes all - subsequent tests to fail with -EBUSY at igt_pipe_crc_new(). - - The split between permanent data_t and temporary test_data_t doesn't - seem to serve a purpose, so just combine the fields from both into - data_t. This will prevent us from losing the CRC filedescriptor so that - we can properly close and reopen it after a failed test. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 075d9eafdb4c1c64099d738a012fe3e063f08fee -Author: Matt Roper -Date: Mon Jun 30 16:44:28 2014 -0700 - - tests/kms_universal_plane: Universal plane testing (v6) - - Add a simple test to exercise universal plane support. - - v6: - - Update to new universal plane interface (commit parameter rather than - state-changing function). It should now be a lot more explicit which - steps are being taken with legacy API's vs universal API's now. - v5: - - Check that we don't have more than one primary or cursor. This will - catch accidental calls to drm_plane_init() in the kernel where - drm_universal_plane_init() was intended (these don't cause a compile - warning due to type compatibility between enum and bool). - v4: - - Test disabling the primary plane explicitly when it has previously - been implicitly disabled due to clipping. - - Skip test if igt_pipe_crc_new() fails - v3: - - For testing while crtc is off, switch between several different - primary plane fb's before reenabling the crtc. This will help - catch pin/unpin mistakes. - v2: - - Test that pageflips error out gracefully when the primary plane - is disabled before the ioctl, or between ioctl and pageflip - execution. - - Test that nothing blows up if we try to disable the primary plane - immediately after a pageflip (presumably before the pageflip actually - completes). - - Test that we can setup primary + sprite planes with the CRTC off and - then have them show up properly when we enable the CRTC - (drmModeSetCrtc with fb = -1). - - Test that we can modeset properly after having disabled the primary - plane - - Test that proper error codes are returned for invalid plane - programming attempts. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 04067c3d5029f6ca28e6e14fffa47eecbd0e9c70 -Author: Matt Roper -Date: Mon Jun 30 16:44:27 2014 -0700 - - lib/kms: Drop primary plane windowing test from igt_plane_set_position() - - None of our hardware can support this today, but we'd like to be able to - write tests that check that the kernel returns the proper error code - when userspace tries it anyway. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 794a9fd6bc24b0bcc9eb8a9a59c924fd5229f25c -Author: Matt Roper -Date: Mon Jun 30 16:44:26 2014 -0700 - - lib/kms: Add universal plane support (v2) - - Add support for universal planes. This involves revamping the existing - plane handling a bit to allow primary & cursor planes to come from the - DRM plane list, rather than always being manually added. - - v2: Don't drop fixed ordering of internal plane list. Primary will - always be index 0, cursor will always be last in internal plane - list. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 82bc03f392a12e5d48818faa99b02f9b2ab54483 -Author: Matt Roper -Date: Mon Jun 30 16:44:25 2014 -0700 - - lib/kms: Add igt_display_try_commit2() - - Add a new public API that will attempt a display commit, but will return - an error code upon failure rather than failing the IGT test. This is - intended to allow igt tests to verify that the expected error codes are - returned to userspace when invalid requests are issued. - - Note that with non-atomic programming, a single commit operation has - several potential failure points internally; the first non-zero error - code encountered will be returned immediately and no further programming - will be performed by the commit. It is the caller's responsibility to - return to a sane state. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 1c25547d48296c3058c9e1cc45b533746144a230 -Author: Matt Roper -Date: Mon Jun 30 16:44:24 2014 -0700 - - lib/kms: Add igt_display_commit2() - - Add a new commit interface, igt_display_commit2(), that allows tests to - specify which programming API should be used to perform hardware - updates. COMMIT_LEGACY is the only option for now, but universal - and atomic interfaces will be added as additional options in the future. - - igt_display_commit() remains unchanged for existing tests that wish to - place the hardware in a specific state, but that don't care which API is - used to achieve that state. The legacy API will be used by default for - now, but in the future we may decide to make the default API - configurable via an environment variable. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 2a3e212acc01742ac0a0f8bcf969e8a1ae2343b1 -Author: Matt Roper -Date: Mon Jun 30 16:44:23 2014 -0700 - - lib/kms: Track need for vblank wait locally - - The need to wait for a vblank after programming is due to the way we - actually program the hardware. Move need_wait_for_vblank out of the - pipe and into a local variable in preparation for future programming - styles (e.g., atomic pageflip) that will need different logic. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 3cc60bab465f6d22b64a7034ce75e47dd2163e6e -Author: Matt Roper -Date: Mon Jun 30 16:44:22 2014 -0700 - - lib/kms: Drop igt_pipe->need_set_{crtc, cursor} - - The "need" flags on igt_pipe simply mirror the fb_changed field of the - primary/cursor planes. Drop them and just use fb_changed instead. - - Signed-off-by: Matt Roper - Signed-off-by: Damien Lespiau - -commit 67e29a30d5da57fb6764a23ba9f6aa31ea2c15a8 -Author: Jesse Barnes -Date: Thu Jun 26 08:47:08 2014 -0700 - - gem_exec_parse: require PPGTT as well - - The command parser may be present, but not active, so check for PPGTT - before allowing this test to run. - - Signed-off-by: Jesse Barnes - -commit 7ef537231a7bcc8deb49119034f9f6d403565ecc -Author: Ville Syrjälä -Date: Wed Jun 18 21:14:11 2014 +0300 - - tests/gem_ctx_exec: Add reset-pin-leak subtest - - Add a subtest to make sure the kernel doesn't leak the vma - pin_count for the last context on reset. - - Signed-off-by: Ville Syrjälä - -commit fedb9b6342f6fba6f2efa926df1c4af2e8576a2b -Author: Chris Wilson -Date: Sat Jun 21 15:39:09 2014 +0100 - - gem_mmap_gtt: Test mmaping less than the full object - - A bug was recently introduced into the kernel that happened when the vma - was smaller than the object. Test that. - - Signed-off-by: Chris Wilson - -commit 9f28ba5ef3fbc094f9da3324b79599bb2fe1993e -Author: Chris Wilson -Date: Sat Jun 21 15:38:31 2014 +0100 - - gem_fence_upload: Improve the contended messages - - In the contended upload case, we did not distinguish between linear and - tiled uploads. - - Signed-off-by: Chris Wilson - -commit 8abca6fd14d2b0e3bf25461199dd8519803f9518 -Author: Tim Gore -Date: Fri Jun 20 11:28:12 2014 +0100 - - intel-gpu-tools: add igt_core init func calls to some tests - - igt-core.h/c provides some macros and initialisation - functions to support the tests but some of the single - tests do not use these. Modifying these tests to use - the igt_simple_main macro and igt_simple_init function - is the first step towards a consistent command line - across all tests. - - Signed-off-by: Tim Gore - Signed-off-by: Thomas Wood - -commit 236d6bd2d36114fe402fe0e85d97b14cdf102963 -Author: Daniel Vetter -Date: Thu Jun 19 10:13:12 2014 +0200 - - tests/gem_exec_big: Re-add gem_sync - - We need this to avoid hitting the slowpath and ending up with a - presumed_offset == -1. Regression reported by PRTS, bisected to - - commit eb36fc993d7ae1988c80ba5b767989059c91d0ec - Author: Chris Wilson - AuthorDate: Mon Jun 16 10:49:16 2014 +0100 - Commit: Chris Wilson - CommitDate: Mon Jun 16 10:51:02 2014 +0100 - - igt/gem_exec_big: Update to new igt_assert_eq - - Use igt_assert_eq for better test output on failures. - - Signed-off-by: Chris Wilson - - v2: igt_warn_on unexpected reloc offsets. - - Cc: shuang.he@intel.com - Acked-by: Chris Wilson (on irc) - Signed-off-by: Daniel Vetter - -commit 1b1f4b16a25b6415187fd2b0906ae730e9ca8d23 -Author: Daniel Vetter -Date: Tue Jun 17 23:06:59 2014 +0200 - - tests/gem_mmap: Add short mmap test - - Blows up with the current full-object prefault code. - - Signed-off-by: Daniel Vetter - -commit 13b3e5f3e02a82e5d064e1f4f52eebb91c380819 -Author: Daniel Vetter -Date: Tue Jun 17 21:22:05 2014 +0200 - - Paritially revert "lib: add missing includes to headers" - - This reinstates the #includes for lib/debug.h since without that the - shader debugger fails to build. You need to manually enable it with - ./autogen.sh --enable-shader-debugger and the fail only happens when - running a clean build with - - $ git clean -dfx && ./autogen.sh --enable-shader-debugger && make - - I have no idea what breaks, but this restores the build. - - Reported by Ben Widawsky. - - Signed-off-by: Daniel Vetter - -commit 15d93d0a91234e33c4e40b72204258ffbcb2fe4c -Author: Daniel Vetter -Date: Tue Jun 17 18:52:08 2014 +0200 - - tests: Move gem_userptr_blits to the right Makefile target - - We need to be able to check for this somehow ... - - Signed-off-by: Daniel Vetter - -commit d123de68587ef1c558bb9be7a1fd980cba58d748 -Author: Daniel Vetter -Date: Wed Apr 30 18:15:36 2014 +0200 - - tests/Makefile.sources: Remove empty last line - - Actually just whitespace change to make sure the new built rules for - tests/*.txt pick up the changes properly everywhere. - - Signed-off-by: Daniel Vetter - -commit 748a46dcb994c8c97d32faecc1df7e03c9ec7960 -Author: Wendy Wang -Date: Mon Jun 9 16:36:47 2014 +0800 - - Fixed the review issues for pm_rc6_residency IGT case - - Why need add rc6_residency_counter subtest case: - RC6 feature support residency counter,from power consumption aspect, - the counter closer to 1,the better.If the counter is < 0.9, the residency - is not good and will impact power consumption value, if the counter is > 1, - sysfs file is inaccurate. - - Attach the test result message: - root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency - IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64) - Subtest rc6-residency-check: SUCCESS - This machine doesn't support rc6pp - This machine doesn't support rc6p - The residency counter : 0.987000 - This machine entry rc6 state. - Subtest rc6-residency-counter: SUCCESS - - root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --run-subtest rc6-residency-counter - IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64) - This machine doesn't support rc6pp - This machine doesn't support rc6p - The residency counter : 0.987000 - This machine entry rc6 state. - Subtest rc6-residency-counter: SUCCESS - - root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --run-subtest rc6-residency-check - IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64) - Subtest rc6-residency-check: SUCCESS - - root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --list - rc6-residency-check - rc6-residency-counter - - Run as non-root - [haha@x-pk home]$ ./pm_rc6_residency - IGT-Version: 1.6-g18d2130 (x86_64) (Linux: 3.13.0-rc3_drm-intel-nightly_639e4d_20131210+ x86_64) - No intel gpu found - Subtest rc6-residency-check: SKIP - Subtest rc6-residency-counter: SKIP - - Run on non-intel platform - [root@x-pk5 home]# ./pm_rc6_residency - IGT-Version: 1.6-g18d2130 (x86_64) (Linux: 3.13.0-rc3_drm-intel-nightly_639e4d_20131210+ x86_64) - Test requirement not met in function read_rc6_residency, file pm_rc6_residency.c:77: - Last errno: 2, No such file or directory - Test requirement: (!(file)) - Subtest rc6-residency-check: SKIP - Subtest rc6-residency-counter: SKIP - - Signed-off-by: Wendy Wang - Signed-off-by: Daniel Vetter - -commit f4a7bd3b03418c140b7de76d1f35ea553a735e33 -Author: Daniel Vetter -Date: Mon Jun 16 23:54:43 2014 +0200 - - Revert "Revert "Add rc6_residency_counter subtest"" - - This reverts commit 35554a1bcaaea55c1cfa88c0176c58d2fb3b8013. - - Apparently people are too unhappy with this. - - Signed-off-by: Daniel Vetter - -commit d96490af9955875d2ca1a04219d5ef928fb07c94 -Author: Thomas Wood -Date: Mon Jun 16 16:21:35 2014 +0100 - - lib: add missing includes to headers - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 5874daddc4976ba3756b6e37466a0205b2359048 -Author: Thomas Wood -Date: Mon Jun 16 16:12:21 2014 +0100 - - lib: ensure igt_display_init clears the memory for the display struct - - Add the call to memset that was accidentally removed in: - - commit 1e9e1baba389fe498be12390ceeeacb1d141a5cf - Author: Daniel Vetter - Date: Thu Mar 13 17:20:05 2014 +0100 - - lib/igt_kms: rip out custom verbose loggin support - - Instead just piggy-pack on top of igt_log. - - Signed-off-by: Daniel Vetter - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 5f89d6f41fd5c4f6a1cd3b6da708b99a8efe8e64 -Author: Tim Gore -Date: Mon Jun 16 09:38:09 2014 +0100 - - intel-gpu-tools: remove the --cmd option from gem_seqno_wrap - - gem_seqno_wrap was not being built on Android because it uses - wordexp which is not in Bionic. - After discussion with Mika Kuoppala (the test author) it seems - that wordexp was used to implement the --cmd option that was - really only intended for use during development of the test and - is no longer needed. So I have removed support for this option - and enabled this test for Android. - - Signed-off-by: Tim Gore - Reviewed-by: Mika Kuoppala - [danvet: Resolve conflicts with cocci run.] - Signed-off-by: Daniel Vetter - -commit eb36fc993d7ae1988c80ba5b767989059c91d0ec -Author: Chris Wilson -Date: Mon Jun 16 10:49:16 2014 +0100 - - igt/gem_exec_big: Update to new igt_assert_eq - - Use igt_assert_eq for better test output on failures. - - Signed-off-by: Chris Wilson - -commit 6c4b93fdbc879f95a9843f0ad7a959265b6783f1 -Author: Chris Wilson -Date: Mon Jun 16 09:01:52 2014 +0100 - - igt/gem_exec_parse: Convert to igt_assert_eq - - For better test output on failure. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=80083 - Signed-off-by: Chris Wilson - -commit 8c1566e2d9cdcdaa94728516b8e6839545fc396c -Author: Ville Syrjälä -Date: Tue Oct 29 18:17:39 2013 +0200 - - tools/intel_display_poller: Add a new tool that will poll various display registers - - intel_poller can be used to poll various display registers - (IIR,scanline/pixel/flip/frame counter, live address, etc.). - - It can be used to determine eg. at which scanline or pixel count certain - events occur. - - v2: s/intel_poller/intel_display_poller/ - - Signed-off-by: Ville Syrjälä - -commit 71874f4a52878caabe5c2ccd499bab41633fa156 -Author: Ville Syrjälä -Date: Tue Jun 10 21:28:10 2014 +0300 - - tools: Add intel_iosf_sb_{read,write} tools - - Add generic tools to poke at IOSF sideband. The user needs to - manually specify SB port as well as the register. - - TODO: Maybe add symbolic names for the units? Would avoid having - to trawl the docs for the magic hex value. - - Signed-off-by: Ville Syrjälä - -commit a49906e26616c405d41631d5e1b0be0a366d2c30 -Author: Ville Syrjälä -Date: Wed Jun 11 19:21:27 2014 +0300 - - lib/igt_debufs: Add IGT_NO_FORCEWAKE environment variable - - If IGT_NO_FORCEWAKE is set, skip the forcewake open. Useful when you - want to poke at register without otherwise disturbing the GPU. - - Signed-off-by: Ville Syrjälä - -commit aba3582bb402b5cb5e48d81c5e32231fa42634d7 -Author: Ville Syrjälä -Date: Wed Jun 11 19:20:19 2014 +0300 - - lib/igt_debugfs: Don't fail if debugfs is already mounted - - Remove the igt_assert() from the debugfs mount. It will fail if debugfs - is already mounted. With the assert in place it's very annying to use - igt without i915 loaded (eg. to dump BIOS configured registers). - - Signed-off-by: Ville Syrjälä - -commit c9c554594ef074b9149f84da8fb42c9ea629c027 -Author: Daniel Vetter -Date: Fri Jun 13 18:27:59 2014 +0200 - - tests: run igt.cocci - - Re-run with correct igt_fail rules. Again manually fixup missing - includes for igt_core.h. - - Signed-off-by: Daniel Vetter - -commit 87042d671fba3c76786171a8037515979e977d9d -Author: Daniel Vetter -Date: Fri Jun 13 16:23:10 2014 +0200 - - NEWS: Mention igt.cocci - - And also pimp the spatch file itself with usage hints. - - Signed-off-by: Daniel Vetter - -commit 2347e6d21eb1431479358955007a4c78430173d8 -Author: Daniel Vetter -Date: Fri Jun 13 18:01:33 2014 +0200 - - lib: Introduce igt_fail_on/_f - - I've yet again totally screwed things up (this time automated with - cocci even, but not yet pushed luckily). So finally add a new version - for easier conversion and adjust the cocci script. - - Signed-off-by: Daniel Vetter - -commit 46811c849a79892f6d0a63ae5425e59989244978 -Author: Daniel Vetter -Date: Fri Jun 13 15:45:30 2014 +0200 - - lib/igt.cocci: Also add rule to use igt_warn_on_f - - Signed-off-by: Daniel Vetter - -commit 9eb9345f9949f26bd4a5cae33a10809c5d05fe21 -Author: Daniel Vetter -Date: Fri Jun 13 15:45:12 2014 +0200 - - lib/igt.cocci: Convert abort() to igt_fail - - abort should only be used for internal library checks - using - abort() we get a "crash" result, using igt_fail we get "fail" - in piglit. - - Signed-off-by: Daniel Vetter - -commit bde52d1a08a7aeb9afe1e6cf642ba764674059da -Author: Daniel Vetter -Date: Fri Jun 13 15:41:28 2014 +0200 - - lib/igt.cocci: Conversion to igt logging - - Also update old hunks to match on igt logging instead of fprintf. - - v2: Don't forget about perror. - - Signed-off-by: Daniel Vetter - -commit 6b73a9a2887fb45fc43b75c918daf0b50d2a44b9 -Author: Daniel Vetter -Date: Fri Jun 13 15:32:50 2014 +0200 - - tests: Don't use stderr for informational messages - - These should go to stdout instead. The next patch will clean this up - with cocci, so no change from fprintf(stdout, to printf( here. - - Signed-off-by: Daniel Vetter - -commit 652e5441504ddded9d6b138cd6df3447ed9b2e74 -Author: Daniel Vetter -Date: Fri Jun 13 15:19:09 2014 +0200 - - tests/pm_psr_sink_crc: Fix longjmp fun - - igt_fixture and igt_subtests use longjmp/setjmp internally, which - means local variables at the same stack frame are at risk. Best - practice is to move them out right in front of the igt_main block. - - It would be awesome if someone could come up with a cocci patch to - auto-fix this, but unfortunately my attempts failed. - - Signed-off-by: Daniel Vetter - -commit ac0e606677823d27836708300a2c5ee05d24b458 -Author: Daniel Vetter -Date: Fri Jun 13 18:03:50 2014 +0200 - - Revert "tests: Run igt.cocci over tests" - - This reverts commit 6903ab04e5f9048e3932eb3225e94b6a228681ba. - - The igt_assert conversion rule is broken and doesn't invert the check - as it should. - - Signed-off-by: Daniel Vetter - -commit bfede4ed2b401069c3130399ff5c2580e6ccbf77 -Author: Chris Wilson -Date: Fri Jun 13 15:46:33 2014 +0100 - - igt/gem_fence_upload: Exercise contention on the fault handler - - Signed-off-by: Chris Wilson - -commit 6903ab04e5f9048e3932eb3225e94b6a228681ba -Author: Daniel Vetter -Date: Fri Jun 13 11:06:18 2014 +0200 - - tests: Run igt.cocci over tests - - Cocci is awesome - - Signed-off-by: Daniel Vetter - -commit 66b31b6e196bdb869a7bd3e29d86dd9712606601 -Author: Daniel Vetter -Date: Fri Jun 13 11:16:28 2014 +0200 - - lib: add igt.cocci - - Small start but useful to collect refactorings/simplifications for - common igt patterns. Please add more if you stumble over some so that - we can occasionally run this to clean up the tests. - - I haven't figured out yet how to do the assert_cmpint->assert_eq - transformation. - - Run this with - - spatch --sp-file lib/igt.cocci --in-place tests/*.c - - Signed-off-by: Daniel Vetter - -commit 3448b5ad4b2536c1eca3ecc5060739ea8dbec1e5 -Author: Daniel Vetter -Date: Fri Jun 13 10:46:55 2014 +0200 - - lib/igt_core: Add igt_assert_eq - - Suggested by Chris Wilson. Not yet rolled out since I'm trying to use - cocci for this. - - Signed-off-by: Daniel Vetter - -commit b4c1f2ea0fc3fc3e361c26a83dc9468682a3c8e0 -Author: Daniel Vetter -Date: Fri Jun 13 10:23:01 2014 +0200 - - tests/prime_self_import: Use igt_assert_cmpint - - Signed-off-by: Daniel Vetter - -commit ea0116cdcd36f208ff7b5312e7684db85f395de3 -Author: Daniel Vetter -Date: Fri Jun 13 10:18:24 2014 +0200 - - tests/kms_psr_sink_crc: Skip properly - - Aside: The test has way too many bool return values that are then - always checked with igt_assert. Imo cleaner to switch to a more - declarative approach and shovel the igt_assert/require into those - functions instead. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79962 - Signed-off-by: Daniel Vetter - -commit c1192c4db48f4329a97d2e72dd8d97920164c63a -Author: Chris Wilson -Date: Thu Jun 12 17:01:02 2014 +0100 - - igt/gem_fence_upload: Throw some threads into the mix - - Signed-off-by: Chris Wilson - -commit d242f2e2a31fdc9887cc34cda0eeb92f7dc70d20 -Author: Chris Wilson -Date: Thu Jun 12 11:50:01 2014 +0100 - - igt/gem_mmap_gtt: Exercise concurrent pagefaulting - - This should hit the BUG inside remap_pfn_range in - - commit c5158fabeaf53ed2c614c3333aaa4b3cce80f500 - Author: Chris Wilson - Date: Tue Jun 10 12:14:41 2014 +0100 - - [ 27.767634] kernel BUG at mm/memory.c:2315! - [ 27.767655] invalid opcode: 0000 [#1] SMP - [ 27.767679] Modules linked in: cpufreq_userspace cpufreq_powersave cpufreq_stats cpufreq_conservative binfmt_misc nfs lockd fscache sunrpc hid_generic usbhid hid x86_pkg_temp_thermal microcode i2c_i801 lpc_ich mfd_core battery acpi_cpufreq evdev processor ac loop ehci_pci xhci_hcd ehci_hcd sr_mod usbcore cdrom usb_common fan thermal - [ 27.767872] CPU: 3 PID: 912 Comm: gem_mmap_gtt Not tainted 3.15.0-rc8+ #953 - [ 27.767903] Hardware name: Intel Corporation Shark Bay Client platform/Flathead Creek Crb, BIOS HSWLPTU1.86C.0109.R03.1301282055 01/28/2013 - [ 27.767956] task: ffff880448415010 ti: ffff88044d22c000 task.ti: ffff88044d22c000 - [ 27.767988] RIP: 0010:[] [] remap_pfn_range+0x2a4/0x400 - [ 27.768033] RSP: 0000:ffff88044d22fc28 EFLAGS: 00010282 - [ 27.768057] RAX: 0000000000020002 RBX: 00000000000a3b57 RCX: ffff880448b73fe8 - [ 27.768088] RDX: 0000000000000002 RSI: ffff880000000000 RDI: ffffea000efe8158 - [ 27.768119] RBP: ffff88044d22fcd8 R08: 00007fc7b57fe000 R09: 00007fc7b57fe000 - [ 27.768150] R10: 00000000000001fd R11: 0000000000000a9a R12: ffffea000efe8128 - [ 27.768180] R13: 0000000000000001 R14: 00007fc7b57fd000 R15: 800000000000002f - [ 27.768212] FS: 00007fc7977fc700(0000) GS:ffff88045e380000(0000) knlGS:0000000000000000 - [ 27.768246] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 - [ 27.768272] CR2: 00007fc7b67fd000 CR3: 000000044866c000 CR4: 00000000001407e0 - [ 27.768303] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 - [ 27.768333] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 - [ 27.768363] Stack: - [ 27.768374] ffff880448bbb6f8 00000000ffffffff 00007fc7b57fdfff 00007fc7b57fdfff - [ 27.768414] 00007fc7b57fe000 ffff88044866c7f8 ffff8804496b08f0 00007fc7b57fdfff - [ 27.768454] fffffff8038ee35a 0000000000001000 ffff88044c208180 00007fc7b57fe000 - [ 27.768494] Call Trace: - [ 27.768511] [] i915_gem_fault+0x337/0x340 - [ 27.768538] [] __do_fault+0x34/0x70 - [ 27.768565] [] ? wake_up_process+0x1e/0x40 - [ 27.768592] [] do_shared_fault.isra.96+0x2c/0x1f0 - [ 27.768623] [] ? rwsem_down_read_failed+0xe5/0x130 - [ 27.768654] [] ? __rwsem_do_wake+0x129/0x160 - [ 27.768682] [] handle_mm_fault+0x2b5/0xb80 - [ 27.768712] [] ? call_rwsem_down_read_failed+0x14/0x30 - [ 27.768745] [] __do_page_fault+0x167/0x4c0 - [ 27.768774] [] ? pick_next_task_fair+0x700/0x870 - [ 27.768804] [] ? __schedule+0x27b/0x860 - [ 27.768831] [] do_page_fault+0xc/0x10 - [ 27.768857] [] page_fault+0x22/0x30 - [ 27.768881] Code: 4d 85 ed 49 0f 44 d7 80 cc 02 49 81 c6 00 10 00 00 48 83 c3 01 48 83 c1 08 48 09 d0 48 89 41 f8 4d 39 f0 74 32 48 83 39 00 74 c4 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 48 39 37 75 63 48 8b 45 c8 - [ 27.769081] RIP [] remap_pfn_range+0x2a4/0x400 - [ 27.769113] RSP - - Signed-off-by: Chris Wilson - -commit 8a23da43d4eb502375620b53d11d36797447a309 -Author: Thomas Wood -Date: Wed Jun 11 17:13:39 2014 +0100 - - docs: remove unused annotation glossary include - - API annotations are not used anywhere in the documentation, so the - annotation glossary is not built. - - Signed-off-by: Thomas Wood - -commit cd714f93e833284b1710e58d21240a3e21adec2a -Author: Thomas Wood -Date: Wed Jun 11 15:32:14 2014 +0100 - - docs: always rebuild the sections file - - Always rebuild the sections file since it currently doesn't contain any - custom modifications. - - Signed-off-by: Thomas Wood - -commit bbd014e1632f4e906bb9c2386174eca8fa263bac -Author: Thomas Wood -Date: Wed Jun 11 11:46:39 2014 +0100 - - docs: add private headers to IGNORE_HFILES - - Signed-off-by: Thomas Wood - -commit 52a3a2e205da1679487a99699713dee240437255 -Author: Thomas Wood -Date: Mon Jun 9 17:23:21 2014 +0100 - - lib: various documentation fixes - - Fix some documentation comments and mark some struct members private. - - Signed-off-by: Thomas Wood - -commit 25663d9fe3d6e762132022e1af651a99f9b928a3 -Author: Thomas Wood -Date: Mon Jun 9 14:45:44 2014 +0100 - - gitignore: add missing files and keep lists sorted - - Signed-off-by: Thomas Wood - -commit 3dd7ad14d3322a727365745e94cbe46975acc423 -Author: Thomas Wood -Date: Mon Jun 9 14:05:42 2014 +0100 - - README: update the section on modifying and rebuilding documentation - - Signed-off-by: Thomas Wood - -commit 1e5c8780d03f78c17963108896354296f7313c61 -Author: Thomas Wood -Date: Mon Jun 9 14:02:04 2014 +0100 - - lib: remove /** from comments that are not API documentation - - These comments are not gtk-doc comments, so replacing /** with /* - prevents any gtk-doc warnings. - - Signed-off-by: Thomas Wood - -commit 6d28f6a91a7a6db36a58e1fa81ef6d8358104b26 -Author: Thomas Wood -Date: Mon Jun 9 13:35:21 2014 +0100 - - README: update piglit instructions - - Piglit now has a top level "piglit" command and the location of the - tests can now be read from an environment variable. - - Signed-off-by: Thomas Wood - -commit c54ee9819a4aa9ba521f67e4a58ea2de87dc7485 -Author: Thomas Wood -Date: Fri Jun 6 15:28:50 2014 +0100 - - quick_dump: read the architecture files for items to add to EXTRA_DIST - - Each architecture file contains a list of the text files it requires, so - use this to add to the list of files to distribute. - - Signed-off-by: Thomas Wood - -commit e10c9a730d840d4e1867374e41a58f97d6086371 -Author: Daniel Vetter -Date: Thu Jun 12 09:05:55 2014 +0200 - - tests/gem_fence_upload: Fix test wrapper - - - tests with subtests need to be in the _M target for correct - enumeration. - - - No need for igt_exit when using the igt_(simple_)main wrappers. - - Signed-off-by: Daniel Vetter - -commit 618aca1fb9649012910acbaa79a917ff4f3ff19b -Author: Daniel Vetter -Date: Thu Jun 12 09:04:20 2014 +0200 - - lib/intel_os: Spelling fix - - Signed-off-by: Daniel Vetter - -commit c62ce339f2d57e4be632d9bcea785ff087326bd9 -Author: Chris Wilson -Date: Mon Feb 3 15:52:00 2014 +0000 - - tests: add gem_fence_upload - - This test demonstrates the performance cliff clients face when they - unwittingly use too many fenced surfaces in a looped upload. - - Signed-off-by: Chris Wilson - -commit 27d37a1f1034630a62bfbbb0235db1b0bcea98ac -Author: Rodrigo Vivi -Date: Wed Mar 19 22:43:51 2014 -0300 - - tests/kms_psr_sink_crc: Create test to test PSR by checking panel CRC. - - v2: Wait psr enable with timeout and more subtest added. - v3: Add wait for v_blank leeting test more reliable and preparing to - add Baytrail per-pipe tests. - v4: Call busy_ioctl on mmap_gtt to match the real usage and remove the need - of inactivate on set_domain, what was semantically wrong. - v5: Adding more test cases to cover mmap_gtt with and without followed by - busy ioctl and also without busy and waiting 10 seconds between - set_domain and actual write. - v6: rebase after kms_plane added and debugfs api changed. - Plus adding more test cases. - v7: Some rework and sprite test added - - Signed-off-by: Rodrigo Vivi - -commit 8c4dd1d898aa8ff9cea63d574be575a8f9325ff7 -Author: Damien Lespiau -Date: Fri May 31 15:33:21 2013 +0100 - - list-workarounds/chv: Add Cherryview to the list of valid platorms - - Signed-off-by: Damien Lespiau - -commit 35554a1bcaaea55c1cfa88c0176c58d2fb3b8013 -Author: Daniel Vetter -Date: Tue Jun 10 11:05:16 2014 +0200 - - Revert "Add rc6_residency_counter subtest" - - This reverts commit 9a70e29f8380c2fc6f9b43757c68e24bf2619061. - - Patch needs polish and after a quick irc discussion Ben&I agreed that - the revert is in order. - - Signed-off-by: Daniel Vetter - -commit 4e9df4fe5fef283c23e62fd7348fae4943a9fa6b -Author: Ville Syrjälä -Date: Tue Jun 10 14:51:44 2014 +0300 - - tests/kms_fbc_crc: Update blit code for BDW - - Switch to XY_COLOR_BLT from COLOR_BLT and use the appropriate - macros to make the code work on BDW. - - Also make the blit 8bpp instead if 16bpp. 8bpp is what it was - supposed to use all along. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76307 - Signed-off-by: Ville Syrjälä - -commit 210d20f413626321c0c1650b97d1cb0f0b400c2d -Author: Chris Wilson -Date: Tue Jun 10 14:29:00 2014 +0100 - - API docs for intel_check_memory() - - Signed-off-by: Chris Wilson - -commit 0617b0b3b897f7a070466af400da55e2b234e9be -Author: Daniel Vetter -Date: Tue Jun 10 08:18:37 2014 +0200 - - NEWS: post-release bump - -commit 32bb5d9f150bc953dbed4636ded2758be03a739c -Author: Rodrigo Vivi -Date: Mon Jun 9 11:30:15 2014 -0700 - - bump version to 1.7 and add the release date - - Signed-off-by: Rodrigo Vivi - -commit 82ad15fd1040a0457ebe22edabfaa69c44577412 -Author: Rodrigo Vivi -Date: Mon Jun 9 11:15:47 2014 -0700 - - Fix make distclean by fixing includes of version.h - - Actually only the igt_core was breaking the make distcheck, - but let's make it consistent and let the code cleaner. - - Credits-to: Reviewed-by: Ben Widawsky - Signed-off-by: Rodrigo Vivi - -commit 5a856e11fc84ec9e087aa1c52a492eb81b2c1985 -Author: Rodrigo Vivi -Date: Mon Jun 9 10:48:10 2014 -0700 - - null_state_gen: Fix Makefile.am for make distcheck - -commit 9bddb5eebd9819c4892fec72d6d5b6e2e2496b8b -Author: Rodrigo Vivi -Date: Mon Jun 9 10:47:13 2014 -0700 - - quick_dump: Fix vlv file names on Makefile.am - -commit 18d2130110331e45423dff96aeec3ea802fa0857 -Author: Chris Wilson -Date: Fri Jun 6 08:43:08 2014 +0100 - - igt/gem_evict_alignment: Fix the memory limits checking - - We actually allocate twice as many bo as needed to fill the aperture to - cause ENOSPC, but the entire payload has to still fit into RAM. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75138 - Signed-off-by: Chris Wilson - -commit 39329479a51768e64cf710bc14b50803446e554d -Author: Chris Wilson -Date: Fri Jun 6 08:43:08 2014 +0100 - - igt/gem_evict_alignment: Fix the memory limits checking - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75138 - Signed-off-by: Chris Wilson - -commit 033c400e9bd53f95cccff3524c79a298c81bd3da -Author: Chris Wilson -Date: Fri Jun 6 08:40:36 2014 +0100 - - igt/gem_evict_alignment: Remove obsolete skip on gen8+ - - If the BLT commands, aren't fixed yet, they should be. ASAP. - - Signed-off-by: Chris Wilson - -commit 9a70e29f8380c2fc6f9b43757c68e24bf2619061 -Author: Wendy Wang -Date: Thu Jun 5 10:27:42 2014 +0800 - - Add rc6_residency_counter subtest - - Move rc6_residency_check to subtest, add new rc6_residency_counter subtest - for pm_rc6_residency IGT case. - - Test results run on platforms show as below: - On HSW - --------------------------------------- - [root@x-hswu opt]# ./pm_rc6_residency - IGT-Version: 1.6-g35b31df (x86_64) (Linux: 3.15.0-rc3_drm-intel-nightly_0791a3_20140520+ x86_64) - Subtest rc6-residency-check: SUCCESS - This machine doesn't support rc6pp - This machine doesn't support rc6p - This machine entry rc6 status. - The residency counter : 0.999667 - Subtest rc6-residency-counter: SUCCESS - - On IVB - ---------------------------------------- - [root@IVB tests]# ./pm_rc6_residency - IGT-Version: 1.6-g35b31df (x86_64) (Linux: 3.13.6_20140318+ x86_64) - Subtest rc6-residency-check: SUCCESS - This machine entry rc6p status. - The residency counter : 0.997000 - Subtest rc6-residency-counter: SUCCESS - - On BYT - ---------------------------------------- - root@x-byt:/opt# ./pm_rc6_residency - IGT-Version: 1.6-g0d39021 (x86_64) (Linux: 3.14.0_kcloud_ceabbb_20140521+ x86_64) - Subtest rc6-residency-check: SUCCESS - This machine doesn't support rc6pp - This machine doesn't support rc6p - The residency counter : 1.144333 - Test assertion failure function rc6_residency_counter, file pm_rc6_residency.c:131: - Last errno: 0, Success - Failed assertion: counter_result <=1 - Debug files must be wrong, - Subtest rc6-residency-counter: FAIL - - On BDW - --------------------------------------- - [root@x-bdw01 opt]# ./pm_rc6_residency - IGT-Version: 1.6-g0d39021 (x86_64) (Linux: 3.15.0-rc5_drm-intel-nightly_367653_20140521+ x86_64) - Subtest rc6-residency-check: SUCCESS - This machine doesn't support rc6pp - This machine doesn't support rc6p - The residency counter : 0.994333 - This machine entry rc6 state. - Subtest rc6-residency-counter: SUCCESS - - Signed-off-by: Liu, Lei A - Signed-off-by: Wendy Wang - Signed-off-by: Ben Widawsky - -commit b428f24f7caa1286cdcf0794078547f3b27e69b3 -Author: Chris Wilson -Date: Thu Jun 5 13:33:25 2014 +0100 - - lib: Add debug to memory limits checks - - Signed-off-by: Chris Wilson - -commit a1a8aa16fb4e27a267f4ac12883419114a020dd7 -Author: Chris Wilson -Date: Thu Jun 5 13:19:39 2014 +0100 - - igt/gem_evict_everything: Compute number of surfaces to saturate the aperture - - The goal is to only fill the aperture, not all of memory, so fine-tune - the computed number of surfaces, hopefully avoiding an integer overflow - in the process. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=79573 - Signed-off-by: Chris Wilson - -commit 5141b21f915ce7e857bcacbd1eb4ec9eebf3fe93 -Author: Daniel Vetter -Date: Thu Jun 5 10:28:09 2014 +0200 - - lib/igt_debugfs: Fix spelling docs - - Signed-off-by: Daniel Vetter - -commit badb026ae0943d401a944d0d0fc09a7977315fe5 -Author: Kenneth Graunke -Date: Tue Jun 3 14:52:30 2014 -0700 - - rendercopy/gen8: Also emit 3DSTATE_WM_DEPTH_STENCIL. - - rendercopy was failing to emit 3DSTATE_WM_DEPTH_STENCIL, which is a new - packet on Broadwell. Mesa emits this packet. - - This appears to fix various tests on a fresh boot, when Mesa has never - run. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78890 - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78891 - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78935 - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78936 - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78937 - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78938 - Signed-off-by: Kenneth Graunke - Reviewed-by: Ben Widawsky - Tested-by: Guo Jinxian - Signed-off-by: Ben Widawsky - -commit 11e62a3927e415f88dae3519578d9bba8def3128 -Author: Ville Syrjälä -Date: Wed May 28 20:05:59 2014 +0300 - - tests/kms_flip: Move EBUSY to a new busy-flip subtest - - The EBUSY checking is very fragile currently in case there's any kind - extra delay in the test loop. At least the flip-vs-rmfb fails reliably - on my IVB. - - So to make the test less fragile remove the EBUSY check from all the - current flip tests, and instead add a specific busy-flip test. To - better guarantee that we get the EBUSY add a blocking vblank wait just - before we issue the first flip. This maximizes the time we have to - submit two flips during one frame. - - Reviewed-by: Daniel Vetter - Signed-off-by: Ville Syrjälä - -commit ddf92db9147375a4d0fc3ee861519bc1d6b0214b -Author: Tim Gore -Date: Wed Jun 4 09:32:54 2014 +0100 - - intel-gpu-tools: move kms_fence_pin_leak to single test list - - In Makefile.sources, kms_fence_pin_leak was in the "Multi" test list, - ie tests with subtests, whereas it is actually simple/single test. - This was confusing the Android script for enumerating tests. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit 1451df1cb692bf04e5733b5d9ea00d0757f257a4 -Author: Imre Deak -Date: Tue Jun 3 16:52:48 2014 +0300 - - quick_dump: increase reg name column width - - Needed by the new long audio register names. - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit ea43f5163a01d9bb2b7fd23dd6316c9f863ded86 -Author: Imre Deak -Date: Tue Jun 3 16:04:47 2014 +0300 - - quick_dump: vlv: remove redundant base file specifications - - The registers in these files are included in the dumps for all platforms - by default, so no need to specify them explicitly. - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit 24cd3843cb222cc17f446315b0bce813a14758c8 -Author: Imre Deak -Date: Tue Jun 3 15:44:27 2014 +0300 - - quick_dump: vlv: move flisdsi register group to its logical place - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit 75b921688d0105743ef14783eed4ceda9d01baeb -Author: Imre Deak -Date: Tue Jun 3 15:55:11 2014 +0300 - - quick_dump: vlv: add missing dpio phy registers - - Also move the phy register block to its logical place. - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit 9da08fed032a8560959ff306cd862d44f26ed46f -Author: Imre Deak -Date: Tue Jun 3 14:26:30 2014 +0300 - - quick_dump: vlv: add missing display registers - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit 92378d3b778c408999a3dd84698038e681692fa0 -Author: Imre Deak -Date: Tue Jun 3 16:11:52 2014 +0300 - - quick_dump: chv: add misc gen7 GT registers - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit 861cea8b5245776c7ea9515b02d20449395a3132 -Author: Imre Deak -Date: Tue Jun 3 02:02:24 2014 +0300 - - quick_dump: chv: add dsi (mipi) registers - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit a4b53d2125a68d431587ae5f004e028ef181290f -Author: Imre Deak -Date: Tue Jun 3 01:59:45 2014 +0300 - - quick_dump: vlv: clean up dsi (mipi) registers - - Split out the base offset into the third argument and rename MIPIB to - MIPIC to match the display cluster register HAS. - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit a115c4820802508733cdf7100f4de63c8d3dc50f -Author: Ville Syrjälä -Date: Fri Mar 21 10:07:43 2014 -0700 - - quick_dump: chv: add full dpio phy dumps - - Signed-off-by: Ville Syrjälä - Reviewed-by: Imre Deak - -commit e23f1fdfeed49f0b61b528940effefc089f008d2 -Author: Ville Syrjälä -Date: Fri Mar 21 01:51:29 2014 -0700 - - quick_dump: chv: add display registers - - Signed-off-by: Ville Syrjälä - [imre: add audio regs] - Reviewed-by: Imre Deak - -commit 6d2577c74117e0f246152d2a16c96626c496a824 -Author: Ville Syrjälä -Date: Wed May 28 18:45:27 2014 +0300 - - quick_dump: chv: add detection support - - Signed-off-by: Ville Syrjälä - Reviewed-by: Imre Deak - -commit 9a642a72873c2df8a0c8ad8b63e25e42b1646382 -Author: Ville Syrjälä -Date: Wed May 28 18:23:07 2014 +0300 - - quick_dump: add support for accessing the dpio phy 2 registers - - Signed-off-by: Ville Syrjälä - Reviewed-by: Imre Deak - -commit 0f906083f2a2248355f799948188aa8c010585d2 -Author: Ville Syrjälä -Date: Wed May 28 18:26:39 2014 +0300 - - lib/intel_iosf: add second phy support - - Signed-off-by: Ville Syrjälä - Reviewed-by: Imre Deak - -commit 82fcb90619491af13675d8c08e5d1b6bf07a781b -Author: Imre Deak -Date: Mon Jun 2 15:48:27 2014 +0300 - - quick_dump: allow passing display base as the third argument - - Signed-off-by: Ville Syrjälä - Reviewed-by: Imre Deak - -commit 4e696ff8c9567051467c922f5abb4f8b64196b5c -Author: Ville Syrjälä -Date: Wed May 28 18:32:39 2014 +0300 - - quick_dump: pass register offsets as int - - Signed-off-by: Ville Syrjälä - [imre: fix s/regi/intreg/ typo] - Reviewed-by: Imre Deak - -commit 76bc5fdf46ce003f3f370998c1b3ed45fe8775c3 -Author: Imre Deak -Date: Tue Jun 3 16:44:41 2014 +0300 - - quick_dump: fix typo breaking dpio reg dumps - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - -commit 4f0bb3147079b6a8b49ccf1b3b3b6fbf13e64f11 -Author: Imre Deak -Date: Tue Jun 3 16:03:50 2014 +0300 - - quick_dump: make autodetect the default option - - Signed-off-by: Imre Deak - Reviewed-by: Ville Syrjälä - Very-much-wanted-by: Daniel Vetter - -commit 73c40324159b1fda9db3d8c34c47a722977d213d -Author: Tim Gore -Date: Tue Jun 3 15:18:31 2014 +0100 - - intel-gpu-tools: remove testdisplay.h from kms_render.c - - kms_render.c included testdisplay.h but did not need it. - This was preventing it from building on Android due to the - lack of a Glib port. So I have removed this #include and - changed Android.mk so that kms_render is built if we have - cairo. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit 0dc8794fc07faf8f2b008f98fd8ef6ed04300119 -Author: Tim Gore -Date: Tue Jun 3 15:05:56 2014 +0100 - - intel-gpu-tools: re-enable gem_exec_params on Android - - The missing macro that was preventing the gem_exec_params - test from building is now in i915_drm.h, in ABT at least, - and this test can now build. So I have removed it from the - skip list in Android.mk - - For Gmin I have added a patch for i915_drm.h to the Wiki - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit d60d4c80e5dbdab0baa5b45c3849262d982e3856 -Author: Mika Kuoppala -Date: Thu Apr 10 15:15:13 2014 +0300 - - tools/null_state_gen: generate null render state - - Generate valid (null) render state for each gen. Output - it as a c source file with batch and relocations. - - v2: noinst and vs_start fixed for BDW GT3 (Damien Lespiau) - - Acked-by: Damien Lespiau - Signed-off-by: Mika Kuoppala - -commit a384e55b49dce17eff1945536f957546bc7902cf -Author: Chris Wilson -Date: Tue Jun 3 07:31:49 2014 +0100 - - igt/gem_evict_everything: Move assertion - - If we move the assertion from out of the callback, we can get a much - more useful error message. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=79573 - Signed-off-by: Chris Wilson - -commit 21fb118f3b3f16f9cdc6cadf68204e745f0a8a68 -Author: Antti Koskipaa -Date: Mon Jun 2 13:43:18 2014 +0300 - - kms_cursor_crc: Test cursor size change ioctl - - Now that we support cursor changes other than 64x64, a bug was found - where the size change was only applied at cursor enable time, rather - than at every update. Add a testcase for that. - - Signed-off-by: Antti Koskipaa - Signed-off-by: Daniel Vetter - -commit 532b7e61e0316b94b280efc2199ef121ced1959c -Author: Daniel Vetter -Date: Wed May 28 16:19:16 2014 +0200 - - NEWS: Fix spelling a bit - -commit aeb3d8897738559b6e8bb21b72e4832a8f8ab59e -Author: Daniel Vetter -Date: Wed May 28 16:05:14 2014 +0200 - - NEWS: Don't forget the runtime pm helpers! - -commit 0ee77ce2328d1fe2427e7086e4aa339eeb2ce820 -Author: Daniel Vetter -Date: Wed May 28 16:02:08 2014 +0200 - - NEWS: Updates ... - -commit 707c839a6a0abda7310cf15eeb353a477ac83315 -Author: Damien Lespiau -Date: Wed May 28 14:18:34 2014 +0100 - - build: Don't fail if SWIG isn't found - - People from distros have reported that packaging the newer versions is - more difficult because we now depend on SWIG. We don't have to, it's - needed for the python dumper and is an optional build dependency. - - Signed-off-by: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit 321273ff76fa16aabec0c6b0a63039525a4fec1b -Author: Chris Wilson -Date: Wed May 28 09:01:56 2014 +0100 - - Factor in kernel object overhead when checking available memory for tests - - Signed-off-by: Chris Wilson - -commit e4ba3b75e6de35483b2edea21ceda145ef0b3311 -Author: Ville Syrjälä -Date: Tue May 27 21:33:10 2014 +0300 - - tests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURF - - Make sure DSPSURF will change during the panning operation - in flip-vs-panning-vs-hang. - - This will now test agains bugs between the kernel's mmio vs. - CS flip race handling and GPU resets. If the kernel is buggy - if will fail to notice that the panning operation changed the - base address before the GPU reset had a chance to deal with the - pending page flips, and so the flip would never complete due to - DSPSURFLIVE not matching the expected value. - - Signed-off-by: Ville Syrjälä - Signed-off-by: Daniel Vetter - -commit 3805288f1a28abebb9313b515d5e48ba06350020 -Author: Tim Gore -Date: Tue May 27 16:45:24 2014 +0100 - - intel-gpu-tools: Skip kms_mmio_vs_cs_flip if no cairo - - The kms_mmio_vs_cs_flip test uses igt_kms.c which in turn - uses cairo. So in Android.mk add this test to the skip list - if we dont have cairo - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit ff3c12209893ee8ee0e757d6cf10276596ef0338 -Author: Daniel Vetter -Date: Thu May 22 17:29:48 2014 +0200 - - tests/kms_pipe_crc_basic: Add gpu hang tests - - Currently pipe CRC support is broken after gpu hangs. This tests for - this bug. - - Signed-off-by: Daniel Vetter - -commit f75ec0b452cbebc0375c1bf75f06e0dc8432cd7c -Author: Daniel Vetter -Date: Thu May 22 16:27:44 2014 +0200 - - tests/kms_pipe_crc_basic: Add suspend tests - - Currently broken ... - - Signed-off-by: Daniel Vetter - -commit 6fa1934a1991ec30b4f72359cb51d043b374bf43 -Author: Mika Kuoppala -Date: Tue May 20 11:25:48 2014 +0300 - - tests/drv_hangman: Add subtest for error state capture/dump - - Guarantees that error capture works at a very basic level. - - v2: Also check that the ring object contains a reloc with MI_BB_START - for the presumed batch object's address. - - v3: Chris review comments: - - Move variables to local scope. - - Do not assume there is only one request. - - Some gen encode flags into the BB start address. - Also, use igt_set/get_stop_rings as suggested by Mika Kuoppala. - - v4: Make as a subtest of drv_hangman. - v5: Rebase - - Signed-off-by: Oscar Mateo - Signed-off-by: Mika Kuoppala - -commit 9b0d3481e80670ccc27925a6ada05bb36a665b05 -Author: Mika Kuoppala -Date: Mon May 19 17:42:21 2014 +0300 - - tests/drv_hangman: Convert test from shell script to c - - Mixing script and standlone tests didn't mix well with the - strict i915_ring_stop flags handling. Also squash drv_missed_irq_hang - to the new test. - - v2: - Remove missed irq test (Daniel Vetter) - - gitignore fixed (Oscar Mateo) - - fix check_other_clients to handle dangling fd's - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78322 - Suggested-by: Daniel Vetter - Reviewed-by: Oscar Mateo - Signed-off-by: Mika Kuoppala - -commit 9911f3f0cf202444f1ef2399f5961605880b7360 -Author: Chris Wilson -Date: Thu May 22 10:20:33 2014 +0100 - - igt/gem_userptr_blits: Fix up last minute API changes - - When the patch was merged, the ioctl numbers had to be adjusted to leave - no holes. Also there was a final piece of munging of the API to - downgrade unsynced userptr for export over dma-buf. - - Signed-off-by: Chris Wilson - -commit eb566561e79d00c7ac7b596d428fa26f6de1ec5d -Author: Ville Syrjälä -Date: Mon Apr 14 16:14:40 2014 +0300 - - tests/kms_mmio_vs_cs_flip: Add a test case to exercise mmio vs. CS flip races - - kms_mmio_vs_cs_flip has two subtests: - - setplane_vs_cs_flip tests the interaction between - fullscreen sprites and CS flips - - setcrtc_vs_cs_flip tests the interaction between - primary plane panning and CS flips - - v2: Skip sprite test when there are no sprites - Reduce busy_bo to 64MB (now works on my gen2) - Handle pipe vs. port incompatibility - v3: Handle missing auto pipe crc - - Reviewed-by Rodrigo Vivi - Signed-off-by: Ville Syrjälä - -commit e2ac7a15f195b67a44c474920cd220baab92f6b1 -Author: Daniel Vetter -Date: Thu May 22 09:34:36 2014 +0200 - - tests/kms_sink_crc_basic: Use igt_assert - - Less verbose code makes for clearer test logic. - - Signed-off-by: Daniel Vetter - -commit 0675765eff4a7409afa98734aa0c8fbc02ce5ff6 -Author: Daniel Vetter -Date: Thu May 22 09:32:22 2014 +0200 - - tests/kms_sink_crc_basic: skip properly - - Not running the test is not failing. - - Signed-off-by: Daniel Vetter - -commit f8935351413a23920032604e05802a404b8eaff2 -Author: Daniel Vetter -Date: Thu May 22 09:07:45 2014 +0200 - - Revert "Revert "store_dw_loop: make loops smaller"" - - This reverts commit 3005ac3ee8d7aede73a3e63d2068a6074156ebe5. - - QA has done the testing we've wanted. - - Signed-off-by: Daniel Vetter - -commit c75dcbdac51dcc2d631a4a45049c9421e0229e16 -Author: Daniel Vetter -Date: Tue May 20 15:45:31 2014 +0200 - - tests/kms_flip: various improvements - - - Some debug logging for the ts continuity checks. - - Add a plain vblank-vs-suspend test where kms_flip doesn't switch off - the displays first. - - Ensure that we do at least 2 rounds, the suspend tests bailed out - after 1 round and so didn't test anything. - - Frob the testnames a bit. - - Signed-off-by: Daniel Vetter - -commit 89152791e2ebde5e05c51fc070e3eaa462701f74 -Author: Daniel Vetter -Date: Tue May 20 14:42:12 2014 +0200 - - tests/kms_flip: Add vblank vs. gpu hang testcase - - Currently broken :( - - Signed-off-by: Daniel Vetter - -commit 737d248a127f51d20555de53b9dfe28ca4682b54 -Author: Xiang, Haihao -Date: Tue Mar 25 13:55:14 2014 +0800 - - assembler: distinguish the channel of .z from the condition of .z - - The scratch patch only works for generic register - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75631 - Tested-by: Matt Turner - Signed-off-by: Xiang, Haihao - Signed-off-by: Damien Lespiau - -commit 881afff297835faf67f55ed1e9db596e57fb4cd7 -Author: Xiang, Haihao -Date: Tue Mar 25 13:41:25 2014 +0800 - - assembler: switch the order of swizzle and regtype to match the BNF of the assembly - - Fortunately our existing source didn't use swizzle. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75631 - Tested-by: Matt Turner - Signed-off-by: Xiang, Haihao - Signed-off-by: Damien Lespiau - -commit a6eaa292717f8c8e109ae172d115abea05b5c342 -Author: Imre Deak -Date: Sun May 18 23:37:56 2014 +0300 - - igt/quickdump: vlv: dump FLISDSI regs too - - Signed-off-by: Imre Deak - -commit ad08999794ab883e6755bdf3cdce8ba9ac7a4c6d -Author: Imre Deak -Date: Mon May 19 13:26:35 2014 +0300 - - igt/intel_iosf: rename IOSF sideband opcodes according to the spec - - These opcodes are not specific for an endpoint, but are the same for all - endpoints. So rename them accordingly, using the name the VLV2 sideband - HAS uses. Also move the macros to the .c file, since they aren't used - anywhere else. - - Signed-off-by: Imre Deak - -commit 3005ac3ee8d7aede73a3e63d2068a6074156ebe5 -Author: Daniel Vetter -Date: Mon May 19 18:11:34 2014 +0200 - - Revert "store_dw_loop: make loops smaller" - - This reverts commit f00efff326610fdba92dbc91d951790a3320052e. - - This is a temporary revert since I want QA to first test with the - original testcase whether it got faster again. This is to test the - effects of - - commit 227f782e4667fc622810bce8be8ccdeee45f89c2 - Author: Chris Wilson - Date: Thu May 15 10:41:42 2014 +0100 - - drm/i915: Retire requests before creating a new one - - We should revert this revert again as soon as QA has completed - testing. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=78024 - Cc: Jesse Barnes - Signed-off-by: Daniel Vetter - -commit f00efff326610fdba92dbc91d951790a3320052e -Author: Jesse Barnes -Date: Mon May 19 08:44:12 2014 -0700 - - store_dw_loop: make loops smaller - - These tests are really for catching TLB or GTT mapping failures due to - bad programming in the kernel driver. We've never needed more than a - few pages worth of data write to actually see those. - -commit d71add5c1197706fdd060e7f487293ef8b459d87 -Author: Chris Wilson -Date: Mon May 19 07:26:12 2014 +0100 - - igt/gem_bad_reloc: Refine for limited kernel w/a - - One proposed solution only fixes up the SNA behaviour, so reduce the - test case to probe only that particular pathology. - - Signed-off-by: Chris Wilson - -commit 252d1151a809683b0f6ed2c546358b7375a27f18 -Author: Daniel Vetter -Date: Fri May 16 23:36:25 2014 +0200 - - tests/kms_sink_crc_basic: Put into righ Makefile target - - If it's a simple test, it needs to be in the simple lists. Tests with - subtests go into the _M tests. - - Without that test enumeration is all screwed up. - - Cc: Rodrigo Vivi - Signed-off-by: Daniel Vetter - -commit 542c2b5ed5a2a5beee5912b44f9155ade532dca3 -Author: Oscar Mateo -Date: Fri May 16 14:07:12 2014 +0100 - - tests/kms_flip: test a fb backed by a bo too big/small for its own good - - This is a "review by igt test" for a bug located in - i915_gem_object_pin_to_display_plane and fixed by: - - commit 392013bdd4b6128795e33c84bd6d6d3fd66ff0a3 - Author: Oscar Mateo - Date: Fri May 16 11:23:12 2014 +0100 - - drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display - - Otherwise, we do a NULL pointer dereference. - - I've seen this happen while handling an error in - i915_gem_object_pin_to_display_plane(): - - If i915_gem_object_set_cache_level() fails, we call is_pin_display() - to handle the error. At this point, the object is still not pinned - to GGTT and maybe not even bound, so we have to check before we - dereference its GGTT vma. - - v2: Chris Wilson says restoring the old value is easier, but that - is_pin_display is useful as a theory of operation. Take the solomonic - decision: at least this way is_pin_display is a little more robust - (until Chris can kill it off). - - v2: Avoid code duplication by using igt_create_fb_with_bo_size() as - requested by Ville Syrjälä (original author of the "too big" test idea). - - Signed-off-by: Oscar Mateo - Signed-off-by: Ville Syrjälä - -commit 5bdd4d9b5e371735e0d76339989a9af9bd046702 -Author: Oscar Mateo -Date: Fri May 16 14:07:11 2014 +0100 - - lib/igt_fb: igt_create_fb_with_bo_size - - Useful for testing bigger/smaller fb-wrapped buffer objects. - - Cc: Ville Syrjälä - Signed-off-by: Oscar Mateo - Signed-off-by: Ville Syrjälä - -commit ace8a9e10c7516c7298658a73c3096aa21b5986e -Author: Rodrigo Vivi -Date: Thu May 15 20:13:57 2014 -0400 - - tests/kms_sink_crc_basic: Basic test to verify Sink CRC debugfs. - - v2: rebase after a long time. - - Signed-off-by: Rodrigo Vivi - Signed-off-by: Daniel Vetter - -commit 1c9a5b1a7b63855bc90dfcf371dc0789548ca637 -Author: Daniel Vetter -Date: Fri May 16 10:33:28 2014 +0200 - - tests/pm_pc8 -> pm_rpm rename - - Plus naming convention for runtime pm tests to have "rpm" somewhere in - their tests. Note that all the pc8-specific tests (for e.g. residency - or similar) already have pc8 in their subtest names, so we don't lose - any information here. - - Cc: "Yang, Guang A" - Signed-off-by: Daniel Vetter - -commit 7357639397fd7457149329494f615bb0053b9036 -Author: Daniel Vetter -Date: Thu May 15 17:02:39 2014 +0200 - - tests/pm_pc8: Use igt_assert_cmpint - - More pretty! - - Signed-off-by: Daniel Vetter - -commit 5e83f0444d0fcef2d5996ef12f9cf1593ccd8f78 -Author: Rodrigo Vivi -Date: Thu May 15 14:06:51 2014 -0400 - - tests/gem_bad_reloc: Adding missing include. - - It was breaking compilation. - - Signed-off-by: Rodrigo Vivi - -commit 6797ca8c75dc57f4a5eaa9ca8d6f180fd24491dc -Author: Daniel Vetter -Date: Thu May 15 16:35:32 2014 +0200 - - tests/kms_render: don't loop through modes - - We kinda have testdisplay for this ... and doing this tends to take - forever. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77709 - Signed-off-by: Daniel Vetter - -commit 943511a3ab53df1db5e631bface63bdae663c4c8 -Author: Daniel Vetter -Date: Thu May 15 10:03:11 2014 +0200 - - tests/gem_reg_read: Fix errno check - - So I accidentally fixed a check when converting to the new macros and - the kernel never returned -ENOENT for invalid regs. Adjust the test. - - Signed-off-by: Daniel Vetter - -commit 6727de0c1abe0b2d6d44255dd30a29dc3ee84993 -Author: Daniel Vetter -Date: Wed May 14 17:59:02 2014 +0200 - - tests/kms_flip: nasty power management tests - - These check whether everything is still ok wrt vblank handling after - runtime pm and system suspend-resume. - - In addition to the usual checks they also ensure that the vblank frame - counter isn't totally ridiculous, something Keith complained about - aeons ago. With Ville's drm_vblank_on/off rework this should now be - fixed and solid. - - v2: - - Ignore seq_step, vblanks completely immediately when the crtc goes off - - Only run system suspend/resume tests once. - - Cc: Keith Packard - Signed-off-by: Daniel Vetter - -commit bd521b493e73d987669afbce8da6418e1aed7db6 -Author: Daniel Vetter -Date: Wed May 14 16:10:50 2014 +0200 - - lib/igt_aux: Extract runtime pm helpers from pm_pc8 - - I want to use them elsewhere ... - - Signed-off-by: Daniel Vetter - -commit 1bee7e8b82e4a264d20df1f5825b8424c9241e39 -Author: Tim Gore -Date: Thu May 15 10:25:48 2014 +0100 - - intel-gpu-tools: Skip kms_fence_pin_leak if no cairo - - The kms_fence_pin_leak test uses igt_kms.c which in turn - uses cairo. So in Android.mk add this test to the skip list - if we dont have cairo - - Issue: VIZ-3894 - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit af1fbc427f50ac38ed93f3e682cf92b9ae1b2f41 -Author: Chris Wilson -Date: Thu May 15 13:37:03 2014 +0100 - - igt/gem_ringfill: Only check for rendercopy when testing render ring - - Overzealous test runner ftl. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78591 - Signed-off-by: Chris Wilson - -commit ef51988ab287c86c2a324271eebf85a68979ac46 -Author: Chris Wilson -Date: Thu May 15 13:23:44 2014 +0100 - - igt/gem_bad_reloc: Restrict negative reloc tests to IVB+ - - The bug doesn't seem to occur on SNB, so we can skip the workaround and - hence we do not expect the kernel to prevent invalid relocated offsets. - - Signed-off-by: Chris Wilson - -commit 465793bfd185062cfaee1b0dd3abf98ce5218333 -Author: Chris Wilson -Date: Thu May 15 13:10:54 2014 +0100 - - gem_exec_lut_handle: Do a warm up pass before timing - - Signed-off-by: Chris Wilson - -commit efd5a571f47885ca1cbd2f20a879d38018fe7c3e -Author: Chris Wilson -Date: Thu May 15 13:10:21 2014 +0100 - - gem_bad_reloc: Add subtest for LUT-based execbuffers - - Signed-off-by: Chris Wilson - -commit daa9e3d80a6c25667b259e864376ac929d5a11bd -Author: Chris Wilson -Date: Thu May 15 08:43:11 2014 +0100 - - Add gem_bad_reloc - - This test feeds a batch containing self-references into the kernel and - checks that the relocation offsets remain as valid GTT addresses. This - is to exercise SNA passing in negative relocation deltas which can hang - the GPU if they wrap around. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=78533 - Signed-off-by: Chris Wilson - -commit 62cd793c37135339788fff7ddf99f5039b0282ae -Author: Daniel Vetter -Date: Wed May 14 17:59:25 2014 +0200 - - tests/kms_flip: Fix vblank ts check - - Oops, fumbled that in the conversion. - - Signed-off-by: Daniel Vetter - -commit 78f79e4e95b571b0ee6f407aaea6dc7c0f864985 -Author: Ville Syrjälä -Date: Mon May 12 14:18:42 2014 +0300 - - tests/kms_fence_pin_leak: Exercise full ppgtt fence pin_count leak in the kernel - - The kernel full ppgtt support has a bug where it can drop a pinned - fence to the floor, hence we leak the pin_count as the subsequent - fence unpin becomes a nop. We can trigger it easily by unbinding a - buffer from a ppgtt address space while the buffer is simultaneosly - being used for scanout. - - Make the kernel leak the fence pin_count and trick it into picking - a new fence register for the next scanout buffer. Looping like - this for a while we leak the pin_count for all fence registers after - which the kernel can no longer find a new fence register when it needs - one. As a result we get back a SIGBUS from the GTT mmap access. - - Signed-off-by: Ville Syrjälä - -commit 831eb2119793e55d9c0e1be363a2f480f3183ff6 -Author: Daniel Vetter -Date: Wed May 14 15:33:27 2014 +0200 - - lib/igt_core: Fixup docs with symbolic exit codes - - Conflict between me and Thomas pushing patches in parallel. - - Cc: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 17eb062661e02a3cea97c4893d373ce8124a0b94 -Author: Thomas Wood -Date: Tue May 13 15:22:52 2014 +0100 - - lib: add exit status defines - - Add defines for success, skip and timeout exit statuses. - - Suggested-by: Daniel Vetter - Signed-off-by: Thomas Wood - -commit c03d58595e23d155aa470e60e6debaa0ee357a1b -Author: Thomas Wood -Date: Mon May 12 10:20:55 2014 +0100 - - lib: set a timeout when reading crc values - - Signed-off-by: Thomas Wood - Acked-by: Damien Lespiau - -commit d8e5313a276c856fdd6f600e69e26f45e4c370c0 -Author: Thomas Wood -Date: Mon May 12 10:19:52 2014 +0100 - - lib: add igt_set_timeout - - Add a function to stop and fail a test after the specified number of - seconds have elapsed. - - Signed-off-by: Thomas Wood - Acked-by: Damien Lespiau - -commit 5597a1f418f925f7cb298d3f74aab5ebdb0edd36 -Author: Daniel Vetter -Date: Wed May 14 11:52:35 2014 +0200 - - tests/kms_flip: Use asserts - - Signed-off-by: Daniel Vetter - -commit 0b3407f5283c1a091f9c980df76bf6ccfb692f9f -Author: Daniel Vetter -Date: Wed May 14 11:41:55 2014 +0200 - - tests/prime_nv_pcopy: Remove unused tiling tests - - We now know that the hardware can't do this, and it's not designed to. - - Signed-off-by: Daniel Vetter - -commit ee90a4a0dc2cb133bd84283da460069f22c49aac -Author: Daniel Vetter -Date: Wed May 14 11:39:31 2014 +0200 - - tests/prime_nv_pcopy: Drop return values from tests - - Signed-off-by: Daniel Vetter - -commit a7294e0c22d2be22b3f9abbbcad81794c65315c8 -Author: Daniel Vetter -Date: Wed May 14 11:31:31 2014 +0200 - - tests/prime_nv_pcopy: Drop return values from copy/check functions - - Signed-off-by: Daniel Vetter - -commit 8710e302a46761a1164a6453eaf53345fd76fc44 -Author: Daniel Vetter -Date: Wed May 14 10:57:46 2014 +0200 - - tests/prime_nv_pcopy: Use asserts in setup code - - Now we even have more fine-grained checking and only skip if the - nouveau card isn't supported, but fail properly if something else goes - wrong. - - Signed-off-by: Daniel Vetter - -commit 782cda17b932e9f96beca87f61b791990bea8ce5 -Author: Daniel Vetter -Date: Wed May 14 10:49:40 2014 +0200 - - tests/prime_nv_pcopy: Use asserts in nv_bo_alloc - - Step one to untangle the control flow in this test and replace it all - with igt assert magic. - - Signed-off-by: Daniel Vetter - -commit d502ae6f773333b0e073923911bf936842296e73 -Author: Daniel Vetter -Date: Wed May 14 10:44:16 2014 +0200 - - tests/prime_nv_api: Use asserts instead of control flow - - Signed-off-by: Daniel Vetter - -commit 722b25a303bcb927bf233cb773a3f6e3851e2f58 -Author: Daniel Vetter -Date: Wed May 14 10:07:17 2014 +0200 - - tests/gem_seqno_wrap: Replace control flow with asserts - - Only tricky bit was a bit of debug output sprinkled all over, I've - moved it all to cmp_bo. - - Signed-off-by: Daniel Vetter - -commit 0b7ce4ac2929ea56dfde508d551163a5304c66d8 -Author: Daniel Vetter -Date: Wed May 14 09:56:53 2014 +0200 - - tests: Use igt macros more - - Often just folding together of the common if (cond) printf; - abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out - more since the igt macros will already print the condition and errno. - - A few tests where more work (like ripping out return codes en masse) - is needed left as-is. - - Signed-off-by: Daniel Vetter - -commit e624fa8a2e1a31494c6e47a65e378e480882422d -Author: Daniel Vetter -Date: Wed May 14 00:36:04 2014 +0200 - - tests: sprinkle igt logging - - All the cases that simply dump some debug information and couldn't be - converted to some of the fancier macros. - - Some information output removed when it's redundant with the subtest - status. - - Signed-off-by: Daniel Vetter - -commit 351e7d395041b4b87ad28a201c81acac40cb397f -Author: Imre Deak -Date: Tue May 13 15:49:58 2014 +0300 - - pm_pc8: add system-suspend subtest - - Signed-off-by: Imre Deak - -commit 4e4ff4c1d1189f2dab59af1f1e868d88ab13624a -Author: Ville Syrjälä -Date: Tue May 13 15:02:37 2014 +0300 - - tests/kms_fbc_crc: Use igt_create_color_fb() - - No need to hand roll the alloc fb+paint code anymore, just use the - common helper. - - Signed-off-by: Ville Syrjälä - -commit abc262bf470f0988e10f1cfe4aa8d0f7f5f65519 -Author: Ville Syrjälä -Date: Tue May 13 14:49:53 2014 +0300 - - tests/kms_fbc_crc: Reset display state between subtests - - If a subtest fails it'll leave the display in a state that may prevent - the next subtest from working. So reset the display state between - subtests. - - Signed-off-by: Ville Syrjälä - -commit 54f8f5d13eefbbfb16ffd38be565d5c60ce67440 -Author: Ville Syrjälä -Date: Tue May 13 13:56:41 2014 +0300 - - tests/kms_fbc_crc: Switch to using the igt_display stuff - - Let's try to use the common igt_display framework to make the code a bit - nicer. - - Signed-off-by: Ville Syrjälä - -commit d2d0a96eca2e63a7ec75fd15b81808c42ae796b7 -Author: Ville Syrjälä -Date: Tue May 13 13:38:20 2014 +0300 - - tests/kms_fbc_crc: Simplify pipe_crc mess - - There's no need to keep an array of pipe_crc objects around. Just keep - one for the duration of the specific crtc/connector/test combo. - - Signed-off-by: Ville Syrjälä - -commit 126b8ba72f6a6f017819e00dc2b37a7c6549a143 -Author: Daniel Vetter -Date: Tue May 13 12:28:26 2014 +0200 - - lib/igt_core: Fix type on igt_log doc - - Signed-off-by: Daniel Vetter - -commit 1503d17cc5444d43f37b07d722f7c2a0db7c7f91 -Author: Daniel Vetter -Date: Tue May 13 11:29:34 2014 +0200 - - lib/igt_core: Document testrunner interface a bit - - Also fix up one gtkdoc fumble in igt_fb. We should use symbolic - defines if possible instead of just listening the magic 0, 77, 78 - values for exit codes, but that's a separate patch. - - Cc: tim.gore@intel.com - Signed-off-by: Daniel Vetter - -commit 0be29daac18bebeca6be6e80746ff8abb6476dfc -Author: Tim Gore -Date: Tue May 13 09:34:42 2014 +0100 - - intel-gpu-tools: Move igt tests to intel validation area - - Currently when IGT is built for Android the resulting test - executables go to /system/bin, which is not ideal. After - discussion with the core validation team i have moved them - to /system/vendor/intel/validation/core/igt by setting - LOCAL_MODULE_PATH. - - I have also added a --defsym linker option to export a - symbol that allows a script to easily distinguish between - tests that have subtests and those that dont. There are - better ways to do this (viz, in the source code) but - because the igt tests are not written consistently this - would require many more changes. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit bd7f9ab2cefd4c8fcf57e0dc4e79fef6890a3c71 -Author: Daniel Vetter -Date: Tue May 13 11:12:34 2014 +0200 - - NEWS: Android has libcairo support now! - - Signed-off-by: Daniel Vetter - -commit 41cbe36bba966fdc96d86031f2db5853e2c59ef4 -Author: Tim Gore -Date: Mon May 12 13:39:00 2014 +0100 - - intel-gpu-tools: Build tests needing cairo if ANDROID_HAS_CAIRO=1 - - Until now the tests that depended on libcairo were simply - skipped in the android build. Now that I have a cairo port - working, build these cairo dependent tests if ANDROID_HAS_CAIRO - is set to 1 in the environment. - For information on building cairo for IGT on Android see the - wiki at: - - https://securewiki.ith.intel.com/display/GFXCore/IGT+Test+Suite+on+Android - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit 0fee90b56df9a644b305f6cf37785b8284d410b3 -Author: Brad Volkin -Date: Sat May 10 14:11:53 2014 -0700 - - tests/gen7_forcewake_mt: Don't set the GGTT bit in SRM command - - The command parser in newer kernels will reject it and setting this - bit is not required for the actual test case. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76670 - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 63746417e25b8e9efbeb6021c768695740849a18 -Author: Imre Deak -Date: Mon May 12 13:29:49 2014 +0300 - - testdisplay: fix restoring termio at exit - - At normal exit in test_all_modes we don't restore the original termio, - since g_io_channel_shutdown() closes the stdin fd and so the following - tcsetattr on stdin will fail. We also don't restore the termio at signal - exit. Fix both cases by installing an exit hanlder with a dup'ed stdin fd. - - Signed-off-by: Imre Deak - -commit d848a36545eec43760de7e34a57a796182358087 -Author: Ville Syrjälä -Date: Thu May 8 15:56:24 2014 +0300 - - tests/kms_fbc_crc: Check context support earlier - - Check for context support before doing anything else in the subtest. - - Signed-off-by: Ville Syrjälä - -commit f85fff0de620bc20d8a20896812fcce584983f28 -Author: Ville Syrjälä -Date: Thu May 8 15:56:24 2014 +0300 - - tests/kms_fbc_crc: Allow the subtests to pass even if some planes aren't FBC capable - - Don't skip the entire subtest if FBC only works on some of the primary - planes, as is the case on pre-gen4 and hsw+. Only skip the entire subtest - if all crtc/connector combinations skip. - - Also print some kind of status for all otherwise valid crtc/connector combos - if they skip due to FBC being disabled or CRC support not being there. - - Signed-off-by: Ville Syrjälä - -commit 66d5f092d46120d97a0408dcd8fea0c0e086d7a8 -Author: Chris Wilson -Date: Thu May 8 11:56:56 2014 +0100 - - igt/gem_render_tiled_blits: Speed up by using the GPU to detile - - Avoid accessing via the slow GTT to read back and compare the contents - of each bo against expected results. It is much faster, on llc at least, - to detile using the GPU and then copy to system memory for the compare. - - Before: - - IVB: time sudo ./gem_render_tiled_blits - IGT-Version: 1.6-ge46ff3f (x86_64) (Linux: 3.15.0-rc3+ x86_64) - Using 3072 1MiB buffers - Verifying initialisation... - Cyclic blits, forward... - Cyclic blits, backward... - Random blits... - - real 6m26.005s - user 6m19.234s - sys 0m2.414s - - PNV: time sudo ./gem_render_tiled_blits - IGT-Version: 1.6-g8556f8a (i686) (Linux: 3.15.0-rc2+ i686) - Using 768 1MiB buffers - Verifying initialisation... - Cyclic blits, forward... - Cyclic blits, backward... - Random blits... - - real 1m45.431s - user 1m34.960s - sys 0m4.624s - - Using pread: - - IVB: time sudo ./gem_render_tiled_blits - IGT-Version: 1.6-ge46ff3f (x86_64) (Linux: 3.15.0-rc3+ x86_64) - Using 3072 1MiB buffers - Verifying initialisation... - Cyclic blits, forward... - Cyclic blits, backward... - Random blits... - - real 0m14.717s - user 0m3.699s - sys 0m3.192s - - Using snoop: - - IVB: time sudo ./gem_render_tiled_blits - IGT-Version: 1.6-ge46ff3f (x86_64) (Linux: 3.15.0-rc3+ x86_64) - Using 3072 1MiB buffers - Using a snoop linear buffer for comparisons - Verifying initialisation... - Cyclic blits, forward... - Cyclic blits, backward... - Random blits... - - real 0m13.774s - user 0m3.900s - sys 0m2.089s - - PNV: time sudo ./gem_render_tiled_blits - IGT-Version: 1.6-g8556f8a (i686) (Linux: 3.15.0-rc2+ i686) - Using 768 1MiB buffers - Using a snoop linear buffer for comparisons - Verifying initialisation... - Cyclic blits, forward... - Cyclic blits, backward... - Random blits... - - real 0m20.831s - user 0m4.384s - sys 0m5.032s - - So roughly 10-30x faster depending on platform. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78244 - Signed-off-by: Chris Wilson - -commit e46ff3f8c25957d641420fef4d680d48ce0a365f -Author: Chris Wilson -Date: Thu May 8 10:04:35 2014 +0100 - - igt/gem_lut_handle: Fix errno checking - - Regression from - commit c1404e05b7477122b9923ba029593c2cb64671a7 - Author: Chris Wilson - Date: Tue Apr 29 07:14:33 2014 +0100 - - errno is reset after each syscall - - Signed-off-by: Chris Wilson - -commit 8741c2289f17e9bcb740a01cad4764a71c918eea -Author: Mika Kuoppala -Date: Wed May 7 16:46:19 2014 +0300 - - tests/gem_flink_race,prime_self_import: fix object counts - - We need to add one drm_open_any() before getting the object counts - as first call to drm_open_any() allocates file descriptors for - exit handlers and thus is not symmetrical. - - The regression, assymmetric behaviour, was introduced in: - - commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84 - Author: Mika Kuoppala - Date: Fri Mar 28 10:52:46 2014 +0200 - - lib/drmtest: don't dup quiescent fd - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77867 - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77875 - Reviewed-by: Daniel Vetter - Signed-off-by: Mika Kuoppala - -commit 7935bbd9ba9508d6993ca019a5b8f3262676e7b5 -Author: Jani Nikula -Date: Tue May 6 14:06:52 2014 +0300 - - intel_bios_reader: make edp block decode match kernel - - All the somewhat recent VBT specs and the kernel have different format - for the eDP block than what the tool decodes. What the tool does *may* - be correct for really old VBT, but I have no specs or other reference to - suppor this. Just do what the kernel does, that's what we're interested - in anyway. - - Reviewed-by: Damien Lespiau - Signed-off-by: Jani Nikula - -commit 4bd9fe6e3409d59e618053f908e33bc291d295f4 -Author: Chris Wilson -Date: Mon May 5 10:57:12 2014 +0100 - - gem_alive: A utility to see if the driver or GPU has hung - -commit c864279de620a6e211b8a197dbdf9e3e1e2b60ab -Author: Chris Wilson -Date: Wed Apr 30 18:39:27 2014 +0100 - - overlay: Parse /proc/interrupts in lieu of debugfs/i915_gem_interrupt - - So the interrupt counter was removed from i915_gem_interrupt, and if we - do not have the perf API available, we therefore need to read it from - /proc/interrupts instead. - - Signed-off-by: Chris Wilson - -commit bff7ecde7bf3757e11ab4559212564e3f4919b89 -Author: Chris Wilson -Date: Wed Apr 30 18:38:26 2014 +0100 - - overlay: Use new i915_frequency_info in fallback code - - Actually use the new location to get frequency information when perf is - not available. - - Signed-off-by: Chris Wilson - -commit b38b8a59a8694ef2d2d4c78283c7c697367766d7 -Author: Daniel Vetter -Date: Thu Apr 24 23:37:05 2014 +0200 - - tests/pm_pc8: subtests for runtime pm for dpms - - Very basic since I lack a bit ideas. After all with the latest - patches runtime pm doesn't make much a difference between dpms off - and disabling the outputs completely with SetCrtc. - - Signed-off-by: Daniel Vetter - -commit 29ee36f2597747c01d5c79c93ed31f5bcd06e219 -Author: Daniel Vetter -Date: Thu Apr 24 23:33:09 2014 +0200 - - lib: extract kmstest_set_connector_dpms - - Signed-off-by: Daniel Vetter - -commit 066ad35ee7b39ab51fb5b8e54c3abd72df016413 -Author: Daniel Vetter -Date: Wed Apr 30 18:05:21 2014 +0200 - - tests: Fix make depencies for test list - - Oops, pretty bad ... - - Signed-off-by: Daniel Vetter - -commit a40f091d8181b911b9dc2e11f50fcc33773d35df -Author: Ville Syrjälä -Date: Tue Dec 18 17:43:13 2012 +0200 - - Add Cherryview PCI IDs - - Signed-off-by: Ville Syrjälä - -commit ce3c443641344d2ecb642e62526ebc2a6eb3a458 -Author: Daniel Vetter -Date: Tue Apr 29 17:17:24 2014 +0200 - - NEWS: Updates - -commit c1404e05b7477122b9923ba029593c2cb64671a7 -Author: Chris Wilson -Date: Tue Apr 29 07:14:33 2014 +0100 - - errno is reset after each syscall - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78055 - Bugilla: https://bugs.freedesktop.org/show_bug.cgi?id=78053 - Signed-off-by: Chris Wilson - -commit fa86e33ccc56ee84f2f9ac924943eef0f1469a32 -Author: Ville Syrjälä -Date: Mon Apr 28 17:58:45 2014 +0300 - - tests/gem_stress: Fix rendercopy vs. keep_gpu_busy on gen6+ - - If the hardware has a blt ring blits aren't allowed on the render ring. - Trying to execute blits on the render ring results in a GPU hang. - - Flush outstanding blits from keep_gpu_busy() before calling rendercopy() - so that they don't end up on the render ring. - - Signed-off-by: Ville Syrjälä - -commit 6abfe2f0dbe80f8c1d4986367d56842bbf94d23e -Author: Daniel Vetter -Date: Mon Apr 28 15:26:15 2014 +0200 - - tests/gem_exec_params: One more invalid ring tests - - With the vebox 2 patches the number of internal rings don't match the - number of exposed rings. So add another subtest with an invalid ring - which should be invalid both internally and externally. The bug this - will catch is using the ring structure before validation, which the - old "invalide-ring" wont be able to due to the internal vebox2 ring. - - Signed-off-by: Daniel Vetter - -commit a595a400788bac972cb24ec78ae36db113419237 -Author: Imre Deak -Date: Fri Apr 25 10:26:46 2014 +0300 - - tests/pm_pc8: skip the test if runtime PM is disabled - - The PC8 state won't be entered unless runtime PM is enabled, so support - for PC8 residency counters alone is not enough to run this test. - - Signed-off-by: Imre Deak - Reviewed-by: Daniel Vetter - -commit e36c896a71660b09fd4f96ef5342009cd5908b80 -Author: Daniel Vetter -Date: Fri Apr 25 17:57:22 2014 +0200 - - test: Fixup for the previous patch - - Oops, failed to git add. - - Signed-off-by: Daniel Vetter - -commit 1b55886c4ba111b2ba331b03289658cbd1ae0e2e -Author: Daniel Vetter -Date: Fri Apr 25 17:52:02 2014 +0200 - - test/gem_userptr_*: Fix compile fail - - Also shut up warnings. Those revealed incorrect usage of local - variables in conjunction with igt_fixture/igt_subtest. Since those use - longjmps we need to move the out of the stackframe those magic blocks - are declared in. - - Signed-off-by: Daniel Vetter - -commit d3057d7a1eba0c050f5d6d9674d56d1794b1f066 -Author: Tvrtko Ursulin -Date: Fri Apr 25 15:42:20 2014 +0100 - - tests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact - - This adds a small benchmark for the new userptr functionality. - - Apart from basic surface creation and destruction, also tested is the - impact of having userptr surfaces in the process address space. Reason - for that is the impact of MMU notifiers on common address space - operations like munmap() which is per process. - - v2: - * Moved to benchmarks. - * Added pointer read/write tests. - * Changed output to say iterations per second instead of - operations per second. - * Multiply result by batch size for multi-create* tests - for a more comparable number with create-destroy test. - - v3: - * Use ALIGN macro. - * Catchup with big lib/ reorganization. - * Removed unused code and one global variable. - * Fixed up some warnings. - - v4: - * Fixed feature test, does not matter here but makes it - consistent with gem_userptr_blits and clearer. - - Signed-off-by: Tvrtko Ursulin - Cc: Chris Wilson - Cc: Brad Volkin - Reviewed-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit a3e97ddcbf53c99af3b0a25db9a055119d312116 -Author: Tvrtko Ursulin -Date: Fri Apr 25 15:42:19 2014 +0100 - - tests/gem_vmap_blits: Remove obsolete test case - - No need for the old test case once the new one was added. - - v2: - * Just rebase for lib/ reorganization. - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 863c0730f3aa695f2e968e1f38e0f36c4f8af310 -Author: Tvrtko Ursulin -Date: Fri Apr 25 15:42:18 2014 +0100 - - tests/gem_userptr_blits: Expanded userptr test cases - - A set of userptr test cases to support the new feature. - - For the eviction and swapping stress testing I have extracted - some common behaviour from gem_evict_everything and made both - test cases use it to avoid duplicating the code. - - Both unsynchronized and synchronized userptr objects are - tested but the latter set of tests will be skipped if kernel - is compiled without MMU_NOTIFIERS. - - Also, with 32-bit userspace swapping tests are skipped if - the system has a lot more RAM than process address space. - Forking swapping tests are not skipped since they can still - trigger swapping by cumulative effect. - - v2: - * Fixed dmabuf test. - * Added test for rejecting read-only. - * Fixed ioctl detection for latest kernel patch. - - v3: - * Use ALIGN macro. - * Catchup with big lib/ reorganization. - * Fixed up some warnings. - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit a461515b334ebb7782ee15e31f943e7a6753d845 -Author: Ville Syrjälä -Date: Fri Apr 25 15:27:57 2014 +0300 - - kms_cursor_crc: Fix the test on platforms where the pipe->port mapping has restrictions - - On gen2 for instance the LVDS port can only be fed from pipe B. Check - whether the combinations is valid before trying to run the test. Also - clean up the state back to PIPE_ANY properly so that following tests - can again go through all the combinations. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75131 - Signed-off-by: Ville Syrjälä - -commit 5b90833941f17d175204041c86ad84c6662e55df -Author: Ville Syrjälä -Date: Fri Apr 25 13:37:09 2014 +0300 - - kms_cursor_crc: Wrap igt_require() in igt_fixture - - igt_require() must be within a fixture or subtest. - - Signed-off-by: Ville Syrjälä - -commit f688a56ee8285f6ebc416d5038eded73f04602bb -Author: Ville Syrjälä -Date: Fri Apr 25 13:38:31 2014 +0300 - - kms_cursor_crc: Replace snprintf()+%s with just %d - - There's no point in first printing the int to temp string using %d - and then printing that out with %s. Just stick the %d into the final - string. - - Signed-off-by: Ville Syrjälä - -commit fb2ccb1ade605e7c55da2ee82c9cd41d98270fa5 -Author: Ville Syrjälä -Date: Fri Apr 25 13:50:59 2014 +0300 - - kms_cursor_crc: Allow the test to run without cursor cap support - - Assume that only 64x64 cursor size is supported if the cursor size caps - aren't supported by the kernel. This allows the test to run on older - kernels. - - Signed-off-by: Ville Syrjälä - -commit f8e5a3fc7e92f67cea7c1832e786cbb344aefd5e -Author: Ville Syrjälä -Date: Fri Apr 25 13:49:11 2014 +0300 - - kms_cursor_crc: Wrap cursor fb creating into igt_fixture - - We don't want to attempt creating the cursor fb when enumerating - subtests. So wrap it into igt_fixture. Also destroy the cursor - fb after the tests. - - Signed-off-by: Ville Syrjälä - -commit f6e869732cfa054bfa218aa465b989c85a0ba489 -Author: Ville Syrjälä -Date: Thu Apr 24 19:07:18 2014 +0300 - - kms_cursor_crc: Simplify the pipe_crc mess - - Instead of allocating an array of igt_pipe_ctc_t objects, just allocate - one and stick it into test_data. - - Signed-off-by: Ville Syrjälä - -commit aaef7ad37614f5d139b06d63b3052ae8cefe57ed -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:12 2014 +0300 - - kms_cursor_crc: Add background picture - - This gives the cursor something to be on, instead of just a black - background. Slows the test down only one second over six minutes. - - Signed-off-by: Antti Koskipaa - -commit fafcff90a870844e0febdda4066b361479df3747 -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:11 2014 +0300 - - kms_cursor_crc: Add random cursor placement test - - Signed-off-by: Antti Koskipaa - -commit 470e5ce6c34731a1c76a1089dabfb6144f4f1429 -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:10 2014 +0300 - - kms_cursor_crc: Add moving cursor test - - Signed-off-by: Antti Koskipaa - -commit 795eddc63967a10cc186609259f61d531e41e078 -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:09 2014 +0300 - - kms_cursor_crc: Add reference software rendering - - This patch first render the cursor with hardware rendering and - then with software, acquiring the CRC in both cases so they can be - properly compared. Say goodbye to crc_must_match variable. - - Signed-off-by: Antti Koskipaa - -commit ead0173c4d14899045dfe3595b119c49229f0dc3 -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:08 2014 +0300 - - kms_cursor_crc: Separate onscreen and offscreen tests - - Also remove onscreen boolean from parameter list. All test-related - data should be put into test_data from now. - - Signed-off-by: Antti Koskipaa - -commit fe8041b8f954468acdccbba1e7ced1712cf3b629 -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:07 2014 +0300 - - kms_cursor_crc: Use a function pointer to call test - - More tests are coming, and this allows us to not repeat the boilerplate - code in run_test() for each subtest. - - Signed-off-by: Antti Koskipaa - -commit 7ec631c2426917020ab76d6d305132ab190372ea -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:06 2014 +0300 - - kms_cursor_crc: Move cursor enable and disable calls where they belong - - We can't have the hw cursor enabled during software render tests. - - Signed-off-by: Antti Koskipaa - [vsyrjala: collect the crc before disalbing the cursor] - Signed-off-by: Ville Syrjälä - -commit a593d613f9ccafa5ba95ec4b9542cd00eef1cc7b -Author: Antti Koskipaa -Date: Thu Apr 10 15:08:05 2014 +0300 - - kms_cursor_crc: Remove some test cases and change cursor to color - - Currently this test is quite useless, since it only checks for valid CRCs when - the correct output from a test is a completely black screen (invisible or visible - but black cursor, or cursor is offscreen) and disables the check when anything - visible is onscreen. - - This patch changes the cursor to a colorful one and removes the test cases - that become redundant because of this change. The cursor is designed to be - asymmetrical such that future tests involving rotation, mirroring, etc. produce - different CRCs and failures can be detected. - - This (temporarily) disables CRC testing until the next patch which will add - software rendering of the cursor and the CRC generation. - - Signed-off-by: Antti Koskipaa - -commit b918a3ba15b510edfeb37a375ffacd5bdb5e1410 -Author: Chris Wilson -Date: Fri Apr 25 07:40:34 2014 +0100 - - Reset errno to 0 after success - - errno is only valid after a syscall wrapper (e.g. ioctl()) reports an - error. However, we report the last errno value as a part of the - igt_assert() output and so we display spurious values such as: - - Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802: - Last errno: 11, Resource temporarily unavailable - Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ... - - Signed-off-by: Chris Wilson - -commit 5d7649690c80b531a4949e275926315a749455e3 -Author: Tvrtko Ursulin -Date: Wed Apr 23 17:03:23 2014 +0100 - - benchmarks: Build them on Android. - - They build fine so give them some exposure. - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: Brad Volkin - Signed-off-by: Thomas Wood - -commit dc14bf455d66a0a31253ac4fa3e024eb1e036968 -Author: Tvrtko Ursulin -Date: Wed Apr 23 16:07:55 2014 +0100 - - tests: Extract ALIGN macro into a common header - - Makes for a little bit less code duplication, especially since - it will be used from more callers in the future. - - Signed-off-by: Tvrtko Ursulin - Reviewed-by: Brad Volkin - Signed-off-by: Thomas Wood - -commit e32664c8ee47d8eb01955240672a198aab7e2969 -Author: Tvrtko Ursulin -Date: Wed Apr 23 16:02:47 2014 +0100 - - tests: Skip building kms_flip_tiling on Android - - Dependencies are not available at the moment so it does not build. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Thomas Wood - -commit 1639022aa85e57cdf365f2be1a165263cb251ddd -Author: Daniel Vetter -Date: Thu Apr 24 10:43:38 2014 +0200 - - tests/gem_exec_params: Fix rel-constants-invalid subtest - - Reported by Ville and Zhao Yakui. - - Cc: Ville Syrjälä - Cc: Zhao Yakui - Signed-off-by: Daniel Vetter - -commit 5a8c06464e025495f0b9143dbcec76f02354d58a -Author: Zhao Yakui -Date: Thu Apr 24 10:15:45 2014 +0800 - - tests/gem_dummy_reloc_loop: Add one subtest based on multi drm_fd to test CPU<->GPU sync under multi BSD rings - - The Broadwell GT3 machine has two independent BSD rings in kernel driver while - it is transparent to the user-space driver. In such case it needs to check - the CPU<->GPU sync for the second BSD ring. - - V1->V2: Follow Daniel's comment to add one subtext instead of one individual - test case, which is used to test the CPU<->GPU sync under multi BSD rings. - - V2->V3: Follow Imre's comment to remove the unnecessary initialization and - use igt_assert_f instead of igt_assert - - Reviewed-by: Imre Deak - Signed-off-by: Zhao Yakui - Signed-off-by: Daniel Vetter - -commit ae8e646127715e816376c6324c9109331bad6503 -Author: Zhao Yakui -Date: Thu Apr 24 10:15:44 2014 +0800 - - tests: Add one ring sync case based on multi drm_fd to test ring semaphore sync under multi BSD rings - - The Broadwell GT3 machine has two independent BSD rings in kernel driver while - it is transparent to the user-space driver. In such case it needs to check - the ring sync between the two BSD rings. At the same time it also needs to - check the sync among the second BSD ring and the other rings. - - V2->V3: Follow Imre's comment to remove the unnecessary initialization and - use igt_assert_f instead of igt_assert. - - V3->V4: Add gem_multi_bsd_sync_loop.c into the tests/.gitignore - - Reviewed-by: Imre Deak - Signed-off-by: Zhao Yakui - Signed-off-by: Daniel Vetter - -commit cd3850e28e5ec83dc15462b965310794effb71b1 -Author: Daniel Vetter -Date: Wed Apr 23 20:23:28 2014 +0200 - - tests: Add gem_exec_params - - This fills all the gaps we've had in our execbuf testing. Overflow - testing of the various arrays is already done by gem_reloc_overflow. - - Also add kms_flip_tiling to .gitignore. - - This will cause a bunch of failures since current kernels don't catch - all fallout. - - Signed-off-by: Daniel Vetter - -commit 4e93890377fc1b33fbbad29759299634f0eebfa9 -Author: Chris Wilson -Date: Thu Apr 24 07:58:09 2014 +0100 - - Add gem_render_copy_redux - - This is an "advanced" form of the the simple gem_render_copy test. - Instead of aiming for maximal simplicity to aide debugging of new - rendercopy backends, this test aims to exercise the execbuf interface - using the render ring. - - Signed-off-by: Chris Wilson - -commit 78e4c2b449c6d0a18e2bfaea29f3a0eadb42c5f3 -Author: Ville Syrjälä -Date: Wed Apr 16 17:05:43 2014 +0300 - - lib: Fix potential out of bounds access in ring stop code - - The subsequet code expects the read() to not have filled the entire - buffer, and yet we allow it to do so. Reduce the size passed to read() - by 1 to make the code sane. - - Signed-off-by: Ville Syrjälä - -commit 4aa2c102b933d11cc85e0dc6fe607924e248b652 -Author: Ville Syrjälä -Date: Wed Apr 16 17:07:07 2014 +0300 - - lib: Fix assert failure in ring stop code - - The assert in igt_set_stop_rings() is a bit bogus. Suppsoedly it was - meant to assure that the caller always restores the rings to running - state after stopping them. But in its current form it will trigger - any time someone calls the function and the rings were already stopped. - So you can't even restore the rings to running state w/o the assert - triggering. - - Fix it up so that it'll ignore the current ring state when we're trying - to restore the rings back to running state. - - Signed-off-by: Ville Syrjälä - -commit 43c2ed758fea849d666af519cd2382d6d6bc6607 -Author: Ville Syrjälä -Date: Mon Apr 14 16:23:18 2014 +0300 - - tests: Compile all the tests - - A bunch of the tests aren't being built due to a missing '\'. Fix it. - - The problem was introduced here: - commit ddf8cc107e3b78e4c8200b083ed298c24eec1f03 - Author: Ander Conselvan de Oliveira - Date: Wed Apr 2 15:31:38 2014 +0300 - - test: Add test for checking if page flip changes tiling - - Signed-off-by: Ville Syrjälä - -commit 4fbd49beb94c299b38555b4ef647588fca47a388 -Author: Daniel Vetter -Date: Fri Apr 11 16:16:31 2014 +0200 - - tests/kms_flip_tiling: Fixes - - - Wrap up testcase correctly into the magic code block. - - Put local variables out of the longjmp danger zone. - - Cc: Ander Conselvan de Oliveira - Signed-off-by: Daniel Vetter - -commit ddf8cc107e3b78e4c8200b083ed298c24eec1f03 -Author: Ander Conselvan de Oliveira -Date: Wed Apr 2 15:31:38 2014 +0300 - - test: Add test for checking if page flip changes tiling - - Test that a page flip from a tiled buffer to a linear one works - correctly. First, it sets the crtc with the linear buffer andr - generate a reference crc for the pipe. Then, the crtc is set with - the tiled one and page flip to the linear one issued. A new crc is - generated and compared to the rerence one. - - Signed-off-by: Ander Conselvan de Oliveira - -commit cc730c418f44245c49776059b2564f54da4449e6 -Author: Daniel Vetter -Date: Tue Mar 11 16:14:33 2014 +0100 - - lib/kmstest: Fix up tiled buffer creation - - When extracting a raw __gem_set_tiling helper I've fumbled this in - - commit 590f6101402b51bca54f69c002380bda967484ea - Author: Daniel Vetter - Date: Wed Oct 9 20:50:50 2013 +0200 - - lib/drmtest: extract rawer __gem_set_tiling - - Fix things up so that we properly propaget the error again. - - Now to make this all properly work we also need to make kms_flip a - notch more robust against such failures ... - - This only blows up on gen2/3 with the pan tests which want a too wide - framebuffer for tiling. - - Signed-off-by: Daniel Vetter - -commit 99b8f807010483128f10f7934a864c78b4438b34 -Author: Mika Kuoppala -Date: Thu Apr 10 17:51:39 2014 +0300 - - tests/gem_reset_stats: fix length check in inject_hang - - To avoid writing past the batch end. - - Signed-off-by: Mika Kuoppala - -commit 53ad1e4a7040c57355b57fc3cdc8d9a003687a32 -Author: Mika Kuoppala -Date: Fri Mar 28 15:12:14 2014 +0200 - - tests/gem_reset_stats: check gpu state before each subtest - - Some tests, namely the close pending variety, tries to - carefully drop all handles to gpu when hang is intruduced, - to expose bugs in reset handling without any clients. - - Add guards after and before tests to really know if - the gpu is still alive as the particular test might - report success and then gpu dies few seconds after. - - Signed-off-by: Mika Kuoppala - -commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84 -Author: Mika Kuoppala -Date: Fri Mar 28 10:52:46 2014 +0200 - - lib/drmtest: don't dup quiescent fd - - If we dup the fd, we are in mercy of the context banning - of the test application. Better to have our own to guarantee - that gem_quiescent_gpu won't find itself banned on exit. - - Signed-off-by: Mika Kuoppala - -commit d983a47f1470cbea8388864537dbe5aff5575df6 -Author: Mika Kuoppala -Date: Tue Mar 25 12:52:19 2014 +0200 - - tests: use lib igt_[get|set]_stop_rings() - - on gem_reset_stats, kms_flip and pm_rps. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75876 - Signed-off-by: Mika Kuoppala - -commit bfa6fa9a4bfdd7988a1ed68c9c97f9cc53d0f50c -Author: Mika Kuoppala -Date: Tue Mar 25 12:21:44 2014 +0200 - - lib: add igt_get_stop_rings and igt_set_stop_rings - - Multiple tests are introducing hangs by fidding with i915_ring_stop - debugfs entry. - - Signed-off-by: Mika Kuoppala - -commit 1c7ca57e531315f78f8ea3b9dce7bd92d7d79f64 -Author: Mika Kuoppala -Date: Thu Apr 10 16:06:27 2014 +0300 - - tests/gem_reset_stats: end hanging batch properly - - As we use chained batch into itself to hang the gpu, there - was no need to end the batchbuffer with BATCH_BUFFER_END. - - With the introduction of command parser, the batch - need to have proper BATCH_BUFFER_END in it or it - will be rejected. - - While at it, shift the upper half of batch gtt_offset - accordingly with gen8+ - - Signed-off-by: Mika Kuoppala - -commit f74c443925578b377c47d655a2d864b8ed521330 -Author: Brad Volkin -Date: Thu Mar 27 11:44:45 2014 -0700 - - tests/gem_exec_parse: Test for OACONTROL tracking - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 9eec5b0f11d864c986511db07d447e379bcef696 -Author: Chris Wilson -Date: Mon Apr 7 13:10:41 2014 +0100 - - gem_tiled_swapping: Test using all available fences - - Use extra threads to cause extra memory pressure and stress upon the - relevant code. Limit the number of threads to available fences to avoid - falling off the fence cliff. - - Signed-off-by: Chris Wilson - -commit ff7806e52c4e9b7c522e59ba8514c5c6e3fa8683 -Author: Chris Wilson -Date: Mon Apr 7 13:09:46 2014 +0100 - - gem_tiled_swapping: Purge all page/swap caches first - - Reset the system to a vanilla state before we query how much RAM/swap - space is available for our testing. - - Signed-off-by: Chris Wilson - -commit 5d607a744f3df07235355ebcb5376e2464e2f4b1 -Author: Chris Wilson -Date: Mon Apr 7 12:07:14 2014 +0100 - - intel-gpu-overlay: Update debugfs path for min/max frequency - - Signed-off-by: Chris Wilson - -commit 574d62db398af45a8cb1d38fd77dd50bd645149b -Author: Paulo Zanoni -Date: Fri Apr 4 13:24:53 2014 -0300 - - tools/intel_reg_dumper: use haswell_debug_regs on BDW too - - Instead of using an older set of registers. - - Signed-off-by: Paulo Zanoni - -commit 1fd9fc00127026b56dbd5cea323a63bdd4e69706 -Author: Paulo Zanoni -Date: Fri Apr 4 13:22:56 2014 -0300 - - tests/pm_pc8: skip tests when no screens are connected - - Instead of failing, just skip the tests. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73642 - Signed-off-by: Paulo Zanoni - -commit abba92d9cff1ab9a3b492f9742e8cd1b3f669800 -Author: Paulo Zanoni -Date: Mon Mar 31 17:01:59 2014 -0300 - - tests/pm_pc8: add missing newline - - Otherwise the output will get even more confusing. - - Signed-off-by: Paulo Zanoni - -commit d6362ce8a81a40bc30e1e7b34d14c27f7bfcd954 -Author: Daniel Vetter -Date: Thu Apr 3 18:03:21 2014 +0200 - - tests/gem_cmd_parse: restrict to gen7 - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76982 - Signed-off-by: Daniel Vetter - -commit e8869c4bc439de941be399d156323620a2d6ecda -Author: Chris Wilson -Date: Thu Apr 3 09:43:58 2014 +0100 - - gem_tiled_swapping: Limit to available memory - - If there is not enough free RAM+swap for us to execute our test, we will - hit OOM, so check first. - - Signed-off-by: Chris Wilson - -commit b8afe98004ed0e082bf5d019a86f27a5909f0e4d -Author: Mika Kuoppala -Date: Wed Apr 2 15:13:21 2014 +0300 - - lib/rendercopy: fix alloc len for gen7_bind_buf - - Fortunately saved by the alignment. - - Reviewed-by: Chris Wilson - Signed-off-by: Mika Kuoppala - -commit d4933259b84a304145634cc6ec5d9eebeb612711 -Author: Thomas Wood -Date: Wed Apr 2 11:41:43 2014 +0100 - - tests: create files that list the available tests - - Add Makefile targets to create two text files containing the list of - available single and multi-test programs. This enables the tests to be - enumerated without requiring the build system. - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 22bc1a287eb6c0e7b89001424c895dd776f9a28b -Author: tgore -Date: Mon Mar 31 11:55:40 2014 +0100 - - intel-gpu-tools: avoid include of cairo.h on Android builds - - A recent commit means igt_debugfs.c now needs to include igt_kms.h, - which in turn includes igt_fb.h and hence cairo.h. - We need to avoid this inclusion of cairo.h when building for Android, - (until we have a cairo port) so I have added a #ifndef around it. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit 4fdca96066e36cb4d41019e58c8387e0a5e0f2f5 -Author: Daniel Vetter -Date: Fri Mar 28 17:54:58 2014 +0100 - - tools/quick_dump: Fix make distcheck - - Someone really needs to fix this Makefile ... - - Signed-off-by: Daniel Vetter - -commit e599ff443cdcd90399666dc75226d73a943cc89f -Author: tgore -Date: Fri Mar 28 12:54:59 2014 +0000 - - intel-gpu-tools: fix some include path problems on android builds - - When building within the android tree (specifically in /external) - the compilation fails due to the wrong versions of some header files - getting picked up. This commit adds some include paths to ensure the - correct headers are found - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit a96c6340768772590cf548ed8b81a10877fc7b43 -Author: tgore -Date: Fri Mar 28 12:54:58 2014 +0000 - - intel-gpu-tools: fix problem with redefinition of mmap64 - - In android builds there is no reliable way to determine if mmap64 is defined - or not, and this sometimes leads to a compile error due to its re-defnition. - So this commit avoids its use altogether in intel-gpu-tools for Android builds, - unless the HAVE_MMAP64 macro is defined. - - Signed-off-by: Tim Gore - Signed-off-by: Daniel Vetter - -commit 798fca377a0e26cffb40e5a97230baaac4b12733 -Author: Daniel Vetter -Date: Thu Mar 27 23:04:02 2014 +0100 - - README: update piglit cmd - - Pointed out by Jesse. - - Signed-off-by: Daniel Vetter - -commit 2031da4073da0dc09ed9debb319e924ae5dc8b2a -Author: Jesse Barnes -Date: Thu Mar 27 11:10:18 2014 -0700 - - intel_infoframes: remove bogus "being transmitted" check from VLV - - This bit is reserved on VLV. - -commit c1c96d8342ee2d629d09a2be576d5bf984e9228b -Author: Jesse Barnes -Date: Thu Mar 27 11:01:06 2014 -0700 - - intel_infoframes: add VLV support - - Different reg offsets and such. - -commit 47c551bd700b50fded87ccf81384fb2e384e5f6b -Author: Ben Widawsky -Date: Thu Mar 27 09:56:59 2014 -0700 - - quick_dump: Put the cairo cflags with the other cflags. - - I had been hoping we can avoid linking against cairo, but alas it was - not meant to be. - - Signed-off-by: Ben Widawsky - -commit 9048aa1974aee567617220f9685ad115be0cbae7 -Author: Daniel Vetter -Date: Wed Mar 26 22:57:52 2014 +0100 - - tools/quick_dump: re-apply ducttape - - Someone with actual automake-fu really needs to fix this up for real - since compiling a bunch of source files again, with broken dep - tracking even just because we can't link against a .la somehow really - isn't too awesome. - - Signed-off-by: Daniel Vetter - -commit 961a46c82b4fe558ea726833aa9d390382742a10 -Author: Daniel Vetter -Date: Wed Mar 26 22:15:12 2014 +0100 - - tests/pm_rps: Add a new testcase to provoke the "stuck at max" bug - - Note that the sleep(5); to fully idle the gpu is _really_ important. - Without it the bug is not exhibited. - - The issue at hand is that after gem_quiescent_gpu we are at max - (expected, since the blocking waits peg to max), but then we never go - down to a lower freq again until we're fully idle. The tiny load is - sufficient to keep the gpu at max. I've played around with this a bit - and even ridiculously low loads (like one MI_STORE per 50ms) are - enough to keep the gpu at max freq. - - Signed-off-by: Daniel Vetter - -commit 669a2fca6c5ccd256d2d767107963840f7de438e -Author: Daniel Vetter -Date: Wed Mar 26 21:30:17 2014 +0100 - - tests/pm_rps: quiescent harder - - Apparently some rps chips are prone to stick to max once you're there. - And all the synchronous waits in gem_quiescent_gpu are _really_ good - at forcing the kernel to go full throttle. - - And even a positively tiny load (one MI_STORE_IMM per 50 ms) is enough - to eternally keeep it there, which means the first idle measurement of - the freqs before we do the reset it completely busted. - - Just add a wait before the tricky test and call it a day. - - Option b) would have been to now have this tiny load, but I think a - good reminder how quirky rps is is always welcome. Just in case we - start sleeping too easy at night. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74956 - Signed-off-by: Daniel Vetter - -commit 896b550984cf3ffd0fa67051d5b9cf0239634894 -Author: Damien Lespiau -Date: Mon Mar 24 18:42:39 2014 +0000 - - rendercopy/gen8: Remove a hole in struct gen8_blend_state - - Using uint64_t in that second member makes it aligned to 64bits, while - the first member is only 32bits. We then had a 32bits hole in there! - - Found-by: Chris Wilson - Cc: Ben Widawsky - Cc: Rafael Barbalho - Tested-by: Rafael Barbalho - Signed-off-by: Damien Lespiau - -commit 7255a84c9c8f4d46b47d490331100a11179180a1 -Author: Jesse Barnes -Date: Wed Mar 26 11:02:48 2014 -0700 - - testdisplay: make termio unbuffered - - So hotkeys take effect immediately. - -commit 3d9e63f2ad0c676b3efba4c854ef645ae60ee7e1 -Author: Daniel Vetter -Date: Wed Mar 26 16:37:15 2014 +0100 - - lib/igt_fb: api documentation - - Also realign function parameters and replace abort() with igt_fail() - while at it. - - v2: Forgotten to add a nice intro. - - Signed-off-by: Daniel Vetter - -commit 7568edf4b1dd0f8c1b061a2bb53d593ff9d4d33d -Author: Daniel Vetter -Date: Wed Mar 26 16:36:46 2014 +0100 - - lib/igt_fb: setup font in igt_get_cairo_ctx - - We always want the same boring one, so extract it. - - Signed-off-by: Daniel Vetter - -commit ae461e67e8816aa7cd80791216a839d92e04f0e5 -Author: Daniel Vetter -Date: Wed Mar 26 16:09:27 2014 +0100 - - lib/igt_fb: drop kmstest_ prefix from static functions - - Signed-off-by: Daniel Vetter - -commit c6c2b2bb7039e8cc89841bd9782a61b7d734dfe2 -Author: Daniel Vetter -Date: Wed Mar 26 15:15:49 2014 +0100 - - lib/igt_kms/bf: doc skeleton - - igt_kms docs are just skeleton and also added igt_fb to make sure the - linking works correctly. - - Next up: Actually documenting igt_fb. - - Also fix that depency spelling fumble I've copied around to a few too - many places. - - Signed-off-by: Daniel Vetter - -commit 64401f57e958998d537ff67525d5f1e9a4f76b22 -Author: Daniel Vetter -Date: Wed Mar 26 10:19:42 2014 +0100 - - lib: fold igt_display into igt_kms - - For 1 function and 2 types we kinda don't need separate files. - Especially now that igt_kms is much more focused on the actual modeset - stuff with all the framebuffer helpers extracted to igt_fb. - - Signed-off-by: Daniel Vetter - -commit 9aea7ae541212e4116af8d5d922d7cbcc571df50 -Author: Daniel Vetter -Date: Wed Mar 26 09:18:11 2014 +0100 - - lib/igt_fb: switch to igt_ prefix from kmstest_ - - Shorter and more in line with our general igt_ prefix for everything - which isn't somehow intel or i915-gem or otherwise hw specific - these - helpers here are all fully generic framebuffer handling functions - based on kms + cairo. - - Well, the actual buffer alloc is done with i915 gem, but meh ;-) - - Two special cases: - - bpp_depth_to_drm_format and drm_format_to_bpp completely lacked - prefixes, so just add igt_. - - write_fb was a bit misleading given that we have gem_write for - uploading to buffers. Rename that to write_fb_to_png to make it - crystal clear what this thing does even without looking at docs. - - Signed-off-by: Daniel Vetter - -commit 57d7db8cf8c407541d1ed57348a6f468c2b73577 -Author: Daniel Vetter -Date: Wed Mar 26 09:06:11 2014 +0100 - - lib: extract igt_fb library - - Stuff all the framebuffer creation, cairo and drm fourcc format - handling in there. This gives us a very clear cut in the headers where - igt_fb.c only needs to include igt_fb.h, and igt_kms.c includes both - (well igt_kms.h pulls in igt_fb.h since we always need this). - - The aim here is to add api docs for igt_fb since that part of the kms - library seems fairly stable already, while all the mode setting and - iteration is still a bit in flux. - - Signed-off-by: Daniel Vetter - -commit 0b3019733bce0eb7ec4bce39e4ee470f98639c36 -Author: Daniel Vetter -Date: Sun Mar 23 16:53:49 2014 +0100 - - gitignore: Add logfiles from make check - - A bit annoying to see this stuff around in git status, so exclude it. - - Signed-off-by: Daniel Vetter - -commit ef107940bb1f1aaa8608d5c7f6840a9990706dec -Author: Daniel Vetter -Date: Sun Mar 23 16:53:14 2014 +0100 - - lib/igt_kms: make kmstest_get_cairo_surface static - - Only used internally in igt_kms.c. - - Signed-off-by: Daniel Vetter - -commit 2fc2fa547190f1ba6083ffab67f9ebfb077a544d -Author: Daniel Vetter -Date: Sun Mar 23 16:52:49 2014 +0100 - - lib/igt_kms: s/kmstest_create_fb2/kmstest_create_fb/ - - Simplify the name since the old _fb function is now gone. - - Signed-off-by: Daniel Vetter - -commit 70182167d6d39e18d03109687918752d04165c32 -Author: Daniel Vetter -Date: Sun Mar 23 16:36:40 2014 +0100 - - lib: remove kmstest_create_fb - - Use the new-style function using drm fourcc codes instead everywhere. - - To easily use thew fourcc based interface also expose - bpp_depth_to_drm_format from the library. Finally include drm_fourcc.h - from the igt_kms.h header since pretty much everyone needs this now. - - Signed-off-by: Daniel Vetter - -commit 288e80f2788153cefda271e3847c82af3f40791c -Author: Daniel Vetter -Date: Sun Mar 23 16:24:38 2014 +0100 - - lib/igt_aux: Lost doc polish hunk. - - Oops. - - Signed-off-by: Daniel Vetter - -commit 785a0cd4ba8bf7e89dc91fdc6c2fbe2e78d26f5b -Author: Ben Widawsky -Date: Tue Mar 25 11:35:23 2014 -0700 - - quick_dump: Fix the danvet fallout. - - quick_dump built fine, but it could actually run, since a lot of the - linking happens at run time. There is one hack where we redefine the - environment stuff, since depending on igt_aux means we have to pull in - libdrm, which I do not want to do. - - Cc: Ville Syrjälä - Signed-off-by: Ben Widawsky - -commit db25973c8651052dc2fd024ab67a8cea878aedc4 -Author: Mika Kuoppala -Date: Wed Mar 26 17:24:43 2014 +0200 - - lib/intel_batchbuffer fix OUT_RELOC doc tag - - Signed-off-by: Mika Kuoppala - -commit 71c6f87eb3dacffbd489c83acfe95baf613d20cb -Author: Daniel Vetter -Date: Wed Mar 26 15:09:23 2014 +0100 - - lib/igt_core: fix igt_skip_on_simulation regression - - I've forgotten that we might want to call this from within specific - subtests (or special helpers like the autoresume one). - - Also props for being competent enough to write a testcase, but - incompetent enough to botch the job up. - - Fix both things and remove a leftover debug printf while at it. - - Signed-off-by: Daniel Vetter - -commit c8190147526000bc002c611bd3612caf2de22bf8 -Author: Daniel Vetter -Date: Tue Mar 25 17:46:32 2014 +0100 - - README: document quirks for regenerating gtk-doc - - It sucks a bit atm :( - - Signed-off-by: Daniel Vetter - -commit 05f6a35d40a9374ea560c88c2b12a715eb404261 -Author: Daniel Vetter -Date: Tue Mar 25 14:23:20 2014 +0100 - - tests/gem_exec_parse: fixups for the recent massive refactoring - - I think we might have some use for a do_ioctl_expected_errno or some - such thing. But that's for later. - - Cc: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 6bf7307d8d5e0f1581cc3856528f7f49ef552036 -Author: Brad Volkin -Date: Wed Jan 29 13:58:30 2014 -0800 - - tests/gem_exec_parse: Test a command crossing a page boundary - - This is a speculative test in that it's not particularly relevant - today, but is important if we switch the parser implementation to - use kmap_atomic instead of vmap. - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 56fee51b3140d33824bafc79c86c5c38346807cc -Author: Brad Volkin -Date: Wed Jan 29 13:58:29 2014 -0800 - - tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 1f3e03bee3af336c6b7b47e04e9f0a552a9a9289 -Author: Brad Volkin -Date: Wed Jan 29 13:58:28 2014 -0800 - - tests/gem_exec_parse: Add tests for bitmask checks - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 1b1321cde7b60d413b425f358e6ecd2bd47b90fb -Author: Brad Volkin -Date: Wed Jan 29 13:58:27 2014 -0800 - - tests/gem_exec_parse: Add tests for register whitelist - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 59cb7e105e0ba3d4b1c3a378d962ec270eaa3700 -Author: Brad Volkin -Date: Wed Jan 29 13:58:26 2014 -0800 - - tests/gem_exec_parse: Add tests for rejected commands - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit e8b4ecd387ec12fb6ef28fd64307688f70ea1d92 -Author: Brad Volkin -Date: Wed Jan 29 13:58:25 2014 -0800 - - tests: Add a test for the command parser - - Start with a simple testcase that should pass. - - v2: Switch to I915_PARAM_CMD_PARSER_VERSION - - Signed-off-by: Brad Volkin - Signed-off-by: Daniel Vetter - -commit 49c611b5900fbc1a88b7dd59eb42458c090b25d0 -Author: Mika Kuoppala -Date: Mon Mar 17 19:09:23 2014 +0200 - - tests/gem_reset_stats: run non hw context tests also on older gens - - To gain more coverage on interface, default context and banning. - As there is no proper reset support for gen <= 3, we only - do limited interface testing on those. - - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 7a8109458ef92c6460852e3831aa30e53fef6857 -Author: Daniel Vetter -Date: Fri Mar 14 16:47:50 2014 +0100 - - tests/pm_rps: fixup the blt copy load helper changes - - All suggested by Jeff McGee. - - Signed-off-by: Daniel Vetter - -commit 816c94723632b4876b3b0b965009ceab5e8bec2b -Author: Daniel Vetter -Date: Sun Mar 23 15:14:16 2014 +0100 - - lib/intel_batchbuffer: document header dependencies - - At least with the core library headers the situation is now fairly - sane. There's still fun stuff going on around *_reg.h and most of the - source files just have a cargo-culted list of headers ... - - Signed-off-by: Daniel Vetter - -commit 187b66da0946bd213cfb8c52178d70739707cad9 -Author: Daniel Vetter -Date: Sun Mar 23 15:03:14 2014 +0100 - - lib/drmtest: api documentation - - Also rename the arguments of do_ioctl a bit for better clarity. - - I haven't figured out a way to reference other section headers, hence - the links to igt_core and intel_batchbuffer are a bit fragile - unfortunately. It gets the job done though. - - Signed-off-by: Daniel Vetter - -commit 7bb40944e2b2a92f6f52c288f8a88b0fcd14b991 -Author: Daniel Vetter -Date: Sun Mar 23 14:45:13 2014 +0100 - - lib: Use @include tag for include files - - Occasionally useful to read documentation ... - - Signed-off-by: Daniel Vetter - -commit 8221fda087e5c445ddda2bf38c09c49c4d27a7fe -Author: Daniel Vetter -Date: Sun Mar 23 14:38:17 2014 +0100 - - lib: s/igt_env_set/igt_check_boolean_env_var - - So I wasn't really happy with env_set since it's way too close to - setenv(), whic actually _sets_ and environment variable. So use check - instead of set as the verb (well adjective for env_set). - - Also sprinkle in some hints that we talk about a boolean setting here. - - Signed-off-by: Daniel Vetter - -commit 47575c7710b2cc14f4b96de71540375e0c1d43b4 -Author: Daniel Vetter -Date: Sun Mar 23 14:18:23 2014 +0100 - - lib/igt_aux: api documentation - - I'm not really happy with the name of the igt_env_set function, I'll - follow up with a patch to change it. - - Signed-off-by: Daniel Vetter - -commit f5daeec724aea1613334f14d58b101a5c8e430b4 -Author: Daniel Vetter -Date: Sun Mar 23 13:35:09 2014 +0100 - - lib: extract igt_aux.[hc] - - And shovel all the various helpers in there. - - Also move igt_set_vt_graphics_mode to igt_kms.h since the function is - implemented in igt_kms.c. And it fits better. I kinda missed this in - the prep work. - - Signed-off-by: Daniel Vetter - -commit 018f8c3c457d1609b18867a48a512e3639979dc9 -Author: Daniel Vetter -Date: Sat Mar 22 22:42:35 2014 +0100 - - lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/ - - This is prep work to extract a new igt aux library with all kinds - of random stuff. Also give it a bit a more suitable name to - indicate that this is just a flag and doesn't do the aub dumping - itself. - - Signed-off-by: Daniel Vetter - -commit 95e89f0ede9ed84b5cd0c39b7f68bc08fb120c3b -Author: Daniel Vetter -Date: Sat Mar 22 22:41:28 2014 +0100 - - lib/intel_io: api documentation - - As usual de-inline functions for gtkdoc to see them. - - I've decided to exclude the register map stuff since that's not - terribly interesting. - - Aside: gtkdoc falls over when the title of a section contains a slash, - hence why it reads "IO" instead of "I/O". The fun ... - - Signed-off-by: Daniel Vetter - -commit 2d4656fb699dd9bc5329b69b2955a6e4c3753971 -Author: Daniel Vetter -Date: Sat Mar 22 22:23:04 2014 +0100 - - lib/intel_io: rename mmio setup functions - - Makes their intent a bit clearer. - - Signed-off-by: Daniel Vetter - -commit c03c6ceb293fd667a6b582377c182dfc3b6d0f32 -Author: Daniel Vetter -Date: Sat Mar 22 21:34:29 2014 +0100 - - lib: rename intel_gpu_tools.h to intel_io.h - - With the header cleanup we can now give this header a suitable name, - since it now really only contains register access and other I/O - functions and assorted definitions. - - Signed-off-by: Daniel Vetter - -commit 254f19ba8dc4b00d0d5df0a4f8d0a0cb104b2df5 -Author: Daniel Vetter -Date: Sat Mar 22 21:29:01 2014 +0100 - - lib: unnecessary header removal for drmtest.h, part 2 - - I've left unistd.h in it - it's not strictly required but most users - of drmtest.h want it for the open helpers, and then you kinda need to - close that file descriptor again ... - - Signed-off-by: Daniel Vetter - -commit e49ceb869056255b8b6b94720b2279f6de88c893 -Author: Daniel Vetter -Date: Sat Mar 22 21:07:37 2014 +0100 - - lib: unnecessary header removal for drmtest.h, part 1 - - Brought a few missing headers to light in ioctl_wrappers.h, too. - - Signed-off-by: Daniel Vetter - -commit 924115bfcd5beae84f2e2d6b266c619659185475 -Author: Daniel Vetter -Date: Sat Mar 22 20:18:51 2014 +0100 - - lib: more unecessary header removal - - This time big with media_fill.h - - Signed-off-by: Daniel Vetter - -commit 6cfcd715898198cbd8edd955ed24cf57f6e8d9ee -Author: Daniel Vetter -Date: Sat Mar 22 20:07:35 2014 +0100 - - lib: remove uncessary #includes from headers - - Only include what the header itself needs. The big fish here is - intel-gpu-tools.h. More will follow. - - One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one - of which was broken. - - Signed-off-by: Daniel Vetter - -commit cd6d5a61b334aac183c85a3d2289f96a0364e911 -Author: Daniel Vetter -Date: Sat Mar 22 19:35:40 2014 +0100 - - lib: add #include "foo.h" lines like in manpages - - Should help in alleviating the header mess we have atm. - - Signed-off-by: Daniel Vetter - -commit 0e22f14ed642af94db5f0dd7461920274be3361a -Author: Daniel Vetter -Date: Sat Mar 22 19:27:04 2014 +0100 - - tests|lib: remove assert.h includes - - Only the igt core and non-test tools should have asserts to catch - internal errors, tests and helper libraries should all user igt_asert - instead. - - Fix things up where assert instead of igt_assert was used. - - One tiny step towards header sanity. - - Signed-off-by: Daniel Vetter - -commit bff22f7317a39605d53cf142e2c0f5c424d9c12c -Author: Daniel Vetter -Date: Sat Mar 22 19:21:26 2014 +0100 - - lib: Move non-register things out of intel-gpu-tools.h - - Right now almost everything in there concerns itself with register - access. Move everything else out (into drmtest.h for lack of better - place) to prepare for api documentation. - - Also rename intel_drm.c to intel_os.c since it contains OS, not - drm abstractions. - - Signed-off-by: Daniel Vetter - -commit 7754c4dd769e61ea57bf3e4ab635099b47aa6223 -Author: Daniel Vetter -Date: Sat Mar 22 18:16:30 2014 +0100 - - lib/intel_batchbuffer: api documentation for render copy/media fill - - Also fix a fumble in the documentation for intel_blt_copy. One thing - we might want to do is unify the parameter ordering here a bit ... - - Again gtkdoc fails to pick up the documentation for struct igt_buf :( - - Signed-off-by: Daniel Vetter - -commit 43b7aa44fdc8dee372f6d0766e953da0a36de25a -Author: Daniel Vetter -Date: Sat Mar 22 18:04:52 2014 +0100 - - lib/intel_batchbuffer: drop cpu_mapping from igt_buf - - It's unused. There's still num_tiles getting in the way of things, - but that is used by gem_stress a bit. - - Signed-off-by: Daniel Vetter - -commit 53a4d9e982420e8a921ecf7b9542adbd3586317c -Author: Daniel Vetter -Date: Sat Mar 22 15:49:02 2014 +0100 - - lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs - - Now everything is prepared to pour some neat api docs over this all. - - Signed-off-by: Daniel Vetter - -commit 83a4c7d3eb6347f9b743144611b08a2869f11f94 -Author: Daniel Vetter -Date: Sat Mar 22 15:44:48 2014 +0100 - - lib/intel_batchbuffer: igt_ namespace for the buffer structure - - Step one to properly namespace the rendercpy/mediafill functions. Als - give the buf_height/width helpers a proper igt_ prefix. - - Signed-off-by: Daniel Vetter - -commit 82c6dffe9fdc75a7ef3b9a7e53e1c20d8a9b3703 -Author: Daniel Vetter -Date: Sat Mar 22 15:41:42 2014 +0100 - - lib/intel_batchbuffer: un-inline buf_height/width - - gtkdoc won't pick them up otherwise. - - Signed-off-by: Daniel Vetter - -commit aaebbc513a2f1fd94e9db5fc2841c2bd617e3472 -Author: Daniel Vetter -Date: Sat Mar 22 15:35:16 2014 +0100 - - lib: make media_fill.h an internal header - - Same deal as with rendercopy.h. - - Signed-off-by: Daniel Vetter - -commit 7dc0001f3db58af82f7e34c83a9fdb5fe90baccd -Author: Daniel Vetter -Date: Sat Mar 22 15:31:15 2014 +0100 - - lib: make rendercopy.h an internal header - - And move the public interfaces into intel_batchbuffer.[hc]. - - A bit messy since we are fairly inconsistent with our header #include - handling. - - Also exclude rendercopy.h from the documentation. - - Signed-off-by: Daniel Vetter - -commit a8e8654f81380c19f7c90479f98b9d9314f638b3 -Author: Daniel Vetter -Date: Sat Mar 22 15:12:57 2014 +0100 - - lib/intel_chipset: api docs - - Unfortunately gtkdoc doesn't pick up the intel_pch enum. - - Signed-off-by: Daniel Vetter - -commit 266b26b3eda733dcc2c0a7cc6061b024a0dede70 -Author: Daniel Vetter -Date: Sat Mar 22 14:59:58 2014 +0100 - - lib/intel_chipset: intel_ prefix for pch global - - Just a bit better namespacing. - - Signed-off-by: Daniel Vetter - -commit aed95c390ae834a1661fb1e4ec433177b1c01fcc -Author: Daniel Vetter -Date: Sat Mar 22 14:54:28 2014 +0100 - - lib: consolidate chipset helpers in intel_chipset.[hc] - - Signed-off-by: Daniel Vetter - -commit 94e1b6af99b3548014686a0943bb286e3c81a889 -Author: Daniel Vetter -Date: Sat Mar 22 14:45:50 2014 +0100 - - lib: rename intel_pci.c to intel_chipset.c - - This is to consolidate all the chipset related functions to - intel_chipset.[hc]. - - Unfortunately we need to rename a wrapper lib file in quick_dump, too. - And quick_dump makes automake a bit unhappy apparently. - - Signed-off-by: Daniel Vetter - -commit 52edf3a17714e1ba2a9060401ec0f63614bc632b -Author: Daniel Vetter -Date: Sat Mar 22 14:45:54 2014 +0100 - - tests/kms_cursor_crc: Fix up breakage - - I've accidentally broken the new cursor size extensions, but it - wasn't quite correct before already: Variables which are set in - igt_fixtures _must_ be outside of the stackframe of the igt_fixture - block. - - Signed-off-by: Daniel Vetter - -commit a388f3b98f039403a4583748db980d4a44dd6748 -Author: Daniel Vetter -Date: Sat Mar 22 13:22:11 2014 +0100 - - lib: allow igt_skip_on_simulation outside of fixtures. - - Thomas noticed that in simulation mode a lot of the tests fall over - instead of skipping properly. This is due to recently added - self-checks which ensure that any call to igt_skip happens either - within a fixture or subtest block (or it's a simple test without - subtests). This is to catch bugs since pretty much always not wrapping - up hardware setup and checks into these blocks is a bug. - - Bug simulation skipping is a bit different, so allow that exception. - Otherwise we'd need to fix up piles of tests (and likely need to play - a game of whack-a-mole). - - Also add a library testcase for all the different variants to make - sure it really works. - - Cc: Thomas Wood - Cc: Ben Widawsky - Signed-off-by: Daniel Vetter - -commit c196c14319b8aae6369a9ce0ba349416847105a7 -Author: Damien Lespiau -Date: Fri Mar 21 14:36:54 2014 +0000 - - build: Define enable_gtk_doc when the m4 macro is missing - - For setups where we don't have gtk-doc installed, ie when the - GTK_DOC_CHECK macro doesn't expand, we still need to populate the - enable_gtk_doc variable to provide a value to the configure summary. - - Acked-by: Daniel Vetter - Signed-off-by: Damien Lespiau - -commit 20dbc5d4cfb51152278a2ad4627d1db102bf9225 -Author: Adrian Negreanu -Date: Fri Mar 21 09:06:15 2014 +0200 - - fix out-of-tree builds - - version.h is -include-ed assuming that builddir is the same - as srcdir; - - In file included from :0:0: - ./../../tests/../lib/check-ndebug.h:3:1: fatal error: - ../../tests/../version.h: No such file or directory - #endif - ^ - - v2: Use top_builddir as suggested by Damien - builddir gets expanded - to ./ which worked accidentally since automake includes top_builddir - by default. - - Signed-off-by: Adrian Negreanu (v1) - Signed-off-by: Daniel Vetter - -commit 701a755bde7a6f4b3973ac76f4f00c8702db4c7d -Author: Daniel Vetter -Date: Thu Mar 20 17:31:16 2014 +0100 - - tests/kms_cursor_crc: Review from Imre for Sagar's patch - - Signed-off-by: Daniel Vetter - -commit ba3a1a86b76d0648a341de4e86c84d2e2a515c51 -Author: Sagar Kamble -Date: Tue Mar 18 15:59:43 2014 +0530 - - kms_cursor_crc: Enabling this test for all cursor sizes - - v1: Added 128x128 and 256x256 cursor size support. - - v2: Refined the test to use igt_subtest_f and automate enumeration. - - v3: Restructuring test enumeration using drmGetCap. [Daniel's review comments] - - Signed-off-by: Sagar Kamble - Reviewed-by: Imre Deak - Signed-off-by: Daniel Vetter - -commit cde058ae355f47a2bf04a792bfb3647e95157397 -Author: Rodrigo Vivi -Date: Tue Mar 18 11:18:56 2014 -0300 - - tests/gem_gtt_hog: Fix for BDW - - Update XY_COLOR_BLT command for Broadwell. - - v2: stash devid and remove ugly double allocation. (by Chris). - v3: fix inverted blt command size and stash fd, devid and intel_gen. - v4: improved len calculation and noop between blt commands. (by Chris). - - Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73724 - - Cc: Chris Wilson chris@chris-wilson.co.uk> - Signed-off-by: Rodrigo Vivi - Signed-off-by: Ben Widawsky - -commit d8164356e7bd4a90b2292e3687ec5fa5ec7fd021 -Author: Rodrigo Vivi -Date: Tue Mar 18 11:18:55 2014 -0300 - - tests/gem_gtt_hog: Use XY_COLOR_BLT instead of COLOR_BLT. - - Signed-off-by: Rodrigo Vivi - Signed-off-by: Ben Widawsky - -commit 2f96726c960dd2e4700214d30ccb86d33b354d2d -Author: Rodrigo Vivi -Date: Tue Mar 18 11:18:54 2014 -0300 - - tests/gem_wait_render_timeout: Fix for BDW - - Update XY_COLOR_BLT command for Broadwell. - - Signed-off-by: Rodrigo Vivi - Signed-off-by: Ben Widawsky - -commit 3e6d9d912aabacc3c07b6d97dde862d8f51fbf6e -Author: Rodrigo Vivi -Date: Tue Mar 18 11:18:53 2014 -0300 - - tests/gem_wait_render_timeout: Use XY_COLOR_BLT instead of COLOR_BLT. - - Signed-off-by: Rodrigo Vivi - Signed-off-by: Ben Widawsky - -commit e8562b30819e6554b4cdd5763a35069fba77c2a9 -Author: Ben Widawsky -Date: Wed Mar 19 11:40:58 2014 -0700 - - gem_wait_render_timeout: use igt_assert_cmpint - - Signed-off-by: Ben Widawsky - -commit 5a5880426eb275bb600551460eb23ad44e8c2fbf -Author: Ben Widawsky -Date: Wed Mar 19 10:14:15 2014 -0700 - - Revert "gen8 rendercpy: temporarily disable" - - This reverts commit e41928e6c9bb3f24833a827903f1afeda83592d6. - -commit d92c2cf1deafe1cb2404844b52c17817e0e1ba56 -Author: Ben Widawsky -Date: Wed Mar 19 09:22:53 2014 -0700 - - intel_gtt: Dump the whole GTT - - The tool formerly only dumped the aperture size, which is fine, but not - everything interesting. Most of the patch is just the variable rename. - The real work happens with using the BAR0 size divided by 2 instead of - the BAR2 size. - - Signed-off-by: Ben Widawsky - -commit 00bd3eba11de4ce4a7dacc62f131b401f7dfbabc -Author: Ben Widawsky -Date: Wed Mar 19 09:17:36 2014 -0700 - - quick_dump: gen8 private PAT - - Signed-off-by: Ben Widawsky - -commit 10571b8ccb5f7bda61e3072705e5d0670f54afb3 -Author: Daniel Vetter -Date: Sun Mar 16 19:34:37 2014 +0100 - - lib/igt_core: Document library design best practices - - This is what I've been doing in the past few months when refactoring - i-g-t code. More ideas and also patterns to add highly welcome. - - v2: Some minor polish on the text and add another bullet to reference - the kernel's coding style. - - Signed-off-by: Daniel Vetter - -commit 3ea97f2e51e8bf39ecabae132cdc6b431c72f672 -Author: Daniel Vetter -Date: Sun Mar 16 18:56:14 2014 +0100 - - lib/igt_core: Small api doc fix - - Signed-off-by: Daniel Vetter - -commit f2e5dc0114f0045e28d7a562cec9daf23e978841 -Author: Daniel Vetter -Date: Sun Mar 16 15:09:22 2014 +0100 - - lib/igt_debugfs: s/igt_pipe_crc_check/igt_require_pipe_crc/ - - Functions which provide feature checks through igt_skip should be of - the form _require_. - - Otoh feature checks which return in a boolean whether the feature is - available should be of the form _has_, e.g. - gem_has_blt. - - Signed-off-by: Daniel Vetter - -commit dcf947aa4f2de2f3aa4766e0e3d31d2a992d3d84 -Author: Daniel Vetter -Date: Sun Mar 16 14:52:32 2014 +0100 - - lib/igt_debugfs: Remove igt_debugfs_init - - And also move the igt_debugfs_t type out of the headers. - - Signed-off-by: Daniel Vetter - -commit cc8f0e6e3ab72beb6b296dd866fd27842dec283f -Author: Daniel Vetter -Date: Sun Mar 16 14:49:35 2014 +0100 - - lib/igt_debugfs: Remove debugfs from pipe crc functions - - All tests have now lost explicit references to igt_debugfs_t! - - Signed-off-by: Daniel Vetter - -commit 9a7609a8e48ac69bfd786087abd18c8a858d6ad3 -Author: Daniel Vetter -Date: Sun Mar 16 14:46:39 2014 +0100 - - lib/igt_debugfs: Remove debugfs from igt_debugfs_fopen - - Also add a missing igt_assert to kms_fbc_crc and again add the missing - Returns: section to the api doc. - - Signed-off-by: Daniel Vetter - -commit f04f17bcd404d7be720148fee6bb425cdb41dab1 -Author: Daniel Vetter -Date: Sun Mar 16 14:41:25 2014 +0100 - - lib/igt_debugfs: Remove debugfs from igt_debugfs_open - - Also update the api docs a bit since the Returns: section was missing. - - v2: Readd the accidentally lost line for @filename. - - Signed-off-by: Daniel Vetter - -commit 28b6e41142c035b46d2784de399c5dadfa5ce429 -Author: Daniel Vetter -Date: Sun Mar 16 14:40:32 2014 +0100 - - lib/igt_debugfs: implement a singleton igt_debugfs_t instance - - Allows us to remove every so little bit of boilerplate from - tests, once it's all rolled out. - - Signed-off-by: Daniel Vetter - -commit 8fe0c50871b0af87c5f41a6b6d3b31b9bffe9f25 -Author: Mengdong Lin -Date: Thu Mar 13 16:38:02 2014 -0400 - - intel_audio_dump: fix CTS/M value index - - This patch fixes the reversed CTS/M value index when dumping the - 'audio M/CTS programing enable' register. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - Signed-off-by: Ben Widawsky - -commit 374290e4300768190fee5ad742f1f1beb036de4e -Author: Daniel Vetter -Date: Fri Mar 14 16:08:10 2014 +0100 - - tests: update .gitignoe - - Signed-off-by: Daniel Vetter - -commit b0b4f8db717500f2618c8077dc58c217eb46af06 -Author: Daniel Vetter -Date: Fri Mar 14 16:07:28 2014 +0100 - - tests/drv_suspend: new forcewake subtest - - I suspect that currently we have an issue in there with the runtime PM - refcounting, but silly me developed this on a machine with runtime PM - support ... - - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 2839619f497dae8353d0592dcccf183374a18f73 -Author: Daniel Vetter -Date: Fri Mar 14 16:06:51 2014 +0100 - - lib/igt_core: add printf attribute to igt_vlog - - I didn't know that this also works for the varargs versions of - format strings. But gcc was kind enough to let me know. - - Signed-off-by: Daniel Vetter - -commit ea18fc16cd88a31b5d390721ad103efa07e288f1 -Author: Daniel Vetter -Date: Fri Mar 14 16:00:22 2014 +0100 - - lib: extract igt_open_forcewake_handle - - ... and I immediately regret that I've killed the return value - for igt_debugfs_init, since we have callers which need to work - without the forcewake stuff, e.g. the reg dumper needs to work - without i915 loaded. - - Put this new helper to good use in the mmio code and the pm_pc8 - testcase. - - Cc: Paulo Zanoni - Signed-off-by: Daniel Vetter - -commit 553d594b6efd117497791e708146588268c992a9 -Author: Daniel Vetter -Date: Fri Mar 14 11:01:09 2014 +0100 - - tests/pm_rps: wait longer for idling - - Big cores seem to take forever to idle, at least my ivb here. Fairly - ridiculous, so maybe there's more room for our debooster to kick in. - - Anyway, this gets the min-max-config-idle and reset subtests going - somewhat reliably on my ivb. They still occasionally fail with the - current frequency pegged to max (or close to it) for no apparent - reason at all. Rebooting tends to fix it. - - Don't ask, don't tell. - - Cc: Jeff McGee - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit a7dd98497a1a9c2dc31f667ad23da86d4b2d7ad9 -Author: Daniel Vetter -Date: Fri Mar 14 10:33:53 2014 +0100 - - tests/pm_rps: use igt_assert_cmpint - - Much better debug output almost for free. - - Signed-off-by: Daniel Vetter - -commit 5cf8d8d6dbfec71746173fae2a64d40f39e144cf -Author: Daniel Vetter -Date: Thu Mar 13 21:25:01 2014 +0100 - - lib/igt_core: document the caveats of magic code blocks - - v2: Polish the wording a bit. - - Signed-off-by: Daniel Vetter - -commit 5632bc81d944ae5070c403688b995ff583bb1ac7 -Author: Daniel Vetter -Date: Fri Mar 14 10:26:39 2014 +0100 - - tests/pm_rps: load harder - - Big core platforms need some seriuos omph to break a sweat. - - This fixes min-max-config-loaded here on my ivb. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75146 - Cc: Jeff McGee - Signed-off-by: Daniel Vetter - -commit d4f89d0ff25f3b382e1eabe4f0def5a1c09082ea -Author: Daniel Vetter -Date: Fri Mar 14 10:12:55 2014 +0100 - - tests/pm_rps: simplify load helper setup - - There's no need to be fancy here. - - Cc: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 5188bbe23ea6e7a2bf4d5572b64f410399aba9f7 -Author: Daniel Vetter -Date: Fri Mar 14 10:06:02 2014 +0100 - - tests/pm_rps: ducttape for igt fork helper cleanup issues - - We don't call cleanup handlers when exiting a subtest currently, only - when exiting the entire binary. Which means pm_rps falls over when it - fails more than one subtest. - - Cc: Jeff McGee - Signed-off-by: Daniel Vetter - -commit f962dee636f2992152617be4dc9e62c5055473ec -Author: Daniel Vetter -Date: Thu Mar 13 17:59:47 2014 +0100 - - test/kms_pipe_crc_basic: Fix up igt_kms conversion breakage - - Apparently the framework doesn't ignore disabled pipes correctly, so - help it out a bit. - - Again an awesome track record for our QA and bug scrubbers :( - - Oh and while I rant: Docs for this stuff, please ;-) - - Signed-off-by: Daniel Vetter - -commit bd53d722dde87d67742b4ff4ee192bd8c6058328 -Author: Daniel Vetter -Date: Thu Mar 13 17:27:47 2014 +0100 - - lib: add igt_vlog to print varargs - - ... and put it to immediate use in igt_display_log. - - To make this all add up also drop the return value of igt_display_log, - no one really cared anyway. - - Aside: I've noticed that every time another subtest runs (at least - with kms_pipe_crc_basic) the log indent level moves one up ... - - Signed-off-by: Daniel Vetter - -commit 1e9e1baba389fe498be12390ceeeacb1d141a5cf -Author: Daniel Vetter -Date: Thu Mar 13 17:20:05 2014 +0100 - - lib/igt_kms: rip out custom verbose loggin support - - Instead just piggy-pack on top of igt_log. - - Signed-off-by: Daniel Vetter - -commit 523d909834bd142373ff5b25a00881f93f3160cf -Author: Daniel Vetter -Date: Thu Mar 13 18:09:41 2014 +0100 - - NEWS: post-release blurb and mention api doc work - - Signed-off-by: Daniel Vetter - -commit eaccd444f774ff88f9cfc24fb0a5e5b20f71d749 -Author: Daniel Vetter -Date: Thu Mar 13 03:35:02 2014 +0100 - - lib: switch intel_copy_bo to directly take a size - - Instead of a width/height combination. Since I've been lazy with the - math this now only accepts page-aligned copy operations, but that's - all we need really. - - Signed-off-by: Daniel Vetter - -commit 32d41cc7a7fc357758a60f019341805ae1ee418d -Author: Daniel Vetter -Date: Thu Mar 13 02:38:04 2014 +0100 - - tests/prime_nv_tests: fix copied buffer size - - Doesn't affect the test since we only check the first few bytes. But I - want to switch the copy code to always copy entire pages around, so - use the right buffer size. - - Signed-off-by: Daniel Vetter - -commit ec5f9e87882257fdde39166f0f4b931ecb5b6009 -Author: Daniel Vetter -Date: Thu Mar 13 01:13:28 2014 +0100 - - lib: api docs for intel_batchbuffer - - - I didn't bother to document the BLIT batch header macros - I'm not - too happy with them and they're fairly obscure. - - intel_copy_bo could use some interface love, added a FIXME comment - for now. - - Signed-off-by: Daniel Vetter - -commit 49e3877ae7280efb62dc23ea748afbeb96934ace -Author: Daniel Vetter -Date: Thu Mar 13 01:38:42 2014 +0100 - - lib/intel_batchbuffer: Remove BATCH_LOCALS - - Totally unused, we have frisky implicit assumptions that the - batch is called batch instead. - - Signed-off-by: Daniel Vetter - -commit 675c91974e2e3cc781a4dd630c20c3f992eae8b8 -Author: Daniel Vetter -Date: Wed Mar 12 21:30:46 2014 +0100 - - lib: remove hw context #defines - - The libdrm we require nowadays has them already. - - Signed-off-by: Daniel Vetter - -commit 3f284f796721f750cb8af4bac7839b5a6e1edb66 -Author: Daniel Vetter -Date: Wed Mar 12 21:26:55 2014 +0100 - - docs: Exclude debug.xml - - It is all just stuff used internally by the EU debugger only. Not - really generally useful, expect if someone wants to write - documentation for the debugger. - - Which needs a lot more than just this. - - Signed-off-by: Daniel Vetter - -commit a095072b64a37a7df6a011608fb932796991a891 -Author: Rodrigo Vivi -Date: Thu Mar 13 07:52:47 2014 -0300 - - bump version to 1.6 and add the release date - - Signed-off-by: Rodrigo Vivi - -commit 981276819fdf6de312ecafcef27822741265f237 -Author: Daniel Vetter -Date: Wed Mar 12 18:53:51 2014 +0100 - - lib/igt_debugfs: api docs - - Again issues with an enum, this time intel_pipe_crc_source. The - typedefs seem to work better here though. - - Signed-off-by: Daniel Vetter - -commit 36a83a6c5ccfff7336d257aba499c4e72674615a -Author: Daniel Vetter -Date: Wed Mar 12 19:24:00 2014 +0100 - - lib/igt_debugfs: drop drm_fd argument from igt_pipe_crc_new - - It's nowhere used and removing it gives us a cleaner, more - orthogonal interface. - - Signed-off-by: Daniel Vetter - -commit 803d07b2fff95794d8a840728d417e8e1d31264c -Author: Daniel Vetter -Date: Wed Mar 12 19:00:48 2014 +0100 - - lib: make igt_debugfs_open infallible - - (Almost) no one cared anyway. - - Signed-off-by: Daniel Vetter - -commit 096bb851f6bbcd018b3e7dc42930952971c4ea72 -Author: Daniel Vetter -Date: Wed Mar 12 18:53:44 2014 +0100 - - lib/ioctl_wrappers: api doc fixup - - Oops. - - Signed-off-by: Daniel Vetter - -commit adb28fd71d21175f047d7ed4cc3e4683a146b57b -Author: Daniel Vetter -Date: Wed Mar 12 16:53:47 2014 +0100 - - lib: move prefault helpers to igt_debugfs.c - - This way all debugfs library code is in one place, ready for some api - documentation care. - - Signed-off-by: Daniel Vetter - -commit 55e64989e5f0359796d6e71d6753e432861b04a4 -Author: Daniel Vetter -Date: Wed Mar 12 02:34:40 2014 +0100 - - lib/igt_core: api documentation - - At most a bit of comment of function declaration movement for more - polish. One tricky bit is to #ifdef out (only for gtkdoc of course) - the struct option; forward declaration - gtkdoc needlessly lists it. - - FIXME: The struct documentation for igt_helper_process somehow doesn't - get picked up ... Same issue seems to be with the igt_log_level enum, - I've shoveled the relevant documentation into igt_log in free-form for - now. - - Signed-off-by: Daniel Vetter - -commit d63fe1519d34f0d0311ef8e3472c8b83c3dcfde3 -Author: Daniel Vetter -Date: Wed Mar 12 01:29:52 2014 +0100 - - lib: extract igt_core.c - - Same game as with ioctl_wrappers.c. - - To split was rather clean except for the static function - oom_adjust_for_doom. But that was a bug, the calls to it in the - various open helpers should simply be done at init and fork time. - Which was already the case, except for simple testcase. So fix it up. - - While at it also start with a small section header for the - documentation. - - v2: Don't forget to update the xml template ... - - Signed-off-by: Daniel Vetter - -commit 556c49f20bf93c32b55f494ec896703293e358cd -Author: Daniel Vetter -Date: Tue Mar 11 23:27:06 2014 +0100 - - lib/ioctl_wrappers: api doc - - Also some tiny polish to function interface: - - @caching in gem_set_tiling should be uint32_t to match the ioctl - struct. - - s/size/length/ for gem_write/read. - - move gem_get_num_rings to the other ring feature helpers. - - v2: Also demote gem_require_ring from static inline and move it, too. - - v3: Also move gem_handle_to_libdrm_bo. - - Signed-off-by: Daniel Vetter - -commit 766c5bc6ae24fe2ec03ada80905ccfb1b18afc26 -Author: Daniel Vetter -Date: Tue Mar 11 22:58:07 2014 +0100 - - lib: extract ioctl_wrappers.c - - I want to group the ioctl wrappers and related functions into their - own documentation section. - - Apparently gtkdoc refuses to obey this wish without a corespdonding - header. So appease it. Also gtkdoc seems to struggle with rebuilding a - bit ... - - Signed-off-by: Daniel Vetter - -commit 6c659264a6f6d54d966d9fc2a1651ad0405a8501 -Author: Thomas Wood -Date: Tue Mar 11 16:18:48 2014 +0000 - - tests: add missing assertion - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 682f69385a07b81ee0b2524b9556c0b768454147 -Author: Thomas Wood -Date: Tue Mar 11 16:18:50 2014 +0000 - - lib: Add missing header to Makefile.sources - - i915_pciids.h was missing from Makefile.sources, which caused distcheck to - fail. - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit a90846adf52127afe6dd3537c047b93c31cb313f -Author: Daniel Vetter -Date: Tue Mar 11 21:03:39 2014 +0100 - - gtk-doc: Document the docs - - - configure output to easily see whether docs are built or not - - small blurb in README - - Signed-off-by: Daniel Vetter - -commit 2d4438605efd57a7ed336df42326693065ee5d02 -Author: Thomas Wood -Date: Tue Mar 11 16:04:29 2014 +0000 - - drmtest: reformat the API documentation - - Make the existing documentation compatible with gtk-doc. - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 14ea2a04ebfa287e33b69a3bc7e47f02ba93c9ed -Author: Thomas Wood -Date: Tue Mar 11 16:04:28 2014 +0000 - - Add API documentation support - - Add optional support for building API documentation using gtk-doc. - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit c769d0988b7fae0e758046ba165c9c52c4f2816a -Author: Daniel Vetter -Date: Tue Mar 11 15:45:22 2014 +0100 - - tests/drv_missed_irq_hand: Make it robuster - - Just launching empty batches isn't enough load on my speedy g33 - to force the kernel to enable interrupts an wait for them. - - So use some real load. With that the test is now fully reliably on - my g33 amchine. - - Signed-off-by: Daniel Vetter - -commit c3f2b6a339e002c2ea3c0462ebce2a374b54e093 -Author: Daniel Vetter -Date: Tue Mar 11 15:44:28 2014 +0100 - - tests/gem_exec_blt: More reasonable runtime - - Doing (1 << 18) - 1 repeats isn't really. With the reduced time the - test is also useful in some shell scripted tests which need some real - load (but not too much), like drv_missed_irq_hang. - - Signed-off-by: Daniel Vetter - -commit e2ee8b408057e5139182f47e980f3af20272fa28 -Author: Daniel Vetter -Date: Tue Mar 11 15:32:30 2014 +0100 - - tests/drv_missed_irq_hang: Remove debug output - - Signed-off-by: Daniel Vetter - -commit 20087e779d58fe0fdde156e329eb5d75e1e6336f -Author: Daniel Vetter -Date: Fri Mar 7 09:27:00 2014 +0100 - - NEWS: intel_audio_dump has now bdw support - -commit 02a32701192cb4832d95e121d5ee014d98dd1234 -Author: Daniel Vetter -Date: Fri Mar 7 09:23:58 2014 +0100 - - configure: Bump libdrm requirements - -commit 856afd588ef31d02c0dd8fd827a0af2725edc464 -Author: Chris Wilson -Date: Wed Mar 5 11:09:46 2014 +0000 - - igt/gem_pwrite_pread: Fix relocation offsets for gen8+ - - Oops, I didn't check to see if there was more than one call site where - we built and execbuffer. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237 - Signed-off-by: Chris Wilson - -commit 449509dddba1e4d3853093a872632b9504b8eaa7 -Author: Mengdong Lin -Date: Mon Mar 3 17:03:02 2014 -0500 - - intel_audio_dump: add support for Valleyview - - This patch adds support for dumping audio registers of Valleyview, - by reusing Ironlake code with a different base address and pipe number. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - -commit fa8c75028e6c6ae523f915fdc212adb30fea1ec3 -Author: Mengdong Lin -Date: Tue Mar 4 10:13:09 2014 -0500 - - intel_audio_dump: adjust code alignment - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - -commit 86d15e080d9977dcd3b0448cefb72259597b80d9 -Author: Mengdong Lin -Date: Mon Mar 3 13:52:06 2014 -0500 - - intel_audio_dump: share common audio dump code for Ironlake, Haswell & Broadwell - - Most audio config registers of Ironlake, Haswell and Broadwell are almost same - although the register names or some bit fields have little difference. - And HSW and BDW already share their code. - - This patch further shares code for ILK and HSW/BDW: - - ILK and HSW/BDW define their own base address to dump audio & display registers. - - Small functions to dump a specific register are defined and shared. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - -commit bae8a005d21288e61a547bba94b0a32a99c36b60 -Author: Mengdong Lin -Date: Mon Mar 3 13:23:50 2014 -0500 - - intel_audio_dump: define get_num_pipes() to get number of pipes for a device ID - - It's for future code sharing because some registers define their bit fields - according to the number of pipes. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - -commit 1803f1ebfad1e14b5d0eb8560d99efd3ddb6ef67 -Author: Mengdong Lin -Date: Fri Feb 28 16:18:11 2014 -0500 - - intel_audio_dump: define IS_HASWELL_PLUS to cover Haswell and its successors - - A macro IS_HASWELL_PLUS(devid) is defined to cover Haswell and its successors, - for code sharing. Now it covers HSW and BDW. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - -commit ed386663fe4894f9cfd2a3df4233292e0e3b39ac -Author: Mengdong Lin -Date: Fri Feb 28 13:25:27 2014 -0500 - - intel_audio_dump: move definitions of transcoder/pipe/port/converter earlier - - Move these enum definitions earlier for future code sharing. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - -commit 92d319702553d31e70bcb1a098e896418f041a41 -Author: Mengdong Lin -Date: Mon Mar 3 11:04:39 2014 -0500 - - intel_audio_dump: support using base address plus an offset to dump registers - - Layout of display and audio registers can be same for different Intel GPUs. - For code sharing, this patches defines functions to - - set the base address of display and audio registers - - dump registers using the base address and an offset - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - -commit cdf74b69c908b869e7e2daca04f49c5e5d02c097 -Author: Imre Deak -Date: Wed Mar 5 21:02:41 2014 +0200 - - kms_setmode: Add clone-single-crtc subtest - - The clone-single-crtc will test various cloning scenarios. - - Currently it does limit the number of simultanously cloned - connectors to the number of pipes in the system. That restriction - can be lifted in the future if desired. - - Signed-off-by: Ville Syrjälä - -commit a3b80912a993b4b6952917afea41906f88dda01e -Author: Chris Wilson -Date: Wed Mar 5 11:09:46 2014 +0000 - - igt/gem_pwrite_pread: Fix relocation offsets for gen8+ - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237 - Signed-off-by: Chris Wilson - -commit 072d358bf03d0c39dc83bce0b93801d030d2324f -Author: Chris Wilson -Date: Fri Feb 28 21:44:22 2014 +0000 - - igt/gem_pwrite_pread: Fix XY_SRC_COPY command length for gen8+ - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237 - Signed-off-by: Chris Wilson - -commit fa6b1516c5a5be1fcff8ee476a5e280e2e3cb16d -Author: Paulo Zanoni -Date: Wed Feb 26 16:51:12 2014 -0300 - - tests/pm_pc8: be more verbose on test_i2c failures - - Whenever I see that error, I go and print the numbers so I can check - which one is failing. - - Signed-off-by: Paulo Zanoni - -commit d406249bedb61120ea3f8c780ea995b8c70d3d8c -Author: Paulo Zanoni -Date: Wed Feb 26 15:42:07 2014 -0300 - - tests/pm_pc8: use intel_gen instead of a big IS_GEN check - - Much better! - - Signed-off-by: Paulo Zanoni - -commit 0a57d0b8d30b73f7d515a2099355f7883681d699 -Author: Paulo Zanoni -Date: Wed Feb 26 15:13:00 2014 -0300 - - tests/pm_pc8: BDW should also support PC8 residencies - - And I'm hoping the MSR register addresses will be the same. - - Signed-off-by: Paulo Zanoni - -commit d3582aeade9d90cb4adc8ff7c4339198494aaae7 -Author: Paulo Zanoni -Date: Wed Feb 26 14:48:50 2014 -0300 - - tests/pm_pc8: use XY_COLOR_BLT instead of just COLOR_BLT - - And add BDW support to it. - - Signed-off-by: Paulo Zanoni - -commit 6a6b8a213813de80a86d281ee9111aaca8ed5b36 -Author: Paulo Zanoni -Date: Wed Feb 26 11:12:28 2014 -0300 - - tests/pm_pc8: add "stay" mode - - I used to have a binary that would just disable all the screens - so - we can enter PC8/runtime PM - and then sleep forever. I used this - binary many times while debugging PC8 and runtime PM, and I also sent - the binary to many people so they would be able to test these things - without X running. - - Since pm_pc8 already implements everything that the separate binary - needs, and it even has some additional code to try to configure the - environment to actually reach PC8, it's easier to just ask people to - run "sudo ./pm_pc8 --stay" instead of sending them a file, asking them - to compile it, setup the environment, and then run it. - - Signed-off-by: Paulo Zanoni - -commit 8c475e0ba69c585bc11062edd1f7fc4bbded811c -Author: Chris Wilson -Date: Wed Feb 26 12:01:47 2014 +0000 - - evictions: Limit the number of minor eviction surfaces to fit in RAM - - We allocate more surfaces than used in a single pass in order to stress - the eviction code between batches. The intent here is not to exercise - swapping, and we fail to check that there is enough swap+memory to hold - all our surfaces. So limit the number of surfaces we allocate to fit - into RAM, and then require that the number of surfaces we need for - testing is less than the number of surfaces we can allocate. - - Signed-off-by: Chris Wilson - -commit ea332b64b6e9f6935da4b43f05fefcdcea32cc64 -Author: Chris Wilson -Date: Wed Feb 26 11:56:16 2014 +0000 - - lib: Test against available swap - - Even if we ignore the double-accounting bug in Linux, we need to be sure - that the remaining swapspace is adequate for running our test as the - system may be under load before we even start. - - Signed-off-by: Chris Wilson - -commit 37773d91d9b56f9f06c86e405e8dc9343f2c71c1 -Author: Paulo Zanoni -Date: Tue Feb 25 17:46:27 2014 -0300 - - tests/pm_pc8: add pci-d3-state subtest - - Currently the test suite just looks at the files provided by the - runtime power management framework to check if the device is runtime - suspended. Add a test that reads the PCI config space to check if the - device is actually in PCI D3 state or not. - - Signed-off-by: Paulo Zanoni - -commit 31b20f7478a27e159482ac23f3d128e90ca98d23 -Author: Paulo Zanoni -Date: Tue Feb 25 16:40:51 2014 -0300 - - tests/pm_pc8: add reg-read-ioctl subtest - - After I finally fixed the code that WARNs if we're runtime suspended - when reading registers I started getting the WARNs, so this test - should reproduce them on a Kernel with the problem. - - Signed-off-by: Paulo Zanoni - -commit 81ade89d6444ed4159c8cafb0512254f02ec34e0 -Author: Chris Wilson -Date: Mon Feb 24 08:52:28 2014 +0000 - - gem_render_tiled_blits: Trim usage to fit within RAM - - This is a render correctness test, the intention is not to exercise the - swapper (but preferrably some eviction code). - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247 - Signed-off-by: Chris Wilson - -commit 4550a18a571611197d3958ab3c1071ef69ec3838 -Author: Chris Wilson -Date: Mon Feb 24 08:52:28 2014 +0000 - - gem_render_linear_blits: Trim usage to fit within RAM - - This is a render correctness test, the intention is not to exercise the - swapper (but preferrably some eviction code). - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247 - Signed-off-by: Chris Wilson - -commit 8ebc02a54c22b7a83a34c923153861848183cd96 -Author: Ben Widawsky -Date: Fri Feb 21 13:15:35 2014 -0800 - - quick_dump: Add missed broadwell autodetect - - Signed-off-by: Ben Widawsky - -commit 42aa254c65fa47fbea38a268814f815166adc056 -Author: Ville Syrjälä -Date: Fri Feb 21 17:19:57 2014 +0200 - - kms_flip: Add dpms-vs-vblank-race and modeset-vs-vblank-race subtests - - dpms-vs-vblank-race and modeset-vs-vblank-race try to race wait for - vblank ioctls from one thread against modeset/dpms ioctls from another. - - Signed-off-by: Ville Syrjälä - -commit a0c936cfc128dfea6c58c4eef1e56cc29df21406 -Author: Chris Wilson -Date: Fri Feb 21 15:14:08 2014 +0000 - - kms_flip: Skip tests that try to inject GPU hangs if already terminally wedged - - Signed-off-by: Chris Wilson - -commit 0cc6a219f1de667ddc0c9a4011dc1c36a584be7b -Author: Chris Wilson -Date: Fri Feb 21 15:08:22 2014 +0000 - - kms_flip: Assert that hang_gpu() should only fail is the GPU is already hung - - Signed-off-by: Chris Wilson - -commit bf74a0ca3fa3b2656c5656c2365d11b6b406dbe6 -Author: Chris Wilson -Date: Fri Feb 21 14:42:27 2014 +0000 - - tests: Compile all threaded tests with -pthread when appropriate - - Signed-off-by: Chris Wilson - -commit 5f190f2d674222b27eff9f80d14761fde2e8fe7a -Author: Ville Syrjälä -Date: Fri Feb 21 16:08:28 2014 +0200 - - kms_flip: Fail the subtest if page flip hang recovery wasn't actually tested - - Context banning can prevent the page flip hang tests from actaully - testing anything, so make the relevant subtests fail in that case. - - Signed-off-by: Ville Syrjälä - -commit 48ba2cdf969698a2520193ec0c9cff99f89fe1f6 -Author: Ville Syrjälä -Date: Fri Feb 21 15:14:33 2014 +0200 - - kms_flip: Restore rings to running state in unhang_gpu() - - If things go bad, make sure the rings aren't left in the stopped state. - - Signed-off-by: Ville Syrjälä - -commit 30c21ffe7f149c15ae7efdb825bbb6671a7f2e9b -Author: Paulo Zanoni -Date: Thu Feb 20 17:47:53 2014 -0300 - - tests/pm_pc8: try to modprobe msr - - Just in case it's compile with M instead of Y. If the module is not - there, the other assertions will catch the problem. - - Signed-off-by: Paulo Zanoni - -commit 41267dca3cd62a49b7a7434e12b4f1164d95454b -Author: Paulo Zanoni -Date: Thu Feb 20 17:45:53 2014 -0300 - - tests/pm_pc8: try to modprobe i2c-dev - - Just in case the module is compiled with M instead of Y. If the module - is not there, the other assertions will catch the problem. - - Signed-off-by: Paulo Zanoni - -commit 4eb37bf4c130fe1264c7f63e30faff3a76cd093d -Author: Paulo Zanoni -Date: Tue Feb 18 14:27:19 2014 -0300 - - tests/pm_pc8: add gem-idle subtest - - It's triggering WARNs and DRM_ERRORs on current drm-intel-nighly. - - Signed-off-by: Paulo Zanoni - -commit 6f288749f4f8c454f65e7de38c9bcff7a9a29411 -Author: Paulo Zanoni -Date: Mon Feb 17 16:29:36 2014 -0300 - - tests/pm_pc8: remove sleep() call when setting up the environment - - This sleep was added because sometimes we didn't reach PC8+ - residencies, but it was still not enough to prevent the problem every - time, and it is really not needed most of the times. I have - investigated more and it seems that we only have to wait until after - some minutes have past since the machine booted. So just remove the - sleep for now since when you run each subtest in a separate process, - you end up having to sleep at every subtest. - - Signed-off-by: Paulo Zanoni - -commit c9524235dd5eb3cf2d9fcd7d264c78cc2d1f3802 -Author: Paulo Zanoni -Date: Fri Feb 21 10:05:54 2014 -0300 - - tests/gen7_forcewake_mt: use -lpthread - - Otherwise it fails to compile on my machine. - - Signed-off-by: Paulo Zanoni - -commit 3db29744f74017a99d1b430b30623dce405ebb1a -Author: Chris Wilson -Date: Fri Feb 21 09:38:43 2014 +0000 - - kms_flip: Try to make hang_gpu() robust against hanging the GPU - - On a bad day, hanging the GPU may be terminal. Yet even if the GPU is - terminally wedged we expect modesetting (and pageflips) to continue. - That deserves to be a dedicated test, but in the meantime we should - strive to avoid falling over just because the code is not resilient. - - Signed-off-by: Chris Wilson - -commit 005d1dcc9882ab4e8a8b91b5c71da5a36b1491e6 -Author: Chris Wilson -Date: Thu Feb 20 13:41:41 2014 +0000 - - Add i915_pciids.h - - This is a pure copy from the central location at - kernel/include/drm/i915_pciids.h - -commit ff87c4183b31c790e50f174237167716830832e6 -Author: Chris Wilson -Date: Thu Feb 20 13:27:05 2014 +0000 - - tests: Add gen7_forcewake_mt - - This is supposed to be snafu... - - Signed-off-by: Chris Wilson - -commit 06189c60295e806e5073ff3473f038b1bedde212 -Author: Joao Santos -Date: Wed Feb 19 14:19:19 2014 +0000 - - build: Skip kms_plane on Android - - Skipping this test until we have Cairo in the build. - - Signed-off-by: Joao Santos - Signed-off-by: Damien Lespiau - -commit e292e00de0553ef059ddeef572db741ec3b6c23f -Author: Damien Lespiau -Date: Tue Feb 18 14:17:10 2014 +0000 - - kms_pipe_crc_basic: Remove spurious inclusion of glib.h - - Signed-off-by: Damien Lespiau - -commit 1daafe27625d53783b9dcb41bf72aaaade5f735f -Author: Damien Lespiau -Date: Tue Feb 18 14:16:49 2014 +0000 - - kms_plane: Remove spurious inclusion of glib.h - - Signed-off-by: Damien Lespiau - -commit 959783684e2010326d91db2aa55f424f7e041c84 -Author: Daniel Vetter -Date: Thu Feb 13 19:22:53 2014 +0100 - - test/kms_flip: fix up igt logging conversion - - Silly me ... - - Signed-off-by: Daniel Vetter - -commit cef9b31a2415f59899c2d7a9fc895aa7b66d3230 -Author: Daniel Vetter -Date: Thu Feb 13 19:22:35 2014 +0100 - - testdisplay: Allow to specify the dpms level - - aka the jbarnes-me-harder mode - - Signed-off-by: Daniel Vetter - -commit 30cfde5822d1ec9b918576fa49aff9ab41d4fe65 -Author: Daniel Vetter -Date: Thu Feb 13 19:15:38 2014 +0100 - - testdisplay: implement dpms test - - For those who wonder about the -j switch ... all the good ones have - been taken, so this is the Jesse-flag. - - Signed-off-by: Daniel Vetter - -commit b5b0aeb6a552c014fb224a3c3ff913fbab45b5e0 -Author: Daniel Vetter -Date: Thu Feb 13 14:43:20 2014 +0100 - - NEWS: Mention new logging support - -commit d1e318d23df6c4da2a5885f91f97aa565e001bf8 -Author: Daniel Vetter -Date: Thu Feb 13 14:25:55 2014 +0100 - - tests/kms_flip: use igt logging - - Signed-off-by: Daniel Vetter - -commit c88f898c578bd14aee049aceacb0d95a0703aab8 -Author: Daniel Vetter -Date: Thu Feb 13 14:12:03 2014 +0100 - - tests/gem_seqno_wrap: use igt logging - - Cc: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 46ec3ef1f80c1f42f24a13d742887333efc678d2 -Author: Daniel Vetter -Date: Thu Feb 13 14:09:41 2014 +0100 - - test/pm_rps: use igt logging - - Cc: Jeff McGee - Signed-off-by: Daniel Vetter - -commit eebdf7f9204686f5d937d6a3084056fb86c6e7de -Author: Daniel Vetter -Date: Wed Feb 12 15:19:15 2014 +0100 - - lib: (somewhat) structured logging support - - Apparently there's a bit a need for more verbose output in testcases, - mostly for debugging purposes. At least gem_reset_stats and pm_rps - have a verbose mode. - - On top of that we're currently not taking advantage of piglit's "warn" - state all that much. But I think it might be useful for testcases which - are notorious for some kinds of spurious failures, like e.g. the really - nasty timing checks in kms_flip. If we demote some of them to just - warnings we could run the overall tests more often. - - Hence this patchs adds a new igt_log function with the three levels DEBUG, - INFO and WARN. Plus a bunch of convenience helpers to keep the test - code tidy. - - The level can be set through an enviroment vairable IGT_LOG_LEVEL with - info being the default. Also tests can look at the selected log level in - case they want to run costly debug functions only when needed. - - Comments highly welcome, I plan to roll this out over tests which can - use it (not all, imo that's too much churn) once we've settled on the - interfaces/semantics. - - Signed-off-by: Daniel Vetter - -commit 60a24a22ba4c7df46ebae0e99f0aa09604a6fb25 -Author: Zhao Yakui -Date: Tue Jan 28 09:53:50 2014 +0800 - - Assembler/bdw: Remove the unsupported cache agent for WRITE(...) - - The Sampler/Constant cache is read-only. And it can't be used as - the target cache agent of WRITE message. - - Reviewed-by: Xiang, Haihao - Signed-off-by: Zhao Yakui - Signed-off-by: Damien Lespiau - -commit a2bf80fd8462b0014f2e230421173677bbb8b742 -Author: Thomas Wood -Date: Wed Feb 12 15:54:27 2014 +0000 - - tests: fix sub-test enumeration - - Ensure sub-tests can be listed correctly by doing any test setup within - an igt_fixture block. - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit ec3b1332f87e956e7de8e03e2cdbb962df05e214 -Author: Daniel Vetter -Date: Wed Feb 12 00:12:07 2014 +0100 - - NEWS: Mention Damien's new helper library - -commit a036959f3ed1f0a9c3e80b9feea69713289aa4ef -Author: Daniel Vetter -Date: Tue Feb 11 23:54:19 2014 +0100 - - lib: Make igt_skip noreturn - - This is a remnant from the subtest code before we had proper - fixture blocks. With those there's no no reason to have igt_skip - calls outside of fixtures or subtests, so we can assert this and - hence always jump out. - - Suggested by Thomas Wood since static analyzers got confused about - this. - - To check for fallout I've run all tests as non-root so that they'll - all skip. Only very little fallout resulted. - - Cc: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 0d1084fe3f88e2b51c50ff963a2ae81a6129474d -Author: Daniel Vetter -Date: Wed Feb 12 00:07:11 2014 +0100 - - lib: install exit handler only on success for prefault control - - Otherwise we'll hit an igt_skip in the exit handler, which upsets - the new in_fixture||in_subtests checks. - - Signed-off-by: Daniel Vetter - -commit 58633cfde46cb6010b3bdeeca58a52ec536ff66c -Author: Daniel Vetter -Date: Wed Feb 12 00:05:57 2014 +0100 - - test/gem_gtt_hog: bail out earlier - - This way we properly skip instead of failing hard. Just result - polish when running on non-intel systems. - - Signed-off-by: Daniel Vetter - -commit 36be04bdfb1d34f11b6bd50db7c50d213c4498b7 -Author: Daniel Vetter -Date: Tue Feb 11 23:52:43 2014 +0100 - - tests/gem_madvise: use correct main block - - igt_simple_main doesn't enumerate subtests ... - - Cc: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 3514872efeaa2fc0b656ed6949b9e6b7bf67633f -Author: Daniel Vetter -Date: Tue Feb 11 23:50:10 2014 +0100 - - tests/gem_bad_ctx_exec: Properly wrap in igt_fixtures - - Caught by the new nasty assert in igt_skip. - - Signed-off-by: Daniel Vetter - -commit a86651fa2476087dd04d03cf86247761595c0aef -Author: Daniel Vetter -Date: Tue Feb 11 23:47:50 2014 +0100 - - tests/gem_close_race: Properly wrap init code in fixtures - - Blows up otherwise if there's no intel gpu around. - - Signed-off-by: Daniel Vetter - -commit 349ba5d3e1cbc0d130305547627c5de5a35ae1a2 -Author: Daniel Vetter -Date: Tue Feb 11 23:36:24 2014 +0100 - - lib: fix header include - - drm/ path is for the headers from kernel sources, without when using - the pkgconfig libdrm version. - - Cc: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit b4e85b7b53f2ebf3a8d5edab5ca98d6f8715a680 -Author: Damien Lespiau -Date: Tue Feb 11 17:53:00 2014 +0000 - - lib/display: Fix typo in igt_plane_get_fd_id() (fb) - - Signed-off-by: Damien Lespiau - -commit 82108d96566dfa1210b1fbe2f6deaf6d77d1e34e -Author: Damien Lespiau -Date: Tue Feb 11 17:48:32 2014 +0000 - - kms_pipe_crc_basic: Remove igt_display_get_n_pipes() usage in main - - The fixture won't be run when listing the subtests and thus we can't use - igt_display_get_n_pipes() in the list of tests. The alternative here is - to list the subtests with the maximum values and skip when not supported - on the platform. - - Signed-off-by: Damien Lespiau - -commit 2043e6b265929ad2444cede7412f73a9cbe112a5 -Author: Damien Lespiau -Date: Tue Feb 11 17:45:48 2014 +0000 - - lib: Fix igt_ouput_get_plane() typo (output) - - Signed-off-by: Damien Lespiau - -commit 3386b4b2866b991b49e7386d51a3f4b9d9b681c0 -Author: Damien Lespiau -Date: Tue Feb 11 13:54:10 2014 +0000 - - lib: Don't wait in igt_wait_for_keypress() if stdin is not a tty - - When running in a non interactive terminal, there's little point in - trying to wait for some input on stdin. - - Signed-off-by: Damien Lespiau - -commit 0d5de66fc6b85a0555ecc9d853e48c464122bb26 -Author: Damien Lespiau -Date: Thu Feb 6 21:20:35 2014 +0000 - - kms_plane: Start a basic display plane test - - We test the sprite plane positionning in there, for now. - - Signed-off-by: Damien Lespiau - -commit 3027de0a6653c6168fbc12f895a13c7d2a9ee0e2 -Author: Damien Lespiau -Date: Fri Feb 7 14:12:44 2014 +0000 - - lib/display: Fix assertion in set_plane() - - When cycling throuth planes, we still want to reach the cursor plane. We - have to special case IGT_PLANE_CURSOR as a shorthand to select the - cursor plane (the last plane on the pipe). - - Signed-off-by: Damien Lespiau - -commit fb146aa7825b8f3a1c490f30b4c3912b7fe8eb6d -Author: Damien Lespiau -Date: Thu Feb 6 21:18:28 2014 +0000 - - lib/display: Wait for a vblank after SetPlane() - - Let's be testing friendly and gently wait for the next vblank before - returning from commit() when needed. - - After igt_display_commit() one can safely look at the CRC. - - Signed-off-by: Damien Lespiau - -commit da0f1cf57083c17d047d64bda53d63bd728fed7c -Author: Damien Lespiau -Date: Thu Feb 6 21:06:59 2014 +0000 - - lib/display: Print the fb id, not its pointer in the set_fb() log message - - Signed-off-by: Damien Lespiau - -commit da896537b8919e3e4dbd2067a38ec49f28603e8a -Author: Damien Lespiau -Date: Thu Feb 6 21:06:25 2014 +0000 - - lib/display: Add a way to wait at every commit for inspection - - Signed-off-by: Damien Lespiau - -commit 377f48afe668fc118d6dd902641a1c41c4430b44 -Author: Damien Lespiau -Date: Thu Feb 6 21:06:07 2014 +0000 - - lib: Add a helper to wait for a keypress - - Signed-off-by: Damien Lespiau - -commit c7e3413a081aa7fb2b9f4de5b99c64802b649392 -Author: Damien Lespiau -Date: Thu Feb 6 19:10:51 2014 +0000 - - kms_pipe_crc_basic: Use kmstest_create_color_fb() - - Reducing again the per-test number of lines. - - Signed-off-by: Damien Lespiau - -commit 1d2c9d5e573409edd846c445619c0d41474a0ff0 -Author: Damien Lespiau -Date: Thu Feb 6 19:09:53 2014 +0000 - - lib: Include drm_fourcc.h from igt_kms.h - - This include is needed for the DRM_FORMAT* defines used in the fb - creation helpers. - - Signed-off-by: Damien Lespiau - -commit 063194074e5ce0ad9ceb0f3318e714aaad05ec21 -Author: Damien Lespiau -Date: Thu Feb 6 19:04:58 2014 +0000 - - kms_cursor_crc: Use kmstest_create_color_fb() - - Signed-off-by: Damien Lespiau - -commit a1df2f4363d1ed770db36fb8aba14e65087f11c3 -Author: Damien Lespiau -Date: Thu Feb 6 19:04:12 2014 +0000 - - lib: Introduce a new helper kmstest_create_color_fb() - - We need to create fbs of a single color in a few places. Time to - abstract that out to a helper function. - - Signed-off-by: Damien Lespiau - -commit f0e0b2ae658c44461d00adddea6cc5bba711966d -Author: Damien Lespiau -Date: Thu Feb 6 17:54:33 2014 +0000 - - lib/display: Add support for DRM planes - - We can now extend our plane support beyond primary and cursor planes. - - Signed-off-by: Damien Lespiau - -commit 1c608a2af81f94e601b5961987a6b86eb0e3a824 -Author: Damien Lespiau -Date: Thu Feb 6 16:26:31 2014 +0000 - - tests/kms_cursor_crc: Use igt_pipe_crc_collect_crc() - - Signed-off-by: Damien Lespiau - -commit 6954103192bba9241a4b115a85cb43de779d375f -Author: Damien Lespiau -Date: Thu Feb 6 16:17:38 2014 +0000 - - lib/crc: Add a helper to read a single CRC value - - In this case, we also take care of starting/stopping the CRC collection. - - Signed-off-by: Damien Lespiau - -commit 7d0e2f618c05c784655c9b2a592e7f4de8df88cb -Author: Damien Lespiau -Date: Thu Feb 6 16:17:14 2014 +0000 - - lib/crc: Factor out reading a single CRC value - - Signed-off-by: Damien Lespiau - -commit 162914b9ed0af1436e260133a90b91f32e78b4fe -Author: Damien Lespiau -Date: Thu Feb 6 16:05:19 2014 +0000 - - lib/display: Check if we're trying to use the same pipe on 2 outputs - - Signed-off-by: Damien Lespiau - -commit 65fef0a43410b40f43dc5e0b8937199bebdccf79 -Author: Damien Lespiau -Date: Wed Feb 5 17:51:50 2014 +0000 - - lib/display: Allow to override the display verbosity with an env variale - - Signed-off-by: Damien Lespiau - -commit d435829ae9702c9f777b68227e43eafd702a8031 -Author: Damien Lespiau -Date: Wed Feb 5 17:14:12 2014 +0000 - - kms_cursor_crc: Port the test to the new modeset API - - Signed-off-by: Damien Lespiau - -commit 09faa45f521c98dda0ebc07a417fb34a048a697b -Author: Damien Lespiau -Date: Thu Feb 6 15:45:42 2014 +0000 - - lib/display: Add a way to specify we don't care about the pipe to use - - Signed-off-by: Damien Lespiau - -commit 5ec399b4a6b11dc6c2b1a1bd25b745d4dd9279a6 -Author: Damien Lespiau -Date: Wed Feb 5 16:36:51 2014 +0000 - - lib/display: Add support for the cursor plane - - Signed-off-by: Damien Lespiau - -commit c4823ce9a4d51eeb422be822e8a6d971a7141c24 -Author: Damien Lespiau -Date: Wed Feb 5 15:54:13 2014 +0000 - - lib/display: Fix the SetCrtc disabling log message - - We were displaying the value of fb_id (0), when the actual interesting - thing about this call it that it'll just down the pipe. - - Signed-off-by: Damien Lespiau - -commit 969435a4078be5c1926c6ecbcfcbedfd6a9d8a64 -Author: Damien Lespiau -Date: Wed Feb 5 15:32:15 2014 +0000 - - tests/kms_cursor_crc: Move the array of cursor fb_ids to the stack - - This array is not used outside ouf create_cursor_fb(). A stack allocated - array is enough. - - Signed-off-by: Damien Lespiau - -commit d39f5a059b688878f07586f7a9292299316424c2 -Author: Damien Lespiau -Date: Tue Feb 4 15:11:29 2014 +0000 - - kms_pipe_crc_basic: Use igt_display_get_n_pipes() instead of hardcoding 3 - - Signed-off-by: Damien Lespiau - -commit 72e9a6c8d596d062bd66503c8c2625e1e9e83ba6 -Author: Damien Lespiau -Date: Tue Feb 4 14:59:39 2014 +0000 - - lib/display: Add an accessor to retrieve the number of pipes - - Signed-off-by: Damien Lespiau - -commit a260599b6f557b66346fcbcc81c54f0dc7382f9c -Author: Damien Lespiau -Date: Tue Feb 4 12:07:56 2014 +0000 - - kms_pipe_crc_basic: Use for_each_connected_output() - - Signed-off-by: Damien Lespiau - -commit 992bd5d62a666657aae3e231e9cb7638c405595c -Author: Damien Lespiau -Date: Tue Feb 4 12:06:57 2014 +0000 - - lib: Introduce a for_each_connected_output() macro - - So we can easily cycle through them in tests without knowing too many - internal details about how igt_display_t organize its data. - - Signed-off-by: Damien Lespiau - -commit 09e84cee8b97e8b431e537fbbacde1313d5896ac -Author: Damien Lespiau -Date: Sun Feb 2 17:48:24 2014 +0000 - - lib: Introduce symbolic names for display planes - - It'd be nice to have symbolic names for planes instead of using an index - in igt_output_get_plane(). - - We also namespace the enum to not conflict with anyone. - - Signed-off-by: Damien Lespiau - -commit 417987353ec2bf637839990553967474ccf1528e -Author: Damien Lespiau -Date: Mon Jan 27 16:32:09 2014 +0000 - - kms_pipe_crc_basic: Port to the new modeset API - - Signed-off-by: Damien Lespiau - -commit 3670d6dbff7b829d71ce84d6c9cb88cd5abdbc53 -Author: Damien Lespiau -Date: Mon Jan 27 16:25:43 2014 +0000 - - lib: Introduce a modeset API - - The goals here are: - - Reduce duplicated code in each KMS test - - Provide an API that looks more like what we want for atomic - modesets. The hope is then that it'll be easy to switch, at - run-time, between the "legacy" path and atomic modesets, keeping - the same API for tests. - - Signed-off-by: Damien Lespiau - -commit 01757d052c3427ee28b1a065652721877568a15f -Author: Thomas Wood -Date: Fri Feb 7 17:03:39 2014 +0000 - - tests/gem_seqno_wrap: fix over allocation of arrays - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit e6737b8a4ef42109f82c13127d8e2e5da92eb79f -Author: Thomas Wood -Date: Fri Feb 7 17:03:38 2014 +0000 - - assembler: fix condition for printing a warning - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 49aa4b0df52254d47b354e98ec18236ff82b06e9 -Author: Thomas Wood -Date: Fri Feb 7 17:03:37 2014 +0000 - - debugger: fix the -p option - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 333a5c6f07cba9e6d7a5506521bae5ec89b867c1 -Author: Daniel Vetter -Date: Tue Feb 11 12:14:09 2014 +0100 - - lib/drmtest: Fix up skip_henceforth checks - - We need to first check whether we'll even run the testcase before - deciding to print a premature SKIP/FAIL. Without this and global - skipped resulted in superflous output when running only one testcase. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=74100 - Signed-off-by: Daniel Vetter - -commit a6bc3d91af816f4d979cb6424c6e991362c2a8f8 -Author: Daniel Vetter -Date: Tue Feb 11 12:04:57 2014 +0100 - - tests/gem_reset_stats: Correctly wrap global test code - - Tests _must_ be able to run as non-root and on non-intel platforms, - otherwise the enumeration is busted (since QA enumerates testcases on - a gpu-less xeon box). - - Cc: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 971c7db2c81d0573caf1d35d70f48e6fdace90d0 -Author: Daniel Vetter -Date: Fri Feb 7 10:02:41 2014 +0100 - - tests/pm_rps: remove setfreq - - It's unused. - - Cc: Jeff McGee - Signed-off-by: Daniel Vetter - -commit ffc481b8acc22ee8bbbf142db5b74d99c6bde926 -Author: Daniel Vetter -Date: Fri Feb 7 09:59:42 2014 +0100 - - tests/pm_rps: Round requested freq correctly - - The kernel will round it, so if we don't we'll have a spurious - mismatch. Happens on my machine here with 650-1300MHz range, where the - midpoint is 975. - - Cc: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 0269d1da4999ecb39ea65120a052259b19372748 -Author: Thomas Wood -Date: Thu Feb 6 16:31:54 2014 +0000 - - lib: fix signed/unsigned comparison issues - - Store the result of set_vt_mode as a signed value so that errors can be - caught correctly. - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit c3e9198dd0424feb74cdf6570c769f818f2ca16c -Author: Thomas Wood -Date: Thu Feb 6 16:23:42 2014 +0000 - - assembler: define YY_NO_INPUT to prevent unused symbol warnings - - Signed-off-by: Thomas Wood - Signed-off-by: Daniel Vetter - -commit 32b624c71d6e444056ba87172cc0004e355170d1 -Author: Daniel Vetter -Date: Thu Feb 6 07:49:33 2014 +0100 - - tests/pm_rps: Fix compilation on Linux - - Signed-off-by: Daniel Vetter - -commit 2b8d953aa22477d88ad6d58f3ad04d3bf90a6a84 -Author: Jeff McGee -Date: Fri Jan 31 10:13:53 2014 -0600 - - pm_rps: New subtest for gpu reset - - Test that RPS functions as expected after a gpu reset. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 663d758d919610b09a8bddbadd8a0b668eab6be8 -Author: Jeff McGee -Date: Fri Jan 31 10:13:52 2014 -0600 - - pm_rps: Add variable load support to load helper - - The load helper can be set to HIGH or LOW. HIGH is the original mode - of sending continuous dword store commands. LOW adds a pause between - each command to reduce throughput. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 22dfb0988aa5f055fb96873d037825bb0317a0e0 -Author: Jeff McGee -Date: Fri Jan 31 10:13:51 2014 -0600 - - pm_rps: Load helper should stall for last write - - This ensures that gpu is quiescent when load helper exits. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 2d16e0aad7a31a0964ae35fa07c70f4c2fb513b0 -Author: Jeff McGee -Date: Fri Jan 31 10:13:50 2014 -0600 - - pm_rps: Add stop rings injection utility - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 2cbb0fbf5f3dc839a11d23a970948cb91718594e -Author: Jeff McGee -Date: Tue Jan 28 18:25:06 2014 -0600 - - pm_rps: New subtest min-max-config-loaded - - Like subtest basic-api, but additionally requires that current - frequency is increasing to the configured maximum within reasonable - time since we are loaded. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit ceb14b190594b767667d34c284e4afdb1932f973 -Author: Jeff McGee -Date: Tue Jan 28 18:25:05 2014 -0600 - - pm_rps: Add load helper for loading gpu - - The load helper submits repeated dword store commands to keep the - gpu loaded while subtests running in the parent process check for - expected rps response. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit fd3fcbd3b3f12f878737d331d361de7eda0f579a -Author: Jeff McGee -Date: Tue Jan 28 18:25:04 2014 -0600 - - lib/drmtest: Add igt_wait_helper - - igt_wait_helper compliments igt_stop_helper and is used when helper - processes are expected to exit naturally. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 3bada1626cd35800533361296f4340f64b91321c -Author: Jeff McGee -Date: Tue Jan 28 18:25:03 2014 -0600 - - pm_rps: New subtest min-max-config-idle - - Like subtest basic-api, but additionally requires that current - frequency is settling to the configured minimum within reasonable - time since we are idle. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 2423b6c04e54792adc42b7d477861d9ffb87fdc3 -Author: Imre Deak -Date: Wed Feb 5 13:48:26 2014 +0200 - - lib/drmtest: fix hang in quiescent_gpu_at_exit due to signal-unsafe asprintf - - I got kms_flip in hung state with the backtrace below, while the parent process - waiting for the signal helper to exit. It was quite easy to reproduce the bug - by running - - kms_flip --run-subtest=flip-vs-dpms-off-vs-modeset - - With the change I couldn't reproduce it. - - TODO: audit/fix other signal handlers with signal-unsafe functions - - 0  0x00007f9a1362018b in ?? () from /lib/x86_64-linux-gnu/libc.so.6 - 1  0x00007f9a1359df81 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 - 2  0x00007f9a1359b6cf in ?? () from /lib/x86_64-linux-gnu/libc.so.6 - 3  0x00007f9a13628eb6 in __vasprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6 - 4  0x00007f9a13628e72 in __asprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6 - 5  0x000000000040a4a2 in asprintf (__fmt=0x417441 "/dev/dri/card%u", __ptr=0x7fff1a972c08) -     at /usr/include/x86_64-linux-gnu/bits/stdio2.h:178 - 6  drm_get_card () at drmtest.c:190 - 7  0x000000000040a54a in __drm_open_any () at drmtest.c:229 - 8  0x000000000040a846 in quiescent_gpu_at_exit (sig=) at drmtest.c:281 - 9  0x0000000000408759 in call_exit_handlers (sig=3) at drmtest.c:1519 - 10 fatal_sig_handler (sig=3) at drmtest.c:1543 - 11 - 12 0x00007f9a13596770 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 - 13 0x00007f9a135d8f3f in fork () from /lib/x86_64-linux-gnu/libc.so.6 - 14 0x000000000040b3af in __igt_fork_helper (proc=0x61d8cc ) at drmtest.c:1199 - 15 0x000000000040b4ce in igt_fork_signal_helper () at drmtest.c:751 - 16 0x0000000000404167 in main (argc=, argv=) at kms_flip.c:1533 - - v2: - - can't use snprintf as that's also signal-unsafe, so just use a dup'ed fd (Chris,Daniel) - - Signed-off-by: Imre Deak - -commit 5c9c8841eb66676dd65e84d51fa87a4b4b8ad764 -Author: Chris Wilson -Date: Tue Feb 4 14:14:31 2014 +0000 - - tests: Add gem_madvise - - Exercise that calling madvise produces expected results - - Signed-off-by: Chris Wilson - Signed-off-by: Daniel Vetter - -commit 98952a1f6e7e5439e4b77482bd08422212c32e47 -Author: Daniel Vetter -Date: Tue Feb 4 13:10:37 2014 +0100 - - fix make distcheck - - Bunch of explicit include paths needed adjustments and - eviction_common.c needs to be added to the dist files. - - This has been broken in the following three commits: - - commit 42bcd05eb3f1545fbf9c397c3f37c3f6a27c5da4 - Author: Tvrtko Ursulin - Date: Mon Feb 3 10:59:41 2014 +0000 - - tests/eviction_common: Avoid submitting duplicate objects - - commit b92b397d5e4ffe10ed92fb2fc6711758ef5bcf89 - Author: Tvrtko Ursulin - Date: Tue Dec 3 15:09:57 2013 +0000 - - build: Make sure asserts are enabled for tests - - commit 8c33e9ad111d27b84db4daac43809a807f262632 - Author: Ben Widawsky - Date: Fri Dec 6 20:35:29 2013 -0800 - - intel-gpu-tools: Version informatio - - Cc: Tvrtko Ursulin - Cc: Ben Widawsky - Signed-off-by: Daniel Vetter - -commit 42bcd05eb3f1545fbf9c397c3f37c3f6a27c5da4 -Author: Tvrtko Ursulin -Date: Mon Feb 3 10:59:41 2014 +0000 - - tests/eviction_common: Avoid submitting duplicate objects - - Make sure selection loop does not generate duplicates - when it picks a subset of objects for a single exec buffer. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit e1dea7e2e190307056a05a2945e59b59fe5b6fc0 -Author: Tvrtko Ursulin -Date: Mon Feb 3 10:59:40 2014 +0000 - - tests/gem_evict_everything: Factor out eviction logic - - In preparation for userptr test we move the eviction logic - into a common file so it can be used from both test cases. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit d8ea09f24d9e0c75593bc6e89c742998c23087fc -Author: Damien Lespiau -Date: Wed Jan 29 15:53:33 2014 +0000 - - gem_ring_sync_copy: Add a ring to ring synchronization test - - The goal of this test is to ensure that we respect inter ring - dependencies. A more detailed description of what it tests is in a - comment. - - The tests relies on having a blit function for the ring, so is currently - only checking synchronization between the render and blitter ring. - - v2: Actually create an inter-ring dependency by making the first copy on - ring2 and the second on ring2, not both on ring2. - - Signed-off-by: Damien Lespiau - -commit 09bcb0ab4b79273cfccdfa87f860b0be1addcc7b -Author: Rafael Barbalho -Date: Fri Jan 31 14:57:40 2014 +0000 - - android: Change tests & tools directory to use the lib directory - - Instead of recompiling the lib directory for every tool or tests we can just - re-use the static library. This also has the nice side effect of fixing the - android "mm" command to allow android users to only rebuild the local changes - in either the test or tools directory. - - Signed-off-by: Rafael Barbalho - Signed-off-by: Damien Lespiau - -commit bdb08f981c5ebed0ff1f0067f1aa085636b9ac7b -Author: Rafael Barbalho -Date: Fri Jan 31 14:57:39 2014 +0000 - - android: Add the generation of vesion.h & config.h to lib - - The lib directory is used by all the tests & tools so it should really be - the place where the generate files are created. - - Signed-off-by: Rafael Barbalho - Signed-off-by: Damien Lespiau - -commit 005c333e5c3ba9285e5d918877e9dd992fd2a4b9 -Author: Rafael Barbalho -Date: Fri Jan 31 14:57:38 2014 +0000 - - android: Add makefile for the lib directory - - The lib directory should really be compiled as a static library on its own - and be re-used by any tests or tools that require it. - - Signed-off-by: Rafael Barbalho - Signed-off-by: Damien Lespiau - -commit 4c79264b3cda6ef548f4125ebf49d470ab968ede -Author: Rafael Barbalho -Date: Fri Jan 31 14:57:37 2014 +0000 - - android: Clean-up common makefile directives - - All the Android.mk files had the same directives to find the path of - libdrm & libpciaccess. These are no longer required as the android system - now allows the libraries being used to export include paths to dependant - modules & programs. - - Signed-off-by: Rafael Barbalho - Signed-off-by: Damien Lespiau - -commit 79ea9a9071fcd39493f68ae4d7ba9941701195c9 -Author: Rafael Barbalho -Date: Fri Jan 31 14:57:36 2014 +0000 - - android: Handle the case when android doesn't have mmap64 - - Not all versions of Android have the mmap64 call, thus a suitable alternative - must be called. - - Signed-off-by: Rafael Barbalho - Signed-off-by: Damien Lespiau - -commit e72f3bcc7700fbf1f381248b0c7fedb2777b8ff1 -Author: Ben Widawsky -Date: Fri Jan 31 05:33:56 2014 +0000 - - quick_dump/broadwell: Add gen7 ring mode registers - - Signed-off-by: Ben Widawsky - -commit 56d347fad864d13b9d39512a308bb54d5f36f828 -Author: Ben Widawsky -Date: Fri Jan 31 05:31:07 2014 +0000 - - quick_dump/haswell: Add gen7 stuff + VECS_MODE - - Signed-off-by: Ben Widawsky - -commit 556c200e99da687f828f2d5e61a49f7fc21b2cb7 -Author: Ben Widawsky -Date: Fri Jan 31 05:29:27 2014 +0000 - - quick_dump/gen7: Add other GFX_MODE registers - - Signed-off-by: Ben Widawsky - -commit b5a1ab3d6e2002607f6c6387b0bf8a79cffc8224 -Author: Ben Widawsky -Date: Fri Jan 31 04:46:06 2014 +0000 - - quick_dump: Add a file argument - - -f, or --file will simply dump the file in the specified format. All - other options will be skipped. This is helpful when one wants to create - their own list for temporary debug, or if one requires a subset of - registers to work around things like fused off PCH. - - Signed-off-by: Ben Widawsky - -commit 8ce7c366d7d2903aa66161d836bd1295a8d3a806 -Author: Ben Widawsky -Date: Fri Jan 31 04:42:50 2014 +0000 - - quick_dump: Refactor to allow future code - - Extract everything possible, and create a main function which is pretty - darn simple. The goal is to make the various paths the program can take - based on command line options (one more is coming) more decipherable. - - Signed-off-by: Ben Widawsky - -commit 48ad03ca0c5f078b8d12a64323fd93b3858041af -Author: Chris Wilson -Date: Fri Jan 31 16:56:01 2014 +0000 - - lib: Capture errno on entry - - When printing the errno, it is important that we capture the user errno - before we make any library calls - as they may alter the value. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=74007 - Signed-off-by: Chris Wilson - -commit be22e10885eba556428919c2bbc71b4b644cb1a4 -Author: Chris Wilson -Date: Wed Jan 29 22:59:57 2014 +0000 - - igt/gem_close_race: Fix blit commands for BDW - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73958 - Signed-off-by: Chris Wilson - -commit 5e21b434da95c8b66a97a79649a61eb40a161a70 -Author: Jesse Barnes -Date: Tue Jan 28 14:17:30 2014 -0800 - - iosf: make iosf_rw take a larger addr - - For higher DPIO ranges for example. Also fix it up to use - intel_register_read/write. - - Signed-off-by: Jesse Barnes - -commit e558dd998de723f7f110e51dbd0ce495748d5925 -Author: Jesse Barnes -Date: Tue Jan 28 13:58:55 2014 -0800 - - dpio: make dpio reg read/write output like normal reg read/write output - - Just for consistency. - - Signed-off-by: Jesse Barnes - -commit 670a717b5bf4c21dde338b87e5b660632ff6f6b0 -Author: Jesse Barnes -Date: Tue Jan 28 13:58:23 2014 -0800 - - mmio: drop unused i915_loaded fn - - Signed-off-by: Jesse Barnes - -commit 81095305f4df5289f4d494345da0c87949b55f54 -Author: Jesse Barnes -Date: Tue Jan 28 13:46:38 2014 -0800 - - mmio: use intel_iosf.c for DPIO reads and writes - - This makes it a bit more like the kernel, so we can go poke at DPIO and - other IOSF regs a bit more easily. - - Signed-off-by: Jesse Barnes - -commit d1b5823ee7645c767616ee4e5f23f6692a280dde -Author: Daniel Vetter -Date: Mon Jan 27 23:38:02 2014 +0100 - - tests/pm_rps: rename basic test to "basic-api" - - Jeff plans to add more tests ... - - Signed-off-by: Daniel Vetter - -commit 5d26a7e2a246265754d51320c35364a3b94cf4e6 -Author: Jeff McGee -Date: Tue Jan 21 17:14:33 2014 -0600 - - pm_rps: Make frequency logging more compact - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 88864d2ba584cc11f33dafc5c91f1a8e3175d963 -Author: Jeff McGee -Date: Tue Jan 21 17:14:32 2014 -0600 - - pm_rps: Remove repeat sysfs reads - - Storing values avoids some unnecessary overhead but more importantly - allows all of our processing to be atomic. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 4e3b661b480b0a43d9cf45afaf0cae835cb66dcc -Author: Jeff McGee -Date: Tue Jan 21 17:14:31 2014 -0600 - - pm_rps: Expand on min and max config testing - - Add a function that methodically varies min and max to exercise - several valid and invalid combinations. Allow the caller to - define what is to be checked between each step. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 22533b1eb038dbf4d3dc79945b81cefc4aac64be -Author: Jesse Barnes -Date: Mon Jan 27 10:43:02 2014 -0800 - - NEWS: update with nomodeset register access change - -commit 0d20fa3cc218c48421a9625fc1241008db4496d0 -Author: Jesse Barnes -Date: Mon Jan 27 10:26:57 2014 -0800 - - quick_dump: more vlv dpio regs - -commit 5ecac45ff08945f99365ff6d29ba21f896cdb1b6 -Author: Jesse Barnes -Date: Mon Jan 27 10:26:05 2014 -0800 - - mmio: allow register init even if debugfs isn't available and i915 isn't loaded - - This lets us dump regs even if modeset=0 for example. - - Signed-off-by: Jesse Barnes - -commit 0b4c33f62c2d4a61b0b5e9184524c8ca273400b1 -Author: Chris Wilson -Date: Sun Jan 26 14:36:32 2014 +0000 - - igt/gem_concurrent_blit: Scale resource usage to RAM correctly - - Note that we use twice the number of buffers, and so we need to restrict - num_buffers appropriately to fit within RAM. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255 - Signed-off-by: Chris Wilson - -commit b5109e62cea170f3550588119d41a9bcf79789e5 -Author: Chris Wilson -Date: Thu Jan 23 21:50:36 2014 +0000 - - intel_error_decode: Protect against missing ring registers - - A dodgy kernel may miss printing out the ring registers leading to a - FPE. - - Signed-off-by: Chris Wilson - -commit 4a9b70c3262a30e70207583cc23da67bba538437 -Author: Tvrtko Ursulin -Date: Wed Jan 22 10:41:05 2014 +0000 - - tools: Allow building on Android after noinst_PROGRAMS is not defined any more - - Looks like filter-out macro gets silently unhappy about an undefined variable. - - Reviewed-by: Damien Lespiau - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Damien Lespiau - -commit c05c88c2b641aaab83608fb2c8e816893690c1fe -Author: Mika Kuoppala -Date: Tue Jan 21 17:40:08 2014 +0200 - - tests/gem_reset_stats: stop only one ring when submitting hang - - If we stop all the rings, we can end up blaming the innocent - rings on hangcheck. - - Reference: https://bugs.freedesktop.org/show_bug.cgi?id=73652 - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 1bbb607d9f3ee8e725a784f740937577f153a520 -Author: Ben Widawsky -Date: Tue Jan 21 18:03:42 2014 -0800 - - gem_storedw_batches_loop: Fix for pre-BDW - - My git failures are truly remarkable. I ended up pushing the wrong - commit here: - commit 1552aa21124cabe762862bb414490510415a2b2d - Author: Ben Widawsky - Date: Mon Jan 13 06:28:45 2014 -0800 - - gem_storedw_batches_loop: Fix for BDW - - This puts the offset of the reloc in the wrong place for pre-BDW - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73866 - Signed-off-by: Ben Widawsky - -commit 03d144d16ffef63cedca81ccb4708b173b16868f -Author: Chris Wilson -Date: Mon Jan 20 15:57:16 2014 +0000 - - kms_flip: Try to consume all fences after a flip - - As a flip is outstanding, there is an issue that the kernel may not be - able to release one of the fences that userspace requires and erroneous - report EDEADLK (on gen2, gen3). - - Signed-off-by: Chris Wilson - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696 - -commit ac0224f184212e8c4baa6de6fbe379c7c22f2008 -Author: Ben Widawsky -Date: Mon Jan 20 10:40:23 2014 -0800 - - quick_dump/watermarks: lp3, misc and debug - - I forgot to git add this originally. - - Signed-off-by: Ben Widawsky - -commit 3deaeb282656e6e9da4327b79db385479fefdb0b -Author: Ben Widawsky -Date: Fri Jan 17 20:32:01 2014 -0800 - - quick_dump/broadwell: Use haswell_other - - For now, the power controls and watermarks seem to be the same offsets. - So just reuse haswell_other.txt - - Signed-off-by: Ben Widawsky - -commit 58aa7346c370700658fbbe13659e823afe98b6e4 -Author: Ben Widawsky -Date: Fri Jan 17 20:26:54 2014 -0800 - - quick_dump/hsw: Watermark debug - - Signed-off-by: Ben Widawsky - -commit 73ca22c9e880b0598935c871d809ecfb1f3473fc -Author: Ben Widawsky -Date: Fri Jan 17 20:10:46 2014 -0800 - - quick_dump: Allow comments in the register files - - Simple addition to the parser to add the following full line comments: - {';', '#', "//"} - - Empty lines will also be ignored - - Signed-off-by: Ben Widawsky - -commit 724340cf36b4e2a87d8c545410224b617f813cc8 -Author: Ben Widawsky -Date: Fri Jan 17 19:35:22 2014 -0800 - - quick_dump: Fix the indentation - - Fix the spaces to use [the python standard] 4 soft spaces for tabe. - While here, add the proper vim tag so we don't do it again. - - Signed-off-by: Ben Widawsky - -commit a5d17d2b0e14cafaa2573d9e538af2a98d2338cc -Author: Ben Widawsky -Date: Fri Jan 17 20:16:55 2014 -0800 - - .gitignore: Add pycache - - quick_dump which is python, generates files in __pycache__ which are the - moral equivalent of object files. Don't let people add them to the index - accidentally. - - Signed-off-by: Ben Widawsky - -commit 5b9147513029ca1e1eaf2c028e6f868adc3359f6 -Author: Daniel Vetter -Date: Sun Jan 19 22:15:13 2014 +0100 - - tests/gem_fd_exhaustion: Make it work - - - We need to drop root to actually hit the limits. This requires us to - fork the actual test since otherwise the exit handlers (which - require root) fail the entire test. - - Don't assert that the gem create ioctl succeeds, it won't on the - final run of the loop. - - Signed-off-by: Daniel Vetter - -commit 7d2ba073adef9c4c6f7a679befa2a5d19cbf4735 -Author: Daniel Vetter -Date: Sun Jan 19 22:13:36 2014 +0100 - - lib: add __gem_create - - Useful for when a gem_create ioctl is expected to fail. - - Signed-off-by: Daniel Vetter - -commit 71f1f9eafd68c82382d165028ae73035742bb730 -Author: Daniel Vetter -Date: Sun Jan 19 22:12:25 2014 +0100 - - tests/pm_rps: Add missing static - - Signed-off-by: Daniel Vetter - -commit ae57cd7dc7db8a9a72d8ee764f72cd8fd9e75a76 -Author: Daniel Vetter -Date: Sun Jan 19 22:11:47 2014 +0100 - - debugger: avoid global variable shadowing - - Signed-off-by: Daniel Vetter - -commit 862de5636f545a071f29f60ae0a4ab1370f5cf8b -Author: Daniel Vetter -Date: Sun Jan 19 22:06:48 2014 +0100 - - lib: extract igt_drop_root - - Useful in other tests. - - Signed-off-by: Daniel Vetter - -commit 70082e3677711bc01330ba3483fbdce5779f915d -Author: Daniel Vetter -Date: Sun Jan 19 18:01:24 2014 +0100 - - tests: Add gem_fd_exhaustion - - Exhausts the system limit on open files and then tries to create - a new shmem-backed gem object. Linus Torvalds reported that this - blows up on a null obj->base.filp, but I can't reproduce this here: - - http://lists.freedesktop.org/archives/intel-gfx/2014-January/038433.html - - Signed-off-by: Daniel Vetter - -commit 36106004e0e590557041e491fe690f01c89bc115 -Author: Daniel Vetter -Date: Sun Jan 19 14:48:07 2014 +0100 - - tests: Move pm_rps to the right Makefile target - - If it's not in the multi-test target group testrunners won't pick up - on the fact that they need to enumerate subtests first. - - Cc: jeff.mcgee@intel.com - Signed-off-by: Daniel Vetter - -commit 7f1c5057cf1dec0494b8929722fc092625b3c4d1 -Author: Jeff McGee -Date: Fri Jan 17 16:56:06 2014 -0600 - - pm_rps: Fix verbose option and streamline its use - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit d14cd7430bbba6516a900393f7af1f44c7b6f3ee -Author: Jeff McGee -Date: Fri Jan 17 16:56:05 2014 -0600 - - pm_rps: Convert to subtest structure - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 0102b6bde6dc69cccee7d33df233e4ef1b73d9be -Author: Jeff McGee -Date: Fri Jan 17 16:56:04 2014 -0600 - - pm_rps: Add read back checking on sysfs writes - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit e07e758004ae3014504b7799cff3838f11dce848 -Author: Daniel Vetter -Date: Fri Jan 17 07:42:22 2014 +0100 - - tools: Install them all - - No reason really not too, especially since we install manpages for - some of them. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66656 - Signed-off-by: Daniel Vetter - -commit 8fa2066d7e707787019ecda814442c4789840499 -Author: Daniel Vetter -Date: Wed Jan 15 23:59:52 2014 +0100 - - tests/gem_gtt_hog: Use igt_simple_main - - Results in the compiler complaining about wrong exits and return values. - - Signed-off-by: Daniel Vetter - -commit eb1fddc057b363225153f86cf419f42d7d83469d -Author: Daniel Vetter -Date: Wed Jan 15 23:58:50 2014 +0100 - - tests/primve_nv_pcopy: Comment out unused check_swizzle function - - I've botched this in my patch to disable the swizzled pcopy test. - - Signed-off-by: Daniel Vetter - -commit 5e278c86eda1d5ade7c0fc425edc589e3c9dff59 -Author: Chris Wilson -Date: Wed Jan 15 10:40:40 2014 +0000 - - gem_gtt_hog: use a normal exit() - - Since we don't execute any subtests, using igt_exit leads to - inconsistent behaviour. In the future, this may be converted. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73641 - Signed-off-by: Chris Wilson - -commit a896ef9c1f67cf707fd2aea900e9276b4ff535d6 -Author: Robert Beckett -Date: Tue Jan 14 18:01:38 2014 +0000 - - igt: tests/Android.mk: fix LOCAL_PATH usage - - Fix usage of shared variable LOCAL_PATH in deferred variable expansion area. - - In Makefile language, rule and dependency definitions use immediate - expansions of variables, so they get expanded as soon as the rule is - created (1st pass). Rule implementation (a.k.a recipe) use deferred - expansion (2nd pass). - - Android effectively makes all Android.mk files a single makefile by - including them all in a big tree from the toplevel makefile. The rules - are all evaluated in the first pass and targets are generated. Then the - 2nd pass happens and the required target's recipes are run. At this - point, LOCAL_PATH has been assigned the value from the last evaluated - Android.mk in the 1st phase that defined LOCAL_PATH (most Android.mk use - this variable). In my particular case, it was the bootloader's - Android.mk that was evaluated last and had defined LOCAL_PATH to it's - path. The errors are rather misleading due to it looking like a bug in - another module's Android.mk rather than this one :) - - Basically, if you want to use a variable that any other Android.mk - defines, then you can only use it in an immediate expansion context, - not a deferred expansion context as it will likely be re-defined by - the time the 2nd pass happens. - - This patch stores it in a unique variable that should not be being - used by other Android.mk files. An alternative fix would be to use $@ - and $< as the files in question are target and dependency, but I never - like using those as they can easily break if dependencies are added - etc. I prefer variable to be explicitly named to make them obvious. - - See gnu make manual for explanation of deferred vs immediate - expansion of variables : - http://www.gnu.org/software/make/manual/make.html#Reading-Makefiles - - Reviewed-by: Damien Lespiau - Signed-off-by: Robert Beckett - -commit 44c0b2aeff41e258c74bb1b1221359c4661accd8 -Author: Mika Kuoppala -Date: Fri Jan 10 17:24:17 2014 +0200 - - tests/gem_reset_stats: run tests on all rings - - Run all relevant tests on all rings. - - Suggested-by: Daniel Vetter - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 3367359a9858a5ad806876213593ad912d2ef30f -Author: Mika Kuoppala -Date: Fri Jan 10 17:24:16 2014 +0200 - - tests/gem_reset_stats: split ctx tests - - Split context related tests from non-context ones - and cleanup the naming. - - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit fef1930bf30b8182fe8e6e26b8f722ee8995da71 -Author: Daniel Vetter -Date: Tue Jan 14 13:41:21 2014 +0100 - - tests/prime_nv_pcopy: disable swizzle tests - - It's pure luck that nv can detile some of the intel layouts since one - of the video MC formats matches it. Since we can't possible fix this - comment the test out. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73538 - Acked-by: Maarten Lankhorst - Signed-off-by: Daniel Vetter - -commit 1552aa21124cabe762862bb414490510415a2b2d -Author: Ben Widawsky -Date: Mon Jan 13 06:28:45 2014 -0800 - - gem_storedw_batches_loop: Fix for BDW - - Existing code was trying to be too clever and wasn't properly emitting - the high dword, or the correct length. - - Signed-off-by: Ben Widawsky - -commit fee27cf822cff981f3e6f8fb6ea4a8c5fe3579b3 -Author: Ville Syrjälä -Date: Mon Jan 13 17:05:19 2014 +0200 - - tests: Drop glib.h include from kms_cursor_crc and kms_fbc_crc - - kms_cursor_crc and kms_fbc_crc don't need glib.h. This was just some - copy-paste error on my part. - - Signed-off-by: Ville Syrjälä - -commit 2a7dbe5f0103ffdf44be174781868adb1a03f8a4 -Author: Jeff McGee -Date: Fri Jan 10 15:12:33 2014 -0600 - - pm_rps: Use igt exit handler for restore - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit d0b5fd2bff7ce8ec1ada15da6ca9ed2425cbf1c5 -Author: Jeff McGee -Date: Fri Jan 10 15:12:32 2014 -0600 - - pm_rps: Fix test to target original min and max - - The goal of the test is to confirm that gt_cur_freq_mhz can be forced - to the boundaries of the frequency range by collapsing gt_min_freq_mhz - and gt_max_freq_mhz to the target value. But we miss testing the upper - end of the range by targetting the current value of max after it has - been set equal to min. So fix by targetting orginal max instead of - current max. - - This correction exposes a problem in setfreq where min is always set - to target before max, which should fail if the target value is greater - than max. So fix that too. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 44b5d7b3300dd7c94d09c57c95ab3a407f8b17ef -Author: Jeff McGee -Date: Fri Jan 10 15:12:31 2014 -0600 - - pm_rps: Assert that valid sysfs writes return success - - do_writeval now always checks the return value, whether we expect - success or a specific error. Also add new macro writeval_inval to - simplify repeated use of do_writeval to test for EINVAL return code. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 265efbb2c4401542c8753e0d83d7a98493720865 -Author: Jeff McGee -Date: Fri Jan 10 15:12:30 2014 -0600 - - pm_rps: Use unbuffered I/O on sysfs files - - Bionic C library may not re-read a buffered, read-only file which - results in failure to monitor changes in gt_cur_freq_mhz. - - Signed-off-by: Jeff McGee - Signed-off-by: Daniel Vetter - -commit 45d63644d28c34202a97bd812f6c46c853e97d28 -Author: Chris Wilson -Date: Fri Jan 10 21:13:56 2014 +0000 - - tests/gem_pipe_control_store_loop: Delete bogus assertion - - target_bo->offset was just being used to verify that the batch - submission worked and fortunately was not being relied upon for any - subsequent conditions. However, address 0 is valid and so the assertion - itself was bogus as it is possible (almost assured with full-ppgtt) for - the target_bo to be located at address 0. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72984 - Signed-off-by: Chris Wilson - -commit 84af2b9be8792fb288d4ce75821a27706e5351c3 -Author: Chris Wilson -Date: Fri Jan 10 16:09:57 2014 +0000 - - gem_gtt_hog: Print elapsed time in ms - - Missed one last diff before pushing - -commit f62abaff99792f10962b1aa072b8a3b314765591 -Author: Chris Wilson -Date: Fri Jan 10 13:42:55 2014 +0000 - - tests: Add gem_gtt_hog - - The purpose of this test is to exercise the userspace latency hogs - reported by Arjan van de Ven. He found some applications blocked the - device by stalling on the GPU inside the pagefault handler. - -commit 2c9e76184518854f21d367296ababef87fb41243 -Author: Daniel Vetter -Date: Fri Jan 10 09:21:54 2014 +0100 - - tests/gem_largeobject: Prefault instead of pin - - This doesn't test pin but pwriting to big objects ... - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72901 - Signed-off-by: Daniel Vetter - -commit cb9e8376fac2c96c2e6bffa511b3087d916286d0 -Author: Daniel Vetter -Date: Fri Jan 10 09:21:15 2014 +0100 - - tests: fixup igt_simple_main fallout - - Oops, I should look at compilier warnings a bit better. - - Signed-off-by: Daniel Vetter - -commit 7775fca2df815dfee18b181de6fe13df27bb9867 -Author: Daniel Vetter -Date: Wed Jan 8 20:24:36 2014 +0100 - - tests/gem_ctx_exec: fix ram requirement fumble - - We need to half available ram, not double it ... - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72557 - Signed-off-by: Daniel Vetter - -commit 864d09ed4c11f89e1cd91b187a48c57b4c00b779 -Author: Daniel Vetter -Date: Tue Jan 7 19:25:11 2014 +0100 - - tests/NAMING-CONVENTION: s/snooped/snoop/ - - Oops. We should be a bit more consistent with which verb form we're - picking. tile,tiled,tiling is even worse ... - - Signed-off-by: Daniel Vetter - -commit 67c80f8d816259067b7474fe6f8c79915d6483f0 -Author: Devon Davies -Date: Wed Jan 8 16:07:06 2014 +0000 - - build: Added -UNDEBUG to tools/Android.mk - - NDEBUG is defined by default in Android and causes assert(x) to be - defined as void(x). This change ensures that asserts work as - expected in tools. - - This flag is already inside tests/Android.mk - - Reviewed-by: Oscar Mateo - Signed-off-by: Devon Davies - Signed-off-by: Damien Lespiau - -commit 0ec9c94bea6d1ba3969a03ebf75494115e24edf6 -Author: Damien Lespiau -Date: Mon Jan 6 14:56:02 2014 +0000 - - tools: Remove intel_disable_clock_gating - - This tool only supports ILK. I take the fact that nobody has felt the - need to update for later platform a sign it's not very useful. - - Reviewed-by: Kenneth Graunke - Signed-off-by: Damien Lespiau - -commit 5fdca4c1666fb055f1ba955beaa5511b99ebfbd6 -Author: Damien Lespiau -Date: Tue Jun 4 13:55:06 2013 +0100 - - tools: Removed unused tools/intel_iosf_read.c - - Also intel_iosf_read() does not exist, and would need a bit more - arguments. - - Reviewed-by: Kenneth Graunke - Signed-off-by: Damien Lespiau - -commit a1baf3050e3b329cf52064ec92c1dbd8bde3aab0 -Author: Damien Lespiau -Date: Tue Jun 4 11:36:23 2013 +0100 - - lib: Use INSTDONE_I965 and INSTDONE_1 for gen6 - - The GEN6_INSTDONE_1 and GEN6_INSTDONE_2 registers are just the old - INSTDONE_I965 and INSTDONE_1 registers but renamed. Let's use the old - names (this is what the kernel does). - - Reviewed-by: Kenneth Graunke - Signed-off-by: Damien Lespiau - -commit 3ebd8aa95e610268cfa9b1307e6c707649f96f40 -Author: Damien Lespiau -Date: Tue Jun 4 09:06:50 2013 +0100 - - lib: Move the INSTDONE bit definitions to instdone.c - - This is the only place where they are used and we've even started using - 1 << n constants with gen 7. - - Reviewed-by: Kenneth Graunke - Signed-off-by: Damien Lespiau - -commit da78bc497b46f09f8b161202d6f61e6dd26e9a65 -Author: Damien Lespiau -Date: Tue Jun 4 06:48:49 2013 +0100 - - instdone: Add an assert to make sure we never overflow instdone_bits - - Reviewed-by: Kenneth Graunke - Signed-off-by: Damien Lespiau - -commit d8b1dee220dc07bfae9d7fd82e360cc56bf9c30f -Author: Damien Lespiau -Date: Tue Jun 4 05:41:36 2013 +0100 - - intel_reg: Renamed INST_DONE to INSTDONE - - That's how the registers are named in the kernel defines. - - Reviewed-by: Kenneth Graunke - Signed-off-by: Damien Lespiau - -commit 98c10d379b8d6b8e34da1e9963a114413021838e -Author: Paulo Zanoni -Date: Mon Dec 30 11:40:03 2013 -0200 - - tests/kms_flip: free the test_output struct when counting modes - - Looks like we have to do a lot of work just to count the number of - modes... - - Caught by Valgrind. - - Signed-off-by: Paulo Zanoni - -commit 69856b5e7b96f6945da7f6c42a1468a38513b3ca -Author: Paulo Zanoni -Date: Mon Dec 30 11:33:16 2013 -0200 - - tests/kms_flip: don't leak the connector_config struct - - ... in case we can't find a compatible mode. We already have - config[0], we can't return without freeing it first. - - Caught by Valgrind. - - Signed-off-by: Paulo Zanoni - -commit 056500bdc5e4243a8baa3503ec9c3fdd7323a454 -Author: Paulo Zanoni -Date: Mon Dec 30 11:30:03 2013 -0200 - - tests/kms_flip: don't leak the CRTC - - The kms_flip program calls kmstest_get_connector_config, which returns - a struct containing some allocated variables, including a pointer to - the CRTC. The problem is that we copy the values returned by this - structure to the test_output struct, but we ignore the CRTC pointer. - So free the CRTC pointer instead of leaking it. - - Caught by Valgrind. - - Signed-off-by: Paulo Zanoni - -commit 02ad7e04dd0ddbb77e928330f8490680f1e200cc -Author: Paulo Zanoni -Date: Mon Dec 30 11:27:57 2013 -0200 - - tests/kms_flip: don't leak the connector when setting DPMS - - Caught by Valgrind. - - Signed-off-by: Paulo Zanoni - -commit 329faeccf72ce8f289004809d5e3245cb6620ab9 -Author: Paulo Zanoni -Date: Mon Dec 30 11:20:39 2013 -0200 - - drmtest: don't leak memory when parsing the arguments - - Found this while investigating memory leaks on kms_flip. Detected by - Valgrind. - - Signed-off-by: Paulo Zanoni - -commit bb40494671b7641540dcb2015e9411aebd5016bb -Author: Daniel Vetter -Date: Tue Jan 7 08:14:33 2014 +0100 - - NEWS updates - - Signed-off-by: Daniel Vetter - -commit 1d2ef9553ae4b738595676b7554f93d70acd78a0 -Author: Damien Lespiau -Date: Mon Dec 16 11:28:39 2013 +0000 - - intel_error_decode: Factor out common decoding code - - 4 pieces of code were looking very similar. Let's factor out a common - function in the not so unlikely case we need to tweak that code. - - Signed-off-by: Damien Lespiau - -commit 01eeab94482de8c8fa687ffcfa95e5d32720909d -Author: Ben Widawsky -Date: Thu Jan 2 19:33:57 2014 -1000 - - configure.ac: Fix shader debugger for real - - I tried to get fancy before, but ended up pushing something which I - didn't test. Keep the thing simple and stupid, and just make it work. - - Reported-by: Paulo Zanoni - Signed-off-by: Ben Widawsky - -commit 164d9d26ac33029287a24fbed549e3a2858d5d51 -Author: Chris Wilson -Date: Mon Dec 30 17:48:43 2013 +0000 - - kmstest: Fix up lifetimes of cairo objects - - cairo_t is the short lived drawing context, whereas cairo_surface_t is - the heavyweight object that persists and is also tied to underlying GEM - objects. So make the kmstest API reflect the different weights and fix - the lifetime and underlying object reference leaks. - - Based on the fix by Paulo Zanoni. - - Signed-off-by: Chris Wilson - -commit 9d6cfa6b59d0c22cf772ca71069f9e5f3e53d055 -Author: Ben Widawsky -Date: Mon Dec 30 10:41:43 2013 -0800 - - configure.ac: Fixup conditional shader debugger - - The original patch was incomplete. Testing no assembler build is a pain - for me. Sorry for the mess. - - Signed-off-by: Ben Widawsky - -commit 3ed4b5bd1180c034820a4bf83eec896fd21ae33e -Author: Ben Widawsky -Date: Mon Dec 30 10:32:06 2013 -0800 - - configure.ac: Remove GEN4ASM define - - This was a leftover hunk that got accidently merged. - - Signed-off-by: Ben Widawsky - -commit 72fe2b641488fcc01d48187fe1642337ce61cef0 -Author: Ben Widawsky -Date: Tue Dec 24 13:12:31 2013 -0800 - - gem_exec_blit: gen8 updates for blit - - Signed-off-by: Ben Widawsky - -commit 94b2b861f5e2cd3dd5e32459174c9fdc3c3b0d8b -Author: Ben Widawsky -Date: Fri Dec 20 21:15:16 2013 -0800 - - shader-debugger: Use in tree gen4asm - - Reported-by: Patrick McMunn - Signed-off-by: Ben Widawsky - -commit 4f28614777a5dec5de5cafacd640f5b50180acaa -Author: Daniel Vetter -Date: Fri Dec 20 16:56:14 2013 +0100 - - README: Fix spelling fail - - Thanks to Jani for spotting this. - - Signed-off-by: Daniel Vetter - -commit fd6c66c4a2ad2b13cd56dc93c4cbf3a56bc0b3a8 -Author: Daniel Vetter -Date: Fri Dec 20 15:49:59 2013 +0100 - - README: Document how to avoid Waffle with piglit - - Suggested by Paulo. - - Signed-off-by: Daniel Vetter - -commit 2a71bff3173c538d618f5fc6f45b7150fc10f3fb -Author: Paulo Zanoni -Date: Mon Dec 16 18:47:39 2013 -0200 - - tests/pm_pc8: check if we can't become DRM master - - QA reported a failure that I believe happened because we couldn't - become DRM master, so add code that checks for this and prints a nice - error message. - - Signed-off-by: Paulo Zanoni - -commit 62e1cbc6343577e4fe2ea5b93981fab015872670 -Author: Oscar Mateo -Date: Fri Dec 13 20:48:24 2013 +0000 - - build: Create version and config information files in Android - - Also, skip the compilation of pm_lpsp in Android (uses Cairo) - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 4eae05f03b893e2e7b2eb0e0d9799fe0228393bb -Author: Oscar Mateo -Date: Fri Dec 13 16:24:37 2013 +0000 - - tests/gem_close_race: Adapt the test for Full PPGTT - - With Full PPGTT, each new fd creates a new context and thus a new - PPGTT, so we have to reduce the number of simultaneous fds or face - OOM problems. For every new PPGTT, its PDEs are stored in the GGTT - which imposes a limit of 1024 new contexts. We want to leave at - least 1/4 of the GGTT available for "important" stuff like scanout - buffers, so never open more than 768 fds. - - v2: Unconditionally use the lower limit, as suggested by Daniel - Vetter - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit be14c7bb04664a515df11c21f90a0f29c7756e6b -Author: Damien Lespiau -Date: Fri Dec 13 12:53:31 2013 +0000 - - lib: Include the necessary stdint.h in gen6_render.h - - Instead of assuming someone else will do it. - - Signed-off-by: Damien Lespiau - -commit 16531069f6b6fc4f8ac5ab537e9829406c348d7b -Author: Daniel Vetter -Date: Thu Dec 12 22:46:18 2013 +0100 - - tests: Document the Makefile variables a bit better - - Also, this is a test for the patchwork hook. - - Signed-off-by: Daniel Vetter - -commit a68937ca3b49d2ea89d753b6aecc015df8ad76a5 -Author: Mika Kuoppala -Date: Tue Dec 10 10:50:48 2013 +0200 - - tests/gem_reset_stats: add reverse order in close-pending-fork - - Use own copy of gem_quiescent_gpu() so that test still works - if it gets changed. Further improve the test by posting a batch - to rings in reverse order. - - Suggested-by: Daniel Vetter - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 826c4effe624da4bf9337028e15894fbf0c2a3ab -Author: Daniel Vetter -Date: Thu Dec 12 09:26:58 2013 +0100 - - tests: Move gem_reset_stats to the right place - - Binaries should only be added to the HANG target if they're completely - broken. If they just cause a recoverable gpu hang as part of the test - then they need to be somewhere else. - - Signed-off-by: Daniel Vetter - -commit 36f017dfd1a12bcdf03f928ca02e9053f3622efc -Author: Paulo Zanoni -Date: Tue Dec 3 15:03:02 2013 -0200 - - tests/kms_setmode: avoid 2 connectors on the same encoder - - Don't try to set modes on two connectors that share the same encoder. - That will just fail. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68463 - Reviewed-by: Imre Deak - Signed-off-by: Paulo Zanoni - -commit 13ef9e8d5453f0902e3025981b9cfd68558ff7e1 -Author: Imre Deak -Date: Tue Dec 10 15:33:07 2013 +0200 - - kms_flip: consolidate run_test_on_{crtc,crtc_pair} - - No functional change. - - Signed-off-by: Imre Deak - Acked-by: Daniel Vetter - -commit 1ac94b50af6ef0ab5607e85960880c284607b88a -Author: Imre Deak -Date: Tue Dec 10 14:00:19 2013 +0200 - - kms_flip: keep drm_fd open for the dpms restore exit handler - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69161 - - Signed-off-by: Imre Deak - -commit 2c6c4cf2a146855f1de6e3ca89f9df09da1024be -Author: Imre Deak -Date: Mon Dec 9 17:28:50 2013 +0200 - - kms_flip: fix seq_step for 2xcrtc subtests - - This also raises the absolute wait-for-vblank sequence step from 5 to - 10, just to make it consistent with the corresponding 1x subtests. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69161 - Signed-off-by: Imre Deak - Reviewed-by: Daniel Vetter - -commit f034817b401d9e0016cb8d2cddd9220c3a36463a -Author: Kenneth Graunke -Date: Mon Dec 9 23:29:36 2013 -0800 - - rendercopy/bdw: Fix length of a bunch of zeroed out packets. - - A bunch of packets were too short. - - Signed-off-by: Kenneth Graunke - Signed-off-by: Damien Lespiau - Reviewed-by: Damien Lespiau - Cc: Ben Widawsky - Cc: Damien Lespiau - -commit fdbdc7f325af9b42684fc6c7100cb57c52b31c4a -Author: Kenneth Graunke -Date: Mon Dec 9 23:29:35 2013 -0800 - - rendercopy/bdw: Emit 3DSTATE_WM_HZ_OP. - - We don't want depth/stencil fast clears or HiZ resolves; we want normal - drawing. Without this, the pixel pipeline doesn't work. - - Signed-off-by: Kenneth Graunke - Reviewed-by: Damien Lespiau - Signed-off-by: Damien Lespiau - Cc: Ben Widawsky - Cc: Damien Lespiau - -commit 8cd3a9d5438a5e6961823c15fd41ae02b09c7c9b -Author: Daniel Vetter -Date: Tue Dec 10 10:30:59 2013 +0100 - - ignore version.h - - Signed-off-by: Daniel Vetter - -commit dda85fb108469e3d3c8ce19751f928c70e9fba4c -Author: Daniel Vetter -Date: Tue Dec 10 10:18:32 2013 +0100 - - tests: roll out igt_simple_init/igt_simple_main - - Also use igt_skip a bit more to simplify some of the tests. - - Signed-off-by: Daniel Vetter - -commit ce1a9f918ef2415562bf441c2b7d886c6eb865c4 -Author: Daniel Vetter -Date: Tue Dec 10 09:58:28 2013 +0100 - - tests: gem_close_race has subtests! - - Oops. - - v2: Found more. - - Signed-off-by: Daniel Vetter - -commit ef9745b7faf42b1273c63de6f3e4afcbb896e568 -Author: Daniel Vetter -Date: Tue Dec 10 09:41:48 2013 +0100 - - lib: igt_simple_main/init for subtest-less tests - - Atm only used to print the version information. - - Signed-off-by: Daniel Vetter - -commit f1c4ec936c97c4b2f906638180357c8786776316 -Author: Daniel Vetter -Date: Tue Dec 10 09:26:08 2013 +0100 - - lib: print uname information in the version string - - Signed-off-by: Daniel Vetter - -commit 831a47196dd4d8afbdd967353d689bf8aed4f3e6 -Author: Daniel Vetter -Date: Tue Dec 10 09:23:44 2013 +0100 - - lib: Add host platform to version string - - This is import on systems where we compile 32bit tests that run on - 64bit platforms. - - Signed-off-by: Daniel Vetter - -commit 8c33e9ad111d27b84db4daac43809a807f262632 -Author: Ben Widawsky -Date: Fri Dec 6 20:35:29 2013 -0800 - - intel-gpu-tools: Version information - - Provide two arguments version, and verbose, which allow printing from an - arbitrary igt test. It will show system information (from build time, - not runtime), as well as the git SHA being used. - - This will help reduce errors when people try to reproduce problems. - - As an example if I want to verify someone is running the correct version - of a test, I could ask them to do: - bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --verbose - gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT - Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux) - Time to exec x 1: 35.000µs (ring=render) - Time to exec x 2: 28.000µs (ring=render) - Time to exec x 4: 20.000µs (ring=render) - Time to exec x 8: 14.625µs (ring=render) - Time to exec x 16: 11.188µs (ring=render) - Time to exec x 32: 11.125µs (ring=render) - Time to exec x 64: 10.328µs (ring=render) - Time to exec x 128: 10.172µs (ring=render) - Time to exec x 256: 10.234µs (ring=render) - Time to exec x 512: 10.232µs (ring=render) - Time to exec x 1024: 10.121µs (ring=render) - Time to exec x 2048: 10.151µs (ring=render) - Time to exec x 4096: 11.474µs (ring=render) - Time to exec x 8192: 9.432µs (ring=render) - Time to exec x 16384: 6.003µs (ring=render) - Time to exec x 32768: 5.029µs (ring=render) - Time to exec x 65536: 4.206µs (ring=render) - Time to exec x 131072: 3.630µs (ring=render) - Subtest render: SUCCESS - - --verbose is provided for completeness, but doesn't seem too useful at - the moement. - - bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --version - gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT - Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux) - - I've put version.h in the root directory so that any subdir can access - it. I've added the tests usage since it's immediately useful, and done - easily via Daniels igt infrastructure work. - - v2: - - Always print the version number. - - We want to print uname at runtime. - - Also prefix the i-g-t release version. - - Signed-off-by: Ben Widawsky (v1) - Signed-off-by: Daniel Vetter - -commit ea8c086919041d152b957773b0071e0cfafd3f78 -Author: Daniel Vetter -Date: Tue Dec 10 08:07:11 2013 +0100 - - lib: Always print errno in igt assert/require macros - - Useful to figure out why things have failed. - - Signed-off-by: Daniel Vetter - -commit 3c5423b9a74fe056cae1fce41fd3ad16584e9c8d -Author: Tvrtko Ursulin -Date: Fri Dec 6 12:38:49 2013 +0000 - - tests/gem_media_fill: Remove unnecessary include - - Causes trouble for Android builds. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit ef0931724f58bd38fcd6e4261494a77ca125508f -Author: Paulo Zanoni -Date: Tue Dec 3 19:44:45 2013 -0200 - - tests: add pm_lpsp - - QA has asked me "How can we make sure LPSP is working?". Now, instead - of writing big paragraphs, I can just answer "make sure pm_lpsp - works". - - Signed-off-by: Paulo Zanoni - -commit d5cdee95d5e8290adea2757230a7c10728bcd49a -Author: Paulo Zanoni -Date: Tue Dec 3 16:44:08 2013 -0200 - - lib: rename some power well bit names - - I did the same change in the Kernel a few months ago. This should help - not getting confused about which bit does what. - - Signed-off-by: Paulo Zanoni - -commit 3906a50ede5fa8d6edfca8bf81809fd0cf229a30 -Author: Xiang, Haihao -Date: Fri Dec 6 09:16:58 2013 +0800 - - assembler/bdw: Update write(...) - - write(...) is used for Render Target Write and Media Block Write. - The two message types no longer share the same cache agent on GEN8, - So a parameter is needed for cache agent. The 4th parameter of write() - is used for write commit bit which has been removed since GEN7. Hence - we can re-use the 4th parameter as cache agent on GEN8 - - Reviewed-by: Damien Lespiau - Signed-off-by: Xiang, Haihao - Signed-off-by: Damien Lespiau - -commit a4d3a6c013664da062cdff9ead7bc9ab86b33caa -Author: Daniel Vetter -Date: Fri Dec 6 10:48:25 2013 +0100 - - lib: make igt_pipe_crc_start never fail - - It's what callers expect - pipe_crc_new is the function where - we pass a potential failure back to callers. - - Reviewed-by: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit c1b7e722dafdbddcce2bec230e3faf8b4fe6f123 -Author: Daniel Vetter -Date: Fri Dec 6 10:47:10 2013 +0100 - - lib: add igt_pipe_crc_check - - No need to duplicate this all over the place. - - Reviewed-by: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit 3e37eb3c6cae56bbd11016102c20a63ce58966da -Author: Daniel Vetter -Date: Fri Dec 6 10:45:49 2013 +0100 - - tests: drm_open_any doesn't fail - - Or more precisely: It already has an igt_require. So we cant ditch it - from tests. - - Reviewed-by: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit 5b3edb61528f26c05af20fccc8b44e8e3c5f7861 -Author: Damien Lespiau -Date: Fri Dec 6 13:02:51 2013 +0000 - - gitignore: Ignore gem_media_fill - - Signed-off-by: Damien Lespiau - -commit adbd83cdc31b10dd3cee5abc247018719aa74acf -Author: Xiang, Haihao -Date: Fri Dec 6 16:54:45 2013 +0800 - - rendercopy/bdw: Set Instruction Buffer size Modify Enable to 1 - - Otherwise it may result in GPU hang - - Reviewed-by: Kenneth Graunke - Signed-off-by: Xiang, Haihao - Signed-off-by: Damien Lespiau - -commit 4570e1b3dece3cebc45fdcff5f767f24bba67da1 -Author: Xiang, Haihao -Date: Fri Dec 6 16:54:44 2013 +0800 - - lib: Clean the batch buffer store after reset - - Otherwise the stale data in the buffer - - Reviewed-by: Kenneth Graunke - Signed-off-by: Xiang, Haihao - Signed-off-by: Damien Lespiau - -commit 509850bf48199c9ec88b9ae03154e809da283d13 -Author: Daniel Vetter -Date: Fri Dec 6 08:39:31 2013 +0100 - - tests/gem_reset_stats: document the new subtest a bit better - - I wanted to add this to Mika's original patch but forgot to git add. - - Signed-off-by: Daniel Vetter - -commit 5f40b23cfa0441fceba9d2cb6437724e880a8fc3 -Author: Xiang, Haihao -Date: Mon Dec 2 12:52:08 2013 +0800 - - tests/gem_media_fill: the assembly code for the shader used in the case - - The code is for reference only - - v2: Fixed the source register used for the send with EOT - Fixed the posted destination operand for the send with EOT - - v3: Fixed the cache agent used in media_block_write message on GEN8 - - Reviewed-by: Zhao Yakui - Signed-off-by: Xiang, Haihao - -commit c6835697253c07cfc6711bcfc9b071afa4a6144d -Author: Xiang, Haihao -Date: Mon Dec 2 12:49:14 2013 +0800 - - tests/gem_media_fill: add support for gen7 - - v2: Fixed the source register used for the send with EOT - Fixed the posted destination operand for the send with EOT - - Reviewed-by: Zhao Yakui - Signed-off-by: Xiang, Haihao - -commit bd384c2ba38d8fccb8ce1b47b51d78cd64636b50 -Author: Xiang, Haihao -Date: Mon Dec 2 12:36:15 2013 +0800 - - tests/gem_media_fill: add support for gen8 - - v2: Fixed the source register used for the send with EOT - Fixed the posted destination operand for the send with EOT - - v3: Workaround: Insert MEDIA_STATE_FLUSH after MEDIA_OBJECT. - Fixed the cache agent used in media_block_write message - Set Instruction Buffer size Modify Enable to 1, otherwise it may result in GPU hang - - Reviewed-by: Zhao Yakui - Signed-off-by: Xiang, Haihao - -commit 641267dd735e0ab9a5b8d083b4e1a2392b41ae07 -Author: Xiang, Haihao -Date: Fri Nov 29 13:47:31 2013 +0800 - - tests: add gem_media_fill - - It is to check whether media pipeline on render ring works. Codes - are copied and modified from the rendercopy case which uses 3D pipeline. - However media pipeline is simpler than 3D pipeline and there is few changes - between gen6,gen7 and gen8 - - Reviewed-by: Zhao Yakui - Signed-off-by: Xiang, Haihao - -commit 8ac7b93b218af1544988331cd68c69ba4102c29f -Author: Ben Widawsky -Date: Thu Dec 5 16:02:52 2013 -0800 - - gem_exec_faulting_reloc: Update gen8 BLT cmds - - Signed-off-by: Ben Widawsky - -commit e41928e6c9bb3f24833a827903f1afeda83592d6 -Author: Ben Widawsky -Date: Thu Dec 5 15:35:01 2013 -0800 - - gen8 rendercpy: temporarily disable - - We don't yet have this working, and the excessive hangs are annoying. - - Signed-off-by: Ben Widawsky - -commit da4258529faa064d78184b81b0dad9b3523e722f -Author: Ben Widawsky -Date: Thu Dec 5 15:00:44 2013 -0800 - - Kill XY_COLOR_BLT_CMD - - Since we now always want a length for this command, and we've created a - non-length variant, remove the #define to prevent further foot shooting. - - Signed-off-by: Ben Widawsky - -commit 53b0c0431c89397789252b6649e70090d0458e95 -Author: Ben Widawsky -Date: Thu Dec 5 14:44:23 2013 -0800 - - gem_reloc_vs_gpu: Update for gen8 BLT cmds - - NOTE: Some subtests are still failing, but I haven't found the bug yet. - At least this should help QA meanwhile. - - Signed-off-by: Ben Widawsky - -commit b23d73788a7d494f99d74bafb762dd825deb6697 -Author: Ben Widawsky -Date: Thu Dec 5 14:44:23 2013 -0800 - - gem_persistent_relocs: Update for gen8 BLT cmds - - NOTE: Some subtests are still failing, but I haven't found the bug yet. - At least this should help QA meanwhile. - - Signed-off-by: Ben Widawsky - -commit ba0d651a017d9c633e7530b7d13ec6abaeaedceb -Author: Ben Widawsky -Date: Thu Dec 5 14:36:20 2013 -0800 - - gem_write_read_ring_switch: Missed gen8 BLT updates - - Signed-off-by: Ben Widawsky - -commit 846a0f01b04eae501ced0f59e2bd18c5f4c774bb -Author: Ben Widawsky -Date: Thu Dec 5 14:34:35 2013 -0800 - - drm_vma_limiter_cached: Missed gen8 BLT updates - - Signed-off-by: Ben Widawsky - -commit 672911d7149735ee51cbcff5540b8dcb8a2de321 -Author: Ben Widawsky -Date: Thu Dec 5 14:14:35 2013 -0800 - - gem_pipe_control_store_loop: BDW update - - I've opted to not use the PIPE_CONTROL w/a for now. I am unclear if it - is actually required (the test does pass). - - Signed-off-by: Ben Widawsky - -commit 40b586188c021db58a37ef23ac7d3e20547461a1 -Author: Daniel Vetter -Date: Thu Dec 5 15:49:58 2013 +0100 - - tests/gem_ctx_exec: Add eviction test - - It didn't pan out at all since atm we don't evict context objects. But - maybe it's useful for when that happens. - - v2: Actually test eviction. Took a while to figure that one out. - - And indeed the testcase now fails because we don't evict the previous - context as we should. - - Signed-off-by: Daniel Vetter - -commit 1a95c710f9160692e3c29100600b1766388f93de -Author: Daniel Vetter -Date: Thu Dec 5 15:50:18 2013 +0100 - - lib: add gem_available_aperture_size helper - - Signed-off-by: Daniel Vetter - -commit 33ef5284903d2b64c4744c208d9eccc54cba65a3 -Author: Daniel Vetter -Date: Thu Dec 5 13:41:51 2013 +0100 - - tests/core_get_client_auth: new subtests for always authenticated - - This exercise the bug fixed in - - commit 1020dc6990168a5081ffad620c440e220f05b460 - Author: Chris Wilson - Date: Tue Oct 29 08:55:57 2013 +0000 - - drm: Do not drop root privileges for a fancier younger process - - Signed-off-by: Daniel Vetter - -commit 365f4812b12323336e5b54befdbb2628b78713f0 -Author: Daniel Vetter -Date: Thu Dec 5 13:35:50 2013 +0100 - - tests: rename get_client_auth to have a core_ prefix - - Also sort .gitignore. - - Signed-off-by: Daniel Vetter - -commit 28e4b34b3d582e5489302c551bb83c2c1fdef2d3 -Author: Ville Syrjälä -Date: Thu Dec 5 13:01:58 2013 +0200 - - quick_dump: Restore execture permission on quick_dump.py - - quick_dump.py execute permission was accidentally lost in: - - commit d56697233699844db9262a9a056b62b24b69dd39 - Author: Mengdong Lin - Date: Sun Aug 25 23:07:22 2013 -0400 - - quick_dump/bdw: support Broadwell in device auto-detection - - Signed-off-by: Ville Syrjälä - -commit 0b67c0c421fb736b5086f69a7cc5415f66c3d369 -Author: Chon Ming Lee -Date: Wed Dec 4 20:44:33 2013 +0800 - - Update dpio read/write to take in extra PHY parameter. - - The extra parameter is for future platform. - - Signed-off-by: Chon Ming Lee - Signed-off-by: Ville Syrjälä - -commit f5643c4a270baa4da33676950e36b1681d6d93dc -Author: Chon Ming Lee -Date: Wed Dec 4 20:44:32 2013 +0800 - - tools/quick_dump: Update Baytrail DPIO names to reflect to the driver change. - - DPIO name still using old name. Change it according to the driver name. - - Signed-off-by: Chon Ming Lee - Signed-off-by: Ville Syrjälä - -commit 6b18ef826ffdb433eff00db974589897ac1dd527 -Author: Mika Kuoppala -Date: Wed Dec 4 16:39:09 2013 +0200 - - tests/gem_reset_stats: add close-pending-fork - - This triggers use after free oops on request->batch_obj when - going through the rings and setting reset status on requests, - after a gpu hang. - - v2: Streamlined the test and added comments (Daniel) - - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit fb03ea7737dcda887e6eeca17afe7b91cf178b38 -Author: Mika Kuoppala -Date: Tue Nov 26 09:26:17 2013 +0200 - - lib/drmtest: Fix filedesc leak on gem_quiescent_gpu - - to not run out of filedescs as some tests call gem_quiescent_gpu - directly. - - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit ab7cbf9737fe35cc286520379e54ae9882ab402b -Author: Tvrtko Ursulin -Date: Tue Dec 3 16:44:54 2013 +0000 - - Revert "lib/drmtest: ducttape over fork race" - - This reverts commit a031a1bf93b828585e7147f06145fc5030814547. - - Signed-off-by: Tvrtko Ursulin - - Conflicts: - lib/drmtest.c - Signed-off-by: Daniel Vetter - -commit b34322fd15488eed8b7b20538cb1d50f43b4b132 -Author: Daniel Vetter -Date: Tue Dec 3 17:57:06 2013 +0100 - - Revert "test/gem_concurrent_blt" - - This reverts commit aee0dcb1ec2075991d310dd6f3fb5e50160847d1. - - Oops, accidentally commit a bit of wip changes. - -commit 139c72f38a07c545f5a9ab5fa3750779987b9275 -Author: Tvrtko Ursulin -Date: Tue Dec 3 16:44:55 2013 +0000 - - drmtest: Avoid wrong PID/TID after clone races - - Various C library implementations have various races with regards - to caching getpid() or TID inside pthread_kill() implementations. - - For example see clone(2) glibc man page and pthread_kill - Bionic C library source. - - Work around that by making sure correct PID/TGID and TID values - are retrieved from the kernel when re-raising the signal. It - can be delivered immediately after the clone system call while C - library cached copies have not yet been updated. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit 4f990f3ad21eb375918dde7ad7c55ee3a75158c4 -Author: Tvrtko Ursulin -Date: Tue Dec 3 15:35:41 2013 +0000 - - build: Skip kms_fbc_crc on Android - - We do not have GLib there so it does not build. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit b92b397d5e4ffe10ed92fb2fc6711758ef5bcf89 -Author: Tvrtko Ursulin -Date: Tue Dec 3 15:09:57 2013 +0000 - - build: Make sure asserts are enabled for tests - - Tests depend on assertions being enabled since they can, and do, - contain actual test steps. They are also mandatory for ensuring - sane test case behaviour. - - Signed-off-by: Tvrtko Ursulin - Signed-off-by: Daniel Vetter - -commit aee0dcb1ec2075991d310dd6f3fb5e50160847d1 -Author: Daniel Vetter -Date: Tue Dec 3 16:32:52 2013 +0100 - - test/gem_concurrent_blt - - Limit working set size also with available ram. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255 - Signed-off-by: Daniel Vetter - -commit 26b336f81128b6c51e2757381c19d8cdf0b2c369 -Author: Daniel Vetter -Date: Tue Dec 3 13:07:28 2013 +0100 - - lib: Don't put functional code into asserts - - Android apparently compiles with NDEBUG. Which is strongly advised - against, since the big pile of asserts mostly check correct usage of - the helper code in testcases. - - Signed-off-by: Daniel Vetter - -commit 38354ec4d890c384b5d91738f955ed6aed6d0c1c -Author: Chris Wilson -Date: Tue Dec 3 10:12:37 2013 +0000 - - drmtest: Fix weird signage on errno - - Signed-off-by: Chris Wilson - -commit e7ec90a01ccd6a1dcda431065851e4629ddf73b4 -Author: Damien Lespiau -Date: Thu Nov 28 14:35:45 2013 +0000 - - gitignore: Ignore kms_fbc_crc - - Signed-off-by: Damien Lespiau - -commit 8d7f00146c3664f78a12f17af0fb5365c5a09396 -Author: Damien Lespiau -Date: Thu Nov 28 14:34:51 2013 +0000 - - kms_fbc_crc: Remove unused variable - - Signed-off-by: Damien Lespiau - -commit 34f104aed7c14313c473bb7dafcda43f8b473903 -Author: Damien Lespiau -Date: Fri Nov 22 18:14:26 2013 +0000 - - rendercopy/bdw: Fix the 3DSTATE_STENCIL_BUFFER instruction length - - Signed-off-by: Damien Lespiau - -commit 09f144b649176bd80e31ccab65c9206931e6150f -Author: Damien Lespiau -Date: Fri Nov 22 18:12:35 2013 +0000 - - rendercopy/bdw: Fix the 3DSTATE_HIER_DEPTH_BUFFER instruction length - - Signed-off-by: Damien Lespiau - -commit e824fdd0339f5a649aaf54a74694836f55bb0e9c -Author: Damien Lespiau -Date: Fri Nov 22 18:11:03 2013 +0000 - - rendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction length - - Signed-off-by: Damien Lespiau - -commit ffff68f08a63cb27fb558b54c7240b9bc4571f96 -Author: Damien Lespiau -Date: Fri Nov 22 17:36:54 2013 +0000 - - rendercopy/bdw: Fix the STATE_SIP instruction length - - Signed-off-by: Damien Lespiau - -commit b333d23e3ae1ee3d971446464bd02c4a8f1695da -Author: Damien Lespiau -Date: Fri Nov 22 17:29:02 2013 +0000 - - intel_dump_decode: Support the INTEL_DEVID_OVERRIDE env variable - - This is the one that already works in libdrm, so don't disappoint people - coming with expectations. - - Signed-off-by: Damien Lespiau - -commit b226f43fe854ba1d0d8be7fe94f8692a93fa8aa8 -Author: Damien Lespiau -Date: Fri Nov 22 17:24:52 2013 +0000 - - intel_dump_decode: Actually parse the -d option - - Signed-off-by: Damien Lespiau - -commit 6c9fcc42bb3ef448fdea579795816f7321f8bd75 -Author: Ville Syrjälä -Date: Sat Nov 9 20:58:27 2013 +0200 - - kms_fbc_crc: Add a CRC based FBC test - - kms_fbc_crc will perform various write operations to the scanout buffer - whilc FBC is enabled. CRC checks will be used to make sure the - modifcations to scanout buffer are detected. - - The operations include: - - page flip - - GTT mmap - - CPU mmap - - blit - - rendercopy - - context switch + rendercopy - - combination of a page flip and each operation listed above - - v2: Use gem_sw_finish instead of drmModeDirtyFB after CPU access - v3: Drop pwrite tests, call gem_bo_busy() after rendering, drop - set_domain() calls after mmap access, wait for 2 vblanks - - Signed-off-by: Ville Syrjälä - -commit 49f4860d5c94afffecfac3fcda999bea59d5f929 -Author: Ville Syrjälä -Date: Mon Nov 25 17:31:13 2013 +0200 - - lib: Add gem_bo_busy - - Move gem_bo_busy() from gem_wait_render_timeout.c to lib. - - Signed-off-by: Ville Syrjälä - -commit 525788a7360cca116b00819c14ee11c5913ffd42 -Author: Ville Syrjälä -Date: Fri Nov 22 22:33:21 2013 +0200 - - lib: Add gem_sw_finish() - - Wrap DRM_IOCTL_I915_GEM_SW_FINISH into gem_sw_finish() - - Signed-off-by: Ville Syrjälä - -commit 725da6ee7458c5227a2bc9a1b686dad8f3c6d854 -Author: Ville Syrjälä -Date: Thu Nov 21 19:05:17 2013 +0200 - - rendercopy: Pass context to rendercopy functions - - rendercopy does the batch buffer flush internally, so if we want - to use it with multiple contexts, we need to pass the context - in from caller. - - v2: Modify rendercopy_gen8 as well - - Signed-off-by: Ville Syrjälä - -commit 3d371a7284798c96bb033a449acbad7cc29c2e29 -Author: Ville Syrjälä -Date: Fri Nov 22 23:46:32 2013 +0200 - - kms_cursor_crc: Fix crc readout after a subtest failure - - If a subtest fails, it'll leave the pipe CRC file open, which will - prevent subsequent subtests from opening the file. Make sure the file - is cloesed before trying to open it again. - - Signed-off-by: Ville Syrjälä - -commit e1e5856b3ce09e9d8b0899e10cf7e3ef724679d5 -Author: Ville Syrjälä -Date: Thu Nov 21 19:48:51 2013 +0200 - - lib: Fix pipe_crc->ctl_fd assert - - Use the correct fd in the assert(). - - Signed-off-by: Ville Syrjälä - -commit 6720dd4b2cb657705ccb31fd87d85cd6831ea2f2 -Author: Daniel Vetter -Date: Wed Nov 27 11:31:12 2013 +0100 - - tests: Document exec naming convention for execbuf related tests - - Signed-off-by: Daniel Vetter - -commit aa4ff912e3a7a84adcfc6bde9f6f2e9a4a1aaf82 -Author: Daniel Vetter -Date: Wed Nov 27 11:14:19 2013 +0100 - - tests: Document per-ring naming conventions - - Inspired by the recent pile of tests for the CS, which doesn't split - up the tests into per-ring subtests. - - Cc: bradley.d.volkin@intel.com - Signed-off-by: Daniel Vetter - -commit f6d9e160c9d7c76b37b49ce8918b055826806635 -Author: Paulo Zanoni -Date: Tue Nov 26 11:32:33 2013 -0200 - - tests/pm_pc8: add "resuming" state - - This one was missing. For some reason we never really detected it on - our test suite. I checked the Kernel source and now we should be fine. - - Signed-off-by: Paulo Zanoni - -commit 0df88f5e647a38b52b46d010c54f2594c98d8018 -Author: Paulo Zanoni -Date: Thu Nov 21 18:19:07 2013 -0200 - - tests/pm_pc8: try to reuse FBs when possible - - Instead of creating a new FB every time we need one, create a cache of - FBs and reuse whenever possible. That means we'll create at most two - FBs, and reuse them hundreds and hundreds of times. - - The kmstest_paint_test_pattern function takes about 1-2 seconds to - run, and we'll avoid it whenever we reuse the FB. - - This makes the time taken to run the modeset-lpsp-stress subtest go - from 2:29 to 1:29. - - A full "time ./pm_pc8 --quick" goes from 8:14 to 6:27. - - Signed-off-by: Paulo Zanoni - -commit 78227101e27471b81af69b54e2de203678243338 -Author: Paulo Zanoni -Date: Thu Nov 21 17:32:42 2013 -0200 - - tests/pm_pc8: try harder to reach PC8+ residencies - - If we want to actually reach PC8+ states, we need to properly - configure all the devices on the system to allow this. This function - will try to setup the things we know we need, but won't scream in case - anything fails: we don't know which devices are present on your - machine, so we can't really expect anything, just try to help with the - more common problems. - - Another reason for this commit is that I got tired of having to - readjust the runtime PM policies every time I reboot my machine. - - Signed-off-by: Paulo Zanoni - -commit e9363973b1fd973f562c101a58354e05ea2b48e4 -Author: Paulo Zanoni -Date: Thu Nov 21 15:09:58 2013 -0200 - - tests/pm_pc8: rename some subtests - - Due to copy/paste error, we had 3 subtests called gem-execbuf-stress. - - Signed-off-by: Paulo Zanoni - -commit 6de398888e718800bae0f8cceef0998fbcb0a8d3 -Author: Mika Kuoppala -Date: Wed Nov 20 16:58:17 2013 +0200 - - tests/gem_reset_stats: check non root access to reset_stats - - Getting global reset count needs to be tested with root and - non root access. - - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 2dd312cbb80be1d8c8a199248095db85eb85155d -Author: Mika Kuoppala -Date: Wed Nov 20 16:58:16 2013 +0200 - - tests/gem_reset_stats: stop rings after injecting hang - - To make driver report a simulated hang in dmesg. - - Suggested-by: Daniel Vetter - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 0afe006eace7042e41689215ef27c82ac39cfb51 -Author: Mika Kuoppala -Date: Wed Nov 20 16:58:15 2013 +0200 - - tests/gem_reset_stats: add support for BDW+ - - For BDW+, there BATCH_BUFFER_START is 3 * 32bits in length and - length needs to be encoded into the opcode. - - Suggested-by: Damien Lespiau - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit 4fd0458be217841203bb18ed36bda4211bf0cfdf -Author: Daniel Vetter -Date: Wed Nov 20 16:07:30 2013 +0100 - - tests/gem_reset_stats: More macros! - - Instead of freaking out about negating the skip condition and punting - I could have remembered that I've solved this already ... - - Signed-off-by: Daniel Vetter - -commit 3c55a7df578610b0a5af6c14a6222c8aacc4a523 -Author: Daniel Vetter -Date: Wed Nov 20 10:58:55 2013 +0100 - - tools/reg_dumper: Add FW_BLC regs - - Debugging watermark issues on gen2/3 without them is hard ... - - Signed-off-by: Daniel Vetter - -commit ff193614b29308373ff3a54266159e3e194455a2 -Author: Daniel Vetter -Date: Sun Nov 17 17:29:10 2013 +0100 - - tests/gem_reset_stats: Use macros a bit more - - Just demonstration really. - - Signed-off-by: Daniel Vetter - -commit 36786e4a04c988184d3c04984f8e4bf7276b0bb1 -Author: Damien Lespiau -Date: Fri Nov 15 07:03:33 2013 +0000 - - gitignore: Ignore gem_reset_stats - - Signed-off-by: Damien Lespiau - -commit b5bfdbb1adfc18a9259da727a8872bef3811ca21 -Author: Daniel Vetter -Date: Fri Nov 15 00:10:52 2013 +0100 - - tests: More bdw fallout - - This time misplaced parens. - - Signed-off-by: Daniel Vetter - -commit df5e880beaffe2ab214eba8cdf27d9459dd99ead -Author: Daniel Vetter -Date: Thu Nov 14 23:15:37 2013 +0100 - - tests: More bdw fallout - -commit f7abef6618ab5b8c9a0358f9b765f3445f9f6be4 -Author: Paulo Zanoni -Date: Thu Nov 14 14:53:15 2013 -0200 - - tests/pm_pc8: add --quick option - - Not meant to be used on the QA cycles, but by developers who just want - to quickly check things while doing development. Reduces the total - time from 27 minutes to 6 minutes on my machine. - - Signed-off-by: Paulo Zanoni - -commit 482654674674cff4cfde4e3b68a4ff5ac125db08 -Author: Paulo Zanoni -Date: Thu Nov 14 13:59:49 2013 -0200 - - tests/pm_pc8: add some more stress tests - - I was suspecting some problems just happen if we have a bigger wait - than the current ones we have, so add a new WAIT_EXTRA flag just to - see if the problems really happen. Also, add support for the wait - flags on the gem stress tests, and use them. - - Signed-off-by: Paulo Zanoni - -commit 4fa9dde799793001e16bb99c499b6ff25c5e7250 -Author: Paulo Zanoni -Date: Thu Nov 14 13:50:06 2013 -0200 - - tests/pm_pc8: remove compare_registers subtest - - It's not executed by default, and it's completely relying on Haswell - registers and on internal knowledge of how the Kernel is supposed to - work. Since we plan to test generic runtime PM on all supported - platforms, maintaining this test so it works on all those platforms - will be a pain. We already have some ideas on how to verify registers - that must stay at specific values from inside the Kernel, so let's - kill this test and wait until the proper Kernel code gets merged. - - Signed-off-by: Paulo Zanoni - -commit a8610a4776e9bee9bf3fc275febaf78e3ec38c98 -Author: Paulo Zanoni -Date: Thu Nov 14 13:40:52 2013 -0200 - - tests/pm_pc8: rename some variables - - Since we're not only testing PC8 anymore, we're resting "PM", rename - some variables from something_pc8 to something_suspend, just to make - it not-so-confusing. - - Signed-off-by: Paulo Zanoni - -commit 19c8d5f4ff887c55cb79b0417912ca137cf1b2e5 -Author: Paulo Zanoni -Date: Thu Nov 14 13:35:43 2013 -0200 - - tests/pm_pc8: fix debugfs-forcewake-user for PC8-only cases - - We don't wake up from forcewake when we only have PC8, but not runtime - PM, so make the test pass. - - Signed-off-by: Paulo Zanoni - -commit 63e4dafb3252c5ee658572181b2d7a06a3a66969 -Author: Paulo Zanoni -Date: Tue Nov 12 17:04:50 2013 -0200 - - tests/pm_pc8: check for PC8 status, not residency in most cases - - If you really want to reach the PC8+ states and consequently get PC8+ - residency, you need to properly configure all the devices on your - machine to allow PC8+, not just graphics. The current code for PC8 - checks for PC8+ residency everywhere, so if you have a machine that's - not properly configured you'll fail every test. OTOH, even if your - machine can't reach the PC8+ states, it will still try to enable and - disable PC8, so we can try to test the feature even if we're never - really reaching the PC8+ states. Also, if your machine does allow PC8+ - residencies, but some other driver/program decides to keep the machine - busy while you're running the test suite, you'll also get failures - which you shouldn't be getting. - - Based on the arguments above, I'm changing most of the subtests to - only check for the PC8 status reported by sysfs (enabled/disabled), - not check real PC8+ residency. I also added two tests that should - check for PC8+ residency, so we will stil be able to diagnose badly - configured machines. - - As a bonus, we won't sleep for full 5 seconds every time we expect PC8 - to be disabled: we'll just read i915_pc8_status, which quickly gives - the result we're expecting. Considering how many modeset stress - subtests we have in the program, we'll save a *lot* of time with this - change. - - Signed-off-by: Paulo Zanoni - -commit a4e96a95ca6468a7ece9fff1c8e1949691439ed4 -Author: Paulo Zanoni -Date: Tue Nov 12 13:24:38 2013 -0200 - - tests/pm_pc8: add support for runtime PM - - We try to detect if we have runtime PM or if we just have PC8. In case - there's runtime PM, the functions that wait will wait for the runtime - PM status reported by the sysfs file instead of waiting for PC8 - residencies to move. - - Signed-off-by: Paulo Zanoni - -commit e39f2dbf98a637fffcc0af98ff54ee296738b0ad -Author: Daniel Vetter -Date: Thu Nov 14 15:50:07 2013 +0100 - - tests/gem_cs_prefetch: Fix bdw damage - - v2: Fix more. - - Cc: Ben Widawsky - Signed-off-by: Daniel Vetter - -commit 2d1119dfc0b0e0187f8ee89e144a391f7ccfedd5 -Author: Daniel Vetter -Date: Mon Nov 11 23:04:11 2013 +0100 - - lib: adjust oom_score - - This way the igt test will always be killed first (hopefully), - preventing mayhem when one of the memory thrashing tests treatens to - take down the entire system. - - To avoid any burden on test writers we adjust the oom score on - drm_open, any of the fork helpers and subtest init. That should cover - everything. - - v2: Fix it up. - - Cc: Ben Widawsky - Signed-off-by: Daniel Vetter - -commit 4697cf4286f3ac3cc80744c3eac2c0579c215d6c -Author: Daniel Vetter -Date: Thu Nov 14 11:08:13 2013 +0100 - - NEWS: Make testing requirements official - - Signed-off-by: Daniel Vetter - -commit 217bd8d55e723d8bd6911d6c2ec8a9c42bdc8272 -Author: Chris Wilson -Date: Thu Nov 14 09:47:47 2013 +0000 - - tests/pm_pc8: Fix invalid pointer-to-integer casting - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71592 - Signed-off-by: Chris Wilson - -commit c37e9cf0c4bb7bae69693fa5d5d57cf30f8db87e -Author: Ben Widawsky -Date: Wed Nov 13 18:23:06 2013 -0800 - - gem_cs_prefetch: more gen8 integration fallout - - Signed-off-by: Ben Widawsky - -commit 9ef6769366222bc1c272336378d802737a5e9026 -Author: Ben Widawsky -Date: Wed Nov 13 13:28:17 2013 -0800 - - gem_evict_*: Fix batch lengths, broken on gen8 integration - - Signed-off-by: Ben Widawsky - -commit 1ff7427578eaf4fe472eb5424343e53ed283450e -Author: Mika Kuoppala -Date: Tue Nov 12 19:58:16 2013 +0200 - - tests: add gem_reset_stats - - v2: check the ioctl pad and flag parameters - - Signed-off-by: Mika Kuoppala - Signed-off-by: Daniel Vetter - -commit e046c31f45e5901e7301fc9bfa2eb8d08b133883 -Author: Daniel Vetter -Date: Tue Nov 12 12:18:33 2013 +0100 - - NEWS: Android.mk updates! - -commit 76c78c0aae0e31f11ed0fc860e64d437a687529d -Author: Oscar Mateo -Date: Tue Nov 12 11:50:45 2013 +0000 - - build: New Android makefiles - - These form the basis of the new Android build system. - - v2: As suggested by Daniel Vetter, modify compilation flags to - not error on return-type and not warn on sign-compare. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 25be105d7f0d9f657ce2adf2b4e659882fabb0eb -Author: Oscar Mateo -Date: Tue Nov 12 11:50:44 2013 +0000 - - lib/igt_display: workaround a name conflict in Android - - PLANE_A/PLANE_B are used by libdrm's i915_drm.h in Android. - - v2: Changes suggested by Daniel Vetter and Damien Lespiau: - - Pimp up comment with a FIXME. - - Reword commit message. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 235ff9cf34f37d7eb778d72acd298b0cd8c01ab5 -Author: Oscar Mateo -Date: Tue Nov 12 11:50:43 2013 +0000 - - lib/drmtest: Get the correct basename() under Android - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 5032e7bbdd342ac111ab2c57bf82b3dd4d26f208 -Author: Oscar Mateo -Date: Tue Nov 12 11:50:42 2013 +0000 - - build: Fix assorted compilation warnings - - As these files are compiled for every test, the warnings cluttered - the Android build completely. - - v2: As suggested by Daniel Vetter, drop some of the fixes and fix - the compilation flags instead. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit dce0d99a91b4be26c4cd07e7030615fdc46bf2c7 -Author: Oscar Mateo -Date: Tue Nov 12 11:50:41 2013 +0000 - - tests/gem_vmap_blits: Finish extracting gem_read - - It seems something escaped this commit: - - commit bd5cf9a07d17ce91dfaa3aa12d3f2c93815f0489 - Author: Daniel Vetter - Date: Tue Jan 10 15:37:53 2012 +0100 - - lib/drmtest: extract gem_read - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 7076ea1bd6ec56cd7c85541a5d2b1bcdeaee85db -Author: Oscar Mateo -Date: Tue Nov 12 11:50:40 2013 +0000 - - tests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid) - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 1cd6913608a02f1b38ee44a084875efb9a360e4b -Author: Oscar Mateo -Date: Tue Nov 12 11:50:39 2013 +0000 - - rendercopy: Remove rendercopy.c - - Move scratch_buf_write_to_png() to its only user, gem_render_copy.c. - This makes the cairo dependencies easier to handle from the Android - perspective, but if there is a good reason why this file exists I can - try to handle it differently. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 37f26d17b1add333bacefe12fe7c7c1514b18e82 -Author: Oscar Mateo -Date: Tue Nov 12 11:50:38 2013 +0000 - - lib: Move kms stuff from drmtest.c over to igt_kms.c - - This makes cairo dependencies easier to handle. Otherwise, we - would have to litter drmtest all over with "#ifndef ANDROID" - - Signed-off-by: Oscar Mateo - [danvet: Add missing _GNU_SOURCE to igt_kms.c and missing include to - intel_sprite_on.c] - Signed-off-by: Daniel Vetter - -commit 4c7d5a52a7f4d79061e6cbb4627df3c194958fff -Author: Oscar Mateo -Date: Tue Nov 12 11:50:37 2013 +0000 - - build: Move logic to tests/Makefile.am and away from Makefile.sources - - Makefile.sources is just a listing with all the sources, and the logic - to use these sources goes into either Makefile.am (automake) or - Android.mk (make). - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit d80c6bdedba451adff843295367ebcd3d5e3b0c7 -Author: Oscar Mateo -Date: Tue Nov 12 11:50:36 2013 +0000 - - build: Fix missing "\" in tests/Makefile.sources - - Noticed by Damien Lespiau. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit ea11d103e0617e33bce6f11328521d15b13422b0 -Author: Oscar Mateo -Date: Tue Nov 12 11:50:35 2013 +0000 - - build: list all test/tool/lib source files in their own Makefile.sources - - In this way, all source files are listed in Makefile.sources and included - from Makefile.am, thus enabling the reuse from Android makefiles. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit c50dd7c149a64b683977d14bc59262f70dda15fa -Author: Damien Lespiau -Date: Mon Nov 11 22:38:36 2013 +0000 - - gitignore: Ignore the newly introduced pm_psr - - Signed-off-by: Damien Lespiau - -commit 97e48cd619c4b201613ade0110f4db840a02007d -Author: Ben Widawsky -Date: Mon Nov 11 13:21:58 2013 -0800 - - gem_storedw_batches_loop: Fix for real this time - - Last patch to fix the breakage when adding gen8 had bugs in the reloc - offset, and size field. - - Signed-off-by: Ben Widawsky - -commit 4cc506f5eae66b812b7ad6e171524ff1d4f6feb4 -Author: Oscar Mateo -Date: Mon Nov 11 15:36:55 2013 +0000 - - tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1" - - Some shells do not understand "&>". For instance, my Ubuntu 12.04 - machine has /bin/sh pointing to dash, which makes a mess out of - "&>" (to the point that the helper processes cannot be killed). - - Reviewed-by: Damien Lespiau - Signed-off-by: Oscar Mateo - Signed-off-by: Damien Lespiau - -commit b76a411c86512bc13cc501e71e6a212e828ed142 -Author: Ben Widawsky -Date: Mon Nov 11 09:44:13 2013 -0800 - - gem_linear_blits: Fix blit command length - - Signed-off-by: Ben Widawsky - -commit 0d902cad5f95ec88c3925919215ef674ad38b398 -Author: Paulo Zanoni -Date: Fri Nov 8 19:33:08 2013 -0200 - - tests/pm_pc8: reorganize main function - - Split the tests into categories. There are too many tests, it's - getting harder to locate the ones we need. - - Signed-off-by: Paulo Zanoni - -commit c527a29325bb914ea994ba8d9b38668ac8a39798 -Author: Paulo Zanoni -Date: Fri Nov 8 19:19:35 2013 -0200 - - tests/pm_pc8: add some GEM tests - - These are more complete tests than the previous test_batch() one. We - test CPU/GTT mmaps, pread/pwrite and batch buffers. - - Signed-off-by: Paulo Zanoni - -commit 79670c54eb0345464ffc3b56a27a35bbaa40b539 -Author: Paulo Zanoni -Date: Fri Nov 8 19:03:24 2013 -0200 - - tests/pm_pc8: remove "batch" and "stress-test" subtests - - They use a bad BLT command and don't check its result. The next patch - will add proper GEM tests that contain commands that work and code - that checks if the command is really working. - - Signed-off-by: Paulo Zanoni - -commit 3775eae05165922585b5f5a1f34452d2ecbdac89 -Author: Paulo Zanoni -Date: Fri Nov 8 18:29:57 2013 -0200 - - tests/pm_pc8: add debugfs/sysfs tests - - They don't really exercise any particular special code path for PC8, - but the runtime D3 code will touch these code paths, so we'll need the - tests. - - Signed-off-by: Paulo Zanoni - -commit 0fbb8346466d1a5cf692dc7a20687fee2b92cd57 -Author: Paulo Zanoni -Date: Fri Nov 8 17:09:43 2013 -0200 - - tests/pm_pc8: add modeset-lpsp-stress - - It's the only one we were missing form the possible combinations. - - Signed-off-by: Paulo Zanoni - -commit 1bcae02e5c1486bfeeea674275fcd5c34bde3414 -Author: Paulo Zanoni -Date: Fri Nov 8 17:07:59 2013 -0200 - - tests/pm_pc8: extract i2c_subtest_check_environment - - Just to make it more organized and consistent with the other tests. - - Signed-off-by: Paulo Zanoni - -commit 2fd0eb53aa33662f44d6373c4562ba7cd4523400 -Author: Paulo Zanoni -Date: Fri Nov 8 17:05:00 2013 -0200 - - tests/pm_pc8: return void on test_i2c - - And do the assertion in the code line that actually verifies the - condition we need. Makes it easier to debug failed tests. - - Signed-off-by: Paulo Zanoni - -commit 514efb507d5bb1cd8774b25f4419c948b575a36b -Author: Paulo Zanoni -Date: Fri Nov 8 17:00:40 2013 -0200 - - tests/pm_pc8: move teardown_environment next to setup_environment - - So I can add/remove/verify code more easily. - - Signed-off-by: Paulo Zanoni - -commit ffc43fcbc0bcd4f7b15afa204723876e258e4bc4 -Author: Ben Widawsky -Date: Thu Nov 7 23:03:04 2013 -0800 - - gem_cpu_reloc: Fixed botched BLIT conversion - - Signed-off-by: Ben Widawsky - -commit 2c0fc4a2e43e4b7f1a5aacca37943f5259da4094 -Author: Ben Widawsky -Date: Thu Nov 7 23:05:01 2013 -0800 - - gem_evict_alignment: Skip on GEN8 for now - - Signed-off-by: Ben Widawsky - -commit 7c41331364ea2ea7a5c7c76c0b66bbc590eade60 -Author: Ben Widawsky -Date: Thu Nov 7 22:59:25 2013 -0800 - - gem_evict_everything: Fix broken blit generalization - - Signed-off-by: Ben Widawsky - -commit 1d9512f6ce136edc23b78cb1352ec2a54152a42b -Author: Daniel Vetter -Date: Fri Nov 8 07:37:57 2013 +0100 - - Revert "tests/gem_ctx_bad_exec: Check the errno, too" - - This reverts commit 4a6a59f314f61e1e4156bb13a65efabee31a76fc. - -commit 26d237cdc28d66674fbc72ea725b24c30d08e80d -Author: Ben Widawsky -Date: Thu Nov 7 21:00:55 2013 -0800 - - gem_storedw_batches_loop: Update for gen8 - - Signed-off-by: Ben Widawsky - -commit 5dbc2630363d1111fd8081d0e3bcb1084cfba7f4 -Author: Daniel Vetter -Date: Thu Nov 7 13:54:01 2013 +0100 - - tests/gem_overflow_reloc: Rework subtest enumeration - - Subtest names must be stable across all platforms for easier tracking. - Hence move the gen8+ check into the subtests, using igt_require. This - will auto-skip the tests on platforms where a given test doesn't apply. - - Also move the assignment of the relocation_type var outside of the - fixture block. Fixtures aren't run when enumerating subtests (so that - subtests can be enumerated on any platform, even without an intel gpu). - - So gcc has indeed been right with it's "potentially uninitialized" var - warning after all ... - - Signed-off-by: Daniel Vetter - -commit 4cf1d089ebc83ca21abbc9714bcebecf8a759714 -Author: Daniel Vetter -Date: Thu Nov 7 13:43:43 2013 +0100 - - tests/gem_reloc_overflow: Polish after Rafael's patch - - - use void* for generic pointer. - - Fix const usage. - - Shut up gcc about uninitizialized var. - - Be paranoid about the moved tests and make double-sure that the - batch would indeed work safe for the condition being tested. - - Signed-off-by: Daniel Vetter - -commit c537c23efc8173d6526236b6b311ac44c10a14af -Author: Rafael Barbalho -Date: Wed Nov 6 18:12:12 2013 +0000 - - tests/gem_reloc_overflow: Add gen8+ specifc tests - - Broadwell introduces 64-bit relocation addresses which add extra - corner cases. The test was refactored slightly with some tests that - were in the source offset tests were moved to the more generic reloc - test area. The source offset tests are now gen aware and called twice to - test both cpu & gtt relocation paths. In addition 2 new gen8+ test - were added to the test: - - * Relocation straddling page a page - * Insufficient space for a relocation at the end of the buffer. - - Signed-off-by: Rafael Barbalho - - Conflicts: - tests/gem_reloc_overflow.c - Signed-off-by: Daniel Vetter - -commit 5fab0b8aa7352525f72e0594f05c09272bfc1a79 -Author: Daniel Vetter -Date: Wed Nov 6 18:55:20 2013 +0100 - - NEWS: Remove spurious - - - Signed-off-by: Daniel Vetter - -commit 65cdba94bc49c7016adfc011198aafc6194c4717 -Author: Ben Widawsky -Date: Wed Nov 6 09:49:32 2013 -0800 - - NEWS: Restore the 1.4 release info - - I suck... - - Signed-off-by: Ben Widawsky - -commit a88cf4cbf1272e84b1a76b95da3e7a6eeb86065d -Author: Ben Widawsky -Date: Wed Nov 6 09:48:17 2013 -0800 - - NEWS: Broadwell will be in 1.6, not 1.5 - - Signed-off-by: Ben Widawsky - -commit 02ee89006842e62cf0e29f1830ab304c224def63 -Author: Ben Widawsky -Date: Wed Nov 6 09:36:27 2013 -0800 - - NEWS: Broadwell - - Signed-off-by: Ben Widawsky - -commit 1c5e1d230b26e8eb5017ccf2b409ee43821c58fb -Author: Damien Lespiau -Date: Fri May 31 15:31:33 2013 +0100 - - list-workarounds/bdw: Add Broadwell to the list of valid platorms - - Signed-off-by: Damien Lespiau - -commit d56697233699844db9262a9a056b62b24b69dd39 -Author: Mengdong Lin -Date: Sun Aug 25 23:07:22 2013 -0400 - - quick_dump/bdw: support Broadwell in device auto-detection - - This patch exposes is_broadwell() to python, to be used by device - auto-detection. - - Signed-off-by: Mengdong Lin - Signed-off-by: Ben Widawsky - -commit ee4318931fdf968f98f47dd5d6a019b497037d16 -Author: Mengdong Lin -Date: Thu Aug 15 23:58:21 2013 -0400 - - quick_dump/bdw: dump audio debug registers for Haswell and Broadwell - - A new file "audio_debug_haswell_plus.txt" is created to define audio - debug registers for Haswell and its successors like Broadwell. - - Signed-off-by: Mengdong Lin - Reviewed-by: Xingchao Wang - Signed-off-by: Ben Widawsky - -commit 0facfb2eb057c425fce21539d5cd25c3fe05eed8 -Author: Mengdong Lin -Date: Thu Aug 15 23:58:05 2013 -0400 - - quick_dump/bdw: dump audio configuration registers for Haswell and Broadwell - - A new file "audio_config_haswell_plus.txt" is created to define audio - configuration registers for Haswell and its successors like Broadwell. - - Signed-off-by: Mengdong Lin - Reviewed-by: Xingchao Wang - Signed-off-by: Ben Widawsky - -commit 4f1410d978ad4b184b61bfa0559cfd9c35f1aa0f -Author: Ben Widawsky -Date: Mon Feb 18 16:00:55 2013 -0800 - - quick_dump/bdw: Just basic stuff for now - - Just the interrupt registers for now. - - Signed-off-by: Ben Widawsky - -commit e35126d30ce6deda2b472498882195e37ecde81f -Author: Mengdong Lin -Date: Tue Aug 13 00:22:33 2013 -0400 - - intel_audio_dump/bdw: dump audio M CTS readback register - - This debug register provides test feedback of the audio M values (DP) - or CTS values (HDMI) - - Signed-off-by: Mengdong Lin - Reviewed-by: Xingchao Wang - Signed-off-by: Ben Widawsky - -commit 97e5cf6006077d2ea1b58b5d7993756e9ec1c8b4 -Author: Mengdong Lin -Date: Tue Aug 13 00:22:24 2013 -0400 - - intel_audio_dump/bdw: dump audio DP and DIP FIFO debug status - - Signed-off-by: Mengdong Lin - Reviewed-by: Xingchao Wang - Signed-off-by: Ben Widawsky - -commit f075c3c0688c8f2d38bf49691110934e1c2d2032 -Author: Mengdong Lin -Date: Tue Aug 13 00:22:14 2013 -0400 - - intel_audio_dump/bdw: dump audio chicken bit register - - This patch dumps this debug register and parse the data for Broadwell. - - Signed-off-by: Mengdong Lin - Reviewed-by: Xingchao Wang - Signed-off-by: Ben Widawsky - -commit 8535720b4c9e595316bd5cf172c680ed15c709f4 -Author: Mengdong Lin -Date: Tue Aug 13 00:21:57 2013 -0400 - - intel_audio_dump/bdw: dump debug registers for audio immediate commands - - This patch dumps debug registers to check audio immediate command, response - and status. - - The audio driver will fall back into immediate command mode if normal - communication between controller and codec is dead. - - Signed-off-by: Mengdong Lin - Reviewed-by: Xingchao Wang - [Ben: Small printf changes to remove compiler warning] - Signed-off-by: Ben Widawsky - -commit 69cc00b072198264a8a6e7b1e870fe0cbad34ce6 -Author: Mengdong Lin -Date: Wed Jul 17 13:29:17 2013 -0400 - - intel_audio_dump/bdw: add support for Broadwell - - This patch renames Haswell audio dump function and reuses it for Broadwell. - - Since Haswell, audio registers are moved from the south display engine to the - north display engine. And the audio register layout is same for Haswell and its - successors like Broadwell. - - Signed-off-by: Mengdong Lin - Signed-off-by: Ben Widawsky - -commit c82872b0193c38994d09f2b78fca03264d52e614 -Author: Damien Lespiau -Date: Wed Feb 27 14:51:48 2013 +0000 - - rendercopy/bdw: Add AUB annotations for states - - This will hopefully help debugging things. - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit 91e589724694c23db9669b987a9411b7ae152d0d -Author: Damien Lespiau -Date: Wed Feb 27 14:51:34 2013 +0000 - - rendercopy/bdw: Fix the original implementation - - For posterity, I've squashed these commits against Damien's request. - - rendercopy/gen8: Fix the include guards - - rendercopy/gen8: Update the 3DSTATE_MULTISAMPLE opcode - - The opcode has changed in BDW. - - rendercopy/gen8: Add the VF_TOPOLOGY state - - The primitive type has moved out of the 3DPRIMITIVE to its own state, - VF_TOPOLOGY. - - rendercopy/gen8: Fixup 3STATE_PS - - Update the state to the latest BSpec, in particular the thread count was - using a wrong shift and we were missing kernel2 offset. - - rendercopy/gen8: Update 3DSTATE_BASE_ADDRESS - - This state has seen its fields moved around a bit, follow the BSpec. - - rendercopy/gen8: Allocate 64 VUEs - - The simulator screams at us if we try to allocate less than that. - - rendercopy/gen8: Surface states have to be 64 bytes a aligned - - rendercopy/gen8: Vertical/horizontal align 2 does not exist any more - - So set them to 4. This should not matter with rendercopy (which is not - using compressed textures), but it makes the simulator moan. - - rendercopy/gen8: Make sure the vertex buffer is 8 bytes aligned - - rendercopy/gen8: Adjust 3DSTATE_VERTEX_BUFFERS for gen8 - - The address of the buffer is now on 48 bits. Also the size was computed - as offset + size where the field is really the size of the buffer - itself, not the end address. - - rendercopy/gen8: Update the SF/SBE states for gen8 - - gen8 has a few changes around those states and a new ones RASTER and - SBE_SWIZ. - - rendercopy/gen8: Add the PS_EXTRA and PS_BLEND states - - rendercopy/gen8: Fix building with DEBUG_RENDERCOPY defined - - The forward declaration was missing the final ';'. Let's move the whole - function at the top instead. - - rendercopy/gen8: Update the PS and CONSTANT_PS states - - rendercopy/gen8: Fix the red channel selection - - Make it output red. - - rendercopy/gen8: Update the write -1 shader - - With the latest assembler changes from Haihao. - - rendercopy/gen8: Remove blit.g8a - - There is no diff between this file and blig.g7a. Remove it. - - rendercopy/gen8: Fix the surface relocation offset - - The surface base address is now at dwords 8/9 so the relocation has to - mirror the change. - - rendercopy/gen8: Add the VF_INSTANCING state - - Should work without, but doesn't hurt to add it. - - rendercopy/gen8: Set the Attribule enable field in PS_EXTRA - - When the SF is set up to output some attributes, the pixel shader also - have to be told there's attributes to care about. - - rendercopy/gen8: Set the force bits to read URB offset/length - - If we want to override the URB offset/length in the SBE state itself, we - need to set the force bits on (new in gen8) - - Signed-off-by: Damien Lespiau - Acked-by: Kenneth Graunke - Signed-off-by: Ben Widawsky - -commit 3f0714a8607fb9b735ef8b16e0e1d1b308381a04 -Author: Damien Lespiau -Date: Wed Feb 27 14:51:33 2013 +0000 - - rendercopy/bdw: Add gen8_render.h to the file list - - So it gets distributed with make dist. - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit 3edfff16cde0033fbec3c2deb390212acff15d6d -Author: Jesse Barnes -Date: Wed Feb 27 14:51:32 2013 +0000 - - rendercopy/bdw: Initial gen8 rendercopy - - Signed-off-by: Jesse Barnes - Signed-off-by: Ben Widawsky - -commit 66783e4c4f8b417e2f493e668cc4cac4ebda51a3 -Author: Zhao Yakui -Date: Tue Apr 9 09:59:16 2013 +0800 - - assembler/bdw: Add the DATA_PORT_CACHE1 shared function for Gen8+ - - This is required to send some messages to data port in GPU shader. - For example: media_block_write message. - - Signed-off-by: Zhao Yakui - Reviewed-by: Kenneth Graunke - Signed-off-by: Ben Widawsky - -commit 88e5f1fdf847a0ce284b8a01ff2cf3fb36e2b07c -Author: Zhao Yakui -Date: Tue Apr 9 09:59:15 2013 +0800 - - assembler/bdw: Add the support of align1 register-indirect addressing mode on Gen8 - - Otherwise it can't compile the following GPU shader that uses the - register-indirect addressing mode. - >add.sat (16) r[a0.5,0]<1>:uw r[a0.5,0]<16;16,1>:uw 0x0080:uw - >add.sat (16) r[a0.5,32]<1>:uw r[a0.5,32]<16;16,1>:uw 0x0080:uw - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - -commit 60c9b41e11bf4a3ea4935bd30f5c169ca24de06d -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:13 2013 +0800 - - assembler/bdw: SEND instruction - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit 3d8d094efec8cd6efbcead9c2fd54067e1a83223 -Author: Ben Widawsky -Date: Fri Aug 16 15:24:25 2013 -0700 - - assembler/bdw: Small cleanup - - This was originally part of: - - commit 62298329350b965e4bbfc558e5a4b1b3646742ea - Author: Xiang, Haihao - Date: Wed Aug 14 14:21:16 2013 -0700 - - assembler: error for the wrong syntax of SEND instruction on GEN6+ - - I merged that patch separately, but this tiny hunk was leftover. In - order to not muck in changing too much history, I am leaving this as a - discrete patch, but with the changed commit message - - Signed-off-by: Ben Widawsky - -commit bf05bd55310a1cde8efb835d4352c9f7c4fbcb60 -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:11 2013 +0800 - - assembler/bdw: Check & Refinement Engine message - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit b6a33bdcce9dd3a9c55d9077b380f0d5ec6d0da3 -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:10 2013 +0800 - - assembler/bdw: Video Motion Estimation(VME) message - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit bf003ea63434e6acc91b7c0feec6aa2084983a16 -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:09 2013 +0800 - - assembler/bdw: Thread Spawn message - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit 01c9654a65460eb6058b9060894a6e0e08ac2c80 -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:08 2013 +0800 - - assembler/bdw: Data port message - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit 9d0287c252cb634db6edef990192cf77d2e120e6 -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:07 2013 +0800 - - assembler/bdw: Set thread switch for multiple branch instructions - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit 216163b44d2285705d1af1db405be94d69a27fef -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:06 2013 +0800 - - assembler/bdw: Set jip/uip offsets used by flow control instructions - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit 2df4d3115af706c9e01b2d7ddb7b957239bfdc85 -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:05 2013 +0800 - - assembler/bdw: Disable mask control for advanced mode - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit 220f165008469c943959cd9ac4958432e4d24d64 -Author: Xiang, Haihao -Date: Fri Feb 22 11:14:04 2013 +0800 - - assembler/bdw: Set math function - - Signed-off-by: Xiang, Haihao - Signed-off-by: Ben Widawsky - -commit 9cf8e1b79c9430171f3e627b298bf5e0f4f65c82 -Author: Damien Lespiau -Date: Tue Feb 5 11:34:10 2013 +0000 - - assembler/bdw: Use gen8_set_exec_size() to set the execution size - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit f9e74fb49464b64ff9321e04e60dba40a7bc34b5 -Author: Damien Lespiau -Date: Thu Jan 31 18:25:45 2013 +0000 - - assembler/bdw: Preliminary gen8 send & msgtarget support - - Still some work needed there, but enough for rendercopy. - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit bc3bf098a98333aa00290663d7aec2e08270fc58 -Author: Damien Lespiau -Date: Thu Jan 31 15:31:27 2013 +0000 - - assembler/bdw: Add the start of a gen8 disassembler - - Directly taken from Mesa. - - v2 (Ben): Updated copyright - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit 42d8d57c8c57232f6da4c47a03a5d9599976fa98 -Author: Damien Lespiau -Date: Thu Jan 31 01:55:48 2013 +0000 - - assembler/bdw: Make the validation functions take a brw_program_instruction - - This allows to use the same functions to validate operands on gen8 for - now. - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit af4d37de38f2ea0304b9618fbe8d85733663a6c8 -Author: Damien Lespiau -Date: Thu Jan 31 02:16:08 2013 +0000 - - assembler/bdw: Support some basic gen8 intructions - - We should now support alu2 intructions with direct register addressing. - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit c3b36592af100672c9b52bdb141e38b7501a658b -Author: Damien Lespiau -Date: Wed Jan 30 17:19:57 2013 +0000 - - assembler/bdw: Add gen8_instruction from mesa - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit f57f55e4daf2ef9c60242f22134f0f4e06117ace -Author: Ben Widawsky -Date: Wed Oct 9 15:51:34 2013 -0700 - - tests/bdw: Port storedw_loop_vebox to gen8 - - I chose not to implement this in the same way as Zhao Yakui because I - was lazy. - - Signed-off-by: Ben Widawsky - -commit 50a52f3ada8c52c584c23d107bf96fa34a47b46e -Author: Zhao Yakui -Date: Tue Apr 9 09:29:19 2013 +0800 - - tests/bdw: Port storedw_loop_blt to gen8 - - The code is from the storedw_loop_render. - - v2 (by Ben): Flush on the correct ring - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - -commit 6a2d5059ff2ee3a6a999465b40a89e0c43d7fc12 -Author: Zhao Yakui -Date: Tue Apr 9 09:29:18 2013 +0800 - - tests/bdw: Port storedw_loop_bsd to gen8 - - The code is from the storedw_loop_render. - - v2 (by Ben): Flush on the correct Ring - - Signed-off-by: Zhao Yakui - Signed-off-by: Ben Widawsky - -commit 636f726b8030e2aec831193de25032d817267452 -Author: Damien Lespiau -Date: Thu Feb 14 15:32:33 2013 +0000 - - tests/bdw: Port storedw_loop_render to bdw - - Signed-off-by: Damien Lespiau - Reviewed-by: Jesse Barnes - Signed-off-by: Ben Widawsky - -commit 3aad2ac83c76e8e05ac91d8b7dab465556ef9575 -Author: Ben Widawsky -Date: Tue Oct 8 19:48:35 2013 -0700 - - tests/bdw: pwrite_pread - - support gen8 style blits - - Signed-off-by: Ben Widawsky - -commit d3480229341b78952dc1558dd8992d0f12f6998b -Author: Ben Widawsky -Date: Wed Oct 9 08:41:52 2013 -0700 - - tests/bdw: gem_linear_blits - - support gen8 style blits - - Signed-off-by: Ben Widawsky - -commit adc5a41f2b26c9c86b4e31d3fa90d95bceece8cf -Author: Ben Widawsky -Date: Wed Oct 9 08:41:52 2013 -0700 - - tests/bdw: gem_pin - - support gen8 style blits - - Signed-off-by: Ben Widawsky - -commit eb89ce7a7e3c54961025f19093ef79fd677a94b6 -Author: Ben Widawsky -Date: Wed Oct 9 08:41:52 2013 -0700 - - tests/bdw: gem_exec_blt - - support gen8 style blits - - Signed-off-by: Ben Widawsky - -commit 91f9e19fcd8df9cd23f54b92db83ecfffcaf47bf -Author: Ben Widawsky -Date: Wed Oct 9 08:41:52 2013 -0700 - - tests/bdw: gem_evict_* - - support gen8 style blits - - Signed-off-by: Ben Widawsky - -commit 6fa529ecd6055db55bc83a56cc83025b3f7dcfd3 -Author: Ben Widawsky -Date: Tue Oct 8 18:15:21 2013 -0700 - - tests/bdw: gem_cpu_reloc - - support gen8 style blits - - Signed-off-by: Ben Widawsky - -commit 3e2937bd99a2c01fb303f68c7384fc8addd337ba -Author: Ben Widawsky -Date: Tue Oct 8 17:38:43 2013 -0700 - - tests/bdw: gem_exec_faulting_reloc - - support gen8 style blits - - Signed-off-by: Ben Widawsky - -commit f4dfa37e8578419b94a7c84fbcea7d4b70aa68b9 -Author: Ben Widawsky -Date: Tue Oct 8 15:02:07 2013 -0700 - - bdw: Update obvious missing blit support - - This provides a macro that allows us to update all the arbitrary blit - commands we have stuck throughout the code. It assumes we don't actually - use 64b relocs (which is currently true). This also allows us to easily find - all the areas we need to update later when we really use the upper dword. - - This block was done mostly with a sed job, and represents the easier - in test blit implementations. - - v2 by Oscar: s/OUT_BATCH/BEGIN_BATCH in BLIT_COPY_BATCH_START - - CC: Chris Wilson - Signed-off-by: Ben Widawsky - Signed-off-by: Oscar Mateo - -commit 26f09a91897f6ad66b8fb8e0e5afb4c95954fbd2 -Author: Damien Lespiau -Date: Thu Feb 14 15:32:32 2013 +0000 - - bdw: Add gen8 specific instdone bits - - Signed-off-by: Damien Lespiau - Reviewed-by: Jesse Barnes - Signed-off-by: Ben Widawsky - -commit 295137046a353ce43a0eff6b665eb1c63dc6145c -Author: Damien Lespiau -Date: Thu Feb 14 15:32:31 2013 +0000 - - bdw: Add gen8 to intel_gen() - - Signed-off-by: Damien Lespiau - Reviewed-by: Jesse Barnes - Signed-off-by: Ben Widawsky - -commit 068c21b56b710e20215e2c2e515ac072b6affb9c -Author: Damien Lespiau -Date: Thu Feb 14 15:32:30 2013 +0000 - - bdw: Add gen8 to the IS_9XX() macro - - Signed-off-by: Damien Lespiau - Reviewed-by: Jesse Barnes - Signed-off-by: Ben Widawsky - -commit a8221a53ecd295747c00f41b1cd6dbd15eec6b93 -Author: Ben Widawsky -Date: Mon Dec 3 11:36:46 2012 -0800 - - pciid/bdw: Add Broadwell PCI ids - - Signed-off-by: Ben Widawsky - -commit f20ac4c8a10995d47a0bd853b3436e8427b58bff -Author: Ben Widawsky -Date: Tue Dec 4 08:38:46 2012 -0800 - - chipset: IS_I9XX macro - - This isnt useful in IGT, but it will allow us to keep the merge process - with libdrm simpler. - - Signed-off-by: Ben Widawsky - -commit 41b5fbfd60286fe8052a4b8d5eb5e315118282bb -Author: Rodrigo Vivi -Date: Wed Nov 6 13:06:11 2013 -0200 - - bump version to 1.5 and add the release date - - Signed-off-by: Rodrigo Vivi - -commit ad648d9debf4c2a751b6d240cfed9da8391913af -Author: Rodrigo Vivi -Date: Tue Oct 1 15:12:37 2013 -0300 - - tests: pm_psr - - Check on debugfs if PSR is supported by panel and matching all conditions in - hardware. In this case PSR must be enabled and performance counting increasing - - v2: check if performance counter is really increasing. - v3: respect new naming convention - - Signed-off-by: Rodrigo Vivi - -commit 27f1a7dd4bf67cd0fc892e9de3254a65f2c48110 -Author: Daniel Vetter -Date: Wed Nov 6 15:06:15 2013 +0100 - - NEWS: drop_caches improvements - - Signed-off-by: Daniel Vetter - -commit d9381c8a6629a82cb27bfcc4fc29861810fe35f1 -Author: Jesse Barnes -Date: Tue Nov 5 07:44:20 2013 -0800 - - quick_dump/vlv: add DPIO_CTL to the dump - - Signed-off-by: Jesse Barnes - -commit aa252d0e009b8c94ff875a69a4ca3640d1a5c1c9 -Author: Oscar Mateo -Date: Tue Nov 5 14:15:19 2013 +0000 - - lib/drmtest: Retire requests via drop caches after gem_quiescent_gpu - - This helps make sure that the GPU is really quiescent by getting - rid of any residual stuff. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 4a6a59f314f61e1e4156bb13a65efabee31a76fc -Author: Daniel Vetter -Date: Tue Nov 5 11:56:50 2013 +0100 - - tests/gem_ctx_bad_exec: Check the errno, too - - Signed-off-by: Daniel Vetter - -commit 466da453aee6bc6218b5f7ebf22223c269c176b7 -Author: Oscar Mateo -Date: Tue Nov 5 10:57:31 2013 +0000 - - gem_flink_race: Assure no pending requests before object counting - - Same thing that was done for prime_self_import. - - v2: Move igt_drop_caches_set() call inside get_object_count() to make - it clearer why we want this. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit ece21fa86502352a251d313dc22b325ac57f2ee4 -Author: Oscar Mateo -Date: Tue Nov 5 10:56:24 2013 +0000 - - prime_self_import: Assure no pending requests before object counting - - We don't want a previously used object to be freed in the middle of a - before/after object counting operation (or we would get a "-1 objects - leaked" message). We have seen this happening, e.g., when a context - from a previous run dies, but its backing object is alive waiting for - a retire_work to kick in. - - v2: Use igt_debugfs facilities for drop cache. - v3: Move igt_drop_caches_set() call inside get_object_count() to make - it clearer why we want this. - - Signed-off-by: Oscar Mateo - Cc: Ben Widawsky - Signed-off-by: Daniel Vetter - -commit eeaf013214698c62a99ff9a83764f1369acd40b0 -Author: Daniel Vetter -Date: Sun Nov 3 11:28:50 2013 +0100 - - NEWS: Roll in updates. - -commit 682b674a673da911c4fa0526596877a28d358471 -Author: Daniel Vetter -Date: Sat Nov 2 12:42:21 2013 +0100 - - tests: establish core_ prefix - - Signed-off-by: Daniel Vetter - -commit 51dc087864c385ebd469c2764b60b40363fbe022 -Author: Daniel Vetter -Date: Sat Nov 2 12:35:44 2013 +0100 - - tests: Use kms_ prefix a bit more - - I was a bit on the fence about the basic pipe CRC test since that - doesn't really test kms, but debug infrastructure in debugfs. - - Otoh running this one for a full kms testrun is always good, to make - sure that all the other (real) CRC based tests work sanely. - - Signed-off-by: Daniel Vetter - -commit 5738f1952d8b62bb2dea643ae8cfa3c308a45797 -Author: Daniel Vetter -Date: Sat Nov 2 12:27:24 2013 +0100 - - tests: establish pm_ prefix - - Imo power management, power consumption and performance are tightly - enough coupled that we can throw them all into one bin. - - Signed-off-by: Daniel Vetter - -commit c32032111aa701061acb7c3247b6cf7696272501 -Author: Daniel Vetter -Date: Sat Nov 2 12:22:37 2013 +0100 - - tests: estbalish drv_ prefix - - Signed-off-by: Daniel Vetter - -commit d983f9934513740f72bd6f9e3ad1007e60435aec -Author: Daniel Vetter -Date: Sat Nov 2 12:17:49 2013 +0100 - - tests: Start to document naming conventions - - Just a start and we need more work here. Some follow-up patches will - clear up some of the historical confusion. - - While at it rename the pc8 "basic" test to "rte". - - Signed-off-by: Daniel Vetter - -commit 66c46ecc80ab16a90ed3dd845fa68a58323622af -Author: Daniel Vetter -Date: Sat Nov 2 12:54:35 2013 +0100 - - Update .gitignore a bit - - - Ignore build-aux/ - - Cleanup ignores for assembler/ - -commit af9d1b5cdb4cc506a7f171a49d1103998b5a2f9e -Author: Daniel Vetter -Date: Mon Nov 4 18:11:29 2013 +0100 - - lib: drop return value from igt_drop_caches - - No one actually cares, everyone expects it to just work. - - Signed-off-by: Daniel Vetter - -commit 5f0ab94c3fca1437f10812e88136f82c3396a99e -Author: Oscar Mateo -Date: Mon Nov 4 16:30:47 2013 +0000 - - lib: Add igt_drop_caches_set() - - This is basically a "drop cache" interface to the igt_debugfs - facilities. Also, update existing users. - - Signed-off-by: Oscar Mateo - Cc: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit a97402e89ac492e2cbdd4b194638a7c0e898a4a3 -Author: Oscar Mateo -Date: Mon Nov 4 16:30:46 2013 +0000 - - tests: Fix "-thrashing" and "-thrash-inactive" distinction - - A typo in the relocation tests made both sub-tests perform the - same action: drop *all* caches. - - Signed-off-by: Oscar Mateo - Signed-off-by: Daniel Vetter - -commit 163d85d5f0c4e8dfecb93c3a01c7f90da744aa79 -Author: Daniel Vetter -Date: Fri Nov 1 22:18:20 2013 +0100 - - tests: igt_no_subtest - - Yet another check for the library. - - Signed-off-by: Daniel Vetter - -commit 6d73fdbfd2d8944702459f7412790aab32677c48 -Author: Daniel Vetter -Date: Fri Nov 1 18:31:59 2013 +0100 - - tests: Add a Makefile comment about the expected failures in igt_ tests - - Signed-off-by: Daniel Vetter - -commit 8f718b1cd80b13d9044956a5b19668faf4320a52 -Author: Daniel Vetter -Date: Thu Oct 31 17:05:28 2013 +0100 - - tests: Add a test template - - Requested by Paulo. - - Signed-off-by: Daniel Vetter - -commit 071e9ca1ca4424ba35edec0246918efdd0528d76 -Author: Daniel Vetter -Date: Thu Oct 31 16:23:26 2013 +0100 - - lib: add igt_main macro - - In the past new testcases with subtest often forgot to add the call to - igt_exit at the end of their main() function. That is now caught with - a bit more obnoxious asserts, but it's still a nuissance. - - This little igt_main macro takes care of that (and also of calling the - subtest machinery initialization code correctly). - - If no one objects I'll roll this out for all the simple cases (i.e. - those tests that don't have additional argv parsing on top of the - subtest machinery). - - v2: Roll it out across the board. - - Signed-off-by: Daniel Vetter - -commit 223a61e12e119d96484ed05c563d1781fd613a4e -Author: Daniel Vetter -Date: Thu Oct 31 17:16:33 2013 +0100 - - lib: make igt_install_exit_handler never fail - - Most callers didn't bother checking, so just move the asserts into - the function itself. - - Signed-off-by: Daniel Vetter - -commit 1f0cf2df85ca3f9d900b21db9c8744a99e8f60a0 -Author: Daniel Vetter -Date: Thu Oct 31 17:02:41 2013 +0100 - - lib: make igt_set_vt_graphics_mode never fail - - All tests agree that this is a letal failure, so no point - to pass it back to callers. - - Also add some igt_require calls for the drm_fd where I've - noticed that it's missing. - - Signed-off-by: Daniel Vetter - -commit 0369fe19b8b8e19e0815361b5187eba81cb2d71a -Author: Daniel Vetter -Date: Thu Oct 31 16:09:46 2013 +0100 - - lib: consolidate pipe crc exit handler - - No need to sprinkle this all over: - - exit handlers will only be registered once - - they're always called when exiting, so no need to explictly call - them. - - This allows us to hide all the pipe crc cleanup in the library. - - Cc: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit 43def94f3213634c2c798049cb17efc14801a9ed -Author: Daniel Vetter -Date: Thu Oct 31 16:06:40 2013 +0100 - - tests/kms_cursor_crc: rework to auto-skip connectors - - Cc: Ville Syrjälä - Signed-off-by: Daniel Vetter - -commit 8bb5730d28122fe5c142815f1ad32c351bf36cfe -Author: Daniel Vetter -Date: Thu Oct 31 15:37:05 2013 +0100 - - tests/debugfs_pipe_crc: set mode before creating CRC helper - - Otherwise the automagic skipping for DP ports on gmch platforms - won't work. - - v2: We also need to just skip that connector, not the entire subtest. - - kms_cursor_crc still needs to be updated. - - Cc: Damien Lespiau - Cc: Ville Syrjälä - Signed-off-by: Daniel Vetter - -commit 842007154da76dc2684077a4080c875bb3068f32 -Author: Daniel Vetter -Date: Thu Oct 31 14:02:44 2013 +0100 - - tests: use "auto" pipe CRC source - - Makes stuff work on DP ports on gmch platforms automatically. - - Cc: Damien Lespiau - Signed-off-by: Daniel Vetter - -commit 0b51de8dd02dc2502fa0614c3a29959a066584cc -Author: Daniel Vetter -Date: Fri Nov 1 18:29:33 2013 +0100 - - lib: add more self-tests around the igt_exit checks. - - Signed-off-by: Daniel Vetter - -commit e14596a6d074c5e79343633bf3c21a2f2961269d -Author: Daniel Vetter -Date: Fri Nov 1 18:21:08 2013 +0100 - - lib: fix igt_exit assert when only listing subtests. - - Ooops. Reported by Paulo. Also add a new testcase for make check to - make sure this actually works. - - Signed-off-by: Daniel Vetter - -commit 9e21c255e74128a16ef5c2dd4b1903d1d2c417eb -Author: Damien Lespiau -Date: Fri Nov 1 16:25:10 2013 +0000 - - lib: Don't forget to close the pipe ctl fd in igt_pipe_crc_reset() - - Signed-off-by: Damien Lespiau - -commit b1945f8c46c1305dd882241711471dbea90f0c2b -Author: Damien Lespiau -Date: Fri Nov 1 15:47:42 2013 +0000 - - gitignore: Ignore recently introduced tools and tests - - Signed-off-by: Damien Lespiau - -commit bd0aa100ca438fa68cf07dc55ec6dbfe7391ba6c -Author: Paulo Zanoni -Date: Mon Oct 21 11:45:41 2013 -0200 - - module_reload: remove snd_hda_intel - - The audio driver uses the power well provided by our driver, so on - Haswell we can't "rmmod i915" if we don't "rmmod snd_hda_intel" first. - - The problem with removing snd_hda_intel is that we also need to kill - its users. On the specific machine I tested, the only user seem to be - alsactl, but on other machines this may change. IMHO we should leave - the "kill user space" step to whoever is running the script, but - Daniel asked me to put it here so we have a better chance of Just - Working on QA's machines. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70336 - Requested-by: Daniel Vetter - Signed-off-by: Paulo Zanoni - -commit 3c6a7e780b08cf7cf9e7700a2a882014f947a795 -Author: Ville Syrjälä -Date: Thu Sep 19 18:14:54 2013 +0300 - - Add VGA register read/write tools - - Signed-off-by: Ville Syrjälä - -commit 164b540936b6cc6d67151793efdc6261975cadfc -Author: Ben Widawsky -Date: Thu Oct 31 14:16:41 2013 -0700 - - debugfs_pipe_crc: skip on simulation - - As with other display tests, they're not working (and in this case, - cause hangs). - - Signed-off-by: Ben Widawsky - -commit 2addb2744f2373cd327a8633330bf27fd11ce621 -Author: Paulo Zanoni -Date: Tue Oct 29 14:02:43 2013 -0200 - - tests/pc8: remove some printfs - - They pollute the output, which makes it harder to see which tests - failed or succeeded. - - Signed-off-by: Paulo Zanoni - -commit b6645ee2e27beb2d8e69402611938c288ab35a47 -Author: Paulo Zanoni -Date: Tue Oct 29 11:14:50 2013 -0200 - - tests/pc8: clarify modeset_subtest arguments - - My tiny little brain can't properly process 3 unnamed boolean - arguments. - - Signed-off-by: Paulo Zanoni - -commit abb334061763652eec274831cda87dab9f8f1d15 -Author: Paulo Zanoni -Date: Tue Oct 29 11:00:45 2013 -0200 - - tests/pc8: add modeset -stress-no-wait tests - - Used to trigger a racing condition between mode setting and - enabling/disabling PC8. The modeset-lpsp-stress-no-wait test should - fail on Kernels without the fix I just wrote today. - - Signed-off-by: Paulo Zanoni - -commit 7a5275f8a5a5768da038c87efd344c65302dfc93 -Author: Paulo Zanoni -Date: Mon Oct 28 19:11:31 2013 -0200 - - tests/pc8: add modeset-lpsp and modeset-non-lpsp - - The goal of these tests is to exercise the combination of power well - enabling/disabling and PC8 enabling/disabling. The modeset-non-lpsp - test exposes a silent bug on the current code that can just be - detected with the Runtime D3 patches. The Kernel patch that fixes the - bug will add a WARN to unmute it on the PC8-only case. - - Signed-off-by: Paulo Zanoni - -commit 87cf5571fc206f6d87195d574b2ec2092e0c2b1f -Author: Ben Widawsky -Date: Tue Oct 29 20:01:43 2013 -0700 - - gem_suspend: Skip on simulation - - Simulation has proven flaky across both reset, and s3/4 - - Signed-off-by: Ben Widawsky - -commit 5382aca1afb33614270c536835e3da61b4e2d123 -Author: Ben Widawsky -Date: Tue Oct 29 20:01:14 2013 -0700 - - gem_close_race: Fix linker flags - - Seems the -lpthread was missed in - commit 8f771f3facae133bb72216fa05c74bc817920b6d - Author: Chris Wilson - Date: Tue Oct 29 14:21:29 2013 +0000 - - gem_close_race: Also test random closing of active fd - - Signed-off-by: Ben Widawsky - -commit 8f771f3facae133bb72216fa05c74bc817920b6d -Author: Chris Wilson -Date: Tue Oct 29 14:21:29 2013 +0000 - - gem_close_race: Also test random closing of active fd - - Signed-off-by: Chris Wilson - -commit 5d24a67c1b885084e0f0d51631ed0c5227bcb112 -Author: Daniel Vetter -Date: Tue Oct 29 11:29:00 2013 +0100 - - lib/drmtest: Scream harder when igt_exit isn't called for subtest tests - - We really need this since otherwise the magic return value handling - for running testcases with piglit (or on QA's validation - infrastructure) doesn't work properly. - - We need to be careful though to only install this check on success. - - See also the previous commits to sprinkle igt_exit() calls over all - the tests that missed it. - - Signed-off-by: Daniel Vetter - -commit 780807099a482fdcbaea40af7117127b6d92beae -Author: Daniel Vetter -Date: Tue Oct 29 11:15:43 2013 +0100 - - tests: Use igt_exit for tests with subtest - - Signed-off-by: Daniel Vetter - -commit ccb1b5888dd18a8227a4e09a5674abca15931c87 -Author: Chris Wilson -Date: Tue Oct 29 09:25:44 2013 +0000 - - gem_close_race: Bump the workload - - Emit more work per client and many more clients in order to increase the - chance of racing i915_gem_release() and i915_gem_retire_requests() - -commit 51783fc7f9aacd20f13bd7a12c5eb9194176ab14 -Author: Chris Wilson -Date: Tue Oct 29 08:38:30 2013 +0000 - - gem_close_race: Tidy up call to execbuffer - - Pass the right pointer to the execlist would be a good start. - - Signed-off-by: Chris Wilson - -commit 7b8784dccf303c4fd9c6a1c2e3f9fae7d00fde2f -Author: Daniel Vetter -Date: Tue Oct 29 07:47:33 2013 +0100 - - tests/kms_cursor_crc: Use igt_exit - - Otherwise the exit codes are all bogus. - - Signed-off-by: Daniel Vetter - -commit 020600b77dfc179d99bb3d088927dcdf6d432cfe -Author: Damien Lespiau -Date: Thu Oct 24 15:27:12 2013 +0100 - - tests: Convert the ctx test to use render nodes when possible - - Signed-off-by: Damien Lespiau - -commit d71ecdbf5de0bb95551c6a5def4d42e85b4d6616 -Author: Damien Lespiau -Date: Thu Oct 24 15:21:59 2013 +0100 - - tests/gem_render_copy: Use render nodes - - Signed-off-by: Damien Lespiau - -commit 69c200b0bb39bb585f46fa5c779c97166779cd93 -Author: Damien Lespiau -Date: Thu Oct 24 15:19:32 2013 +0100 - - lib: Add a drm_open_any_render() that will try to use render nodes - - I was fedup with having to run my tests as root and not being able to - use my usual setup for tests that only exercise the GT part of the GPU. - - Render nodes to the rescue! - - Signed-off-by: Damien Lespiau - -commit 8329acb752721ad93dab70624b136f1befd4be3f -Author: Damien Lespiau -Date: Thu Oct 24 15:04:26 2013 +0100 - - lib: Close non intel fds in drm_get_card() - - When going through card%u devices, close the ones that we were able to - open but weren't intel devices. - - Signed-off-by: Damien Lespiau - -commit 949ce5b8a1054fcc1c375ee4b801c291483e2005 -Author: Damien Lespiau -Date: Thu Oct 24 14:08:17 2013 +0100 - - lib: Remove stale comment - - Signed-off-by: Damien Lespiau - -commit 90ecf062d10a3ed1bb08cb887aea78b385072584 -Author: Chris Wilson -Date: Mon Oct 28 09:10:46 2013 +0000 - - tests: Add gem_close_race - - The intention is to exercise #70784. Yet the first challenge is make the - test suite happy. - -commit 37c02cfa5c4ff2fa6dd833efdcf880416139d096 -Author: Damien Lespiau -Date: Tue Oct 22 15:03:48 2013 +0100 - - gem_render_linear_blits: Remove aub dump support - - It's much easier to follow the new gem_render_copy test and acquire a - aub dump from it. - - Suggested-by: Chris Wilson - Signed-off-by: Damien Lespiau - -commit 7ad0cf585b4f4c0391646c0eaea6e7e8e2e88cca -Author: Damien Lespiau -Date: Tue Oct 22 14:57:57 2013 +0100 - - tests/gem_render_copy: Add aub dump support - - Signed-off-by: Damien Lespiau - -commit 145722187c30a60456df046981087f84f3c0b601 -Author: Damien Lespiau -Date: Tue Oct 22 14:26:38 2013 +0100 - - tests/gem_render_copy: Only dump pngs when the -d option is given - - Signed-off-by: Damien Lespiau - -commit 9cd092fac149eb8cfe16e3652f1d535fb0698329 -Author: Damien Lespiau -Date: Tue Oct 22 14:20:10 2013 +0100 - - tests/gem_render_copy: Add a simple render copy test - - The goal is here to both: demonstrate a simple usage of render copy with - the possibility to write pngs to visualize what it's doing and to - provide a test bed to port the render copy function to new - architectures. - - Signed-off-by: Damien Lespiau - -commit c3707ab387500b534224dd563297a7bbb26aeb83 -Author: Damien Lespiau -Date: Tue Oct 22 14:18:26 2013 +0100 - - lib: Add a function to dump a scratch buf into a png - - Signed-off-by: Damien Lespiau - -commit 13ebe3c01410c2dc0d90a4a1c33cbf143c51056c -Author: Rodrigo Vivi -Date: Tue Oct 22 12:35:59 2013 -0200 - - build: include intel_l3_parity.h to its _SOURCES to fix make distcheck - - and make sure intel_l3_parity.h will be included in tarball. - - Signed-off-by: Rodrigo Vivi - -commit 50c2653381ad0ff5390932df1385aeb20b0d03bc -Author: Rodrigo Vivi -Date: Tue Oct 22 11:28:56 2013 -0200 - - build: Fix small typo that was breaking make distcheck - - Signed-off-by: Rodrigo Vivi - -commit fa05c0bcedd909bf8b85c02ca0f533921e8256b4 -Author: Ville Syrjälä -Date: Wed Oct 16 23:07:34 2013 +0300 - - kms_flip: Add test for -ENOENT - - Make sure we get -ENOENT when we pass a non-existing fb_id to - the page flip and setcrtc ioctls. - - Signed-off-by: Ville Syrjälä - -commit 08c27e3e3899f5063ac3eef44a4dbb6201568b47 -Author: Ville Syrjälä -Date: Fri Oct 18 17:44:42 2013 +0300 - - kms_cursor_crc: Add a cursor test using CRCs - - Use the display CRC support to validate cursor plane functionality. - The test will position the cursor plane either fully onscreen, - partially onscreen, or fully offscreen, using either a fully opaque - or fully transparent surface. In each case it then reads the PF CRC - and compares it with the CRC value obtained when the cursor plane - was disabled. - - v2: Loop over all connectors and crtcs - Use igt_wait_for_vblank - Test more corner cases - Add some progress indication ala. kms_flip - Make it work for pf and pipe sources - - Signed-off-by: Ville Syrjälä - -commit 0786d5cc8f258c7f403a22d8234ebb81837baa70 -Author: Ville Syrjälä -Date: Mon Oct 21 18:45:03 2013 +0300 - - lib: Check pipe source validity in igt_pipe_crc_new() - - Have igt_pipe_crc_new() check whether the selected source is actually - supported. - - v2: Make debugfs_pipe_crc.c not crash - - Signed-off-by: Ville Syrjälä - -commit 987bcd9a5b51db312588163d7f9a21654eb799e4 -Author: Ville Syrjälä -Date: Mon Oct 21 19:37:33 2013 +0300 - - lib: Allow pipe_crc_free(NULL) - - Prevent pipe_crc_free() from segfaulting on NULL ptr. - - Signed-off-by: Ville Syrjälä - -commit 471ec64de83b21316cd7f4d86a9337f4d017a907 -Author: Ville Syrjälä -Date: Fri Oct 18 21:43:14 2013 +0300 - - lib/drmtest: Add kmstest_paint_color_alpha() - - kmstest_paint_color_alpha() just like kmstest_paint_color() except you - also get to specify the alpha channel. - - Signed-off-by: Ville Syrjälä - -commit e98a06d593ba879a5292451812be773b4157fe21 -Author: Paulo Zanoni -Date: Mon Oct 21 13:19:57 2013 -0200 - - intel_reg_dumper: fix "enable" at hsw_debug_lp_wm - - Signed-off-by: Paulo Zanoni - -commit b7ccea08e6e704d0e6c0e72b3c44d4fa6e97fa76 -Author: Damien Lespiau -Date: Mon Oct 21 15:55:52 2013 +0100 - - gitignore: Ignore intel_opregion_decode - - Signed-off-by: Damien Lespiau - -commit 6d3c917e8988979e1328103c5f030371a854e5b1 -Author: Jani Nikula -Date: Tue Oct 8 21:18:14 2013 +0300 - - intel_opregion_decode: decipher bclm table - - Signed-off-by: Jani Nikula - Reviewed-by: Rodrigo Vivi - -commit 76be74975a88fe5ed12744d7735caef7588c69fb -Author: Jani Nikula -Date: Tue Oct 8 21:18:13 2013 +0300 - - intel_opregion_decode: new tool for decoding graphics opregion - - Signed-off-by: Jani Nikula - Reviewed-by: Rodrigo Vivi - -commit a360e3993b9a6800432d7e1b4591d2dd6bf2ddb8 -Author: Jani Nikula -Date: Tue Oct 8 21:15:28 2013 +0300 - - intel_bios_reader: dump all sections, including unknown ones - - We still need to dump some of the known sections explicitly due to - dependencies on information extracted, such as LFP data pointers and - panel_type. - - Signed-off-by: Jani Nikula - Reviewed-by: Rodrigo Vivi - -commit 419d053fd628b66fe0d838642ced6e9980f6282b -Author: Jani Nikula -Date: Tue Oct 8 21:15:29 2013 +0300 - - intel_bios_reader: dump all edp device info structs - - Signed-off-by: Jani Nikula - Reviewed-by: Rodrigo Vivi - -commit a4180df32a74c8aaa7a58e1cf60d240905e01852 -Author: Jani Nikula -Date: Tue Oct 8 21:15:27 2013 +0300 - - intel_bios_reader: prepare for dumping all sections - - Dump sections through a table based on the section id. - - Hex dump the section. This works also for unknown sections. - - Signed-off-by: Jani Nikula - Reviewed-by: Rodrigo Vivi - -commit 8596a4b8869bb17a4eed31815b2b63ef973c71c7 -Author: Jani Nikula -Date: Tue Oct 8 21:15:26 2013 +0300 - - intel_bios_reader: add size temp variable as a shorthand for finfo.st_size - - Signed-off-by: Jani Nikula - Reviewed-by: Rodrigo Vivi - -commit 58ac17d821cb3fa6300ca58d7f387c41a81d449c -Author: Chris Wilson -Date: Mon Oct 21 09:31:18 2013 +0100 - - intel_error_decode: Fix X/Y fence for gen2/3 - -commit 4acaf0004d43dfb51ba60d7990cef22a54b56727 -Author: Daniel Vetter -Date: Sun Oct 20 20:37:21 2013 +0200 - - tests/kms_flip: More leeway for dummy load tests - - At least on my old atom i945 they take forever. Also, metric tons of - pipe B underruns while running rcs-flip-vs-panning. No idea why that - happens. - - Signed-off-by: Daniel Vetter - -commit 3d2d73ed450983c427a839b10527bd4659fbb708 -Author: Daniel Vetter -Date: Sun Oct 20 19:24:08 2013 +0200 - - kmstest: don't pollute stderr for impossible output configs - - Otherwise on machines where the only output available is restricted to - one pipe we'll have tons of "warn" results for no gain in the piglit - runner. All tests that use the kmstest helpers already check the - return value and do something sensible (like skip the tests if there's - really no config available). - - Signed-off-by: Daniel Vetter - -commit 45cd89ab3d18dc2c869951db4134c1e5dde45c1b -Author: Daniel Vetter -Date: Sun Oct 20 16:11:49 2013 +0200 - - tests/kms_flip: Unconfuse the framenumber step checking - - We run flips and vblank waits in parallel, which means the step - for each is the maximum. If we'd switch to an interleaved scheme - (to be able to check the correlation) we'd need to add them instead. - - Signed-off-by: Daniel Vetter - -commit 8e11f8778adff693f3a0246fe0e87be4e3ddb83f -Author: Daniel Vetter -Date: Sun Oct 20 16:10:32 2013 +0200 - - tests/kms_flip: no absolute vblank wait on the first frame - - We don't have a reference value for the vblank counter yet, so - will end up waiting for a long time for the vblank counter to - wrap around again. - - Signed-off-by: Daniel Vetter - -commit e313dee22b8edf1429ce861e5974b09bb2ab1b68 -Author: Daniel Vetter -Date: Sat Oct 19 16:21:18 2013 +0200 - - tets/kms_flip: disable correlation check - - It's broken since it doesn't take the order the events arrived into - account and so will fall over for longer seq_step values in the vblank - event: Since the flip completes right away, but the vblank later on - they won't have the same timestamp. - - For now just give up, we could resurrect this by strictly alternating - between a flip and a vblank wait. - - Signed-off-by: Daniel Vetter - -commit f698984bae5e907eedfa335b463ab717a45ecc2a -Author: Daniel Vetter -Date: Fri Oct 18 18:43:30 2013 +0200 - - tests/debugfs_pipe_crc: new subtest to check CRC frame numbers - - Signed-off-by: Daniel Vetter - -commit 09e9f0b216dd7ee06b857ce5fd5cc9cb5ca491dc -Author: Damien Lespiau -Date: Wed Feb 27 14:51:29 2013 +0000 - - rendercopy: Add a way to dump an .aub file with the rendercopy bos - - v2 (by Ben): Remove libdrm dependency since intel-gpu-tools now requires - a higher version anyway. Remove associated #ifdef ENABLE_AUB_DUMP - - Signed-off-by: Damien Lespiau - Signed-off-by: Ben Widawsky - -commit 5038b7e4c243b4e9d07db34a33c70adbec044370 -Author: Daniel Vetter -Date: Fri Oct 18 17:53:05 2013 +0200 - - lib: fix the assert in igt_stop_helper - - So much for developing different patches on different machines and - then not retesting after rebasing. Reported by Ben on irc. - - Signed-off-by: Daniel Vetter - -commit 768e32a3ab5e45cc52558fb544d392729e02f1ae -Author: Damien Lespiau -Date: Fri Oct 18 14:29:20 2013 +0100 - - lib: Don't wait for a vblank when enabling the CRCs - - This was a previous attempt to solve the first CRC being bogus. We know - wait for it and discard it at the end of the function. - - Signed-off-by: Damien Lespiau - -commit 5e3047ce522ed57dd6d06bd7512d792bcf601855 -Author: Damien Lespiau -Date: Fri Oct 18 12:27:21 2013 +0100 - - tests/debugfs_pipe_crc: Test the read CRCs are not null - - Signed-off-by: Damien Lespiau - -commit 43f5384c083adb2ae99fb138099130bf450ebd01 -Author: Daniel Vetter -Date: Thu Oct 17 14:18:35 2013 +0200 - - tests/debugfs_pipe_crc: test all connectors - - Diff looks a bit ugly, but it's just due to the added indentation. - - Signed-off-by: Daniel Vetter - -commit 070904bf59abb3ce8ff1d3125cdfae606a5472ed -Author: Daniel Vetter -Date: Thu Oct 17 14:10:43 2013 +0200 - - tests/debugfs_pipe_crc: test all pipes - - And skip them if there's no suitable connector. - - Signed-off-by: Daniel Vetter - -commit e6ad75c1c4763f649f19c367b041ce7d13dcc789 -Author: Daniel Vetter -Date: Thu Oct 17 14:09:52 2013 +0200 - - tests/debugfs_pipe_crc: fix fb leak - - Also remove the unused connector_t->mode. - - Signed-off-by: Daniel Vetter - -commit 173a4cf1da300af4dc3c7c0f2ea085d19e1ce90b -Author: Daniel Vetter -Date: Wed Oct 16 22:49:24 2013 +0200 - - tests/debugfs_pipe_crc: fall back to PIPE source - - With PLANE1 and PIPE CRC sources the test will work on all currently - shipping (and planed fwiw) platforms. - - Also add all the other new sources for non-ivb/hsw chips. - - Signed-off-by: Daniel Vetter - -commit 548323c87d2f11384023ae3b064d6eb793d23115 -Author: Daniel Vetter -Date: Wed Oct 16 19:52:00 2013 +0200 - - lib/drmtest: Check that helper processes have died correctly - - If the test gets stopped sometimes a helper process falls over. - We need to report this. Since we currently don't track helper - process to precisely we can't shut up the 2nd test failure messge. - This shouldn't happen anyway. - - Signed-off-by: Daniel Vetter - -commit 1cefd198da32d02ba7ae737866569dd56112158c -Author: Daniel Vetter -Date: Thu Oct 17 10:48:29 2013 +0200 - - tests/ZZ_missed_irq: Fixup SOURCE_PATH handling - - Copy the trick from ZZ_hangman of just cd'ing into the old working - directory in a subshell. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70561 - Signed-off-by: Daniel Vetter - -commit a12d4a713544ff1ff89ca176d7e94e16944adb56 -Author: Ben Widawsky -Date: Wed Oct 16 22:01:34 2013 -0700 - - gem_ctx_bad_exec: skip vebox when appropriate - - Signed-off-by: Ben Widawsky - -commit befabe241a0c01dacc230b22a488d06df76bba5e -Author: Jani Nikula -Date: Tue Oct 8 21:19:06 2013 +0300 - - README: list some of the dependencies - - Signed-off-by: Jani Nikula - Signed-off-by: Ben Widawsky - -commit 0412f32670642f88bf6de6afce9179eefe608f13 -Author: Daniel Vetter -Date: Wed Oct 16 14:12:49 2013 +0200 - - tests/debugfs_pipe_crc: correctly skip on unsupported platforms - - Signed-off-by: Daniel Vetter - -commit 4ba97ddf96136d463e5b584fe997d6de698c0a74 -Author: Damien Lespiau -Date: Wed Oct 9 11:47:43 2013 +0100 - - debugfs_pipe_crc: Let's check CRCs! - - Let's add a new test that sets a mode, wait for a few vblanks (3) and - then make sure we read 3 identical CRCs. - - Some subtests check for various parsing errors. - - In the process, improve the debugfs helpers to deal with CRCs. - - Signed-off-by: Damien Lespiau - -commit f673775fe8a7d9faeaa80f4af9677fecf16e4b17 -Author: Damien Lespiau -Date: Fri Oct 11 18:31:20 2013 +0100 - - lib: Add igt_wait_for_vblank() helper - - Signed-off-by: Damien Lespiau - -commit d4e7ddf15d69fdb17d25446edcd6c73a684b759b -Author: Damien Lespiau -Date: Wed Oct 9 23:53:15 2013 +0100 - - lib: Make igt_debugfs_open() take the mode as argument - - Signed-off-by: Damien Lespiau - -commit 952d4b0a9c835d1d2e4e2c1b8727d225c805c8c6 -Author: Damien Lespiau -Date: Wed Oct 9 17:54:11 2013 +0100 - - lib: Add a igt_display.h with a few enums and defines from the kernel - - Signed-off-by: Damien Lespiau - -commit 252dca1c7b41410e7ff4ab61590a1433a8747e1f -Author: Damien Lespiau -Date: Wed Oct 9 17:42:52 2013 +0100 - - lib: Add kmstest_paint_color() - - Signed-off-by: Damien Lespiau - -commit 5a97ea91e11a4d2a2cfd46f18e0a69c2f0f279af -Author: Damien Lespiau -Date: Wed Oct 9 13:42:13 2013 +0100 - - lib: Add a igt_assert_cmpint() - - Signed-off-by: Damien Lespiau - -commit ffa2107abc46bb891ee2e0f2f73944626b9c67a9 -Author: Damien Lespiau -Date: Wed Oct 9 11:45:31 2013 +0100 - - lib: Add igt_debugfs_fopen() - - Signed-off-by: Damien Lespiau - -commit 51b63e334c5a4271b845d2eba0486c2b4f2bbda0 -Author: Damien Lespiau -Date: Tue Oct 8 23:39:33 2013 +0100 - - lib: Add a small helper to open debugfs files - - Signed-off-by: Damien Lespiau - -commit 8fed3837c758c13c3d7a767765df2caf792cdd7a -Author: Matt Turner -Date: Fri Oct 11 17:34:13 2013 -0700 - - Depend on libdrm_intel >= 2.4.47. - - Reviewed-by: Ben Widawsky - -commit cd460f1a2c5c23bacfb6849923f5d4596ebc3fc4 -Author: Matt Turner -Date: Thu Oct 10 20:54:25 2013 -0700 - - configure: Don't bail if libdrm_nouveau isn't available. - - We were seriously *requiring* libdrm_nouveau unless explicitly disabled? - - Acked-by: Ben Widawsky - Reviewed-by: Chad Versace - -commit d3d371fdf6aab3433ffe4bdf1d7512245aa26335 -Author: Daniel Vetter -Date: Mon Oct 14 19:10:56 2013 +0200 - - tests/pc8: Readd verbose error message - - I deemed them a bit redundant (assuming that developers are the only - ones that look at them anyway). But Paulo requested that I readd them - for the education of QA. - - Signed-off-by: Daniel Vetter - -commit a5d40a9bf27c2a41a981cb6fa168b1e68bfc0b3c -Author: Daniel Vetter -Date: Fri Oct 11 20:53:40 2013 +0200 - - tests/kms_flip: fix igt_assert - - I've blown the conversion in - - commit 37e5b318c5dac290611099e2eec21df1e49fa71f - Author: Daniel Vetter - Date: Fri Oct 4 18:42:26 2013 +0200 - - tests/kms_flip: use igt_assert more - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70332 - Signed-off-by: Daniel Vetter - -commit 98a2b5b01f915c05ef50364494d8092668b94d8c -Author: Daniel Vetter -Date: Fri Oct 11 20:22:19 2013 +0200 - - tests/kms_flip: Skip if the kernel doesn't let y-tiled bo slip through - - Signed-off-by: Daniel Vetter - -commit 9f3794f5fd6baf613594422b64d4eb050f27b78e -Author: Daniel Vetter -Date: Fri Oct 11 19:58:43 2013 +0200 - - tests/kms_flip: exit handler needs a fixture - - Since it can fail. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70332 - Signed-off-by: Daniel Vetter - -commit ce5becbb616637753e2c7e441c5e019f3864b3f7 -Author: Thomas Wood -Date: Thu Oct 10 12:23:19 2013 +0100 - - testdisplay: Allow getopt to print error messages - - By not assigning opterr, getopt will print its own error message that - includes information about whether an option is unknown or just requires - an additional argument. - - Signed-off-by: Thomas Wood - -commit ffdece38e2b6aec64b0d96e83cd2324c035b1867 -Author: Daniel Vetter -Date: Thu Oct 10 14:20:43 2013 +0200 - - tests/gem_suspend: test debugfs/sysfs reads while s/r - - Just a very quick hack cobbled together with /bin/sh and exec. We - can't use system since that does stupid things with singals ... Still - we need to whack the child process pretty hard to get rid of it. - - Signed-off-by: Daniel Vetter - -commit 8a9b275b96f1ea5637d21e4568647dcb7fed98f2 -Author: Daniel Vetter -Date: Thu Oct 10 11:22:09 2013 +0200 - - tests/module_reload: fail if the module didn't unload - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70336 - Signed-off-by: Daniel Vetter - -commit f014878722f7d9371e54e936de668d8a3b8115f1 -Author: Ben Widawsky -Date: Wed Oct 9 09:07:55 2013 -0700 - - gem_pin: Use iterator for blit batch setup - - Signed-off-by: Ben Widawsky - -commit a7934e26ae206c6558ff3b34af8728ca7ef04fb5 -Author: Ben Widawsky -Date: Wed Oct 9 08:55:24 2013 -0700 - - gem_exec_blt: Use iterator for blit batch setup - - Signed-off-by: Ben Widawsky - -commit 637162d0f7dee79c08c49d717c295be0b0d4696e -Author: Ben Widawsky -Date: Wed Oct 9 08:37:48 2013 -0700 - - gem_evict_*: Use iterator for blit batch - - Signed-off-by: Ben Widawsky - -commit aa6fbd18d4f52b2bc9e6bf9c16b9bcd585a1ae6b -Author: Ben Widawsky -Date: Wed Oct 9 09:07:55 2013 -0700 - - gem_linear_blits: Use iterator for blit batch setup - - Signed-off-by: Ben Widawsky - -commit 4de3b1765e6f76f4e0f40434f5278f0edac0c61e -Author: Ben Widawsky -Date: Tue Oct 8 17:36:21 2013 -0700 - - gem_exec_faulting_reloc: use iterator for batchbuffer - - This will help keep the code clean for new platforms which might have - differently sized relocations. - - Signed-off-by: Ben Widawsky - -commit 6f8c30d8edf8ee0c57689704e32b949b003bfb02 -Author: Daniel Vetter -Date: Wed Oct 9 21:20:40 2013 +0200 - - tests: add kms_addfb - - Just a bunch of testcase to check that all the addfb sanity checks - work as they should. - - Signed-off-by: Daniel Vetter - -commit 590f6101402b51bca54f69c002380bda967484ea -Author: Daniel Vetter -Date: Wed Oct 9 20:50:50 2013 +0200 - - lib/drmtest: extract rawer __gem_set_tiling - - For tests that expect failures. Also apply the existing gem_set_tiling - helper a bit wider. - - Signed-off-by: Daniel Vetter - -commit 40599b077972e1a721fdfcc93455e60b5b564a13 -Author: Ben Widawsky -Date: Tue Oct 8 19:47:53 2013 -0700 - - pwrite_pread: Get devid only once - - Signed-off-by: Ben Widawsky - -commit a2925b0989463a1d225a3b870a3a0e06fa74ad97 -Author: Ben Widawsky -Date: Tue Oct 8 19:45:30 2013 -0700 - - pwrite_pread: Extract batch building - - Signed-off-by: Ben Widawsky - -commit 41ae28e498afed2685feaa95ab8bf4ffdd687b62 -Author: Ben Widawsky -Date: Tue Oct 8 19:41:49 2013 -0700 - - pwrite_pread: use execbuf.batch_len for size - - This will make an upcoming change easier. - - Signed-off-by: Ben Widawsky - -commit 96f665cabb3038905a8a9839dae025f5156ae80e -Author: Ben Widawsky -Date: Tue Oct 8 20:32:12 2013 -0700 - - gem_tiled_blits: Squash bo leak on simulation - - Signed-off-by: Ben Widawsky - -commit f75dec0b415c8c319b9aae32cfdbac6144f3e770 -Author: Ben Widawsky -Date: Tue Oct 8 18:30:13 2013 -0700 - - gem_tiled_blits: Squash memory leak on simulation - - Signed-off-by: Ben Widawsky - -commit 304c458d542a3eee928c0004432aea8f20ca42fb -Author: Daniel Vetter -Date: Mon Oct 7 22:55:14 2013 +0200 - - tests/kms_flip: Skip if no clone configuration could be found - - Signed-off-by: Daniel Vetter - -commit bc888c2b42ab42d628d9c11181a5ba09df66fdcc -Author: Ben Widawsky -Date: Sat Oct 5 16:21:11 2013 -0700 - - configure.ac: require dri2proto for overlay - - With the introduction of - - commit f9a50de3dcc501e930de6c60983a4feb57121e7e - Author: Chris Wilson - Date: Sat Aug 17 11:12:07 2013 +0100 - - Introduce intel-gpu-overlay - - dri2proto became a dependency (and there is no way to disable overlay - explicitly. The actual version chosen was arbitrarily stolen from mesa. - - Signed-off-by: Ben Widawsky - -commit ae599546fadb3b8ebc3114f8ab5b58cffc467952 -Author: Daniel Vetter -Date: Fri Oct 4 19:55:56 2013 +0200 - - tests/pc8: Fail harder - - If the test enviroment isn't properly set up we should fail the - testcase, since otherwise there's no way to make sure a feature - actually works. - - To cut down on bug triaging time extract the basic test (which was - previously used to skip all subtests) into a "basic" subtest. - - Also fail the test hard if the msr interface isn't available. And - switch all other check in setup_enviroment to igt_require. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69838 - Signed-off-by: Daniel Vetter - -commit 3dc91f32424191f28d7512014b2871e22b5a05b9 -Author: Daniel Vetter -Date: Fri Oct 4 19:49:36 2013 +0200 - - tests/pc8+: Only skip i2c subtest if i2c /dev interface is unavailable - - Through the magic of igt_skip we only need to fail this subtest, not - the entire thing. - - Signed-off-by: Daniel Vetter - -commit 37e5b318c5dac290611099e2eec21df1e49fa71f -Author: Daniel Vetter -Date: Fri Oct 4 18:42:26 2013 +0200 - - tests/kms_flip: use igt_assert more - - I've left the time delta checks as-is since those are tricky math and - my mind is feeble. - - Signed-off-by: Daniel Vetter - -commit 54b5f7251ac8f28338ea59f110f680c3ac8b6c74 -Author: Daniel Vetter -Date: Fri Oct 4 18:11:37 2013 +0200 - - tests/kms_flip: check flip count in both directions - - Signed-off-by: Daniel Vetter - -commit 47d0a6fa6954a2742a50b988461f48597f960b24 -Author: Daniel Vetter -Date: Fri Oct 4 11:10:48 2013 +0200 - - NEWS: Mention gen7 perf counters release - - This is too great to be omitted! - - Signed-off-by: Daniel Vetter - -commit b53f22cee7323df6984f2d34464b51264a92ef2a -Author: Chris Wilson -Date: Fri Aug 23 12:32:43 2013 +0100 - - tests: Simulate missed breadcrumb irqs - - Signed-off-by: Chris Wilson - -commit 11d5859b28727e1dac9d5b15b3027938a7023067 -Author: Kenneth Graunke -Date: Tue Apr 2 22:54:08 2013 -0700 - - intel_perf_counters: Add support for Gen7 platforms. - - We finally received permission to release this; the counters should be - properly documented in the Haswell PRMs. - - Signed-off-by: Kenneth Graunke - -commit 16b61932bb1b54a21b67b6c209ba405f5a36f174 -Author: Daniel Vetter -Date: Thu Oct 3 22:45:53 2013 +0200 - - tests/kms_flip: use igt_assert in the dpms helpers - - No need to route the error code around really. - - Signed-off-by: Daniel Vetter - -commit 0b19cb5dc2afe55084b946b053c527b9f44a011f -Author: Daniel Vetter -Date: Thu Oct 3 18:30:56 2013 +0200 - - tests/kms_flip: Check the dpms confusion - - Some kernels inadvertedly forwarded dpms changes to crtcs connected to - shared encoders even though that specific output wasn't enabled. - Hilarity ensued. - - Note that we only have shared encoders on hsw (DP+HDMI) and with sdvo - cards (multi-function encoders). - - v2: Do a full OFF->ON->OFF transition to make sure something actually - happens. - - Signed-off-by: Daniel Vetter - -commit a8bf10c9cf5000083b102549a335239bd01d4f2f -Author: Daniel Vetter -Date: Tue Oct 1 22:20:38 2013 +0200 - - NEWS: testdisplay now with 3d support! - -commit 1f0addb689a5707bc3e5a5e36d28fea2745ea352 -Author: Daniel Vetter -Date: Mon Sep 30 21:38:09 2013 +0200 - - tests/kms_flip: scale test runtime - - On machines with many outputs and many crtcs it takes too long. - So scale the runtime by the number of output combinations we're trying - to light up. - - Compensate the test runtime a bit by doubling most subtests' duration. - - Signed-off-by: Daniel Vetter - -commit 3f89d5403ef85c1f101c0f1026cf9b800bbaaea9 -Author: Daniel Vetter -Date: Mon Sep 30 21:35:47 2013 +0200 - - tests/kms_flip: fail harder - - At least for pipe A/B we should always fail the test if we can't light - up the preferred mode - the kernel should filter out impossible modes - and for our hw pipe A/B are the least constrained. - - Signed-off-by: Daniel Vetter - -commit 6de613f8e5b76435150a74a38f5863f93195b473 -Author: Damien Lespiau -Date: Mon Sep 30 18:03:33 2013 +0100 - - testdisplay: Print the stereo mode being tested - - Signed-off-by: Damien Lespiau - -commit e836b60d3751475e768a339f29d231509ac1596c -Author: Damien Lespiau -Date: Mon Sep 30 17:42:33 2013 +0100 - - testdisplay: Make -o and -3 work together - - Signed-off-by: Damien Lespiau - -commit 8393bb41a1717691674809361908050974d71fbf -Author: Damien Lespiau -Date: Mon Sep 30 17:41:56 2013 +0100 - - testdisplay: Remove mode resetting now that we don't adjust the timings - - Signed-off-by: Damien Lespiau - -commit c128b731dceff48200a9e6e84436a5e726dc4706 -Author: Damien Lespiau -Date: Mon Sep 30 17:02:21 2013 +0100 - - testdisplay: Respect specified_disp_id in the stereo loop - - Signed-off-by: Damien Lespiau - -commit 28cf66de94962081e7de833166f274807f333f39 -Author: Damien Lespiau -Date: Mon Sep 30 16:56:29 2013 +0100 - - testdisplay: Remove printing out the eyes geometry - - Signed-off-by: Damien Lespiau - -commit 21a89a9f073a892424428631503c7bbb69c5187f -Author: Damien Lespiau -Date: Thu Sep 26 18:34:06 2013 +0100 - - lib: Adjust dump_modes() to the new stereo encoding - - Signed-off-by: Damien Lespiau - -commit a7d1937cd777e23bb6f234156e6164aafe151fbe -Author: Damien Lespiau -Date: Thu Sep 26 17:56:01 2013 +0100 - - testdisplay: Use DRM_MODE_FLAG_3D_MASK - - Signed-off-by: Damien Lespiau - -commit 578c1cefc9c0b80927b69584ef730acd3a1eb2f0 -Author: Damien Lespiau -Date: Tue Sep 17 18:59:52 2013 +0100 - - testdisplay: Remove the timing adjustements now that the kernel does it - - Signed-off-by: Damien Lespiau - -commit d89f4a2c1a773c0dc33cc7d94d475798fc0fee41 -Author: Damien Lespiau -Date: Mon Sep 16 17:52:41 2013 +0100 - - intel_infoframe: Display the VIC in decimal - - It's not customary to display the VIC in hexadecimal and lead me to - scratch my head for a couple of seconds. Print it in decimal instead. - - Signed-off-by: Damien Lespiau - -commit 9a8fda7a4aaba11d191ebcd93c2b1ef648703148 -Author: Damien Lespiau -Date: Mon Sep 10 13:33:26 2012 +0100 - - testdisplay: Test the stereo 3D modes - - Now that modes have flags to describe which 3d formats the sink - supports, it's time to test them. - - The new test cycles through the supported 3D formats and paint 3D - stereoscopic images taken from publicly available samples: - http://www.quantumdata.com/apps/3D/sample_BMP.asp - - Signed-off-by: Damien Lespiau - -commit 951b37e2d0d69ef7c013bf3ee7a57f7d6bd15119 -Author: Damien Lespiau -Date: Fri Sep 6 11:44:41 2013 +0100 - - testdisplay: Provide a full path when opening pngs - - This way one doesn't have to be in tests/ for testsdisplay to be able to - open pass.png. - - Signed-off-by: Damien Lespiau - -commit 5d996349137e368c7ad8a3b2ce708c77c006a2db -Author: Damien Lespiau -Date: Wed Sep 4 14:21:55 2013 +0100 - - testdisplay: Free the array of connectors - - That's an array we allocated earlier in this function. Let's be symetric - and free it once done. - - Signed-off-by: Damien Lespiau - -commit 66477a230fba36a349783020b77ed4a030f204f5 -Author: Damien Lespiau -Date: Thu Sep 5 16:49:11 2013 +0100 - - testdisplay: Untangle dump_info() from the main testing loop - - -i is just supposed to show some information about the DRM resources. - Right now it works in a quite convoluted way. Untangle this to call - dump_info() when -i is given, exit the program and be done with it. - - Signed-off-by: Damien Lespiau - -commit b9db1a6a96581645e222b6d43bd0cd795c6c7501 -Author: Damien Lespiau -Date: Wed Sep 4 12:31:18 2013 +0100 - - testdisplay: Fix CRTS typo - - Signed-off-by: Damien Lespiau - -commit eecd0061eb5bf45a3db515fa1cedb1184f98ca44 -Author: Damien Lespiau -Date: Tue Sep 3 19:46:19 2013 +0100 - - testdisplay: Properly handle the life cycle of framebuffers - - When cycling through the modes, let's make sure to free the previous - framebuffers. This is the perfect occasion to use kmstest_remove_fb(). - - Signed-off-by: Damien Lespiau - -commit 5a1d84300ba31bec08c05db7d1c602c80e932021 -Author: Damien Lespiau -Date: Wed Sep 4 12:12:37 2013 +0100 - - testdisplay: Map the fb inside paint_color_key() - - So the code for this is self-contained. This goes along the way of - reducing the number of global variables in testdisplay. - - Take the opportunity to unmap the fb after use as well. - - Signed-off-by: Damien Lespiau - -commit 0396273972076909f92429503232cff1be38e640 -Author: Damien Lespiau -Date: Tue Sep 3 14:57:31 2013 +0100 - - testdisplay: Move the code sanitizing depth into main() - - It'll be shared by the set_mode() and set_3d_mode() functions. - - Signed-off-by: Damien Lespiau - -commit 79f4cfedbf8f4249291c0915d040d79af97d1389 -Author: Damien Lespiau -Date: Fri Sep 6 18:22:53 2013 +0100 - - lib: Add a helper to write a png from a struct kmstest_fb - - Signed-off-by: Damien Lespiau - -commit dac45f5f067136496a76bf755a3df0224a2c3ea4 -Author: Damien Lespiau -Date: Fri Sep 6 17:26:32 2013 +0100 - - lib: Split create_image_surface() out of create_cairo_ctx() - - So we can use it in the next commit. - - Signed-off-by: Damien Lespiau - -commit bde7060e3c30eba807295c6831e10d7e4365a33b -Author: Damien Lespiau -Date: Fri Aug 23 16:46:45 2013 +0100 - - lib: Add a helper to paint a PNG using cairo - - Signed-off-by: Damien Lespiau - -commit 30e0710ca374eb937806ad79e20f53a222cab54a -Author: Damien Lespiau -Date: Wed Sep 12 14:21:29 2012 +0100 - - lib: Dump information about the supported 3D stereo formats - - When dumping the details of a mode, let's add the 3D formats the mode - supports. - - Signed-off-by: Damien Lespiau - -commit 9edaf7fa7364e03115edd1bc3a1e99a282fce9ce -Author: Damien Lespiau -Date: Fri Sep 6 15:17:48 2013 +0100 - - testdisplay: Add left/right images of a lovely scene - - Signed-off-by: Damien Lespiau - -commit 05493f736d41dbaa2f6f8b8c1c235d30d2370800 -Author: Damien Lespiau -Date: Fri Sep 6 15:20:35 2013 +0100 - - testdisplay: Distribute pass.png - -commit 76dfa9195a489aa8de954f888895278bdccec3b7 -Author: Daniel Vetter -Date: Mon Sep 30 16:04:38 2013 +0200 - - tests/gem_evict_everything: tune down forked subtests - - On new machines with gobloads of memory and cpu cores, but slow swap - on spinning rust we need to limit the runtime a bit for sanity. - - Signed-off-by: Daniel Vetter - -commit f3c54d0cb4744af9d58b5be45f574b625bbc8231 -Author: Daniel Vetter -Date: Wed Sep 25 14:36:59 2013 +0200 - - tests: use igt_assert/igt_require more - - With the new _f variants we can replace almost all of them. - - Also remove a ton of checks for argc != 1, they're a bit useless ... - - Signed-off-by: Daniel Vetter - -commit 88ad6d7be8ab5741b7019a535952145c96577c9c -Author: Ben Widawsky -Date: Mon Sep 23 13:46:06 2013 -0700 - - intel_l3_parity: Make compilation possible without udev - - Signed-off-by: Ben Widawsky - -commit 6020b951dff9584b9cfdb6819bdb1f6b0293db70 -Author: Paulo Zanoni -Date: Mon Sep 23 16:05:21 2013 -0300 - - tests/pc8: fix supports_pc8_plus_residencies - - Bug caused by bad copy+paste+replace. - - Signed-off-by: Paulo Zanoni - -commit 4d3e10d2161200e1c6ccf400775716b9899f3c13 -Author: Chris Wilson -Date: Sun Sep 22 19:00:59 2013 +0100 - - overlay: Some very raw usage information - - Signed-off-by: Chris Wilson - -commit 145c0d1a2697316da5de8441e4cc1847dbf3a28b -Author: Daniel Vetter -Date: Sun Sep 22 13:15:43 2013 +0200 - - NEWS: Start with release notes for 1.5 - - Also extend the underlying for 1.4 to the full lenght ;-) - - Signed-off-by: Daniel Vetter - -commit 799aeb6d00881fc8f19b80ddf70f8b2b4c532f28 -Author: Ben Widawsky -Date: Tue Sep 10 14:21:23 2013 -0700 - - intel_l3_parity: Support a daemonic mode - - v2: Add a comment explaining the dangers of directly accessing the DFT - register (Daniel) - - Signed-off-by: Ben Widawsky - -commit bfa7a5906d53a016b43eaa5592d91c1fb955daf7 -Author: Ben Widawsky -Date: Tue Sep 10 10:40:54 2013 -0700 - - intel_l3_parity: Support error injection - - Haswell added the ability to inject errors which is extremely useful for - testing. Add two arguments to the tool to inject, and uninject. - - Signed-off-by: Ben Widawsky - -commit 5f95ea780bba6027767b3f3411ce41717317e879 -Author: Ben Widawsky -Date: Sat Sep 7 20:38:18 2013 -0700 - - intel_l3_parity: Actually support multiple slices - - Signed-off-by: Ben Widawsky - -commit 8ddcfd6882a9afd17daf5399f78f74bfc6ef3d7a -Author: Ben Widawsky -Date: Sat Sep 7 20:10:27 2013 -0700 - - intel_l3_parity: slice support - - Haswell GT3 adds a new slice which is kept distinct from the old - register interface. Plumb it into the code, though it's only 1 slice - still. - - Signed-off-by: Ben Widawsky - -commit 48d1b362c52803f490080be0ee26b43ae5f7dc27 -Author: Ben Widawsky -Date: Sun Sep 8 16:50:23 2013 -0700 - - intel_l3_parity: Hardware info argument - - Add a new command line argument to the tool which will spit out various - parameters for the giving hardware. As a result of this, some new - defines are added to help with the various info. - - Signed-off-by: Ben Widawsky - -commit a9cd76b36e112389c61ccc315df185a2eaf17c01 -Author: Ben Widawsky -Date: Fri Sep 6 21:10:50 2013 -0700 - - intel_l3_parity: Use getopt for the l3 parity tool - - Add new command line arguments in addition to supporting the old - features. This patch only introduces one feature, the -e argument to - enable a specific row/bank/subbank. Previously you could only enable - all. Otherwise, it has what you expect (we prefer -r -b -s for - specifying the row/bank/subbank). - - Signed-off-by: Ben Widawsky - -commit e740bdf5bd1339b58912eb359902ca68529b438d -Author: Ben Widawsky -Date: Fri Sep 6 11:40:03 2013 -0700 - - intel_l3_parity: Assert all GEN7+ support - - v2: Don't assert for Valleyview (Bryan) - Rework code to be a bit more readable. - - CC: "Bell, Bryan J" - Signed-off-by: Ben Widawsky - -commit 318c0b22d7756d2ae33328935c2f15cd790f6b01 -Author: Ben Widawsky -Date: Tue Sep 10 15:34:54 2013 -0700 - - intel_l3_parity: Fix indentation - - Signed-off-by: Ben Widawsky - -commit 64cfe4eefe9b91ad648df216ba385d9a1e67dd78 -Author: Daniel Vetter -Date: Thu Sep 19 19:56:03 2013 +0200 - - lib/drmtest: Improve printf-like igt_skip_on/require - - Ben Widawsky suggested to use vasprintf, which perfectly fits the bill. - - Also fix the logic conversion bug in tests/gem_storedw_batches_loop that - crept in again :( - - Signed-off-by: Daniel Vetter - -commit e5cdd62624342180a16630b4f6b1d604f6e6e581 -Author: Daniel Vetter -Date: Thu Sep 19 16:37:07 2013 +0200 - - lib/drmtest: igt_assert|require with format strings - - v2: Add a comment about the pitfalls around va_list handling. - - Signed-off-by: Daniel Vetter - -commit b3525129535c6e8e3588f63960e2296d598f6e9a -Author: Daniel Vetter -Date: Thu Sep 19 15:51:33 2013 +0200 - - tests/gem_stored_batches_loop: use igt_assert more - - Terser code ftw! - - Signed-off-by: Daniel Vetter - -commit 867b1a51a6310d63f34acc8ffe602355694da7ee -Author: Daniel Vetter -Date: Thu Sep 19 11:01:14 2013 +0200 - - tests/gem_reloc_overflow: New subtest for overflowing buffer_count - - Luckily everything seems to be fine. - - Signed-off-by: Daniel Vetter - -commit bf6f166035bdd85042c2d6dee0e0b088e122ae81 -Author: Daniel Vetter -Date: Thu Sep 19 10:20:46 2013 +0200 - - tests/gem_reloc_overflow: Extract reloc_tests - - I'll be adding more stuff soon ;-) - - Signed-off-by: Daniel Vetter - -commit 0a587e24b77707099a21d6ad00cbfd19a4661b8b -Author: Daniel Vetter -Date: Wed Sep 18 18:28:18 2013 +0200 - - tests/gem_storedw_batches_loop: Add testcase to check secure dispatch - - v2: Use the mrb_exec function since otherwise we can't pass flags. - - Signed-off-by: Daniel Vetter - -commit 195f04c3008c079c8edb762a8907903c264da83c -Author: Daniel Vetter -Date: Mon Sep 16 22:45:14 2013 +0200 - - tests/gem_persistent_relocs: Tune down the test a bit - - Takes too long. - - Signed-off-by: Daniel Vetter - -commit 31139f6b8fc2d5f0c1623de1cbaf24f8a3d5473d -Author: Daniel Vetter -Date: Thu Sep 12 16:18:10 2013 +0200 - - tests/gem_fenced_exec_thrash: Add interruptible and busy-load subtests - - Usual progression for gem tests up the nasty-scale. - - Signed-off-by: Daniel Vetter - -commit d1b9bc0dc17dbc49d707abf861d31020fbcb5ff6 -Author: Daniel Vetter -Date: Thu Sep 12 16:17:33 2013 +0200 - - lib/drmtest: check that igt_exit is called for subtest tests - - I get this wrong for almost every conversion to subtests ... - - v2: Don't install the check when just listing subtest names. - - Signed-off-by: Daniel Vetter - -commit 7b3634364a1f5cf1797a55a1d0d042ec8d9f510c -Author: Daniel Vetter -Date: Thu Sep 12 14:38:13 2013 +0200 - - tests/gem_fenced_exec_thrash: New subtests that uses all fences - - igt runs under the assumption that nothing else (besides maybe fbcon) - is using the gpu. So we should be able to use all fences. - - Keep the conservative testcase around though in case someone has a - broken setup. - - Signed-off-by: Daniel Vetter - -commit 14e12b80085db3ab9d9035ce962b5679fe862570 -Author: Daniel Vetter -Date: Thu Sep 12 14:21:56 2013 +0200 - - tests/*: scrap get_num_fences - - Just use gem_available_fences directly. - - Signed-off-by: Daniel Vetter - -commit deba86806670e28bfd8110ef5b6e05ab818b1935 -Author: Mengdong Lin -Date: Mon Sep 9 15:38:40 2013 -0400 - - intel_audio_dump/hsw: rename some audio configuration registers for Haswell - - For Haswell, some audio configuration registers have changed their name and - some bit definitions. - - This patch applies the changes, and uses subfunctions to parse registers for - code reuse. - - Here is the name change list: - Audio configuration: AUD_CONFIG_x to AUD_TCx_CONFIG - Audio Misc Control: AUD_MISC_CTRL_x to AUD_Cn_MISC_CTRL - Audio M & CTS programming enable: AUD_CTS_ENABLE_x to AUD_TCx_M_CTS_ENABLE - Audio EDID data block: AUD_HDMIW_HDMIEDID_x to AUD_TCx_EDID_DATA - Audio Widget Data Island Packet: AUD_HDMIW_INFOFR_x to AUD_TCx_AUD_INFOFR - Audio Pipe and Converter Configs: AUD_PORT_EN_HD_CFG to AUD_PIPE_CONV_CFG - Audio Digital Converter: AUD_OUT_DIG_CNVT_x to AUD_Cn_DIG_CNVT - Audio Stream Descriptor Format: AUD_OUT_STR_DESC_x to AUD_Cn_STR_DESC - Audio Connect List Entry & Length: AUD_PINW_CONNLNG_LIST_x to - AUD_TCx_PIN_PIPE_CONN_ENTRY_LNGTH - Audio Connection Select Control: AUD_PINW_CONNLNG_SEL to AUD_PIPE_CONN_SEL_CTRL - Audio DIP & ELD Control State: AUD_DIP_ELD_CTRL_ST_x to AUD_TCx_DIP_ELD_CTRL_ST - Audio HDMI FIFO status: AUD_HDMIW_STATUS to AUD_HDMI_FIFO_STATUS - - NOTE: - For Tx, x = A/B/C, meaning Transcoder A/B/C. - For Cn, n = 1/2/3, meaning audio converter 1/2/3. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - Signed-off-by: Ben Widawsky - -commit 3c7dc5cf32ad50cf3d8b691c921064a419917fc8 -Author: Mengdong Lin -Date: Mon Sep 9 15:38:32 2013 -0400 - - intel_audio_dump/hsw: align code with tab - - This patch makes the file to follow kernel coding style: - - replace leading spaces with tabs for alignment - - fix some minor format issues - - But the max length of a line is set to 120 characters for readability - on high resolution displays. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - Signed-off-by: Ben Widawsky - -commit cac586586ddcf9fa1679c35236cd0674237f3d37 -Author: Mengdong Lin -Date: Mon Sep 9 15:38:20 2013 -0400 - - intel_audio_dump/hsw: remove misuse of PCH transcoder configuration register - - The PCH transcoder config register (PCH_TRANS_CONF, 0xf0008) is not the - correct config register for transcoder A, B or C. This register is in - PCH and for CRT display, nothing to do with display audio. - - So This patch removes misuse of it as config register for transcoder A/B/C. - - Signed-off-by: Mengdong Lin - Reviewed-by: Haihao Xiang - Signed-off-by: Ben Widawsky - commit be28ba071baf33afa1852ed0fd9b4efee699cdbd Author: Rodrigo Vivi Date: Mon Sep 16 16:37:08 2013 -0300 diff -Nru intel-gpu-tools-1.13/config.h.in intel-gpu-tools-1.14/config.h.in --- intel-gpu-tools-1.13/config.h.in 2015-12-02 16:48:03.000000000 +0000 +++ intel-gpu-tools-1.14/config.h.in 2016-03-01 16:02:43.000000000 +0000 @@ -75,11 +75,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Have vc4 support */ +#undef HAVE_VC4 + /* Have libXrandr */ #undef HAVE_XRANDR -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ diff -Nru intel-gpu-tools-1.13/configure intel-gpu-tools-1.14/configure --- intel-gpu-tools-1.13/configure 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/configure 2016-03-01 16:02:43.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for intel-gpu-tools 1.13. +# Generated by GNU Autoconf 2.69 for intel-gpu-tools 1.14. # # Report bugs to . # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='intel-gpu-tools' PACKAGE_TARNAME='intel-gpu-tools' -PACKAGE_VERSION='1.13' -PACKAGE_STRING='intel-gpu-tools 1.13' +PACKAGE_VERSION='1.14' +PACKAGE_STRING='intel-gpu-tools 1.14' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel' PACKAGE_URL='' @@ -648,12 +648,14 @@ BUILD_SHADER_DEBUGGER_FALSE BUILD_SHADER_DEBUGGER_TRUE OBJCOPY +HAVE_VC4_FALSE +HAVE_VC4_TRUE +DRM_VC4_LIBS +DRM_VC4_CFLAGS HAVE_NOUVEAU_FALSE HAVE_NOUVEAU_TRUE DRM_NOUVEAU_LIBS DRM_NOUVEAU_CFLAGS -BUILD_ASSEMBLER_FALSE -BUILD_ASSEMBLER_TRUE GLIB_LIBS GLIB_CFLAGS LIBUDEV_LIBS @@ -668,6 +670,10 @@ BUILD_OVERLAY_XLIB_TRUE BUILD_OVERLAY_XVLIB_FALSE BUILD_OVERLAY_XVLIB_TRUE +BUILD_ASSEMBLER_FALSE +BUILD_ASSEMBLER_TRUE +BUILD_X86_FALSE +BUILD_X86_TRUE OVERLAY_XLIB_LIBS OVERLAY_XLIB_CFLAGS OVERLAY_XVLIB_LIBS @@ -696,6 +702,7 @@ STRICT_CFLAGS CWARNFLAGS BASE_CFLAGS +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -791,6 +798,10 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target host_os host_vendor host_cpu @@ -828,6 +839,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -861,12 +873,14 @@ enable_shared with_pic enable_fast_install +with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_selective_werror enable_strict_compilation enable_nouveau +enable_vc4 enable_shader_debugger with_libunwind enable_debug @@ -890,6 +904,7 @@ PKG_CONFIG_LIBDIR GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS +LT_SYS_LIBRARY_PATH DRM_CFLAGS DRM_LIBS PCIACCESS_CFLAGS @@ -908,6 +923,8 @@ GLIB_LIBS DRM_NOUVEAU_CFLAGS DRM_NOUVEAU_LIBS +DRM_VC4_CFLAGS +DRM_VC4_LIBS LIBUNWIND_CFLAGS LIBUNWIND_LIBS' @@ -948,6 +965,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1200,6 +1218,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1337,7 +1364,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1450,7 +1477,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 intel-gpu-tools 1.13 to adapt to many kinds of systems. +\`configure' configures intel-gpu-tools 1.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1490,6 +1517,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1515,12 +1543,13 @@ System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of intel-gpu-tools 1.13:";; + short | recursive ) echo "Configuration of intel-gpu-tools 1.14:";; esac cat <<\_ACEOF @@ -1551,6 +1580,7 @@ errors (default: disabled) --disable-nouveau Enable use of nouveau API for prime tests (default: auto) + --disable-vc4 Enable building of vc4 tests (default: auto) --enable-shader-debugger Enable shader debugging support [autodetected] --disable-debug Build tests without debug symbols @@ -1563,9 +1593,12 @@ --with-html-dir=PATH path to installed docs --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). --without-libunwind Build tests without libunwind support Some influential environment variables: @@ -1593,6 +1626,8 @@ C compiler flags for GTKDOC_DEPS, overriding pkg-config GTKDOC_DEPS_LIBS linker flags for GTKDOC_DEPS, overriding pkg-config + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. DRM_CFLAGS C compiler flags for DRM, overriding pkg-config DRM_LIBS linker flags for DRM, overriding pkg-config PCIACCESS_CFLAGS @@ -1623,6 +1658,10 @@ C compiler flags for DRM_NOUVEAU, overriding pkg-config DRM_NOUVEAU_LIBS linker flags for DRM_NOUVEAU, overriding pkg-config + DRM_VC4_CFLAGS + C compiler flags for DRM_VC4, overriding pkg-config + DRM_VC4_LIBS + linker flags for DRM_VC4, overriding pkg-config LIBUNWIND_CFLAGS C compiler flags for LIBUNWIND, overriding pkg-config LIBUNWIND_LIBS @@ -1694,7 +1733,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -intel-gpu-tools configure 1.13 +intel-gpu-tools configure 1.14 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2220,7 +2259,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by intel-gpu-tools $as_me 1.13, which was +It was created by intel-gpu-tools $as_me 1.14, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3937,7 +3976,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -3983,7 +4022,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4007,7 +4046,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4052,7 +4091,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4076,7 +4115,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4184,6 +4223,45 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- am__api_version='1.15' @@ -4731,7 +4809,7 @@ # Define the identity of the package. PACKAGE='intel-gpu-tools' - VERSION='1.13' + VERSION='1.14' cat >>confdefs.h <<_ACEOF @@ -6744,14 +6822,14 @@ *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -6774,8 +6852,8 @@ -macro_version='2.4.2' -macro_revision='1.3337' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -6789,7 +6867,7 @@ -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. @@ -6838,7 +6916,7 @@ $ECHO "" } -case "$ECHO" in +case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -7031,19 +7109,19 @@ # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -7057,7 +7135,7 @@ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -7068,7 +7146,7 @@ with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -7079,32 +7157,32 @@ $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -7147,33 +7225,38 @@ else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -7184,15 +7267,15 @@ esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -7298,9 +7381,9 @@ fi fi - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -7308,8 +7391,8 @@ esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -7360,7 +7443,7 @@ $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -7400,7 +7483,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -7450,22 +7533,23 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -7483,7 +7567,7 @@ fi -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -7501,30 +7585,6 @@ : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -7647,13 +7707,13 @@ reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then + if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -7781,13 +7841,13 @@ # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -7814,8 +7874,7 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -7851,10 +7910,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -7893,11 +7948,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -7915,8 +7970,8 @@ lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -7969,6 +8024,9 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -8126,8 +8184,8 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -8139,7 +8197,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac @@ -8293,7 +8351,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -8301,7 +8359,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -8314,7 +8372,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -8531,7 +8589,7 @@ if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -8621,7 +8679,7 @@ symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -8654,14 +8712,44 @@ symcode='[ABCDGIRSTW]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -8679,21 +8767,24 @@ # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -8741,11 +8832,11 @@ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -8771,7 +8862,7 @@ { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -8791,13 +8882,13 @@ mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -8818,7 +8909,7 @@ rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -8871,6 +8962,16 @@ + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } @@ -8883,9 +8984,9 @@ lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -8895,8 +8996,8 @@ no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -8908,18 +9009,99 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8928,24 +9110,25 @@ test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -8974,9 +9157,50 @@ rm -rf conftest* ;; +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8990,7 +9214,14 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" @@ -9035,7 +9266,7 @@ *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -9075,13 +9306,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -9093,7 +9325,7 @@ case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -9102,7 +9334,7 @@ esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -9118,7 +9350,7 @@ ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -9229,7 +9461,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -9732,7 +9964,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -9750,7 +9982,7 @@ cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -9789,7 +10021,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -9818,7 +10050,7 @@ _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -9831,32 +10063,32 @@ $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -9864,6 +10096,41 @@ ;; esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default @@ -9900,14 +10167,14 @@ *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -9932,14 +10199,14 @@ *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -9947,8 +10214,6 @@ fi -test -z "$pic_mode" && pic_mode=default - @@ -9964,14 +10229,14 @@ *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -9985,11 +10250,63 @@ + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -10038,7 +10355,7 @@ -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -10077,7 +10394,7 @@ # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -10088,14 +10405,14 @@ ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -10104,15 +10421,8 @@ test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +func_cc_basename $compiler +cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it @@ -10127,22 +10437,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -10165,13 +10475,13 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -10193,22 +10503,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -10231,13 +10541,13 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -10258,7 +10568,7 @@ # Use C for the default configuration in the libtool script -lt_save_CC="$CC" +lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -10320,7 +10630,7 @@ lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -10336,7 +10646,7 @@ lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -10366,7 +10676,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -10384,17 +10694,18 @@ lt_prog_compiler_static= - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -10405,8 +10716,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -10422,6 +10733,11 @@ # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -10492,7 +10808,7 @@ case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -10500,10 +10816,29 @@ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -10519,7 +10854,7 @@ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' + lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -10528,9 +10863,9 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -10555,6 +10890,12 @@ lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -10652,7 +10993,7 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -10681,7 +11022,7 @@ fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -10713,7 +11054,7 @@ lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -10743,7 +11084,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -10775,7 +11116,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -10794,13 +11135,13 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_cv_prog_compiler_static_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= @@ -10920,8 +11261,8 @@ -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -10933,9 +11274,9 @@ ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -10978,9 +11319,9 @@ # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -10995,7 +11336,7 @@ # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -11003,9 +11344,12 @@ # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -11013,7 +11357,7 @@ # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -11035,24 +11379,24 @@ esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -11065,7 +11409,7 @@ case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -11084,7 +11428,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -11100,7 +11444,7 @@ allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -11110,7 +11454,7 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' + export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -11118,61 +11462,89 @@ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -11183,42 +11555,47 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -11227,13 +11604,13 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -11251,8 +11628,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -11264,7 +11641,7 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -11279,9 +11656,9 @@ # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -11298,15 +11675,15 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac - if test "$ld_shlibs" = no; then + if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -11322,7 +11699,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -11330,34 +11707,57 @@ ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -11376,13 +11776,21 @@ hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='${wl}-f,' + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -11401,35 +11809,42 @@ ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='${wl}-bexpall' + export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -11464,7 +11879,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -11472,17 +11887,17 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -11517,7 +11932,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -11525,21 +11940,33 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -11548,7 +11975,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -11578,16 +12005,17 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes @@ -11596,18 +12024,18 @@ # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -11616,7 +12044,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -11635,24 +12063,24 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" + allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -11694,33 +12122,33 @@ ;; hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -11728,25 +12156,25 @@ ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -11758,7 +12186,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -11777,14 +12205,14 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -11792,8 +12220,8 @@ ;; esac fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -11804,7 +12232,7 @@ *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -11815,8 +12243,8 @@ ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. @@ -11826,8 +12254,8 @@ if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } @@ -11839,25 +12267,36 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + link_all_deplibs=no else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; - netbsd*) + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -11871,7 +12310,7 @@ newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -11879,27 +12318,19 @@ *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no @@ -11910,33 +12341,53 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -11947,24 +12398,24 @@ solaris*) no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -11974,11 +12425,11 @@ solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi @@ -11988,10 +12439,10 @@ ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -12040,43 +12491,43 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' + no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' + export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -12091,10 +12542,10 @@ ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi @@ -12102,7 +12553,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -12128,7 +12579,7 @@ # Assume -lc should be added archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -12343,14 +12794,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -12366,28 +12817,35 @@ ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -12401,7 +12859,7 @@ # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -12410,7 +12868,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -12427,14 +12885,16 @@ # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -12442,41 +12902,91 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -12486,18 +12996,18 @@ powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -12505,8 +13015,8 @@ bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -12518,7 +13028,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -12527,8 +13037,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -12544,17 +13054,17 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -12563,8 +13073,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -12591,7 +13101,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -12604,8 +13114,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -12618,7 +13128,7 @@ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -12631,8 +13141,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -12645,8 +13155,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -12664,12 +13174,13 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -12694,26 +13205,15 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -12731,14 +13231,15 @@ dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -12746,8 +13247,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -12756,8 +13257,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -12770,8 +13271,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -12782,7 +13283,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -12790,8 +13291,8 @@ esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -12810,8 +13311,8 @@ esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -12820,13 +13321,33 @@ dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -12870,14 +13391,15 @@ # 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 + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) 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 @@ -12889,17 +13411,29 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -12909,7 +13443,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -12918,58 +13452,68 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -12980,8 +13524,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -12991,11 +13535,11 @@ sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -13003,8 +13547,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -13025,24 +13569,24 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -13060,7 +13604,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -13068,8 +13612,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -13079,20 +13623,35 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + @@ -13189,15 +13748,15 @@ hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then + test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -13212,12 +13771,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -13227,7 +13786,7 @@ - if test "x$enable_dlopen" != xyes; then + if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -13237,23 +13796,23 @@ case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -13291,10 +13850,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else - lt_cv_dlopen="dyld" + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -13302,10 +13861,18 @@ ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" + lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } @@ -13344,11 +13911,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } @@ -13387,7 +13954,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } @@ -13426,7 +13993,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } @@ -13465,7 +14032,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -13486,21 +14053,21 @@ ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -13508,7 +14075,7 @@ if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -13555,9 +14122,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -13587,7 +14154,7 @@ (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -13607,14 +14174,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -13661,9 +14228,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -13693,7 +14260,7 @@ (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -13714,9 +14281,9 @@ $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -13760,7 +14327,7 @@ # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -13788,7 +14355,7 @@ - # Report which library types will actually be built + # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 @@ -13796,13 +14363,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -13810,8 +14377,12 @@ ;; aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -13821,7 +14392,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -13835,7 +14406,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" +CC=$lt_save_CC @@ -20252,6 +20823,17 @@ fi +case "$target_cpu" in + x86*) + build_x86="yes" + ;; + *) + build_x86="no" + ;; +esac + +if test x"$build_x86" = xyes; then + pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OVERLAY_XVLIB" >&5 $as_echo_n "checking for OVERLAY_XVLIB... " >&6; } @@ -20393,6 +20975,34 @@ $as_echo "yes" >&6; } enable_overlay_xlib=yes fi + if test x"$LEX" != "x:" -a x"$YACC" != xyacc; then : + enable_assembler=yes +else + enable_assembler=no +fi +else + enable_overlay_xvlib="no" + enable_overlay_xlib="no" + enable_assembler="no" + BUILD_SHADER_DEBUGGER="no" +fi + if test "x$build_x86" = xyes; then + BUILD_X86_TRUE= + BUILD_X86_FALSE='#' +else + BUILD_X86_TRUE='#' + BUILD_X86_FALSE= +fi + + + if test "x$enable_assembler" = xyes; then + BUILD_ASSEMBLER_TRUE= + BUILD_ASSEMBLER_FALSE='#' +else + BUILD_ASSEMBLER_TRUE='#' + BUILD_ASSEMBLER_FALSE= +fi + if test "x$enable_overlay_xvlib" = xyes; then BUILD_OVERLAY_XVLIB_TRUE= @@ -20762,21 +21372,6 @@ fi -# can we build the assembler? -if test x"$LEX" != "x:" -a x"$YACC" != xyacc; then : - enable_assembler=yes -else - enable_assembler=no -fi - if test "x$enable_assembler" = xyes; then - BUILD_ASSEMBLER_TRUE= - BUILD_ASSEMBLER_FALSE='#' -else - BUILD_ASSEMBLER_TRUE='#' - BUILD_ASSEMBLER_FALSE= -fi - - # ----------------------------------------------------------------------------- # Configuration options # ----------------------------------------------------------------------------- @@ -20905,12 +21500,136 @@ fi +# Check whether --enable-vc4 was given. +if test "${enable_vc4+set}" = set; then : + enableval=$enable_vc4; VC4=$enableval +else + VC4=auto +fi + +if test "x$VC4" = xauto; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_vc4\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_vc4") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + VC4=yes +else + VC4=no +fi +fi +if test "x$VC4" = xyes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRM_VC4" >&5 +$as_echo_n "checking for DRM_VC4... " >&6; } + +if test -n "$DRM_VC4_CFLAGS"; then + pkg_cv_DRM_VC4_CFLAGS="$DRM_VC4_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_vc4\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_vc4") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DRM_VC4_CFLAGS=`$PKG_CONFIG --cflags "libdrm_vc4" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DRM_VC4_LIBS"; then + pkg_cv_DRM_VC4_LIBS="$DRM_VC4_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_vc4\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_vc4") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DRM_VC4_LIBS=`$PKG_CONFIG --libs "libdrm_vc4" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DRM_VC4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_vc4" 2>&1` + else + DRM_VC4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_vc4" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRM_VC4_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (libdrm_vc4) were not met: + +$DRM_VC4_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DRM_VC4_CFLAGS +and DRM_VC4_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DRM_VC4_CFLAGS +and DRM_VC4_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + DRM_VC4_CFLAGS=$pkg_cv_DRM_VC4_CFLAGS + DRM_VC4_LIBS=$pkg_cv_DRM_VC4_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +$as_echo "#define HAVE_VC4 1" >>confdefs.h + +fi + if test "x$VC4" = xyes; then + HAVE_VC4_TRUE= + HAVE_VC4_FALSE='#' +else + HAVE_VC4_TRUE='#' + HAVE_VC4_FALSE= +fi + + # Define a configure option for the shader debugger # Check whether --enable-shader-debugger was given. if test "${enable_shader_debugger+set}" = set; then : enableval=$enable_shader_debugger; BUILD_SHADER_DEBUGGER="$enableval" else - BUILD_SHADER_DEBUGGER=auto + BUILD_SHADER_DEBUGGER=$build_x86 fi @@ -21559,6 +22278,14 @@ as_fn_error $? "conditional \"HAVE_RST2MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_X86_TRUE}" && test -z "${BUILD_X86_FALSE}"; then + as_fn_error $? "conditional \"BUILD_X86\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ASSEMBLER_TRUE}" && test -z "${BUILD_ASSEMBLER_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ASSEMBLER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BUILD_OVERLAY_XVLIB_TRUE}" && test -z "${BUILD_OVERLAY_XVLIB_FALSE}"; then as_fn_error $? "conditional \"BUILD_OVERLAY_XVLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -21571,14 +22298,14 @@ as_fn_error $? "conditional \"BUILD_OVERLAY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${BUILD_ASSEMBLER_TRUE}" && test -z "${BUILD_ASSEMBLER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ASSEMBLER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_NOUVEAU_TRUE}" && test -z "${HAVE_NOUVEAU_FALSE}"; then as_fn_error $? "conditional \"HAVE_NOUVEAU\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_VC4_TRUE}" && test -z "${HAVE_VC4_FALSE}"; then + as_fn_error $? "conditional \"HAVE_VC4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BUILD_SHADER_DEBUGGER_TRUE}" && test -z "${BUILD_SHADER_DEBUGGER_FALSE}"; then as_fn_error $? "conditional \"BUILD_SHADER_DEBUGGER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -21984,7 +22711,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by intel-gpu-tools $as_me 1.13, which was +This file was extended by intel-gpu-tools $as_me 1.14, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22050,7 +22777,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -intel-gpu-tools config.status 1.13 +intel-gpu-tools config.status 1.14 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -22185,6 +22912,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -22234,10 +22962,13 @@ GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -22302,7 +23033,8 @@ finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -22353,9 +23085,12 @@ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ nm_file_list_spec \ +lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -22390,7 +23125,7 @@ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -22417,10 +23152,11 @@ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -22429,19 +23165,16 @@ done ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -23172,55 +23905,53 @@ ;; "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 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. + +# GNU Libtool 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 of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="" +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -23240,6 +23971,9 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -23357,18 +24091,27 @@ # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and in which our libraries should be installed. +# The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -23459,8 +24202,11 @@ # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -23553,13 +24299,13 @@ # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -23611,13 +24357,72 @@ _LT_EOF + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -23626,7 +24431,7 @@ esac -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if @@ -23636,165 +24441,6 @@ sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -23855,6 +24501,7 @@ echo " Assembler : ${enable_assembler}" echo " Debugger : ${enable_debugger}" echo " Overlay : X: ${enable_overlay_xlib}, Xv: ${enable_overlay_xvlib}" +echo " x86-specific tools : ${build_x86}" echo "" echo " • API-Documentation : ${enable_gtk_doc}" echo "" diff -Nru intel-gpu-tools-1.13/configure.ac intel-gpu-tools-1.14/configure.ac --- intel-gpu-tools-1.13/configure.ac 2015-12-02 16:46:18.000000000 +0000 +++ intel-gpu-tools-1.14/configure.ac 2016-03-01 15:59:21.000000000 +0000 @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([intel-gpu-tools], - [1.13], + [1.14], [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel], [intel-gpu-tools]) @@ -34,6 +34,7 @@ AC_SYS_LARGEFILE AC_GNU_SOURCE AC_CANONICAL_HOST +AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([1.12 foreign subdir-objects dist-bzip2]) AM_PATH_PYTHON([3],, [:]) @@ -87,8 +88,31 @@ PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.64 libdrm]) PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) -PKG_CHECK_MODULES(OVERLAY_XVLIB, [xv x11 xext dri2proto >= 2.6], enable_overlay_xvlib=yes, enable_overlay_xvlib=no) -PKG_CHECK_MODULES(OVERLAY_XLIB, [cairo-xlib dri2proto >= 2.6], enable_overlay_xlib=yes, enable_overlay_xlib=no) + +case "$target_cpu" in + x86*) + build_x86="yes" + ;; + *) + build_x86="no" + ;; +esac + +if test x"$build_x86" = xyes; then + PKG_CHECK_MODULES(OVERLAY_XVLIB, [xv x11 xext dri2proto >= 2.6], enable_overlay_xvlib=yes, enable_overlay_xvlib=no) + PKG_CHECK_MODULES(OVERLAY_XLIB, [cairo-xlib dri2proto >= 2.6], enable_overlay_xlib=yes, enable_overlay_xlib=no) + AS_IF([test x"$LEX" != "x:" -a x"$YACC" != xyacc], + [enable_assembler=yes], + [enable_assembler=no]) +else + enable_overlay_xvlib="no" + enable_overlay_xlib="no" + enable_assembler="no" + BUILD_SHADER_DEBUGGER="no" +fi +AM_CONDITIONAL(BUILD_X86, [test "x$build_x86" = xyes]) + +AM_CONDITIONAL(BUILD_ASSEMBLER, [test "x$enable_assembler" = xyes]) AM_CONDITIONAL(BUILD_OVERLAY_XVLIB, [test "x$enable_overlay_xvlib" = xyes]) AM_CONDITIONAL(BUILD_OVERLAY_XLIB, [test "x$enable_overlay_xlib" = xyes]) @@ -109,12 +133,6 @@ fi PKG_CHECK_MODULES(GLIB, glib-2.0) -# can we build the assembler? -AS_IF([test x"$LEX" != "x:" -a x"$YACC" != xyacc], - [enable_assembler=yes], - [enable_assembler=no]) -AM_CONDITIONAL(BUILD_ASSEMBLER, [test "x$enable_assembler" = xyes]) - # ----------------------------------------------------------------------------- # Configuration options # ----------------------------------------------------------------------------- @@ -131,10 +149,22 @@ fi AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) +AC_ARG_ENABLE(vc4, AS_HELP_STRING([--disable-vc4], + [Enable building of vc4 tests (default: auto)]), + [VC4=$enableval], [VC4=auto]) +if test "x$VC4" = xauto; then + PKG_CHECK_EXISTS([libdrm_vc4], [VC4=yes], [VC4=no]) +fi +if test "x$VC4" = xyes; then + PKG_CHECK_MODULES(DRM_VC4, [libdrm_vc4]) + AC_DEFINE(HAVE_VC4, 1, [Have vc4 support]) +fi +AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes]) + # Define a configure option for the shader debugger AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger], [Enable shader debugging support [autodetected]]), - [BUILD_SHADER_DEBUGGER="$enableval"], [BUILD_SHADER_DEBUGGER=auto]) + [BUILD_SHADER_DEBUGGER="$enableval"], [BUILD_SHADER_DEBUGGER=$build_x86]) # Shader debugger depends on python3, intel-genasm and objcopy if test "x$BUILD_SHADER_DEBUGGER" != xno; then @@ -266,6 +296,7 @@ echo " Assembler : ${enable_assembler}" echo " Debugger : ${enable_debugger}" echo " Overlay : X: ${enable_overlay_xlib}, Xv: ${enable_overlay_xvlib}" +echo " x86-specific tools : ${build_x86}" echo "" echo " • API-Documentation : ${enable_gtk_doc}" echo "" diff -Nru intel-gpu-tools-1.13/CONTRIBUTING intel-gpu-tools-1.14/CONTRIBUTING --- intel-gpu-tools-1.13/CONTRIBUTING 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/CONTRIBUTING 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,45 @@ +Patches to intel-gpu-tools are very much welcome, we really want this to be the +universal set of low-level tools and testcases for the Intel kernel gfx driver +on Linux and similar platforms. So please bring on porting patches, bugfixes, +improvements for documentation and new tools and testcases. + +A short list of contribution guidelines: + +- Please submit patches formatted with git send-email/git format-patch or + equivalent to + + Intel GFX discussion + + Please use --subject-prefix="PATCH i-g-t" so that i-g-t patches are easily + identified in the massive amount mails on intel-gfx. To ensure this is always + done just run + + git config format.subjectprefix "PATCH i-g-t" + + from within your i-g-t git checkout. + +- intel-gpu-tools is MIT lincensed and we require contributions to follow the + developer's certificate of origin: http://developercertificate.org/ + +- When submitting new testcases please follow the naming conventions documented + in the generated documentation. Also please make full use of all the helpers and + convenience macros provided by the igt library. The semantic patch lib/igt.cocci + can help with the more automatic conversions. + +- There is no formal review requirement and regular contributors with commit + access can push patches right after submitting them to the mailing lists. But + invasive changes, new helper libraries and contributions from newcomers should + go through a proper review to ensure overall consistency in the codebase. + +- When patches from new contributors (without commit access) are stuck, for + anything related to the regular releases, issues with packaging and + integrating platform support or any other intel-gpu-tools issues, please + contact one of the maintainers (listed in the MAINTAINERS file) and cc the + intel-gfx mailing list. + +- Especially changes to the testcase should get tested on relevant platforms + before committing. For Intel employees that's best done using PRTS, see the + relevant internal howtos. Everyone else can just run piglit with i-g-t tests + locally. + +Happy hacking! diff -Nru intel-gpu-tools-1.13/COPYING intel-gpu-tools-1.14/COPYING --- intel-gpu-tools-1.13/COPYING 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/COPYING 2016-03-01 15:59:21.000000000 +0000 @@ -106,3 +106,23 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, + 2013, 2014 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, + 2002, 2003 by The Internet Software Consortium and Rich Salz + +This code is derived from software contributed to the Internet Software +Consortium by Rich Salz. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff -Nru intel-gpu-tools-1.13/debian/changelog intel-gpu-tools-1.14/debian/changelog --- intel-gpu-tools-1.13/debian/changelog 2016-03-11 12:55:27.000000000 +0000 +++ intel-gpu-tools-1.14/debian/changelog 2016-03-11 12:55:27.000000000 +0000 @@ -1,3 +1,10 @@ +intel-gpu-tools (1.14-1) unstable; urgency=medium + + * New upstream release. + * control: Add libxv-dev and python-docutils to build-depends. + + -- Timo Aaltonen Thu, 10 Mar 2016 22:01:06 +0200 + intel-gpu-tools (1.13-1) unstable; urgency=medium * New upstream release. diff -Nru intel-gpu-tools-1.13/debian/control intel-gpu-tools-1.14/debian/control --- intel-gpu-tools-1.13/debian/control 2016-03-11 12:55:27.000000000 +0000 +++ intel-gpu-tools-1.14/debian/control 2016-03-11 12:55:27.000000000 +0000 @@ -18,7 +18,9 @@ libudev-dev, libunwind-dev, libxrandr-dev, + libxv-dev, pkg-config, + python-docutils, quilt, x11proto-dri2-dev, xutils-dev (>= 1:7.6+6) diff -Nru intel-gpu-tools-1.13/debugger/Makefile.in intel-gpu-tools-1.14/debugger/Makefile.in --- intel-gpu-tools-1.13/debugger/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/debugger/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -88,15 +88,15 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ bin_PROGRAMS = eudb$(EXEEXT) noinst_PROGRAMS = debug_rdata$(EXEEXT) subdir = debugger ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -262,6 +262,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -306,6 +308,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -404,11 +407,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/debugger/system_routine/Makefile.in intel-gpu-tools-1.14/debugger/system_routine/Makefile.in --- intel-gpu-tools-1.13/debugger/system_routine/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/debugger/system_routine/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -88,14 +88,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ noinst_PROGRAMS = eviction_macro$(EXEEXT) sr$(EXEEXT) tiny$(EXEEXT) subdir = debugger/system_routine ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -214,6 +214,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -258,6 +260,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -356,11 +359,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/demos/Android.mk intel-gpu-tools-1.14/demos/Android.mk --- intel-gpu-tools-1.13/demos/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/demos/Android.mk 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,28 @@ +LOCAL_PATH := $(call my-dir) + +#================# + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := intel_sprite_on.c + + +LOCAL_CFLAGS += -DHAVE_TERMIOS_H +LOCAL_CFLAGS += -DANDROID -UNDEBUG +LOCAL_CFLAGS += -std=gnu99 +# Excessive complaining for established cases. Rely on the Linux version warnings. +LOCAL_CFLAGS += -Wno-sign-compare + +LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib + +LOCAL_MODULE := intel_sprite_on + +LOCAL_MODULE_TAGS := optional + +LOCAL_STATIC_LIBRARIES := libintel_gpu_tools + +LOCAL_SHARED_LIBRARIES := libdrm + +include $(BUILD_EXECUTABLE) + +#================# diff -Nru intel-gpu-tools-1.13/demos/Makefile.in intel-gpu-tools-1.14/demos/Makefile.in --- intel-gpu-tools-1.13/demos/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/demos/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -88,14 +88,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ bin_PROGRAMS = intel_sprite_on$(EXEEXT) subdir = demos ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -213,6 +213,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -257,6 +259,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -355,11 +358,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/docs/Makefile.in intel-gpu-tools-1.14/docs/Makefile.in --- intel-gpu-tools-1.13/docs/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/docs/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -87,13 +87,13 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -217,6 +217,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -261,6 +263,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -359,11 +362,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/annotation-glossary.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/annotation-glossary.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/annotation-glossary.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/annotation-glossary.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Annotation Glossary: intel-gpu-tools Reference Manual - + diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/ch01.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/ch01.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/ch01.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/ch01.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ API Reference: intel-gpu-tools Reference Manual - + @@ -51,6 +51,9 @@ GT — GT support library
+Power Management — Power Management related helpers +
+
ioctl wrappers — ioctl wrappers and related functions
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/deprecated-api-index.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/deprecated-api-index.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/deprecated-api-index.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/deprecated-api-index.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Index of deprecated API: intel-gpu-tools Reference Manual - + diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/full-api-index.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/full-api-index.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/full-api-index.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/full-api-index.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ API Index: intel-gpu-tools Reference Manual - + @@ -206,6 +206,10 @@
+igt_calc_fb_size, function in Framebuffer +
+
+
igt_check_boolean_env_var, function in aux
@@ -222,6 +226,10 @@
+igt_clflush_range, function in GT +
+
+
COLOR_BLIT_COPY_BATCH_START, macro in Batch Buffer
@@ -242,6 +250,10 @@
+igt_create_color_pattern_fb, function in Framebuffer +
+
+
igt_create_fb, function in Framebuffer
@@ -250,6 +262,14 @@
+igt_create_image_fb, function in Framebuffer +
+
+
+igt_create_pattern_fb, function in Framebuffer +
+
+
igt_create_stereo_fb, function in Framebuffer
@@ -371,6 +391,10 @@
+DRIVER_VC4, macro in drmtest +
+
+
igt_drm_format_to_bpp, function in Framebuffer
@@ -391,6 +415,10 @@
+DRM_RDWR, macro in ioctl wrappers +
+
+
DROP_ACTIVE, macro in debugfs
@@ -513,6 +541,10 @@
+igt_force_gpu_reset, function in GT +
+
+
igt_fork, macro in Core
@@ -590,6 +622,14 @@
+gem_create_stolen, function in ioctl wrappers +
+
+
+gem_create__has_stolen_support, function in ioctl wrappers +
+
+
gem_execbuf, function in ioctl wrappers
@@ -610,6 +650,14 @@
+gem_global_aperture_size, function in ioctl wrappers +
+
+
+gem_gtt_type, function in ioctl wrappers +
+
+
gem_handle_to_libdrm_bo, function in ioctl wrappers
@@ -634,6 +682,10 @@
+gem_has_softpin, function in ioctl wrappers +
+
+
gem_has_vebox, function in ioctl wrappers
@@ -686,6 +738,10 @@
+gem_require_stolen_support, macro in ioctl wrappers +
+
+
gem_set_caching, function in ioctl wrappers
@@ -706,7 +762,19 @@
-gem_uses_aliasing_ppgtt, function in ioctl wrappers +gem_userptr, function in ioctl wrappers +
+
+
+gem_uses_full_ppgtt, function in ioctl wrappers +
+
+
+gem_uses_ppgtt, function in ioctl wrappers +
+
+
+gem_wait, function in ioctl wrappers
@@ -714,7 +782,7 @@
-igt_get_all_formats, function in Framebuffer +igt_get_all_cairo_formats, function in Framebuffer
@@ -742,6 +810,10 @@
+igt_get_stable_obj_count, function in debugfs +
+
+
igt_get_stop_rings, function in GT
@@ -751,6 +823,22 @@

H

+HANG_ALLOW_BAN, macro in GT +
+
+
+HANG_ALLOW_CAPTURE, macro in GT +
+
+
+igt_hang_ctx, function in GT +
+
+
+HANG_POISON, macro in GT +
+
+
igt_hang_ring, function in GT
@@ -888,6 +976,10 @@
+intel_detect_and_clear_missed_interrupts, function in GT +
+
+
intel_dpio_reg_read, function in I/O
@@ -1160,6 +1252,10 @@
+is_valid_utf8, function in uwildmat +
+
+
IS_VALLEYVIEW, macro in Chipset
@@ -1233,6 +1329,10 @@
+kmstest_probe_connector_config, function in KMS +
+
+
kmstest_restore_vt_mode, function in KMS
@@ -1249,11 +1349,51 @@
+igt_kms_get_alt_edid, function in KMS +
+
+
igt_kms_get_base_edid, function in KMS

L

+LOCAL_DMA_BUF_BASE, macro in ioctl wrappers +
+
+
+LOCAL_DMA_BUF_IOCTL_SYNC, macro in ioctl wrappers +
+
+
+local_dma_buf_sync, struct in ioctl wrappers +
+
+
+LOCAL_DMA_BUF_SYNC_END, macro in ioctl wrappers +
+
+
+LOCAL_DMA_BUF_SYNC_READ, macro in ioctl wrappers +
+
+
+LOCAL_DMA_BUF_SYNC_RW, macro in ioctl wrappers +
+
+
+LOCAL_DMA_BUF_SYNC_START, macro in ioctl wrappers +
+
+
+LOCAL_DMA_BUF_SYNC_VALID_FLAGS_MASK, macro in ioctl wrappers +
+
+
+LOCAL_DMA_BUF_SYNC_WRITE, macro in ioctl wrappers +
+
+
LOCAL_DRM_CAP_ADDFB2_MODIFIERS, macro in ioctl wrappers
@@ -1298,6 +1438,18 @@
+LOCAL_I915_GEM_USERPTR, macro in ioctl wrappers +
+
+
+local_i915_gem_userptr, struct in ioctl wrappers +
+
+
+LOCAL_IOCTL_I915_GEM_USERPTR, macro in ioctl wrappers +
+
+
igt_lock_mem, function in aux
@@ -1454,6 +1606,10 @@
+igt_pipe_crc_new_nonblock, function in debugfs +
+
+
igt_pipe_crc_start, function in debugfs
@@ -1498,6 +1654,18 @@
+igt_pm_enable_audio_runtime_pm, function in Power Management +
+
+
+igt_pm_enable_sata_link_power_management, function in Power Management +
+
+
+igt_pm_restore_sata_link_power_management, function in Power Management +
+
+
port, enum in KMS
@@ -1518,6 +1686,18 @@
+prime_handle_to_fd_for_mmap, function in ioctl wrappers +
+
+
+prime_sync_end, function in ioctl wrappers +
+
+
+prime_sync_start, function in ioctl wrappers +
+
+
igt_print_activity, function in aux
@@ -1576,6 +1756,10 @@

S

+igt_setup_clflush, function in GT +
+
+
igt_setup_runtime_pm, function in aux
@@ -1793,8 +1977,32 @@ igt_unlock_mem, function in aux
+
+uwildmat, enum in uwildmat +
+
+
+uwildmat_poison, function in uwildmat +
+
+
+uwildmat_simple, function in uwildmat +
+

V

+igt_vc4_create_bo, function in VC4 +
+
+
+igt_vc4_get_cleared_bo, function in VC4 +
+
+
+igt_vc4_mmap_bo, function in VC4 +
+
+
igt_vlog, function in Core
@@ -1808,6 +2016,10 @@
+igt_waitchildren_timeout, function in Core +
+
+
igt_wait_for_pm_status, function in aux
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-core-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-core-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-core-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-core-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Core Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-debugfs-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-debugfs-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-debugfs-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-debugfs-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Debugfs Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-drm-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-drm-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-drm-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-drm-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ DRM Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-drv-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-drv-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-drv-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-drv-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ DRV Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
@@ -135,11 +135,20 @@ error-state-capture-bsd + + +
+error-state-capture-bsd1 +
+error-state-capture-bsd2 +
error-state-capture-blt
error-state-capture-vebox
+hangcheck-unterminated +
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-gem-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-gem-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-gem-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-gem-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ GEM Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
@@ -56,6 +56,12 @@ + + + + @@ -86,6 +92,12 @@ + + + + @@ -182,6 +194,12 @@ + + + + @@ -224,6 +242,12 @@ + + + + @@ -518,6 +542,18 @@ + + + + + + + + @@ -536,6 +572,12 @@ + + + + @@ -690,6 +732,38 @@
+

+gem_busy +

+

+Basic check of busy-ioctl ABI. +

+
+

Subtests

+
+gem_busy + 
gem_caching  
+gem_create + 
gem_cs_prefetch  
+gem_exec_basic + 
gem_exec_big  
+gem_exec_reloc + 
gem_fd_exhaustion  
+gem_softpin + 
+gem_stolen + 
gem_storedw_batches_loop  
+gem_sync + 
gem_threaded_access_tiled  
+ + + + + + +
+render +
+bsd +
+bsd1 +
+bsd2 +
+blt +
+vebox +
+
+
+
+

gem_caching

@@ -697,7 +771,7 @@ Test snoop consistency when touching partial cachelines.

-

Subtests

+

Subtests

reads @@ -719,7 +793,7 @@

-

Subtests

+

Subtests

process-exit @@ -739,7 +813,7 @@ Test of pread/pwrite/mmap behavior when writing to active buffers.

-

Subtests

+

Subtests

This test has over 100 subtests. Run gem_concurrent_all --list-subtests to list them.

@@ -753,7 +827,7 @@ Test of pread/pwrite/mmap behavior when writing to active buffers.

-

Subtests

+

Subtests

This test has over 100 subtests. Run gem_concurrent_blit --list-subtests to list them.

@@ -767,7 +841,7 @@ Test the relocations through the CPU domain.

-

Subtests

+

Subtests

basic @@ -780,12 +854,64 @@
+

+gem_create +

+

+This is a test for the extended & old gem_create ioctl, that includes allocation of object from stolen memory and shmem. +

+
+

Subtests

+ + + + + +
+stolen-invalid-flag +
+create-invalid-size +
+create-valid-nonaligned +
+create-invalid-nonaligned +
+
+
+
+

gem_cs_prefetch

Test the CS prefetch behaviour on batches.

+
+

Subtests

+ + + + + + + + +
+basic-default +
+render +
+bsd +
+bsd1 +
+bsd2 +
+blt +
+vebox +
+

@@ -796,15 +922,24 @@ Check whether we correctly invalidate the cs tlb.

-

Subtests

+

Subtests

+ + +
+basic-default +
render
bsd
+bsd1 +
+bsd2 +
blt
@@ -822,7 +957,7 @@ Negative test cases for destroy contexts.

-

Subtests

+

Subtests

double-destroy @@ -848,7 +983,7 @@ Test that context cannot be submitted to unsupported rings.

-

Subtests

+

Subtests

render @@ -882,7 +1017,7 @@

-

Subtests

+

Subtests

basic @@ -902,7 +1037,7 @@ Test basic context switch functionality.

-

Subtests

+

Subtests

basic @@ -928,7 +1063,7 @@ Basic test for context set/get param input validation.

-

Subtests

+

Subtests

basic @@ -982,9 +1117,15 @@

-

Subtests

+

Subtests

+ +
+single +
+engines +
processes
@@ -1011,7 +1152,7 @@ Check ring<->cpu sync using a dummy reloc.

-

Subtests

+

Subtests

render @@ -1049,7 +1190,7 @@ Test that specific ioctls report a wedged GPU (EIO).

-

Subtests

+

Subtests

throttle @@ -1072,7 +1213,7 @@ Run a couple of big batches to force the unbind on misalignment code.

-

Subtests

+

Subtests

minor-normal @@ -1104,7 +1245,7 @@ Run a couple of big batches to force the eviction code.

-

Subtests

+

Subtests

forked-normal @@ -1201,6 +1342,17 @@

Exercises the basic execbuffer using object alignments

+
+

Subtests

+ + + +
+single +
+many +
+

@@ -1211,7 +1363,7 @@ Test whether the kernel rejects relocations with non-gpu domains.

-

Subtests

+

Subtests

cpu-domain @@ -1233,6 +1385,41 @@
+

+gem_exec_basic +

+

+Basic sanity check of execbuf-ioctl rings. +

+
+

Subtests

+ + + + + + + + +
+basic-default +
+basic-render +
+basic-bsd +
+basic-bsd1 +
+basic-bsd2 +
+basic-blt +
+basic-vebox +
+
+
+
+

gem_exec_big

@@ -1248,7 +1435,7 @@

-

Subtests

+

Subtests

cold @@ -1289,7 +1476,7 @@ Submit patches with relocations in memory that will fault.

-

Subtests

+

Subtests

normal @@ -1317,43 +1504,28 @@

-

Subtests

+

Subtests

- - - - -
-render -
-bsd -
-blt -
-vebox -
-render-min -
-bsd-min +default
-blt-min +render
-vebox-min +bsd
-render-max +bsd1
-bsd-max +bsd2
-blt-max +blt
-vebox-max +vebox
@@ -1366,7 +1538,7 @@

-

Subtests

+

Subtests

control @@ -1469,7 +1641,7 @@

-

Subtests

+

Subtests

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
basic-allowed @@ -1500,87 +1672,356 @@
-

-gem_fd_exhaustion -

-

-

-
-
-
-

-gem_fenced_exec_thrash +

+gem_exec_reloc

-Test execbuf fence accounting. +Basic sanity check of execbuf-ioctl relocations.

-

Subtests

+

Subtests

-
-2-spare-fences +mmap-12
-no-spare-fences +cpu-12
-no-spare-fences-busy +wc-12
-no-spare-fences-interruptible +gtt-12
-no-spare-fences-busy-interruptible +mmap-13
-too-many-fences +cpu-13
-
-
-
-
-

-gem_fence_thrash -

-

-

-
-

Subtests

- -
-bo-write-verify-none +wc-13
-bo-write-verify-x +gtt-13
-bo-write-verify-y +mmap-14
-bo-write-verify-threaded-none +cpu-14
-bo-write-verify-threaded-x +wc-14
-bo-write-verify-threaded-y +gtt-14
-bo-copy +mmap-15
-
-
-
-
-

-gem_fence_upload -

-

+

+cpu-15 +
+wc-15 +
+gtt-15 +
+mmap-16 +
+cpu-16 +
+wc-16 +
+gtt-16 +
+mmap-17 +
+cpu-17 +
+wc-17 +
+gtt-17 +
+mmap-18 +
+cpu-18 +
+wc-18 +
+gtt-18 +
+mmap-19 +
+cpu-19 +
+wc-19 +
+gtt-19 +
+mmap-20 +
+cpu-20 +
+wc-20 +
+gtt-20 +
+mmap-21 +
+cpu-21 +
+wc-21 +
+gtt-21 +
+mmap-22 +
+cpu-22 +
+wc-22 +
+gtt-22 +
+mmap-23 +
+cpu-23 +
+wc-23 +
+gtt-23 +
+mmap-24 +
+cpu-24 +
+wc-24 +
+gtt-24 +
+mmap-25 +
+cpu-25 +
+wc-25 +
+gtt-25 +
+mmap-26 +
+cpu-26 +
+wc-26 +
+gtt-26 +
+mmap-27 +
+cpu-27 +
+wc-27 +
+gtt-27 +
+mmap-28 +
+cpu-28 +
+wc-28 +
+gtt-28 +
+mmap-29 +
+cpu-29 +
+wc-29 +
+gtt-29 +
+mmap-30 +
+cpu-30 +
+wc-30 +
+gtt-30 +
+mmap-31 +
+cpu-31 +
+wc-31 +
+gtt-31 +
+mmap-32 +
+cpu-32 +
+wc-32 +
+gtt-32 +
+gpu +
+
+ +
+
+

+gem_fd_exhaustion +

+

+

+
+
+
+

+gem_fenced_exec_thrash +

+

+Test execbuf fence accounting.

-

Subtests

+

Subtests

+ + + + + + + +
+2-spare-fences +
+no-spare-fences +
+no-spare-fences-busy +
+no-spare-fences-interruptible +
+no-spare-fences-busy-interruptible +
+too-many-fences +
+
+
+
+
+

+gem_fence_thrash +

+

+

+
+

Subtests

+ + + + + + + + +
+bo-write-verify-none +
+bo-write-verify-x +
+bo-write-verify-y +
+bo-write-verify-threaded-none +
+bo-write-verify-threaded-x +
+bo-write-verify-threaded-y +
+bo-copy +
+
+
+
+
+

+gem_fence_upload +

+

+

+
+

Subtests

performance @@ -1611,7 +2052,7 @@

-

Subtests

+

Subtests

basic @@ -1640,7 +2081,7 @@ Check for flink/open vs. gem close races.

-

Subtests

+

Subtests

flink_name @@ -1710,7 +2151,7 @@ Test doing many blits with a working set larger than the aperture size.

-

Subtests

+

Subtests

basic @@ -1742,7 +2183,7 @@ Checks that the kernel reports EFAULT when trying to use purged bo.

-

Subtests

+

Subtests

dontneed-before-mmap @@ -1776,7 +2217,7 @@

-

Subtests

+

Subtests

bad-object @@ -1810,7 +2251,7 @@

-

Subtests

+

Subtests

+
basic @@ -1831,6 +2272,9 @@ basic-write-gtt
+coherency +
basic-read-write
@@ -1928,7 +2372,7 @@

-

Subtests

+

Subtests

+
invalid-flags @@ -1946,6 +2390,9 @@ write
+coherency +
write-gtt
@@ -2005,7 +2452,7 @@ Test pwrite/pread consistency when touching partial cachelines.

-

Subtests

+

Subtests

reads @@ -2055,7 +2502,7 @@ Test persistent relocations as used by uxa/libva.

-

Subtests

+

Subtests

normal @@ -2120,7 +2567,7 @@ Test (TLB-)Coherency of pipe_control QW writes.

-

Subtests

+

Subtests

fresh-buffer @@ -2139,7 +2586,7 @@

-

Subtests

+

Subtests

blt-vs-render-ctx0 @@ -2164,7 +2611,7 @@

-

Subtests

+

Subtests

+ + + + +
basic @@ -2178,6 +2625,21 @@
display
+stolen-normal +
+stolen-uncached +
+stolen-snoop +
+stolen-display +
+pagefault-pread +
@@ -2190,7 +2652,7 @@ Test pread behavior when getting values out of just-drawn-to buffers.

-

Subtests

+

Subtests

default-normal @@ -2239,7 +2701,7 @@

-

Subtests

+

Subtests

+ + + +
basic @@ -2254,6 +2716,18 @@ display
+stolen-normal +
+stolen-uncached +
+stolen-snoop +
+stolen-display +
big-cpu
@@ -2276,7 +2750,7 @@

-

Subtests

+

Subtests

uncached-copy-correctness @@ -2335,32 +2809,104 @@ Test speed of concurrent reads between engines.

-

Subtests

+

Subtests

+ + + + + + + + + + + + + + + + + + + + + + + +
read-read-1x1
+read-write-1x1 +
+write-read-1x1 +
+write-write-1x1 +
read-read-128x128
+read-write-128x128 +
+write-read-128x128 +
+write-write-128x128 +
read-read-256x256
+read-write-256x256 +
+write-read-256x256 +
+write-write-256x256 +
read-read-512x512
+read-write-512x512 +
+write-read-512x512 +
+write-write-512x512 +
read-read-1024x1024
+read-write-1024x1024 +
+write-read-1024x1024 +
+write-write-1024x1024 +
read-read-2048x2048
+read-write-2048x2048 +
+write-read-2048x2048 +
+write-write-2048x2048 +
read-read-4096x4096
+read-write-4096x4096 +
+write-read-4096x4096 +
+write-write-4096x4096 +
read-read-8192x8192
+read-write-8192x8192 +
+write-read-8192x8192 +
+write-write-8192x8192 +
@@ -2372,7 +2918,7 @@

-

Subtests

+

Subtests

new-obj @@ -2400,7 +2946,7 @@

-

Subtests

+

Subtests

bad-register @@ -2423,7 +2969,7 @@ Check that kernel relocation overflows are caught.

-

Subtests

+

Subtests

invalid-address @@ -2497,7 +3043,7 @@ Test kernel relocations vs. gpu races.

-

Subtests

+

Subtests

normal @@ -2610,7 +3156,7 @@ Advanced test for the render_copy() function.

-

Subtests

+

Subtests

normal @@ -2635,7 +3181,7 @@

-

Subtests

+

Subtests

basic @@ -2657,7 +3203,7 @@

-

Subtests

+

Subtests

basic @@ -2680,7 +3226,7 @@ Collection of tests targeting request retirement code paths.

-

Subtests

+

Subtests

retire-vma-not-inactive
@@ -2694,130 +3240,229 @@

-

Subtests

+

Subtests

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
params
-params-ctx-render +params-ctx +
+reset-stats-default +
+reset-stats-ctx-default +
+ban-default +
+ban-ctx-default +
+reset-count-default +
+reset-count-ctx-default +
+unrelated-ctx-default +
+close-pending-default +
+close-pending-ctx-default +
+close-pending-fork-default +
+close-pending-fork-reverse-default +
+defer-hangcheck-default +
+reset-stats-render +
+reset-stats-ctx-render +
+ban-render +
+ban-ctx-render +
+reset-count-render +
+reset-count-ctx-render +
+unrelated-ctx-render +
+close-pending-render +
+close-pending-ctx-render +
+close-pending-fork-render +
+close-pending-fork-reverse-render +
+defer-hangcheck-render +
+reset-stats-bsd +
+reset-stats-ctx-bsd +
+ban-bsd +
+ban-ctx-bsd +
+reset-count-bsd +
+reset-count-ctx-bsd +
+unrelated-ctx-bsd +
+close-pending-bsd +
+close-pending-ctx-bsd
-reset-stats-render +close-pending-fork-bsd
-reset-stats-ctx-render +close-pending-fork-reverse-bsd
-ban-render +defer-hangcheck-bsd
-ban-ctx-render +reset-stats-bsd1
-reset-count-render +reset-stats-ctx-bsd1
-reset-count-ctx-render +ban-bsd1
-unrelated-ctx-render +ban-ctx-bsd1
-close-pending-render +reset-count-bsd1
-close-pending-ctx-render +reset-count-ctx-bsd1
-close-pending-fork-render +unrelated-ctx-bsd1
-close-pending-fork-reverse-render +close-pending-bsd1
-defer-hangcheck-render +close-pending-ctx-bsd1
-params-ctx-blt +close-pending-fork-bsd1
-reset-stats-blt +close-pending-fork-reverse-bsd1
-reset-stats-ctx-blt +defer-hangcheck-bsd1
-ban-blt +reset-stats-bsd2
-ban-ctx-blt +reset-stats-ctx-bsd2
-reset-count-blt +ban-bsd2
-reset-count-ctx-blt +ban-ctx-bsd2
-unrelated-ctx-blt +reset-count-bsd2
-close-pending-blt +reset-count-ctx-bsd2
-close-pending-ctx-blt +unrelated-ctx-bsd2
-close-pending-fork-blt +close-pending-bsd2
-close-pending-fork-reverse-blt +close-pending-ctx-bsd2
-defer-hangcheck-blt +close-pending-fork-bsd2
-params-ctx-bsd +close-pending-fork-reverse-bsd2
-reset-stats-bsd +defer-hangcheck-bsd2
-reset-stats-ctx-bsd +reset-stats-blt
-ban-bsd +reset-stats-ctx-blt
-ban-ctx-bsd +ban-blt
-reset-count-bsd +ban-ctx-blt
-reset-count-ctx-bsd +reset-count-blt
-unrelated-ctx-bsd +reset-count-ctx-blt
-close-pending-bsd +unrelated-ctx-blt
-close-pending-ctx-bsd +close-pending-blt
-close-pending-fork-bsd +close-pending-ctx-blt
-close-pending-fork-reverse-bsd +close-pending-fork-blt
-defer-hangcheck-bsd +close-pending-fork-reverse-blt
-params-ctx-vebox +defer-hangcheck-blt
reset-stats-vebox @@ -2866,31 +3511,133 @@

-

Subtests

+

Subtests

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-blitter +basic-default
render
-blitter-interruptible +bsd +
+bsd1 +
+bsd2 +
+blt +
+vebox +
+basic-default-interruptible
render-interruptible
-blitter-forked-1 +bsd-interruptible +
+bsd1-interruptible +
+bsd2-interruptible +
+blt-interruptible +
+vebox-interruptible +
+basic-default-hang +
+render-hang +
+bsd-hang +
+bsd1-hang +
+bsd2-hang +
+blt-hang +
+vebox-hang +
+basic-default-child +
+render-child +
+bsd-child +
+bsd1-child +
+bsd2-child +
+blt-child +
+vebox-child +
+basic-default-forked +
+render-forked +
+bsd-forked +
+bsd1-forked +
+bsd2-forked +
+blt-forked +
+vebox-forked +
+basic-default-bomb +
+render-bomb +
+bsd-bomb +
+bsd1-bomb
-render-forked-1 +bsd2-bomb
-blitter-forked-4 +blt-bomb
-render-forked-4 +vebox-bomb
@@ -2904,7 +3651,7 @@ Ensure inter-ring dependencies are respected.

-

Subtests

+

Subtests

sync-render-blitter-write-read @@ -2933,7 +3680,7 @@ gem_ring_sync_loop

-Basic check of ring<->ring sync using a dummy reloc. +Basic check of ring<->ring write synchronisation.


@@ -2954,7 +3701,7 @@ Check for proper synchronization of tiling changes vs. tiled gpu access.

-

Subtests

+

Subtests

untiled-to-tiled @@ -2988,13 +3735,82 @@
+

+gem_softpin +

+

+

+
+

Subtests

+ + + + + + + + +
+invalid +
+softpin +
+overlap +
+noreloc +
+evict-active +
+evict-snoop +
+evict-hang +
+
+
+
+
+

+gem_stolen +

+

+This test verifies the exetended gem_create ioctl, that includes allocation of obj from stolen region +

+
+

Subtests

+ + + + + + + + +
+stolen-clear +
+stolen-no-mmap +
+stolen-pwrite +
+stolen-pread +
+stolen-copy +
+large-object-alloc +
+stolen-fill-purge +
+
+
+
+

gem_storedw_batches_loop

-

Subtests

+

Subtests

normal @@ -3020,13 +3836,13 @@ Basic CS check using MI_STORE_DATA_IMM.

-

Subtests

+

Subtests

+ + + + + +
-basic-bsd +basic-default
-long-bsd +long-default
basic-render @@ -3035,6 +3851,24 @@ long-render
+basic-bsd +
+long-bsd +
+basic-bsd1 +
+long-bsd1 +
+basic-bsd2 +
+long-bsd2 +
basic-blt
@@ -3058,7 +3892,7 @@ Test of streaming writes into active GPU sources

-

Subtests

+

Subtests

cpu-sync @@ -3101,6 +3935,68 @@
+

+gem_sync +

+

+Basic check of ring<->ring write synchronisation. +

+
+

Subtests

+ + + + + + + + + + + + + + + + + +
+basic-default +
+forked-default +
+basic-render +
+forked-render +
+basic-bsd +
+forked-bsd +
+basic-bsd1 +
+forked-bsd1 +
+basic-bsd2 +
+forked-bsd2 +
+basic-blt +
+forked-blt +
+basic-vebox +
+forked-vebox +
+basic-all +
+forked-all +
+
+
+
+

gem_threaded_access_tiled

@@ -3117,7 +4013,7 @@ Test doing many tiled blits, with a working set larger than the aperture size.

-

Subtests

+

Subtests

basic @@ -3139,7 +4035,7 @@

-

Subtests

+

Subtests

basic @@ -3159,7 +4055,7 @@ Test pwrite/pread consistency when touching partial cachelines.

-

Subtests

+

Subtests

reads @@ -3200,7 +4096,7 @@ Exercise swizzle code for swapping.

-

Subtests

+

Subtests

non-threaded @@ -3263,7 +4159,7 @@

-

Subtests

+

Subtests

+
input-checking @@ -3284,6 +4180,9 @@ forbidden-operations
+relocations +
create-destroy-unsync
@@ -3504,7 +4403,7 @@

-

Subtests

+

Subtests

render_timeout @@ -3526,7 +4425,7 @@

-

Subtests

+

Subtests

read @@ -3549,7 +4448,7 @@ Check read/write syncpoints when switching rings.

-

Subtests

+

Subtests

blt2render diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-gen3-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-gen3-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-gen3-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-gen3-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Gen 3 Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-kms-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-kms-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-kms-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-kms-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ KMS Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
@@ -56,6 +56,12 @@ + + + + @@ -110,7 +116,7 @@ @@ -128,6 +134,12 @@ + + + + @@ -375,6 +387,128 @@
+

+kms_chv_cursor_fail +

+

+Exercise CHV pipe C cursor fail +

+
+

Subtests

+
+kms_chv_cursor_fail + 
kms_crtc_background_color  
-kms_force_connector +kms_force_connector_basic  
+kms_mmap_write_crc + 
kms_mmio_vs_cs_flip  
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+pipe-A-64x64-left-edge +
+pipe-A-64x64-right-edge +
+pipe-A-64x64-top-edge +
+pipe-A-64x64-bottom-edge +
+pipe-B-64x64-left-edge +
+pipe-B-64x64-right-edge +
+pipe-B-64x64-top-edge +
+pipe-B-64x64-bottom-edge +
+pipe-C-64x64-left-edge +
+pipe-C-64x64-right-edge +
+pipe-C-64x64-top-edge +
+pipe-C-64x64-bottom-edge +
+pipe-A-128x128-left-edge +
+pipe-A-128x128-right-edge +
+pipe-A-128x128-top-edge +
+pipe-A-128x128-bottom-edge +
+pipe-B-128x128-left-edge +
+pipe-B-128x128-right-edge +
+pipe-B-128x128-top-edge +
+pipe-B-128x128-bottom-edge +
+pipe-C-128x128-left-edge +
+pipe-C-128x128-right-edge +
+pipe-C-128x128-top-edge +
+pipe-C-128x128-bottom-edge +
+pipe-A-256x256-left-edge +
+pipe-A-256x256-right-edge +
+pipe-A-256x256-top-edge +
+pipe-A-256x256-bottom-edge +
+pipe-B-256x256-left-edge +
+pipe-B-256x256-right-edge +
+pipe-B-256x256-top-edge +
+pipe-B-256x256-bottom-edge +
+pipe-C-256x256-left-edge +
+pipe-C-256x256-right-edge +
+pipe-C-256x256-top-edge +
+pipe-C-256x256-bottom-edge +
+
+
+
+

kms_crtc_background_color

@@ -391,7 +525,7 @@ Use the display CRC support to validate cursor plane functionality. The test will position the cursor plane either fully onscreen, partially onscreen, or fully offscreen, using either a fully opaque or fully transparent surface. In each case it then reads the PF CRC and compares it with the CRC value obtained when the cursor plane was disabled.

-

Subtests

+

Subtests

cursor-size-change @@ -539,7 +673,7 @@

-

Subtests

+

Subtests

draw-method-xrgb8888-mmap-cpu-untiled @@ -664,7 +798,7 @@ Performs various write operations to the scanout buffer while FBC is enabled. CRC checks will be used to make sure the modifications to scanout buffer are detected.

-

Subtests

+

Subtests

page_flip @@ -711,7 +845,7 @@ Test the relationship between fbcon and the frontbuffer tracking infrastructure.

-

Subtests

+

Subtests

fbc @@ -745,7 +879,7 @@

-

Subtests

+

Subtests

This test has over 100 subtests. Run kms_flip --list-subtests to list them.

@@ -768,7 +902,7 @@ Test page flips and tiling scenarios

-

Subtests

+

Subtests

flip-changes-tiling @@ -802,21 +936,27 @@
-

-kms_force_connector +

+kms_force_connector_basic

Check the debugfs force connector/edid features work correctly.

-

Subtests

+

Subtests

+ +
+force-load-detect +
force-connector-state
force-edid
+prune-stale-modes +
@@ -829,7 +969,7 @@ Test the Kernel's frontbuffer tracking mechanism and its related features: FBC and PSR

-

Subtests

+

Subtests

This test has over 100 subtests. Run kms_frontbuffer_tracking --list-subtests to list them.

@@ -845,13 +985,22 @@
+

+kms_mmap_write_crc +

+

+Use the display CRC support to validate mmap write to an already uncached future scanout buffer. +

+
+
+

kms_mmio_vs_cs_flip

-

Subtests

+

Subtests

setplane_vs_cs_flip @@ -880,7 +1029,7 @@ Exercise the FDI lane bifurcation code for IVB in the kernel by settingdifferent combinations of modes for pipes B and C.

-

Subtests

+

Subtests

pipe-B-dpms-off-modeset-pipe-C @@ -908,7 +1057,7 @@

-

Subtests

+

Subtests

+ + + + + +
bad-pipe @@ -929,6 +1078,12 @@ read-crc-pipe-A-frame-sequence
+nonblocking-crc-pipe-A +
+nonblocking-crc-pipe-A-frame-sequence +
suspend-read-crc-pipe-A
@@ -941,6 +1096,12 @@ read-crc-pipe-B-frame-sequence
+nonblocking-crc-pipe-B +
+nonblocking-crc-pipe-B-frame-sequence +
suspend-read-crc-pipe-B
@@ -953,6 +1114,12 @@ read-crc-pipe-C-frame-sequence
+nonblocking-crc-pipe-C +
+nonblocking-crc-pipe-C-frame-sequence +
suspend-read-crc-pipe-C
@@ -969,7 +1136,7 @@

-

Subtests

+

Subtests

plane-position-covered-pipe-A-plane-1 @@ -1153,9 +1320,12 @@

-

Subtests

+

Subtests

+ + +
+psr_basic +
primary_page_flip
@@ -1221,6 +1391,12 @@
dpms_off_psr_exit
+suspend_psr_active +
+suspend_psr_exit +
@@ -1241,7 +1417,7 @@

-

Subtests

+

Subtests

direct-render @@ -1260,7 +1436,7 @@

-

Subtests

+

Subtests

primary-rotation-180 @@ -1312,7 +1488,7 @@

-

Subtests

+

Subtests

basic-clone-single-crtc @@ -1354,7 +1530,7 @@

-

Subtests

+

Subtests

universal-plane-pipe-A-functional @@ -1413,7 +1589,7 @@ Test speed of WaitVblank.

-

Subtests

+

Subtests

accuracy diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-pm-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-pm-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-pm-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-pm-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ PM Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-prime-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-prime-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-prime-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-prime-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Prime Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
@@ -38,6 +38,18 @@ + + + + + + + + @@ -72,13 +84,88 @@

Description

+

+prime_mmap +

+

+

+
+

Subtests

+
+prime_mmap + 
+prime_mmap_coherency + 
prime_nv_api  
+ + + + + + + + + + + + +
+test_correct +
+test_map_unmap +
+test_reprime +
+test_forked +
+test_correct_cpu_write +
+test_forked_cpu_write +
+test_refcounting +
+test_dup +
+test_userptr +
+test_errors +
+test_invalid_sync_flags +
+test_aperture_limit +
+
+
+
+
+

+prime_mmap_coherency +

+

+Test dma-buf mmap on !llc platforms mostly and provoke coherency bugs so we know for sure where we need the sync ioctls. +

+
+

Subtests

+ + + + + +
+read +
+read-and-fail +
+write +
+write-and-fail +
+
+
+
+

prime_nv_api

-

Subtests

+

Subtests

i915_nv_import_twice @@ -127,7 +214,7 @@

-

Subtests

+

Subtests

test1_macro @@ -167,7 +254,7 @@

-

Subtests

+

Subtests

i915_nv_sharing @@ -202,10 +289,10 @@ prime_self_import

-Check whether prime import/export works on the same device. +Check whether prime import/export works on the same device... but with different fds.

-

Subtests

+

Subtests

basic-with_one_bo diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-sysfs-tests.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-sysfs-tests.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-sysfs-tests.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-sysfs-tests.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Sysfs Tests: intel-gpu-tools Reference Manual - + @@ -30,7 +30,7 @@

Programs

-
+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-test-programs-common-features.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-test-programs-common-features.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/igt-test-programs-common-features.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/igt-test-programs-common-features.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Common Features: intel-gpu-tools Reference Manual - + @@ -83,7 +83,7 @@ The following exit status codes are defined:

-
+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/index.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/index.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/index.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/index.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ intel-gpu-tools Reference Manual: intel-gpu-tools Reference Manual - + @@ -15,7 +15,7 @@

- for intel-gpu-tools 1.13 + for intel-gpu-tools 1.14 .

@@ -52,6 +52,9 @@ GT — GT support library
+Power Management — Power Management related helpers +
+
ioctl wrappers — ioctl wrappers and related functions
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-aux.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-aux.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-aux.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-aux.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ aux: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

Functions

-
+
@@ -291,7 +291,7 @@

Types and Values

-
+
@@ -337,7 +337,7 @@
void
 igt_fork_signal_helper (void);

Fork a child process using igt_fork_helper to interrupt the parent process -with a SIGUSR1 signal at regular quick intervals. The corresponding dummy +with a SIGCONT signal at regular quick intervals. The corresponding dummy signal handler is installed in the parent process.

This is useful to exercise ioctl error paths, at least where those can be exercises by interrupting blocking waits, like stalling for the gpu. This @@ -366,8 +366,8 @@ . Useful as an exchange function for igt_permute_array().

-

Parameters

-
+

Parameters

+
@@ -405,8 +405,8 @@ function is called to exchange two elements in the array when needed.

-

Parameters

-
+

Parameters

+
@@ -444,8 +444,8 @@ automated runs the progress indicator is suppressed when not running on a terminal.

-

Parameters

-
+

Parameters

+
@@ -487,8 +487,8 @@ bool default_value);

This function should be used to parse boolean environment variable options.

-

Parameters

-
+

Parameters

+
@@ -509,7 +509,7 @@
-

Returns

+

Returns

The boolean value of the environment variable env_var as decoded by atoi() if it is set and default_value @@ -522,7 +522,7 @@

bool
 igt_aub_dump_enabled (void);
-

Returns

+

Returns

True if AUB dumping is enabled with IGT_DUMP_AUB=1 in the environment, false otherwise.

@@ -536,8 +536,8 @@ , which can then be run with igt_trash_aperture().

-

Parameters

-
+

Parameters

+
@@ -608,8 +608,8 @@ inspection of the display is useful. Or when running a testcase in the background.

-

Parameters

-
+

Parameters

+
@@ -642,8 +642,8 @@ user isn't seeing what was expected.

Force test fail when N/n is pressed.

-

Parameters

-
+

Parameters

+
@@ -672,7 +672,7 @@

Sets up the runtime PM helper functions and enables runtime PM. To speed up tests the autosuspend delay is set to 0.

-

Returns

+

Returns

True if runtime pm is available, false otherwise.

@@ -682,7 +682,7 @@
enum igt_runtime_pm_status
 igt_get_runtime_pm_status (void);
-

Returns

+

Returns

The current runtime PM status.

@@ -694,8 +694,8 @@

Waits until for the driver to switch to into the desired runtime PM status, with a 10 second timeout.

-

Parameters

-
+

Parameters

+
@@ -709,7 +709,7 @@
-

Returns

+

Returns

True if the desired runtime PM status was attained, false if the operation timed out.

@@ -726,7 +726,7 @@
uint64_t
 intel_get_avail_ram_mb (void);
-

Returns

+

Returns

The amount of unused system RAM available in MB.

@@ -736,7 +736,7 @@
uint64_t
 intel_get_total_ram_mb (void);
-

Returns

+

Returns

The total amount of system RAM available in MB.

@@ -746,7 +746,7 @@
uint64_t
 intel_get_total_swap_mb (void);
-

Returns

+

Returns

The total amount of swap space available in MB.

@@ -754,7 +754,7 @@

intel_require_memory ()

void
-intel_require_memory (uint32_t count,
+intel_require_memory (uint64_t count,
                       uint64_t size,
                       unsigned  mode);

Computes the total amount of memory required to allocate count @@ -775,8 +775,8 @@ assumption that any test that needs to check for memory requirements is a thrashing test unsuitable for slow simulated systems.

-

Parameters

-
+

Parameters

+
@@ -827,8 +827,8 @@ previously locked memory.

Use igt_unlock_mem to release the currently locked memory.

-

Parameters

-
+

Parameters

+
@@ -858,8 +858,8 @@ problem is that the usleep() calls will return early, making us evaluate COND too often, possibly eating valuable CPU cycles.

-

Parameters

-
+

Parameters

+
@@ -885,7 +885,7 @@
-

Returns

+

Returns

True of COND evaluated to true, false otherwise.

@@ -901,8 +901,8 @@

Please consider using igt_set_module_param_int() for the integer and bool parameters.

-

Parameters

-
+

Parameters

+
@@ -932,8 +932,8 @@

This is a wrapper for igt_set_module_param() that takes an integer instead of a string. Please see igt_set_module_param().

-

Parameters

-
+

Parameters

+
@@ -972,8 +972,8 @@

enum igt_runtime_pm_status

-

Members

-
+

Members

+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Batch-Buffer.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Batch-Buffer.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Batch-Buffer.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Batch-Buffer.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Batch Buffer: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

Functions

-
+
@@ -282,7 +282,7 @@

Types and Values

-
+
@@ -344,8 +344,8 @@ must be supplied since libdrm doesn't expose it directly.

-

Parameters

-
+

Parameters

+
@@ -366,7 +366,7 @@
-

Returns

+

Returns

The allocated and initialized batchbuffer object.

@@ -385,8 +385,8 @@

Releases all resource of the batchbuffer object batch .

-

Parameters

-
+

Parameters

+
@@ -408,8 +408,8 @@

Submits the batch for execution on the blitter engine, selecting the right ring depending upon the hardware platform.

-

Parameters

-
+

Parameters

+
@@ -432,8 +432,8 @@

Submits the batch for execution on ring .

-

Parameters

-
+

Parameters

+
@@ -463,8 +463,8 @@

Submits the batch for execution on the render engine with the supplied hardware context.

-

Parameters

-
+

Parameters

+
@@ -493,8 +493,8 @@

Resets batch by allocating a new gem buffer object as backing storage.

-

Parameters

-
+

Parameters

+
@@ -519,8 +519,8 @@ into the batchbuffer. Note that the length must be DWORD aligned, i.e. multiples of 32bits.

-

Parameters

-
+

Parameters

+
@@ -567,8 +567,8 @@ is actually tiled.

This is the only way buffers get added to the validate list.

-

Parameters

-
+

Parameters

+
@@ -640,8 +640,8 @@

This macro needs a pointer to an intel_batchbuffer structure called batch in scope.

-

Parameters

-
+

Parameters

+
@@ -672,8 +672,8 @@

This macro needs a pointer to an intel_batchbuffer structure called batch in scope.

-

Parameters

-
+

Parameters

+
@@ -695,8 +695,8 @@

This macro needs a pointer to an intel_batchbuffer structure called batch in scope.

-

Parameters

-
+

Parameters

+
@@ -736,8 +736,8 @@

This macro needs a pointer to an intel_batchbuffer structure called batch in scope.

-

Parameters

-
+

Parameters

+
@@ -806,8 +806,8 @@

This emits a 2D copy operation using blitter commands into the supplied batch buffer object.

-

Parameters

-
+

Parameters

+
@@ -896,8 +896,8 @@ . Note that size must be page-aligned.

-

Parameters

-
+

Parameters

+
@@ -935,8 +935,8 @@ igt_buf_width (struct igt_buf *buf);

Computes the width in 32-bit pixels of the given buffer.

-

Parameters

-
+

Parameters

+
@@ -950,7 +950,7 @@
-

Returns

+

Returns

The width of the buffer.

@@ -961,8 +961,8 @@ igt_buf_height (struct igt_buf *buf);

Computes the height in 32-bit pixels of the given buffer.

-

Parameters

-
+

Parameters

+
@@ -976,7 +976,7 @@
-

Returns

+

Returns

The height of the buffer.

@@ -998,8 +998,8 @@ using the gen9 fast copy blitter command.

The source and destination surfaces cannot overlap.

-

Parameters

-
+

Parameters

+
@@ -1074,8 +1074,8 @@ unsigned dst_y);

Like igt_blitter_fast_copy(), but talking to the kernel directly.

-

Parameters

-
+

Parameters

+
@@ -1173,8 +1173,8 @@ is optional and can be NULL.

-

Parameters

-
+

Parameters

+
@@ -1241,8 +1241,8 @@
igt_render_copyfunc_t
 igt_get_render_copyfunc (int devid);
-

Parameters

-
+

Parameters

+
@@ -1256,7 +1256,7 @@
-

Returns

+

Returns

The platform-specific render copy function pointer for the device specified with devid . Will return NULL when no render copy function is @@ -1280,8 +1280,8 @@

A fill function will emit a batchbuffer to the kernel which executes the specified blit fill operation using the media/gpgpu engine.

-

Parameters

-
+

Parameters

+
@@ -1333,8 +1333,8 @@
igt_fillfunc_t
 igt_get_media_fillfunc (int devid);
-

Parameters

-
+

Parameters

+
@@ -1348,7 +1348,7 @@
-

Returns

+

Returns

The platform-specific media fill function pointer for the device specified with devid . Will return NULL when no media fill function is implemented.

@@ -1360,8 +1360,8 @@
igt_fillfunc_t
 igt_get_gpgpu_fillfunc (int devid);
-

Parameters

-
+

Parameters

+
@@ -1375,7 +1375,7 @@
-

Returns

+

Returns

The platform-specific gpgpu fill function pointer for the device specified with devid . Will return NULL when no gpgpu fill function is implemented.

@@ -1398,8 +1398,8 @@ destination buffer on completion. This utility provides a simple way to keep the render engine busy for a set time for various tests.

-

Parameters

-
+

Parameters

+
@@ -1431,8 +1431,8 @@
igt_media_spinfunc_t
 igt_get_media_spinfunc (int devid);
-

Parameters

-
+

Parameters

+
@@ -1446,7 +1446,7 @@
-

Returns

+

Returns

The platform-specific media spin function pointer for the device specified with devid . Will return NULL when no media spin function is implemented.

@@ -1510,8 +1510,8 @@ libdrm buffer object with suitable data needed by the render copy and the fill functions.

-

Members

-
+

Members

+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Chipset.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Chipset.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Chipset.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Chipset.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Chipset: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

Functions

-
+
@@ -351,7 +351,7 @@

Types and Values

-
+
@@ -395,7 +395,7 @@ intel_get_pci_device (void);

Looks up the main graphics pci device using libpciaccess.

-

Returns

+

Returns

The pci_device, exits the program on any failures.

@@ -407,8 +407,8 @@

Queries the kernel for the pci device id corresponding to the drm file descriptor.

-

Parameters

-
+

Parameters

+
@@ -422,7 +422,7 @@
-

Returns

+

Returns

The devid, exits the program on any failures.

@@ -433,8 +433,8 @@ intel_gen (uint32_t devid);

Computes the Intel GFX generation for the give device id.

-

Parameters

-
+

Parameters

+
@@ -448,7 +448,7 @@
-

Returns

+

Returns

The GFX generation on successful lookup, -1 on failure.

@@ -703,8 +703,8 @@

enum pch_type

-

Members

-
+

Members

+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Core.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Core.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Core.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Core.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Core: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

Functions

-
+
@@ -309,6 +309,14 @@ + + + +
+void + +igt_waitchildren_timeout () +
#define igt_fork_helper() @@ -463,7 +471,7 @@

Types and Values

-
+
@@ -646,6 +654,19 @@ intel gpu to be present). Then individual subtests can be run with "--run-subtest". Usage help for tests with subtests can be obtained with the "--help" command line option.

+

A wildcard expression can be given to --run-subtest to specify a subset of +subtests to run. See https://tools.ietf.org/html/rfc3977section-4 for a +description of allowed wildcard expressions. +Some examples of allowed wildcard expressions are:

+
    +
  • '*basic*' match any subtest containing basic

  • +
  • 'basic-???' match any subtest named basic- with 3 characters after -

  • +
  • 'basic-[0-9]' match any subtest named basic- with a single number after -

  • +
  • 'basic-[^0-9]' match any subtest named basic- with a single non numerical character after -

  • +
  • 'basic*,advanced*' match any subtest starting basic or advanced

  • +
  • '*,!basic*' match any subtest not starting basic

  • +
  • 'basic*,!basic-render*' match any subtest starting basic but not starting basic-render

  • +
@@ -658,8 +679,8 @@ "--help-description" option and is also included in the generated documentation.

-

Parameters

-
+

Parameters

+
@@ -698,7 +719,7 @@ igt_subtest_init_parse_opts (int *argc, char **argv, const char *extra_short_opts, - struct option *extra_long_opts, + const struct option *extra_long_opts, const char *help_str, igt_opt_handler_t extra_opt_handler, void *handler_data); @@ -709,8 +730,8 @@

Tests without special needs should just use igt_subtest_init() or use igt_main directly instead of their own main() function.

-

Parameters

-
+

Parameters

+
@@ -757,7 +778,7 @@
-

Returns

+

Returns

Forwards any option parsing errors from getopt_long.

@@ -772,8 +793,8 @@ igt_main block instead of stitching the test's main() function together manually.

-

Parameters

-
+

Parameters

+
@@ -802,8 +823,8 @@

C preprocessor helper to concatenate two variables while properly expanding them.

-

Parameters

-
+

Parameters

+
@@ -834,8 +855,8 @@ combinatorial tests.

This is a simpler version of igt_subtest_f()

-

Parameters

-
+

Parameters

+
@@ -860,8 +881,8 @@

Like igt_subtest(), but also accepts a printf format string instead of a static string.

-

Parameters

-
+

Parameters

+
@@ -881,7 +902,7 @@
const char *
 igt_subtest_name (void);
-

Returns

+

Returns

The name of the currently executed subtest or NULL if called from outside a subtest block.

@@ -892,7 +913,7 @@
bool
 igt_only_list_subtests (void);
-

Returns

+

Returns

Returns true if only subtest should be listed and any setup code must be skipped, false otherwise.

@@ -904,15 +925,15 @@ igt_simple_init_parse_opts (int *argc, char **argv, const char *extra_short_opts, - struct option *extra_long_opts, + const struct option *extra_long_opts, const char *help_str, igt_opt_handler_t extra_opt_handler, void *handler_data);

This initializes a simple test without any support for subtests and allows an arbitrary set of additional options.

-

Parameters

-
+

Parameters

+
@@ -968,8 +989,8 @@ igt_simple_main block instead of stitching the test's main() function together manually.

-

Parameters

-
+

Parameters

+
@@ -1003,8 +1024,8 @@ failed).

For normal tests without subtest it will directly exit.

-

Parameters

-
+

Parameters

+
@@ -1053,8 +1074,8 @@

For normal tests without subtest it will directly exit with the given exitcode.

-

Parameters

-
+

Parameters

+
@@ -1089,8 +1110,8 @@

Fails (sub-)test if the condition is not met.

Should be used everywhere where a test checks results.

-

Parameters

-
+

Parameters

+
@@ -1113,8 +1134,8 @@

In addition to the plain igt_assert() helper this allows to print additional information to help debugging test failures.

-

Parameters

-
+

Parameters

+
@@ -1143,8 +1164,8 @@

Fails (sub-)test if the condition is met.

Should be used everywhere where a test checks results.

-

Parameters

-
+

Parameters

+
@@ -1168,8 +1189,8 @@

In addition to the plain igt_assert() helper this allows to print additional information to help debugging test failures.

-

Parameters

-
+

Parameters

+
@@ -1199,8 +1220,8 @@

Like igt_assert(), but displays the values being compared on failure instead of simply printing the stringified expression.

-

Parameters

-
+

Parameters

+
@@ -1238,8 +1259,8 @@
#define             igt_assert_cmpuint(n1, cmp, ncmp, n2)

Like igt_assert_cmpint(), but for unsigned ints.

-

Parameters

-
+

Parameters

+
@@ -1277,8 +1298,8 @@
#define             igt_assert_cmpu64(n1, cmp, ncmp, n2)

Like igt_assert_cmpuint(), but for larger ints.

-

Parameters

-
+

Parameters

+
@@ -1316,8 +1337,8 @@
#define             igt_assert_cmpdouble(n1, cmp, ncmp, n2)

Like igt_assert_cmpint(), but for doubles.

-

Parameters

-
+

Parameters

+
@@ -1359,8 +1380,8 @@

Like igt_assert(), but displays the values being compared on failure instead of simply printing the stringified expression.

-

Parameters

-
+

Parameters

+
@@ -1388,8 +1409,8 @@

Like igt_assert_eq(), but for uint32_t.

-

Parameters

-
+

Parameters

+
@@ -1417,8 +1438,8 @@

Like igt_assert_eq_u32(), but for uint64_t.

-

Parameters

-
+

Parameters

+
@@ -1446,8 +1467,8 @@

Like igt_assert_eq(), but for doubles.

-

Parameters

-
+

Parameters

+
@@ -1478,8 +1499,8 @@

Like igt_assert(), but displays the values being compared on failure instead of simply printing the stringified expression.

-

Parameters

-
+

Parameters

+
@@ -1507,8 +1528,8 @@

Like igt_assert_neq(), but for uint32_t.

-

Parameters

-
+

Parameters

+
@@ -1536,8 +1557,8 @@

Like igt_assert_neq_u32(), but for uint64_t.

-

Parameters

-
+

Parameters

+
@@ -1565,8 +1586,8 @@

Like igt_assert_neq(), but for doubles.

-

Parameters

-
+

Parameters

+
@@ -1597,8 +1618,8 @@

Like igt_assert(), but displays the values being compared on failure instead of simply printing the stringified expression.

-

Parameters

-
+

Parameters

+
@@ -1629,8 +1650,8 @@

Like igt_assert(), but displays the values being compared on failure instead of simply printing the stringified expression.

-

Parameters

-
+

Parameters

+
@@ -1659,8 +1680,8 @@

Like igt_assert(), but displays the values being compared on failure instead of simply printing the stringified expression.

-

Parameters

-
+

Parameters

+
@@ -1683,8 +1704,8 @@ skipping. This is useful to streamline the skip logic since it allows for a more flat code control flow, similar to igt_assert()

-

Parameters

-
+

Parameters

+
@@ -1707,8 +1728,8 @@ skipping. This is useful to streamline the skip logic since it allows for a more flat code control flow, similar to igt_assert()

-

Parameters

-
+

Parameters

+
@@ -1733,8 +1754,8 @@

In addition to the plain igt_require() helper this allows to print additional information to help debugging test failures.

-

Parameters

-
+

Parameters

+
@@ -1766,8 +1787,8 @@

In addition to the plain igt_skip_on() helper this allows to print additional information to help debugging test failures.

-

Parameters

-
+

Parameters

+
@@ -1800,8 +1821,8 @@

Note that igt_skip() will not be forwarded, feature tests need to be done before spawning threads with igt_fork().

-

Parameters

-
+

Parameters

+
@@ -1837,6 +1858,16 @@
+

igt_waitchildren_timeout ()

+
void
+igt_waitchildren_timeout (int seconds,
+                          const char *reason);
+

Wait for all children forked with igt_fork, for a maximum of seconds +.

+

Wraps igt_waitchildren() and igt_set_timeout()

+
+
+

igt_fork_helper()

#define             igt_fork_helper(proc)

This is a magic control flow block which denotes an asynchronous helper @@ -1851,8 +1882,8 @@

Calling igt_wait_helper() joins a helper process and igt_stop_helper() forcefully terminates it.

-

Parameters

-
+

Parameters

+
@@ -1874,8 +1905,8 @@

Joins a helper process. It is an error to call this on a helper process which hasn't been spawned yet.

-

Parameters

-
+

Parameters

+
@@ -1897,8 +1928,8 @@

Terminates a helper process. It is an error to call this on a helper process which hasn't been spawned yet.

-

Parameters

-
+

Parameters

+
@@ -1922,8 +1953,8 @@ parameter can be used to figure this out and act accordingly.

-

Parameters

-
+

Parameters

+
@@ -1954,8 +1985,8 @@ igt_fork_helper(). The list of exit handlers is reset when forking to avoid issues with children cleanup up the parent's state too early.

-

Parameters

-
+

Parameters

+
@@ -1994,7 +2025,7 @@ simulation environments. This i-g-t mode is selected by setting the INTEL_SIMULATION environment variable to 1.

-

Returns

+

Returns

True when run in simulation mode, false otherwise.

@@ -2006,8 +2037,8 @@

Simple macro to select between two values (e.g. number of test rounds or test buffer size) depending upon whether i-g-t is run in simulation mode or not.

-

Parameters

-
+

Parameters

+
@@ -2059,8 +2090,8 @@ recommended since crucial issues only reported at the IGT_LOG_WARN level are ignored.

-

Parameters

-
+

Parameters

+
@@ -2105,8 +2136,8 @@

If there is no need to wrap up a vararg list in the caller it is simpler to just use igt_log().

-

Parameters

-
+

Parameters

+
@@ -2144,8 +2175,8 @@

Wrapper for igt_log() for message at the IGT_LOG_DEBUG level.

-

Parameters

-
+

Parameters

+
@@ -2166,8 +2197,8 @@

Wrapper for igt_log() for message at the IGT_LOG_INFO level.

-

Parameters

-
+

Parameters

+
@@ -2188,8 +2219,8 @@

Wrapper for igt_log() for message at the IGT_LOG_WARN level.

-

Parameters

-
+

Parameters

+
@@ -2210,8 +2241,8 @@

Wrapper for igt_log() for message at the IGT_LOG_CRITICAL level.

-

Parameters

-
+

Parameters

+
@@ -2234,8 +2265,8 @@ printing warnings. This is useful to streamline the test logic since it allows for a more flat code control flow, similar to igt_assert()

-

Parameters

-
+

Parameters

+
@@ -2261,8 +2292,8 @@

In addition to the plain igt_warn_on_f() helper this allows to print additional information (again as warnings) to help debugging test failures.

-

Parameters

-
+

Parameters

+
@@ -2298,8 +2329,8 @@ zero. But for clarity the timeout set with this function should be cleared with igt_reset_timeout().

-

Parameters

-
+

Parameters

+
@@ -2335,8 +2366,8 @@

Open a datafile for test, first try from installation directory then from build directory.

-

Parameters

-
+

Parameters

+
@@ -2423,8 +2454,8 @@ only set use_SIGKILL directly.

-

Members

-
+

Members

+
@@ -2466,8 +2497,8 @@

enum igt_log_level

-

Members

-
+

Members

+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-debugfs.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-debugfs.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-debugfs.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-debugfs.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ debugfs: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

Functions

-
+
@@ -103,6 +103,14 @@ + + + + + + + +
+igt_pipe_crc_t * + +igt_pipe_crc_new_nonblock () +
void @@ -127,7 +135,7 @@
-void +int igt_pipe_crc_get_crcs () @@ -165,12 +173,20 @@ igt_enable_prefault ()
+int + +igt_get_stable_obj_count () +

Types and Values

-
+
@@ -259,8 +275,8 @@

This opens a debugfs file as a Unix file descriptor. The filename should be relative to the drm device's root, i.e. without "drm/<minor>".

-

Parameters

-
+

Parameters

+
@@ -281,7 +297,7 @@
-

Returns

+

Returns

The Unix file descriptor for the debugfs file or -1 if that didn't work out.

@@ -294,8 +310,8 @@

This opens a debugfs file as a libc FILE. The filename should be relative to the drm device's root, i.e. without "drm/<minor>".

-

Parameters

-
+

Parameters

+
@@ -316,7 +332,7 @@
-

Returns

+

Returns

The libc FILE pointer for the debugfs file or NULL if that didn't work out.

@@ -330,8 +346,8 @@ for the substring specified in substring .

-

Parameters

-
+

Parameters

+
@@ -353,7 +369,7 @@
-

Returns

+

Returns

True if the substring is found to occur in filename

@@ -366,8 +382,8 @@

This is just a convenience wrapper for __igt_debugfs_read. See its documentation.

-

Parameters

-
+

Parameters

+
@@ -400,8 +416,8 @@ be random testcase failures when different screen contents end up with the same CRC by chance.

-

Parameters

-
+

Parameters

+
@@ -433,8 +449,8 @@ unsafe.

This should only ever be used for diagnostic debug output.

-

Parameters

-
+

Parameters

+
@@ -465,10 +481,52 @@ enum intel_pipe_crc_source source);

This sets up a new pipe CRC capture object for the given pipe and source -.

+ +in blocking mode.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

pipe

display pipe to use as source

 

source

CRC tap point to use as source

 
+
-

Parameters

-
+

Returns

+

A pipe CRC object for the given pipe +and source +. The library +assumes that the source is always available since recent kernels support at +least INTEL_PIPE_CRC_SOURCE_AUTO everywhere.

+ + +
+
+

igt_pipe_crc_new_nonblock ()

+
igt_pipe_crc_t *
+igt_pipe_crc_new_nonblock (enum pipe pipe,
+                           enum intel_pipe_crc_source source);
+

This sets up a new pipe CRC capture object for the given pipe + and source + +in nonblocking mode.

+
+

Parameters

+
@@ -489,8 +547,8 @@
-

Returns

-

A pipe CRC object if the given pipe +

Returns

+

A pipe CRC object for the given pipe and source . The library assumes that the source is always available since recent kernels support at @@ -505,8 +563,8 @@

Frees all resources associated with pipe_crc .

-

Parameters

-
+

Parameters

+
@@ -528,8 +586,8 @@

Starts the CRC capture process on pipe_crc .

-

Parameters

-
+

Parameters

+
@@ -551,8 +609,8 @@

Stops the CRC capture process on pipe_crc .

-

Parameters

-
+

Parameters

+
@@ -569,7 +627,7 @@

igt_pipe_crc_get_crcs ()

-
void
+
int
 igt_pipe_crc_get_crcs (igt_pipe_crc_t *pipe_crc,
                        int n_crcs,
                        igt_crc_t **out_crcs);
@@ -583,8 +641,8 @@

Callers must start and stop the capturing themselves by calling igt_pipe_crc_start() and igt_pipe_crc_stop().

-

Parameters

-
+

Parameters

+
@@ -609,6 +667,12 @@
+
+

Returns

+

The number of CRCs captured. Should be equal to n_crcs +in blocking +mode, but can be less (even zero) in non-blocking mode.

+

@@ -625,8 +689,8 @@

This function also calls the interactive debug with the "crc" domain, so you can make use of this feature to actually see the screen that is being CRC'd.

-

Parameters

-
+

Parameters

+
@@ -655,8 +719,8 @@

This calls the debugfs interface the drm/i915 GEM driver exposes to drop or evict certain classes of gem buffer objects.

-

Parameters

-
+

Parameters

+
@@ -687,6 +751,30 @@ igt_enable_prefault (void);

Enable prefault (again) through the debugfs interface.

+
+
+

igt_get_stable_obj_count ()

+
int
+igt_get_stable_obj_count (int driver);
+

This puts the driver into a stable (quiescent) state and then returns the +current number of gem buffer objects as reported in the i915_gem_objects +debugFS interface.

+
+

Parameters

+
+++++ + + + + + +

driver

fd to drm/i915 GEM driver

 
+
+

Types and Values

@@ -710,8 +798,8 @@ are private and should not be inspected by testcases.

-

Members

-
+

Members

+
@@ -746,8 +834,8 @@ suitable for checking planes, cursor, color correction and any other output-agnostic features.

-

Members

-
+

Members

+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools.devhelp2 intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools.devhelp2 --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools.devhelp2 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools.devhelp2 2016-03-01 16:10:39.000000000 +0000 @@ -11,6 +11,7 @@ + @@ -47,6 +48,7 @@ + @@ -90,6 +92,7 @@ + @@ -150,6 +153,7 @@ + @@ -158,6 +162,7 @@ + @@ -186,6 +191,7 @@ + @@ -216,6 +222,7 @@ + @@ -231,9 +238,13 @@ + + + + @@ -247,7 +258,7 @@ - + @@ -290,16 +301,27 @@ + + + + + + + + + + + @@ -311,13 +333,17 @@ + + + + @@ -326,6 +352,7 @@ + @@ -335,19 +362,39 @@ - + + + + + + + + + + + + + + + + + + + + + diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Draw.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Draw.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Draw.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Draw.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Draw: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

Functions

-
+
@@ -75,7 +75,7 @@

Types and Values

-
+
@@ -110,8 +110,8 @@

Simple function to transform the enum into a string. Useful when naming subtests and printing debug messages.

-

Parameters

-
+

Parameters

+
@@ -145,8 +145,8 @@

This function draws a colored rectangle on the destination buffer, allowing you to specify the method used to draw the rectangle.

-

Parameters

-
+

Parameters

+
@@ -240,8 +240,8 @@

This is exactly the same as igt_draw_rect, but you can pass an igt_fb instead of manually providing its details. See igt_draw_rect.

-

Parameters

-
+

Parameters

+
@@ -312,8 +312,8 @@ uint32_t color);

This function just paints an igt_fb using the provided color.

-

Parameters

-
+

Parameters

+
@@ -345,8 +345,8 @@

enum igt_draw_method

-

Members

-
+

Members

+
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-drmtest.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-drmtest.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-drmtest.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-drmtest.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ drmtest: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

Functions

-
+
@@ -114,7 +114,7 @@

Types and Values

-
+
@@ -130,6 +130,10 @@ + + + + @@ -157,8 +161,8 @@

Macro to compute the size of the static array arr .

-

Parameters

-
#defineDRIVER_VC4
#define mmap64
+

Parameters

+
@@ -181,8 +185,8 @@ to a specified unit a .

-

Parameters

-
+

Parameters

+
@@ -211,7 +215,7 @@

Get an i915 drm card index number for use in /dev or /sys. The minor index of the legacy node is returned, not of the control or render node.

-

Returns

+

Returns

The i915 drm index or -1 on error

@@ -223,8 +227,8 @@

Open a drm legacy device node. This function always returns a valid file descriptor.

-

Parameters

-
+

Parameters

+
@@ -238,7 +242,7 @@
-

Returns

+

Returns

a drm file descriptor

@@ -249,8 +253,8 @@ drm_open_driver_master (int chipset);

Open a drm legacy device node and ensure that it is drm master.

-

Parameters

-
+

Parameters

+
@@ -264,7 +268,7 @@
-

Returns

+

Returns

The drm file descriptor or -1 on error

@@ -275,8 +279,8 @@ drm_open_driver_render (int chipset);

Open a drm render device node.

-

Parameters

-
+

Parameters

+
@@ -290,7 +294,7 @@
-

Returns

+

Returns

The drm file descriptor or -1 on error

@@ -306,8 +310,8 @@

This function simply allows tests to make additional calls in-between, if so desired.

-

Parameters

-
+

Parameters

+
@@ -330,8 +334,8 @@ that in any failure case the return value is non-zero and a precise error is logged into errno. Uses igt_assert() internally.

-

Parameters

-
+

Parameters

+
@@ -352,8 +356,8 @@

This macro wraps drmIoctl() and uses igt_assert to check that it has been successfully executed.

-

Parameters

-
+

Parameters

+
@@ -386,8 +390,8 @@

This macro wraps drmIoctl() and uses igt_assert to check that it fails, returning a particular value in errno.

-

Parameters

-
+

Parameters

+
@@ -433,6 +437,12 @@
+
+

DRIVER_VC4

+
#define DRIVER_VC4 (0x1 << 2)
+
+
+

mmap64

#define mmap64 igt_mmap64
diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Framebuffer.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Framebuffer.html
--- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Framebuffer.html	2015-12-02 16:48:05.000000000 +0000
+++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Framebuffer.html	2016-03-01 16:10:39.000000000 +0000
@@ -3,7 +3,7 @@
 
 
 Framebuffer: intel-gpu-tools Reference Manual
-
+
 
 
 
@@ -33,13 +33,21 @@
 

Functions

-
+
+ + + + + + + + + + + + + + + + @@ -167,7 +196,7 @@ void @@ -175,7 +204,7 @@

Types and Values

-
+void + +igt_calc_fb_size () +
unsigned int @@ -64,6 +72,27 @@ unsigned int +igt_create_pattern_fb () +
unsigned int + +igt_create_color_pattern_fb () +
unsigned int + +igt_create_image_fb () +
unsigned int + igt_create_stereo_fb ()
-igt_get_all_formats () +igt_get_all_cairo_formats ()
+
@@ -219,6 +248,67 @@

Functions

+

igt_calc_fb_size ()

+
void
+igt_calc_fb_size (int fd,
+                  int width,
+                  int height,
+                  int bpp,
+                  uint64_t tiling,
+                  unsigned *size_ret,
+                  unsigned *stride_ret);
+

This function returns valid stride and size values for a framebuffer with the +specified parameters.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

fd

the DRM file descriptor

 

width

width of the framebuffer in pixels

 

height

height of the framebuffer in pixels

 

bpp

bytes per pixel of the framebuffer

 

tiling

tiling layout of the framebuffer (as framebuffer modifier)

 

size_ret

returned size for the framebuffer

 

stride_ret

returned stride for the framebuffer

 
+
+
+
+

igt_create_fb_with_bo_size ()

unsigned int
 igt_create_fb_with_bo_size (int fd,
@@ -236,8 +326,8 @@
 

The backing storage of the framebuffer is filled with all zeros, i.e. black for rgb pixel formats.

-

Parameters

-
+

Parameters

+
@@ -288,7 +378,7 @@
-

Returns

+

Returns

The kms id of the created framebuffer.

@@ -309,8 +399,8 @@

The backing storage of the framebuffer is filled with all zeros, i.e. black for rgb pixel formats.

-

Parameters

-
+

Parameters

+
@@ -351,7 +441,7 @@
-

Returns

+

Returns

The kms id of the created framebuffer.

@@ -375,8 +465,8 @@

Compared to igt_create_fb() this function also fills the entire framebuffer with the given color, which is useful for some simple pipe crc based tests.

-

Parameters

-
+

Parameters

+
@@ -415,7 +505,7 @@ - + @@ -432,7 +522,222 @@

g

gree value to use as fill color

green value to use as fill color

 
-

Returns

+

Returns

+

The kms id of the created framebuffer on success or a negative error code on +failure.

+
+ +
+
+

igt_create_pattern_fb ()

+
unsigned int
+igt_create_pattern_fb (int fd,
+                       int width,
+                       int height,
+                       uint32_t format,
+                       uint64_t tiling,
+                       struct igt_fb *fb);
+

This function allocates a gem buffer object suitable to back a framebuffer +with the requested properties and then wraps it up in a drm framebuffer +object. All metadata is stored in fb +.

+

Compared to igt_create_fb() this function also draws the standard test pattern +into the framebuffer.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

fd

open i915 drm file descriptor

 

width

width of the framebuffer in pixel

 

height

height of the framebuffer in pixel

 

format

drm fourcc pixel format code

 

tiling

tiling layout of the framebuffer

 

fb

pointer to an igt_fb structure

 
+
+
+

Returns

+

The kms id of the created framebuffer on success or a negative error code on +failure.

+
+
+
+
+

igt_create_color_pattern_fb ()

+
unsigned int
+igt_create_color_pattern_fb (int fd,
+                             int width,
+                             int height,
+                             uint32_t format,
+                             uint64_t tiling,
+                             double r,
+                             double g,
+                             double b,
+                             struct igt_fb *fb);
+

This function allocates a gem buffer object suitable to back a framebuffer +with the requested properties and then wraps it up in a drm framebuffer +object. All metadata is stored in fb +.

+

Compared to igt_create_fb() this function also fills the entire framebuffer +with the given color, and then draws the standard test pattern into the +framebuffer.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

fd

open i915 drm file descriptor

 

width

width of the framebuffer in pixel

 

height

height of the framebuffer in pixel

 

format

drm fourcc pixel format code

 

tiling

tiling layout of the framebuffer

 

r

red value to use as fill color

 

g

green value to use as fill color

 

b

blue value to use as fill color

 

fb

pointer to an igt_fb structure

 
+
+
+

Returns

+

The kms id of the created framebuffer on success or a negative error code on +failure.

+
+
+
+
+

igt_create_image_fb ()

+
unsigned int
+igt_create_image_fb (int drm_fd,
+                     int width,
+                     int height,
+                     uint32_t format,
+                     uint64_t tiling,
+                     const char *filename,
+                     struct igt_fb *fb);
+

Create a framebuffer with the specified image. If width + is zero the +image width will be used. If height + is zero the image height will be used.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

drm_fd

open i915 drm file descriptor

 

width

width of the framebuffer in pixel or 0

 

height

height of the framebuffer in pixel or 0

 

format

drm fourcc pixel format code

 

tiling

tiling layout of the framebuffer

 

filename

filename of the png image to draw

 

fb

pointer to an igt_fb structure

 
+
+
+

Returns

The kms id of the created framebuffer on success or a negative error code on failure.

@@ -448,8 +753,8 @@

Create a framebuffer for use with the stereo 3D mode specified by mode .

-

Parameters

-
+

Parameters

+
@@ -480,7 +785,7 @@
-

Returns

+

Returns

The kms id of the created framebuffer on success or a negative error code on failure.

@@ -496,8 +801,8 @@ Note that if this framebuffer is still in use on a primary plane the kernel will disable the corresponding crtc.

-

Parameters

-
+

Parameters

+
@@ -527,11 +832,11 @@

This initializes a cairo surface for fb and then allocates a drawing context for it. The return cairo drawing context should be released by calling -cairo_destroy(). This also sets a default font for drawing text on +cairo_destroy(). This also sets a default font for drawing text on framebuffers.

-

Parameters

-
+

Parameters

+
@@ -552,7 +857,7 @@
-

Returns

+

Returns

The created cairo drawing context.

@@ -572,8 +877,8 @@ context cr .

-

Parameters

-
+

Parameters

+
@@ -641,8 +946,8 @@ the drawing context cr .

-

Parameters

-
+

Parameters

+
@@ -714,8 +1019,8 @@ to the given values using the drawing context cr .

-

Parameters

-
+

Parameters

+
@@ -783,8 +1088,8 @@
  • a set of color and b/w gradients.

  • -

    Parameters

    -
    +

    Parameters

    +
    @@ -823,8 +1128,8 @@

    This function can be used to draw a scaled version of the supplied png image, which is loaded from the package data directory.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -876,8 +1181,8 @@ image stored at filename .

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -917,8 +1222,8 @@ needs to be done manually with explicit cairo calls on cr .

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -954,7 +1259,7 @@
    -

    Returns

    +

    Returns

    The width of the drawn text.

    @@ -965,8 +1270,8 @@ igt_bpp_depth_to_drm_format (int bpp, int depth);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -987,7 +1292,7 @@
    -

    Returns

    +

    Returns

    The rgb drm fourcc pixel format code corresponding to the given bpp and depth @@ -1000,8 +1305,8 @@

    uint32_t
     igt_drm_format_to_bpp (uint32_t drm_format);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1015,7 +1320,7 @@
    -

    Returns

    +

    Returns

    The bits per pixel for the given drm fourcc pixel format code. Fails hard if no match was found.

    @@ -1026,8 +1331,8 @@
    const char *
     igt_format_str (uint32_t drm_format);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1041,7 +1346,7 @@
    -

    Returns

    +

    Returns

    Human-readable fourcc pixel format code for drm_format or "invalid" no match was found.

    @@ -1049,15 +1354,15 @@

    -

    igt_get_all_formats ()

    +

    igt_get_all_cairo_formats ()

    void
    -igt_get_all_formats (const uint32_t **formats,
    -                     int *format_count);
    -

    This functions returns an array of all the drm fourcc codes supported by this -library. The caller must free the allocated array again with free().

    +igt_get_all_cairo_formats (const uint32_t **formats, + int *format_count); +

    This functions returns an array of all the drm fourcc codes supported by +cairo and this library.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1116,8 +1421,8 @@

    enum igt_text_align

    -

    Members

    -
    +

    Members

    +
    diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-GT.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-GT.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-GT.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-GT.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,11 +3,11 @@ GT: intel-gpu-tools Reference Manual - + - + @@ -20,7 +20,7 @@ - +
    Home Up PrevNextNext
    @@ -33,7 +33,7 @@

    Functions

    -
    +
    @@ -51,6 +51,13 @@ + + + + @@ -64,7 +71,15 @@ + + + + + + + + + + + + + + + +
    struct igt_hang_ring +igt_hang_ctx () +
    struct igt_hang_ring + igt_hang_ring ()
    -int +void + +igt_force_gpu_reset () +
    +void igt_fork_hang_helper () @@ -108,12 +123,36 @@ igt_get_stop_rings ()
    +int + +igt_setup_clflush () +
    +void + +igt_clflush_range () +
    +unsigned + +intel_detect_and_clear_missed_interrupts () +

    Types and Values

    -
    +
    @@ -124,6 +163,18 @@ + + + + + + + + + + + + @@ -151,9 +202,25 @@

    Convenience helper to check whether advanced hang injection is supported by the kernel. Uses igt_skip to automatically skip the test/subtest if this isn't the case.

    +

    Note that we can't simply just call this from igt_hang_ring since some +tests want to exercise gpu wedging behavior. For which we intentionally +disable gpu reset support, but still want to inject a hang, see for example +tests/gem_eio.c Instead, we expect that the first invocation of +igt_require_hand_ring be from a vanilla context and use the has_gpu_reset() +determined then for all later instances. This allows us the convenience +of double checking when injecting hangs, whilst pushing the complexity +to the tests that are deliberating trying to break the box.

    +

    This function is also controlled by the environment variables:

    +

    IGT_HANG (boolean) - if false, skip all tests that try to inject a hang. +Default: true

    +

    IGT_HANG_WITHOUT_RESET (boolean) - if true, allow the hang even if the +kernel does not support GPU recovery. The machine will be wedged afterwards +(and so require a reboot between testing), but it does allow limited testing +to be done under hang injection. +Default: false

    -

    Parameters

    -
    igt_hang_ring_t
    #defineHANG_POISON
    #defineHANG_ALLOW_BAN
    #defineHANG_ALLOW_CAPTURE
    enum stop_ring_flags
    +

    Parameters

    +
    @@ -176,6 +243,16 @@
    +

    igt_hang_ctx ()

    +
    struct igt_hang_ring
    +igt_hang_ctx (int fd,
    +              uint32_t ctx,
    +              int ring,
    +              unsigned  flags,
    +              uint64_t *offset);
    +
    +
    +

    igt_hang_ring ()

    struct igt_hang_ring
     igt_hang_ring (int fd,
    @@ -185,8 +262,8 @@
     igt_hang_ring_t structure which must be passed to igt_post_hang_ring() for
     hang post-processing (after the gpu hang interaction has been tested.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -207,7 +284,7 @@
    -

    Returns

    +

    Returns

    Structure with helper internal state for igt_post_hang_ring().

    @@ -220,8 +297,8 @@

    This function does the necessary post-processing after a gpu hang injected with igt_hang_ring().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -244,15 +321,25 @@
    +

    igt_force_gpu_reset ()

    +
    void
    +igt_force_gpu_reset (void);
    +

    forces a gpu reset using the i915_wedged debugfs interface. To be used to +recover from situations where the hangcheck didn't trigger and/or the gpu is +stuck, either because the test manually disabled gpu resets or because the +test hit an hangcheck bug

    +
    +
    +

    igt_fork_hang_helper ()

    -
    int
    +
    void
     igt_fork_hang_helper (void);

    Fork a child process using igt_fork_helper to hang the default engine of the GPU at regular intervals.

    This is useful to exercise slow running code (such as aperture placement) which needs to be robust against a GPU reset.

    -

    In tests with subtests this function can be called outside of failure -catching code blocks like igt_fixture or igt_subtest.

    +

    This function automatically skips when test requirements aren't met using +igt_skip().


    @@ -271,7 +358,7 @@

    This functions opens the debugfs forcewake file and so prevents the GT from suspending. The reference is automatically dropped when the is closed.

    -

    Returns

    +

    Returns

    The file descriptor of the forcewake handle or -1 if that didn't work out.

    @@ -283,8 +370,8 @@

    This converts the specified ring to a ring flag to be used with igt_get_stop_rings() and igt_set_stop_rings().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -298,7 +385,7 @@
    -

    Returns

    +

    Returns

    Ring flag for the given ring.

    @@ -327,8 +414,8 @@ notify the driver. Driver controls hang log messaging based on these flags and thus prevents false positives on logs.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -349,10 +436,30 @@ igt_get_stop_rings (void);

    Read current ring flags from 'i915_ring_stop' debugfs entry.

    -

    Returns

    +

    Returns

    Current ring flags.

    +
    +
    +

    igt_setup_clflush ()

    +
    int
    +igt_setup_clflush (void);
    +
    +
    +
    +

    igt_clflush_range ()

    +
    void
    +igt_clflush_range (void *addr,
    +                   int size);
    +
    +
    +
    +

    intel_detect_and_clear_missed_interrupts ()

    +
    unsigned
    +intel_detect_and_clear_missed_interrupts
    +                               (int fd);
    +

    Types and Values

    @@ -360,17 +467,37 @@

    igt_hang_ring_t

    typedef struct {
     	unsigned handle;
    +	unsigned ctx;
     	unsigned ban;
    +	unsigned flags;
     } igt_hang_ring_t;
     

    +

    HANG_POISON

    +
    #define HANG_POISON 0xc5c5c5c5
    +
    +
    +
    +
    +

    HANG_ALLOW_BAN

    +
    #define HANG_ALLOW_BAN 1
    +
    +
    +
    +
    +

    HANG_ALLOW_CAPTURE

    +
    #define HANG_ALLOW_CAPTURE 2
    +
    +
    +
    +

    enum stop_ring_flags

    Enumeration of all supported flags for igt_set_stop_rings().

    -

    Members

    -
    +

    Members

    +
    diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-ioctl-wrappers.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-ioctl-wrappers.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-ioctl-wrappers.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-ioctl-wrappers.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,10 +3,10 @@ ioctl wrappers: intel-gpu-tools Reference Manual - + - + @@ -19,7 +19,7 @@ - +
    Home UpPrevPrev Next
    @@ -33,7 +33,7 @@

    Functions

    -
    +
    @@ -129,6 +129,14 @@ + + + + + + + + + + + + + + + + @@ -250,6 +280,14 @@ void + + + + @@ -319,10 +357,26 @@ + + + + + + + + @@ -354,11 +408,27 @@ uint64_t + + + + + + + + + + + + + + + + + + + +
    +int + +gem_wait () +
    void @@ -137,6 +145,22 @@
    +bool + +gem_create__has_stolen_support () +
    +uint32_t + +gem_create_stolen () +
    uint32_t @@ -186,6 +210,12 @@
    #define +gem_require_stolen_support() +
    #define gem_require_mmap_wc()
    +gem_userptr () +
    +void + gem_sw_finish ()
    +int + +gem_gtt_type () +
    +bool + +gem_uses_ppgtt () +
    bool -gem_uses_aliasing_ppgtt () +gem_uses_full_ppgtt ()
    +gem_global_aperture_size () +
    +uint64_t + gem_mappable_aperture_size ()
    +bool + +gem_has_softpin () +
    void @@ -383,6 +453,14 @@
    +int + +prime_handle_to_fd_for_mmap () +
    uint32_t @@ -398,6 +476,22 @@
    +void + +prime_sync_start () +
    +void + +prime_sync_end () +
    #define local_fourcc_mod_code() @@ -416,7 +510,7 @@

    Types and Values

    -
    +
    @@ -427,6 +521,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -495,8 +641,8 @@

    This helper function imports a raw gem buffer handle into the libdrm buffer manager.

    -

    Parameters

    -
    local_i915_gem_context_param
    #defineLOCAL_I915_GEM_USERPTR
    #defineLOCAL_IOCTL_I915_GEM_USERPTR
    structlocal_i915_gem_userptr
    structlocal_dma_buf_sync
    #defineLOCAL_DMA_BUF_SYNC_READ
    #defineLOCAL_DMA_BUF_SYNC_WRITE
    #defineLOCAL_DMA_BUF_SYNC_RW
    #defineLOCAL_DMA_BUF_SYNC_START
    #defineLOCAL_DMA_BUF_SYNC_END
    #defineLOCAL_DMA_BUF_SYNC_VALID_FLAGS_MASK
    #defineLOCAL_DMA_BUF_BASE
    #defineLOCAL_DMA_BUF_IOCTL_SYNC
    #defineDRM_RDWR
    struct local_drm_mode_fb_cmd2
    +

    Parameters

    +
    @@ -527,7 +673,7 @@
    -

    Returns

    +

    Returns

    The imported libdrm buffer manager object.

    @@ -541,8 +687,8 @@ uint32_t *swizzle);

    This wraps the GET_TILING ioctl.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -583,8 +729,8 @@ uint32_t stride);

    This wraps the SET_TILING ioctl.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -627,8 +773,8 @@ test. Therefore always extract test logic which uses this into its own subtest.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -662,8 +808,8 @@ uint32_t handle);

    This wraps the GET_CACHING ioctl.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -684,7 +830,7 @@
    -

    Returns

    +

    Returns

    The current caching mode bits.

    @@ -698,8 +844,8 @@ into the device-global flink namespace. See gem_open() for opening such a buffer name on a different i915 drm file descriptor.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -720,7 +866,7 @@
    -

    Returns

    +

    Returns

    The created flink buffer name.

    @@ -732,8 +878,8 @@ uint32_t name);

    This wraps the GEM_OPEN ioctl, which is used to import an flink name.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -754,7 +900,7 @@
    -

    Returns

    +

    Returns

    gem file-private buffer handle of the open object.

    @@ -767,8 +913,8 @@

    This wraps the GEM_CLOSE ioctl, which to release a file-private gem buffer handle.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -801,8 +947,8 @@

    This wraps the PWRITE ioctl, which is to upload a linear data to a subrange of a gem buffer object.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -850,8 +996,8 @@

    This wraps the PREAD ioctl, which is to download a linear data to a subrange of a gem buffer object.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -900,8 +1046,8 @@ synchronize with outstanding rendering in general, but for that use-case please have a look at gem_sync().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -934,14 +1080,22 @@
    +

    gem_wait ()

    +
    int
    +gem_wait (int fd,
    +          uint32_t handle,
    +          int64_t *timeout_ns);
    +
    +
    +

    gem_sync ()

    void
     gem_sync (int fd,
               uint32_t handle);

    This functions waits for outstanding rendering to complete.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -964,6 +1118,48 @@
    +

    gem_create__has_stolen_support ()

    +
    bool
    +gem_create__has_stolen_support (int fd);
    +
    +
    +
    +

    gem_create_stolen ()

    +
    uint32_t
    +gem_create_stolen (int fd,
    +                   uint64_t size);
    +

    This wraps the new GEM_CREATE ioctl, which allocates a new gem buffer +object of size + and placement in stolen memory region.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + +

    fd

    open i915 drm file descriptor

     

    size

    desired size of the buffer

     
    +
    +
    +

    Returns

    +

    The file-private handle of the created buffer object

    +
    + +
    +

    gem_create ()

    uint32_t
     gem_create (int fd,
    @@ -972,8 +1168,8 @@
     size
     .

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -994,7 +1190,7 @@
    -

    Returns

    +

    Returns

    The file-private handle of the created buffer object

    @@ -1007,8 +1203,8 @@

    This wraps the EXECBUFFER2 ioctl, which submits a batchbuffer for the gpu to run.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1039,8 +1235,8 @@ unsigned prot);

    Like __gem_mmap__gtt() except we assert on failure.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1071,7 +1267,7 @@
    -

    Returns

    +

    Returns

    A pointer to the created memory mapping

    @@ -1086,8 +1282,8 @@ unsigned prot);

    Like __gem_mmap__cpu() except we assert on failure.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1123,7 +1319,7 @@
    -

    Returns

    +

    Returns

    A pointer to the created memory mapping

    @@ -1144,8 +1340,8 @@ unsigned prot);

    Like __gem_mmap__wc() except we assert on failure.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1181,12 +1377,34 @@
    -

    Returns

    +

    Returns

    A pointer to the created memory mapping


    +

    gem_require_stolen_support()

    +
    #define             gem_require_stolen_support(fd)
    +

    Test macro to query whether support for allocating objects from stolen +memory is available. Automatically skips through igt_require() if not.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    fd

    open i915 drm file descriptor

     
    +
    +
    +
    +

    gem_require_mmap_wc()

    #define gem_require_mmap_wc(fd) igt_require(gem_mmap__has_wc(fd))
     
    @@ -1194,8 +1412,8 @@ the gtt) write-combine memory mappings are available. Automatically skips through igt_require() if not.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1221,8 +1439,8 @@ (internally in the kernel tracked as purgeable objects). When such a cached object is in need again it must be set back to WILLNEED before first use.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1248,7 +1466,7 @@
    -

    Returns

    +

    Returns

    When setting the madvise state to WILLNEED this returns whether the backing storage was still available or not.

    @@ -1263,8 +1481,8 @@ igt_require() internally to correctly skip on kernels and platforms where hw context support is not available.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1278,7 +1496,7 @@
    -

    Returns

    +

    Returns

    The id of the allocated hw context.

    @@ -1291,8 +1509,8 @@

    This is a wraps the CONTEXT_DESTROY ioctl, which is used to free a hardware context.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1329,8 +1547,8 @@ is available. Automatically skips through igt_require() if not.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1362,8 +1580,8 @@ igt_require() internally to correctly skip on kernels and platforms where hw context parameter support is not available.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1395,8 +1613,8 @@ igt_require() internally to correctly skip on kernels and platforms where hw context parameter support is not available.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1419,6 +1637,60 @@
    +

    gem_userptr ()

    +
    void
    +gem_userptr (int fd,
    +             void *ptr,
    +             int size,
    +             int read_only,
    +             uint32_t flags,
    +             uint32_t *handle);
    +

    Returns userptr handle for the GEM object.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    fd

    open i915 drm file descriptor

     

    ptr

    userptr pointer to be passed

     

    size

    desired size of the buffer

     

    read_only

    specify whether userptr is opened read only

     

    flags

    other userptr flags

     

    handle

    returned handle for the object

     
    +
    + +
    +

    gem_sw_finish ()

    void
     gem_sw_finish (int fd,
    @@ -1427,8 +1699,8 @@
     rendering done through the direct cpu memory mappings. Shipping userspace
     does _not_ call this after frontbuffer rendering through gtt memory mappings.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1458,8 +1730,8 @@

    This is a wraps the BUSY ioctl, which tells whether a buffer object is still actively used by the gpu in a execbuffer.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1480,7 +1752,7 @@
    -

    Returns

    +

    Returns

    The busy state of the buffer object.

    @@ -1500,8 +1772,8 @@

    For more explicit tests of ring availability see gem_has_enable_ring() and the ring specific versions like gem_has_bsd().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1515,7 +1787,7 @@
    -

    Returns

    +

    Returns

    The number of available rings.

    @@ -1527,8 +1799,8 @@ int param);

    Feature test macro to query whether a specific ring is available.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1549,7 +1821,7 @@
    -

    Returns

    +

    Returns

    Whether the ring is available or not.

    @@ -1562,8 +1834,8 @@ a specific version of gem_has_enable_ring() for the BSD ring.

    Note that recent Bspec calls this the VCS ring for Video Command Submission.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1577,7 +1849,7 @@
    -

    Returns

    +

    Returns

    Whether the BSD ring is available or not.

    @@ -1590,8 +1862,8 @@ a specific version of gem_has_enable_ring() for the blitter ring.

    Note that recent Bspec calls this the BCS ring for Blitter Command Submission.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1605,7 +1877,7 @@
    -

    Returns

    +

    Returns

    Whether the blitter ring is available or not.

    @@ -1619,8 +1891,8 @@

    Note that recent Bspec calls this the VECS ring for Video Enhancement Command Submission.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1634,7 +1906,7 @@
    -

    Returns

    +

    Returns

    Whether the vebox ring is available or not.

    @@ -1647,8 +1919,8 @@ a specific version of gem_has_enable_ring() for the BSD2 ring.

    Note that recent Bspec calls this the VCS ring for Video Command Submission.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1662,23 +1934,50 @@
    -

    Returns

    +

    Returns

    Whether the BSD ring is avaible or not.


    -

    gem_uses_aliasing_ppgtt ()

    +

    gem_gtt_type ()

    +
    int
    +gem_gtt_type (int fd);
    +

    Feature test macro to check what type of gtt is being used by the kernel: +0 - global gtt +1 - aliasing ppgtt +2 - full ppgtt, limited to 32bit address space +3 - full ppgtt, 64bit address space

    +
    +

    Parameters

    +
    +++++ + + + + + +

    fd

    open i915 drm file descriptor

     
    +
    +
    +

    Returns

    +

    Type of gtt being used.

    +
    +
    +
    +
    +

    gem_uses_ppgtt ()

    bool
    -gem_uses_aliasing_ppgtt (int fd);
    +gem_uses_ppgtt (int fd);

    Feature test macro to check whether the kernel internally uses ppgtt to -execute batches. The /aliasing/ in the function name is a bit a misnomer, -this driver parameter is also true when full ppgtt address spaces are -available since for batchbuffer construction only ppgtt or global gtt is -relevant.

    +execute batches. Note that this is also true when we're using full ppgtt.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1692,20 +1991,48 @@
    -

    Returns

    +

    Returns

    Whether batches are run through ppgtt.


    +

    gem_uses_full_ppgtt ()

    +
    bool
    +gem_uses_full_ppgtt (int fd);
    +

    Feature test macro to check whether the kernel internally uses full +per-process gtt to execute batches. Note that this is also true when we're +using full 64b ppgtt.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    fd

    open i915 drm file descriptor

     
    +
    +
    +

    Returns

    +

    Whether batches are run through full ppgtt.

    +
    +
    +
    +

    gem_available_fences ()

    int
     gem_available_fences (int fd);

    Feature test macro to query the kernel for the number of available fences usable in a batchbuffer. Only relevant for pre-gen4.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1719,7 +2046,7 @@
    -

    Returns

    +

    Returns

    The number of available fences.

    @@ -1731,8 +2058,8 @@

    Feature test macro to query the kernel for the available gpu aperture size usable in a batchbuffer.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1746,7 +2073,7 @@
    -

    Returns

    +

    Returns

    The available gtt address space size.

    @@ -1757,8 +2084,8 @@ gem_aperture_size (int fd);

    Feature test macro to query the kernel for the total gpu aperture size.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1772,32 +2099,71 @@
    -

    Returns

    +

    Returns

    The total gtt address space size.


    +

    gem_global_aperture_size ()

    +
    uint64_t
    +gem_global_aperture_size (int fd);
    +

    Feature test macro to query the kernel for the global gpu aperture size. +This is the area available for the kernel to perform address translations.

    +
    +

    Returns

    +

    The mappable gtt address space size.

    +
    +
    +
    +

    gem_mappable_aperture_size ()

    uint64_t
     gem_mappable_aperture_size (void);

    Feature test macro to query the kernel for the mappable gpu aperture size. This is the area available for GTT memory mappings.

    -

    Returns

    +

    Returns

    The mappable gtt address space size.


    +

    gem_has_softpin ()

    +
    bool
    +gem_has_softpin (int fd);
    +

    Feature test macro to query whether the softpinning functionality is +supported.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    fd

    open i915 drm file descriptor

     
    +
    +
    +

    Returns

    +

    Whether softpin support is available

    +
    +
    +
    +

    gem_require_caching ()

    void
     gem_require_caching (int fd);

    Feature test macro to query whether buffer object caching control is available. Automatically skips through igt_require() if not.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1821,8 +2187,8 @@ In contrast to gem_has_enable_ring() this automagically skips if the ring isn't available by calling igt_require().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1853,8 +2219,8 @@ object into a global (i.e. potentially cross-device) dma-buf file-descriptor handle.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1875,12 +2241,47 @@
    -

    Returns

    +

    Returns

    The created dma-buf fd handle.


    +

    prime_handle_to_fd_for_mmap ()

    +
    int
    +prime_handle_to_fd_for_mmap (int fd,
    +                             uint32_t handle);
    +

    Same as prime_handle_to_fd above but with DRM_RDWR capabilities, which can +be useful for writing into the mmap'ed dma-buf file-descriptor.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + +

    fd

    open i915 drm file descriptor

     

    handle

    file-private gem buffer object handle

     
    +
    +
    +

    Returns

    +

    The created dma-buf fd handle or -1 if the ioctl fails.

    +
    +
    +
    +

    prime_fd_to_handle ()

    uint32_t
     prime_fd_to_handle (int fd,
    @@ -1888,8 +2289,8 @@
     

    This wraps the PRIME_FD_TO_HANDLE ioctl, which is used to import a dma-buf file-descriptor into a gem buffer object.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1910,7 +2311,7 @@
    -

    Returns

    +

    Returns

    The created gem buffer object handle.

    @@ -1923,8 +2324,8 @@ dma-buf. Not all kernels support this, which is check with igt_require() and so will result in automagic test skipping.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1938,12 +2339,56 @@
    -

    Returns

    +

    Returns

    The lifetime-invariant size of the dma-buf object.


    +

    prime_sync_start ()

    +
    void
    +prime_sync_start (int dma_buf_fd,
    +                  bool write);
    +
    +

    Parameters

    +
    +++++ + + + + + +

    dma_buf_fd

    dma-buf fd handle

     
    +
    +
    +
    +
    +

    prime_sync_end ()

    +
    void
    +prime_sync_end (int dma_buf_fd,
    +                bool write);
    +
    +

    Parameters

    +
    +++++ + + + + + +

    dma_buf_fd

    dma-buf fd handle

     
    +
    +
    +
    +

    local_fourcc_mod_code()

    #define             local_fourcc_mod_code(vendor, val)
    @@ -1954,8 +2399,8 @@ igt_require_fb_modifiers (int fd);

    Requires presence of DRM_CAP_ADDFB2_MODIFIERS.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1986,6 +2431,92 @@
    +
    +

    LOCAL_I915_GEM_USERPTR

    +
    #define LOCAL_I915_GEM_USERPTR       0x33
    +
    +
    +
    +
    +

    LOCAL_IOCTL_I915_GEM_USERPTR

    +
    #define LOCAL_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + LOCAL_I915_GEM_USERPTR, struct local_i915_gem_userptr)
    +
    +
    +
    +
    +

    struct local_i915_gem_userptr

    +
    struct local_i915_gem_userptr {
    +	uint64_t user_ptr;
    +	uint64_t user_size;
    +	uint32_t flags;
    +#define LOCAL_I915_USERPTR_READ_ONLY (1<<0)
    +#define LOCAL_I915_USERPTR_UNSYNCHRONIZED (1<<31)
    +	uint32_t handle;
    +};
    +
    +
    +
    +
    +

    struct local_dma_buf_sync

    +
    struct local_dma_buf_sync {
    +	uint64_t flags;
    +};
    +
    +
    +
    +
    +

    LOCAL_DMA_BUF_SYNC_READ

    +
    #define LOCAL_DMA_BUF_SYNC_READ      (1 << 0)
    +
    +
    +
    +
    +

    LOCAL_DMA_BUF_SYNC_WRITE

    +
    #define LOCAL_DMA_BUF_SYNC_WRITE     (2 << 0)
    +
    +
    +
    +
    +

    LOCAL_DMA_BUF_SYNC_RW

    +
    #define LOCAL_DMA_BUF_SYNC_RW        (LOCAL_DMA_BUF_SYNC_READ | LOCAL_DMA_BUF_SYNC_WRITE)
    +
    +
    +
    +
    +

    LOCAL_DMA_BUF_SYNC_START

    +
    #define LOCAL_DMA_BUF_SYNC_START     (0 << 2)
    +
    +
    +
    +
    +

    LOCAL_DMA_BUF_SYNC_END

    +
    #define LOCAL_DMA_BUF_SYNC_END       (1 << 2)
    +
    +
    +
    +
    +

    LOCAL_DMA_BUF_SYNC_VALID_FLAGS_MASK

    +
    #define             LOCAL_DMA_BUF_SYNC_VALID_FLAGS_MASK
    +
    +
    +
    +

    LOCAL_DMA_BUF_BASE

    +
    #define LOCAL_DMA_BUF_BASE 'b'
    +
    +
    +
    +
    +

    LOCAL_DMA_BUF_IOCTL_SYNC

    +
    #define LOCAL_DMA_BUF_IOCTL_SYNC _IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync)
    +
    +
    +
    +
    +

    DRM_RDWR

    +
    #define DRM_RDWR O_RDWR
    +
    +
    +

    struct local_drm_mode_fb_cmd2

    struct local_drm_mode_fb_cmd2 {
    diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-IO.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-IO.html
    --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-IO.html	2015-12-02 16:48:05.000000000 +0000
    +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-IO.html	2016-03-01 16:10:39.000000000 +0000
    @@ -3,7 +3,7 @@
     
     
     I/O: intel-gpu-tools Reference Manual
    -
    +
     
     
     
    @@ -33,7 +33,7 @@
     

    Functions

    -
    +
    @@ -228,7 +228,7 @@

    Types and Values

    -
    +
    @@ -264,8 +264,8 @@

    pci_dev can be obtained from intel_get_pci_device().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -289,8 +289,8 @@ the same code to get reused for dumping and decoding from running hardware as from register dumps.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -317,8 +317,8 @@

    pci_dev can be obtained from intel_get_pci_device().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -358,8 +358,8 @@

    Compared to INREG() it can do optional checking with the register access white lists.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -373,7 +373,7 @@
    -

    Returns

    +

    Returns

    The value read from the register.

    @@ -389,8 +389,8 @@

    Compared to OUTREG() it can do optional checking with the register access white lists.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -417,7 +417,7 @@
    int
     intel_register_access_needs_fakewake (void);
    -

    Returns

    +

    Returns

    Non-zero when forcewake initialization failed.

    @@ -431,8 +431,8 @@ new register access helper is initialized with intel_register_access_init().

    This function directly accesses the igt_global_mmio without safety checks.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -446,7 +446,7 @@
    -

    Returns

    +

    Returns

    The value read from the register.

    @@ -460,8 +460,8 @@ new register access helper is initialized with intel_register_access_init().

    This function directly accesses the igt_global_mmio without safety checks.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -475,7 +475,7 @@
    -

    Returns

    +

    Returns

    The value read from the register.

    @@ -489,8 +489,8 @@ new register access helper is initialized with intel_register_access_init().

    This function directly accesses the igt_global_mmio without safety checks.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -504,7 +504,7 @@
    -

    Returns

    +

    Returns

    The value read from the register.

    @@ -521,8 +521,8 @@ intel_register_access_init().

    This function directly accesses the igt_global_mmio without safety checks.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -556,8 +556,8 @@ intel_register_access_init().

    This function directly accesses the igt_global_mmio without safety checks.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -591,8 +591,8 @@ intel_register_access_init().

    This function directly accesses the igt_global_mmio without safety checks.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -622,8 +622,8 @@

    32-bit read of the register at offset through the DPIO sideband port.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -644,7 +644,7 @@
    -

    Returns

    +

    Returns

    The value read from the register.

    @@ -658,8 +658,8 @@

    32-bit write of the register at offset through the DPIO sideband port.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -722,8 +722,8 @@

    32-bit read of the register at offset through the P-Unit sideband port.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -744,7 +744,7 @@
    -

    Returns

    +

    Returns

    0 when the register access succeeded, negative errno code on failure.

    @@ -757,8 +757,8 @@

    32-bit write of the register at offset through the P-Unit sideband port.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -779,7 +779,7 @@
    -

    Returns

    +

    Returns

    0 when the register access succeeded, negative errno code on failure.

    @@ -792,8 +792,8 @@

    32-bit read of the register at offset through the NC sideband port.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -814,7 +814,7 @@
    -

    Returns

    +

    Returns

    0 when the register access succeeded, negative errno code on failure.

    @@ -827,8 +827,8 @@

    32-bit write of the register at offset through the NC sideband port.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -849,7 +849,7 @@
    -

    Returns

    +

    Returns

    0 when the register access succeeded, negative errno code on failure.

    diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-KMS.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-KMS.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-KMS.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-KMS.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ KMS: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

    Functions

    -
    +
    @@ -154,6 +154,14 @@ + + + + + + + +
    +bool + +kmstest_probe_connector_config () +
    void @@ -384,12 +392,19 @@ igt_kms_get_base_edid ()
    const unsigned char * + +igt_kms_get_alt_edid () +

    Types and Values

    -
    +
    @@ -485,8 +500,8 @@
    const char *
     kmstest_pipe_name (enum pipe pipe);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -500,7 +515,7 @@
    -

    Returns

    +

    Returns

    String represnting pipe , e.g. "A".

    @@ -511,8 +526,8 @@
    const char *
     kmstest_plane_name (enum igt_plane plane);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -526,7 +541,7 @@
    -

    Returns

    +

    Returns

    String represnting pipe , e.g. "plane1".

    @@ -537,8 +552,8 @@
    #define kmstest_port_name(port) ((port) + 'A')
     
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -552,7 +567,7 @@
    -

    Returns

    +

    Returns

    String representing port , e.g. "A".

    @@ -563,8 +578,8 @@
    const char *
     kmstest_encoder_type_str (int type);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -578,7 +593,7 @@
    -

    Returns

    +

    Returns

    A string representing the drm encoder type .

    @@ -589,8 +604,8 @@
    const char *
     kmstest_connector_status_str (int status);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -604,7 +619,7 @@
    -

    Returns

    +

    Returns

    A string representing the drm connector status status .

    @@ -615,8 +630,8 @@
    const char *
     kmstest_connector_type_str (int type);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -630,7 +645,7 @@
    -

    Returns

    +

    Returns

    A string representing the drm connector type .

    @@ -643,8 +658,8 @@

    Prints mode to stdout in a huma-readable form.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -665,8 +680,8 @@ kmstest_get_pipe_from_crtc_id (int fd, int crtc_id);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -687,7 +702,7 @@
    -

    Returns

    +

    Returns

    The pipe number for the given DRM CRTC crtc_id . This maps directly to an enum pipe value used in other helper functions.

    @@ -720,8 +735,8 @@ enum kmstest_force_connector_state state);

    Force the specified state on the specified connector.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -748,7 +763,7 @@
    -

    Returns

    +

    Returns

    true on success

    @@ -763,8 +778,8 @@

    Makes a copy of an existing edid block and adds an extension indicating stereo 3D capabilities.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -810,8 +825,8 @@

    If length is zero, the forced EDID will be removed.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -855,8 +870,8 @@ and stores it in mode .

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -882,7 +897,7 @@
    -

    Returns

    +

    Returns

    true on success, false on failure

    @@ -898,8 +913,53 @@ constraint and fills it into config .

    -

    Parameters

    -
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + +

    drm_fd

    DRM fd

     

    connector_id

    DRM connector id

     

    crtc_idx_mask

    mask of allowed DRM CRTC indices

     

    config

    structure filled with the possible configuration

     
    +
    + +
    +
    +

    kmstest_probe_connector_config ()

    +
    bool
    +kmstest_probe_connector_config (int drm_fd,
    +                                uint32_t connector_id,
    +                                unsigned long  crtc_idx_mask,
    +                                struct kmstest_connector_config *config);
    +

    This tries to find a suitable configuration for the given connector and CRTC +constraint and fills it into config +, fully probing the connector in the +process.

    +
    +

    Parameters

    +
    @@ -938,8 +998,8 @@

    Free any resources in config allocated in kmstest_get_connector_config().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -964,8 +1024,8 @@ to mode .

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1004,8 +1064,8 @@ drmModePropertyPtr *prop);

    Finds a property with the given name on the given object.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1052,7 +1112,7 @@
    -

    Returns

    +

    Returns

    true in case we found something.

    @@ -1064,8 +1124,8 @@ drmModeResPtr resources);

    Disables all the screens.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1096,8 +1156,8 @@ and allocate the various resources required. Use igt_display_fini to release the resources when they are no longer required.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1128,8 +1188,8 @@ itself.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1159,8 +1219,8 @@ igt_try_display_commit2 instead.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1181,7 +1241,7 @@
    -

    Returns

    +

    Returns

    0 upon success. This function will never return upon failure since igt_fail() at lower levels will longjmp out of it.

    @@ -1194,8 +1254,8 @@

    Commits framebuffer and positioning changes to all planes of each display pipe.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1209,7 +1269,7 @@
    -

    Returns

    +

    Returns

    0 upon success. This function will never return upon failure since igt_fail() at lower levels will longjmp out of it.

    @@ -1231,8 +1291,8 @@ errors returned by this function should take care to restore the display to a sane state after a failure is detected.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1253,7 +1313,7 @@
    -

    Returns

    +

    Returns

    0 upon success, otherwise the error code of the first error encountered.

    @@ -1287,8 +1347,8 @@ mode obtained with get connectors. Note that the mode is used without checking if the output supports it, so this might lead to unexpected results.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1349,8 +1409,8 @@ New size will be committed at plane commit time via drmModeSetPlane().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1402,8 +1462,8 @@ property. For example to get red as background, set background = 0x00000000FFFF.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1435,8 +1495,8 @@

    This function sets position for requested framebuffer as src to plane. New position will be committed at plane commit time via drmModeSetPlane().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1479,8 +1539,8 @@ to plane. New size will be committed at plane commit time via drmModeSetPlane().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -1567,18 +1627,39 @@

    This can be extended with further features using functions such as kmstest_edid_add_3d.

    -

    Returns

    +

    Returns

    a basic edid block

    +
    +
    +

    igt_kms_get_alt_edid ()

    +
    const unsigned char *
    +igt_kms_get_alt_edid (void);
    +

    Get an alternate edid block, which includes the following modes:

    +
      +
    • 1400x1050 60Hz

    • +
    • 1920x1080 60Hz

    • +
    • 1280x720 60Hz

    • +
    • 1024x768 60Hz

    • +
    • 800x600 60Hz

    • +
    • 640x480 60Hz

    • +
    +

    This can be extended with further features using functions such as +kmstest_edid_add_3d.

    +
    +

    Returns

    +

    an alternate edid block

    +
    +

    Types and Values

    enum pipe

    -

    Members

    -
    +

    Members

    +
    @@ -1618,8 +1699,8 @@

    enum igt_plane

    -

    Members

    -
    +

    Members

    +
    @@ -1659,8 +1740,8 @@

    enum port

    -

    Members

    -
    +

    Members

    +
    @@ -1718,8 +1799,8 @@

    enum kmstest_force_connector_state

    -

    Members

    -
    +

    Members

    +
    @@ -1762,8 +1843,8 @@

    enum igt_commit_style

    -

    Members

    -
    +

    Members

    +
    @@ -1806,8 +1887,8 @@

    enum igt_rotation_t

    -

    Members

    -
    +

    Members

    +
    diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Power-Management.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Power-Management.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Power-Management.html 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Power-Management.html 2016-03-01 16:10:39.000000000 +0000 @@ -0,0 +1,148 @@ + + + + +Power Management: intel-gpu-tools Reference Manual + + + + + + + + + +
    + + + + + + +
    +
    +
    + + +
    +

    Power Management

    +

    Power Management — Power Management related helpers

    +
    +
    +

    Functions

    +
    ++++ + + + + + + + + + + + + + + +
    +void + +igt_pm_enable_audio_runtime_pm () +
    +int8_t * + +igt_pm_enable_sata_link_power_management () +
    +void + +igt_pm_restore_sata_link_power_management () +
    +
    +
    +

    Includes

    +
    #include <igt.h>
    +
    +
    +
    +

    Description

    +

    This library provides various helpers to enable power management for, +and in some cases subsequently allow restoring the old behaviour of, +various external components that by default are set up in a way +that interferes with the testing of our power management functionality.

    +
    +
    +

    Functions

    +
    +

    igt_pm_enable_audio_runtime_pm ()

    +
    void
    +igt_pm_enable_audio_runtime_pm (void);
    +

    We know that if we don't enable audio runtime PM, snd_hda_intel will never +release its power well refcount, and we'll never reach the LPSP state. +There's no guarantee that it will release the power well if we enable +runtime PM, but at least we can try.

    +

    We don't have any assertions on open since the user may not even have +snd_hda_intel loaded, which is not a problem.

    +
    +
    +
    +

    igt_pm_enable_sata_link_power_management ()

    +
    int8_t *
    +igt_pm_enable_sata_link_power_management
    +                               (void);
    +

    Enable the min_power policy for SATA link power management. +Without this we cannot reach deep runtime power states.

    +

    We don't have any assertions on open since the system might not have +a SATA host.

    +
    +

    Returns

    +

    An opaque pointer to the data needed to restore the default values +after the test has terminated, or NULL if SATA link power management +is not supported. This pointer should be freed when no longer used +(typically after having called restore_sata_link_power_management()).

    +
    +
    +
    +
    +

    igt_pm_restore_sata_link_power_management ()

    +
    void
    +igt_pm_restore_sata_link_power_management
    +                               (int8_t *pm_data);
    +

    Restore the link power management policies to the values +prior to enabling min_power.

    +

    Caveat: If the system supports hotplugging and hotplugging takes + place during our testing so that the hosts change numbers + we might restore the settings to the wrong hosts.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    pm_data

    An opaque pointer with saved link PM policies; +If NULL is passed we force enable the "max_performance" policy.

     
    +
    +
    +
    +
    +

    Types and Values

    +
    +
    + + + \ No newline at end of file diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Stats.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Stats.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Stats.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/intel-gpu-tools-Stats.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Stats: intel-gpu-tools Reference Manual - + @@ -33,7 +33,7 @@

    Functions

    -
    +
    @@ -196,7 +196,7 @@

    Types and Values

    -
    +
    @@ -238,22 +238,22 @@ 14 15 16 - +igt_stats_fini(&stats);
    igt_stats_t stats;
    +        
    igt_stats_t stats;
     
    -igt_stats_init(&stats, 8);
    +igt_stats_init(&stats, 8);
     
    -igt_stats_push(&stats, 2);
    -igt_stats_push(&stats, 4);
    -igt_stats_push(&stats, 4);
    -igt_stats_push(&stats, 4);
    -igt_stats_push(&stats, 5);
    -igt_stats_push(&stats, 5);
    -igt_stats_push(&stats, 7);
    -igt_stats_push(&stats, 9);
    +igt_stats_push(&stats, 2);
    +igt_stats_push(&stats, 4);
    +igt_stats_push(&stats, 4);
    +igt_stats_push(&stats, 4);
    +igt_stats_push(&stats, 5);
    +igt_stats_push(&stats, 5);
    +igt_stats_push(&stats, 7);
    +igt_stats_push(&stats, 9);
     
    -printf("Mean: %lf\n", igt_stats_get_mean(&stats));
    +printf("Mean: %lf\n", igt_stats_get_mean(&stats));
     
    -igt_stats_fini(&stats);
    @@ -271,8 +271,8 @@ finished with stats .

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -299,8 +299,8 @@

    igt_stats_fini() must be called once finished with stats .

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -329,8 +329,8 @@ igt_stats_fini (igt_stats_t *stats);

    Frees resources allocated in igt_stats_init().

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -350,8 +350,8 @@
    bool
     igt_stats_is_population (igt_stats_t *stats);
    -

    Parameters

    -
    +

    Parameters

    +
    @@ -365,7 +365,7 @@
    -

    Returns

    +

    Returns

    true if stats represents a population, false if only a sample.

    See igt_stats_set_population() for more details.

    @@ -395,8 +395,8 @@

    When newly created, stats defaults to holding sample data.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -428,8 +428,8 @@ dataset and converts the igt_stats from an integer collection to a floating point one.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -467,8 +467,8 @@

    Adds an array of values to the stats dataset.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -502,8 +502,8 @@

    Retrieves the minimal value in stats

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -525,8 +525,8 @@

    Retrieves the maximum value in stats

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -552,8 +552,8 @@ can be extreme minimal and maximum values that are just anomalies. Prefer the interquatile range (see igt_stats_get_iqr()) or an histogram.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -579,8 +579,8 @@ stats dataset.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -621,8 +621,8 @@ (IQR) of the stats dataset.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -650,8 +650,8 @@ and calculates the mean value of the remaining central values.

    It's useful to hide outliers in measurements (due to cold cache etc).

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -673,8 +673,8 @@

    Retrieves the mean of the stats dataset.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -699,8 +699,8 @@

    The trimean is a the most efficient 3-point L-estimator, even more robust than the median at estimating the average of a sample population.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -722,8 +722,8 @@

    Retrieves the median of the stats dataset.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -745,8 +745,8 @@

    Retrieves the variance of the stats dataset.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -768,8 +768,8 @@

    Retrieves the standard deviation of the stats dataset.

    -

    Parameters

    -
    +

    Parameters

    +
    @@ -798,8 +798,8 @@ } igt_stats_t;
    -

    Members

    -
    +

    Members

    +
    diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/test-programs.html intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/test-programs.html --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/html/test-programs.html 2015-12-02 16:48:05.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/html/test-programs.html 2016-03-01 16:10:39.000000000 +0000 @@ -3,7 +3,7 @@ Test Programs: intel-gpu-tools Reference Manual - + diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml 2016-03-01 15:59:21.000000000 +0000 @@ -24,6 +24,7 @@ + diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/Makefile.am intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/Makefile.am --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/Makefile.am 2015-12-02 15:13:14.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/Makefile.am 2016-03-01 15:59:21.000000000 +0000 @@ -126,9 +126,9 @@ # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES=gen6_render.h gen7_media.h gen7_render.h gen8_media.h \ gen8_render.h gpgpu_fill.h i830_reg.h i915_3d.h i915_pciids.h \ - i915_reg.h intel_reg.h debug.h instdone.h media_fill.h \ - rendercopy.h media_spin.h media_fill_gen9.h gen9_render.h \ - version.h + i915_reg.h igt_edid_template.h intel_reg.h debug.h instdone.h \ + media_fill.h rendercopy.h media_spin.h media_fill_gen9.h \ + gen9_render.h version.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png diff -Nru intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/Makefile.in intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/Makefile.in --- intel-gpu-tools-1.13/docs/reference/intel-gpu-tools/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/intel-gpu-tools/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -93,13 +93,13 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = docs/reference/intel-gpu-tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -164,6 +164,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -208,6 +210,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -306,11 +309,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -376,9 +384,9 @@ # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES = gen6_render.h gen7_media.h gen7_render.h gen8_media.h \ gen8_render.h gpgpu_fill.h i830_reg.h i915_3d.h i915_pciids.h \ - i915_reg.h intel_reg.h debug.h instdone.h media_fill.h \ - rendercopy.h media_spin.h media_fill_gen9.h gen9_render.h \ - version.h + i915_reg.h igt_edid_template.h intel_reg.h debug.h instdone.h \ + media_fill.h rendercopy.h media_spin.h media_fill_gen9.h \ + gen9_render.h version.h # Images to copy into HTML directory. diff -Nru intel-gpu-tools-1.13/docs/reference/Makefile.in intel-gpu-tools-1.14/docs/reference/Makefile.in --- intel-gpu-tools-1.13/docs/reference/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/docs/reference/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -87,13 +87,13 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = docs/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -217,6 +217,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -261,6 +263,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -359,11 +362,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/lib/Android.mk intel-gpu-tools-1.14/lib/Android.mk --- intel-gpu-tools-1.13/lib/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/Android.mk 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,52 @@ +LOCAL_PATH := $(call my-dir) + +GPU_TOOLS_PATH := $(LOCAL_PATH)/.. +IGT_LIB_PATH := $(LOCAL_PATH) + +# FIXME: autogenerate this info # +$(GPU_TOOLS_PATH)/config.h: + @echo "updating config.h" + @echo '#define PACKAGE_VERSION "1.5"' >> $@ ; \ + echo '#define TARGET_CPU_PLATFORM "android-ia"' >> $@ ; + +include $(LOCAL_PATH)/Makefile.sources + +include $(CLEAR_VARS) + +LOCAL_GENERATED_SOURCES := \ + $(IGT_LIB_PATH)/version.h \ + $(GPU_TOOLS_PATH)/config.h + +LOCAL_C_INCLUDES += \ + $(LOCAL_PATH)/.. + +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) + +LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES +LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM +LOCAL_CFLAGS += -DANDROID -DHAVE_LINUX_KD_H +LOCAL_CFLAGS += -std=gnu99 -UNDEBUG +LOCAL_MODULE:= libintel_gpu_tools + +LOCAL_SHARED_LIBRARIES := libpciaccess \ + libdrm \ + libdrm_intel + +ifeq ("${ANDROID_HAS_CAIRO}", "1") + skip_lib_list := + LOCAL_C_INCLUDES += $(ANDROID_BUILD_TOP)/external/cairo-1.12.16/src + LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1 -DIGT_DATADIR=\".\" -DIGT_SRCDIR=\".\" +else +skip_lib_list := \ + igt_kms.c \ + igt_kms.h \ + igt_fb.c + -DANDROID_HAS_CAIRO=0 +endif + +LOCAL_SRC_FILES := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES)) + +include $(BUILD_STATIC_LIBRARY) + +include $(call first-makefiles-under, $(LOCAL_PATH)) + diff -Nru intel-gpu-tools-1.13/lib/drmtest.c intel-gpu-tools-1.14/lib/drmtest.c --- intel-gpu-tools-1.13/lib/drmtest.c 2015-12-02 15:13:13.000000000 +0000 +++ intel-gpu-tools-1.14/lib/drmtest.c 2016-03-01 15:59:21.000000000 +0000 @@ -100,6 +100,16 @@ return !ret && strcmp("i915", name) == 0; } +static bool is_vc4_device(int fd) +{ + int ret; + char name[5] = ""; + + ret = __get_drm_device_name(fd, name); + + return !ret && strcmp("vc4", name) == 0; +} + static bool is_intel(int fd) { struct drm_i915_getparam gp; @@ -237,7 +247,7 @@ for (int i = 0; i < 16; i++) { char name[80]; int fd; - bool found_intel; + bool found_intel, found_vc4; sprintf(name, "/dev/dri/card%u", i); fd = open(name, O_RDWR); @@ -246,7 +256,9 @@ found_intel = is_i915_device(fd) && is_intel(fd) && (chipset & DRIVER_INTEL); - if ((chipset & DRIVER_ANY) || found_intel) + found_vc4 = is_vc4_device(fd) && (chipset & DRIVER_VC4); + + if ((chipset & DRIVER_ANY) || found_intel || found_vc4) return fd; close(fd); diff -Nru intel-gpu-tools-1.13/lib/drmtest.h intel-gpu-tools-1.14/lib/drmtest.h --- intel-gpu-tools-1.13/lib/drmtest.h 2015-12-01 17:16:53.000000000 +0000 +++ intel-gpu-tools-1.14/lib/drmtest.h 2016-03-01 15:59:21.000000000 +0000 @@ -40,6 +40,7 @@ #define DRIVER_ANY 0x1 #define DRIVER_INTEL (0x1 << 1) +#define DRIVER_VC4 (0x1 << 2) #ifdef ANDROID #if (!(defined HAVE_MMAP64)) && (!(defined __x86_64__)) diff -Nru intel-gpu-tools-1.13/lib/igt_aux.c intel-gpu-tools-1.14/lib/igt_aux.c --- intel-gpu-tools-1.13/lib/igt_aux.c 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_aux.c 2016-03-01 15:59:21.000000000 +0000 @@ -59,6 +59,7 @@ #include "intel_reg.h" #include "ioctl_wrappers.h" #include "igt_kms.h" +#include "igt_pm.h" /** * SECTION:igt_aux @@ -79,7 +80,7 @@ /* Interrupt the parent process at 500Hz, just to be annoying */ while (1) { usleep(1000 * 1000 / 500); - if (kill(pid, SIGUSR1)) /* Parent has died, so must we. */ + if (kill(pid, SIGCONT)) /* Parent has died, so must we. */ exit(0); } } @@ -93,7 +94,7 @@ * igt_fork_signal_helper: * * Fork a child process using #igt_fork_helper to interrupt the parent process - * with a SIGUSR1 signal at regular quick intervals. The corresponding dummy + * with a SIGCONT signal at regular quick intervals. The corresponding dummy * signal handler is installed in the parent process. * * This is useful to exercise ioctl error paths, at least where those can be @@ -108,10 +109,23 @@ if (igt_only_list_subtests()) return; - signal(SIGUSR1, sig_handler); + /* We pick SIGCONT as it is a "safe" signal - if we send SIGCONT to + * an unexpecting process it spuriously wakes up and does nothing. + * Most other signals (e.g. SIGUSR1) cause the process to die if they + * are not handled. This is an issue in case the sighandler is not + * inherited correctly (or if there is a race in the inheritance + * and we send the signal at exactly the wrong time). + */ + signal(SIGCONT, sig_handler); + setpgrp(); /* define a new process group for the tests */ igt_fork_helper(&signal_helper) { - signal_helper_process(getppid()); + setpgrp(); /* Escape from the test process group */ + + /* Pass along the test process group identifier, + * negative pid => send signal to everyone in the group. + */ + signal_helper_process(-getppid()); } } @@ -531,19 +545,7 @@ if (pm_status_fd >= 0) return true; - /* The Audio driver can get runtime PM references, so we need to make - * sure its runtime PM is enabled, so it can release the refs and - * actually enable us to runtime suspend. */ - fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY); - if (fd >= 0) { - igt_assert(write(fd, "1\n", 2) == 2); - close(fd); - } - fd = open("/sys/bus/pci/devices/0000:00:03.0/power/control", O_WRONLY); - if (fd >= 0) { - igt_assert(write(fd, "auto\n", 5) == 5); - close(fd); - } + igt_pm_enable_audio_runtime_pm(); /* Our implementation uses autosuspend. Try to set it to 0ms so the test * suite goes faster and we have a higher probability of triggering race diff -Nru intel-gpu-tools-1.13/lib/igt_aux.h intel-gpu-tools-1.14/lib/igt_aux.h --- intel-gpu-tools-1.13/lib/igt_aux.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_aux.h 2016-03-01 15:59:21.000000000 +0000 @@ -86,7 +86,9 @@ uint64_t intel_get_total_ram_mb(void); uint64_t intel_get_total_swap_mb(void); -void intel_require_memory(uint32_t count, uint64_t size, unsigned mode); +int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode, + uint64_t *out_required, uint64_t *out_total); +void intel_require_memory(uint64_t count, uint64_t size, unsigned mode); #define CHECK_RAM 0x1 #define CHECK_SWAP 0x2 diff -Nru intel-gpu-tools-1.13/lib/igt.cocci intel-gpu-tools-1.14/lib/igt.cocci --- intel-gpu-tools-1.13/lib/igt.cocci 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt.cocci 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,233 @@ +// Semantic patch for common patters and their replacement by igt infrastructure +// and macros. Please run with +// +// spatch --sp-file lib/igt.cocci --in-place tests/*.c +// +// on your new testcase. + + +// Replace open-coded augmented igt_assert/skip/require with macro versions +@@ +expression Ec; +expression list[n] Ep; +@@ +- if (Ec) { +( +- igt_warn( Ep ); +| +- igt_info( Ep ); +| +- igt_debug( Ep ); +) +- igt_fail(...); +- } ++ igt_fail_on_f(Ec, Ep); +@@ +expression Ec; +@@ +- if (Ec) { +- igt_fail(...); +- } ++ igt_fail_on(Ec); +@@ +expression Ec; +expression list[n] Ep; +@@ +- if (Ec) { +- igt_skip(Ep); +- } ++ igt_skip_on_f(Ec, Ep); +@@ +expression Ec; +expression list[n] Ep; +@@ +- if (Ec) { +- igt_warn(Ep); +- } ++ igt_warn_on_f(Ec, Ep); + +// Enforce use of logging functions +@@ +expression list[n] Ep; +@@ +-fprintf(stderr, Ep); ++igt_warn(Ep); +@@ +expression E; +@@ +-perror(E); ++igt_warn(E); +@@ +expression list[n] Ep; +@@ +-fprintf(stdout, Ep); ++igt_info(Ep); +@@ +expression list[n] Ep; +@@ +-printf(Ep); ++igt_info(Ep); + +// No abort for tests, really. Should only be used for internal library checks +// in lib/* +@@ +@@ +-abort(); ++igt_fail(IGT_EXIT_FAILURE); + +@@ +iterator name for_each_pipe; +igt_display_t *display; +expression pipe; +@@ +- for (pipe = 0; pipe < igt_display_get_n_pipes(display); pipe++) { ++ for_each_pipe (display, pipe) { +... +} + +// Tests really shouldn't use plain assert! +@@ +expression E; +@@ +- assert(E); ++ igt_assert(E); + +// Replace open-coded igt_swap() +@@ +type T; +T a, b, tmp; +@@ +- tmp = a; +- a = b; +- b = tmp; ++ igt_swap(a, b); + +// Replace open-coded min() +@@ +expression a; +expression b; +@@ +( +- ((a) < (b) ? (a) : (b)) ++ min(a, b) +| +- ((a) <= (b) ? (a) : (b)) ++ min(a, b) +) + +// Replace open-coded max() +@@ +expression a; +expression b; +@@ +( +- ((a) > (b) ? (a) : (b)) ++ max(a, b) +| +- ((a) >= (b) ? (a) : (b)) ++ max(a, b) +) + +// drm_open_any always returns a valid file descriptor +@@ +expression a; +@@ +a = drm_open_any(); +( +- igt_assert(a >= 0); +| +- if (a < 0) { +- ... +- return ...; +- } +) + +// Use comparison macros instead of raw igt_assert when possible +@@ +typedef uint32_t; +uint32_t E1, E2; +int E3, E4; +@@ +( +- igt_assert(E1 == E2); ++ igt_assert_eq_u32(E1, E2); +| +- igt_assert(E1 != E2); ++ igt_assert_neq_u32(E1, E2); +| +- igt_assert(E1 <= E2); ++ igt_assert_lte_u32(E1, E2); +| +- igt_assert(E1 < E2); ++ igt_assert_lt_u32(E1, E2); +| +- igt_assert(E1 >= E2); ++ igt_assert_lte_u32(E2, E1); +| +- igt_assert(E1 > E2); ++ igt_assert_lt_u32(E2, E1); +| +- igt_assert(E3 == E4); ++ igt_assert_eq(E3, E4); +| +- igt_assert(E3 != E4); ++ igt_assert_neq(E3, E4); +| +- igt_assert(E3 <= E4); ++ igt_assert_lte(E3, E4); +| +- igt_assert(E3 < E4); ++ igt_assert_lt(E3, E4); +| +- igt_assert(E3 >= E4); ++ igt_assert_lte(E4, E3); +| +- igt_assert(E3 > E4); ++ igt_assert_lt(E4, E3); +) + +// avoid unused-result warnings when compiling with _FORTIFY_SOURCE defined +@@ +identifier func =~ "^(read|write)$"; +expression list[2] E; +expression size; +@@ +-func(E, size); ++igt_assert_eq(func(E, size), size); + +@@ +expression ptr, size, nmemb, stream; +@@ +-fread(ptr, size, nmemb, stream); ++igt_assert_eq(fread(ptr, size, nmemb, stream), nmemb); + +@@ +expression list E; +@@ +-fgets(E); ++igt_assert(fgets(E) != NULL); + +@@ +identifier func =~ "^v?asprintf$"; +expression list E; +@@ +-func(E); ++igt_assert_neq(func(E), -1); + +// replace open-coded do_ioctl +@@ +expression a, b, c, e; +@@ +( +-do_or_die(drmIoctl(a, b, c)); ++do_ioctl(a, b, c); +| +-igt_assert(drmIoctl(a, b, c) == 0); ++do_ioctl(a, b, c); +| +-igt_assert(drmIoctl(a, b, c) == -1 && errno == e); ++do_ioctl_err(a, b, c, e); +| +-igt_assert(drmIoctl(a, b, c) < 0 && errno == e); ++do_ioctl_err(a, b, c, e); +) diff -Nru intel-gpu-tools-1.13/lib/igt_core.c intel-gpu-tools-1.14/lib/igt_core.c --- intel-gpu-tools-1.13/lib/igt_core.c 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_core.c 2016-03-01 15:59:21.000000000 +0000 @@ -56,7 +56,7 @@ #include #include #include -#include +#include #include "drmtest.h" #include "intel_chipset.h" @@ -209,6 +209,19 @@ * intel gpu to be present). Then individual subtests can be run with * "--run-subtest". Usage help for tests with subtests can be obtained with the * "--help" command line option. + * + * A wildcard expression can be given to --run-subtest to specify a subset of + * subtests to run. See https://tools.ietf.org/html/rfc3977#section-4 for a + * description of allowed wildcard expressions. + * Some examples of allowed wildcard expressions are: + * + * - '*basic*' match any subtest containing basic + * - 'basic-???' match any subtest named basic- with 3 characters after - + * - 'basic-[0-9]' match any subtest named basic- with a single number after - + * - 'basic-[^0-9]' match any subtest named basic- with a single non numerical character after - + * - 'basic*,advanced*' match any subtest starting basic or advanced + * - '*,!basic*' match any subtest not starting basic + * - 'basic*,!basic-render*' match any subtest starting basic but not starting basic-render */ static unsigned int exit_handler_count; @@ -540,7 +553,7 @@ static int common_init(int *argc, char **argv, const char *extra_short_opts, - struct option *extra_long_opts, + const struct option *extra_long_opts, const char *help_str, igt_opt_handler_t extra_opt_handler, void *handler_data) @@ -746,7 +759,7 @@ */ int igt_subtest_init_parse_opts(int *argc, char **argv, const char *extra_short_opts, - struct option *extra_long_opts, + const struct option *extra_long_opts, const char *help_str, igt_opt_handler_t extra_opt_handler, void *handler_data) @@ -777,7 +790,7 @@ */ void igt_simple_init_parse_opts(int *argc, char **argv, const char *extra_short_opts, - struct option *extra_long_opts, + const struct option *extra_long_opts, const char *help_str, igt_opt_handler_t extra_opt_handler, void *handler_data) @@ -814,7 +827,7 @@ } if (run_single_subtest) { - if (fnmatch(run_single_subtest, subtest_name, 0) != 0) + if (uwildmat(subtest_name, run_single_subtest) == 0) return false; else run_single_subtest_found = true; @@ -1118,6 +1131,9 @@ kmsg(KERN_INFO "%s: exiting, ret=%d\n", command_str, igt_exitcode); igt_debug("Exiting with status code %d\n", igt_exitcode); + for (int c = 0; c < num_test_children; c++) + kill(test_children[c], SIGKILL); + if (!test_with_subtests) { struct timespec now; const char *result; @@ -1388,6 +1404,20 @@ igt_fail(err); } +/** + * igt_waitchildren_timeout: + * + * Wait for all children forked with igt_fork, for a maximum of @seconds. + * + * Wraps igt_waitchildren() and igt_set_timeout() + */ +void igt_waitchildren_timeout(int seconds, const char *reason) +{ + igt_set_timeout(seconds, reason); + igt_waitchildren(); + igt_reset_timeout(); +} + /* exit handler code */ #define MAX_SIGNALS 32 #define MAX_EXIT_HANDLERS 10 @@ -1748,7 +1778,7 @@ goto out; } - line_continuation = line[strlen(line)] != '\n'; + line_continuation = line[strlen(line) - 1] != '\n'; /* append log buffer */ _igt_log_buffer_append(formatted_line); diff -Nru intel-gpu-tools-1.13/lib/igt_core.h intel-gpu-tools-1.14/lib/igt_core.h --- intel-gpu-tools-1.13/lib/igt_core.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_core.h 2016-03-01 15:59:21.000000000 +0000 @@ -121,7 +121,7 @@ #endif int igt_subtest_init_parse_opts(int *argc, char **argv, const char *extra_short_opts, - struct option *extra_long_opts, + const struct option *extra_long_opts, const char *help_str, igt_opt_handler_t extra_opt_handler, void *handler_data); @@ -217,7 +217,7 @@ const char *igt_test_name(void); void igt_simple_init_parse_opts(int *argc, char **argv, const char *extra_short_opts, - struct option *extra_long_opts, + const struct option *extra_long_opts, const char *help_str, igt_opt_handler_t extra_opt_handler, void *handler_data); @@ -610,6 +610,7 @@ for (int child = 0; child < (num_children); child++) \ for (; __igt_fork(); exit(0)) void igt_waitchildren(void); +void igt_waitchildren_timeout(int seconds, const char *reason); /** * igt_helper_process: diff -Nru intel-gpu-tools-1.13/lib/igt_debugfs.c intel-gpu-tools-1.14/lib/igt_debugfs.c --- intel-gpu-tools-1.13/lib/igt_debugfs.c 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_debugfs.c 2016-03-01 15:59:21.000000000 +0000 @@ -280,11 +280,10 @@ { char buf[128]; - if (crc->n_words == 5) - sprintf(buf, "%08x %08x %08x %08x %08x", crc->crc[0], - crc->crc[1], crc->crc[2], crc->crc[3], crc->crc[4]); - else - igt_assert(0); + igt_assert_eq(crc->n_words, 5); + + sprintf(buf, "%08x %08x %08x %08x %08x", crc->crc[0], + crc->crc[1], crc->crc[2], crc->crc[3], crc->crc[4]); return strdup(buf); } @@ -299,6 +298,7 @@ int crc_fd; int line_len; int buffer_len; + int flags; enum pipe pipe; enum intel_pipe_crc_source source; @@ -390,19 +390,8 @@ fclose(ctl); } -/** - * igt_pipe_crc_new: - * @pipe: display pipe to use as source - * @source: CRC tap point to use as source - * - * This sets up a new pipe CRC capture object for the given @pipe and @source. - * - * Returns: A pipe CRC object if the given @pipe and @source. The library - * assumes that the source is always available since recent kernels support at - * least INTEL_PIPE_CRC_SOURCE_AUTO everywhere. - */ -igt_pipe_crc_t * -igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source) +static igt_pipe_crc_t * +pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source, int flags) { igt_pipe_crc_t *pipe_crc; char buf[128]; @@ -415,18 +404,55 @@ igt_assert(pipe_crc->ctl_fd != -1); sprintf(buf, "i915_pipe_%s_crc", kmstest_pipe_name(pipe)); - pipe_crc->crc_fd = igt_debugfs_open(buf, O_RDONLY); + pipe_crc->crc_fd = igt_debugfs_open(buf, flags); igt_assert(pipe_crc->crc_fd != -1); pipe_crc->line_len = PIPE_CRC_LINE_LEN; pipe_crc->buffer_len = PIPE_CRC_BUFFER_LEN; pipe_crc->pipe = pipe; pipe_crc->source = source; + pipe_crc->flags = flags; return pipe_crc; } /** + * igt_pipe_crc_new: + * @pipe: display pipe to use as source + * @source: CRC tap point to use as source + * + * This sets up a new pipe CRC capture object for the given @pipe and @source + * in blocking mode. + * + * Returns: A pipe CRC object for the given @pipe and @source. The library + * assumes that the source is always available since recent kernels support at + * least INTEL_PIPE_CRC_SOURCE_AUTO everywhere. + */ +igt_pipe_crc_t * +igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source) +{ + return pipe_crc_new(pipe, source, O_RDONLY); +} + +/** + * igt_pipe_crc_new_nonblock: + * @pipe: display pipe to use as source + * @source: CRC tap point to use as source + * + * This sets up a new pipe CRC capture object for the given @pipe and @source + * in nonblocking mode. + * + * Returns: A pipe CRC object for the given @pipe and @source. The library + * assumes that the source is always available since recent kernels support at + * least INTEL_PIPE_CRC_SOURCE_AUTO everywhere. + */ +igt_pipe_crc_t * +igt_pipe_crc_new_nonblock(enum pipe pipe, enum intel_pipe_crc_source source) +{ + return pipe_crc_new(pipe, source, O_RDONLY | O_NONBLOCK); +} + +/** * igt_pipe_crc_free: * @pipe_crc: pipe CRC object * @@ -442,6 +468,45 @@ free(pipe_crc); } +static bool pipe_crc_init_from_string(igt_crc_t *crc, const char *line) +{ + int n; + + crc->n_words = 5; + n = sscanf(line, "%8u %8x %8x %8x %8x %8x", &crc->frame, &crc->crc[0], + &crc->crc[1], &crc->crc[2], &crc->crc[3], &crc->crc[4]); + return n == 6; +} + +static int read_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out) +{ + ssize_t bytes_read; + char buf[pipe_crc->buffer_len]; + + igt_set_timeout(5, "CRC reading"); + bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len); + igt_reset_timeout(); + + if (bytes_read < 0 && errno == EAGAIN) { + igt_assert(pipe_crc->flags & O_NONBLOCK); + bytes_read = 0; + } else { + igt_assert_eq(bytes_read, pipe_crc->line_len); + } + buf[bytes_read] = '\0'; + + if (bytes_read && !pipe_crc_init_from_string(out, buf)) + return -EINVAL; + + return bytes_read; +} + +static void read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out) +{ + while (read_crc(pipe_crc, out) == 0) + usleep(1000); +} + /** * igt_pipe_crc_start: * @pipe_crc: pipe CRC object @@ -450,7 +515,7 @@ */ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc) { - igt_crc_t *crcs = NULL; + igt_crc_t crc; igt_assert(igt_pipe_crc_do_start(pipe_crc)); @@ -461,8 +526,8 @@ * On CHV sometimes the second CRC is bonkers as well, so don't trust * that one either. */ - igt_pipe_crc_get_crcs(pipe_crc, 2, &crcs); - free(crcs); + read_one_crc(pipe_crc, &crc); + read_one_crc(pipe_crc, &crc); } /** @@ -479,34 +544,6 @@ igt_assert_eq(write(pipe_crc->ctl_fd, buf, strlen(buf)), strlen(buf)); } -static bool pipe_crc_init_from_string(igt_crc_t *crc, const char *line) -{ - int n; - - crc->n_words = 5; - n = sscanf(line, "%8u %8x %8x %8x %8x %8x", &crc->frame, &crc->crc[0], - &crc->crc[1], &crc->crc[2], &crc->crc[3], &crc->crc[4]); - return n == 6; -} - -static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out) -{ - ssize_t bytes_read; - char buf[pipe_crc->buffer_len]; - - igt_set_timeout(5, "CRC reading"); - bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len); - igt_reset_timeout(); - - igt_assert_eq(bytes_read, pipe_crc->line_len); - buf[bytes_read] = '\0'; - - if (!pipe_crc_init_from_string(out, buf)) - return false; - - return true; -} - /** * igt_pipe_crc_get_crcs: * @pipe_crc: pipe CRC object @@ -519,8 +556,11 @@ * * Callers must start and stop the capturing themselves by calling * igt_pipe_crc_start() and igt_pipe_crc_stop(). + * + * Returns: The number of CRCs captured. Should be equal to @n_crcs in blocking + * mode, but can be less (even zero) in non-blocking mode. */ -void +int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs, igt_crc_t **out_crcs) { @@ -531,14 +571,19 @@ do { igt_crc_t *crc = &crcs[n]; + int ret; - if (!read_one_crc(pipe_crc, crc)) + ret = read_crc(pipe_crc, crc); + if (ret < 0) continue; + if (ret == 0) + break; n++; } while (n < n_crcs); *out_crcs = crcs; + return n; } static void crc_sanity_checks(igt_crc_t *crc) @@ -667,3 +712,61 @@ { igt_prefault_control(true); } + +static int get_object_count(void) +{ + FILE *file; + int ret, scanned; + + igt_drop_caches_set(DROP_RETIRE | DROP_ACTIVE); + + file = igt_debugfs_fopen("i915_gem_objects", "r"); + + scanned = fscanf(file, "%i objects", &ret); + igt_assert_eq(scanned, 1); + + return ret; +} + +/** + * igt_get_stable_obj_count: + * @driver: fd to drm/i915 GEM driver + * + * This puts the driver into a stable (quiescent) state and then returns the + * current number of gem buffer objects as reported in the i915_gem_objects + * debugFS interface. + */ +int igt_get_stable_obj_count(int driver) +{ + int obj_count; + gem_quiescent_gpu(driver); + obj_count = get_object_count(); + /* The test relies on the system being in the same state before and + * after the test so any difference in the object count is a result of + * leaks during the test. gem_quiescent_gpu() mostly achieves this but + * on android occasionally obj_count can still change briefly. + * The loop ensures obj_count has remained stable over several checks + */ +#ifdef ANDROID + { + int loop_count = 0; + int prev_obj_count = obj_count; + while (loop_count < 4) { + usleep(200000); + gem_quiescent_gpu(driver); + obj_count = get_object_count(); + if (obj_count == prev_obj_count) { + loop_count++; + } else { + igt_debug("loop_count=%d, obj_count=%d, prev_obj_count=%d\n", + loop_count, obj_count, prev_obj_count); + loop_count = 0; + prev_obj_count = obj_count; + } + + } + } +#endif + return obj_count; +} + diff -Nru intel-gpu-tools-1.13/lib/igt_debugfs.h intel-gpu-tools-1.14/lib/igt_debugfs.h --- intel-gpu-tools-1.13/lib/igt_debugfs.h 2015-12-02 15:13:14.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_debugfs.h 2016-03-01 15:59:21.000000000 +0000 @@ -115,11 +115,14 @@ void igt_require_pipe_crc(void); igt_pipe_crc_t * igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source); +igt_pipe_crc_t * +igt_pipe_crc_new_nonblock(enum pipe pipe, enum intel_pipe_crc_source source); void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc); -void igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs, - igt_crc_t **out_crcs); +__attribute__((warn_unused_result)) +int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs, + igt_crc_t **out_crcs); void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc); /* @@ -165,4 +168,10 @@ void igt_disable_prefault(void); void igt_enable_prefault(void); +/* + * Put the driver into a stable (quiescent) state and get the current number of + * gem buffer objects + */ +int igt_get_stable_obj_count(int driver); + #endif /* __IGT_DEBUGFS_H__ */ diff -Nru intel-gpu-tools-1.13/lib/igt_draw.c intel-gpu-tools-1.14/lib/igt_draw.c --- intel-gpu-tools-1.13/lib/igt_draw.c 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_draw.c 2016-03-01 15:59:21.000000000 +0000 @@ -594,20 +594,6 @@ } } -static int get_format_bpp(uint32_t drm_format) -{ - switch (drm_format) { - case DRM_FORMAT_RGB565: - return 16; - case DRM_FORMAT_XRGB8888: - case DRM_FORMAT_ARGB8888: - case DRM_FORMAT_XRGB2101010: - return 32; - default: - igt_assert(false); - } -} - /** * igt_draw_rect_fb: * @fd: the DRM file descriptor @@ -632,7 +618,7 @@ { igt_draw_rect(fd, bufmgr, context, fb->gem_handle, fb->size, fb->stride, method, rect_x, rect_y, rect_w, rect_h, color, - get_format_bpp(fb->drm_format)); + igt_drm_format_to_bpp(fb->drm_format)); } /** diff -Nru intel-gpu-tools-1.13/lib/igt_edid_template.h intel-gpu-tools-1.14/lib/igt_edid_template.h --- intel-gpu-tools-1.13/lib/igt_edid_template.h 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_edid_template.h 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,74 @@ +#define GAMMA(x) (((x) * 100) - 100) + +#define MANUFACTURER_ID(a, b, c) (a - '@') << 2 | (b - '@') >> 3, \ + (b - '@') << 5 | (c - '@') + + +#define ab(x, y) ((x) & 0xff), ((y) & 0xff), (((x) & 0xf00) >> 4) | (((y) & 0xf00) >> 8) +#define op(ho, hp, vo, vp) ((ho) & 0xff), ((hp) & 0xff), \ + (((vo) & 0xf) << 4) | ((vp) & 0xf), \ + (((ho) & 0x300) >> 2) | (((hp) & 0x300) >> 4) \ + | (((vo) & 0x30) >> 2) | ((vp) & 0x30 >> 4) + +static unsigned char EDID_NAME[EDID_LENGTH] = { + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, /* header */ + MANUFACTURER_ID('I', 'G', 'T'), + /* product code, serial number, week and year of manufacture */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, /* edid version (1.3) */ + /* basic display parameters */ + /* digital display, maximum horizontal image size, maximum vertical + * image size, gamma, features: RGB 4:4:4, native pixel format and + * refresh rate in descriptor 1 */ + 0x80, HSIZE, VSIZE, GAMMA(2.20), 0x02, + /* chromaticity coordinates */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* established timings: 640x480 60Hz, 800x600 60Hz, 1024x768 60Hz */ + 0x21, 0x08, 0x00, + /* standard timings */ + 0xd1, 0xc0, /* 1920x1080 60Hz */ + 0x81, 0xc0, /* 1280x720 60Hz */ + 0x61, 0x40, /* 1024x768 60Hz */ + 0x45, 0x40, /* 800x600 60Hz */ + 0x31, 0x40, /* 640x480 60Hz */ + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + /* descriptor 1 (preferred timing) */ + (CLOCK / 10) & 0x00ff, ((CLOCK / 10) & 0xff00) >> 8, + ab(HACTIVE, HBLANK), ab(VACTIVE, VBLANK), + op(HOFFSET, HPULSE, VOFFSET, VPULSE), + ab(HSIZE * 10, VSIZE * 10), + 0x00, 0x00, 0x00, + /* descriptor 2 (monitor range limits) */ + 0x00, 0x00, 0x00, 0xfd, 0x00, + VFREQ - 1, VFREQ + 1, /* minimum, maximum vertical field rate */ + (CLOCK / (HACTIVE + HBLANK)) - 1, /* minimum horizontal line rate */ + (CLOCK / (HACTIVE + HBLANK)) + 1, /* maximum horizontal line rate */ + (CLOCK / 10000) + 1, /* maximum pixel clock rate */ + 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + /* descriptor 3 (name descriptor) */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 'I', 'G', 'T', 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + /* descriptor 4 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* extensions, checksum */ + 0x00, 0x00 +}; + +#undef EDID_NAME +#undef VFREQ +#undef CLOCK +#undef HACTIVE +#undef HBLANK +#undef VACTIVE +#undef VBLANK +#undef HOFFSET +#undef HPULSE +#undef VOFFSET +#undef VPULSE +#undef HSIZE +#undef VSIZE +#undef GAMMA +#undef MANUFACTURER_ID +#undef ab +#undef op diff -Nru intel-gpu-tools-1.13/lib/igt_fb.c intel-gpu-tools-1.14/lib/igt_fb.c --- intel-gpu-tools-1.13/lib/igt_fb.c 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_fb.c 2016-03-01 15:59:21.000000000 +0000 @@ -32,6 +32,7 @@ #include "drmtest.h" #include "igt_fb.h" #include "ioctl_wrappers.h" +#include "intel_chipset.h" /** * SECTION:igt_fb @@ -72,26 +73,88 @@ #define for_each_format(f) \ for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++) +static void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp, + unsigned *width_ret, unsigned *height_ret) +{ + uint32_t devid = intel_get_drm_devid(fd); -/* helpers to create nice-looking framebuffers */ -static int create_bo_for_fb(int fd, int width, int height, int bpp, - uint64_t tiling, unsigned bo_size, - unsigned bo_stride, uint32_t *gem_handle_ret, - unsigned *size_ret, unsigned *stride_ret) + switch (tiling) { + case LOCAL_DRM_FORMAT_MOD_NONE: + *width_ret = 64; + *height_ret = 1; + break; + case LOCAL_I915_FORMAT_MOD_X_TILED: + if (intel_gen(devid) == 2) { + *width_ret = 128; + *height_ret = 16; + } else { + *width_ret = 512; + *height_ret = 8; + } + break; + case LOCAL_I915_FORMAT_MOD_Y_TILED: + if (IS_915(devid)) + *width_ret = 512; + else + *width_ret = 128; + *height_ret = 32; + break; + case LOCAL_I915_FORMAT_MOD_Yf_TILED: + switch (fb_bpp) { + case 8: + *width_ret = 64; + *height_ret = 64; + break; + case 16: + case 32: + *width_ret = 128; + *height_ret = 32; + break; + case 64: + case 128: + *width_ret = 256; + *height_ret = 16; + break; + default: + igt_assert(false); + } + break; + default: + igt_assert(false); + } +} + +/** + * igt_calc_fb_size: + * @fd: the DRM file descriptor + * @width: width of the framebuffer in pixels + * @height: height of the framebuffer in pixels + * @bpp: bytes per pixel of the framebuffer + * @tiling: tiling layout of the framebuffer (as framebuffer modifier) + * @size_ret: returned size for the framebuffer + * @stride_ret: returned stride for the framebuffer + * + * This function returns valid stride and size values for a framebuffer with the + * specified parameters. + */ +void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling, + unsigned *size_ret, unsigned *stride_ret) { - uint32_t gem_handle; - int size, ret = 0; - unsigned stride; + unsigned int tile_width, tile_height, stride, size; + int byte_width = width * (bpp / 8); - if (tiling != LOCAL_DRM_FORMAT_MOD_NONE) { + igt_get_fb_tile_size(fd, tiling, bpp, &tile_width, &tile_height); + + if (intel_gen(intel_get_drm_devid(fd)) <= 3 && + tiling != LOCAL_DRM_FORMAT_MOD_NONE) { int v; - /* Round the tiling up to the next power-of-two and the - * region up to the next pot fence size so that this works - * on all generations. + /* Round the tiling up to the next power-of-two and the region + * up to the next pot fence size so that this works on all + * generations. * - * This can still fail if the framebuffer is too large to - * be tiled. But then that failure is expected. + * This can still fail if the framebuffer is too large to be + * tiled. But then that failure is expected. */ v = width * bpp / 8; @@ -102,11 +165,25 @@ for (size = 1024*1024; size < v; size *= 2) ; } else { - /* Scan-out has a 64 byte alignment restriction */ - stride = ALIGN(width * (bpp / 8), 64); - size = stride * height; + stride = ALIGN(byte_width, tile_width); + size = stride * ALIGN(height, tile_height); } + *stride_ret = stride; + *size_ret = size; +} + +/* helpers to create nice-looking framebuffers */ +static int create_bo_for_fb(int fd, int width, int height, int bpp, + uint64_t tiling, unsigned bo_size, + unsigned bo_stride, uint32_t *gem_handle_ret, + unsigned *size_ret, unsigned *stride_ret) +{ + uint32_t gem_handle; + int ret = 0; + unsigned size, stride; + + igt_calc_fb_size(fd, width, height, bpp, tiling, &size, &stride); if (bo_size == 0) bo_size = size; if (bo_stride == 0) @@ -503,7 +580,7 @@ * @format: drm fourcc pixel format code * @tiling: tiling layout of the framebuffer * @r: red value to use as fill color - * @g: gree value to use as fill color + * @g: green value to use as fill color * @b: blue value to use as fill color * @fb: pointer to an #igt_fb structure * @@ -537,6 +614,132 @@ return fb_id; } +/** + * igt_create_pattern_fb: + * @fd: open i915 drm file descriptor + * @width: width of the framebuffer in pixel + * @height: height of the framebuffer in pixel + * @format: drm fourcc pixel format code + * @tiling: tiling layout of the framebuffer + * @fb: pointer to an #igt_fb structure + * + * This function allocates a gem buffer object suitable to back a framebuffer + * with the requested properties and then wraps it up in a drm framebuffer + * object. All metadata is stored in @fb. + * + * Compared to igt_create_fb() this function also draws the standard test pattern + * into the framebuffer. + * + * Returns: + * The kms id of the created framebuffer on success or a negative error code on + * failure. + */ +unsigned int igt_create_pattern_fb(int fd, int width, int height, + uint32_t format, uint64_t tiling, + struct igt_fb *fb /* out */) +{ + unsigned int fb_id; + cairo_t *cr; + + fb_id = igt_create_fb(fd, width, height, format, tiling, fb); + igt_assert(fb_id); + + cr = igt_get_cairo_ctx(fd, fb); + igt_paint_test_pattern(cr, width, height); + igt_assert(cairo_status(cr) == 0); + cairo_destroy(cr); + + return fb_id; +} + +/** + * igt_create_color_pattern_fb: + * @fd: open i915 drm file descriptor + * @width: width of the framebuffer in pixel + * @height: height of the framebuffer in pixel + * @format: drm fourcc pixel format code + * @tiling: tiling layout of the framebuffer + * @r: red value to use as fill color + * @g: green value to use as fill color + * @b: blue value to use as fill color + * @fb: pointer to an #igt_fb structure + * + * This function allocates a gem buffer object suitable to back a framebuffer + * with the requested properties and then wraps it up in a drm framebuffer + * object. All metadata is stored in @fb. + * + * Compared to igt_create_fb() this function also fills the entire framebuffer + * with the given color, and then draws the standard test pattern into the + * framebuffer. + * + * Returns: + * The kms id of the created framebuffer on success or a negative error code on + * failure. + */ +unsigned int igt_create_color_pattern_fb(int fd, int width, int height, + uint32_t format, uint64_t tiling, + double r, double g, double b, + struct igt_fb *fb /* out */) +{ + unsigned int fb_id; + cairo_t *cr; + + fb_id = igt_create_fb(fd, width, height, format, tiling, fb); + igt_assert(fb_id); + + cr = igt_get_cairo_ctx(fd, fb); + igt_paint_color(cr, 0, 0, width, height, r, g, b); + igt_paint_test_pattern(cr, width, height); + igt_assert(cairo_status(cr) == 0); + cairo_destroy(cr); + + return fb_id; +} + +/** + * igt_create_image_fb: + * @drm_fd: open i915 drm file descriptor + * @width: width of the framebuffer in pixel or 0 + * @height: height of the framebuffer in pixel or 0 + * @format: drm fourcc pixel format code + * @tiling: tiling layout of the framebuffer + * @filename: filename of the png image to draw + * @fb: pointer to an #igt_fb structure + * + * Create a framebuffer with the specified image. If @width is zero the + * image width will be used. If @height is zero the image height will be used. + * + * Returns: + * The kms id of the created framebuffer on success or a negative error code on + * failure. + */ +unsigned int igt_create_image_fb(int fd, int width, int height, + uint32_t format, uint64_t tiling, + const char *filename, + struct igt_fb *fb /* out */) +{ + cairo_surface_t *image; + uint32_t fb_id; + cairo_t *cr; + + image = cairo_image_surface_create_from_png(filename); + igt_assert(cairo_surface_status(image) == CAIRO_STATUS_SUCCESS); + if (width == 0) + width = cairo_image_surface_get_width(image); + if (height == 0) + height = cairo_image_surface_get_height(image); + cairo_surface_destroy(image); + + fb_id = igt_create_fb(fd, width, height, format, tiling, fb); + + cr = igt_get_cairo_ctx(fd, fb); + igt_paint_image(cr, filename, 0, 0, width, height); + igt_assert(cairo_status(cr) == 0); + cairo_destroy(cr); + + return fb_id; +} + struct box { int x, y, width, height; }; @@ -938,28 +1141,34 @@ } /** - * igt_get_all_formats: + * igt_get_all_cairo_formats: * @formats: pointer to pointer to store the allocated formats array * @format_count: pointer to integer to store the size of the allocated array * - * This functions returns an array of all the drm fourcc codes supported by this - * library. The caller must free the allocated array again with free(). + * This functions returns an array of all the drm fourcc codes supported by + * cairo and this library. */ -void igt_get_all_formats(const uint32_t **formats, int *format_count) +void igt_get_all_cairo_formats(const uint32_t **formats, int *format_count) { static uint32_t *drm_formats; + static int n_formats; if (!drm_formats) { struct format_desc_struct *f; uint32_t *format; - drm_formats = calloc(ARRAY_SIZE(format_desc), - sizeof(*drm_formats)); + n_formats = 0; + for_each_format(f) + if (f->cairo_id != CAIRO_FORMAT_INVALID) + n_formats++; + + drm_formats = calloc(n_formats, sizeof(*drm_formats)); format = &drm_formats[0]; for_each_format(f) - *format++ = f->drm_id; + if (f->cairo_id != CAIRO_FORMAT_INVALID) + *format++ = f->drm_id; } *formats = drm_formats; - *format_count = ARRAY_SIZE(format_desc); + *format_count = n_formats; } diff -Nru intel-gpu-tools-1.13/lib/igt_fb.h intel-gpu-tools-1.14/lib/igt_fb.h --- intel-gpu-tools-1.13/lib/igt_fb.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_fb.h 2016-03-01 15:59:21.000000000 +0000 @@ -69,6 +69,8 @@ align_hcenter = 0x08, }; +void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling, + unsigned *size_ret, unsigned *stride_ret); unsigned int igt_create_fb_with_bo_size(int fd, int width, int height, uint32_t format, uint64_t tiling, @@ -80,6 +82,17 @@ uint32_t format, uint64_t tiling, double r, double g, double b, struct igt_fb *fb /* out */); +unsigned int igt_create_pattern_fb(int fd, int width, int height, + uint32_t format, uint64_t tiling, + struct igt_fb *fb /* out */); +unsigned int igt_create_color_pattern_fb(int fd, int width, int height, + uint32_t format, uint64_t tiling, + double r, double g, double b, + struct igt_fb *fb /* out */); +unsigned int igt_create_image_fb(int drm_fd, int width, int height, + uint32_t format, uint64_t tiling, + const char *filename, + struct igt_fb *fb /* out */); unsigned int igt_create_stereo_fb(int drm_fd, drmModeModeInfo *mode, uint32_t format, uint64_t tiling); void igt_remove_fb(int fd, struct igt_fb *fb); @@ -104,7 +117,7 @@ uint32_t igt_bpp_depth_to_drm_format(int bpp, int depth); uint32_t igt_drm_format_to_bpp(uint32_t drm_format); const char *igt_format_str(uint32_t drm_format); -void igt_get_all_formats(const uint32_t **formats, int *format_count); +void igt_get_all_cairo_formats(const uint32_t **formats, int *format_count); #endif /* __IGT_FB_H__ */ diff -Nru intel-gpu-tools-1.13/lib/igt_gt.c intel-gpu-tools-1.14/lib/igt_gt.c --- intel-gpu-tools-1.13/lib/igt_gt.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_gt.c 2016-03-01 15:59:21.000000000 +0000 @@ -30,6 +30,7 @@ #include #include "drmtest.h" +#include "igt_aux.h" #include "igt_core.h" #include "igt_gt.h" #include "igt_debugfs.h" @@ -37,6 +38,10 @@ #include "intel_reg.h" #include "intel_chipset.h" +#if NEW_CONTEXT_PARAM_NO_ERROR_CAPTURE_API +#define LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4 +#endif + /** * SECTION:igt_gt * @short_description: GT support library @@ -50,17 +55,21 @@ static bool has_gpu_reset(int fd) { - struct drm_i915_getparam gp; - int val = 0; - - memset(&gp, 0, sizeof(gp)); - gp.param = 35; /* HAS_GPU_RESET */ - gp.value = &val; - - if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp)) - return intel_gen(intel_get_drm_devid(fd)) >= 5; - - return val > 0; + static int once = -1; + if (once < 0) { + struct drm_i915_getparam gp; + int val = 0; + + memset(&gp, 0, sizeof(gp)); + gp.param = 35; /* HAS_GPU_RESET */ + gp.value = &val; + + if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp)) + once = intel_gen(intel_get_drm_devid(fd)) >= 5; + else + once = val > 0; + } + return once; } /** @@ -71,26 +80,58 @@ * Convenience helper to check whether advanced hang injection is supported by * the kernel. Uses igt_skip to automatically skip the test/subtest if this * isn't the case. + * + * Note that we can't simply just call this from igt_hang_ring since some + * tests want to exercise gpu wedging behavior. For which we intentionally + * disable gpu reset support, but still want to inject a hang, see for example + * tests/gem_eio.c Instead, we expect that the first invocation of + * igt_require_hand_ring be from a vanilla context and use the has_gpu_reset() + * determined then for all later instances. This allows us the convenience + * of double checking when injecting hangs, whilst pushing the complexity + * to the tests that are deliberating trying to break the box. + * + * This function is also controlled by the environment variables: + * + * IGT_HANG (boolean) - if false, skip all tests that try to inject a hang. + * Default: true + * + * IGT_HANG_WITHOUT_RESET (boolean) - if true, allow the hang even if the + * kernel does not support GPU recovery. The machine will be wedged afterwards + * (and so require a reboot between testing), but it does allow limited testing + * to be done under hang injection. + * Default: false */ void igt_require_hang_ring(int fd, int ring) { + if (!igt_check_boolean_env_var("IGT_HANG", true)) + igt_skip("hang injection disabled by user"); + + gem_require_ring(fd, ring); gem_context_require_ban_period(fd); - igt_require(has_gpu_reset(fd)); + if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false)) + igt_require(has_gpu_reset(fd)); } /** - * igt_hang_ring: + * igt_hang_ring_ctx: * @fd: open i915 drm file descriptor + * @ctx: the contxt specifier * @ring: execbuf ring flag + * @flags: set of flags to control execution * - * This helper function injects a hanging batch into @ring. It returns a - * #igt_hang_ring_t structure which must be passed to igt_post_hang_ring() for - * hang post-processing (after the gpu hang interaction has been tested. + * This helper function injects a hanging batch associated with @ctx into @ring. + * It returns a #igt_hang_ring_t structure which must be passed to + * igt_post_hang_ring() for hang post-processing (after the gpu hang + * interaction has been tested. * * Returns: * Structure with helper internal state for igt_post_hang_ring(). */ -igt_hang_ring_t igt_hang_ring(int fd, int ring) +igt_hang_ring_t igt_hang_ctx(int fd, + uint32_t ctx, + int ring, + unsigned flags, + uint64_t *offset) { struct drm_i915_gem_relocation_entry reloc; struct drm_i915_gem_execbuffer2 execbuf; @@ -100,15 +141,36 @@ unsigned ban; unsigned len; - param.context = 0; + igt_require_hang_ring(fd, ring); + + /* One day the kernel ABI will be fixed! */ + igt_require(ctx == 0 || ring == I915_EXEC_RENDER); + + param.context = ctx; param.size = 0; + + if ((flags & HANG_ALLOW_CAPTURE) == 0) { +#if NEW_CONTEXT_PARAM_NO_ERROR_CAPTURE_API + param.param = LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE; + param.value = 1; + /* Older kernels may not have NO_ERROR_CAPTURE, in which case + * we just eat the error state in post-hang (and hope we eat + * the right one). + */ + __gem_context_set_param(fd, ¶m); +#endif + } + param.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD; param.value = 0; gem_context_get_param(fd, ¶m); ban = param.value; - param.value = 0; - gem_context_set_param(fd, ¶m); + if ((flags & HANG_ALLOW_BAN) == 0) { + param.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD; + param.value = 0; + gem_context_set_param(fd, ¶m); + } memset(&reloc, 0, sizeof(reloc)); memset(&exec, 0, sizeof(exec)); @@ -118,6 +180,7 @@ exec.relocation_count = 1; exec.relocs_ptr = (uintptr_t)&reloc; + memset(b, 0xc5, sizeof(b)); len = 2; if (intel_gen(intel_get_drm_devid(fd)) >= 8) len++; @@ -134,9 +197,39 @@ execbuf.buffer_count = 1; execbuf.batch_len = sizeof(b); execbuf.flags = ring; + i915_execbuffer2_set_context_id(execbuf, ctx); gem_execbuf(fd, &execbuf); - return (struct igt_hang_ring){ exec.handle, ban }; + if (offset) + *offset = exec.offset; + + return (struct igt_hang_ring){ exec.handle, ctx, ban, flags }; +} + +/** + * igt_hang_ring: + * @fd: open i915 drm file descriptor + * @ring: execbuf ring flag + * + * This helper function injects a hanging batch into @ring. It returns a + * #igt_hang_ring_t structure which must be passed to igt_post_hang_ring() for + * hang post-processing (after the gpu hang interaction has been tested. + * + * Returns: + * Structure with helper internal state for igt_post_hang_ring(). + */ +igt_hang_ring_t igt_hang_ring(int fd, int ring) +{ + return igt_hang_ctx(fd, 0, ring, 0, NULL); +} + +static void eat_error_state(void) +{ + int fd; + + fd = igt_debugfs_open("i915_error_state", O_WRONLY); + igt_assert(write(fd, "", 1) == 1); + close(fd); } /** @@ -158,11 +251,45 @@ I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); gem_close(fd, arg.handle); - param.context = 0; + param.context = arg.ctx; param.size = 0; param.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD; param.value = arg.ban; gem_context_set_param(fd, ¶m); + + if ((arg.flags & HANG_ALLOW_CAPTURE) == 0) { +#if NEW_CONTEXT_PARAM_NO_ERROR_CAPTURE_API + param.param = LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE; + param.value = 0; + if (__gem_context_set_param(fd, ¶m)) + eat_error_state(); +#else + eat_error_state(); +#endif + } +} + +/** + * igt_force_gpu_reset: + * + * forces a gpu reset using the i915_wedged debugfs interface. To be used to + * recover from situations where the hangcheck didn't trigger and/or the gpu is + * stuck, either because the test manually disabled gpu resets or because the + * test hit an hangcheck bug + */ +void igt_force_gpu_reset(void) +{ + int fd, ret; + + igt_debug("Triggering GPU reset\n"); + + fd = igt_debugfs_open("i915_wedged", O_RDWR); + igt_require(fd >= 0); + + ret = write(fd, "-1\n", 3); + close(fd); + + igt_assert_eq(ret, 3); } /* GPU abusers */ @@ -190,31 +317,22 @@ * This is useful to exercise slow running code (such as aperture placement) * which needs to be robust against a GPU reset. * - * In tests with subtests this function can be called outside of failure - * catching code blocks like #igt_fixture or #igt_subtest. + * This function automatically skips when test requirements aren't met using + * igt_skip(). */ -int igt_fork_hang_helper(void) +void igt_fork_hang_helper(void) { int fd, gen; - if (igt_only_list_subtests()) - return 1; - fd = drm_open_driver(DRIVER_INTEL); - if (fd == -1) - return 0; gen = intel_gen(intel_get_drm_devid(fd)); - if (gen < 5) { - close(fd); - return 0; - } + igt_skip_on(gen < 5); igt_fork_helper(&hang_helper) hang_helper_process(getppid(), fd); close(fd); - return 1; } /** @@ -227,10 +345,8 @@ */ void igt_stop_hang_helper(void) { - if (igt_only_list_subtests()) - return; - - igt_stop_helper(&hang_helper); + if (hang_helper.running) + igt_stop_helper(&hang_helper); } /** @@ -354,3 +470,104 @@ "i915_ring_stop readback mismatch 0x%x vs 0x%x\n", flags, current); } + +static unsigned int clflush_size; + +int igt_setup_clflush(void) +{ + FILE *file; + char *line = NULL; + size_t size = 0; + int first_stanza = 1; + int has_clflush = 0; + + if (clflush_size) + return 1; + + file = fopen("/proc/cpuinfo", "r"); + if (file == NULL) + return 0; + + while (getline(&line, &size, file) != -1) { + if (strncmp(line, "processor", 9) == 0) { + if (!first_stanza) + break; + first_stanza = 0; + } + + if (strncmp(line, "flags", 5) == 0) { + if (strstr(line, "clflush")) + has_clflush = 1; + } + + if (strncmp(line, "clflush size", 12) == 0) { + char *colon = strchr(line, ':'); + if (colon) + clflush_size = atoi(colon + 1); + } + } + free(line); + fclose(file); + + return has_clflush && clflush_size; +} + +void igt_clflush_range(void *addr, int size) +{ +#if defined(__i386__) || defined(__x86_64__) + char *p, *end; + + end = (char *)addr + size; + p = (char *)((uintptr_t)addr & ~((uintptr_t)clflush_size - 1)); + + asm volatile("mfence" ::: "memory"); + for (; p < end; p += clflush_size) + asm volatile("clflush %0" : "+m" (*(volatile char *)p)); + asm volatile("mfence" ::: "memory"); +#else + fprintf(stderr, "igt_clflush_range() unsupported\n"); +#endif +} + +/** + * intel_detect_and_clear_missed_irq: + * @fd: open i915 drm file descriptor, used to quiesce the gpu + * + * This functions idles the GPU and then queries whether there has + * been a missed interrupt reported by the driver. Afterwards it + * clears the missed interrupt flag, in order to disable the timer + * fallback for the next test. + */ +unsigned intel_detect_and_clear_missed_interrupts(int fd) +{ + unsigned missed = 0; + FILE *file; + + gem_quiescent_gpu(fd); + + file = igt_debugfs_fopen("i915_ring_missed_irq", "r"); + if (file) { + igt_assert(fscanf(file, "%x", &missed) == 1); + fclose(file); + } + if (missed) { + file = igt_debugfs_fopen("i915_ring_missed_irq", "w"); + if (file) { + fwrite("0\n", 1, 2, file); + fclose(file); + } + } + + return missed; +} + +const struct intel_execution_engine intel_execution_engines[] = { + { "default", NULL, 0, 0 }, + { "render", "render ring", I915_EXEC_RENDER, 0 }, + { "bsd", "bsd ring", I915_EXEC_BSD, 0 }, + { "bsd1", "bsd ring", I915_EXEC_BSD, 1<<13 /*I915_EXEC_BSD_RING1*/ }, + { "bsd2", "bsd2 ring", I915_EXEC_BSD, 2<<13 /*I915_EXEC_BSD_RING2*/ }, + { "blt", "blitter ring", I915_EXEC_BLT, 0 }, + { "vebox", "video enhancement ring", I915_EXEC_VEBOX, 0 }, + { NULL, 0, 0 } +}; diff -Nru intel-gpu-tools-1.13/lib/igt_gt.h intel-gpu-tools-1.14/lib/igt_gt.h --- intel-gpu-tools-1.13/lib/igt_gt.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_gt.h 2016-03-01 15:59:21.000000000 +0000 @@ -30,13 +30,27 @@ typedef struct igt_hang_ring { unsigned handle; + unsigned ctx; unsigned ban; + unsigned flags; } igt_hang_ring_t; +#define HANG_POISON 0xc5c5c5c5 + +struct igt_hang_ring igt_hang_ctx(int fd, + uint32_t ctx, + int ring, + unsigned flags, + uint64_t *offset); +#define HANG_ALLOW_BAN 1 +#define HANG_ALLOW_CAPTURE 2 + struct igt_hang_ring igt_hang_ring(int fd, int ring); void igt_post_hang_ring(int fd, struct igt_hang_ring arg); -int igt_fork_hang_helper(void); +void igt_force_gpu_reset(void); + +void igt_fork_hang_helper(void); void igt_stop_hang_helper(void); int igt_open_forcewake_handle(void); @@ -74,4 +88,16 @@ void igt_set_stop_rings(enum stop_ring_flags flags); enum stop_ring_flags igt_get_stop_rings(void); +int igt_setup_clflush(void); +void igt_clflush_range(void *addr, int size); + +unsigned intel_detect_and_clear_missed_interrupts(int fd); + +extern const struct intel_execution_engine { + const char *name; + const char *full_name; + unsigned exec_id; + unsigned flags; +} intel_execution_engines[]; + #endif /* IGT_GT_H */ diff -Nru intel-gpu-tools-1.13/lib/igt.h intel-gpu-tools-1.14/lib/igt.h --- intel-gpu-tools-1.13/lib/igt.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt.h 2016-03-01 15:59:21.000000000 +0000 @@ -35,6 +35,7 @@ #include "igt_fb.h" #include "igt_gt.h" #include "igt_kms.h" +#include "igt_pm.h" #include "igt_stats.h" #include "instdone.h" #include "intel_batchbuffer.h" diff -Nru intel-gpu-tools-1.13/lib/igt_kms.c intel-gpu-tools-1.14/lib/igt_kms.c --- intel-gpu-tools-1.13/lib/igt_kms.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_kms.c 2016-03-01 15:59:21.000000000 +0000 @@ -53,6 +53,23 @@ #define MAX_CONNECTORS 32 static char *forced_connectors[MAX_CONNECTORS + 1]; +static void update_edid_csum(unsigned char *edid) +{ + int i, sum = 0; + struct tm *tm; + time_t t; + + /* year of manufacture */ + t = time(NULL); + tm = localtime(&t); + edid[17] = tm->tm_year - 90; + + /* calculate checksum */ + for (i = 0; i < 127; i++) { + sum = sum + edid[i]; + } + edid[127] = 256 - sum; +} #define VFREQ 60 #define CLOCK 148500 @@ -68,62 +85,8 @@ #define HSIZE 52 #define VSIZE 30 -#define GAMMA(x) (x * 100) - 100 - -#define MANUFACTURER_ID(a, b, c) (a - '@') << 2 | (b - '@') >> 3, \ - (b - '@') << 5 | (c - '@') - - -#define ab(x, y) (x & 0xff), (y & 0xff), ((x & 0xf00) >> 4) | ((y & 0xf00) >> 8) -#define op(ho, hp, vo, vp) (ho & 0xff), (hp & 0xff), \ - ((vo & 0xf) << 4) | (vp & 0xf), \ - ((ho & 0x300) >> 2) | ((hp & 0x300) >> 4) \ - | ((vo & 0x30) >> 2) | (vp & 0x30 >> 4) - -static unsigned char base_edid[EDID_LENGTH] = { - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, /* header */ - MANUFACTURER_ID('I', 'G', 'T'), - /* product code, serial number, week and year of manufacture */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x03, /* edid version (1.3) */ - /* basic display parameters */ - /* digital display, maximum horizontal image size, maximum vertical - * image size, gamma, features: RGB 4:4:4, native pixel format and - * refresh rate in descriptor 1 */ - 0x80, HSIZE, VSIZE, GAMMA(2.20), 0x02, - /* chromaticity coordinates */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* established timings: 640x480 60Hz, 800x600 60Hz, 1024x768 60Hz */ - 0x21, 0x08, 0x00, - /* standard timings */ - 0xd1, 0xc0, /* 1920x1080 60Hz */ - 0x81, 0xc0, /* 1280x720 60Hz */ - 0x61, 0x40, /* 1024x768 60Hz */ - 0x45, 0x40, /* 800x600 60Hz */ - 0x31, 0x40, /* 640x480 60Hz */ - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - /* descriptor 1 (preferred timing) */ - (CLOCK / 10) & 0x00ff, ((CLOCK / 10) & 0xff00) >> 8, - ab(HACTIVE, HBLANK), ab(VACTIVE, VBLANK), - op(HOFFSET, HPULSE, VOFFSET, VPULSE), - ab(HSIZE * 10, VSIZE * 10), - 0x00, 0x00, 0x00, - /* descriptor 2 (monitor range limits) */ - 0x00, 0x00, 0x00, 0xfd, 0x00, - VFREQ - 1, VFREQ + 1, /* minimum, maximum vertical field rate */ - (CLOCK / (HACTIVE + HBLANK)) - 1, /* minimum horizontal line rate */ - (CLOCK / (HACTIVE + HBLANK)) + 1, /* maximum horizontal line rate */ - (CLOCK / 10000) + 1, /* maximum pixel clock rate */ - 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - /* descriptor 3 (name descriptor) */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 'I', 'G', 'T', 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - /* descriptor 4 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* extensions, checksum */ - 0x00, 0x00 -}; +#define EDID_NAME base_edid +#include "igt_edid_template.h" /** * igt_kms_get_base_edid: @@ -143,24 +106,51 @@ */ const unsigned char* igt_kms_get_base_edid(void) { - int i, sum = 0; - struct tm *tm; - time_t t; - - /* year of manufacture */ - t = time(NULL); - tm = localtime(&t); - base_edid[17] = tm->tm_year - 90; - - /* calculate checksum */ - for (i = 0; i < 127; i++) { - sum = sum + base_edid[i]; - } - base_edid[127] = 256 - sum; + update_edid_csum(base_edid); return base_edid; } +#define VFREQ 60 +#define CLOCK 101000 +#define HACTIVE 1400 +#define HBLANK 160 +#define VACTIVE 1050 +#define VBLANK 30 +#define HOFFSET 48 +#define HPULSE 32 +#define VOFFSET 3 +#define VPULSE 4 + +#define HSIZE 52 +#define VSIZE 30 + +#define EDID_NAME alt_edid +#include "igt_edid_template.h" + +/** + * igt_kms_get_alt_edid: + * + * Get an alternate edid block, which includes the following modes: + * + * - 1400x1050 60Hz + * - 1920x1080 60Hz + * - 1280x720 60Hz + * - 1024x768 60Hz + * - 800x600 60Hz + * - 640x480 60Hz + * + * This can be extended with further features using functions such as + * #kmstest_edid_add_3d. + * + * Returns: an alternate edid block + */ +const unsigned char* igt_kms_get_alt_edid(void) +{ + update_edid_csum(alt_edid); + + return alt_edid; +} /** * SECTION:igt_kms @@ -393,6 +383,7 @@ char *path, **tmp; const char *value; int debugfs_fd, ret, len; + drmModeConnector *temp; uint32_t devid; devid = intel_get_drm_devid(drm_fd); @@ -459,6 +450,11 @@ igt_install_exit_handler(reset_connectors_at_exit); + /* To allow callers to always use GetConnectorCurrent we need to force a + * redetection here. */ + temp = drmModeGetConnector(drm_fd, connector->connector_id); + drmModeFreeConnector(temp); + igt_assert(ret != -1); return (ret == -1) ? false : true; } @@ -480,6 +476,7 @@ { char *path; int debugfs_fd, ret; + drmModeConnector *temp; igt_assert_neq(asprintf(&path, "%s-%d/edid_override", kmstest_connector_type_str(connector->connector_type), connector->connector_type_id), -1); @@ -494,6 +491,11 @@ ret = write(debugfs_fd, edid, length); close(debugfs_fd); + /* To allow callers to always use GetConnectorCurrent we need to force a + * redetection here. */ + temp = drmModeGetConnector(drm_fd, connector->connector_id); + drmModeFreeConnector(temp); + igt_assert(ret != -1); } @@ -531,18 +533,20 @@ } /** - * kmstest_get_connector_config: + * _kmstest_connector_config: * @drm_fd: DRM fd * @connector_id: DRM connector id * @crtc_idx_mask: mask of allowed DRM CRTC indices * @config: structure filled with the possible configuration + * @probe: whether to fully re-probe mode list or not * * This tries to find a suitable configuration for the given connector and CRTC * constraint and fills it into @config. */ -bool kmstest_get_connector_config(int drm_fd, uint32_t connector_id, - unsigned long crtc_idx_mask, - struct kmstest_connector_config *config) +static bool _kmstest_connector_config(int drm_fd, uint32_t connector_id, + unsigned long crtc_idx_mask, + struct kmstest_connector_config *config, + bool probe) { drmModeRes *resources; drmModeConnector *connector; @@ -556,7 +560,11 @@ } /* First, find the connector & mode */ - connector = drmModeGetConnector(drm_fd, connector_id); + if (probe) + connector = drmModeGetConnector(drm_fd, connector_id); + else + connector = drmModeGetConnectorCurrent(drm_fd, connector_id); + if (!connector) goto err2; @@ -632,6 +640,43 @@ } /** + * kmstest_get_connector_config: + * @drm_fd: DRM fd + * @connector_id: DRM connector id + * @crtc_idx_mask: mask of allowed DRM CRTC indices + * @config: structure filled with the possible configuration + * + * This tries to find a suitable configuration for the given connector and CRTC + * constraint and fills it into @config. + */ +bool kmstest_get_connector_config(int drm_fd, uint32_t connector_id, + unsigned long crtc_idx_mask, + struct kmstest_connector_config *config) +{ + return _kmstest_connector_config(drm_fd, connector_id, crtc_idx_mask, + config, 0); +} + +/** + * kmstest_probe_connector_config: + * @drm_fd: DRM fd + * @connector_id: DRM connector id + * @crtc_idx_mask: mask of allowed DRM CRTC indices + * @config: structure filled with the possible configuration + * + * This tries to find a suitable configuration for the given connector and CRTC + * constraint and fills it into @config, fully probing the connector in the + * process. + */ +bool kmstest_probe_connector_config(int drm_fd, uint32_t connector_id, + unsigned long crtc_idx_mask, + struct kmstest_connector_config *config) +{ + return _kmstest_connector_config(drm_fd, connector_id, crtc_idx_mask, + config, 1); +} + +/** * kmstest_free_connector_config: * @config: connector configuration structure * @@ -1935,7 +1980,7 @@ { igt_display_t *display = pipe->display; - LOG(display, "%s.%d: crtc_set_background(%lu)\n", + LOG(display, "%s.%d: crtc_set_background(%"PRIx64")\n", kmstest_pipe_name(pipe->pipe), pipe->pipe, background); @@ -1979,7 +2024,7 @@ for (int i = 0; i < res->count_connectors; i++) { - c = drmModeGetConnector(drm_fd, res->connectors[i]); + c = drmModeGetConnectorCurrent(drm_fd, res->connectors[i]); /* don't attempt to force connectors that are already connected */ diff -Nru intel-gpu-tools-1.13/lib/igt_kms.h intel-gpu-tools-1.14/lib/igt_kms.h --- intel-gpu-tools-1.13/lib/igt_kms.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_kms.h 2016-03-01 15:59:21.000000000 +0000 @@ -140,6 +140,9 @@ bool kmstest_get_connector_config(int drm_fd, uint32_t connector_id, unsigned long crtc_idx_mask, struct kmstest_connector_config *config); +bool kmstest_probe_connector_config(int drm_fd, uint32_t connector_id, + unsigned long crtc_idx_mask, + struct kmstest_connector_config *config); void kmstest_free_connector_config(struct kmstest_connector_config *config); void kmstest_set_connector_dpms(int fd, drmModeConnector *connector, int mode); @@ -286,6 +289,7 @@ #define EDID_LENGTH 128 const unsigned char* igt_kms_get_base_edid(void); +const unsigned char* igt_kms_get_alt_edid(void); #endif /* __IGT_KMS_H__ */ diff -Nru intel-gpu-tools-1.13/lib/igt_pm.c intel-gpu-tools-1.14/lib/igt_pm.c --- intel-gpu-tools-1.13/lib/igt_pm.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_pm.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,233 @@ +/* + * Copyright © 2013, 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Paulo Zanoni + * David Weinehall + * + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "drmtest.h" +#include "igt_pm.h" + +enum { + POLICY_UNKNOWN = -1, + POLICY_MAX_PERFORMANCE = 0, + POLICY_MEDIUM_POWER = 1, + POLICY_MIN_POWER = 2 +}; + +#define MAX_PERFORMANCE_STR "max_performance\n" +#define MEDIUM_POWER_STR "medium_power\n" +#define MIN_POWER_STR "min_power\n" +/* Remember to fix this if adding longer strings */ +#define MAX_POLICY_STRLEN strlen(MAX_PERFORMANCE_STR) + +/** + * SECTION:igt_pm + * @short_description: Power Management related helpers + * @title: Power Management + * @include: igt.h + * + * This library provides various helpers to enable power management for, + * and in some cases subsequently allow restoring the old behaviour of, + * various external components that by default are set up in a way + * that interferes with the testing of our power management functionality. + */ +/** + * igt_pm_enable_audio_runtime_pm: + * + * We know that if we don't enable audio runtime PM, snd_hda_intel will never + * release its power well refcount, and we'll never reach the LPSP state. + * There's no guarantee that it will release the power well if we enable + * runtime PM, but at least we can try. + * + * We don't have any assertions on open since the user may not even have + * snd_hda_intel loaded, which is not a problem. + */ +void igt_pm_enable_audio_runtime_pm(void) +{ + int fd; + + fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY); + if (fd >= 0) { + igt_assert_eq(write(fd, "1\n", 2), 2); + close(fd); + } + fd = open("/sys/bus/pci/devices/0000:00:03.0/power/control", O_WRONLY); + if (fd >= 0) { + igt_assert_eq(write(fd, "auto\n", 5), 5); + close(fd); + } + /* Give some time for it to react. */ + sleep(1); +} + +/** + * igt_pm_enable_sata_link_power_management: + * + * Enable the min_power policy for SATA link power management. + * Without this we cannot reach deep runtime power states. + * + * We don't have any assertions on open since the system might not have + * a SATA host. + * + * Returns: + * An opaque pointer to the data needed to restore the default values + * after the test has terminated, or NULL if SATA link power management + * is not supported. This pointer should be freed when no longer used + * (typically after having called restore_sata_link_power_management()). + */ +int8_t *igt_pm_enable_sata_link_power_management(void) +{ + int fd, i; + ssize_t len; + char *buf; + char *file_name; + int8_t *link_pm_policies = NULL; + + file_name = malloc(PATH_MAX); + buf = malloc(MAX_POLICY_STRLEN + 1); + + for (i = 0; ; i++) { + int8_t policy; + + snprintf(file_name, PATH_MAX, + "/sys/class/scsi_host/host%d/link_power_management_policy", + i); + + fd = open(file_name, O_RDWR); + if (fd < 0) + break; + + len = read(fd, buf, MAX_POLICY_STRLEN); + buf[len] = '\0'; + + if (!strncmp(MAX_PERFORMANCE_STR, buf, + strlen(MAX_PERFORMANCE_STR))) + policy = POLICY_MAX_PERFORMANCE; + else if (!strncmp(MEDIUM_POWER_STR, buf, + strlen(MEDIUM_POWER_STR))) + policy = POLICY_MEDIUM_POWER; + else if (!strncmp(MIN_POWER_STR, buf, + strlen(MIN_POWER_STR))) + policy = POLICY_MIN_POWER; + else + policy = POLICY_UNKNOWN; + + if (!(i % 256)) + link_pm_policies = realloc(link_pm_policies, + (i / 256 + 1) * 256 + 1); + + link_pm_policies[i] = policy; + link_pm_policies[i + 1] = 0; + + /* If the policy is something we don't know about, + * don't touch it, since we might potentially break things. + * And we obviously don't need to touch anything if the + * setting is already correct... + */ + if (policy != POLICY_UNKNOWN && + policy != POLICY_MIN_POWER) { + lseek(fd, 0, SEEK_SET); + igt_assert_eq(write(fd, MIN_POWER_STR, + strlen(MIN_POWER_STR)), + strlen(MIN_POWER_STR)); + } + close(fd); + } + free(buf); + free(file_name); + + return link_pm_policies; +} + +/** + * igt_pm_restore_sata_link_power_management: + * @pm_data: An opaque pointer with saved link PM policies; + * If NULL is passed we force enable the "max_performance" policy. + * + * Restore the link power management policies to the values + * prior to enabling min_power. + * + * Caveat: If the system supports hotplugging and hotplugging takes + * place during our testing so that the hosts change numbers + * we might restore the settings to the wrong hosts. + */ +void igt_pm_restore_sata_link_power_management(int8_t *pm_data) +{ + int fd, i; + char *file_name; + + /* Disk runtime PM policies. */ + file_name = malloc(PATH_MAX); + for (i = 0; ; i++) { + int8_t policy; + + if (!pm_data) + policy = POLICY_MAX_PERFORMANCE; + else if (pm_data[i] == POLICY_UNKNOWN) + continue; + else + policy = pm_data[i]; + + snprintf(file_name, PATH_MAX, + "/sys/class/scsi_host/host%d/link_power_management_policy", + i); + + fd = open(file_name, O_WRONLY); + if (fd < 0) + break; + + switch (policy) { + default: + case POLICY_MAX_PERFORMANCE: + igt_assert_eq(write(fd, MAX_PERFORMANCE_STR, + strlen(MAX_PERFORMANCE_STR)), + strlen(MAX_PERFORMANCE_STR)); + break; + + case POLICY_MEDIUM_POWER: + igt_assert_eq(write(fd, MEDIUM_POWER_STR, + strlen(MEDIUM_POWER_STR)), + strlen(MEDIUM_POWER_STR)); + break; + + case POLICY_MIN_POWER: + igt_assert_eq(write(fd, MIN_POWER_STR, + strlen(MIN_POWER_STR)), + strlen(MIN_POWER_STR)); + break; + } + + close(fd); + } + free(file_name); +} diff -Nru intel-gpu-tools-1.13/lib/igt_pm.h intel-gpu-tools-1.14/lib/igt_pm.h --- intel-gpu-tools-1.13/lib/igt_pm.h 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_pm.h 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#ifndef IGT_PM_H +#define IGT_PM_H + +void igt_pm_enable_audio_runtime_pm(void); +int8_t *igt_pm_enable_sata_link_power_management(void); +void igt_pm_restore_sata_link_power_management(int8_t *pm_data); + +#endif /* IGT_PM_H */ diff -Nru intel-gpu-tools-1.13/lib/igt_vc4.c intel-gpu-tools-1.14/lib/igt_vc4.c --- intel-gpu-tools-1.13/lib/igt_vc4.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_vc4.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,129 @@ +/* + * Copyright © 2016 Broadcom + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "drmtest.h" +#include "igt_aux.h" +#include "igt_core.h" +#include "igt_vc4.h" +#include "ioctl_wrappers.h" +#include "intel_reg.h" +#include "intel_chipset.h" +#include "vc4_drm.h" +#include "vc4_packet.h" + +#if NEW_CONTEXT_PARAM_NO_ERROR_CAPTURE_API +#define LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4 +#endif + +/** + * SECTION:igt_vc4 + * @short_description: VC4 support library + * @title: VC4 + * @include: igt.h + * + * This library provides various auxiliary helper functions for writing VC4 + * tests. + */ + +/** + * igt_vc4_get_cleared_bo: + * @size: size of the BO in bytes + * @clearval: u32 value that the buffer should be completely cleared with + * + * This helper returns a new BO with the given size, which has just been + * cleared using the render engine. + */ +uint32_t igt_vc4_get_cleared_bo(int fd, size_t size, uint32_t clearval) +{ + /* A single row will be a page. */ + uint32_t width = 1024; + uint32_t height = size / (width * 4); + uint32_t handle = igt_vc4_create_bo(fd, size); + struct drm_vc4_submit_cl submit = { + .color_write = { + .hindex = 0, + .bits = VC4_SET_FIELD(VC4_RENDER_CONFIG_FORMAT_RGBA8888, + VC4_RENDER_CONFIG_FORMAT), + }, + + .color_read = { .hindex = ~0 }, + .zs_read = { .hindex = ~0 }, + .zs_write = { .hindex = ~0 }, + .msaa_color_write = { .hindex = ~0 }, + .msaa_zs_write = { .hindex = ~0 }, + + .bo_handles = (uint64_t)(uintptr_t)&handle, + .bo_handle_count = 1, + .width = width, + .height = height, + .max_x_tile = ALIGN(width, 64) / 64 - 1, + .max_y_tile = ALIGN(height, 64) / 64 - 1, + .clear_color = { clearval, clearval }, + .flags = VC4_SUBMIT_CL_USE_CLEAR_COLOR, + }; + + igt_assert_eq_u32(width * height * 4, size); + + do_ioctl(fd, DRM_IOCTL_VC4_SUBMIT_CL, &submit); + + return handle; +} + +int +igt_vc4_create_bo(int fd, size_t size) +{ + struct drm_vc4_create_bo create = { + .size = size, + }; + + do_ioctl(fd, DRM_IOCTL_VC4_CREATE_BO, &create); + + return create.handle; +} + +void * +igt_vc4_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot) +{ + struct drm_vc4_mmap_bo mmap_bo = { + .handle = handle, + }; + void *ptr; + + do_ioctl(fd, DRM_IOCTL_VC4_MMAP_BO, &mmap_bo); + + ptr = mmap(0, size, prot, MAP_SHARED, fd, mmap_bo.offset); + if (ptr == MAP_FAILED) + return NULL; + else + return ptr; +} diff -Nru intel-gpu-tools-1.13/lib/igt_vc4.h intel-gpu-tools-1.14/lib/igt_vc4.h --- intel-gpu-tools-1.13/lib/igt_vc4.h 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/igt_vc4.h 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * Copyright © 2016 Broadcom + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#ifndef IGT_VC4_H +#define IGT_VC4_H + +uint32_t igt_vc4_get_cleared_bo(int fd, size_t size, uint32_t clearval); +int igt_vc4_create_bo(int fd, size_t size); +void *igt_vc4_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot); + +#endif /* IGT_VC4_H */ diff -Nru intel-gpu-tools-1.13/lib/intel_os.c intel-gpu-tools-1.14/lib/intel_os.c --- intel-gpu-tools-1.13/lib/intel_os.c 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/intel_os.c 2016-03-01 15:59:21.000000000 +0000 @@ -192,6 +192,55 @@ return retval / (1024*1024); } +static uint64_t vfs_file_max(void) +{ + static long long unsigned max; + if (max == 0) { + FILE *file = fopen("/proc/sys/fs/file-max", "r"); + max = 80000; + if (file) { + igt_assert(fscanf(file, "%llu", &max) == 1); + fclose(file); + } + } + return max; +} + +int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode, + uint64_t *out_required, uint64_t *out_total) +{ +/* rough estimate of how many bytes the kernel requires to track each object */ +#define KERNEL_BO_OVERHEAD 512 + uint64_t required, total; + + required = count; + required *= size + KERNEL_BO_OVERHEAD; + required = ALIGN(required, 4096); + + igt_debug("Checking %'llu surfaces of size %'llu bytes (total %'llu) against %s%s\n", + (long long)count, (long long)size, (long long)required, + mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "", + mode & CHECK_SWAP ? " + swap": ""); + + total = 0; + if (mode & (CHECK_RAM | CHECK_SWAP)) + total += intel_get_avail_ram_mb(); + if (mode & CHECK_SWAP) + total += intel_get_total_swap_mb(); + total *= 1024 * 1024; + + if (out_required) + *out_required = required; + + if (out_total) + *out_total = total; + + if (count > vfs_file_max()) + return false; + + return required < total; +} + /** * intel_require_memory: * @count: number of surfaces that will be created @@ -215,33 +264,19 @@ * assumption that any test that needs to check for memory requirements is a * thrashing test unsuitable for slow simulated systems. */ -void intel_require_memory(uint32_t count, uint64_t size, unsigned mode) +void intel_require_memory(uint64_t count, uint64_t size, unsigned mode) { -/* rough estimate of how many bytes the kernel requires to track each object */ -#define KERNEL_BO_OVERHEAD 512 uint64_t required, total; - required = count; - required *= size + KERNEL_BO_OVERHEAD; - required = ALIGN(required, 4096); - - igt_debug("Checking %'u surfaces of size %'llu bytes (total %'llu) against %s%s\n", - count, (long long)size, (long long)required, - mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "", - mode & CHECK_SWAP ? " + swap": ""); - - total = 0; - if (mode & (CHECK_RAM | CHECK_SWAP)) - total += intel_get_avail_ram_mb(); - if (mode & CHECK_SWAP) - total += intel_get_total_swap_mb(); - total *= 1024 * 1024; - - igt_skip_on_f(total <= required, - "Estimated that we need %'llu bytes for the test, but only have %'llu bytes available (%s%s)\n", - (long long)required, (long long)total, + igt_skip_on_f(!__intel_check_memory(count, size, mode, + &required, &total), + "Estimated that we need %'llu objects and %'llu MiB for the test, but only have %'llu MiB available (%s%s) and a maximum of %'llu objects\n", + (long long)count, + (long long)((required + ((1<<20) - 1)) >> 20), + (long long)(total >> 20), mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "", - mode & CHECK_SWAP ? " + swap": ""); + mode & CHECK_SWAP ? " + swap": "", + (long long)vfs_file_max()); igt_skip_on_simulation(); } diff -Nru intel-gpu-tools-1.13/lib/ioctl_wrappers.c intel-gpu-tools-1.14/lib/ioctl_wrappers.c --- intel-gpu-tools-1.13/lib/ioctl_wrappers.c 2015-12-01 14:33:33.000000000 +0000 +++ intel-gpu-tools-1.14/lib/ioctl_wrappers.c 2016-03-01 15:59:21.000000000 +0000 @@ -291,6 +291,8 @@ { struct drm_gem_close close_bo; + igt_assert_neq(handle, 0); + memset(&close_bo, 0, sizeof(close_bo)); close_bo.handle = handle; do_ioctl(fd, DRM_IOCTL_GEM_CLOSE, &close_bo); @@ -368,28 +370,124 @@ } /** - * gem_sync: + * __gem_wait: * @fd: open i915 drm file descriptor * @handle: gem buffer object handle + * @timeout_ns: [in] time to wait, [out] remaining time (in nanoseconds) * - * This functions waits for outstanding rendering to complete. + * This functions waits for outstanding rendering to complete, upto + * the timeout_ns. If no timeout_ns is provided, the wait is indefinite and + * only returns upon an error or when the rendering is complete. */ -void gem_sync(int fd, uint32_t handle) +int gem_wait(int fd, uint32_t handle, int64_t *timeout_ns) { struct drm_i915_gem_wait wait; + int ret; memset(&wait, 0, sizeof(wait)); wait.bo_handle = handle; - wait.timeout_ns =-1; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_WAIT, &wait) == 0) { - errno = 0; - return; + wait.timeout_ns = timeout_ns ? *timeout_ns : -1; + wait.flags = 0; + + ret = 0; + if (drmIoctl(fd, DRM_IOCTL_I915_GEM_WAIT, &wait)) + ret = -errno; + + if (timeout_ns) + *timeout_ns = wait.timeout_ns; + + return ret; +} + +/** + * gem_sync: + * @fd: open i915 drm file descriptor + * @handle: gem buffer object handle + * + * This functions waits for outstanding rendering to complete. + */ +void gem_sync(int fd, uint32_t handle) +{ + if (gem_wait(fd, handle, NULL)) + gem_set_domain(fd, handle, + I915_GEM_DOMAIN_GTT, + I915_GEM_DOMAIN_GTT); + errno = 0; +} + + +bool gem_create__has_stolen_support(int fd) +{ + static int has_stolen_support = -1; + struct drm_i915_getparam gp; + int val = -1; + + if (has_stolen_support < 0) { + memset(&gp, 0, sizeof(gp)); + gp.param = 36; /* CREATE_VERSION */ + gp.value = &val; + + /* Do we have the extended gem_create_ioctl? */ + ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); + has_stolen_support = val >= 2; } - gem_set_domain(fd, handle, - I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); + return has_stolen_support; } +struct local_i915_gem_create_v2 { + uint64_t size; + uint32_t handle; + uint32_t pad; +#define I915_CREATE_PLACEMENT_STOLEN (1<<0) + uint32_t flags; +}; + +#define LOCAL_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct local_i915_gem_create_v2) +uint32_t __gem_create_stolen(int fd, uint64_t size) +{ + struct local_i915_gem_create_v2 create; + int ret; + + memset(&create, 0, sizeof(create)); + create.handle = 0; + create.size = size; + create.flags = I915_CREATE_PLACEMENT_STOLEN; + ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_CREATE, &create); + + if (ret < 0) + return 0; + + errno = 0; + return create.handle; +} + +/** + * gem_create_stolen: + * @fd: open i915 drm file descriptor + * @size: desired size of the buffer + * + * This wraps the new GEM_CREATE ioctl, which allocates a new gem buffer + * object of @size and placement in stolen memory region. + * + * Returns: The file-private handle of the created buffer object + */ + +uint32_t gem_create_stolen(int fd, uint64_t size) +{ + struct local_i915_gem_create_v2 create; + + memset(&create, 0, sizeof(create)); + create.handle = 0; + create.size = size; + create.flags = I915_CREATE_PLACEMENT_STOLEN; + do_ioctl(fd, LOCAL_IOCTL_I915_GEM_CREATE, &create); + igt_assert(create.handle); + + return create.handle; +} + + uint32_t __gem_create(int fd, int size) { struct drm_i915_gem_create create; @@ -431,6 +529,22 @@ } /** + * __gem_execbuf: + * @fd: open i915 drm file descriptor + * @execbuf: execbuffer data structure + * + * This wraps the EXECBUFFER2 ioctl, which submits a batchbuffer for the gpu to + * run. This is allowed to fail, with -errno returned. + */ +int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) +{ + int err = 0; + if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) + err = -errno; + return err; +} + +/** * gem_execbuf: * @fd: open i915 drm file descriptor * @execbuf: execbuffer data structure @@ -440,10 +554,7 @@ */ void gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) { - int result; - - result = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf); - igt_assert(result == 0); + igt_assert_eq(__gem_execbuf(fd, execbuf), 0); errno = 0; } @@ -684,12 +795,14 @@ uint32_t gem_context_create(int fd) { struct drm_i915_gem_context_create create; - int ret; memset(&create, 0, sizeof(create)); - ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &create); - igt_require(ret == 0 || (errno != ENODEV && errno != EINVAL)); - igt_assert(ret == 0); + if (drmIoctl(fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &create)) { + int err = -errno; + igt_skip_on(err == -ENODEV || errno == -EINVAL); + igt_assert_eq(err, 0); + } + igt_assert(create.ctx_id != 0); errno = 0; return create.ctx_id; @@ -744,6 +857,16 @@ do_ioctl(fd, LOCAL_IOCTL_I915_GEM_CONTEXT_GETPARAM, p); } +int __gem_context_set_param(int fd, struct local_i915_gem_context_param *p) +{ +#define LOCAL_I915_GEM_CONTEXT_SETPARAM 0x35 +#define LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR (DRM_COMMAND_BASE + LOCAL_I915_GEM_CONTEXT_SETPARAM, struct local_i915_gem_context_param) + if (drmIoctl(fd, LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM, p)) + return -errno; + + errno = 0; + return 0; +} /** * gem_context_set_param: * @fd: open i915 drm file descriptor @@ -756,9 +879,7 @@ */ void gem_context_set_param(int fd, struct local_i915_gem_context_param *p) { -#define LOCAL_I915_GEM_CONTEXT_SETPARAM 0x35 -#define LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR (DRM_COMMAND_BASE + LOCAL_I915_GEM_CONTEXT_SETPARAM, struct local_i915_gem_context_param) - do_ioctl(fd, LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM, p); + igt_assert(__gem_context_set_param(fd, p) == 0); } /** @@ -799,6 +920,47 @@ igt_require(has_ban_period); } +int __gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t flags, uint32_t *handle) +{ + struct local_i915_gem_userptr userptr; + int ret; + + memset(&userptr, 0, sizeof(userptr)); + userptr.user_ptr = (uintptr_t)ptr; + userptr.user_size = size; + userptr.flags = flags; + if (read_only) + userptr.flags |= LOCAL_I915_USERPTR_READ_ONLY; + + ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr); + if (ret) + ret = errno; + igt_skip_on_f(ret == ENODEV && + (flags & LOCAL_I915_USERPTR_UNSYNCHRONIZED) == 0 && + !read_only, + "Skipping, synchronized mappings with no kernel CONFIG_MMU_NOTIFIER?"); + if (ret == 0) + *handle = userptr.handle; + + return ret; +} + +/** + * gem_userptr: + * @fd: open i915 drm file descriptor + * @ptr: userptr pointer to be passed + * @size: desired size of the buffer + * @read_only: specify whether userptr is opened read only + * @flags: other userptr flags + * @handle: returned handle for the object + * + * Returns userptr handle for the GEM object. + */ +void gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t flags, uint32_t *handle) +{ + igt_assert_eq(__gem_userptr(fd, ptr, size, read_only, flags, handle), 0); +} + /** * gem_sw_finish: * @fd: open i915 drm file descriptor @@ -844,18 +1006,18 @@ /* feature test helpers */ /** - * gem_uses_aliasing_ppgtt: + * gem_gtt_type: * @fd: open i915 drm file descriptor * - * Feature test macro to check whether the kernel internally uses ppgtt to - * execute batches. The /aliasing/ in the function name is a bit a misnomer, - * this driver parameter is also true when full ppgtt address spaces are - * available since for batchbuffer construction only ppgtt or global gtt is - * relevant. + * Feature test macro to check what type of gtt is being used by the kernel: + * 0 - global gtt + * 1 - aliasing ppgtt + * 2 - full ppgtt, limited to 32bit address space + * 3 - full ppgtt, 64bit address space * - * Returns: Whether batches are run through ppgtt. + * Returns: Type of gtt being used. */ -bool gem_uses_aliasing_ppgtt(int fd) +int gem_gtt_type(int fd) { struct drm_i915_getparam gp; int val = 0; @@ -872,6 +1034,35 @@ } /** + * gem_uses_ppgtt: + * @fd: open i915 drm file descriptor + * + * Feature test macro to check whether the kernel internally uses ppgtt to + * execute batches. Note that this is also true when we're using full ppgtt. + * + * Returns: Whether batches are run through ppgtt. + */ +bool gem_uses_ppgtt(int fd) +{ + return gem_gtt_type(fd) > 0; +} + +/** + * gem_uses_full_ppgtt: + * @fd: open i915 drm file descriptor + * + * Feature test macro to check whether the kernel internally uses full + * per-process gtt to execute batches. Note that this is also true when we're + * using full 64b ppgtt. + * + * Returns: Whether batches are run through full ppgtt. + */ +bool gem_uses_full_ppgtt(int fd) +{ + return gem_gtt_type(fd) > 1; +} + +/** * gem_available_fences: * @fd: open i915 drm file descriptor * @@ -1134,6 +1325,54 @@ } /** + * gem_global_aperture_size: + * + * Feature test macro to query the kernel for the global gpu aperture size. + * This is the area available for the kernel to perform address translations. + * + * Returns: The mappable gtt address space size. + */ +uint64_t gem_global_aperture_size(int fd) +{ + struct drm_i915_gem_get_aperture aperture; + + memset(&aperture, 0, sizeof(aperture)); + aperture.aper_size = 256*1024*1024; + do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture); + + return aperture.aper_size; +} + +#define LOCAL_I915_PARAM_HAS_EXEC_SOFTPIN 37 +/** + * gem_has_softpin: + * @fd: open i915 drm file descriptor + * + * Feature test macro to query whether the softpinning functionality is + * supported. + * + * Returns: Whether softpin support is available + */ +bool gem_has_softpin(int fd) +{ + static int has_softpin = -1; + + if (has_softpin < 0) { + struct drm_i915_getparam gp; + + memset(&gp, 0, sizeof(gp)); + gp.param = LOCAL_I915_PARAM_HAS_EXEC_SOFTPIN; + gp.value = &has_softpin; + + has_softpin = 0; + ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp, sizeof(gp)); + errno = 0; + } + + return has_softpin; +} + +/** * gem_require_caching: * @fd: open i915 drm file descriptor * @@ -1157,6 +1396,27 @@ errno = 0; } +static int gem_has_ring(int fd, int ring) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 exec; + int ret; + + memset(&exec, 0, sizeof(exec)); + exec.handle = gem_create(fd, 4096); + gem_write(fd, exec.handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&exec; + execbuf.buffer_count = 1; + execbuf.flags = ring; + ret = __gem_execbuf(fd, &execbuf); + gem_close(fd, exec.handle); + + return ret == 0; +} + /** * gem_require_ring: * @fd: open i915 drm file descriptor @@ -1168,23 +1428,12 @@ */ void gem_require_ring(int fd, int ring_id) { - switch (ring_id) { - case I915_EXEC_RENDER: - return; - case I915_EXEC_BLT: - igt_require(gem_has_blt(fd)); - return; - case I915_EXEC_BSD: - igt_require(gem_has_bsd(fd)); - return; -#ifdef I915_EXEC_VEBOX - case I915_EXEC_VEBOX: - igt_require(gem_has_vebox(fd)); - return; -#endif - default: - igt_assert(0); - return; + igt_require(gem_has_ring(fd, ring_id)); + + /* silly ABI, the kernel thinks everyone who has BSD also has BSD2 */ + if ((ring_id & ~(3<<13)) == I915_EXEC_BSD) { + if (ring_id & (3 << 13)) + igt_require(gem_has_bsd2(fd)); } } @@ -1216,6 +1465,31 @@ } /** + * prime_handle_to_fd_for_mmap: + * @fd: open i915 drm file descriptor + * @handle: file-private gem buffer object handle + * + * Same as prime_handle_to_fd above but with DRM_RDWR capabilities, which can + * be useful for writing into the mmap'ed dma-buf file-descriptor. + * + * Returns: The created dma-buf fd handle or -1 if the ioctl fails. + */ +int prime_handle_to_fd_for_mmap(int fd, uint32_t handle) +{ + struct drm_prime_handle args; + + memset(&args, 0, sizeof(args)); + args.handle = handle; + args.flags = DRM_CLOEXEC | DRM_RDWR; + args.fd = -1; + + if (drmIoctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args) != 0) + return -1; + + return args.fd; +} + +/** * prime_fd_to_handle: * @fd: open i915 drm file descriptor * @dma_buf_fd: dma-buf fd handle @@ -1262,6 +1536,38 @@ } /** + * prime_sync_start + * @dma_buf_fd: dma-buf fd handle + */ +void prime_sync_start(int dma_buf_fd, bool write) +{ + struct local_dma_buf_sync sync_start; + + memset(&sync_start, 0, sizeof(sync_start)); + sync_start.flags = LOCAL_DMA_BUF_SYNC_START; + sync_start.flags |= LOCAL_DMA_BUF_SYNC_READ; + if (write) + sync_start.flags |= LOCAL_DMA_BUF_SYNC_WRITE; + do_ioctl(dma_buf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_start); +} + +/** + * prime_sync_end + * @dma_buf_fd: dma-buf fd handle + */ +void prime_sync_end(int dma_buf_fd, bool write) +{ + struct local_dma_buf_sync sync_end; + + memset(&sync_end, 0, sizeof(sync_end)); + sync_end.flags = LOCAL_DMA_BUF_SYNC_END; + sync_end.flags |= LOCAL_DMA_BUF_SYNC_READ; + if (write) + sync_end.flags |= LOCAL_DMA_BUF_SYNC_WRITE; + do_ioctl(dma_buf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_end); +} + +/** * igt_require_fb_modifiers: * @fd: Open DRM file descriptor. * diff -Nru intel-gpu-tools-1.13/lib/ioctl_wrappers.h intel-gpu-tools-1.14/lib/ioctl_wrappers.h --- intel-gpu-tools-1.13/lib/ioctl_wrappers.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/lib/ioctl_wrappers.h 2016-03-01 15:59:21.000000000 +0000 @@ -55,10 +55,15 @@ void gem_read(int fd, uint32_t handle, uint64_t offset, void *buf, uint64_t length); void gem_set_domain(int fd, uint32_t handle, uint32_t read_domains, uint32_t write_domain); +int gem_wait(int fd, uint32_t handle, int64_t *timeout_ns); void gem_sync(int fd, uint32_t handle); +bool gem_create__has_stolen_support(int fd); +uint32_t __gem_create_stolen(int fd, uint64_t size); +uint32_t gem_create_stolen(int fd, uint64_t size); uint32_t __gem_create(int fd, int size); uint32_t gem_create(int fd, uint64_t size); void gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf); +int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf); void *gem_mmap__gtt(int fd, uint32_t handle, uint64_t size, unsigned prot); void *gem_mmap__cpu(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot); @@ -71,6 +76,16 @@ void *__gem_mmap__wc(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot); /** + * gem_require_stolen_support: + * @fd: open i915 drm file descriptor + * + * Test macro to query whether support for allocating objects from stolen + * memory is available. Automatically skips through igt_require() if not. + */ +#define gem_require_stolen_support(fd) \ + igt_require(gem_create__has_stolen_support(fd)) + +/** * gem_require_mmap_wc: * @fd: open i915 drm file descriptor * @@ -98,6 +113,20 @@ void gem_context_require_param(int fd, uint64_t param); void gem_context_get_param(int fd, struct local_i915_gem_context_param *p); void gem_context_set_param(int fd, struct local_i915_gem_context_param *p); +int __gem_context_set_param(int fd, struct local_i915_gem_context_param *p); + +#define LOCAL_I915_GEM_USERPTR 0x33 +#define LOCAL_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + LOCAL_I915_GEM_USERPTR, struct local_i915_gem_userptr) +struct local_i915_gem_userptr { + uint64_t user_ptr; + uint64_t user_size; + uint32_t flags; +#define LOCAL_I915_USERPTR_READ_ONLY (1<<0) +#define LOCAL_I915_USERPTR_UNSYNCHRONIZED (1<<31) + uint32_t handle; +}; +void gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t flags, uint32_t *handle); +int __gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t flags, uint32_t *handle); void gem_sw_finish(int fd, uint32_t handle); @@ -111,20 +140,45 @@ bool gem_has_blt(int fd); bool gem_has_vebox(int fd); bool gem_has_bsd2(int fd); -bool gem_uses_aliasing_ppgtt(int fd); +int gem_gtt_type(int fd); +bool gem_uses_ppgtt(int fd); +bool gem_uses_full_ppgtt(int fd); int gem_available_fences(int fd); uint64_t gem_available_aperture_size(int fd); uint64_t gem_aperture_size(int fd); +uint64_t gem_global_aperture_size(int fd); uint64_t gem_mappable_aperture_size(void); +bool gem_has_softpin(int fd); /* check functions which auto-skip tests by calling igt_skip() */ void gem_require_caching(int fd); void gem_require_ring(int fd, int ring_id); /* prime */ +struct local_dma_buf_sync { + uint64_t flags; +}; + +#define LOCAL_DMA_BUF_SYNC_READ (1 << 0) +#define LOCAL_DMA_BUF_SYNC_WRITE (2 << 0) +#define LOCAL_DMA_BUF_SYNC_RW (LOCAL_DMA_BUF_SYNC_READ | LOCAL_DMA_BUF_SYNC_WRITE) +#define LOCAL_DMA_BUF_SYNC_START (0 << 2) +#define LOCAL_DMA_BUF_SYNC_END (1 << 2) +#define LOCAL_DMA_BUF_SYNC_VALID_FLAGS_MASK \ + (LOCAL_DMA_BUF_SYNC_RW | LOCAL_DMA_BUF_SYNC_END) + +#define LOCAL_DMA_BUF_BASE 'b' +#define LOCAL_DMA_BUF_IOCTL_SYNC _IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync) + int prime_handle_to_fd(int fd, uint32_t handle); +#ifndef DRM_RDWR +#define DRM_RDWR O_RDWR +#endif +int prime_handle_to_fd_for_mmap(int fd, uint32_t handle); uint32_t prime_fd_to_handle(int fd, int dma_buf_fd); off_t prime_get_size(int dma_buf_fd); +void prime_sync_start(int dma_buf_fd, bool write); +void prime_sync_end(int dma_buf_fd, bool write); /* addfb2 fb modifiers */ struct local_drm_mode_fb_cmd2 { diff -Nru intel-gpu-tools-1.13/lib/Makefile.am intel-gpu-tools-1.14/lib/Makefile.am --- intel-gpu-tools-1.13/lib/Makefile.am 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/lib/Makefile.am 2016-03-01 15:59:21.000000000 +0000 @@ -8,6 +8,12 @@ noinst_LTLIBRARIES = libintel_tools.la noinst_HEADERS = check-ndebug.h +if HAVE_VC4 + libintel_tools_la_SOURCES += \ + igt_vc4.c \ + igt_vc4.h +endif + AM_CPPFLAGS = -I$(top_srcdir) AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(LIBUNWIND_CFLAGS) $(DEBUG_CFLAGS) \ -DIGT_SRCDIR=\""$(abs_top_srcdir)/tests"\" \ diff -Nru intel-gpu-tools-1.13/lib/Makefile.in intel-gpu-tools-1.14/lib/Makefile.in --- intel-gpu-tools-1.13/lib/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/lib/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -89,13 +89,17 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +@HAVE_VC4_TRUE@am__append_1 = \ +@HAVE_VC4_TRUE@ igt_vc4.c \ +@HAVE_VC4_TRUE@ igt_vc4.h + subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ @@ -106,6 +110,25 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libintel_tools_la_LIBADD = +am__libintel_tools_la_SOURCES_DIST = debug.h drmtest.c drmtest.h \ + i830_reg.h i915_3d.h i915_reg.h i915_pciids.h igt.h \ + igt_debugfs.c igt_debugfs.h igt_aux.c igt_aux.h \ + igt_edid_template.h igt_gt.c igt_gt.h igt_stats.c igt_stats.h \ + instdone.c instdone.h intel_batchbuffer.c intel_batchbuffer.h \ + intel_chipset.h intel_os.c intel_io.h intel_mmio.c \ + intel_chipset.c intel_reg.h ioctl_wrappers.c ioctl_wrappers.h \ + media_fill.h media_fill_gen7.c media_fill_gen8.c \ + media_fill_gen8lp.c media_fill_gen9.c media_spin.h \ + media_spin.c gpgpu_fill.h gpgpu_fill.c gen7_media.h \ + gen8_media.h rendercopy_i915.c rendercopy_i830.c gen6_render.h \ + gen7_render.h gen8_render.h gen9_render.h rendercopy_gen6.c \ + rendercopy_gen7.c rendercopy_gen8.c rendercopy_gen9.c \ + rendercopy.h intel_reg_map.c intel_iosf.c igt_kms.c igt_kms.h \ + igt_fb.c igt_fb.h igt_core.c igt_core.h igt_draw.c igt_draw.h \ + igt_pm.c igt_pm.h uwildmat/uwildmat.h uwildmat/uwildmat.c \ + igt_vc4.c igt_vc4.h +am__dirstamp = $(am__leading_dot)dirstamp +@HAVE_VC4_TRUE@am__objects_1 = igt_vc4.lo am_libintel_tools_la_OBJECTS = drmtest.lo igt_debugfs.lo igt_aux.lo \ igt_gt.lo igt_stats.lo instdone.lo intel_batchbuffer.lo \ intel_os.lo intel_mmio.lo intel_chipset.lo ioctl_wrappers.lo \ @@ -114,7 +137,8 @@ rendercopy_i915.lo rendercopy_i830.lo rendercopy_gen6.lo \ rendercopy_gen7.lo rendercopy_gen8.lo rendercopy_gen9.lo \ intel_reg_map.lo intel_iosf.lo igt_kms.lo igt_fb.lo \ - igt_core.lo igt_draw.lo + igt_core.lo igt_draw.lo igt_pm.lo uwildmat/uwildmat.lo \ + $(am__objects_1) libintel_tools_la_OBJECTS = $(am_libintel_tools_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -155,7 +179,7 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libintel_tools_la_SOURCES) -DIST_SOURCES = $(libintel_tools_la_SOURCES) +DIST_SOURCES = $(am__libintel_tools_la_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ @@ -260,6 +284,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -304,6 +330,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -402,80 +429,39 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ IGT_LIB_PATH := $(builddir) GPU_TOOLS_PATH := $(top_srcdir) SUBDIRS = . tests -libintel_tools_la_SOURCES = \ - debug.h \ - drmtest.c \ - drmtest.h \ - i830_reg.h \ - i915_3d.h \ - i915_reg.h \ - i915_pciids.h \ - igt.h \ - igt_debugfs.c \ - igt_debugfs.h \ - igt_aux.c \ - igt_aux.h \ - igt_gt.c \ - igt_gt.h \ - igt_stats.c \ - igt_stats.h \ - instdone.c \ - instdone.h \ - intel_batchbuffer.c \ - intel_batchbuffer.h \ - intel_chipset.h \ - intel_os.c \ - intel_io.h \ - intel_mmio.c \ - intel_chipset.c \ - intel_reg.h \ - ioctl_wrappers.c \ - ioctl_wrappers.h \ - media_fill.h \ - media_fill_gen7.c \ - media_fill_gen8.c \ - media_fill_gen8lp.c \ - media_fill_gen9.c \ - media_spin.h \ - media_spin.c \ - gpgpu_fill.h \ - gpgpu_fill.c \ - gen7_media.h \ - gen8_media.h \ - rendercopy_i915.c \ - rendercopy_i830.c \ - gen6_render.h \ - gen7_render.h \ - gen8_render.h \ - gen9_render.h \ - rendercopy_gen6.c \ - rendercopy_gen7.c \ - rendercopy_gen8.c \ - rendercopy_gen9.c \ - rendercopy.h \ - intel_reg_map.c \ - intel_iosf.c \ - igt_kms.c \ - igt_kms.h \ - igt_fb.c \ - igt_fb.h \ - igt_core.c \ - igt_core.h \ - igt_draw.c \ - igt_draw.h \ - $(NULL) - +libintel_tools_la_SOURCES = debug.h drmtest.c drmtest.h i830_reg.h \ + i915_3d.h i915_reg.h i915_pciids.h igt.h igt_debugfs.c \ + igt_debugfs.h igt_aux.c igt_aux.h igt_edid_template.h igt_gt.c \ + igt_gt.h igt_stats.c igt_stats.h instdone.c instdone.h \ + intel_batchbuffer.c intel_batchbuffer.h intel_chipset.h \ + intel_os.c intel_io.h intel_mmio.c intel_chipset.c intel_reg.h \ + ioctl_wrappers.c ioctl_wrappers.h media_fill.h \ + media_fill_gen7.c media_fill_gen8.c media_fill_gen8lp.c \ + media_fill_gen9.c media_spin.h media_spin.c gpgpu_fill.h \ + gpgpu_fill.c gen7_media.h gen8_media.h rendercopy_i915.c \ + rendercopy_i830.c gen6_render.h gen7_render.h gen8_render.h \ + gen9_render.h rendercopy_gen6.c rendercopy_gen7.c \ + rendercopy_gen8.c rendercopy_gen9.c rendercopy.h \ + intel_reg_map.c intel_iosf.c igt_kms.c igt_kms.h igt_fb.c \ + igt_fb.h igt_core.c igt_core.h igt_draw.c igt_draw.h igt_pm.c \ + igt_pm.h uwildmat/uwildmat.h uwildmat/uwildmat.c $(NULL) \ + $(am__append_1) BUILT_SOURCES = $(IGT_LIB_PATH)/version.h CLEANFILES = $(IGT_LIB_PATH)/version.h $(IGT_LIB_PATH)/version.h.tmp noinst_LTLIBRARIES = libintel_tools.la @@ -532,12 +518,22 @@ echo rm -f $${locs}; \ rm -f $${locs}; \ } +uwildmat/$(am__dirstamp): + @$(MKDIR_P) uwildmat + @: > uwildmat/$(am__dirstamp) +uwildmat/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) uwildmat/$(DEPDIR) + @: > uwildmat/$(DEPDIR)/$(am__dirstamp) +uwildmat/uwildmat.lo: uwildmat/$(am__dirstamp) \ + uwildmat/$(DEPDIR)/$(am__dirstamp) libintel_tools.la: $(libintel_tools_la_OBJECTS) $(libintel_tools_la_DEPENDENCIES) $(EXTRA_libintel_tools_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libintel_tools_la_OBJECTS) $(libintel_tools_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f uwildmat/*.$(OBJEXT) + -rm -f uwildmat/*.lo distclean-compile: -rm -f *.tab.c @@ -551,7 +547,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igt_fb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igt_gt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igt_kms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igt_pm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igt_stats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igt_vc4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/instdone.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_batchbuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_chipset.Plo@am__quote@ @@ -571,6 +569,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rendercopy_gen9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rendercopy_i830.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rendercopy_i915.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@uwildmat/$(DEPDIR)/uwildmat.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -601,6 +600,7 @@ clean-libtool: -rm -rf .libs _libs + -rm -rf uwildmat/.libs uwildmat/_libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -790,6 +790,8 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f uwildmat/$(DEPDIR)/$(am__dirstamp) + -rm -f uwildmat/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -801,7 +803,7 @@ mostlyclean-am distclean: distclean-recursive - -rm -rf ./$(DEPDIR) + -rm -rf ./$(DEPDIR) uwildmat/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -847,7 +849,7 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) + -rm -rf ./$(DEPDIR) uwildmat/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff -Nru intel-gpu-tools-1.13/lib/Makefile.sources intel-gpu-tools-1.14/lib/Makefile.sources --- intel-gpu-tools-1.13/lib/Makefile.sources 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/lib/Makefile.sources 2016-03-01 15:59:21.000000000 +0000 @@ -11,6 +11,7 @@ igt_debugfs.h \ igt_aux.c \ igt_aux.h \ + igt_edid_template.h \ igt_gt.c \ igt_gt.h \ igt_stats.c \ @@ -59,6 +60,10 @@ igt_core.h \ igt_draw.c \ igt_draw.h \ + igt_pm.c \ + igt_pm.h \ + uwildmat/uwildmat.h \ + uwildmat/uwildmat.c \ $(NULL) .PHONY: version.h.tmp diff -Nru intel-gpu-tools-1.13/lib/media_fill.c intel-gpu-tools-1.14/lib/media_fill.c --- intel-gpu-tools-1.13/lib/media_fill.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/media_fill.c 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,16 @@ +#include "i830_reg.h" +#include "media_fill.h" + +media_fillfunc_t get_media_fillfunc(int devid) +{ + media_fillfunc_t fill = NULL; + + if (IS_GEN8(devid)) + fill = gen8_media_fillfunc; + else if (IS_GEN7(devid)) + fill = gen7_media_fillfunc; + else if (IS_GEN9(devid)) + fill = gen9_media_fillfunc; + + return fill; +} diff -Nru intel-gpu-tools-1.13/lib/tests/Android.mk intel-gpu-tools-1.14/lib/tests/Android.mk --- intel-gpu-tools-1.13/lib/tests/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/tests/Android.mk 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,41 @@ +LOCAL_PATH := $(call my-dir) + +include $(LOCAL_PATH)/Makefile.sources + +#================# +# each igt test is a separate executable. define a function to build one of these tests +define add_test + include $(CLEAR_VARS) + + # specific to this test + LOCAL_SRC_FILES := $1.c + LOCAL_MODULE := $1 + + # common to all tests + LOCAL_CFLAGS += ${IGT_LOCAL_CFLAGS} + LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES} + LOCAL_STATIC_LIBRARIES := ${IGT_LOCAL_STATIC_LIBRARIES} + LOCAL_SHARED_LIBRARIES := ${IGT_LOCAL_SHARED_LIBRARIES} + + LOCAL_MODULE_TAGS := optional + LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt + + include $(BUILD_EXECUTABLE) +endef + +# set local compilation flags for IGT tests +IGT_LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM -DANDROID -UNDEBUG +IGT_LOCAL_CFLAGS += -std=gnu99 +# FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit +IGT_LOCAL_CFLAGS += -Wno-error=return-type + +# set local includes +IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib +IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm + +# set local libraries +IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools +IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel + +$(foreach item,$(check_PROGRAMS),$(eval $(call add_test,$(item)))) + diff -Nru intel-gpu-tools-1.13/lib/tests/Makefile.in intel-gpu-tools-1.14/lib/tests/Makefile.in --- intel-gpu-tools-1.13/lib/tests/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/lib/tests/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -87,6 +87,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ check_PROGRAMS = igt_no_exit$(EXEEXT) igt_no_exit_list_only$(EXEEXT) \ igt_fork_helper$(EXEEXT) igt_list_only$(EXEEXT) \ igt_no_subtest$(EXEEXT) igt_simulation$(EXEEXT) \ @@ -100,10 +101,9 @@ subdir = lib/tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -510,6 +510,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -554,6 +556,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -652,11 +655,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/lib/uwildmat/uwildmat.c intel-gpu-tools-1.14/lib/uwildmat/uwildmat.c --- intel-gpu-tools-1.13/lib/uwildmat/uwildmat.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/uwildmat/uwildmat.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,475 @@ +/* uwildmat.c is reused from libinn - https://launchpad.net/ubuntu/+source/inn2/2.5.4-1 + + This provides wild card matching originally used in InterNetNews and is + described in https://tools.ietf.org/html/rfc3977#section-4 + + INN licence: + INN as a whole and all code contained in it not otherwise marked with + different licenses and/or copyrights is covered by the following copyright + and license: + + Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, + 2013, 2014 by Internet Systems Consortium, Inc. ("ISC") + Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, + 2002, 2003 by The Internet Software Consortium and Rich Salz + + This code is derived from software contributed to the Internet Software + Consortium by Rich Salz. + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*/ + +/* $Id: uwildmat.c 8918 2010-01-22 23:28:28Z iulius $ + ** + ** wildmat pattern matching with Unicode UTF-8 extensions. + ** + ** Do shell-style pattern matching for ?, \, [], and * characters. Might not + ** be robust in face of malformed patterns; e.g., "foo[a-" could cause a + ** segmentation violation. It is 8-bit clean. (Robustness hopefully fixed + ** July 2000; all malformed patterns should now just fail to match anything.) + ** + ** Original by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. + ** Rich $alz is now . + ** + ** April, 1991: Replaced mutually-recursive calls with in-line code for the + ** star character. + ** + ** Special thanks to Lars Mathiesen for the ABORT code. + ** This can greatly speed up failing wildcard patterns. For example: + ** + ** pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-* + ** text 1: -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 + ** text 2: -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1 + ** + ** Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without + ** the ABORT code, it takes 22310 calls to fail. Ugh. The following + ** explanation is from Lars: + ** + ** The precondition that must be fulfilled is that DoMatch will consume at + ** least one character in text. This is true if *p is neither '*' nor '\0'.) + ** The last return has ABORT instead of false to avoid quadratic behaviour in + ** cases like pattern "*a*b*c*d" with text "abcxxxxx". With false, each + ** star-loop has to run to the end of the text; with ABORT only the last one + ** does. + ** + ** Once the control of one instance of DoMatch enters the star-loop, that + ** instance will return either true or ABORT, and any calling instance will + ** therefore return immediately after (without calling recursively again). + ** In effect, only one star-loop is ever active. It would be possible to + ** modify the code to maintain this context explicitly, eliminating all + ** recursive calls at the cost of some complication and loss of clarity (and + ** the ABORT stuff seems to be unclear enough by itself). I think it would + ** be unwise to try to get this into a released version unless you have a + ** good test data base to try it out on. + ** + ** June, 1991: Robert Elz added minus and close bracket + ** handling for character sets. + ** + ** July, 2000: Largely rewritten by Russ Allbery to add + ** support for ',', '!', and optionally '@' to the core wildmat routine. + ** Broke the character class matching into a separate function for clarity + ** since it's infrequently used in practice, and added some simple lookahead + ** to significantly decrease the recursive calls in the '*' matching code. + ** Added support for UTF-8 as the default character set for any high-bit + ** characters. + ** + ** For more information on UTF-8, see RFC 3629. + ** + ** Please note that this file is intentionally written so that conditionally + ** executed expressions are on separate lines from the condition to + ** facilitate analysis of the coverage of the test suite using purecov. + ** Please preserve this. As of March 11, 2001, purecov reports that the + ** accompanying test suite achieves 100% coverage of this file. + */ + +#include +#include +#include "uwildmat.h" + +#define ABORT -1 + +/* Whether or not an octet looks like the start of a UTF-8 character. */ +#define ISUTF8(c) (((c) & 0xc0) == 0xc0) + + +/* + ** Determine the length of a non-ASCII character in octets (for advancing + ** pointers when skipping over characters). Takes a pointer to the start of + ** the character and to the last octet of the string. If end is NULL, expect + ** the string pointed to by start to be nul-terminated. If the character is + ** malformed UTF-8, return 1 to treat it like an eight-bit local character. + */ +static int +utf8_length(const unsigned char *start, const unsigned char *end) +{ + unsigned char mask = 0x80; + const unsigned char *p; + int length = 0; + int left; + + for (; mask > 0 && (*start & mask) == mask; mask >>= 1) + length++; + if (length < 2 || length > 6) + return 1; + if (end != NULL && (end - start + 1) < length) + return 1; + left = length - 1; + for (p = start + 1; left > 0 && (*p & 0xc0) == 0x80; p++) + left--; + return (left == 0) ? length : 1; +} + + +/* + ** Check whether a string contains only valid UTF-8 characters. + */ +bool +is_valid_utf8(const char *text) +{ + unsigned char mask; + const unsigned char *p; + int length; + int left; + + for (p = (const unsigned char *)text; *p != '\0';) { + mask = 0x80; + length = 0; + + /* Find out the expected length of the character. */ + for (; mask > 0 && (*p & mask) == mask; mask >>= 1) + length++; + + p++; + + /* Valid ASCII. */ + if (length == 0) + continue; + + /* Invalid length. */ + if (length < 2 || length > 6) + return false; + + /* Check that each byte looks like 10xxxxxx, except for the first. */ + left = length - 1; + for (; left > 0 && (*p & 0xc0) == 0x80; p++) + left--; + + if (left > 0) + return false; + } + + return true; +} + + +/* + ** Convert a UTF-8 character to UCS-4. Takes a pointer to the start of the + ** character and to the last octet of the string, and to a uint32_t into + ** which to put the decoded UCS-4 value. If end is NULL, expect the string + ** pointed to by start to be nul-terminated. Returns the number of octets in + ** the UTF-8 encoding. If the UTF-8 character is malformed, set result to + ** the decimal value of the first octet; this is wrong, but it will generally + ** cause the rest of the wildmat matching to do the right thing for non-UTF-8 + ** input. + */ +static int +utf8_decode(const unsigned char *start, const unsigned char *end, + uint32_t *result) +{ + uint32_t value = 0; + int length, i; + const unsigned char *p = start; + unsigned char mask; + + length = utf8_length(start, end); + if (length < 2) { + *result = *start; + return 1; + } + mask = (1 << (7 - length)) - 1; + value = *p & mask; + p++; + for (i = length - 1; i > 0; i--) { + value = (value << 6) | (*p & 0x3f); + p++; + } + *result = value; + return length; +} + + +/* + ** Match a character class against text, a UCS-4 character. start is a + ** pointer to the first character of the character class, end a pointer to + ** the last. Returns whether the class matches that character. + */ +static bool +match_class(uint32_t text, const unsigned char *start, + const unsigned char *end) +{ + bool reversed, allowrange; + const unsigned char *p = start; + uint32_t first = 0; + uint32_t last; + + /* Check for an inverted character class (starting with ^). If the + character matches the character class, we return !reversed; that way, + we return true if it's a regular character class and false if it's a + reversed one. If the character doesn't match, we return reversed. */ + reversed = (*p == '^'); + if (reversed) + p++; + + /* Walk through the character class until we reach the end or find a + match, handling character ranges as we go. Only permit a range to + start when allowrange is true; this allows - to be treated like a + normal character as the first character of the class and catches + malformed ranges like a-e-n. We treat the character at the beginning + of a range as both a regular member of the class and the beginning of + the range; this is harmless (although it means that malformed ranges + like m-a will match m and nothing else). */ + allowrange = false; + while (p <= end) { + if (allowrange && *p == '-' && p < end) { + p++; + p += utf8_decode(p, end, &last); + if (text >= first && text <= last) + return !reversed; + allowrange = false; + } else { + p += utf8_decode(p, end, &first); + if (text == first) + return !reversed; + allowrange = true; + } + } + return reversed; +} + + +/* + ** Match the text against the pattern between start and end. This is a + ** single pattern; a leading ! or @ must already be taken care of, and + ** commas must be dealt with outside of this routine. + */ +static int +match_pattern(const unsigned char *text, const unsigned char *start, + const unsigned char *end) +{ + const unsigned char *q, *endclass; + const unsigned char *p = start; + bool ismeta; + int matched, width; + uint32_t c; + + for (; p <= end; p++) { + if (!*text && *p != '*') + return ABORT; + + switch (*p) { + case '\\': + if (!*++p) + return ABORT; + /* Fall through. */ + + default: + if (*text++ != *p) + return false; + break; + + case '?': + text += ISUTF8(*text) ? utf8_length(text, NULL) : 1; + break; + + case '*': + /* Consecutive stars are equivalent to one. Advance pattern to + the character after the star. */ + for (++p; *p == '*'; p++) + ; + + /* A trailing star will match anything. */ + if (p > end) + return true; + + /* Basic algorithm: Recurse at each point where the * could + possibly match. If the match succeeds or aborts, return + immediately; otherwise, try the next position. + +Optimization: If the character after the * in the pattern +isn't a metacharacter (the common case), then the * has to +consume characters at least up to the next occurrence of that +character in the text. Scan forward for those points rather +than recursing at every possible point to save the extra +function call overhead. */ + ismeta = (*p == '[' || *p == '?' || *p == '\\'); + while (*text) { + width = ISUTF8(*text) ? utf8_length(text, NULL) : 1; + if (ismeta) { + matched = match_pattern(text, p, end); + text += width; + } else { + while (*text && *text != *p) { + text += width; + width = ISUTF8(*text) ? utf8_length(text, NULL) : 1; + } + if (!*text) + return ABORT; + matched = match_pattern(++text, p + 1, end); + } + if (matched != false) + return matched; + } + return ABORT; + + case '[': + /* Find the end of the character class, making sure not to pick + up a close bracket at the beginning of the class. */ + p++; + q = p + (*p == '^') + 1; + if (q > end) + return ABORT; + endclass = memchr(q, ']', (size_t) (end - q + 1)); + if (!endclass) + return ABORT; + + /* Do the heavy lifting in another function for clarity, since + character classes are an uncommon case. */ + text += utf8_decode(text, NULL, &c); + if (!match_class(c, p, endclass - 1)) + return false; + p = endclass; + break; + } + } + + return (*text == '\0'); +} + + +/* + ** Takes text and a wildmat expression; a wildmat expression is a + ** comma-separated list of wildmat patterns, optionally preceded by ! to + ** invert the sense of the expression. Returns UWILDMAT_MATCH if that + ** expression matches the text, UWILDMAT_FAIL otherwise. If allowpoison is + ** set, allow @ to introduce a poison expression (the same as !, but if it + ** triggers the failed match the routine returns UWILDMAT_POISON instead). + */ +static enum uwildmat +match_expression(const unsigned char *text, const unsigned char *start, + bool allowpoison) +{ + const unsigned char *end, *split; + const unsigned char *p = start; + bool reverse, escaped; + bool match = false; + bool poison = false; + bool poisoned = false; + + /* Handle the empty expression separately, since otherwise end will be + set to an invalid pointer. */ + if (!*p) + return !*text ? UWILDMAT_MATCH : UWILDMAT_FAIL; + end = start + strlen((const char *) start) - 1; + + /* Main match loop. Find each comma that separates patterns, and attempt + to match the text with each pattern in order. The last matching + pattern determines whether the whole expression matches. */ + for (; p <= end + 1; p = split + 1) { + if (allowpoison) + poison = (*p == '@'); + reverse = (*p == '!') || poison; + if (reverse) + p++; + + /* Find the first unescaped comma, if any. If there is none, split + will be one greater than end and point at the nul at the end of + the string. */ + for (escaped = false, split = p; split <= end; split++) { + if (*split == '[') { + split++; + if (*split == ']') + split++; + while (split <= end && *split != ']') + split++; + } + if (*split == ',' && !escaped) + break; + escaped = (*split == '\\') ? !escaped : false; + } + + /* Optimization: If match == !reverse and poison == poisoned, this + pattern can't change the result, so don't do any work. */ + if (match == !reverse && poison == poisoned) + continue; + if (match_pattern(text, p, split - 1) == true) { + poisoned = poison; + match = !reverse; + } + } + if (poisoned) + return UWILDMAT_POISON; + return match ? UWILDMAT_MATCH : UWILDMAT_FAIL; +} + + +/* + ** User-level routine used for wildmats where @ should be treated as a + ** regular character. + */ +bool +uwildmat(const char *text, const char *pat) +{ + const unsigned char *utext = (const unsigned char *) text; + const unsigned char *upat = (const unsigned char *) pat; + + if (upat[0] == '*' && upat[1] == '\0') + return true; + else + return (match_expression(utext, upat, false) == UWILDMAT_MATCH); +} + + +/* + ** User-level routine used for wildmats that support poison matches. + */ +enum uwildmat +uwildmat_poison(const char *text, const char *pat) +{ + const unsigned char *utext = (const unsigned char *) text; + const unsigned char *upat = (const unsigned char *) pat; + + if (upat[0] == '*' && upat[1] == '\0') + return UWILDMAT_MATCH; + else + return match_expression(utext, upat, true); +} + + +/* + ** User-level routine for simple expressions (neither , nor ! are special). + */ +bool +uwildmat_simple(const char *text, const char *pat) +{ + const unsigned char *utext = (const unsigned char *) text; + const unsigned char *upat = (const unsigned char *) pat; + size_t length; + + if (upat[0] == '*' && upat[1] == '\0') + return true; + else { + length = strlen(pat); + return (match_pattern(utext, upat, upat + length - 1) == true); + } +} diff -Nru intel-gpu-tools-1.13/lib/uwildmat/uwildmat.h intel-gpu-tools-1.14/lib/uwildmat/uwildmat.h --- intel-gpu-tools-1.13/lib/uwildmat/uwildmat.h 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/lib/uwildmat/uwildmat.h 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,24 @@ + +#ifndef UWILDMAT_H +#define UWILDMAT_H 1 + +#include +#include +#include + +/* +** WILDMAT MATCHING +*/ +enum uwildmat { + UWILDMAT_FAIL = 0, + UWILDMAT_MATCH = 1, + UWILDMAT_POISON +}; + +extern bool is_valid_utf8(const char *start); +extern bool uwildmat(const char *text, const char *pat); +extern bool uwildmat_simple(const char *text, const char *pat); +extern enum uwildmat uwildmat_poison(const char *text, const char *pat); + + +#endif /* UWILDMAT_H */ diff -Nru intel-gpu-tools-1.13/m4/gtk-doc.m4 intel-gpu-tools-1.14/m4/gtk-doc.m4 --- intel-gpu-tools-1.13/m4/gtk-doc.m4 2015-12-01 17:26:27.000000000 +0000 +++ intel-gpu-tools-1.14/m4/gtk-doc.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -dnl -*- mode: autoconf -*- - -# serial 2 - -dnl Usage: -dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) -AC_DEFUN([GTK_DOC_CHECK], -[ - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first - AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first - - ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) - AC_MSG_CHECKING([for gtk-doc]) - PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) - AC_MSG_RESULT($have_gtk_doc) - - if test "$have_gtk_doc" = "no"; then - AC_MSG_WARN([ - You will not be able to create source packages with 'make dist' - because $gtk_doc_requires is not found.]) - fi - - dnl check for tools we added during development - dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that - dnl may not be writable by the user. Currently, automake requires that the - dnl test name must end in '.test'. - dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 - AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) - AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) - AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) - AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) - - dnl for overriding the documentation installation directory - AC_ARG_WITH([html-dir], - AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, - [with_html_dir='${datadir}/gtk-doc/html']) - HTML_DIR="$with_html_dir" - AC_SUBST([HTML_DIR]) - - dnl enable/disable documentation building - AC_ARG_ENABLE([gtk-doc], - AS_HELP_STRING([--enable-gtk-doc], - [use gtk-doc to build documentation [[default=no]]]),, - [enable_gtk_doc=no]) - - AC_MSG_CHECKING([whether to build gtk-doc documentation]) - AC_MSG_RESULT($enable_gtk_doc) - - if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then - AC_MSG_ERROR([ - You must have $gtk_doc_requires installed to build documentation for - $PACKAGE_NAME. Please install gtk-doc or disable building the - documentation by adding '--disable-gtk-doc' to '[$]0'.]) - fi - - dnl don't check for glib if we build glib - if test "x$PACKAGE_NAME" != "xglib"; then - dnl don't fail if someone does not have glib - PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) - fi - - dnl enable/disable output formats - AC_ARG_ENABLE([gtk-doc-html], - AS_HELP_STRING([--enable-gtk-doc-html], - [build documentation in html format [[default=yes]]]),, - [enable_gtk_doc_html=yes]) - AC_ARG_ENABLE([gtk-doc-pdf], - AS_HELP_STRING([--enable-gtk-doc-pdf], - [build documentation in pdf format [[default=no]]]),, - [enable_gtk_doc_pdf=no]) - - if test -z "$GTKDOC_MKPDF"; then - enable_gtk_doc_pdf=no - fi - - if test -z "$AM_DEFAULT_VERBOSITY"; then - AM_DEFAULT_VERBOSITY=1 - fi - AC_SUBST([AM_DEFAULT_VERBOSITY]) - - AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) - AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) - AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) - AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) - AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) - AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) -]) diff -Nru intel-gpu-tools-1.13/m4/libtool.m4 intel-gpu-tools-1.14/m4/libtool.m4 --- intel-gpu-tools-1.13/m4/libtool.m4 2015-09-11 15:13:09.000000000 +0000 +++ intel-gpu-tools-1.14/m4/libtool.m4 2016-03-01 16:02:39.000000000 +0000 @@ -1,8 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,36 +8,30 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. +# Copyright (C) 2014 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. + +# GNU Libtool 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 of the License, or +# (at your option) any later version. # -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . ]) -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -67,7 +59,7 @@ # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -91,7 +83,7 @@ _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -111,26 +103,43 @@ dnl AC_DEFUN([AM_PROG_LIBTOOL], []) +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + # _LT_CC_BASENAME(CC) # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -177,15 +186,16 @@ m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -198,7 +208,7 @@ # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -209,14 +219,14 @@ ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -269,14 +279,14 @@ # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from `configure', and `config.status' +# Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN @@ -286,7 +296,7 @@ # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' +# in macros and then make a single call at the end using the 'libtool' # label. @@ -421,8 +431,8 @@ # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) @@ -446,7 +456,7 @@ # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl +available_tags='_LT_TAGS'dnl ]) @@ -474,7 +484,7 @@ # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], @@ -500,8 +510,8 @@ # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], @@ -547,7 +557,7 @@ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -560,7 +570,7 @@ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -576,7 +586,7 @@ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this +# '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). @@ -598,7 +608,7 @@ _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl +test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT @@ -621,7 +631,7 @@ } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, +'$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -643,7 +653,7 @@ This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." -while test $[#] != 0 +while test 0 != $[#] do case $[1] in --version | --v* | -V ) @@ -656,10 +666,10 @@ lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; esac shift done @@ -685,7 +695,7 @@ # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: -test "$silent" = yes && +test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false @@ -705,27 +715,31 @@ _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. -# + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS @@ -733,13 +747,24 @@ _LT_EOF + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -756,8 +781,6 @@ sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -775,7 +798,6 @@ [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -974,7 +996,7 @@ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -992,7 +1014,7 @@ cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1010,7 +1032,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], @@ -1032,7 +1054,7 @@ _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1042,32 +1064,32 @@ ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1087,29 +1109,29 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1129,7 +1151,7 @@ # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then +if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], @@ -1147,7 +1169,7 @@ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) @@ -1167,8 +1189,8 @@ # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO @@ -1196,10 +1218,10 @@ # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } -case "$ECHO" in +case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; @@ -1225,16 +1247,17 @@ AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -1244,14 +1267,14 @@ no|'') ;; #( *) - AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) +[dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- @@ -1259,31 +1282,33 @@ [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1312,9 +1337,46 @@ rm -rf conftest* ;; +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1324,7 +1386,14 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" @@ -1369,19 +1438,20 @@ *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1389,7 +1459,7 @@ case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -1398,7 +1468,7 @@ esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -1414,7 +1484,7 @@ ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK @@ -1433,11 +1503,11 @@ [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -1445,7 +1515,7 @@ ]) ]) -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -1476,7 +1546,7 @@ if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -1512,7 +1582,7 @@ [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -1539,7 +1609,7 @@ $RM conftest* ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1561,7 +1631,7 @@ m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -1580,10 +1650,10 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1604,7 +1674,7 @@ AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -1644,7 +1714,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1694,22 +1764,23 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1725,7 +1796,7 @@ ;; esac ]) -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1753,7 +1824,7 @@ # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : +if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -1800,9 +1871,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -1828,7 +1899,7 @@ return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in @@ -1849,7 +1920,7 @@ # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then +if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1859,44 +1930,52 @@ case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], + [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], + [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) @@ -1905,21 +1984,21 @@ ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -1929,7 +2008,7 @@ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl @@ -1939,9 +2018,9 @@ ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -2033,8 +2112,8 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes @@ -2044,8 +2123,8 @@ ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else @@ -2072,8 +2151,8 @@ _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -2085,15 +2164,15 @@ _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -2107,12 +2186,12 @@ fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2136,7 +2215,7 @@ # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2154,6 +2233,47 @@ ])# _LT_CMD_STRIPLIB +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2164,17 +2284,18 @@ m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -2190,28 +2311,35 @@ ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -2225,7 +2353,7 @@ # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -2234,7 +2362,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2251,14 +2379,17 @@ # flags to be left without arguments need_version=unknown +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) @@ -2266,41 +2397,91 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -2310,18 +2491,18 @@ powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -2329,8 +2510,8 @@ bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -2342,7 +2523,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -2351,8 +2532,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -2368,17 +2549,17 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -2387,8 +2568,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -2415,7 +2596,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -2428,8 +2609,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -2442,7 +2623,7 @@ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -2455,8 +2636,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -2469,8 +2650,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2488,12 +2669,13 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -2518,26 +2700,15 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2555,14 +2726,15 @@ dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2570,8 +2742,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -2580,8 +2752,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -2594,8 +2766,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2606,7 +2778,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -2614,8 +2786,8 @@ esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -2634,8 +2806,8 @@ esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -2644,13 +2816,33 @@ dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2675,14 +2867,15 @@ # 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 + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) 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 @@ -2694,17 +2887,29 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -2714,7 +2919,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -2723,58 +2928,68 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -2785,8 +3000,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -2796,11 +3011,11 @@ sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -2808,8 +3023,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -2830,24 +3045,24 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -2865,7 +3080,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -2873,8 +3088,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2883,20 +3098,30 @@ ;; esac AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -2929,39 +3154,41 @@ [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program which can recognize shared library +# find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -2984,11 +3211,11 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -3006,7 +3233,7 @@ # _LT_PATH_MAGIC # -------------- -# find a file program which can recognize a shared library +# find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -3033,16 +3260,16 @@ AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], + [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -3056,7 +3283,7 @@ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -3067,37 +3294,37 @@ with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -3183,13 +3447,13 @@ # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) @@ -3216,8 +3480,7 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -3253,10 +3516,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3295,11 +3554,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -3317,8 +3576,8 @@ lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' @@ -3371,6 +3630,9 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) @@ -3411,33 +3673,38 @@ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3448,21 +3715,21 @@ esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -3470,8 +3737,8 @@ esac fi AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -3517,8 +3784,8 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -3530,7 +3797,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) @@ -3557,13 +3824,28 @@ lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + # LT_LIB_M # -------- # check for math library @@ -3575,11 +3857,11 @@ # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) @@ -3598,7 +3880,7 @@ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; @@ -3650,7 +3932,7 @@ symcode='[[ABCDGISTW]]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; @@ -3683,14 +3965,44 @@ symcode='[[ABCDGIRSTW]]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3708,21 +4020,24 @@ # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -3762,11 +4077,11 @@ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else @@ -3792,7 +4107,7 @@ { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -3812,9 +4127,9 @@ mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -3835,7 +4150,7 @@ rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -3862,12 +4177,16 @@ [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3883,17 +4202,18 @@ m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3904,8 +4224,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -3921,6 +4241,11 @@ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3970,7 +4295,7 @@ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4011,14 +4336,14 @@ case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -4047,7 +4372,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4055,7 +4380,7 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' @@ -4111,7 +4436,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4200,17 +4525,18 @@ fi ], [ - if test "$GCC" = yes; then + if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4221,8 +4547,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -4239,6 +4565,11 @@ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -4309,7 +4640,7 @@ case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4317,11 +4648,30 @@ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -4337,7 +4687,7 @@ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -4346,9 +4696,9 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4373,6 +4723,12 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4470,7 +4826,7 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4499,7 +4855,7 @@ fi ]) case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4565,17 +4921,21 @@ case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -4588,6 +4948,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -4621,9 +4984,9 @@ # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -4639,7 +5002,7 @@ # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -4647,9 +5010,12 @@ # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4657,7 +5023,7 @@ # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -4679,24 +5045,24 @@ esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -4709,7 +5075,7 @@ case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -4728,7 +5094,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4744,7 +5110,7 @@ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4754,7 +5120,7 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -4762,61 +5128,89 @@ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4827,42 +5221,47 @@ lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4871,13 +5270,13 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4895,8 +5294,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4908,7 +5307,7 @@ _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -4923,9 +5322,9 @@ # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4942,15 +5341,15 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= @@ -4966,7 +5365,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported @@ -4974,34 +5373,57 @@ ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -5020,13 +5442,21 @@ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5045,61 +5475,80 @@ ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -5108,7 +5557,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5138,16 +5587,17 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -5156,18 +5606,18 @@ # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -5176,7 +5626,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -5226,33 +5676,33 @@ ;; hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5260,25 +5710,25 @@ ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ @@ -5286,14 +5736,14 @@ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in @@ -5304,7 +5754,7 @@ *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -5315,16 +5765,16 @@ ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], @@ -5337,22 +5787,33 @@ end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd*) + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -5366,7 +5827,7 @@ newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -5374,27 +5835,19 @@ *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no @@ -5405,33 +5858,53 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5442,24 +5915,24 @@ solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -5469,11 +5942,11 @@ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi @@ -5483,10 +5956,10 @@ ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -5535,43 +6008,43 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -5586,17 +6059,17 @@ ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -5613,7 +6086,7 @@ # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -5693,12 +6166,12 @@ _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the + "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR @@ -5739,10 +6212,10 @@ # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" +lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -5782,18 +6255,18 @@ LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report which library types will actually be built + # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -5801,8 +6274,12 @@ ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -5810,13 +6287,13 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC="$lt_save_CC" +CC=$lt_save_CC ])# _LT_LANG_C_CONFIG @@ -5824,14 +6301,14 @@ # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes @@ -5873,7 +6350,7 @@ # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -5915,35 +6392,35 @@ if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -5979,18 +6456,30 @@ _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -6000,6 +6489,13 @@ ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -6018,13 +6514,21 @@ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -6042,64 +6546,84 @@ fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -6109,7 +6633,7 @@ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6137,57 +6661,58 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6198,6 +6723,34 @@ _LT_DARWIN_LINKER_FEATURES($1) ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -6232,18 +6785,15 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default @@ -6255,7 +6805,7 @@ _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6264,11 +6814,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6278,15 +6828,15 @@ ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi @@ -6312,13 +6862,13 @@ aCC*) case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -6329,20 +6879,20 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -6357,22 +6907,22 @@ interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -6381,22 +6931,22 @@ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6404,8 +6954,8 @@ # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6414,10 +6964,10 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -6431,59 +6981,59 @@ # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -6497,18 +7047,18 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -6516,10 +7066,10 @@ *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on @@ -6577,22 +7127,17 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -6608,9 +7153,9 @@ # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -6628,17 +7173,17 @@ cxx*) case $host in osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -6653,21 +7198,21 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists @@ -6713,9 +7258,9 @@ # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6723,7 +7268,7 @@ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; @@ -6740,30 +7285,30 @@ ;; gcx*) # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -6771,11 +7316,11 @@ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -6784,52 +7329,52 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" + '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -6860,10 +7405,10 @@ esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6890,7 +7435,7 @@ lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG @@ -6912,13 +7457,14 @@ AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -7002,13 +7548,13 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -7024,16 +7570,16 @@ case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -7041,9 +7587,9 @@ esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" + _LT_TAGVAR(postdeps, $1)=$prev$p else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= @@ -7058,15 +7604,15 @@ continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" + _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" + _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -7097,51 +7643,6 @@ _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac ]) @@ -7150,7 +7651,7 @@ esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) @@ -7170,10 +7671,10 @@ # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then +if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi @@ -7210,7 +7711,7 @@ # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then +if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7232,7 +7733,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} @@ -7246,21 +7747,25 @@ AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7268,11 +7773,11 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7289,9 +7794,9 @@ fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG @@ -7301,11 +7806,11 @@ # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) -if test -z "$FC" || test "X$FC" = "Xno"; then +if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi @@ -7342,7 +7847,7 @@ # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then +if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7364,7 +7869,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} @@ -7380,21 +7885,25 @@ AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7402,11 +7911,11 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7426,7 +7935,7 @@ GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes +fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -7436,7 +7945,7 @@ # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -7470,7 +7979,7 @@ CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -7507,7 +8016,7 @@ # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE @@ -7541,7 +8050,7 @@ CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. @@ -7578,7 +8087,7 @@ # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -7594,7 +8103,7 @@ lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" +lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER @@ -7604,7 +8113,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= @@ -7633,7 +8142,7 @@ [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -7744,7 +8253,7 @@ # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue + test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -7761,9 +8270,9 @@ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break + test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then + if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -7787,27 +8296,7 @@ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -7831,102 +8320,9 @@ ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- -# Determine which file name conversion functions should be used by +# Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], diff -Nru intel-gpu-tools-1.13/m4/lt~obsolete.m4 intel-gpu-tools-1.14/m4/lt~obsolete.m4 --- intel-gpu-tools-1.13/m4/lt~obsolete.m4 2015-09-11 15:13:10.000000000 +0000 +++ intel-gpu-tools-1.14/m4/lt~obsolete.m4 2016-03-01 16:02:39.000000000 +0000 @@ -1,6 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives @@ -11,7 +12,7 @@ # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # @@ -25,7 +26,7 @@ # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until diff -Nru intel-gpu-tools-1.13/m4/ltoptions.m4 intel-gpu-tools-1.14/m4/ltoptions.m4 --- intel-gpu-tools-1.13/m4/ltoptions.m4 2015-09-11 15:13:10.000000000 +0000 +++ intel-gpu-tools-1.14/m4/ltoptions.m4 2016-03-01 16:02:39.000000000 +0000 @@ -1,14 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 7 ltoptions.m4 +# serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -29,7 +29,7 @@ [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl + [m4_warning([Unknown $1 option '$2'])])[]dnl ]) @@ -75,13 +75,15 @@ dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS @@ -112,7 +114,7 @@ [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) +put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -148,7 +150,7 @@ _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) +put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -157,9 +159,9 @@ # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], @@ -172,14 +174,14 @@ *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -211,9 +213,9 @@ # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], @@ -226,14 +228,14 @@ *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -265,9 +267,9 @@ # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], @@ -280,14 +282,14 @@ *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -304,14 +306,14 @@ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) +the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) +the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -319,11 +321,64 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], @@ -334,19 +389,17 @@ *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -359,7 +412,7 @@ [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) +put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: diff -Nru intel-gpu-tools-1.13/m4/ltsugar.m4 intel-gpu-tools-1.14/m4/ltsugar.m4 --- intel-gpu-tools-1.13/m4/ltsugar.m4 2015-09-11 15:13:10.000000000 +0000 +++ intel-gpu-tools-1.14/m4/ltsugar.m4 2016-03-01 16:02:39.000000000 +0000 @@ -1,6 +1,7 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -33,7 +34,7 @@ # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. +# Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], @@ -44,7 +45,7 @@ # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different diff -Nru intel-gpu-tools-1.13/m4/ltversion.m4 intel-gpu-tools-1.14/m4/ltversion.m4 --- intel-gpu-tools-1.13/m4/ltversion.m4 2015-09-11 15:13:10.000000000 +0000 +++ intel-gpu-tools-1.14/m4/ltversion.m4 2016-03-01 16:02:39.000000000 +0000 @@ -1,6 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3337 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru intel-gpu-tools-1.13/MAINTAINERS intel-gpu-tools-1.14/MAINTAINERS --- intel-gpu-tools-1.13/MAINTAINERS 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/MAINTAINERS 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,2 @@ +Daniel Vetter +Marius Vlad diff -Nru intel-gpu-tools-1.13/Makefile.am intel-gpu-tools-1.14/Makefile.am --- intel-gpu-tools-1.13/Makefile.am 2015-08-17 15:40:31.000000000 +0000 +++ intel-gpu-tools-1.14/Makefile.am 2016-03-01 15:59:21.000000000 +0000 @@ -21,8 +21,13 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -SUBDIRS = lib man tools scripts benchmarks demos overlay +SUBDIRS = lib man tools scripts benchmarks +if BUILD_TESTS +SUBDIRS += tests +endif + +if BUILD_X86 if BUILD_ASSEMBLER SUBDIRS += assembler endif @@ -31,8 +36,7 @@ SUBDIRS += debugger endif -if BUILD_TESTS -SUBDIRS += tests +SUBDIRS += overlay demos benchmarks endif SUBDIRS += docs diff -Nru intel-gpu-tools-1.13/Makefile.in intel-gpu-tools-1.14/Makefile.in --- intel-gpu-tools-1.13/Makefile.in 2015-12-02 16:47:58.000000000 +0000 +++ intel-gpu-tools-1.14/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -108,16 +108,17 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@BUILD_ASSEMBLER_TRUE@am__append_1 = assembler -@BUILD_SHADER_DEBUGGER_TRUE@am__append_2 = debugger -@BUILD_TESTS_TRUE@am__append_3 = tests +target_triplet = @target@ +@BUILD_TESTS_TRUE@am__append_1 = tests +@BUILD_ASSEMBLER_TRUE@@BUILD_X86_TRUE@am__append_2 = assembler +@BUILD_SHADER_DEBUGGER_TRUE@@BUILD_X86_TRUE@am__append_3 = debugger +@BUILD_X86_TRUE@am__append_4 = overlay demos benchmarks subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -184,8 +185,8 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope -DIST_SUBDIRS = lib man tools scripts benchmarks demos overlay \ - assembler debugger tests docs +DIST_SUBDIRS = lib man tools scripts benchmarks tests assembler \ + debugger overlay demos docs am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ @@ -194,9 +195,8 @@ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/missing COPYING ChangeLog INSTALL NEWS \ README build-aux/compile build-aux/config.guess \ - build-aux/config.sub build-aux/depcomp build-aux/install-sh \ - build-aux/ltmain.sh build-aux/missing build-aux/py-compile \ - build-aux/ylwrap + build-aux/config.sub build-aux/install-sh build-aux/ltmain.sh \ + build-aux/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -273,6 +273,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -317,6 +319,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -415,17 +418,22 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -SUBDIRS = lib man tools scripts benchmarks demos overlay \ - $(am__append_1) $(am__append_2) $(am__append_3) docs +SUBDIRS = lib man tools scripts benchmarks $(am__append_1) \ + $(am__append_2) $(am__append_3) $(am__append_4) docs MAINTAINERCLEANFILES = ChangeLog INSTALL all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff -Nru intel-gpu-tools-1.13/man/Makefile.in intel-gpu-tools-1.14/man/Makefile.in --- intel-gpu-tools-1.13/man/Makefile.in 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/man/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -88,14 +88,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ @HAVE_RST2MAN_TRUE@am__append_1 = $(appman_RST:rst=$(APP_MAN_SUFFIX)) subdir = man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -188,6 +188,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -232,6 +234,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -330,11 +333,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/NEWS intel-gpu-tools-1.14/NEWS --- intel-gpu-tools-1.13/NEWS 2015-12-02 16:46:18.000000000 +0000 +++ intel-gpu-tools-1.14/NEWS 2016-03-01 15:59:21.000000000 +0000 @@ -1,3 +1,45 @@ +Release 1.14 (2016-03-01) +------------------------- + +- New test: gem_create validate parameters for GEM_CREATE ioctl +(Ankitprasad Sharma) + +- New test: gem_softpin exercise the userptr ioctl to create shared +buffers between CPU and GPU (Vinay Belgaumkar) + +- New tests: prime_mmap_coherency/kms_mmap_write_crc cache coherency +tests (Tiago Vignatti) + +- New test: prime_mmap mmap() on dma-buf fds (Rob Bradford) + +- New test: gem_exec_reloc sanity check of execbuf-ioctl relocations (Chris +Wilson) + +- New test: gem_exec_basic sanity check of execbuf-ioctl rings (Chris Wilson) + +- improved igt_hang_ring() infrastructure for generic hang injection support in +the core library (Chris Wilson) + +- new igt_pm library to collect power management testing helpers (David +Weinehall) + +- lig/igt_vc4: VC4 support library (Eric Anholt) + +- kms_frontbuffer_tracking: included in BAT (Paulo Zanoni) + +- kms_psr_sink_crc: Add BAT test for PSR active (Rodrigo Vivi) + +- gem_wait: test superseded by gem_latency in benchmarks (Chris Wilson) + +- igt_core: Fix logging to display extended line (Derek Morton) + +- igt_core: Expand --run-subtest functionality (Derek Morton) + +- kms_force_connector_basic: various fixes and included in BAT set (Daniel +Vetter) + +- Many other improvements and bug fixes. + Release 1.13 (2015-12-02) ------------------------- diff -Nru intel-gpu-tools-1.13/overlay/Makefile.in intel-gpu-tools-1.14/overlay/Makefile.in --- intel-gpu-tools-1.13/overlay/Makefile.in 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/overlay/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -88,6 +88,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ @BUILD_OVERLAY_TRUE@bin_PROGRAMS = intel-gpu-overlay$(EXEEXT) @BUILD_OVERLAY_XLIB_TRUE@am__append_1 = $(OVERLAY_XLIB_CFLAGS) $(XRANDR_CFLAGS) @BUILD_OVERLAY_XLIB_TRUE@am__append_2 = $(OVERLAY_XLIB_LIBS) $(XRANDR_LIBS) @@ -108,10 +109,9 @@ subdir = overlay ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -253,6 +253,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -297,6 +299,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -395,11 +398,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/README intel-gpu-tools-1.14/README --- intel-gpu-tools-1.13/README 2015-12-02 16:42:16.000000000 +0000 +++ intel-gpu-tools-1.14/README 2016-03-01 16:01:25.000000000 +0000 @@ -141,3 +141,10 @@ python-docutils x11proto-dri2-dev xutils-dev + +Releases for maintainers +------------------------ + +(1.14) + +http://www.x.org/wiki/Development/Documentation/ReleaseHOWTO/ diff -Nru intel-gpu-tools-1.13/scripts/convert_itp.py intel-gpu-tools-1.14/scripts/convert_itp.py --- intel-gpu-tools-1.13/scripts/convert_itp.py 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/scripts/convert_itp.py 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +#this script helps to convert internal debugger scripts given to us into our tools + +import sys +import fileinput + +def replace_with_dict(text, dicto): + for key, val in dicto.items(): + text = text.replace(key, val) + return text + +for lines in fileinput.input([sys.argv[1]], inplace=True): + lines = lines.strip() + if lines == '': continue # strip empty lines + replace_dict = {'dword(' : '../tools/intel_reg_read ', 'MMADDR + ' : '', '//' : '#', ')p;' : '', ')p ' : ' -c '} + print(replace_with_dict(lines, replace_dict)) diff -Nru intel-gpu-tools-1.13/scripts/list-workarounds intel-gpu-tools-1.14/scripts/list-workarounds --- intel-gpu-tools-1.13/scripts/list-workarounds 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/scripts/list-workarounds 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 + +import os,sys +import optparse +import subprocess +import re +import operator + +# map of Workaround names -> (list of platforms) +workarounds = {} +verbose = False + +def find_nth(haystack, needle, n): + start = haystack.find(needle) + while start >= 0 and n > 1: + start = haystack.find(needle, start + len(needle)) + n -= 1 + return start + +valid_platforms = ('ctg', 'elk', 'ilk', 'snb', 'ivb', 'vlv', 'hsw', 'bdw', + 'chv', 'skl', 'bxt', 'kbl') +def parse_platforms(line, p): + l = p.split(',') + for p in l: + if p not in valid_platforms: + sys.stdout.write("warning: %s\n" % line) + sys.stdout.write("unknown platform %s\n" % p) + return l + +wa_re = re.compile('(?PW[aA][A-Z0-9][a-zA-Z0-9_]+):(?P[a-z,]+)') +waname_re = re.compile('(?PW[aA][A-Z0-9][a-zA-Z0-9_]+)') +def parse(me): + for line in me.splitlines(): + match = wa_re.search(str(line)) + if not match: + if not verbose: + continue + + # Those lines come from a git grep that looks for Wa + # names, so if we don't match wa_re here it's because + # no platform has been specified + name = waname_re.search(line).group('name') + path = line[:find_nth(line, ':', 2)] + sys.stdout.write("warning: %s\n" % line) + sys.stdout.write("%s: no platform for %s\n" + % (path, name)) + continue + + wa_name = match.group('name') + platforms = match.group('platforms') + + if wa_name in workarounds: + platforms = parse_platforms(line, platforms) + for p in platforms: + if not p in workarounds[wa_name]: + workarounds[wa_name].append(p) + else: + workarounds[wa_name] = parse_platforms(line, platforms) + + +def execute(cmd): + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = p.communicate() + return out, err + +def parse_options(args): + usage = "Usage: list-workarounds [options] path-to-kernel -k path-to-kernel -m path-to-mesa" + parser = optparse.OptionParser(usage, version=1.0) + + parser.add_option("-k", "--kernel-path", dest="kernel_path", default=None, + help="path to kernel") + + parser.add_option("-m", "--mesa-path", dest="mesa_path", default=None, + help="path to mesa") + + parser.add_option("-v", "--verbose", action="store_true", + dest="verbose", default=False, + help="be more verbose") + + parser.add_option("-p", "--platform", dest="platform", default=None, + help="List workarounds for the specified platform") + + (options, args) = parser.parse_args() + return (options, args) + +def print_workarounds(project_root, driver_dir, project): + olddir = os.getcwd() + os.chdir(project_root) + work_arounds, err = execute(['git', 'grep', '-n', + '-e', 'W[aA][A-Z0-9][a-zA-Z0-9_]\+', + driver_dir]) + os.chdir(olddir) + if err: + print(err) + sys.exit(1) + + parse(work_arounds) + print("\nList of workarounds found in %s:" % project) + for wa in sorted(workarounds.keys()): + if not options.platform: + print("%s: %s" % (wa, ', '.join(workarounds[wa]))) + elif options.platform in workarounds[wa]: + print(wa) + + +if __name__ == '__main__': + (options, args) = parse_options(sys.argv) + verbose = options.verbose + kernel_path = None + + if not len(args) and options.kernel_path == None and options.mesa_path == None: + sys.stderr.write("error: A path to either a kernel tree or Mesa is required\n") + sys.exit(1) + + if len(args): + kernel_path = args[0] + elif options.kernel_path != None: + kernel_path = options.kernel_path + + if kernel_path != None: + # --- list Kernel workarounds if path is provided --- + kconfig = os.path.join(kernel_path, 'Kconfig') + if not os.path.isfile(kconfig): + sys.stderr.write("error: %s does not point to a kernel tree \n" + % kernel_path) + sys.exit(1) + + i915_dir = os.path.join('drivers', 'gpu', 'drm', 'i915') + print_workarounds(kernel_path, i915_dir, "kernel") + + # --- list mesa workarounds if path is provided --- + if options.mesa_path != None: + # reset workarounds array + workarounds = {} + + mesa_path = options.mesa_path + i965_dir = os.path.join('src', 'mesa', 'drivers', 'dri', 'i965') + mesa_dir = os.path.join(mesa_path, i965_dir) + if not os.path.exists(mesa_dir): + sys.stderr.write("error: %s does not point to a valid mesa path \n" + % mesa_path) + sys.exit(1) + + print_workarounds(mesa_path, i965_dir, "Mesa") diff -Nru intel-gpu-tools-1.13/scripts/Makefile.in intel-gpu-tools-1.14/scripts/Makefile.in --- intel-gpu-tools-1.13/scripts/Makefile.in 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/scripts/Makefile.in 2016-03-01 16:02:43.000000000 +0000 @@ -88,13 +88,13 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = scripts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_noinst_SCRIPTS) \ @@ -163,6 +163,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -207,6 +209,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -305,11 +308,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/scripts/quick-testlist.py intel-gpu-tools-1.14/scripts/quick-testlist.py --- intel-gpu-tools-1.13/scripts/quick-testlist.py 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/scripts/quick-testlist.py 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# +# Copyright 2015 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +from __future__ import print_function +import json +import sys + +def filter_results(filename): + with open(filename) as data: + json_data = json.load(data) + + for test_name in json_data["tests"]: + if json_data["tests"][test_name]["result"] == "incomplete": + continue + if json_data["tests"][test_name]["time"] < 60: + print(test_name) + + +if len(sys.argv) < 2: + print("Usage: quick-testlist.py RESULTS") + print("Read piglit results from RESULTS and print the tests that executed" + " in under 60 seconds, excluding any incomplete tests. The list can" + " be used by the --test-list option of piglit.") + sys.exit(1) + +filter_results(sys.argv[1]) diff -Nru intel-gpu-tools-1.13/shaders/gpgpu/gpgpu_fill.gxa intel-gpu-tools-1.14/shaders/gpgpu/gpgpu_fill.gxa --- intel-gpu-tools-1.13/shaders/gpgpu/gpgpu_fill.gxa 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/shaders/gpgpu/gpgpu_fill.gxa 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Registers + * g0 -- header + * g1 -- constant + * g2 -- calculate X/Y offset + * g4-g12 payload for write message + */ +define(`ORIG', `g2.0<2,2,1>UD') +define(`ORIG_X', `g2.0<1>UD') +define(`ORIG_Y', `g2.4<1>UD') +define(`COLOR', `g1.0') +define(`COLORUB', `COLOR<0,1,0>UB') +define(`COLORUD', `COLOR<0,1,0>UD') +define(`X', `g0.4<0,1,0>UD') +define(`Y', `g0.24<0,1,0>UD') + +mov(4) COLOR<1>UB COLORUB {align1}; + +/* WRITE */ +/* count thread group ID for X/Y offset */ +mul(1) ORIG_X X 0x10UD {align1}; +mov(1) ORIG_Y Y {align1}; +mov(8) g4.0<1>UD g0.0<8,8,1>UD {align1}; +mov(2) g4.0<1>UD ORIG {align1}; +/* Normal mode: for block height 1 row and block width 16 bytes */ +mov(1) g4.8<1>UD 0x0000000fUD {align1}; + +mov(16) g5.0<1>UD COLORUD {align1 compr}; + +/* + * write(0, 0, 10, 12) + * 10: media_block_write + * 12: data cache data port 1 + */ +send(16) 4 acc0<1>UW null write(0, 0, 10, 12) mlen 3 rlen 0 {align1}; + +/* EOT */ +mov(8) g112.0<1>UD g0.0<8,8,1>UD {align1}; +send(16) 112 null<1>UW null thread_spawner(0, 0, 1) mlen 1 rlen 0 {align1 EOT}; diff -Nru intel-gpu-tools-1.13/shaders/gpgpu/README intel-gpu-tools-1.14/shaders/gpgpu/README --- intel-gpu-tools-1.13/shaders/gpgpu/README 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/shaders/gpgpu/README 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,4 @@ + +Commands used to generate the shader on gen7 +$> m4 gpgpu_fill.gxa > gpgpu_fill.gxm +$> intel-gen4asm -g 7 -o gpgpu_fill.gxm diff -Nru intel-gpu-tools-1.13/shaders/media/media_fill.gxa intel-gpu-tools-1.14/shaders/media/media_fill.gxa --- intel-gpu-tools-1.13/shaders/media/media_fill.gxa 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/shaders/media/media_fill.gxa 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Registers + * g0 -- header + * g1 -- constant + * g2 -- inline data + * g3 -- reserved + * g4-g12 payload for write message + */ +define(`ORIG', `g2.0<2,2,1>UD') +define(`COLOR', `g1.0') +define(`COLORUB', `COLOR<0,1,0>UB') +define(`COLORUD', `COLOR<0,1,0>UD') + +mov(4) COLOR<1>UB COLORUB {align1}; + +/* WRITE */ +mov(8) g4.0<1>UD g0.0<8,8,1>UD {align1}; +mov(2) g4.0<1>UD ORIG {align1}; +mov(1) g4.8<1>UD 0x000f000fUD {align1}; + +mov(16) g5.0<1>UD COLORUD {align1 compr}; +mov(16) g7.0<1>UD COLORUD {align1 compr}; +mov(16) g9.0<1>UD COLORUD {align1 compr}; +mov(16) g11.0<1>UD COLORUD {align1 compr}; + +/* + * comment out the following instruction on Gen7 + * write(0, 0, 10, 12) + * 10: media_block_write + * 12: data cache data port 1 + */ +send(16) 4 acc0<1>UW null write(0, 0, 10, 12) mlen 9 rlen 0 {align1}; + +/* + * uncomment the following instruction on Gen7 + * write(0, 0, 10, 0) + * 10: media_block_write + * 0: reander cache data port + */ +/* send(16) 4 acc0<1>UW null write(0, 0, 10, 0) mlen 9 rlen 0 {align1}; */ + +/* EOT */ +mov(8) g112.0<1>UD g0.0<8,8,1>UD {align1}; +send(16) 112 null<1>UW null thread_spawner(0, 0, 1) mlen 1 rlen 0 {align1 EOT}; diff -Nru intel-gpu-tools-1.13/shaders/media/README intel-gpu-tools-1.14/shaders/media/README --- intel-gpu-tools-1.13/shaders/media/README 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/shaders/media/README 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,5 @@ +These files are here for reference only. + +Commands used to generate the shader on gen8 +$> m4 media_fill.gxa > media_fill.gxm +$> intel-gen4asm -g 8 -o media_fill.gxm diff -Nru intel-gpu-tools-1.13/shaders/ps/blit.g7a intel-gpu-tools-1.14/shaders/ps/blit.g7a --- intel-gpu-tools-1.13/shaders/ps/blit.g7a 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/shaders/ps/blit.g7a 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,66 @@ +/* Assemble with ".../intel-gen4asm/src/intel-gen4asm -g 7" */ + + +/* Move pixels into g10-g13. The pixel shaader does not load what you want. It + * loads the input data for a plane function to calculate what you want. The + * following is boiler plate code to move our normalized texture coordinates + * (u,v) into g10-g13. It does this 4 subspans (16 pixels) at a time. + * + * This should do the same thing, but it doesn't work for some reason. + * pln(16) g10 g6<0,1,0>F g2<8,8,1>F { align1 }; + * pln(16) g12 g6.16<1>F g2<8,8,1>F { align1 }; + */ +/* U */ +pln (8) g10<1>F g6.0<0,1,0>F g2.0<8,8,1>F { align1 }; /* pixel 0-7 */ +pln (8) g11<1>F g6.0<0,1,0>F g4.0<8,8,1>F { align1 }; /* pixel 8-15 */ +/* V */ +pln (8) g12<1>F g6.16<0,1,0> g2.0<8,8,1>F { align1 }; /* pixel 0-7 */ +pln (8) g13<1>F g6.16<0,1,0> g4.0<8,8,1>F { align1 }; /* pixel 8-15 */ + + +/* Next the we want the sampler to fetch the src texture (ie. src buffer). This + * is done with a pretty simple send message. The output goes to g112, which is + * exactly what we're supposed to use in our final send message. + * In intel-gen4asm, we should end up parsed by the following rule: + * predicate SEND execsize dst sendleadreg sndopr directsrcoperand instoptions + * + * Send message descriptor: + * 28:25 = message len = 4 // our 4 registers have 16 pixels + * 24:20 = response len = 8 // Each pixel is RGBA32, so we need 8 registers + * 19:19 = header present = 0 + * 18:17 = SIMD16 = 2 + * 16:12 = TYPE = 0 (regular sample) + * 11:08 = Sampler index = ignored/0 + * 7:0 = binding table index = src = 1 + * 0x8840001 + * + * Send message extra descriptor + * 5:5 = End of Thread = 0 + * 3:0 = Target Function ID = SFID_SAMPLER (2) + * 0x2 + */ + +send(16) g112 g10 0x2 0x8840001 { align1 }; + +/* g112-g119 now contains the sample source input, and all we must do is write + * it out to the destination render target. This is done with the send message + * as well. The only extra bits are to terminate the pixel shader. + * + * Send message descriptor: + * 28:25 = message len = 8 // 16 pixels RGBA32 + * 24:20 = response len = 0 + * 19:19 = header present = 0 + * 17:14 = message type = Render Target Write (12) + * 12:12 = Last Render Target Select = 1 + * 10:08 = Message Type = SIMD16 (0) + * 07:00 = Binding Table Index = dest = 0 + * 0x10031000 + * + * Send message extra descriptor + * 5:5 = End of Thread = 1 + * 3:0 = Target Function ID = SFID_DP_RC (5) + * 0x25 + */ +send(16) null g112 0x25 0x10031000 { align1, EOT }; + +/* vim: set ft=c ts=4 sw=2 tw=80 et: */ diff -Nru intel-gpu-tools-1.13/shaders/ps/neg1_test.g7a intel-gpu-tools-1.14/shaders/ps/neg1_test.g7a --- intel-gpu-tools-1.13/shaders/ps/neg1_test.g7a 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/shaders/ps/neg1_test.g7a 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,9 @@ +mov(8) g112:UD 0x3f800000:UD { align1 }; +mov(8) g113:UD 0x3f800000:UD { align1 }; +mov(8) g114:UD 0x3f800000:UD { align1 }; +mov(8) g115:UD 0x3f800000:UD { align1 }; +mov(8) g116:UD 0x3f800000:UD { align1 }; +mov(8) g117:UD 0x3f800000:UD { align1 }; +mov(8) g118:UD 0x3f800000:UD { align1 }; +mov(8) g119:UD 0x3f800000:UD { align1 }; +send(16) null g112 0x25 0x10031000 { align1, EOT }; diff -Nru intel-gpu-tools-1.13/shaders/ps/README intel-gpu-tools-1.14/shaders/ps/README --- intel-gpu-tools-1.13/shaders/ps/README 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/shaders/ps/README 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1 @@ +These files are here for reference only. diff -Nru intel-gpu-tools-1.13/tests/Android.mk intel-gpu-tools-1.14/tests/Android.mk --- intel-gpu-tools-1.13/tests/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/Android.mk 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,79 @@ +LOCAL_PATH := $(call my-dir) + +include $(LOCAL_PATH)/Makefile.sources + +#================# +# each igt test is a separate executable. define a function to build one of these tests +define add_test + include $(CLEAR_VARS) + + # specific to this test + LOCAL_SRC_FILES := $1.c + LOCAL_MODULE := $1 + + # common to all tests + LOCAL_CFLAGS += ${IGT_LOCAL_CFLAGS} + LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES} + LOCAL_STATIC_LIBRARIES := ${IGT_LOCAL_STATIC_LIBRARIES} + LOCAL_SHARED_LIBRARIES := ${IGT_LOCAL_SHARED_LIBRARIES} + + LOCAL_MODULE_TAGS := optional + # ask linker to define a specific symbol; we use this to identify IGT tests + LOCAL_LDFLAGS := -Wl,--defsym=$2=0 + LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt + + include $(BUILD_EXECUTABLE) +endef + + +# some tests still do not build under android +skip_tests_list := +skip_tests_list += testdisplay # needs glib.h +skip_tests_list += pm_rpm + +# set local compilation flags for IGT tests +IGT_LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM -DANDROID -UNDEBUG +IGT_LOCAL_CFLAGS += -include "check-ndebug.h" -std=gnu99 +# FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit +IGT_LOCAL_CFLAGS += -Wno-error=return-type +# Excessive complaining for established cases. Rely on the Linux version warnings. +IGT_LOCAL_CFLAGS += -Wno-sign-compare + +# set local includes +IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib +IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm + +# set local libraries +IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools +IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel + +# handle cairo requirements if it is enabled +ifeq ("${ANDROID_HAS_CAIRO}", "1") + IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/cairo-1.12.16/src + IGT_LOCAL_SHARED_LIBRARIES += libcairo + IGT_LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1 +else +# the following tests depend on cairo, so skip them + skip_tests_list += \ + gem_render_copy \ + pm_lpsp + +# All kms tests depend on cairo + tmp_list := $(foreach test_name, $(TESTS_progs),\ + $(if $(findstring kms_,$(test_name)),$(test_name))) + skip_tests_list += $(tmp_list) + + tmp_list := $(foreach test_name, $(TESTS_progs_M),\ + $(if $(findstring kms_,$(test_name)),$(test_name))) + skip_tests_list += $(tmp_list) + + IGT_LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=0 +endif + +# create two test lists, one for simple single tests, one for tests that have subtests +tests_list := $(filter-out $(skip_tests_list),$(TESTS_progs) $(HANG) $(TESTS_testsuite)) +tests_list_M := $(filter-out $(skip_tests_list),$(TESTS_progs_M)) + +$(foreach item,$(tests_list),$(eval $(call add_test,$(item),"IGT_SINGLE_TEST"))) +$(foreach item,$(tests_list_M),$(eval $(call add_test,$(item),"IGT_MULTI_TEST"))) + diff -Nru intel-gpu-tools-1.13/tests/check_drm_clients intel-gpu-tools-1.14/tests/check_drm_clients --- intel-gpu-tools-1.13/tests/check_drm_clients 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/check_drm_clients 2016-03-01 15:59:21.000000000 +0000 @@ -3,4 +3,4 @@ SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" . $SOURCE_DIR/drm_lib.sh -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/debugfs_emon_crash intel-gpu-tools-1.14/tests/debugfs_emon_crash --- intel-gpu-tools-1.13/tests/debugfs_emon_crash 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/debugfs_emon_crash 2016-03-01 15:59:21.000000000 +0000 @@ -13,4 +13,4 @@ # If we got here, we haven't crashed -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/drm_lib.sh intel-gpu-tools-1.14/tests/drm_lib.sh --- intel-gpu-tools-1.13/tests/drm_lib.sh 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/drm_lib.sh 2016-03-01 15:59:21.000000000 +0000 @@ -1,20 +1,26 @@ #!/bin/sh +IGT_EXIT_TIMEOUT=78 +IGT_EXIT_SKIP=77 +IGT_EXIT_SUCCESS=0 +IGT_EXIT_INVALID=79 +IGT_EXIT_FAILURE=99 + # hacked-up long option parsing for arg in $@ ; do case $arg in --list-subtests) - exit 79 + exit $IGT_EXIT_INVALID ;; --run-subtest) - exit 79 + exit $IGT_EXIT_INVALID ;; --debug) IGT_LOG_LEVEL=debug ;; --help-description) echo $IGT_TEST_DESCRIPTION - exit 0 + exit $IGT_EXIT_SUCCESS ;; --help) echo "Usage: `basename $0` [OPTIONS]" @@ -23,18 +29,23 @@ echo " --debug" echo " --help-description" echo " --help" - exit 0 + exit $IGT_EXIT_SUCCESS ;; esac done +skip() { + echo "$@" + exit $IGT_EXIT_SKIP +} + die() { echo "$@" - exit 1 + exit $IGT_EXIT_FAILURE } do_or_die() { - $@ > /dev/null 2>&1 || (echo "FAIL: $@ ($?)" && exit -1) + $@ > /dev/null 2>&1 || (echo "FAIL: $@ ($?)" && exit $IGT_EXIT_FAILURE) } if [ -d /debug/dri ] ; then @@ -54,7 +65,7 @@ done if [ $i915_dfs_path = "x" ] ; then - die " i915 debugfs path not found." + skip " i915 debugfs path not found." fi # read everything we can @@ -63,7 +74,7 @@ die "ERROR: other drm clients running" fi -whoami | grep -q root || ( echo ERROR: not running as root; exit 1 ) +whoami | grep -q root || ( echo ERROR: not running as root; exit $IGT_EXIT_FAILURE ) i915_sfs_path= if [ -d /sys/class/drm ] ; then @@ -76,7 +87,7 @@ function drmtest_skip_on_simulation() { - [ -n "$INTEL_SIMULATION" ] && exit 77 + [ -n "$INTEL_SIMULATION" ] && exit $IGT_EXIT_SKIP } drmtest_skip_on_simulation diff -Nru intel-gpu-tools-1.13/tests/drv_debugfs_reader intel-gpu-tools-1.14/tests/drv_debugfs_reader --- intel-gpu-tools-1.13/tests/drv_debugfs_reader 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/drv_debugfs_reader 2016-03-01 15:59:21.000000000 +0000 @@ -6,4 +6,4 @@ # read everything we can cat $i915_dfs_path/* > /dev/null 2>&1 -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/drv_hangman.c intel-gpu-tools-1.14/tests/drv_hangman.c --- intel-gpu-tools-1.13/tests/drv_hangman.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/drv_hangman.c 2016-03-01 15:59:21.000000000 +0000 @@ -32,11 +32,12 @@ #include #include - #ifndef I915_PARAM_CMD_PARSER_VERSION #define I915_PARAM_CMD_PARSER_VERSION 28 #endif +static char read_buffer[1024]; + static int _read_sysfs(void *dst, int maxlen, const char* path, const char *fname) @@ -73,9 +74,7 @@ static void test_sysfs_error_exists(void) { - char tmp[1024]; - - igt_assert_lt(0, read_sysfs(tmp, sizeof(tmp), "error")); + igt_assert_lt(0, read_sysfs(read_buffer, sizeof(read_buffer), "error")); } static void test_debugfs_error_state_exists(void) @@ -112,29 +111,26 @@ igt_debug("dfs entry %s read '%s'\n", fname, d); } -static void _assert_dfs_entry(const char *fname, const char *s, bool inverse) +static int compare_dfs_entry(const char *fname, const char *s) { - char tmp[1024]; - const int l = min(strlen(s), sizeof(tmp)); + const int l = min(strlen(s), sizeof(read_buffer)); - read_dfs(fname, tmp, l + 1); - if (!inverse) { - igt_fail_on_f(strncmp(tmp, s, l) != 0, - "contents of %s: '%s' (expected '%s')\n", fname, tmp, s); - } else { - igt_fail_on_f(strncmp(tmp, s, l) == 0, - "contents of %s: '%s' (expected not '%s'\n", fname, tmp, s); - } + read_dfs(fname, read_buffer, l + 1); + return strncmp(read_buffer, s, l); } static void assert_dfs_entry(const char *fname, const char *s) { - _assert_dfs_entry(fname, s, false); + igt_fail_on_f(compare_dfs_entry(fname, s) != 0, + "contents of %s: '%s' (expected '%s')\n", + fname, read_buffer, s); } static void assert_dfs_entry_not(const char *fname, const char *s) { - _assert_dfs_entry(fname, s, true); + igt_fail_on_f(compare_dfs_entry(fname, s) == 0, + "contents of %s: '%s' (expected not '%s'\n", + fname, read_buffer, s); } static void assert_error_state_clear(void) @@ -147,59 +143,21 @@ assert_dfs_entry_not("i915_error_state", "no error state collected"); } -#define MAGIC_NUMBER 0x10001 -const uint32_t batch[] = { MI_NOOP, - MI_BATCH_BUFFER_END, - MAGIC_NUMBER, - MAGIC_NUMBER }; +const uint32_t *batch; -static uint64_t submit_batch(int fd, unsigned ring_id, bool stop_ring) +static uint64_t submit_hang(int fd, unsigned ring_id) { - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 exec; - uint64_t presumed_offset; - - gem_require_ring(fd, ring_id); - - exec.handle = gem_create(fd, 4096); - gem_write(fd, exec.handle, 0, batch, sizeof(batch)); - exec.relocation_count = 0; - exec.relocs_ptr = 0; - exec.alignment = 0; - exec.offset = 0; - exec.flags = 0; - exec.rsvd1 = 0; - exec.rsvd2 = 0; - - execbuf.buffers_ptr = (uintptr_t)&exec; - execbuf.buffer_count = 1; - execbuf.batch_start_offset = 0; - execbuf.batch_len = sizeof(batch); - execbuf.cliprects_ptr = 0; - execbuf.num_cliprects = 0; - execbuf.DR1 = 0; - execbuf.DR4 = 0; - execbuf.flags = ring_id; - i915_execbuffer2_set_context_id(execbuf, 0); - execbuf.rsvd2 = 0; - - gem_execbuf(fd, &execbuf); - gem_sync(fd, exec.handle); - presumed_offset = exec.offset; - - if (stop_ring) { - igt_set_stop_rings(igt_to_stop_ring_flag(ring_id)); + uint64_t offset; + igt_hang_ring_t hang; - gem_execbuf(fd, &execbuf); - gem_sync(fd, exec.handle); + hang = igt_hang_ctx(fd, 0, ring_id, HANG_ALLOW_CAPTURE, &offset); - igt_assert(igt_get_stop_rings() == STOP_RING_NONE); - igt_assert(presumed_offset == exec.offset); - } + batch = gem_mmap__cpu(fd, hang.handle, 0, 4096, PROT_READ); + gem_set_domain(fd, hang.handle, I915_GEM_DOMAIN_CPU, 0); - gem_close(fd, exec.handle); + igt_post_hang_ring(fd, hang); - return exec.offset; + return offset; } static void clear_error_state(void) @@ -217,11 +175,12 @@ { int fd; + fd = drm_open_driver(DRIVER_INTEL); + clear_error_state(); assert_error_state_clear(); - fd = drm_open_driver(DRIVER_INTEL); - submit_batch(fd, I915_EXEC_RENDER, true); + submit_hang(fd, I915_EXEC_RENDER); close(fd); assert_error_state_collected(); @@ -235,114 +194,53 @@ uint64_t expected_offset) { FILE *file; - int debug_fd; char *line = NULL; size_t line_size = 0; - char *ring_name = NULL; - bool bb_ok = false, req_ok = false, ringbuf_ok = false; - debug_fd = igt_debugfs_open("i915_error_state", O_RDONLY); - igt_assert_lte(0, debug_fd); - file = fdopen(debug_fd, "r"); + file = igt_debugfs_fopen("i915_error_state", "r"); + igt_require(file); while (getline(&line, &line_size, file) > 0) { - char *dashes = NULL; - int bb_matched = 0; + char *dashes; uint32_t gtt_offset_upper, gtt_offset_lower; - uint64_t gtt_offset; - int req_matched = 0; - int requests; - uint32_t tail; - int ringbuf_matched = 0; - int i, items; + int matched; dashes = strstr(line, "---"); if (!dashes) continue; - ring_name = realloc(ring_name, dashes - line); - strncpy(ring_name, line, dashes - line); - ring_name[dashes - line - 1] = '\0'; - - bb_matched = sscanf(dashes, "--- gtt_offset = 0x%08x %08x\n", + matched = sscanf(dashes, "--- gtt_offset = 0x%08x %08x\n", >t_offset_upper, >t_offset_lower); - gtt_offset = ((uint64_t)gtt_offset_upper << 32) | gtt_offset_lower; - - if (bb_matched == 2) { - char expected_line[32]; - - igt_assert(strstr(ring_name, expected_ring_name)); + if (matched) { + char expected_line[64]; + uint64_t gtt_offset; + int i; + + strncpy(expected_line, line, dashes - line); + expected_line[dashes - line - 1] = '\0'; + igt_assert(strstr(expected_line, expected_ring_name)); + + gtt_offset = gtt_offset_upper; + if (matched == 2) { + gtt_offset <<= 32; + gtt_offset |= gtt_offset_lower; + } if (!uses_cmd_parser) - igt_assert(gtt_offset == expected_offset); + igt_assert_eq_u64(gtt_offset, expected_offset); - for (i = 0; i < sizeof(batch) / 4; i++) { + for (i = 0; i < 1024; i++) { igt_assert(getline(&line, &line_size, file) > 0); - snprintf(expected_line, sizeof(expected_line), "%08x : %08x", + snprintf(expected_line, sizeof(expected_line), + "%08x : %08x", 4*i, batch[i]); igt_assert(strstr(line, expected_line)); } - bb_ok = true; - continue; - } - - req_matched = sscanf(dashes, "--- %d requests\n", &requests); - if (req_matched == 1) { - igt_assert(strstr(ring_name, expected_ring_name)); - igt_assert_lt(0, requests); - - for (i = 0; i < requests; i++) { - uint32_t seqno; - long jiffies; - - igt_assert(getline(&line, &line_size, file) > 0); - items = sscanf(line, " seqno 0x%08x, emitted %ld, tail 0x%08x\n", - &seqno, &jiffies, &tail); - igt_assert_eq(items, 3); - } - req_ok = true; - continue; - } - - ringbuf_matched = sscanf(dashes, "--- ringbuffer = 0x%08x\n", - >t_offset_lower); - if (ringbuf_matched == 1) { - unsigned int offset, command, expected_addr = 0; - - if (!strstr(ring_name, expected_ring_name)) - continue; - igt_assert(req_ok); - - for (i = 0; i < tail / 4; i++) { - igt_assert(getline(&line, &line_size, file) > 0); - items = sscanf(line, "%08x : %08x\n", - &offset, &command); - igt_assert_eq(items, 2); - if ((command & 0x1F800000) == MI_BATCH_BUFFER_START) { - igt_assert(getline(&line, &line_size, file) > 0); - items = sscanf(line, "%08x : %08x\n", - &offset, &expected_addr); - igt_assert_eq(items, 2); - i++; - } - } - if (!uses_cmd_parser) { - if (gen >= 4) - igt_assert(expected_addr == expected_offset); - else - igt_assert((expected_addr & ~0x1) == expected_offset); - } - ringbuf_ok = true; - continue; - } - - if (bb_ok && req_ok && ringbuf_ok) break; + } } - igt_assert(bb_ok && req_ok && ringbuf_ok); free(line); - free(ring_name); - close(debug_fd); + fclose(file); } static bool uses_cmd_parser(int fd, int gen) @@ -357,7 +255,7 @@ if (rc || parser_version == 0) return false; - if (!gem_uses_aliasing_ppgtt(fd)) + if (!gem_uses_ppgtt(fd)) return false; if (gen != 7) @@ -373,31 +271,63 @@ uint64_t offset; bool cmd_parser; + fd = drm_open_driver(DRIVER_INTEL); + clear_error_state(); - fd = drm_open_driver(DRIVER_INTEL); gen = intel_gen(intel_get_drm_devid(fd)); cmd_parser = uses_cmd_parser(fd, gen); - offset = submit_batch(fd, ring_id, true); + offset = submit_hang(fd, ring_id); close(fd); check_error_state(gen, cmd_parser, ring_name, offset); } -static const struct target_ring { - const int id; - const char *short_name; - const char *full_name; -} rings[] = { - { I915_EXEC_RENDER, "render", "render ring" }, - { I915_EXEC_BSD, "bsd", "bsd ring" }, - { I915_EXEC_BLT, "blt", "blitter ring" }, - { I915_EXEC_VEBOX, "vebox", "video enhancement ring" }, -}; + +/* This test covers the case where we end up in an uninitialised area of the + * ppgtt and keep executing through it. This is particularly relevant if 48b + * ppgtt is enabled because the ppgtt is massively bigger compared to the 32b + * case and it takes a lot more time to wrap, so the acthd can potentially keep + * increasing for a long time + */ +#define NSEC_PER_SEC 1000000000L +static void hangcheck_unterminated(void) +{ + int fd; + /* timeout needs to be greater than ~5*hangcheck */ + int64_t timeout_ns = 100 * NSEC_PER_SEC; /* 100 seconds */ + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 gem_exec; + uint32_t handle; + + fd = drm_open_driver(DRIVER_INTEL); + igt_require(gem_uses_full_ppgtt(fd)); + igt_require_hang_ring(fd, 0); + + handle = gem_create(fd, 4096); + + memset(&gem_exec, 0, sizeof(gem_exec)); + gem_exec.handle = handle; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&gem_exec; + execbuf.buffer_count = 1; + + gem_execbuf(fd, &execbuf); + if (gem_wait(fd, handle, &timeout_ns) != 0) { + /* need to manually trigger an hang to clean before failing */ + igt_force_gpu_reset(); + igt_assert_f(0, "unterminated batch did not trigger an hang!"); + } + + close(fd); +} igt_main { + const struct intel_execution_engine *e; + igt_skip_on_simulation(); igt_subtest("error-state-debugfs-entry") @@ -412,8 +342,15 @@ igt_subtest("error-state-basic") test_error_state_basic(); - for (int i = 0; i < sizeof(rings)/sizeof(rings[0]); i++) { - igt_subtest_f("error-state-capture-%s", rings[i].short_name) - test_error_state_capture(rings[i].id, rings[i].full_name); + for (e = intel_execution_engines; e->name; e++) { + if (e->exec_id == 0) + continue; + + igt_subtest_f("error-state-capture-%s", e->name) + test_error_state_capture(e->exec_id | e->flags, + e->full_name); } + + igt_subtest("hangcheck-unterminated") + hangcheck_unterminated(); } diff -Nru intel-gpu-tools-1.13/tests/drv_missed_irq_hang intel-gpu-tools-1.14/tests/drv_missed_irq_hang --- intel-gpu-tools-1.13/tests/drv_missed_irq_hang 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/drv_missed_irq_hang 2016-03-01 15:59:21.000000000 +0000 @@ -19,20 +19,20 @@ function check_for_missed_irq { if test `cat i915_ring_missed_irq` = 0x00000000; then echo "missed interrupts undetected" - exit 1 + exit $IGT_EXIT_FAILURE fi } function check_for_hang { if cat i915_error_state | grep -v "no error state collected" > /dev/null ; then echo "gpu hang reported" - exit 2 + exit $IGT_EXIT_FAILURE fi } if [ ! -f i915_ring_missed_irq ] ; then echo "kernel doesn't support interrupt masking" - exit 77 + exit $IGT_EXIT_SKIP fi # clear error state first @@ -43,7 +43,7 @@ echo "Interrupts masked" if test `cat i915_ring_test_irq` != 0x0000000f; then echo "Failed to set interrupt mask" - exit 3 + exit $IGT_EXIT_FAILURE fi blt_wait @@ -57,7 +57,7 @@ echo "Interrupts unmasked" if test `cat i915_ring_test_irq` != 0x00000000; then echo "Failed to clear interrupt mask" - exit 3 + exit $IGT_EXIT_FAILURE fi blt_wait @@ -67,7 +67,7 @@ echo "Cleared missed interrupts" if test `cat i915_ring_missed_irq` != 0x00000000; then echo "Failed to clear missed interrupts" - exit 3 + exit $IGT_EXIT_FAILURE fi -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/drv_module_reload_basic intel-gpu-tools-1.14/tests/drv_module_reload_basic --- intel-gpu-tools-1.13/tests/drv_module_reload_basic 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tests/drv_module_reload_basic 2016-03-01 15:59:21.000000000 +0000 @@ -33,7 +33,7 @@ if lsmod | grep i915 &> /dev/null ; then echo WARNING: i915.ko still loaded! - exit 1 + exit $IGT_EXIT_FAILURE else echo module successfully unloaded fi @@ -48,13 +48,13 @@ echo "module successfully loaded again" else echo "failed to reload module successfully" - exit 2 + exit $IGT_EXIT_FAILURE fi # then try to run something if ! $SOURCE_DIR/gem_linear_blits --run-subtest basic > /dev/null ; then echo "failed to execute a simple batch after reload" - exit 3 + exit $IGT_EXIT_FAILURE fi -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/eviction_common.c intel-gpu-tools-1.14/tests/eviction_common.c --- intel-gpu-tools-1.13/tests/eviction_common.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/eviction_common.c 2016-03-01 15:59:21.000000000 +0000 @@ -31,14 +31,13 @@ #include -struct igt_eviction_test_ops -{ +struct igt_eviction_test_ops { uint32_t (*create)(int fd, uint64_t size); void (*flink)(uint32_t old_handle, uint32_t new_handle); void (*close)(int fd, uint32_t bo); int (*copy)(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int nr_bos); - void (*clear)(int fd, uint32_t bo, int size); + void (*clear)(int fd, uint32_t bo, uint64_t size); }; #define FORKING_EVICTIONS_INTERRUPTIBLE (1 << 0) @@ -58,11 +57,12 @@ } static int minor_evictions(int fd, struct igt_eviction_test_ops *ops, - int surface_size, int nr_surfaces) + uint64_t surface_size, + uint64_t nr_surfaces) { uint32_t *bo, *sel; - int n, m, pass, fail; - int total_surfaces; + uint64_t n, m, total_surfaces; + int pass, fail; /* Make sure nr_surfaces is not divisible by seven * to avoid duplicates in the selection loop below. @@ -102,11 +102,11 @@ } static int major_evictions(int fd, struct igt_eviction_test_ops *ops, - int surface_size, int nr_surfaces) + uint64_t surface_size, uint64_t nr_surfaces) { - int n, m, loop; + uint64_t n, m; uint32_t *bo; - int ret; + int ret, loop; intel_require_memory(nr_surfaces, surface_size, CHECK_RAM); @@ -130,10 +130,10 @@ } static void mlocked_evictions(int fd, struct igt_eviction_test_ops *ops, - int surface_size, - int surface_count) + uint64_t surface_size, + uint64_t surface_count) { - size_t sz, pin; + uint64_t sz, pin; void *locked; intel_require_memory(surface_count, surface_size, CHECK_RAM); @@ -142,10 +142,11 @@ pin = intel_get_avail_ram_mb(); pin *= 1024 * 1024; igt_require(pin > sz); - pin -= 3*sz/2; + pin -= sz; - igt_debug("Pinning [%ld, %ld] MiB\n", - (long)pin/(1024*1024), (long)(pin + sz)/(1024*1024)); + igt_debug("Pinning [%'lld, %'lld] MiB\n", + (long long)pin/(1024*1024), + (long long)(pin + sz)/(1024*1024)); locked = malloc(pin + sz); if (locked != NULL && mlock(locked, pin + sz)) { @@ -159,7 +160,8 @@ igt_fork(child, 1) { uint32_t *bo; - int n, ret; + uint64_t n; + int ret; bo = malloc(surface_count*sizeof(*bo)); igt_assert(bo); @@ -184,7 +186,7 @@ locked = malloc(surface_size); if (locked == NULL || mlock(locked, surface_size)) - exit(ENOSPC); + free(locked); } for (n = 0; n < surface_count; n++) @@ -195,12 +197,13 @@ } static int swapping_evictions(int fd, struct igt_eviction_test_ops *ops, - int surface_size, - int working_surfaces, - int trash_surfaces) + uint64_t surface_size, + uint64_t working_surfaces, + uint64_t trash_surfaces) { uint32_t *bo; - int i, n, pass, ret; + uint64_t i, n; + int pass, ret; intel_require_memory(working_surfaces, surface_size, CHECK_RAM); @@ -232,13 +235,15 @@ } static int forking_evictions(int fd, struct igt_eviction_test_ops *ops, - int surface_size, int working_surfaces, - int trash_surfaces, unsigned flags) + uint64_t surface_size, + uint64_t working_surfaces, + uint64_t trash_surfaces, + unsigned flags) { + const int num_threads = sysconf(_SC_NPROCESSORS_ONLN); + uint64_t bo_count, n, l; uint32_t *bo; - int n, pass, l, ret; - int num_threads = sysconf(_SC_NPROCESSORS_ONLN); - int bo_count; + int pass, ret; intel_require_memory(working_surfaces, surface_size, CHECK_RAM); diff -Nru intel-gpu-tools-1.13/tests/gem_bad_reloc.c intel-gpu-tools-1.14/tests/gem_bad_reloc.c --- intel-gpu-tools-1.13/tests/gem_bad_reloc.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_bad_reloc.c 2016-03-01 15:59:21.000000000 +0000 @@ -44,32 +44,6 @@ #define USE_LUT (1 << 12) -static uint64_t get_page_table_size(int fd) -{ - struct drm_i915_getparam gp; - int val = 0; - - memset(&gp, 0, sizeof(gp)); - gp.param = 18; /* HAS_ALIASING_PPGTT */ - gp.value = &val; - - if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp)) - return 0; - errno = 0; - - switch (val) { - case 0: - case 1: - return gem_aperture_size(fd); - case 2: - return 1ULL << 32; - case 3: - return 1ULL << 48; - } - - return 0; -} - /* Simulates SNA behaviour using negative self-relocations for * STATE_BASE_ADDRESS command packets. If they wrap around (to values greater * than the total size of the GTT), the GPU will hang. @@ -80,7 +54,7 @@ struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 gem_exec[2]; struct drm_i915_gem_relocation_entry gem_reloc[1000]; - uint64_t gtt_max = get_page_table_size(fd); + uint64_t gtt_max = gem_aperture_size(fd); uint32_t buf[1024] = {MI_BATCH_BUFFER_END}; int i; diff -Nru intel-gpu-tools-1.13/tests/gem_busy.c intel-gpu-tools-1.14/tests/gem_busy.c --- intel-gpu-tools-1.13/tests/gem_busy.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_busy.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,248 @@ +/* + * Copyright © 2016 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "igt.h" + +/* Exercise the busy-ioctl, ensuring the ABI is never broken */ +IGT_TEST_DESCRIPTION("Basic check of busy-ioctl ABI."); + +enum { TEST = 0, BUSY, BATCH }; + +static void __gem_busy(int fd, + uint32_t handle, + uint32_t *read, + uint32_t *write) +{ + struct drm_i915_gem_busy busy; + + memset(&busy, 0, sizeof(busy)); + busy.handle = handle; + + do_ioctl(fd, DRM_IOCTL_I915_GEM_BUSY, &busy); + + *write = busy.busy & 0xffff; + *read = busy.busy >> 16; +} + +static uint32_t busy_blt(int fd) +{ + const int gen = intel_gen(intel_get_drm_devid(fd)); + const int has_64bit_reloc = gen >= 8; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object[2]; + struct drm_i915_gem_relocation_entry reloc[200], *r; + uint32_t read, write; + uint32_t *map; + int factor = 100; + int i = 0; + + memset(object, 0, sizeof(object)); + object[0].handle = gem_create(fd, 1024*1024); + object[1].handle = gem_create(fd, 4096); + + r = memset(reloc, 0, sizeof(reloc)); + map = gem_mmap__cpu(fd, object[1].handle, 0, 4096, PROT_WRITE); + gem_set_domain(fd, object[1].handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + +#define COPY_BLT_CMD (2<<29|0x53<<22|0x6) +#define BLT_WRITE_ALPHA (1<<21) +#define BLT_WRITE_RGB (1<<20) + while (factor--) { + /* XY_SRC_COPY */ + map[i++] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB; + if (has_64bit_reloc) + map[i-1] += 2; + map[i++] = 0xcc << 16 | 1 << 25 | 1 << 24 | (4*1024); + map[i++] = 0; + map[i++] = 256 << 16 | 1024; + + r->offset = i * sizeof(uint32_t); + r->target_handle = object[0].handle; + r->read_domains = I915_GEM_DOMAIN_RENDER; + r->write_domain = I915_GEM_DOMAIN_RENDER; + r++; + map[i++] = 0; + if (has_64bit_reloc) + map[i++] = 0; + + map[i++] = 0; + map[i++] = 4096; + + r->offset = i * sizeof(uint32_t); + r->target_handle = object[0].handle; + r->read_domains = I915_GEM_DOMAIN_RENDER; + r->write_domain = 0; + r++; + map[i++] = 0; + if (has_64bit_reloc) + map[i++] = 0; + } + map[i++] = MI_BATCH_BUFFER_END; + igt_assert(i <= 4096/sizeof(uint32_t)); + igt_assert(r - reloc <= ARRAY_SIZE(reloc)); + munmap(map, 4096); + + object[1].relocs_ptr = (uintptr_t)reloc; + object[1].relocation_count = r - reloc; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (unsigned long)object; + execbuf.buffer_count = 2; + if (gen >= 6) + execbuf.flags = I915_EXEC_BLT; + gem_execbuf(fd, &execbuf); + + __gem_busy(fd, object[0].handle, &read, &write); + igt_assert_eq(read, 1 << write); + igt_assert_eq(write, gen >= 6 ? I915_EXEC_BLT : I915_EXEC_RENDER); + + igt_debug("Created busy handle %d\n", object[0].handle); + gem_close(fd, object[1].handle); + return object[0].handle; +} + +static bool exec_noop(int fd, + uint32_t *handles, + unsigned ring, + bool write) +{ + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 exec[3]; + + memset(exec, 0, sizeof(exec)); + exec[0].handle = handles[BUSY]; + exec[1].handle = handles[TEST]; + if (write) + exec[1].flags |= EXEC_OBJECT_WRITE; + exec[2].handle = handles[BATCH]; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)exec; + execbuf.buffer_count = 3; + execbuf.flags = ring; + igt_debug("Queuing handle for %s on ring %d\n", + write ? "writing" : "reading", ring & 0x7); + return __gem_execbuf(fd, &execbuf) == 0; +} + +static bool still_busy(int fd, uint32_t handle) +{ + uint32_t read, write; + __gem_busy(fd, handle, &read, &write); + return write; +} + +static void test_ring(int fd, unsigned ring, uint32_t flags) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + uint32_t handle[3]; + uint32_t read, write; + uint32_t active; + unsigned i; + + gem_require_ring(fd, ring | flags); + + handle[TEST] = gem_create(fd, 4096); + handle[BATCH] = gem_create(fd, 4096); + gem_write(fd, handle[BATCH], 0, &bbe, sizeof(bbe)); + + /* Create a long running batch which we can use to hog the GPU */ + handle[BUSY] = busy_blt(fd); + + /* Queue a batch after the busy, it should block and remain "busy" */ + igt_assert(exec_noop(fd, handle, ring | flags, false)); + igt_assert(still_busy(fd, handle[BUSY])); + __gem_busy(fd, handle[TEST], &read, &write); + igt_assert_eq(read, 1 << ring); + igt_assert_eq(write, 0); + + /* Requeue with a write */ + igt_assert(exec_noop(fd, handle, ring | flags, true)); + igt_assert(still_busy(fd, handle[BUSY])); + __gem_busy(fd, handle[TEST], &read, &write); + igt_assert_eq(read, 1 << ring); + igt_assert_eq(write, ring); + + /* Now queue it for a read across all available rings */ + active = 0; + for (i = I915_EXEC_RENDER; i <= I915_EXEC_VEBOX; i++) { + if (exec_noop(fd, handle, i | flags, false)) + active |= 1 << i; + } + igt_assert(still_busy(fd, handle[BUSY])); + __gem_busy(fd, handle[TEST], &read, &write); + igt_assert_eq(read, active); + igt_assert_eq(write, ring); /* from the earlier write */ + + /* Check that our long batch was long enough */ + igt_assert(still_busy(fd, handle[BUSY])); + + /* And make sure it becomes idle again */ + gem_sync(fd, handle[TEST]); + __gem_busy(fd, handle[TEST], &read, &write); + igt_assert_eq(read, 0); + igt_assert_eq(write, 0); + + for (i = TEST; i <= BATCH; i++) + gem_close(fd, handle[i]); +} + +static bool has_semaphores(int fd) +{ + struct drm_i915_getparam gp; + int val = -1; + + memset(&gp, 0, sizeof(gp)); + gp.param = I915_PARAM_HAS_SEMAPHORES; + gp.value = &val; + + drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); + errno = 0; + + return val > 0; +} + +igt_main +{ + const struct intel_execution_engine *e; + int fd = -1; + + igt_skip_on_simulation(); + + igt_fixture { + fd = drm_open_driver(DRIVER_INTEL); + igt_require(has_semaphores(fd)); + } + + for (e = intel_execution_engines; e->name; e++) { + if (e->exec_id == 0) /* default exec-id is purely symbolic */ + continue; + + igt_subtest_f("%s", e->name) + test_ring(fd, e->exec_id, e->flags); + } + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/gem_concurrent_all.c intel-gpu-tools-1.14/tests/gem_concurrent_all.c --- intel-gpu-tools-1.13/tests/gem_concurrent_all.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_concurrent_all.c 2016-03-01 15:59:21.000000000 +0000 @@ -54,8 +54,23 @@ " buffers."); int fd, devid, gen; -struct intel_batchbuffer *batch; int all; +int pass; + +struct buffers { + const struct access_mode *mode; + drm_intel_bufmgr *bufmgr; + struct intel_batchbuffer *batch; + drm_intel_bo **src, **dst; + drm_intel_bo *snoop, *spare; + uint32_t *tmp; + int width, height, size; + int count, num_buffers; +}; + +#define MIN_BUFFERS 3 + +static void blt_copy_bo(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *src); static void nop_release_bo(drm_intel_bo *bo) @@ -64,54 +79,126 @@ } static void -prw_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height) +prw_set_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) { - int size = width * height, i; - uint32_t *tmp; - - tmp = malloc(4*size); - if (tmp) { - for (i = 0; i < size; i++) - tmp[i] = val; - drm_intel_bo_subdata(bo, 0, 4*size, tmp); - free(tmp); - } else { - for (i = 0; i < size; i++) - drm_intel_bo_subdata(bo, 4*i, 4, &val); - } + for (int i = 0; i < b->size; i++) + b->tmp[i] = val; + drm_intel_bo_subdata(bo, 0, 4*b->size, b->tmp); } static void -prw_cmp_bo(drm_intel_bo *bo, uint32_t val, int width, int height, drm_intel_bo *tmp) +prw_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) { - int size = width * height, i; uint32_t *vaddr; - do_or_die(drm_intel_bo_map(tmp, true)); - do_or_die(drm_intel_bo_get_subdata(bo, 0, 4*size, tmp->virtual)); - vaddr = tmp->virtual; - for (i = 0; i < size; i++) + vaddr = b->tmp; + do_or_die(drm_intel_bo_get_subdata(bo, 0, 4*b->size, vaddr)); + for (int i = 0; i < b->size; i++) igt_assert_eq_u32(vaddr[i], val); - drm_intel_bo_unmap(tmp); +} + +#define pixel(y, width) ((y)*(width) + (((y) + pass)%(width))) + +static void +partial_set_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) +{ + for (int y = 0; y < b->height; y++) + do_or_die(drm_intel_bo_subdata(bo, 4*pixel(y, b->width), 4, &val)); +} + +static void +partial_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) +{ + for (int y = 0; y < b->height; y++) { + uint32_t buf; + do_or_die(drm_intel_bo_get_subdata(bo, 4*pixel(y, b->width), 4, &buf)); + igt_assert_eq_u32(buf, val); + } } static drm_intel_bo * -unmapped_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) +create_normal_bo(drm_intel_bufmgr *bufmgr, uint64_t size) { drm_intel_bo *bo; - bo = drm_intel_bo_alloc(bufmgr, "bo", 4*width*height, 0); + bo = drm_intel_bo_alloc(bufmgr, "bo", size, 0); igt_assert(bo); return bo; } +static bool can_create_normal(void) +{ + return true; +} + static drm_intel_bo * -snoop_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) +create_private_bo(drm_intel_bufmgr *bufmgr, uint64_t size) { drm_intel_bo *bo; + uint32_t handle; - igt_skip_on(gem_has_llc(fd)); + /* XXX gem_create_with_flags(fd, size, I915_CREATE_PRIVATE); */ + + handle = gem_create(fd, size); + bo = gem_handle_to_libdrm_bo(bufmgr, fd, "stolen", handle); + gem_close(fd, handle); + + return bo; +} + +static bool can_create_private(void) +{ + return false; +} + +static drm_intel_bo * +create_stolen_bo(drm_intel_bufmgr *bufmgr, uint64_t size) +{ + drm_intel_bo *bo; + uint32_t handle; + + /* XXX gem_create_with_flags(fd, size, I915_CREATE_STOLEN); */ + + handle = gem_create(fd, size); + bo = gem_handle_to_libdrm_bo(bufmgr, fd, "stolen", handle); + gem_close(fd, handle); + + return bo; +} + +static bool can_create_stolen(void) +{ + /* XXX check num_buffers against available stolen */ + return false; +} + +static drm_intel_bo * +(*create_func)(drm_intel_bufmgr *bufmgr, uint64_t size); + +static bool create_cpu_require(void) +{ + return create_func != create_stolen_bo; +} + +static drm_intel_bo * +unmapped_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) +{ + return create_func(bufmgr, (uint64_t)4*width*height); +} + +static bool create_snoop_require(void) +{ + if (!create_cpu_require()) + return false; + + return !gem_has_llc(fd); +} + +static drm_intel_bo * +snoop_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) +{ + drm_intel_bo *bo; bo = unmapped_create_bo(bufmgr, width, height); gem_set_caching(fd, bo->handle, I915_CACHING_CACHED); @@ -120,11 +207,204 @@ return bo; } +static bool create_userptr_require(void) +{ + static int found = -1; + if (found < 0) { + struct drm_i915_gem_userptr arg; + + found = 0; + + memset(&arg, 0, sizeof(arg)); + arg.user_ptr = -4096ULL; + arg.user_size = 8192; + errno = 0; + drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &arg); + if (errno == EFAULT) { + igt_assert(posix_memalign((void **)&arg.user_ptr, + 4096, arg.user_size) == 0); + found = drmIoctl(fd, + LOCAL_IOCTL_I915_GEM_USERPTR, + &arg) == 0; + free((void *)(uintptr_t)arg.user_ptr); + } + + } + return found; +} + +static drm_intel_bo * +userptr_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) +{ + struct local_i915_gem_userptr userptr; + drm_intel_bo *bo; + void *ptr; + + memset(&userptr, 0, sizeof(userptr)); + userptr.user_size = width * height * 4; + userptr.user_size = (userptr.user_size + 4095) & -4096; + + ptr = mmap(NULL, userptr.user_size, + PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); + igt_assert(ptr != (void *)-1); + userptr.user_ptr = (uintptr_t)ptr; + + do_or_die(drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr)); + bo = gem_handle_to_libdrm_bo(bufmgr, fd, "userptr", userptr.handle); + bo->virtual = (void *)(uintptr_t)userptr.user_ptr; + gem_close(fd, userptr.handle); + + return bo; +} + static void -gtt_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height) +userptr_set_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) { + int size = b->size; uint32_t *vaddr = bo->virtual; - int size = width * height; + + gem_set_domain(fd, bo->handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + while (size--) + *vaddr++ = val; +} + +static void +userptr_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) +{ + int size = b->size; + uint32_t *vaddr = bo->virtual; + + gem_set_domain(fd, bo->handle, + I915_GEM_DOMAIN_CPU, 0); + while (size--) + igt_assert_eq_u32(*vaddr++, val); +} + +static void +userptr_release_bo(drm_intel_bo *bo) +{ + igt_assert(bo->virtual); + + munmap(bo->virtual, bo->size); + bo->virtual = NULL; + + drm_intel_bo_unreference(bo); +} + +static bool create_dmabuf_require(void) +{ + static int found = -1; + if (found < 0) { + struct drm_prime_handle args; + void *ptr; + + memset(&args, 0, sizeof(args)); + args.handle = gem_create(fd, 4096); + args.flags = DRM_RDWR; + args.fd = -1; + + drmIoctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); + gem_close(fd, args.handle); + + found = 0; + ptr = mmap(NULL, 4096, PROT_READ, MAP_SHARED, args.fd, 0); + if (ptr != MAP_FAILED) { + found = 1; + munmap(ptr, 4096); + } + + close(args.fd); + } + return found; +} + +struct dmabuf { + int fd; + void *map; +}; + +static drm_intel_bo * +dmabuf_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) +{ + struct drm_prime_handle args; + drm_intel_bo *bo; + struct dmabuf *dmabuf; + int size; + + size = 4*width*height; + size = (size + 4095) & -4096; + + memset(&args, 0, sizeof(args)); + args.handle = gem_create(fd, size); + args.flags = DRM_RDWR; + args.fd = -1; + + do_ioctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); + gem_close(fd, args.handle); + + bo = drm_intel_bo_gem_create_from_prime(bufmgr, args.fd, size); + igt_assert(bo); + + dmabuf = malloc(sizeof(*dmabuf)); + igt_assert(dmabuf); + + dmabuf->fd = args.fd; + dmabuf->map = mmap(NULL, size, + PROT_READ | PROT_WRITE, MAP_SHARED, + dmabuf->fd, 0); + igt_assert(dmabuf->map != (void *)-1); + + bo->virtual = dmabuf; + + return bo; +} + +static void +dmabuf_set_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) +{ + struct dmabuf *dmabuf = bo->virtual; + uint32_t *v; + int size; + + prime_sync_start(dmabuf->fd, true); + for (v = dmabuf->map, size = b->size; size--; v++) + *v = val; + prime_sync_end(dmabuf->fd, true); +} + +static void +dmabuf_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) +{ + struct dmabuf *dmabuf = bo->virtual; + uint32_t *v; + int size; + + prime_sync_start(dmabuf->fd, false); + for (v = dmabuf->map, size = b->size; size--; v++) + igt_assert_eq_u32(*v, val); + prime_sync_end(dmabuf->fd, false); +} + +static void +dmabuf_release_bo(drm_intel_bo *bo) +{ + struct dmabuf *dmabuf = bo->virtual; + igt_assert(dmabuf); + + munmap(dmabuf->map, bo->size); + close(dmabuf->fd); + free(dmabuf); + + bo->virtual = NULL; + drm_intel_bo_unreference(bo); +} + +static void +gtt_set_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) +{ + uint32_t *vaddr = bo->virtual; + int size = b->size; drm_intel_gem_bo_start_gtt_access(bo, true); while (size--) @@ -132,15 +412,14 @@ } static void -gtt_cmp_bo(drm_intel_bo *bo, uint32_t val, int width, int height, drm_intel_bo *tmp) +gtt_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) { uint32_t *vaddr = bo->virtual; - int y; /* GTT access is slow. So we just compare a few points */ drm_intel_gem_bo_start_gtt_access(bo, false); - for (y = 0; y < height; y++) - igt_assert_eq_u32(vaddr[y*width+y], val); + for (int y = 0; y < b->height; y++) + igt_assert_eq_u32(vaddr[pixel(y, b->width)], val); } static drm_intel_bo * @@ -192,6 +471,8 @@ static void wc_release_bo(drm_intel_bo *bo) { + igt_assert(bo->virtual); + munmap(bo->virtual, bo->size); bo->virtual = NULL; @@ -204,7 +485,6 @@ return unmapped_create_bo(bufmgr, width, height); } - static drm_intel_bo * gpuX_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) { @@ -212,9 +492,9 @@ } static void -cpu_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height) +cpu_set_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) { - int size = width * height; + int size = b->size; uint32_t *vaddr; do_or_die(drm_intel_bo_map(bo, true)); @@ -225,9 +505,9 @@ } static void -cpu_cmp_bo(drm_intel_bo *bo, uint32_t val, int width, int height, drm_intel_bo *tmp) +cpu_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) { - int size = width * height; + int size = b->size; uint32_t *vaddr; do_or_die(drm_intel_bo_map(bo, false)); @@ -238,13 +518,11 @@ } static void -gpu_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height) +gpu_set_bo(struct buffers *buffers, drm_intel_bo *bo, uint32_t val) { struct drm_i915_gem_relocation_entry reloc[1]; struct drm_i915_gem_exec_object2 gem_exec[2]; struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_pwrite gem_pwrite; - struct drm_i915_gem_create create; uint32_t buf[10], *b; uint32_t tiling, swizzle; @@ -260,12 +538,12 @@ COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB; if (gen >= 4 && tiling) { b[-1] |= XY_COLOR_BLT_TILED; - *b = width; + *b = buffers->width; } else - *b = width << 2; + *b = buffers->width << 2; *b++ |= 0xf0 << 16 | 1 << 25 | 1 << 24; *b++ = 0; - *b++ = height << 16 | width; + *b++ = buffers->height << 16 | buffers->width; reloc[0].offset = (b - buf) * sizeof(uint32_t); reloc[0].target_handle = bo->handle; reloc[0].read_domains = I915_GEM_DOMAIN_RENDER; @@ -281,10 +559,7 @@ gem_exec[0].handle = bo->handle; gem_exec[0].flags = EXEC_OBJECT_NEEDS_FENCE; - create.handle = 0; - create.size = 4096; - drmIoctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create); - gem_exec[1].handle = create.handle; + gem_exec[1].handle = gem_create(fd, 4096); gem_exec[1].relocation_count = 1; gem_exec[1].relocs_ptr = (uintptr_t)reloc; @@ -294,30 +569,24 @@ if (gen >= 6) execbuf.flags = I915_EXEC_BLT; - gem_pwrite.handle = gem_exec[1].handle; - gem_pwrite.offset = 0; - gem_pwrite.size = execbuf.batch_len; - gem_pwrite.data_ptr = (uintptr_t)buf; - do_ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &gem_pwrite); - do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); + gem_write(fd, gem_exec[1].handle, 0, buf, execbuf.batch_len); + gem_execbuf(fd, &execbuf); - drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &create.handle); + gem_close(fd, gem_exec[1].handle); } static void -gpu_cmp_bo(drm_intel_bo *bo, uint32_t val, int width, int height, drm_intel_bo *tmp) +gpu_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val) { - intel_blt_copy(batch, - bo, 0, 0, 4*width, - tmp, 0, 0, 4*width, - width, height, 32); - cpu_cmp_bo(tmp, val, width, height, NULL); + blt_copy_bo(b, b->snoop, bo); + cpu_cmp_bo(b, b->snoop, val); } const struct access_mode { const char *name; - void (*set_bo)(drm_intel_bo *bo, uint32_t val, int w, int h); - void (*cmp_bo)(drm_intel_bo *bo, uint32_t val, int w, int h, drm_intel_bo *tmp); + bool (*require)(void); + void (*set_bo)(struct buffers *b, drm_intel_bo *bo, uint32_t val); + void (*cmp_bo)(struct buffers *b, drm_intel_bo *bo, uint32_t val); drm_intel_bo *(*create_bo)(drm_intel_bufmgr *bufmgr, int width, int height); void (*release_bo)(drm_intel_bo *bo); } access_modes[] = { @@ -329,7 +598,15 @@ .release_bo = nop_release_bo, }, { + .name = "partial", + .set_bo = partial_set_bo, + .cmp_bo = partial_cmp_bo, + .create_bo = unmapped_create_bo, + .release_bo = nop_release_bo, + }, + { .name = "cpu", + .require = create_cpu_require, .set_bo = cpu_set_bo, .cmp_bo = cpu_cmp_bo, .create_bo = unmapped_create_bo, @@ -337,12 +614,29 @@ }, { .name = "snoop", + .require = create_snoop_require, .set_bo = cpu_set_bo, .cmp_bo = cpu_cmp_bo, .create_bo = snoop_create_bo, .release_bo = nop_release_bo, }, { + .name = "userptr", + .require = create_userptr_require, + .set_bo = userptr_set_bo, + .cmp_bo = userptr_cmp_bo, + .create_bo = userptr_create_bo, + .release_bo = userptr_release_bo, + }, + { + .name = "dmabuf", + .require = create_dmabuf_require, + .set_bo = dmabuf_set_bo, + .cmp_bo = dmabuf_cmp_bo, + .create_bo = dmabuf_create_bo, + .release_bo = dmabuf_release_bo, + }, + { .name = "gtt", .set_bo = gtt_set_bo, .cmp_bo = gtt_cmp_bo, @@ -379,53 +673,61 @@ }, }; -#define MAX_NUM_BUFFERS 1024 -int num_buffers = MAX_NUM_BUFFERS; -const int width = 512, height = 512; igt_render_copyfunc_t rendercopy; -struct buffers { - const struct access_mode *mode; - drm_intel_bufmgr *bufmgr; - drm_intel_bo *src[MAX_NUM_BUFFERS], *dst[MAX_NUM_BUFFERS]; - drm_intel_bo *dummy, *spare; - int count; -}; - -static void *buffers_init(struct buffers *data, - const struct access_mode *mode, - int _fd) +static void buffers_init(struct buffers *data, + const struct access_mode *mode, + int num_buffers, + int width, int height, + int _fd, int enable_reuse) { + memset(data, 0, sizeof(*data)); data->mode = mode; + data->num_buffers = num_buffers; data->count = 0; + data->width = width; + data->height = height; + data->size = width * height; + data->tmp = malloc(4*data->size); + igt_assert(data->tmp); + data->bufmgr = drm_intel_bufmgr_gem_init(_fd, 4096); igt_assert(data->bufmgr); - drm_intel_bufmgr_gem_enable_reuse(data->bufmgr); - return intel_batchbuffer_alloc(data->bufmgr, devid); + data->src = malloc(2*sizeof(drm_intel_bo *)*num_buffers); + igt_assert(data->src); + data->dst = data->src + num_buffers; + + if (enable_reuse) + drm_intel_bufmgr_gem_enable_reuse(data->bufmgr); + data->batch = intel_batchbuffer_alloc(data->bufmgr, devid); + igt_assert(data->batch); } static void buffers_destroy(struct buffers *data) { - if (data->count == 0) + int count = data->count; + if (count == 0) return; - for (int i = 0; i < data->count; i++) { + for (int i = 0; i < count; i++) { data->mode->release_bo(data->src[i]); data->mode->release_bo(data->dst[i]); } - data->mode->release_bo(data->dummy); + nop_release_bo(data->snoop); data->mode->release_bo(data->spare); data->count = 0; } -static void buffers_create(struct buffers *data, - int count) +static void buffers_create(struct buffers *data) { + int count = data->num_buffers; + int width = data->width, height = data->height; igt_assert(data->bufmgr); buffers_destroy(data); + igt_assert(data->count == 0); for (int i = 0; i < count; i++) { data->src[i] = @@ -433,8 +735,8 @@ data->dst[i] = data->mode->create_bo(data->bufmgr, width, height); } - data->dummy = data->mode->create_bo(data->bufmgr, width, height); data->spare = data->mode->create_bo(data->bufmgr, width, height); + data->snoop = snoop_create_bo(data->bufmgr, width, height); data->count = count; } @@ -445,49 +747,53 @@ buffers_destroy(data); - intel_batchbuffer_free(batch); + free(data->tmp); + free(data->src); + + intel_batchbuffer_free(data->batch); drm_intel_bufmgr_destroy(data->bufmgr); - data->bufmgr = NULL; + + memset(data, 0, sizeof(*data)); } -typedef void (*do_copy)(drm_intel_bo *dst, drm_intel_bo *src); +typedef void (*do_copy)(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *src); typedef struct igt_hang_ring (*do_hang)(void); -static void render_copy_bo(drm_intel_bo *dst, drm_intel_bo *src) +static void render_copy_bo(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *src) { struct igt_buf d = { .bo = dst, - .size = width * height * 4, - .num_tiles = width * height * 4, - .stride = width * 4, + .size = b->size * 4, + .num_tiles = b->size * 4, + .stride = b->width * 4, }, s = { .bo = src, - .size = width * height * 4, - .num_tiles = width * height * 4, - .stride = width * 4, + .size = b->size * 4, + .num_tiles = b->size * 4, + .stride = b->width * 4, }; uint32_t swizzle; drm_intel_bo_get_tiling(dst, &d.tiling, &swizzle); drm_intel_bo_get_tiling(src, &s.tiling, &swizzle); - rendercopy(batch, NULL, + rendercopy(b->batch, NULL, &s, 0, 0, - width, height, + b->width, b->height, &d, 0, 0); } -static void blt_copy_bo(drm_intel_bo *dst, drm_intel_bo *src) +static void blt_copy_bo(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *src) { - intel_blt_copy(batch, - src, 0, 0, 4*width, - dst, 0, 0, 4*width, - width, height, 32); + intel_blt_copy(b->batch, + src, 0, 0, 4*b->width, + dst, 0, 0, 4*b->width, + b->width, b->height, 32); } -static void cpu_copy_bo(drm_intel_bo *dst, drm_intel_bo *src) +static void cpu_copy_bo(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *src) { - const int size = width * height * sizeof(uint32_t); + const int size = b->size * sizeof(uint32_t); void *d, *s; gem_set_domain(fd, src->handle, I915_GEM_DOMAIN_CPU, 0); @@ -501,9 +807,9 @@ munmap(s, size); } -static void gtt_copy_bo(drm_intel_bo *dst, drm_intel_bo *src) +static void gtt_copy_bo(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *src) { - const int size = width * height * sizeof(uint32_t); + const int size = b->size * sizeof(uint32_t); void *d, *s; gem_set_domain(fd, src->handle, I915_GEM_DOMAIN_GTT, 0); @@ -518,9 +824,9 @@ munmap(s, size); } -static void wc_copy_bo(drm_intel_bo *dst, drm_intel_bo *src) +static void wc_copy_bo(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *src) { - const int size = width * height * sizeof(uint32_t); + const int size = b->width * sizeof(uint32_t); void *d, *s; gem_set_domain(fd, src->handle, I915_GEM_DOMAIN_GTT, 0); @@ -550,9 +856,67 @@ return igt_hang_ring(fd, I915_EXEC_RENDER); } -static void hang_require(void) +static void do_basic0(struct buffers *buffers, + do_copy do_copy_func, + do_hang do_hang_func) +{ + gem_quiescent_gpu(fd); + + buffers->mode->set_bo(buffers, buffers->src[0], 0xdeadbeef); + for (int i = 0; i < buffers->count; i++) { + struct igt_hang_ring hang = do_hang_func(); + + do_copy_func(buffers, buffers->dst[i], buffers->src[0]); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xdeadbeef); + + igt_post_hang_ring(fd, hang); + } +} + +static void do_basic1(struct buffers *buffers, + do_copy do_copy_func, + do_hang do_hang_func) { - igt_require_hang_ring(fd, -1); + gem_quiescent_gpu(fd); + + for (int i = 0; i < buffers->count; i++) { + struct igt_hang_ring hang = do_hang_func(); + + buffers->mode->set_bo(buffers, buffers->src[i], i); + buffers->mode->set_bo(buffers, buffers->dst[i], ~i); + + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); + usleep(0); /* let someone else claim the mutex */ + buffers->mode->cmp_bo(buffers, buffers->dst[i], i); + + igt_post_hang_ring(fd, hang); + } +} + +static void do_basicN(struct buffers *buffers, + do_copy do_copy_func, + do_hang do_hang_func) +{ + struct igt_hang_ring hang; + + gem_quiescent_gpu(fd); + + for (int i = 0; i < buffers->count; i++) { + buffers->mode->set_bo(buffers, buffers->src[i], i); + buffers->mode->set_bo(buffers, buffers->dst[i], ~i); + } + + hang = do_hang_func(); + + for (int i = 0; i < buffers->count; i++) { + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); + usleep(0); /* let someone else claim the mutex */ + } + + for (int i = 0; i < buffers->count; i++) + buffers->mode->cmp_bo(buffers, buffers->dst[i], i); + + igt_post_hang_ring(fd, hang); } static void do_overwrite_source(struct buffers *buffers, @@ -564,16 +928,16 @@ gem_quiescent_gpu(fd); for (i = 0; i < buffers->count; i++) { - buffers->mode->set_bo(buffers->src[i], i, width, height); - buffers->mode->set_bo(buffers->dst[i], ~i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], i); + buffers->mode->set_bo(buffers, buffers->dst[i], ~i); } for (i = 0; i < buffers->count; i++) - do_copy_func(buffers->dst[i], buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); hang = do_hang_func(); for (i = buffers->count; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef); for (i = 0; i < buffers->count; i++) - buffers->mode->cmp_bo(buffers->dst[i], i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], i); igt_post_hang_ring(fd, hang); } @@ -588,23 +952,23 @@ gem_quiescent_gpu(fd); for (i = 0; i < half; i++) { - buffers->mode->set_bo(buffers->src[i], i, width, height); - buffers->mode->set_bo(buffers->dst[i], ~i, width, height); - buffers->mode->set_bo(buffers->dst[i+half], ~i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], i); + buffers->mode->set_bo(buffers, buffers->dst[i], ~i); + buffers->mode->set_bo(buffers, buffers->dst[i+half], ~i); } for (i = 0; i < half; i++) { - do_copy_func(buffers->dst[i], buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); if (do_rcs) - render_copy_bo(buffers->dst[i+half], buffers->src[i]); + render_copy_bo(buffers, buffers->dst[i+half], buffers->src[i]); else - blt_copy_bo(buffers->dst[i+half], buffers->src[i]); + blt_copy_bo(buffers, buffers->dst[i+half], buffers->src[i]); } hang = do_hang_func(); for (i = half; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef); for (i = 0; i < half; i++) { - buffers->mode->cmp_bo(buffers->dst[i], i, width, height, buffers->dummy); - buffers->mode->cmp_bo(buffers->dst[i+half], i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], i); + buffers->mode->cmp_bo(buffers, buffers->dst[i+half], i); } igt_post_hang_ring(fd, hang); } @@ -632,16 +996,16 @@ gem_quiescent_gpu(fd); for (i = 0; i < buffers->count; i++) { - buffers->mode->set_bo(buffers->src[i], i, width, height); - buffers->mode->set_bo(buffers->dst[i], ~i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], i); + buffers->mode->set_bo(buffers, buffers->dst[i], ~i); } for (i = 0; i < buffers->count; i++) - do_copy_func(buffers->dst[i], buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); hang = do_hang_func(); for (i = 0; i < buffers->count; i++) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef); for (i = buffers->count; i--; ) - buffers->mode->cmp_bo(buffers->dst[i], i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], i); igt_post_hang_ring(fd, hang); } @@ -652,12 +1016,12 @@ struct igt_hang_ring hang; gem_quiescent_gpu(fd); - buffers->mode->set_bo(buffers->src[0], 0, width, height); - buffers->mode->set_bo(buffers->dst[0], ~0, width, height); - do_copy_func(buffers->dst[0], buffers->src[0]); + buffers->mode->set_bo(buffers, buffers->src[0], 0); + buffers->mode->set_bo(buffers, buffers->dst[0], ~0); + do_copy_func(buffers, buffers->dst[0], buffers->src[0]); hang = do_hang_func(); - buffers->mode->set_bo(buffers->src[0], 0xdeadbeef, width, height); - buffers->mode->cmp_bo(buffers->dst[0], 0, width, height, buffers->dummy); + buffers->mode->set_bo(buffers, buffers->src[0], 0xdeadbeef); + buffers->mode->cmp_bo(buffers, buffers->dst[0], 0); igt_post_hang_ring(fd, hang); } @@ -672,27 +1036,27 @@ gem_quiescent_gpu(fd); for (i = 0; i < buffers->count; i++) { - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef^~i, width, height); - buffers->mode->set_bo(buffers->dst[i], i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef^~i); + buffers->mode->set_bo(buffers, buffers->dst[i], i); } for (i = 0; i < half; i++) { if (do_rcs == 1 || (do_rcs == -1 && i & 1)) - render_copy_bo(buffers->dst[i], buffers->src[i]); + render_copy_bo(buffers, buffers->dst[i], buffers->src[i]); else - blt_copy_bo(buffers->dst[i], buffers->src[i]); + blt_copy_bo(buffers, buffers->dst[i], buffers->src[i]); - do_copy_func(buffers->dst[i+half], buffers->src[i]); + do_copy_func(buffers, buffers->dst[i+half], buffers->src[i]); if (do_rcs == 1 || (do_rcs == -1 && (i & 1) == 0)) - render_copy_bo(buffers->dst[i], buffers->dst[i+half]); + render_copy_bo(buffers, buffers->dst[i], buffers->dst[i+half]); else - blt_copy_bo(buffers->dst[i], buffers->dst[i+half]); + blt_copy_bo(buffers, buffers->dst[i], buffers->dst[i+half]); - do_copy_func(buffers->dst[i+half], buffers->src[i+half]); + do_copy_func(buffers, buffers->dst[i+half], buffers->src[i+half]); } hang = do_hang_func(); for (i = 0; i < 2*half; i++) - buffers->mode->cmp_bo(buffers->dst[i], 0xdeadbeef^~i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xdeadbeef^~i); igt_post_hang_ring(fd, hang); } @@ -726,12 +1090,12 @@ gem_quiescent_gpu(fd); for (i = buffers->count; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef); for (i = 0; i < buffers->count; i++) - do_copy_func(buffers->dst[i], buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); hang = do_hang_func(); for (i = buffers->count; i--; ) - buffers->mode->cmp_bo(buffers->dst[i], 0xdeadbeef, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xdeadbeef); igt_post_hang_ring(fd, hang); } @@ -744,15 +1108,15 @@ gem_quiescent_gpu(fd); for (i = buffers->count; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef ^ i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef ^ i); for (i = 0; i < buffers->count; i++) { - do_copy_func(buffers->dst[i], buffers->src[i]); - blt_copy_bo(buffers->spare, buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); + blt_copy_bo(buffers, buffers->spare, buffers->src[i]); } - cpu_cmp_bo(buffers->spare, 0xdeadbeef^(buffers->count-1), width, height, NULL); + buffers->mode->cmp_bo(buffers, buffers->spare, 0xdeadbeef^(buffers->count-1)); hang = do_hang_func(); for (i = buffers->count; i--; ) - buffers->mode->cmp_bo(buffers->dst[i], 0xdeadbeef ^ i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xdeadbeef ^ i); igt_post_hang_ring(fd, hang); } @@ -765,14 +1129,14 @@ gem_quiescent_gpu(fd); for (i = buffers->count; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef ^ i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef ^ i); for (i = 0; i < buffers->count; i++) { - blt_copy_bo(buffers->spare, buffers->src[i]); - do_copy_func(buffers->dst[i], buffers->spare); + blt_copy_bo(buffers, buffers->spare, buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->spare); } hang = do_hang_func(); for (i = buffers->count; i--; ) - buffers->mode->cmp_bo(buffers->dst[i], 0xdeadbeef ^ i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xdeadbeef ^ i); igt_post_hang_ring(fd, hang); } @@ -785,15 +1149,15 @@ gem_quiescent_gpu(fd); for (i = buffers->count; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef ^ i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef ^ i); for (i = 0; i < buffers->count; i++) { - do_copy_func(buffers->dst[i], buffers->src[i]); - render_copy_bo(buffers->spare, buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); + render_copy_bo(buffers, buffers->spare, buffers->src[i]); } - cpu_cmp_bo(buffers->spare, 0xdeadbeef^(buffers->count-1), width, height, NULL); + buffers->mode->cmp_bo(buffers, buffers->spare, 0xdeadbeef^(buffers->count-1)); hang = do_hang_func(); for (i = buffers->count; i--; ) - buffers->mode->cmp_bo(buffers->dst[i], 0xdeadbeef ^ i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xdeadbeef ^ i); igt_post_hang_ring(fd, hang); } @@ -806,14 +1170,14 @@ gem_quiescent_gpu(fd); for (i = buffers->count; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xdeadbeef ^ i, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xdeadbeef ^ i); for (i = 0; i < buffers->count; i++) { - render_copy_bo(buffers->spare, buffers->src[i]); - do_copy_func(buffers->dst[i], buffers->spare); + render_copy_bo(buffers, buffers->spare, buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->spare); } hang = do_hang_func(); for (i = buffers->count; i--; ) - buffers->mode->cmp_bo(buffers->dst[i], 0xdeadbeef ^ i, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xdeadbeef ^ i); igt_post_hang_ring(fd, hang); } @@ -826,14 +1190,14 @@ gem_quiescent_gpu(fd); for (i = buffers->count; i--; ) - buffers->mode->set_bo(buffers->src[i], 0xabcdabcd, width, height); + buffers->mode->set_bo(buffers, buffers->src[i], 0xabcdabcd); for (i = 0; i < buffers->count; i++) - do_copy_func(buffers->dst[i], buffers->src[i]); + do_copy_func(buffers, buffers->dst[i], buffers->src[i]); for (i = buffers->count; i--; ) - do_copy_func(buffers->dummy, buffers->dst[i]); + do_copy_func(buffers, buffers->spare, buffers->dst[i]); hang = do_hang_func(); for (i = buffers->count; i--; ) - buffers->mode->cmp_bo(buffers->dst[i], 0xabcdabcd, width, height, buffers->dummy); + buffers->mode->cmp_bo(buffers, buffers->dst[i], 0xabcdabcd); igt_post_hang_ring(fd, hang); } @@ -852,6 +1216,7 @@ do_hang do_hang_func) { do_test_func(buffers, do_copy_func, do_hang_func); + igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); } static void run_interruptible(struct buffers *buffers, @@ -859,39 +1224,73 @@ do_copy do_copy_func, do_hang do_hang_func) { - int loop; + for (pass = 0; pass < 10; pass++) + do_test_func(buffers, do_copy_func, do_hang_func); + pass = 0; + igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); +} + +static void run_child(struct buffers *buffers, + do_test do_test_func, + do_copy do_copy_func, + do_hang do_hang_func) - for (loop = 0; loop < 10; loop++) +{ + /* We inherit the buffers from the parent, but the bufmgr/batch + * needs to be local as the cache of reusable itself will be COWed, + * leading to the child closing an object without the parent knowing. + */ + igt_fork(child, 1) do_test_func(buffers, do_copy_func, do_hang_func); + igt_waitchildren(); + igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); } -static void run_forked(struct buffers *buffers, - do_test do_test_func, - do_copy do_copy_func, - do_hang do_hang_func) +static void __run_forked(struct buffers *buffers, + int num_children, int loops, + do_test do_test_func, + do_copy do_copy_func, + do_hang do_hang_func) + { - const int old_num_buffers = num_buffers; + int _num_buffers = buffers->num_buffers; - num_buffers /= 16; - num_buffers += 2; + _num_buffers /= num_children; + _num_buffers += MIN_BUFFERS; - igt_fork(child, 16) { + igt_fork(child, num_children) { /* recreate process local variables */ - buffers->count = 0; fd = drm_open_driver(DRIVER_INTEL); + buffers_init(buffers, buffers->mode, _num_buffers, + buffers->width, buffers->height, + fd, true); - batch = buffers_init(buffers, buffers->mode, fd); - - buffers_create(buffers, num_buffers); - for (int loop = 0; loop < 10; loop++) + buffers_create(buffers); + for (pass = 0; pass < loops; pass++) do_test_func(buffers, do_copy_func, do_hang_func); - - buffers_fini(buffers); + pass = 0; } igt_waitchildren(); + igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); +} - num_buffers = old_num_buffers; +static void run_forked(struct buffers *buffers, + do_test do_test_func, + do_copy do_copy_func, + do_hang do_hang_func) +{ + __run_forked(buffers, sysconf(_SC_NPROCESSORS_ONLN), 10, + do_test_func, do_copy_func, do_hang_func); +} + +static void run_bomb(struct buffers *buffers, + do_test do_test_func, + do_copy do_copy_func, + do_hang do_hang_func) +{ + __run_forked(buffers, 8*sysconf(_SC_NPROCESSORS_ONLN), 10, + do_test_func, do_copy_func, do_hang_func); } static void bit17_require(void) @@ -937,12 +1336,10 @@ igt_require(rendercopy); } -static void no_require(void) -{ -} - static void -run_basic_modes(const struct access_mode *mode, +run_basic_modes(const char *prefix, + const struct access_mode *mode, + const int num_buffers, const char *suffix, run_wrap run_wrap_func) { @@ -961,184 +1358,217 @@ const struct { const char *suffix; do_hang hang; - void (*require)(void); } hangs[] = { - { "", no_hang, no_require }, - { "-hang-blt", bcs_hang, hang_require }, - { "-hang-render", rcs_hang, hang_require }, + { "", no_hang }, + { "-hang-blt", bcs_hang }, + { "-hang-render", rcs_hang }, { NULL, NULL }, }, *h; - struct buffers buffers; for (h = hangs; h->suffix; h++) { if (!all && *h->suffix) continue; for (p = all ? pipelines : pskip; p->prefix; p++) { - igt_fixture { - batch = buffers_init(&buffers, mode, fd); + struct buffers buffers; + + igt_fixture + buffers_init(&buffers, mode, num_buffers, + 512, 512, fd, + run_wrap_func != run_child); + + igt_subtest_f("%s-%s-%s-sanitycheck0%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { + p->require(); + buffers_create(&buffers); + run_wrap_func(&buffers, do_basic0, + p->copy, h->hang); + } + + igt_subtest_f("%s-%s-%s-sanitycheck1%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { + p->require(); + buffers_create(&buffers); + run_wrap_func(&buffers, do_basic1, + p->copy, h->hang); + } + + igt_subtest_f("%s-%s-%s-sanitycheckN%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { + p->require(); + buffers_create(&buffers); + run_wrap_func(&buffers, do_basicN, + p->copy, h->hang); } /* try to overwrite the source values */ - igt_subtest_f("%s-%s-overwrite-source-one%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-overwrite-source-one%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_overwrite_source__one, p->copy, h->hang); } - igt_subtest_f("%s-%s-overwrite-source%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-overwrite-source%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_overwrite_source, p->copy, h->hang); } - igt_subtest_f("%s-%s-overwrite-source-read-bcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-overwrite-source-read-bcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_overwrite_source_read_bcs, p->copy, h->hang); } - igt_subtest_f("%s-%s-overwrite-source-read-rcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-overwrite-source-read-rcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); igt_require(rendercopy); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_overwrite_source_read_rcs, p->copy, h->hang); } - igt_subtest_f("%s-%s-overwrite-source-rev%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-overwrite-source-rev%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_overwrite_source__rev, p->copy, h->hang); } /* try to intermix copies with GPU copies*/ - igt_subtest_f("%s-%s-intermix-rcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-intermix-rcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); igt_require(rendercopy); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_intermix_rcs, p->copy, h->hang); } - igt_subtest_f("%s-%s-intermix-bcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-intermix-bcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); igt_require(rendercopy); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_intermix_bcs, p->copy, h->hang); } - igt_subtest_f("%s-%s-intermix-both%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-intermix-both%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); igt_require(rendercopy); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_intermix_both, p->copy, h->hang); } /* try to read the results before the copy completes */ - igt_subtest_f("%s-%s-early-read%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-early-read%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_early_read, p->copy, h->hang); } /* concurrent reads */ - igt_subtest_f("%s-%s-read-read-bcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-read-read-bcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_read_read_bcs, p->copy, h->hang); } - igt_subtest_f("%s-%s-read-read-rcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-read-read-rcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); igt_require(rendercopy); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_read_read_rcs, p->copy, h->hang); } /* split copying between rings */ - igt_subtest_f("%s-%s-write-read-bcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-write-read-bcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_write_read_bcs, p->copy, h->hang); } - igt_subtest_f("%s-%s-write-read-rcs%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-write-read-rcs%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); igt_require(rendercopy); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_write_read_rcs, p->copy, h->hang); } /* and finally try to trick the kernel into loosing the pending write */ - igt_subtest_f("%s-%s-gpu-read-after-write%s%s", mode->name, p->prefix, suffix, h->suffix) { - h->require(); + igt_subtest_f("%s-%s-%s-gpu-read-after-write%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) { p->require(); - buffers_create(&buffers, num_buffers); + buffers_create(&buffers); run_wrap_func(&buffers, do_gpu_read_after_write, p->copy, h->hang); } - igt_fixture { + igt_fixture buffers_fini(&buffers); - } } } } static void -run_modes(const struct access_mode *mode) -{ - if (all) { - run_basic_modes(mode, "", run_single); - - igt_fork_signal_helper(); - run_basic_modes(mode, "-interruptible", run_interruptible); - igt_stop_signal_helper(); +run_modes(const char *style, + const struct access_mode *mode, + const int num_buffers, + unsigned allow_mem) +{ + if (!igt_only_list_subtests()) { + if (mode->require && !mode->require()) + return; + + igt_debug("%s: using 2x%d buffers, each 1MiB\n", + style, num_buffers); + if (!__intel_check_memory(2*num_buffers, 1024*1024, allow_mem, + NULL, NULL)) + return; } + run_basic_modes(style, mode, num_buffers, "", run_single); + run_basic_modes(style, mode, num_buffers, "-child", run_child); + run_basic_modes(style, mode, num_buffers, "-forked", run_forked); + igt_fork_signal_helper(); - run_basic_modes(mode, "-forked", run_forked); + run_basic_modes(style, mode, num_buffers, + "-interruptible", run_interruptible); + run_basic_modes(style, mode, num_buffers, + "-bomb", run_bomb); igt_stop_signal_helper(); } igt_main { - int max, i; + const struct { + const char *name; + drm_intel_bo *(*create)(drm_intel_bufmgr *, uint64_t size); + bool (*require)(void); + } create[] = { + { "", create_normal_bo, can_create_normal}, + { "private-", create_private_bo, can_create_private }, + { "stolen-", create_stolen_bo, can_create_stolen }, + { NULL, NULL } + }, *c; + uint64_t pin_sz = 0; + void *pinned = NULL; + int num_buffers = 0; + int i; igt_skip_on_simulation(); @@ -1147,21 +1577,92 @@ igt_fixture { fd = drm_open_driver(DRIVER_INTEL); + intel_detect_and_clear_missed_interrupts(fd); devid = intel_get_drm_devid(fd); gen = intel_gen(devid); rendercopy = igt_get_render_copyfunc(devid); - - max = gem_aperture_size (fd) / (1024 * 1024) / 2; - if (num_buffers > max) - num_buffers = max; - - max = intel_get_total_ram_mb() * 3 / 4; - if (num_buffers > max) - num_buffers = max; - num_buffers /= 2; - igt_info("using 2x%d buffers, each 1MiB\n", num_buffers); } - for (i = 0; i < ARRAY_SIZE(access_modes); i++) - run_modes(&access_modes[i]); + for (c = create; c->name; c++) { + char name[80]; + + create_func = c->create; + + num_buffers = MIN_BUFFERS; + if (c->require()) { + snprintf(name, sizeof(name), "%s%s", c->name, "tiny"); + for (i = 0; i < ARRAY_SIZE(access_modes); i++) + run_modes(name, &access_modes[i], num_buffers, CHECK_RAM); + } + + igt_fixture { + num_buffers = gem_mappable_aperture_size() / (1024 * 1024) / 4; + } + + if (c->require()) { + snprintf(name, sizeof(name), "%s%s", c->name, "small"); + for (i = 0; i < ARRAY_SIZE(access_modes); i++) + run_modes(name, &access_modes[i], num_buffers, CHECK_RAM); + } + + igt_fixture { + num_buffers = gem_mappable_aperture_size() / (1024 * 1024); + } + + if (c->require()) { + snprintf(name, sizeof(name), "%s%s", c->name, "thrash"); + for (i = 0; i < ARRAY_SIZE(access_modes); i++) + run_modes(name, &access_modes[i], num_buffers, CHECK_RAM); + } + + igt_fixture { + num_buffers = gem_global_aperture_size(fd) / (1024 * 1024); + } + + if (c->require()) { + snprintf(name, sizeof(name), "%s%s", c->name, "global"); + for (i = 0; i < ARRAY_SIZE(access_modes); i++) + run_modes(name, &access_modes[i], num_buffers, CHECK_RAM); + } + + igt_fixture { + num_buffers = gem_aperture_size(fd) / (1024 * 1024); + } + + if (c->require()) { + snprintf(name, sizeof(name), "%s%s", c->name, "full"); + for (i = 0; i < ARRAY_SIZE(access_modes); i++) + run_modes(name, &access_modes[i], num_buffers, CHECK_RAM); + } + + igt_fixture { + num_buffers = gem_mappable_aperture_size() / (1024 * 1024); + pin_sz = intel_get_avail_ram_mb() - num_buffers; + + igt_debug("Pinning %ld MiB\n", pin_sz); + pin_sz *= 1024 * 1024; + + if (posix_memalign(&pinned, 4096, pin_sz) || + mlock(pinned, pin_sz) || + madvise(pinned, pin_sz, MADV_DONTFORK)) { + free(pinned); + pinned = NULL; + } + igt_require(pinned); + } + + if (c->require()) { + snprintf(name, sizeof(name), "%s%s", c->name, "swap"); + for (i = 0; i < ARRAY_SIZE(access_modes); i++) + run_modes(name, &access_modes[i], num_buffers, CHECK_RAM | CHECK_SWAP); + } + + igt_fixture { + if (pinned) { + munlock(pinned, pin_sz); + free(pinned); + pinned = NULL; + } + } + } } diff -Nru intel-gpu-tools-1.13/tests/gem_create.c intel-gpu-tools-1.14/tests/gem_create.c --- intel-gpu-tools-1.13/tests/gem_create.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_create.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,166 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Ankitprasad Sharma + * + */ + +/** @file gem_create.c + * + * This is a test for the extended and old gem_create ioctl, that + * includes allocation of object from stolen memory and shmem. + * + * The goal is to simply ensure that basics work and invalid input + * combinations are rejected. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "ioctl_wrappers.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_io.h" +#include "intel_chipset.h" +#include "igt_aux.h" +#include "drmtest.h" +#include "drm.h" +#include "i915_drm.h" + +IGT_TEST_DESCRIPTION("This is a test for the extended & old gem_create ioctl," + " that includes allocation of object from stolen memory" + " and shmem."); + +#define CLEAR(s) memset(&s, 0, sizeof(s)) +#define PAGE_SIZE 4096 + +struct local_i915_gem_create_v2 { + uint64_t size; + uint32_t handle; + uint32_t pad; +#define I915_CREATE_PLACEMENT_STOLEN (1<<0) + uint32_t flags; +} create; + +#define LOCAL_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct local_i915_gem_create_v2) + +static void invalid_flag_test(int fd) +{ + int ret; + + gem_require_stolen_support(fd); + + create.handle = 0; + create.size = PAGE_SIZE; + create.flags = ~I915_CREATE_PLACEMENT_STOLEN; + ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_CREATE, &create); + + igt_assert(ret <= 0); + + create.flags = ~0; + ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_CREATE, &create); + + igt_assert(ret <= 0); +} + +static void invalid_size_test(int fd) +{ + int handle; + + handle = __gem_create(fd, 0); + igt_assert(!handle); +} + +/* + * Creating an object with non-aligned size and trying to access it with an + * offset, which is greater than the requested size but smaller than the + * object's last page boundary. pwrite here must be successful. + */ +static void valid_nonaligned_size(int fd) +{ + int handle; + char buf[PAGE_SIZE]; + + handle = gem_create(fd, PAGE_SIZE / 2); + + gem_write(fd, handle, PAGE_SIZE / 2, buf, PAGE_SIZE / 2); + + gem_close(fd, handle); +} + +/* + * Creating an object with non-aligned size and trying to access it with an + * offset, which is greater than the requested size and larger than the + * object's last page boundary. pwrite here must fail. + */ +static void invalid_nonaligned_size(int fd) +{ + int handle; + char buf[PAGE_SIZE]; + struct drm_i915_gem_pwrite gem_pwrite; + + handle = gem_create(fd, PAGE_SIZE / 2); + + CLEAR(gem_pwrite); + gem_pwrite.handle = handle; + gem_pwrite.offset = PAGE_SIZE / 2; + gem_pwrite.size = PAGE_SIZE; + gem_pwrite.data_ptr = (uintptr_t)buf; + /* This should fail. Hence cannot use gem_write. */ + igt_assert(drmIoctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &gem_pwrite)); + + gem_close(fd, handle); +} + +igt_main +{ + int fd = -1; + + igt_skip_on_simulation(); + + igt_fixture { + fd = drm_open_driver(DRIVER_INTEL); + } + + igt_subtest("stolen-invalid-flag") + invalid_flag_test(fd); + + igt_subtest("create-invalid-size") + invalid_size_test(fd); + + igt_subtest("create-valid-nonaligned") + valid_nonaligned_size(fd); + + igt_subtest("create-invalid-nonaligned") + invalid_nonaligned_size(fd); +} diff -Nru intel-gpu-tools-1.13/tests/gem_cs_prefetch.c intel-gpu-tools-1.14/tests/gem_cs_prefetch.c --- intel-gpu-tools-1.13/tests/gem_cs_prefetch.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_cs_prefetch.c 2016-03-01 15:59:21.000000000 +0000 @@ -36,107 +36,121 @@ * very last gtt pte. */ #include "igt.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "intel_bufmgr.h" IGT_TEST_DESCRIPTION("Test the CS prefetch behaviour on batches."); -static drm_intel_bufmgr *bufmgr; -struct intel_batchbuffer *batch; +#define BATCH_SIZE 4096 + +struct shadow { + uint32_t handle; + struct drm_i915_gem_relocation_entry reloc; +}; -static void exec(int fd, uint32_t handle) +static void gem_require_store_dword(int fd, unsigned ring) { - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 gem_exec[1]; + int gen = intel_gen(intel_get_drm_devid(fd)); + ring &= ~(3 << 13); + igt_skip_on_f(gen == 6 && ring == I915_EXEC_BSD, + "MI_STORE_DATA broken on gen6 bsd\n"); +} - memset(gem_exec, 0, sizeof(gem_exec)); - gem_exec[0].handle = handle; +static void setup(int fd, int gen, struct shadow *shadow) +{ + uint32_t buf[16]; + int i; - memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)gem_exec; - execbuf.buffer_count = 1; - execbuf.batch_start_offset = 0; - execbuf.batch_len = 4096; + shadow->handle = gem_create(fd, 4096); - gem_execbuf(fd, &execbuf); - gem_sync(fd, handle); + i = 0; + buf[i++] = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0); + if (gen >= 8) { + buf[i++] = BATCH_SIZE - sizeof(uint32_t); + buf[i++] = 0; + } else if (gen >= 4) { + buf[i++] = 0; + buf[i++] = BATCH_SIZE - sizeof(uint32_t); + } else { + buf[i-1]--; + buf[i++] = BATCH_SIZE - sizeof(uint32_t); + } + buf[i++] = MI_BATCH_BUFFER_END; + buf[i++] = MI_BATCH_BUFFER_END; + gem_write(fd, shadow->handle, 0, buf, sizeof(buf)); + + memset(&shadow->reloc, 0, sizeof(shadow->reloc)); + if (gen >= 8 || gen < 4) + shadow->reloc.offset = sizeof(uint32_t); + else + shadow->reloc.offset = 2*sizeof(uint32_t); + shadow->reloc.delta = BATCH_SIZE - sizeof(uint32_t); + shadow->reloc.read_domains = I915_GEM_DOMAIN_INSTRUCTION; + shadow->reloc.write_domain = I915_GEM_DOMAIN_INSTRUCTION; } -igt_simple_main +static void can_test_ring(unsigned ring) { - uint32_t batch_end[4] = {MI_BATCH_BUFFER_END, 0, 0, 0}; - int fd, i, ret; - int count; - drm_intel_bo *sample_batch_bo; - - igt_skip_on_simulation(); + int master = drm_open_driver_master(DRIVER_INTEL); + int fd = drm_open_driver(DRIVER_INTEL); - fd = drm_open_driver(DRIVER_INTEL); + /* Dance to avoid dying with master open */ + close(master); + gem_require_ring(fd, ring); + gem_require_store_dword(fd, ring); + close(fd); +} - bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); - igt_assert(bufmgr); +static void test_ring(unsigned ring) +{ + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj[2]; + struct shadow shadow; + uint64_t i, count; + int fd, gen; + + can_test_ring(ring); + + fd = drm_open_driver_master(DRIVER_INTEL); + gen = intel_gen(intel_get_drm_devid(fd)); + setup(fd, gen, &shadow); + + count = gem_aperture_size(fd) / BATCH_SIZE; + intel_require_memory(count, BATCH_SIZE, CHECK_RAM); + /* Fill the entire gart with batches and run them. */ + memset(obj, 0, sizeof(obj)); + obj[1].handle = shadow.handle; + obj[1].relocs_ptr = (uintptr_t)&shadow.reloc; + obj[1].relocation_count = 1; - drm_intel_bufmgr_gem_enable_reuse(bufmgr); - - count = gem_aperture_size(fd) / 4096; - intel_require_memory(count, 4096, CHECK_RAM); - - batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd)); - igt_assert(batch); - - sample_batch_bo = drm_intel_bo_alloc(bufmgr, "", 4096, 4096); - igt_assert(sample_batch_bo); - ret = drm_intel_bo_subdata(sample_batch_bo, 4096-sizeof(batch_end), - sizeof(batch_end), batch_end); - igt_assert(ret == 0); + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)obj; + execbuf.flags = ring; + if (gen < 6) + execbuf.flags |= I915_EXEC_SECURE; - /* fill the entire gart with batches and run them */ for (i = 0; i < count; i++) { - drm_intel_bo *batch_bo; + /* Create the new batch using the GPU */ + obj[0].handle = gem_create(fd, BATCH_SIZE); + shadow.reloc.target_handle = obj[0].handle; + execbuf.buffer_count = 2; + gem_execbuf(fd, &execbuf); + + /* ...then execute the new batch */ + execbuf.buffer_count = 1; + gem_execbuf(fd, &execbuf); - batch_bo = drm_intel_bo_alloc(bufmgr, "", 4096, 4096); - igt_assert(batch_bo); - - /* copy the sample batch with the gpu to the new one, so that we - * also test the unmappable part of the gtt. */ - BLIT_COPY_BATCH_START(0); - OUT_BATCH((3 << 24) | /* 32 bits */ - (0xcc << 16) | /* copy ROP */ - 4096); - OUT_BATCH(0); /* dst y1,x1 */ - OUT_BATCH((1 << 16) | 1024); - OUT_RELOC_FENCED(batch_bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0); - OUT_BATCH((0 << 16) | 0); /* src x1, y1 */ - OUT_BATCH(4096); - OUT_RELOC_FENCED(sample_batch_bo, I915_GEM_DOMAIN_RENDER, 0, 0); - ADVANCE_BATCH(); - - intel_batchbuffer_flush(batch); - if (i % 100 == 0) - gem_sync(fd, batch_bo->handle); - - drm_intel_bo_disable_reuse(batch_bo); - - /* launch the newly created batch */ - exec(fd, batch_bo->handle); - - // leak buffers - //drm_intel_bo_unreference(batch_bo); - igt_progress("gem_cs_prefetch: ", i, count); + /* ...and leak the handle to consume the GTT */ } - igt_info("Test suceeded, cleanup up - this might take a while.\n"); - drm_intel_bufmgr_destroy(bufmgr); - close(fd); } + +igt_main +{ + const struct intel_execution_engine *e; + + igt_skip_on_simulation(); + + for (e = intel_execution_engines; e->name; e++) + igt_subtest_f("%s%s", e->exec_id ? "" : "basic-", e->name) + test_ring(e->exec_id | e->flags); +} diff -Nru intel-gpu-tools-1.13/tests/gem_cs_tlb.c intel-gpu-tools-1.14/tests/gem_cs_tlb.c --- intel-gpu-tools-1.13/tests/gem_cs_tlb.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_cs_tlb.c 2016-03-01 15:59:21.000000000 +0000 @@ -50,129 +50,107 @@ #include - IGT_TEST_DESCRIPTION("Check whether we correctly invalidate the cs tlb."); -#define LOCAL_I915_EXEC_VEBOX (4<<0) +#define LOCAL_I915_EXEC_VEBOX (4<<0) +#define EXEC_OBJECT_PINNED (1<<4) #define BATCH_SIZE (1024*1024) -static int exec(int fd, uint32_t handle, int split, - uint64_t *gtt_ofs, unsigned ring_id) +static bool has_softpin(int fd) { - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 gem_exec[1]; - int ret = 0; + struct drm_i915_getparam gp; + int val = 0; - gem_exec[0].handle = handle; - gem_exec[0].relocation_count = 0; - gem_exec[0].relocs_ptr = 0; - gem_exec[0].alignment = 0; - gem_exec[0].offset = 0x00100000; - gem_exec[0].flags = 0; - gem_exec[0].rsvd1 = 0; - gem_exec[0].rsvd2 = 0; + memset(&gp, 0, sizeof(gp)); + gp.param = 37; /* I915_PARAM_HAS_EXEC_SOFTPIN */ + gp.value = &val; - execbuf.buffers_ptr = (uintptr_t)gem_exec; - execbuf.buffer_count = 1; - execbuf.batch_start_offset = 0; - execbuf.batch_len = 8*(split+1); - execbuf.cliprects_ptr = 0; - execbuf.num_cliprects = 0; - execbuf.DR1 = 0; - execbuf.DR4 = 0; - execbuf.flags = ring_id; - i915_execbuffer2_set_context_id(execbuf, 0); - execbuf.rsvd2 = 0; + if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp)) + return 0; + + errno = 0; + return (val == 1); +} - ret = drmIoctl(fd, - DRM_IOCTL_I915_GEM_EXECBUFFER2, - &execbuf); +static void * +mmap_coherent(int fd, uint32_t handle, int size) +{ + int domain; + void *ptr; - *gtt_ofs = gem_exec[0].offset; + if (gem_has_llc(fd) || !gem_mmap__has_wc(fd)) { + domain = I915_GEM_DOMAIN_CPU; + ptr = gem_mmap__cpu(fd, handle, 0, size, PROT_WRITE); + } else { + domain = I915_GEM_DOMAIN_GTT; + ptr = gem_mmap__wc(fd, handle, 0, size, PROT_WRITE); + } - return ret; + gem_set_domain(fd, handle, domain, domain); + return ptr; } static void run_on_ring(int fd, unsigned ring_id, const char *ring_name) { - uint32_t handle, handle_new; - uint64_t gtt_offset, gtt_offset_new; - uint32_t *batch_ptr, *batch_ptr_old; - unsigned split; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 execobj; + struct { + uint32_t handle; + uint32_t *batch; + } obj[2]; + unsigned i; char buf[100]; - int i; gem_require_ring(fd, ring_id); + igt_require(has_softpin(fd)); - sprintf(buf, "testing %s cs tlb coherency: ", ring_name); + for (i = 0; i < 2; i++) { + obj[i].handle = gem_create(fd, BATCH_SIZE); + obj[i].batch = mmap_coherent(fd, obj[i].handle, BATCH_SIZE); + memset(obj[i].batch, 0xff, BATCH_SIZE); + } + + memset(&execobj, 0, sizeof(execobj)); + execobj.handle = obj[0].handle; + obj[0].batch[0] = MI_BATCH_BUFFER_END; - /* Shut up gcc, too stupid. */ - batch_ptr_old = NULL; - handle = 0; - gtt_offset = 0; - - for (split = 0; split < BATCH_SIZE/8 - 1; split += 2) { - igt_progress(buf, split, BATCH_SIZE/8 - 1); - - handle_new = gem_create(fd, BATCH_SIZE); - batch_ptr = gem_mmap__cpu(fd, handle_new, 0, BATCH_SIZE, - PROT_READ | PROT_WRITE); - batch_ptr[split*2] = MI_BATCH_BUFFER_END; - - for (i = split*2 + 2; i < BATCH_SIZE/8; i++) - batch_ptr[i] = 0xffffffff; - - if (split > 0) { - gem_sync(fd, handle); - gem_close(fd, handle); - } - - igt_assert_eq(exec(fd, handle_new, split, >t_offset_new, ring_id), - 0); - - if (split > 0) { - /* Check that we've managed to collide in the tlb. */ - igt_assert(gtt_offset == gtt_offset_new); - - /* We hang onto the storage of the old batch by keeping - * the cpu mmap around. */ - munmap(batch_ptr_old, BATCH_SIZE); - } - - handle = handle_new; - gtt_offset = gtt_offset_new; - batch_ptr_old = batch_ptr; + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&execobj; + execbuf.buffer_count = 1; + execbuf.flags = ring_id; + + /* Execute once to allocate a gtt-offset */ + gem_execbuf(fd, &execbuf); + execobj.flags = EXEC_OBJECT_PINNED; + + sprintf(buf, "Testing %s cs tlb coherency: ", ring_name); + for (i = 0; i < BATCH_SIZE/64; i++) { + execobj.handle = obj[i&1].handle; + obj[i&1].batch[i*64/4] = MI_BATCH_BUFFER_END; + execbuf.batch_start_offset = i*64; + + gem_execbuf(fd, &execbuf); } + for (i = 0; i < 2; i++) { + gem_close(fd, obj[i].handle); + munmap(obj[i].batch, BATCH_SIZE); + } } -int fd; - igt_main { + const struct intel_execution_engine *e; + int fd = -1; igt_skip_on_simulation(); - igt_fixture { + igt_fixture fd = drm_open_driver(DRIVER_INTEL); - /* This test is very sensitive to residual gtt_mm noise from previous - * tests. Try to quiet thing down first. */ - gem_quiescent_gpu(fd); - sleep(5); /* needs more serious ducttape */ - } - - igt_subtest("render") - run_on_ring(fd, I915_EXEC_RENDER, "render"); - - igt_subtest("bsd") - run_on_ring(fd, I915_EXEC_BSD, "bsd"); - - igt_subtest("blt") - run_on_ring(fd, I915_EXEC_BLT, "blt"); - - igt_subtest("vebox") - run_on_ring(fd, LOCAL_I915_EXEC_VEBOX, "vebox"); + for (e = intel_execution_engines; e->name; e++) + igt_subtest_f("%s%s", e->exec_id ? "" : "basic-", e->name) + run_on_ring(fd, e->exec_id | e->flags, e->name); igt_fixture close(fd); diff -Nru intel-gpu-tools-1.13/tests/gem_ctx_exec.c intel-gpu-tools-1.14/tests/gem_ctx_exec.c --- intel-gpu-tools-1.13/tests/gem_ctx_exec.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_ctx_exec.c 2016-03-01 15:59:21.000000000 +0000 @@ -86,7 +86,7 @@ struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 *gem_exec; uint32_t ctx_id1, ctx_id2; - int num_buffers = gem_available_aperture_size(fd) / 4096; + int num_buffers = gem_global_aperture_size(fd) / 4096; int i; /* Make sure we only fill half of RAM with gem objects. */ @@ -201,10 +201,10 @@ * the last context is leaked at every reset. */ for (i = 0; i < 20; i++) { - igt_set_stop_rings(igt_to_stop_ring_flag(I915_EXEC_RENDER)); + igt_hang_ring_t hang = igt_hang_ring(fd, I915_EXEC_RENDER); igt_assert(exec(fd, handle, I915_EXEC_RENDER, 0) == 0); igt_assert(exec(fd, handle, I915_EXEC_RENDER, ctx_id) == 0); - gem_sync(fd, handle); + igt_post_hang_ring(fd, hang); } gem_context_destroy(fd, ctx_id); diff -Nru intel-gpu-tools-1.13/tests/gem_ctx_thrash.c intel-gpu-tools-1.14/tests/gem_ctx_thrash.c --- intel-gpu-tools-1.13/tests/gem_ctx_thrash.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_ctx_thrash.c 2016-03-01 15:59:21.000000000 +0000 @@ -31,29 +31,9 @@ #include #include - IGT_TEST_DESCRIPTION("Fill the Gobal GTT with context objects and VMs\n"); -#define OBJECT_SIZE (1024 * 1024) -#define NUM_THREADS 8 - -static int fd; -static unsigned devid; -static igt_render_copyfunc_t render_copy; - -static dri_bo **all_bo; -static int num_bo; -static int bo_per_ctx; - -static drm_intel_context **all_ctx; -static int num_ctx; -static int ctx_per_thread; - -static void xchg_ptr(void *array, unsigned i, unsigned j) -{ - void **A = array; - igt_swap(A[i], A[j]); -} +#define NUM_THREADS (2*sysconf(_SC_NPROCESSORS_ONLN)) static void xchg_int(void *array, unsigned i, unsigned j) { @@ -61,109 +41,203 @@ igt_swap(A[i], A[j]); } -static int reopen(int _fd) +static unsigned get_num_contexts(int fd) { - struct stat st; - char name[128]; + uint64_t ggtt_size; + unsigned size; + unsigned count; + + /* Compute the number of contexts we can allocate to fill the GGTT */ + ggtt_size = gem_global_aperture_size(fd); + size = 64 << 10; /* Most gen require at least 64k for ctx */ + + count = 3 * (ggtt_size / size) / 2; + igt_info("Creating %lld contexts (assuming of size %lld)\n", + (long long)count, (long long)size); - igt_assert(fstat(_fd, &st) == 0); - - sprintf(name, "/dev/dri/card%u", (unsigned)(st.st_rdev & 0x7f)); - return open(name, O_RDWR); + intel_require_memory(count, size, CHECK_RAM | CHECK_SWAP); + return count; } -static void *thread(void *bufmgr) +static int has_engine(int fd, const struct intel_execution_engine *e, uint32_t ctx) { - struct intel_batchbuffer *batch; - dri_bo **bo; - drm_intel_context **ctx; - int c, b; - - batch = intel_batchbuffer_alloc(bufmgr, devid); - - bo = malloc(num_bo * sizeof(dri_bo *)); - igt_assert(bo); - memcpy(bo, all_bo, num_bo * sizeof(dri_bo *)); - - ctx = malloc(num_ctx * sizeof(drm_intel_context *)); - igt_assert(ctx); - memcpy(ctx, all_ctx, num_ctx * sizeof(drm_intel_context *)); - igt_permute_array(ctx, num_ctx, xchg_ptr); + uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 exec; + int ret; + + memset(&exec, 0, sizeof(exec)); + exec.handle = gem_create(fd, 4096); + gem_write(fd, exec.handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&exec; + execbuf.buffer_count = 1; + execbuf.flags = e->exec_id | e->flags; + execbuf.rsvd1 = ctx; + ret = __gem_execbuf(fd, &execbuf); + gem_close(fd, exec.handle); - for (c = 0; c < ctx_per_thread; c++) { - igt_permute_array(bo, num_bo, xchg_ptr); - for (b = 0; b < bo_per_ctx; b++) { - struct igt_buf src, dst; - - src.bo = bo[b % num_bo]; - src.stride = 64; - src.size = OBJECT_SIZE; - src.tiling = I915_TILING_NONE; - - dst.bo = bo[(b+1) % num_bo]; - dst.stride = 64; - dst.size = OBJECT_SIZE; - dst.tiling = I915_TILING_NONE; + return ret; +} - render_copy(batch, ctx[c % num_ctx], - &src, 0, 0, 16, 16, &dst, 0, 0); +static void single(const char *name, bool all_engines) +{ + struct drm_i915_gem_exec_object2 *obj; + struct drm_i915_gem_relocation_entry *reloc; + const struct intel_execution_engine *e; + unsigned engines[16]; + uint64_t size; + uint32_t *ctx, *map, scratch; + unsigned num_ctx; + int fd, gen, num_engines; +#define MAX_LOOP 16 + + fd = drm_open_driver_master(DRIVER_INTEL); + gen = intel_gen(intel_get_drm_devid(fd)); + num_ctx = get_num_contexts(fd); + + num_engines = 0; + if (all_engines) { + for (e = intel_execution_engines; e->name; e++) { + if (e->exec_id == 0) + continue; + + if (has_engine(fd, e, 0)) + continue; + + if (e->exec_id == I915_EXEC_BSD) { + int is_bsd2 = e->flags != 0; + if (gem_has_bsd2(fd) != is_bsd2) + continue; + } + + igt_require(has_engine(fd, e, 1) == -ENOENT); + + engines[num_engines++] = e->exec_id | e->flags; + if (num_engines == ARRAY_SIZE(engines)) + break; } - } + } else + engines[num_engines++] = 0; - free(ctx); - free(bo); - intel_batchbuffer_free(batch); + size = ALIGN(num_ctx * sizeof(uint32_t), 4096); + scratch = gem_create(fd, ALIGN(num_ctx * sizeof(uint32_t), 4096)); + gem_set_caching(fd, scratch, I915_CACHING_CACHED); + obj = calloc(num_ctx, 2 * sizeof(*obj)); + reloc = calloc(num_ctx, sizeof(*reloc)); - return NULL; -} + ctx = malloc(num_ctx * sizeof(uint32_t)); + igt_assert(ctx); + for (unsigned n = 0; n < num_ctx; n++) { + ctx[n] = gem_context_create(fd); + obj[2*n + 0].handle = scratch; + + reloc[n].target_handle = scratch; + reloc[n].presumed_offset = 0; + reloc[n].offset = sizeof(uint32_t); + reloc[n].delta = n * sizeof(uint32_t); + reloc[n].read_domains = I915_GEM_DOMAIN_INSTRUCTION; + reloc[n].write_domain = 0; /* lies! */ + if (gen >= 4 && gen < 8) + reloc[n].offset += sizeof(uint32_t); -static int uses_ppgtt(int _fd) -{ - struct drm_i915_getparam gp; - int val = 0; + obj[2*n + 1].relocs_ptr = (uintptr_t)&reloc[n]; + obj[2*n + 1].relocation_count = 1; + } - memset(&gp, 0, sizeof(gp)); - gp.param = 18; /* HAS_ALIASING_PPGTT */ - gp.value = &val; + map = gem_mmap__cpu(fd, scratch, 0, size, PROT_WRITE); + for (unsigned loop = 1; loop <= MAX_LOOP; loop <<= 1) { + unsigned count = loop * num_ctx; + uint32_t *all; + + all = malloc(count * sizeof(uint32_t)); + for (unsigned n = 0; n < count; n++) + all[n] = ctx[n % num_ctx]; + igt_permute_array(all, count, xchg_int); + for (unsigned n = 0; n < count; n++) { + struct drm_i915_gem_execbuffer2 execbuf; + unsigned r = n % num_ctx; + uint64_t offset = reloc[r].presumed_offset + reloc[r].delta; + uint32_t handle = gem_create(fd, 4096); + uint32_t buf[16]; + int i; + + buf[i = 0] = MI_STORE_DWORD_IMM; + if (gen >= 8) { + buf[++i] = offset; + buf[++i] = offset >> 32; + } else if (gen >= 4) { + if (gen < 6) + buf[i] |= 1 << 22; + buf[++i] = 0; + buf[++i] = offset; + } else { + buf[i]--; + buf[++i] = offset; + } + buf[++i] = all[n]; + buf[++i] = MI_BATCH_BUFFER_END; + gem_write(fd, handle, 0, buf, sizeof(buf)); + obj[2*r + 1].handle = handle; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&obj[2*r]; + execbuf.buffer_count = 2; + execbuf.flags = engines[n % num_engines]; + execbuf.rsvd1 = all[n]; + gem_execbuf(fd, &execbuf); + gem_close(fd, handle); + } - if (drmIoctl(_fd, DRM_IOCTL_I915_GETPARAM, &gp)) - return 0; + /* Note we lied about the write-domain when writing from the + * GPU (in order to avoid inter-ring synchronisation), so now + * we have to force the synchronisation here. + */ + gem_set_domain(fd, scratch, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + for (unsigned n = count - num_ctx; n < count; n++) + igt_assert_eq(map[n % num_ctx], all[n]); + free(all); + igt_progress(name, loop, MAX_LOOP); + } + munmap(map, size); - errno = 0; - return val; + free(ctx); + close(fd); } -static void -processes(void) +static void processes(void) { - int *all_fds; - uint64_t aperture; + const struct intel_execution_engine *e; + unsigned engines[16]; + int num_engines; struct rlimit rlim; - int ppgtt_mode; - int ctx_size; - int obj_size; - int n; - - igt_skip_on_simulation(); + unsigned num_ctx; + uint32_t name; + int fd, *fds; + + fd = drm_open_driver(DRIVER_INTEL); + num_ctx = get_num_contexts(fd); + + num_engines = 0; + for (e = intel_execution_engines; e->name; e++) { + if (e->exec_id == 0) + continue; + + if (has_engine(fd, e, 0)) + continue; + + if (e->exec_id == I915_EXEC_BSD) { + int is_bsd2 = e->flags != 0; + if (gem_has_bsd2(fd) != is_bsd2) + continue; + } - fd = drm_open_driver_render(DRIVER_INTEL); - devid = intel_get_drm_devid(fd); - aperture = gem_aperture_size(fd); - - ppgtt_mode = uses_ppgtt(fd); - igt_require(ppgtt_mode); - - render_copy = igt_get_render_copyfunc(devid); - igt_require_f(render_copy, "no render-copy function\n"); - - if (ppgtt_mode > 1) - ctx_size = aperture >> 10; /* Assume full-ppgtt of maximum size */ - else - ctx_size = 64 << 10; /* Most gen require at least 64k for ctx */ - num_ctx = 3 * (aperture / ctx_size) / 2; - igt_info("Creating %d contexts (assuming of size %d)\n", - num_ctx, ctx_size); - intel_require_memory(num_ctx, ctx_size, CHECK_RAM | CHECK_SWAP); + engines[num_engines++] = e->exec_id | e->flags; + if (num_engines == ARRAY_SIZE(engines)) + break; + } /* tweak rlimits to allow us to create this many files */ igt_assert(getrlimit(RLIMIT_NOFILE, &rlim) == 0); @@ -174,134 +248,121 @@ igt_assert(setrlimit(RLIMIT_NOFILE, &rlim) == 0); } - all_fds = malloc(num_ctx * sizeof(int)); - igt_assert(all_fds); - for (n = 0; n < num_ctx; n++) { - all_fds[n] = reopen(fd); - if (all_fds[n] == -1) { + fds = malloc(num_ctx * sizeof(int)); + igt_assert(fds); + for (unsigned n = 0; n < num_ctx; n++) { + fds[n] = drm_open_driver(DRIVER_INTEL); + if (fds[n] == -1) { int err = errno; - for (int i = n; i--; ) - close(all_fds[i]); - free(all_fds); + for (unsigned i = n; i--; ) + close(fds[i]); + free(fds); errno = err; - igt_assert_f(0, "failed to create context %d/%d\n", n, num_ctx); + igt_assert_f(0, "failed to create context %lld/%lld\n", (long long)n, (long long)num_ctx); } } - num_bo = 2 * num_ctx; - obj_size = (2 * aperture / num_bo + 4095) & -4096; - igt_info("Creating %d surfaces (of size %d)\n", num_bo, obj_size); - intel_require_memory(num_bo, obj_size, CHECK_RAM); + if (1) { + uint32_t bbe = MI_BATCH_BUFFER_END; + name = gem_create(fd, 4096); + gem_write(fd, name, 0, &bbe, sizeof(bbe)); + name = gem_flink(fd, name); + } igt_fork(child, NUM_THREADS) { - drm_intel_bufmgr *bufmgr; - struct intel_batchbuffer *batch; - int c; - - igt_permute_array(all_fds, num_ctx, xchg_int); - - for (c = 0; c < num_ctx; c++) { - struct igt_buf src, dst; - - bufmgr = drm_intel_bufmgr_gem_init(all_fds[c], 4096); - igt_assert(bufmgr); - batch = intel_batchbuffer_alloc(bufmgr, devid); - - src.bo = drm_intel_bo_alloc(bufmgr, "", obj_size, 0); - igt_assert(src.bo); - src.stride = 64; - src.size = obj_size; - src.tiling = I915_TILING_NONE; - - dst.bo = drm_intel_bo_alloc(bufmgr, "", obj_size, 0); - igt_assert(dst.bo); - dst.stride = 64; - dst.size = obj_size; - dst.tiling = I915_TILING_NONE; - - render_copy(batch, NULL, - &src, 0, 0, 16, 16, &dst, 0, 0); - - intel_batchbuffer_free(batch); - drm_intel_bo_unreference(src.bo); - drm_intel_bo_unreference(dst.bo); - drm_intel_bufmgr_destroy(bufmgr); + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj; + + memset(&obj, 0, sizeof(obj)); + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&obj; + execbuf.buffer_count = 1; + + igt_permute_array(fds, num_ctx, xchg_int); + for (unsigned n = 0; n < num_ctx; n++) { + obj.handle = gem_open(fds[n], name); + execbuf.flags = engines[n % num_engines]; + gem_execbuf(fds[n], &execbuf); + gem_close(fds[n], obj.handle); } } igt_waitchildren(); - for (n = 0; n < num_ctx; n++) - close(all_fds[n]); - free(all_fds); + for (unsigned n = 0; n < num_ctx; n++) + close(fds[n]); + free(fds); close(fd); } -static void -threads(void) +struct thread { + int fd; + uint32_t *all_ctx; + unsigned num_ctx; + uint32_t batch; +}; + +static void *thread(void *data) { - pthread_t threads[NUM_THREADS]; - drm_intel_bufmgr *bufmgr; - uint64_t aperture; - int ppgtt_mode; - int ctx_size; - int n; + struct thread *t = data; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj; + uint32_t *ctx; + + memset(&obj, 0, sizeof(obj)); + obj.handle = t->batch; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&obj; + execbuf.buffer_count = 1; - igt_skip_on_simulation(); + ctx = malloc(t->num_ctx * sizeof(uint32_t)); + igt_assert(ctx); + memcpy(ctx, t->all_ctx, t->num_ctx * sizeof(uint32_t)); + igt_permute_array(ctx, t->num_ctx, xchg_int); - fd = drm_open_driver_render(DRIVER_INTEL); - devid = intel_get_drm_devid(fd); - aperture = gem_aperture_size(fd); - - ppgtt_mode = uses_ppgtt(fd); - igt_require(ppgtt_mode); - - render_copy = igt_get_render_copyfunc(devid); - igt_require_f(render_copy, "no render-copy function\n"); - - bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); - igt_assert(bufmgr); - drm_intel_bufmgr_gem_enable_reuse(bufmgr); - - if (ppgtt_mode > 1) - ctx_size = aperture >> 10; /* Assume full-ppgtt of maximum size */ - else - ctx_size = 64 << 10; /* Most gen require at least 64k for ctx */ - num_ctx = 3 * (aperture / ctx_size) / 2; - igt_info("Creating %d contexts (assuming of size %d)\n", - num_ctx, ctx_size); - intel_require_memory(num_ctx, ctx_size, CHECK_RAM | CHECK_SWAP); - all_ctx = malloc(num_ctx * sizeof(drm_intel_context *)); - igt_assert(all_ctx); - for (n = 0; n < num_ctx; n++) { - all_ctx[n] = drm_intel_gem_context_create(bufmgr); - igt_assert(all_ctx[n]); + for (unsigned n = 0; n < t->num_ctx; n++) { + execbuf.rsvd1 = ctx[n]; + gem_execbuf(t->fd, &execbuf); } - num_bo = 3 * (aperture / OBJECT_SIZE) / 2; - igt_info("Creating %d surfaces (of size %d)\n", num_bo, OBJECT_SIZE); - intel_require_memory(num_bo, OBJECT_SIZE, CHECK_RAM); - all_bo = malloc(num_bo * sizeof(dri_bo *)); - igt_assert(all_bo); - for (n = 0; n < num_bo; n++) { - all_bo[n] = drm_intel_bo_alloc(bufmgr, "", OBJECT_SIZE, 0); - igt_assert(all_bo[n]); - } + free(ctx); + + return NULL; +} - ctx_per_thread = 3 * num_ctx / NUM_THREADS / 2; - bo_per_ctx = 3 * num_bo / NUM_THREADS / 2; +static void threads(void) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + pthread_t threads[NUM_THREADS]; + struct thread data; - for (n = 0; n < NUM_THREADS; n++) - pthread_create(&threads[n], NULL, thread, bufmgr); + data.fd = drm_open_driver_render(DRIVER_INTEL); + data.num_ctx = get_num_contexts(data.fd); + data.all_ctx = malloc(data.num_ctx * sizeof(uint32_t)); + igt_assert(data.all_ctx); + for (unsigned n = 0; n < data.num_ctx; n++) + data.all_ctx[n] = gem_context_create(data.fd); + data.batch = gem_create(data.fd, 4096); + gem_write(data.fd, data.batch, 0, &bbe, sizeof(bbe)); - for (n = 0; n < NUM_THREADS; n++) + for (int n = 0; n < NUM_THREADS; n++) + pthread_create(&threads[n], NULL, thread, &data); + + for (int n = 0; n < NUM_THREADS; n++) pthread_join(threads[n], NULL); - drm_intel_bufmgr_destroy(bufmgr); - close(fd); + close(data.fd); } igt_main { + igt_skip_on_simulation(); + + igt_subtest("single") + single("single", false); + igt_subtest("engines") + single("engines", true); + igt_subtest("processes") processes(); diff -Nru intel-gpu-tools-1.13/tests/gem_eio.c intel-gpu-tools-1.14/tests/gem_eio.c --- intel-gpu-tools-1.13/tests/gem_eio.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_eio.c 2016-03-01 15:59:21.000000000 +0000 @@ -58,24 +58,9 @@ return ret; } -static bool i915_wedged_set(void) -{ - int fd, ret; - - igt_debug("Triggering GPU reset\n"); - - fd = igt_debugfs_open("i915_wedged", O_RDWR); - igt_require(fd >= 0); - - ret = write(fd, "1\n", 2) == 2; - close(fd); - - return ret; -} - static void trigger_reset(int fd) { - igt_assert(i915_wedged_set()); + igt_force_gpu_reset(); /* And just check the gpu is indeed running again */ igt_debug("Checking that the GPU recovered\n"); @@ -112,14 +97,6 @@ trigger_reset(fd); } -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb)) - err = -errno; - return err; -} - static void test_execbuf(int fd) { struct drm_i915_gem_execbuffer2 execbuf; @@ -161,9 +138,21 @@ { igt_hang_ring_t hang; + /* If the request we wait on completes due to a hang (even for + * that request), the user expects the return value to 0 (success). + */ + hang = igt_hang_ring(fd, I915_EXEC_DEFAULT); + igt_assert_eq(__gem_wait(fd, hang.handle, -1), 0); + igt_post_hang_ring(fd, hang); + + /* If the GPU is wedged during the wait, again we expect the return + * value to be 0 (success). + */ + igt_require(i915_reset_control(false)); hang = igt_hang_ring(fd, I915_EXEC_DEFAULT); - igt_assert_eq(__gem_wait(fd, hang.handle, -1), -EIO); + igt_assert_eq(__gem_wait(fd, hang.handle, -1), 0); igt_post_hang_ring(fd, hang); + igt_require(i915_reset_control(true)); trigger_reset(fd); } @@ -176,7 +165,7 @@ igt_fixture { fd = drm_open_driver(DRIVER_INTEL); - igt_require_hang_ring(fd, -1); + igt_require_hang_ring(fd, I915_EXEC_DEFAULT); } igt_subtest("throttle") diff -Nru intel-gpu-tools-1.13/tests/gem_evict_alignment.c intel-gpu-tools-1.14/tests/gem_evict_alignment.c --- intel-gpu-tools-1.13/tests/gem_evict_alignment.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_evict_alignment.c 2016-03-01 15:59:21.000000000 +0000 @@ -185,11 +185,10 @@ free(bo); } -int fd; - igt_main { - int size, count; + uint64_t size, count; + int fd = -1; igt_fixture { fd = drm_open_driver(DRIVER_INTEL); @@ -220,22 +219,22 @@ major_evictions(fd, size, count); } - if (igt_fork_hang_helper()) { - igt_subtest("minor-hang") { - size = 1024 * 1024; - count = 3*gem_aperture_size(fd) / size / 4; - minor_evictions(fd, size, count); - } - - igt_subtest("major-hang") { - size = 3*gem_aperture_size(fd) / 4; - count = 4; - major_evictions(fd, size, count); - } - igt_stop_hang_helper(); + igt_subtest("minor-hang") { + igt_fork_hang_helper(); + size = 1024 * 1024; + count = 3*gem_aperture_size(fd) / size / 4; + minor_evictions(fd, size, count); + } + + igt_subtest("major-hang") { + size = 3*gem_aperture_size(fd) / 4; + count = 4; + major_evictions(fd, size, count); } igt_stop_signal_helper(); - igt_fixture + igt_fixture { + igt_stop_hang_helper(); close(fd); + } } diff -Nru intel-gpu-tools-1.13/tests/gem_evict_everything.c intel-gpu-tools-1.14/tests/gem_evict_everything.c --- intel-gpu-tools-1.13/tests/gem_evict_everything.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_evict_everything.c 2016-03-01 15:59:21.000000000 +0000 @@ -130,10 +130,9 @@ return ret; } -static void clear(int fd, uint32_t handle, int size) +static void clear(int fd, uint32_t handle, uint64_t size) { - void *base = gem_mmap__cpu(fd, handle, 0, size, PROT_READ | PROT_WRITE); - + void *base = gem_mmap__cpu(fd, handle, 0, size, PROT_WRITE); memset(base, 0, size); munmap(base, size); } @@ -183,7 +182,9 @@ igt_main { - int size, count, fd; + uint64_t size, count; + int fd; + size = count = 0; fd = -1; @@ -243,32 +244,32 @@ test_major_evictions(fd, size, count); } - if (igt_fork_hang_helper()) { - igt_fixture { - size = 1024 * 1024; - count = 3*gem_aperture_size(fd) / size / 4; - } + igt_fixture { + igt_fork_hang_helper(); - igt_subtest("mlocked-hang") - test_mlocked_evictions(fd, size, count); + size = 1024 * 1024; + count = 3*gem_aperture_size(fd) / size / 4; + } - igt_subtest("swapping-hang") - test_swapping_evictions(fd, size, count); + igt_subtest("mlocked-hang") + test_mlocked_evictions(fd, size, count); - igt_subtest("minor-hang") - test_minor_evictions(fd, size, count); + igt_subtest("swapping-hang") + test_swapping_evictions(fd, size, count); - igt_subtest("major-hang") { - size = 3*gem_aperture_size(fd) / 4; - count = 4; - test_major_evictions(fd, size, count); - } + igt_subtest("minor-hang") + test_minor_evictions(fd, size, count); - igt_stop_hang_helper(); + igt_subtest("major-hang") { + size = 3*gem_aperture_size(fd) / 4; + count = 4; + test_major_evictions(fd, size, count); } - igt_stop_signal_helper(); + + igt_stop_hang_helper(); igt_fixture { + igt_stop_signal_helper(); close(fd); } } diff -Nru intel-gpu-tools-1.13/tests/gem_exec_alignment.c intel-gpu-tools-1.14/tests/gem_exec_alignment.c --- intel-gpu-tools-1.13/tests/gem_exec_alignment.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_exec_alignment.c 2016-03-01 15:59:21.000000000 +0000 @@ -40,33 +40,128 @@ IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using object alignments"); -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb) +static uint32_t find_last_bit(uint64_t x) { - return drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb); + uint32_t i = 0; + while (x) { + x >>= 1; + i++; + } + return i; +} + +static uint32_t file_max(void) +{ + static uint32_t max; + if (max == 0) { + FILE *file = fopen("/proc/sys/fs/file-max", "r"); + max = 80000; + if (file) { + igt_assert(fscanf(file, "%d", &max) == 1); + fclose(file); + } + max /= 2; + } + return max; } -igt_simple_main +static void many(int fd) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_exec_object2 *execobj; + struct drm_i915_gem_execbuffer2 execbuf; + uint64_t gtt_size, ram_size; + uint64_t alignment, max_alignment, count, i; + + gtt_size = gem_aperture_size(fd); + if (!gem_uses_full_ppgtt(fd)) + gtt_size /= 2; /* We have to *share* our GTT! */ + ram_size = intel_get_total_ram_mb(); + ram_size *= 1024 * 1024; + count = ram_size / 4096; + if (count > file_max()) /* vfs cap */ + count = file_max(); + max_alignment = find_last_bit(gtt_size / count); + if (max_alignment <= 13) + max_alignment = 4096; + else + max_alignment = 1ull << (max_alignment - 1); + count = gtt_size / max_alignment / 2; + + igt_info("gtt_size=%lld MiB, max-alignment=%lld, count=%lld\n", + (long long)gtt_size/1024/1024, + (long long)max_alignment, + (long long)count); + intel_require_memory(count, 4096, CHECK_RAM); + + execobj = calloc(sizeof(*execobj), count + 1); + igt_assert(execobj); + + for (i = 0; i < count; i++) { + execobj[i].handle = gem_create(fd, 4096); + if ((gtt_size-1) >> 32) + execobj[i].flags = 1<<3; /* EXEC_OBJECT_SUPPORTS_48B_ADDRESS */ + } + execobj[i].handle = gem_create(fd, 4096); + if ((gtt_size-1) >> 32) + execobj[i].flags = 1<<3; /* EXEC_OBJECT_SUPPORTS_48B_ADDRESS */ + gem_write(fd, execobj[i].handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)execobj; + execbuf.buffer_count = count + 1; + igt_require(__gem_execbuf(fd, &execbuf) == 0); + + for (alignment = 4096; alignment < gtt_size; alignment <<= 1) { + for (i = 0; i < count; i++) + execobj[i].alignment = alignment; + if (alignment > max_alignment) { + uint64_t factor = alignment / max_alignment; + execbuf.buffer_count = 2*count / factor; + execbuf.buffers_ptr = + (uintptr_t)(execobj + count - execbuf.buffer_count + 1); + } + + igt_debug("testing %lld x alignment=%#llx [%db]\n", + (long long)execbuf.buffer_count - 1, + (long long)alignment, + find_last_bit(alignment)-1); + gem_execbuf(fd, &execbuf); + for(i = count - execbuf.buffer_count + 1; i < count; i++) { + igt_assert_eq_u64(execobj[i].alignment, alignment); + igt_assert_eq_u64(execobj[i].offset % alignment, 0); + } + } + + for (i = 0; i < count; i++) + gem_close(fd, execobj[i].handle); + gem_close(fd, execobj[i].handle); + free(execobj); +} + +static void single(int fd) { struct drm_i915_gem_exec_object2 execobj; struct drm_i915_gem_execbuffer2 execbuf; uint32_t batch = MI_BATCH_BUFFER_END; + uint64_t gtt_size; int non_pot; - int fd; - - igt_skip_on_simulation(); - - fd = drm_open_driver(DRIVER_INTEL); memset(&execobj, 0, sizeof(execobj)); - memset(&execbuf, 0, sizeof(execbuf)); - execobj.handle = gem_create(fd, 4096); + execobj.flags = 1<<3; /* EXEC_OBJECT_SUPPORTS_48B_ADDRESS */ gem_write(fd, execobj.handle, 0, &batch, sizeof(batch)); + memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = (uintptr_t)&execobj; execbuf.buffer_count = 1; - gem_execbuf(fd, &execbuf); + gtt_size = gem_aperture_size(fd); + if (__gem_execbuf(fd, &execbuf)) { + execobj.flags = 0; + gtt_size = 1ull << 32; + gem_execbuf(fd, &execbuf); + } execobj.alignment = 3*4096; non_pot = __gem_execbuf(fd, &execbuf) == 0; @@ -79,7 +174,37 @@ if (!non_pot && execobj.alignment & -execobj.alignment) continue; + igt_debug("starting offset: %#llx, next alignment: %#llx\n", + (long long)execobj.offset, + (long long)execobj.alignment); gem_execbuf(fd, &execbuf); - igt_assert_eq(execobj.offset % execobj.alignment, 0); + igt_assert_eq_u64(execobj.offset % execobj.alignment, 0); } + + for (execobj.alignment = 4096; + execobj.alignment < gtt_size; + execobj.alignment <<= 1) { + igt_debug("starting offset: %#llx, next alignment: %#llx [%db]\n", + (long long)execobj.offset, + (long long)execobj.alignment, + find_last_bit(execobj.alignment)-1); + gem_execbuf(fd, &execbuf); + igt_assert_eq_u64(execobj.offset % execobj.alignment, 0); + } + + gem_close(fd, execobj.handle); +} + +igt_main +{ + int fd = -1; + + igt_fixture + fd = drm_open_driver(DRIVER_INTEL); + + igt_subtest("single") /* basic! */ + single(fd); + igt_subtest("many") + many(fd); + } diff -Nru intel-gpu-tools-1.13/tests/gem_exec_basic.c intel-gpu-tools-1.14/tests/gem_exec_basic.c --- intel-gpu-tools-1.13/tests/gem_exec_basic.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_exec_basic.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright © 2016 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "igt.h" + +IGT_TEST_DESCRIPTION("Basic sanity check of execbuf-ioctl rings."); + +static void noop(int fd, unsigned ring) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 exec; + + gem_require_ring(fd, ring); + + memset(&exec, 0, sizeof(exec)); + exec.handle = gem_create(fd, 4096); + gem_write(fd, exec.handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&exec; + execbuf.buffer_count = 1; + execbuf.flags = ring; + gem_execbuf(fd, &execbuf); + gem_close(fd, exec.handle); +} + +igt_main +{ + const struct intel_execution_engine *e; + int fd = -1; + + igt_fixture + fd = drm_open_driver(DRIVER_INTEL); + + for (e = intel_execution_engines; e->name; e++) + igt_subtest_f("basic-%s", e->name) + noop(fd, e->exec_id | e->flags); + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/gem_exec_nop.c intel-gpu-tools-1.14/tests/gem_exec_nop.c --- intel-gpu-tools-1.13/tests/gem_exec_nop.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_exec_nop.c 2016-03-01 15:59:21.000000000 +0000 @@ -48,64 +48,6 @@ const uint32_t batch[2] = {MI_BATCH_BUFFER_END}; int device; -static int sysfs_read(const char *name) -{ - char buf[4096]; - struct stat st; - int sysfd; - int len; - - if (fstat(device, &st)) - return -1; - - sprintf(buf, "/sys/class/drm/card%d/%s", - (int)(st.st_rdev & 0x7f), name); - sysfd = open(buf, O_RDONLY); - if (sysfd < 0) - return -1; - - len = read(sysfd, buf, sizeof(buf)-1); - close(sysfd); - if (len < 0) - return -1; - - buf[len] = '\0'; - return atoi(buf); -} - -static int sysfs_write(const char *name, int value) -{ - char buf[4096]; - struct stat st; - int sysfd; - int len; - - if (fstat(device, &st)) - return -1; - - sprintf(buf, "/sys/class/drm/card%d/%s", - (int)(st.st_rdev & 0x7f), name); - sysfd = open(buf, O_WRONLY); - if (sysfd < 0) - return -1; - - len = sprintf(buf, "%d", value); - len = write(sysfd, buf, len); - close(sysfd); - - if (len < 0) - return len; - - return 0; -} - -static uint64_t elapsed(const struct timespec *start, - const struct timespec *end, - int loop) -{ - return (1000000000ULL*(end->tv_sec - start->tv_sec) + (end->tv_nsec - start->tv_nsec))/loop; -} - static void loop(int fd, uint32_t handle, unsigned ring_id, const char *ring_name) { struct drm_i915_gem_execbuffer2 execbuf; @@ -113,9 +55,6 @@ int count; gem_require_ring(fd, ring_id); - igt_debug("RPS frequency range [%d, %d]\n", - sysfs_read("gt_min_freq_mhz"), - sysfs_read("gt_max_freq_mhz")); memset(&gem_exec, 0, sizeof(gem_exec)); gem_exec[0].handle = handle; @@ -133,119 +72,31 @@ gem_sync(fd, handle); for (count = 1; count <= SLOW_QUICK(1<<17, 1<<4); count <<= 1) { - const int reps = 7; - igt_stats_t stats; - int n; - - igt_stats_init_with_size(&stats, reps); - - for (n = 0; n < reps; n++) { - struct timespec start, end; - int loops = count; - usleep(200000); /* wait 200ms for the hw to go back to sleep */ - clock_gettime(CLOCK_MONOTONIC, &start); - while (loops--) - do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); - gem_sync(fd, handle); - clock_gettime(CLOCK_MONOTONIC, &end); - igt_stats_push(&stats, elapsed(&start, &end, count)); - } - - igt_info("Time to exec x %d: %7.3fµs (ring=%s)\n", - count, igt_stats_get_trimean(&stats)/1000, ring_name); - fflush(stdout); - - igt_stats_fini(&stats); + int loops = count; + gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, 0); + while (loops--) + do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); + gem_sync(fd, handle); } } -static void set_auto_freq(void) -{ - int min = sysfs_read("gt_RPn_freq_mhz"); - int max = sysfs_read("gt_RP0_freq_mhz"); - if (max <= min) - return; - - igt_debug("Setting min to %dMHz, and max to %dMHz\n", min, max); - sysfs_write("gt_min_freq_mhz", min); - sysfs_write("gt_max_freq_mhz", max); -} - -static void set_min_freq(void) -{ - int min = sysfs_read("gt_RPn_freq_mhz"); - igt_require(min > 0); - igt_debug("Setting min/max to %dMHz\n", min); - (void)sysfs_write("gt_idle_freq_mhz", min); - (void)sysfs_write("gt_boost_freq_mhz", min); - igt_require(sysfs_write("gt_min_freq_mhz", min) == 0 && - sysfs_write("gt_max_freq_mhz", min) == 0); -} - -static void set_max_freq(void) -{ - int max = sysfs_read("gt_RP0_freq_mhz"); - igt_require(max > 0); - igt_debug("Setting min/max to %dMHz\n", max); - (void)sysfs_write("gt_idle_freq_mhz", max); - (void)sysfs_write("gt_boost_freq_mhz", max); - igt_require(sysfs_write("gt_max_freq_mhz", max) == 0 && - sysfs_write("gt_min_freq_mhz", max) == 0); -} - igt_main { - const struct { - const char *suffix; - void (*func)(void); - } rps[] = { - { "", set_auto_freq }, - { "-min", set_min_freq }, - { "-max", set_max_freq }, - { NULL, NULL }, - }, *r; - int min = -1, max = -1, boost = -1, idle = -1; + const struct intel_execution_engine *e; uint32_t handle = 0; igt_fixture { device = drm_open_driver(DRIVER_INTEL); - - min = sysfs_read("gt_min_freq_mhz"); - max = sysfs_read("gt_max_freq_mhz"); - boost = sysfs_read("gt_boost_freq_mhz"); - idle = sysfs_read("gt_idle_freq_mhz"); - handle = gem_create(device, 4096); gem_write(device, handle, 0, batch, sizeof(batch)); } - for (r = rps; r->suffix; r++) { - igt_fixture r->func(); - - igt_subtest_f("render%s", r->suffix) - loop(device, handle, I915_EXEC_RENDER, "render"); - - igt_subtest_f("bsd%s", r->suffix) - loop(device, handle, I915_EXEC_BSD, "bsd"); - - igt_subtest_f("blt%s", r->suffix) - loop(device, handle, I915_EXEC_BLT, "blt"); - - igt_subtest_f("vebox%s", r->suffix) - loop(device, handle, LOCAL_I915_EXEC_VEBOX, "vebox"); - } + for (e = intel_execution_engines; e->name; e++) + igt_subtest_f("%s", e->name) + loop(device, handle, e->exec_id | e->flags, e->name); igt_fixture { gem_close(device, handle); - - if (min > 0) - sysfs_write("gt_min_freq_mhz", min); - if (max > 0) - sysfs_write("gt_max_freq_mhz", max); - if (boost > 0) - sysfs_write("gt_boost_freq_mhz", boost); - if (idle > 0) - sysfs_write("gt_idle_freq_mhz", idle); close(device); } } diff -Nru intel-gpu-tools-1.13/tests/gem_exec_params.c intel-gpu-tools-1.14/tests/gem_exec_params.c --- intel-gpu-tools-1.13/tests/gem_exec_params.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_exec_params.c 2016-03-01 15:59:21.000000000 +0000 @@ -46,6 +46,30 @@ #define LOCAL_I915_EXEC_BSD_RING2 (2<<13) #define LOCAL_I915_EXEC_RESOURCE_STREAMER (1<<15) +static bool has_ring(int fd, unsigned ring_exec_flags) +{ + switch (ring_exec_flags & I915_EXEC_RING_MASK) { + case 0: + case I915_EXEC_RENDER: + return true; + + case I915_EXEC_BSD: + if (ring_exec_flags & LOCAL_I915_EXEC_BSD_MASK) + return gem_has_bsd2(fd); + else + return gem_has_bsd(fd); + + case I915_EXEC_BLT: + return gem_has_blt(fd); + + case I915_EXEC_VEBOX: + return gem_has_vebox(fd); + } + + igt_assert_f(0, "invalid exec flag 0x%x\n", ring_exec_flags); + return false; +} + struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 gem_exec[1]; uint32_t batch[2] = {MI_BATCH_BUFFER_END}; @@ -54,6 +78,8 @@ igt_main { + const struct intel_execution_engine *e; + igt_fixture { fd = drm_open_driver(DRIVER_INTEL); @@ -85,13 +111,12 @@ } igt_subtest("control") { - igt_assert(drmIoctl(fd, - DRM_IOCTL_I915_GEM_EXECBUFFER2, - &execbuf) == 0); - execbuf.flags = I915_EXEC_RENDER; - igt_assert(drmIoctl(fd, - DRM_IOCTL_I915_GEM_EXECBUFFER2, - &execbuf) == 0); + for (e = intel_execution_engines; e->name; e++) { + if (has_ring(fd, e->exec_id | e->flags)) { + execbuf.flags = e->exec_id | e->flags; + gem_execbuf(fd, &execbuf); + } + } } #define RUN_FAIL(expected_errno) do { \ diff -Nru intel-gpu-tools-1.13/tests/gem_exec_parse.c intel-gpu-tools-1.14/tests/gem_exec_parse.c --- intel-gpu-tools-1.13/tests/gem_exec_parse.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_exec_parse.c 2016-03-01 15:59:21.000000000 +0000 @@ -35,14 +35,6 @@ #define I915_PARAM_CMD_PARSER_VERSION 28 #endif -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) -{ - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) - return -errno; - - return 0; -} - static void exec_batch_patched(int fd, uint32_t cmd_bo, uint32_t *cmds, int size, int patch_offset, uint64_t expected_value) { @@ -306,7 +298,7 @@ rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); igt_require(!rc && parser_version > 0); - igt_require(gem_uses_aliasing_ppgtt(fd)); + igt_require(gem_uses_ppgtt(fd)); handle = gem_create(fd, 4096); diff -Nru intel-gpu-tools-1.13/tests/gem_exec_reloc.c intel-gpu-tools-1.14/tests/gem_exec_reloc.c --- intel-gpu-tools-1.13/tests/gem_exec_reloc.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_exec_reloc.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,242 @@ +/* + * Copyright © 2016 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "igt.h" + +IGT_TEST_DESCRIPTION("Basic sanity check of execbuf-ioctl relocations."); + +static uint32_t find_last_set(uint64_t x) +{ + uint32_t i = 0; + while (x) { + x >>= 1; + i++; + } + return i; +} + +static void write_dword(int fd, + uint32_t target_handle, + uint64_t target_offset, + uint32_t value) +{ + int gen = intel_gen(intel_get_drm_devid(fd)); + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj[2]; + struct drm_i915_gem_relocation_entry reloc; + uint32_t buf[16]; + int i; + + memset(obj, 0, sizeof(obj)); + obj[0].handle = target_handle; + obj[1].handle = gem_create(fd, 4096); + + i = 0; + buf[i++] = MI_STORE_DWORD_IMM | (gen < 6 ? 1<<22 : 0); + if (gen >= 8) { + buf[i++] = target_offset; + buf[i++] = target_offset >> 32; + } else if (gen >= 4) { + buf[i++] = 0; + buf[i++] = target_offset; + } else { + buf[i-1]--; + buf[i++] = target_offset; + } + buf[i++] = value; + buf[i++] = MI_BATCH_BUFFER_END; + gem_write(fd, obj[1].handle, 0, buf, sizeof(buf)); + + memset(&reloc, 0, sizeof(reloc)); + if (gen >= 8 || gen < 4) + reloc.offset = sizeof(uint32_t); + else + reloc.offset = 2*sizeof(uint32_t); + reloc.target_handle = target_handle; + reloc.delta = target_offset; + reloc.read_domains = I915_GEM_DOMAIN_INSTRUCTION; + reloc.write_domain = I915_GEM_DOMAIN_INSTRUCTION; + + obj[1].relocation_count = 1; + obj[1].relocs_ptr = (uintptr_t)&reloc; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)obj; + execbuf.buffer_count = 2; + execbuf.flags = I915_EXEC_SECURE; + gem_execbuf(fd, &execbuf); + gem_close(fd, obj[1].handle); +} + +enum mode { MEM, CPU, WC, GTT }; +static void from_mmap(int fd, uint64_t size, enum mode mode) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj; + struct drm_i915_gem_relocation_entry *relocs; + uint32_t reloc_handle; + uint64_t value; + uint64_t max, i; + int retry = 2; + + intel_require_memory(1, size, CHECK_RAM); + + memset(&obj, 0, sizeof(obj)); + obj.handle = gem_create(fd, 4096); + gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe)); + + max = size / sizeof(*relocs); + switch (mode) { + case MEM: + relocs = mmap(0, size, + PROT_WRITE, MAP_PRIVATE | MAP_ANON, + -1, 0); + igt_assert(relocs != (void *)-1); + break; + case GTT: + reloc_handle = gem_create(fd, size); + relocs = gem_mmap__gtt(fd, reloc_handle, size, PROT_WRITE); + gem_set_domain(fd, reloc_handle, + I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); + gem_close(fd, reloc_handle); + break; + case CPU: + reloc_handle = gem_create(fd, size); + relocs = gem_mmap__cpu(fd, reloc_handle, 0, size, PROT_WRITE); + gem_set_domain(fd, reloc_handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + gem_close(fd, reloc_handle); + break; + case WC: + reloc_handle = gem_create(fd, size); + relocs = gem_mmap__wc(fd, reloc_handle, 0, size, PROT_WRITE); + gem_set_domain(fd, reloc_handle, + I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); + gem_close(fd, reloc_handle); + break; + } + + for (i = 0; i < max; i++) { + relocs[i].target_handle = obj.handle; + relocs[i].presumed_offset = ~0ull; + relocs[i].offset = 1024; + relocs[i].delta = i; + relocs[i].read_domains = I915_GEM_DOMAIN_INSTRUCTION; + relocs[i].write_domain = 0; + } + obj.relocation_count = max; + obj.relocs_ptr = (uintptr_t)relocs; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&obj; + execbuf.buffer_count = 1; + while (relocs[0].presumed_offset == ~0ull && retry--) + gem_execbuf(fd, &execbuf); + gem_read(fd, obj.handle, 1024, &value, sizeof(value)); + gem_close(fd, obj.handle); + + igt_assert_eq_u64(value, obj.offset + max - 1); + if (relocs[0].presumed_offset != ~0ull) { + for (i = 0; i < max; i++) + igt_assert_eq_u64(relocs[i].presumed_offset, + obj.offset); + } + munmap(relocs, size); +} + +static void from_gpu(int fd) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj; + struct drm_i915_gem_relocation_entry *relocs; + uint32_t reloc_handle; + uint64_t value; + + memset(&obj, 0, sizeof(obj)); + obj.handle = gem_create(fd, 4096); + gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe)); + + reloc_handle = gem_create(fd, 4096); + write_dword(fd, + reloc_handle, + offsetof(struct drm_i915_gem_relocation_entry, + target_handle), + obj.handle); + write_dword(fd, + reloc_handle, + offsetof(struct drm_i915_gem_relocation_entry, + offset), + 1024); + write_dword(fd, + reloc_handle, + offsetof(struct drm_i915_gem_relocation_entry, + read_domains), + I915_GEM_DOMAIN_INSTRUCTION); + + relocs = gem_mmap__cpu(fd, reloc_handle, 0, 4096, PROT_READ); + gem_set_domain(fd, reloc_handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + gem_close(fd, reloc_handle); + + obj.relocation_count = 1; + obj.relocs_ptr = (uintptr_t)relocs; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&obj; + execbuf.buffer_count = 1; + gem_execbuf(fd, &execbuf); + gem_read(fd, obj.handle, 1024, &value, sizeof(value)); + gem_close(fd, obj.handle); + + igt_assert_eq_u64(value, obj.offset); + igt_assert_eq_u64(relocs->presumed_offset, obj.offset); + munmap(relocs, 4096); +} + +igt_main +{ + uint64_t size; + int fd = -1; + + igt_fixture + fd = drm_open_driver_master(DRIVER_INTEL); + + for (size = 4096; size <= 4ull*1024*1024*1024; size <<= 1) { + igt_subtest_f("mmap-%u", find_last_set(size) - 1) + from_mmap(fd, size, MEM); + igt_subtest_f("cpu-%u", find_last_set(size) - 1) + from_mmap(fd, size, CPU); + igt_subtest_f("wc-%u", find_last_set(size) - 1) + from_mmap(fd, size, WC); + igt_subtest_f("gtt-%u", find_last_set(size) - 1) + from_mmap(fd, size, GTT); + } + + igt_subtest("gpu") + from_gpu(fd); + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/gem_fenced_exec_thrash.c intel-gpu-tools-1.14/tests/gem_fenced_exec_thrash.c --- intel-gpu-tools-1.13/tests/gem_fenced_exec_thrash.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_fenced_exec_thrash.c 2016-03-01 15:59:21.000000000 +0000 @@ -141,14 +141,6 @@ reloc->write_domain = 0; } -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb)) - err = errno; - return err; -} - #define BUSY_LOAD (1 << 0) #define INTERRUPTIBLE (1 << 1) @@ -200,8 +192,8 @@ if (flags & BUSY_LOAD) emit_dummy_load(); - igt_assert_eq(__gem_execbuf(fd, &execbuf[0]), expected_errno); - igt_assert_eq(__gem_execbuf(fd, &execbuf[1]), expected_errno); + igt_assert_eq(__gem_execbuf(fd, &execbuf[0]), -expected_errno); + igt_assert_eq(__gem_execbuf(fd, &execbuf[1]), -expected_errno); } while (--loop); if (flags & INTERRUPTIBLE) diff -Nru intel-gpu-tools-1.13/tests/gem_flink_race.c intel-gpu-tools-1.14/tests/gem_flink_race.c --- intel-gpu-tools-1.13/tests/gem_flink_race.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_flink_race.c 2016-03-01 15:59:21.000000000 +0000 @@ -44,28 +44,11 @@ * in the flink name and corresponding reference getting leaked. */ -/* We want lockless and I'm to lazy to dig out an atomic libarary. On x86 this +/* We want lockless and I'm to lazy to dig out an atomic library. On x86 this * works, too. */ volatile int pls_die = 0; int fd; -static int get_object_count(void) -{ - FILE *file; - int scanned, ret; - - igt_drop_caches_set(DROP_RETIRE | DROP_ACTIVE); - - file = igt_debugfs_fopen("i915_gem_objects", "r"); - - scanned = fscanf(file, "%i objects", &ret); - igt_assert_eq(scanned, 1); - igt_debug("Reports %d objects\n", ret); - - return ret; -} - - static void *thread_fn_flink_name(void *p) { struct drm_gem_open open_struct; @@ -164,8 +147,7 @@ * up the counts */ fake = drm_open_driver(DRIVER_INTEL); - gem_quiescent_gpu(fake); - obj_count = get_object_count(); + obj_count = igt_get_stable_obj_count(fake); num_threads = sysconf(_SC_NPROCESSORS_ONLN); @@ -190,8 +172,7 @@ close(fd); - gem_quiescent_gpu(fake); - obj_count = get_object_count() - obj_count; + obj_count = igt_get_stable_obj_count(fake) - obj_count; igt_info("leaked %i objects\n", obj_count); diff -Nru intel-gpu-tools-1.13/tests/gem_gtt_hog.c intel-gpu-tools-1.14/tests/gem_gtt_hog.c --- intel-gpu-tools-1.13/tests/gem_gtt_hog.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_gtt_hog.c 2016-03-01 15:59:21.000000000 +0000 @@ -174,6 +174,6 @@ igt_waitchildren(); gettimeofday(&end, NULL); - igt_info("Time to execute %lu children: %7.3fms\n", + igt_info("Time to execute %zu children: %7.3fms\n", ARRAY_SIZE(children), elapsed(&start, &end) / 1000); } diff -Nru intel-gpu-tools-1.13/tests/gem_mmap_gtt.c intel-gpu-tools-1.14/tests/gem_mmap_gtt.c --- intel-gpu-tools-1.13/tests/gem_mmap_gtt.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_mmap_gtt.c 2016-03-01 15:59:21.000000000 +0000 @@ -254,6 +254,45 @@ } static void +test_coherency(int fd) +{ + uint32_t handle; + uint32_t *gtt, *cpu; + int i; + + igt_require(igt_setup_clflush()); + + handle = gem_create(fd, OBJECT_SIZE); + + gtt = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); + cpu = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); + set_domain_gtt(fd, handle); + + for (i = 0; i < OBJECT_SIZE / 64; i++) { + int x = 16*i + (i%16); + gtt[x] = i; + igt_clflush_range(&cpu[x], sizeof(cpu[x])); + igt_assert_eq(cpu[x], i); + } + + munmap(cpu, OBJECT_SIZE); + munmap(gtt, OBJECT_SIZE); + gem_close(fd, handle); +} + +static int tile_width(uint32_t devid, int tiling) +{ + if (intel_gen(devid) == 2) + return 128; + else if (tiling == I915_TILING_X) + return 512; + else if (IS_915(devid)) + return 512; + else + return 128; +} + +static void test_huge_bo(int fd, int huge, int tiling) { uint32_t bo; @@ -261,18 +300,31 @@ char *tiled_pattern; char *linear_pattern; uint64_t size, last_offset; - int pitch = tiling == I915_TILING_Y ? 128 : 512; + uint32_t devid = intel_get_drm_devid(fd); + int pitch = tile_width(devid, tiling); int i; switch (huge) { case -1: size = gem_mappable_aperture_size() / 2; + + /* Power of two fence size, natural fence + * alignment, and the guard page at the end + * gtt means that if the entire gtt is + * mappable, we can't usually fit in a tiled + * object half the size of the gtt. Let's use + * a quarter size one instead. + */ + if (tiling && + intel_gen(intel_get_drm_devid(fd)) < 4 && + size >= gem_global_aperture_size(fd) / 2) + size /= 2; break; case 0: size = gem_mappable_aperture_size() + PAGE_SIZE; break; default: - size = gem_aperture_size(fd) + PAGE_SIZE; + size = gem_global_aperture_size(fd) + PAGE_SIZE; break; } intel_require_memory(1, size, CHECK_RAM); @@ -327,6 +379,7 @@ static void test_huge_copy(int fd, int huge, int tiling_a, int tiling_b) { + uint32_t devid = intel_get_drm_devid(fd); uint64_t huge_object_size, i; uint32_t bo, *pattern_a, *pattern_b; char *a, *b; @@ -342,7 +395,7 @@ huge_object_size = gem_mappable_aperture_size() + PAGE_SIZE; break; default: - huge_object_size = gem_aperture_size(fd) + PAGE_SIZE; + huge_object_size = gem_global_aperture_size(fd) + PAGE_SIZE; break; } intel_require_memory(2, huge_object_size, CHECK_RAM); @@ -357,29 +410,34 @@ bo = gem_create(fd, huge_object_size); if (tiling_a) - igt_require(__gem_set_tiling(fd, bo, tiling_a, tiling_a == I915_TILING_Y ? 128 : 512) == 0); + igt_require(__gem_set_tiling(fd, bo, tiling_a, tile_width(devid, tiling_a)) == 0); a = __gem_mmap__gtt(fd, bo, huge_object_size, PROT_READ | PROT_WRITE); igt_require(a); gem_close(fd, bo); - for (i = 0; i < huge_object_size / PAGE_SIZE; i++) + for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { memcpy(a + PAGE_SIZE*i, pattern_a, PAGE_SIZE); + igt_progress("Writing a ", i, huge_object_size / PAGE_SIZE); + } bo = gem_create(fd, huge_object_size); if (tiling_b) - igt_require(__gem_set_tiling(fd, bo, tiling_b, tiling_b == I915_TILING_Y ? 128 : 512) == 0); + igt_require(__gem_set_tiling(fd, bo, tiling_b, tile_width(devid, tiling_b)) == 0); b = __gem_mmap__gtt(fd, bo, huge_object_size, PROT_READ | PROT_WRITE); igt_require(b); gem_close(fd, bo); - for (i = 0; i < huge_object_size / PAGE_SIZE; i++) + for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { memcpy(b + PAGE_SIZE*i, pattern_b, PAGE_SIZE); + igt_progress("Writing b ", i, huge_object_size / PAGE_SIZE); + } for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { if (i & 1) memcpy(a + i *PAGE_SIZE, b + i*PAGE_SIZE, PAGE_SIZE); else memcpy(b + i *PAGE_SIZE, a + i*PAGE_SIZE, PAGE_SIZE); + igt_progress("Copying a<->b ", i, huge_object_size / PAGE_SIZE); } for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { @@ -387,6 +445,7 @@ igt_assert(memcmp(pattern_b, a + PAGE_SIZE*i, PAGE_SIZE) == 0); else igt_assert(memcmp(pattern_a, a + PAGE_SIZE*i, PAGE_SIZE) == 0); + igt_progress("Checking a ", i, huge_object_size / PAGE_SIZE); } munmap(a, huge_object_size); @@ -395,6 +454,7 @@ igt_assert(memcmp(pattern_b, b + PAGE_SIZE*i, PAGE_SIZE) == 0); else igt_assert(memcmp(pattern_a, b + PAGE_SIZE*i, PAGE_SIZE) == 0); + igt_progress("Checking b ", i, huge_object_size / PAGE_SIZE); } munmap(b, huge_object_size); @@ -520,6 +580,8 @@ test_write(fd); igt_subtest("basic-write-gtt") test_write_gtt(fd); + igt_subtest("coherency") + test_coherency(fd); igt_subtest("basic-read-write") test_read_write(fd, READ_BEFORE_WRITE); igt_subtest("basic-write-read") diff -Nru intel-gpu-tools-1.13/tests/gem_mmap_wc.c intel-gpu-tools-1.14/tests/gem_mmap_wc.c --- intel-gpu-tools-1.13/tests/gem_mmap_wc.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_mmap_wc.c 2016-03-01 15:59:21.000000000 +0000 @@ -218,6 +218,33 @@ } static void +test_coherency(int fd) +{ + uint32_t handle; + uint32_t *wc, *cpu; + int i; + + igt_require(igt_setup_clflush()); + + handle = gem_create(fd, OBJECT_SIZE); + + wc = gem_mmap__wc(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); + cpu = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); + gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); + + for (i = 0; i < OBJECT_SIZE / 64; i++) { + int x = 16*i + (i%16); + wc[x] = i; + igt_clflush_range(&cpu[x], sizeof(cpu[x])); + igt_assert_eq(cpu[x], i); + } + + munmap(cpu, OBJECT_SIZE); + munmap(wc, OBJECT_SIZE); + gem_close(fd, handle); +} + +static void test_write_gtt(int fd) { uint32_t dst; @@ -446,6 +473,8 @@ test_read(fd); igt_subtest("write") test_write(fd); + igt_subtest("coherency") + test_coherency(fd); igt_subtest("write-gtt") test_write_gtt(fd); igt_subtest("read-write") diff -Nru intel-gpu-tools-1.13/tests/gem_partial_pwrite_pread.c intel-gpu-tools-1.14/tests/gem_partial_pwrite_pread.c --- intel-gpu-tools-1.13/tests/gem_partial_pwrite_pread.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_partial_pwrite_pread.c 2016-03-01 15:59:21.000000000 +0000 @@ -78,12 +78,12 @@ } static void -blt_bo_fill(drm_intel_bo *tmp_bo, drm_intel_bo *bo, int val) +blt_bo_fill(drm_intel_bo *tmp_bo, drm_intel_bo *bo, uint8_t val) { uint8_t *gtt_ptr; int i; - drm_intel_gem_bo_map_gtt(tmp_bo); + do_or_die(drm_intel_gem_bo_map_gtt(tmp_bo)); gtt_ptr = tmp_bo->virtual; for (i = 0; i < BO_SIZE; i++) @@ -102,30 +102,33 @@ #define ROUNDS 1000 uint8_t tmp[BO_SIZE]; +static void get_range(int *start, int *len) +{ + *start = random() % (BO_SIZE - 1); + *len = random() % (BO_SIZE - *start - 1) + 1; +} + static void test_partial_reads(void) { int i, j; igt_info("checking partial reads\n"); for (i = 0; i < ROUNDS; i++) { + uint8_t val = i; int start, len; - int val = i % 256; - - blt_bo_fill(staging_bo, scratch_bo, i); - start = random() % BO_SIZE; - len = random() % (BO_SIZE-start) + 1; + blt_bo_fill(staging_bo, scratch_bo, val); - drm_intel_bo_get_subdata(scratch_bo, start, len, tmp); + get_range(&start, &len); + do_or_die(drm_intel_bo_get_subdata(scratch_bo, start, len, tmp)); for (j = 0; j < len; j++) { igt_assert_f(tmp[j] == val, - "mismatch at %i, got: %i, expected: %i\n", - j, tmp[j], val); + "mismatch at %i [%i + %i], got: %i, expected: %i\n", + j, start, len, tmp[j], val); } igt_progress("partial reads test: ", i, ROUNDS); } - } static void test_partial_writes(void) @@ -135,16 +138,14 @@ igt_info("checking partial writes\n"); for (i = 0; i < ROUNDS; i++) { + uint8_t val = i; int start, len; - int val = i % 256; - blt_bo_fill(staging_bo, scratch_bo, i); - - start = random() % BO_SIZE; - len = random() % (BO_SIZE-start) + 1; + blt_bo_fill(staging_bo, scratch_bo, val); memset(tmp, i + 63, BO_SIZE); + get_range(&start, &len); drm_intel_bo_subdata(scratch_bo, start, len, tmp); copy_bo(scratch_bo, staging_bo); @@ -153,24 +154,23 @@ for (j = 0; j < start; j++) { igt_assert_f(gtt_ptr[j] == val, - "mismatch at %i, got: %i, expected: %i\n", - j, tmp[j], val); + "mismatch at %i (start=%i), got: %i, expected: %i\n", + j, start, tmp[j], val); } for (; j < start + len; j++) { igt_assert_f(gtt_ptr[j] == tmp[0], - "mismatch at %i, got: %i, expected: %i\n", - j, tmp[j], i); + "mismatch at %i (%i/%i), got: %i, expected: %i\n", + j, j-start, len, tmp[j], i); } for (; j < BO_SIZE; j++) { igt_assert_f(gtt_ptr[j] == val, - "mismatch at %i, got: %i, expected: %i\n", - j, tmp[j], val); + "mismatch at %i (end=%i), got: %i, expected: %i\n", + j, start+len, tmp[j], val); } drm_intel_gem_bo_unmap_gtt(staging_bo); igt_progress("partial writes test: ", i, ROUNDS); } - } static void test_partial_read_writes(void) @@ -180,53 +180,49 @@ igt_info("checking partial writes after partial reads\n"); for (i = 0; i < ROUNDS; i++) { + uint8_t val = i; int start, len; - int val = i % 256; - blt_bo_fill(staging_bo, scratch_bo, i); + blt_bo_fill(staging_bo, scratch_bo, val); /* partial read */ - start = random() % BO_SIZE; - len = random() % (BO_SIZE-start) + 1; - + get_range(&start, &len); drm_intel_bo_get_subdata(scratch_bo, start, len, tmp); for (j = 0; j < len; j++) { igt_assert_f(tmp[j] == val, - "mismatch in read at %i, got: %i, expected: %i\n", - j, tmp[j], val); + "mismatch in read at %i [%i + %i], got: %i, expected: %i\n", + j, start, len, tmp[j], val); } /* Change contents through gtt to make the pread cachelines * stale. */ - val = (i + 17) % 256; + val += 17; blt_bo_fill(staging_bo, scratch_bo, val); /* partial write */ - start = random() % BO_SIZE; - len = random() % (BO_SIZE-start) + 1; - memset(tmp, i + 63, BO_SIZE); + get_range(&start, &len); drm_intel_bo_subdata(scratch_bo, start, len, tmp); copy_bo(scratch_bo, staging_bo); - drm_intel_gem_bo_map_gtt(staging_bo); + do_or_die(drm_intel_gem_bo_map_gtt(staging_bo)); gtt_ptr = staging_bo->virtual; for (j = 0; j < start; j++) { igt_assert_f(gtt_ptr[j] == val, - "mismatch at %i, got: %i, expected: %i\n", - j, tmp[j], val); + "mismatch at %i (start=%i), got: %i, expected: %i\n", + j, start, tmp[j], val); } for (; j < start + len; j++) { igt_assert_f(gtt_ptr[j] == tmp[0], - "mismatch at %i, got: %i, expected: %i\n", - j, tmp[j], tmp[0]); + "mismatch at %i (%i/%i), got: %i, expected: %i\n", + j, j - start, len, tmp[j], tmp[0]); } for (; j < BO_SIZE; j++) { igt_assert_f(gtt_ptr[j] == val, - "mismatch at %i, got: %i, expected: %i\n", - j, tmp[j], val); + "mismatch at %i (end=%i), got: %i, expected: %i\n", + j, start + len, tmp[j], val); } drm_intel_gem_bo_unmap_gtt(staging_bo); diff -Nru intel-gpu-tools-1.13/tests/gem_ppgtt.c intel-gpu-tools-1.14/tests/gem_ppgtt.c --- intel-gpu-tools-1.13/tests/gem_ppgtt.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_ppgtt.c 2016-03-01 15:59:21.000000000 +0000 @@ -44,22 +44,6 @@ #define HEIGHT 512 #define SIZE (HEIGHT*STRIDE) -static bool uses_full_ppgtt(int fd) -{ - struct drm_i915_getparam gp; - int val = 0; - - memset(&gp, 0, sizeof(gp)); - gp.param = 18; /* HAS_ALIASING_PPGTT */ - gp.value = &val; - - if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp)) - return 0; - - errno = 0; - return val > 1; -} - static drm_intel_bo *create_bo(drm_intel_bufmgr *bufmgr, uint32_t pixel) { @@ -240,7 +224,7 @@ uint64_t offset, offset_new; fd = drm_open_driver(DRIVER_INTEL); - igt_require(uses_full_ppgtt(fd)); + igt_require(gem_uses_full_ppgtt(fd)); bo = gem_create(fd, 4096); name = gem_flink(fd, bo); @@ -277,7 +261,7 @@ const int retries = 50; fd = drm_open_driver(DRIVER_INTEL); - igt_require(uses_full_ppgtt(fd)); + igt_require(gem_uses_full_ppgtt(fd)); bo = gem_create(fd, 4096); name = gem_flink(fd, bo); diff -Nru intel-gpu-tools-1.13/tests/gem_pread_after_blit.c intel-gpu-tools-1.14/tests/gem_pread_after_blit.c --- intel-gpu-tools-1.13/tests/gem_pread_after_blit.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_pread_after_blit.c 2016-03-01 15:59:21.000000000 +0000 @@ -233,10 +233,8 @@ do_test(fd, t->cache, src, start, dst, 100, no_hang); igt_stop_signal_helper(); - igt_subtest_f("%s-hang", t->name) { - igt_require_hang_ring(fd, -1); + igt_subtest_f("%s-hang", t->name) do_test(fd, t->cache, src, start, dst, 1, bcs_hang); - } } igt_fixture { diff -Nru intel-gpu-tools-1.13/tests/gem_pread.c intel-gpu-tools-1.14/tests/gem_pread.c --- intel-gpu-tools-1.13/tests/gem_pread.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_pread.c 2016-03-01 15:59:21.000000000 +0000 @@ -40,6 +40,10 @@ #include "drm.h" #define OBJECT_SIZE 16384 +#define LARGE_OBJECT_SIZE 1024 * 1024 +#define KGRN "\x1B[32m" +#define KRED "\x1B[31m" +#define KNRM "\x1B[0m" static void do_gem_read(int fd, uint32_t handle, void *buf, int len, int loops) { @@ -75,12 +79,16 @@ uint32_t *src, dst; +uint32_t *dst_user, src_stolen, large_stolen; +uint32_t *stolen_pf_user, *stolen_nopf_user; int fd, count; int main(int argc, char **argv) { int object_size = 0; - uint32_t buf[20]; + double usecs; + char buf[100]; + const char* bps; const struct { int level; const char *name; @@ -105,6 +113,8 @@ dst = gem_create(fd, object_size); src = malloc(object_size); + src_stolen = gem_create_stolen(fd, object_size); + dst_user = malloc(object_size); } igt_subtest("basic") { @@ -114,10 +124,10 @@ gettimeofday(&start, NULL); do_gem_read(fd, dst, src, object_size, count); gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); igt_info("Time to pread %d bytes x %6d: %7.3fµs, %s\n", - object_size, count, - elapsed(&start, &end, count), - bytes_per_sec((char *)buf, object_size/elapsed(&start, &end, count)*1e6)); + object_size, count, usecs, bps); fflush(stdout); } } @@ -132,18 +142,102 @@ gettimeofday(&start, NULL); do_gem_read(fd, dst, src, object_size, count); gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); igt_info("Time to %s pread %d bytes x %6d: %7.3fµs, %s\n", - c->name, object_size, count, - elapsed(&start, &end, count), - bytes_per_sec((char *)buf, object_size/elapsed(&start, &end, count)*1e6)); + c->name, object_size, count, usecs, bps); fflush(stdout); } } } + igt_subtest("stolen-normal") { + for (count = 1; count <= 1<<17; count <<= 1) { + struct timeval start, end; + + gettimeofday(&start, NULL); + do_gem_read(fd, src_stolen, dst_user, object_size, count); + gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); + igt_info("Time to pread %d bytes x %6d: %7.3fµs, %s\n", + object_size, count, usecs, bps); + fflush(stdout); + } + } + for (c = cache; c->level != -1; c++) { + igt_subtest_f("stolen-%s", c->name) { + gem_set_caching(fd, src_stolen, c->level); + + for (count = 1; count <= 1<<17; count <<= 1) { + struct timeval start, end; + + gettimeofday(&start, NULL); + do_gem_read(fd, src_stolen, dst_user, + object_size, count); + gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); + igt_info("Time to stolen-%s pread %d bytes x %6d: %7.3fµs, %s\n", + c->name, object_size, count, usecs, bps); + fflush(stdout); + } + } + } + + /* List the time taken in pread operation for stolen objects, with + * and without the overhead of page fault handling on accessing the + * user space buffer + */ + igt_subtest("pagefault-pread") { + large_stolen = gem_create_stolen(fd, LARGE_OBJECT_SIZE); + stolen_nopf_user = (uint32_t *) mmap(NULL, LARGE_OBJECT_SIZE, + PROT_WRITE, + MAP_ANONYMOUS|MAP_PRIVATE, + -1, 0); + igt_assert(stolen_nopf_user); + + for (count = 1; count <= 10; count ++) { + struct timeval start, end; + double t_elapsed = 0; + + gettimeofday(&start, NULL); + do_gem_read(fd, large_stolen, stolen_nopf_user, + LARGE_OBJECT_SIZE, 1); + gettimeofday(&end, NULL); + t_elapsed = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/t_elapsed*1e6); + igt_info("Pagefault-N - Time to pread %d bytes: %7.3fµs, %s\n", + LARGE_OBJECT_SIZE, t_elapsed, bps); + + stolen_pf_user = (uint32_t *) mmap(NULL, LARGE_OBJECT_SIZE, + PROT_WRITE, + MAP_ANONYMOUS|MAP_PRIVATE, + -1, 0); + igt_assert(stolen_pf_user); + + gettimeofday(&start, NULL); + do_gem_read(fd, large_stolen, stolen_pf_user, + LARGE_OBJECT_SIZE, 1); + gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); + igt_info("Pagefault-Y - Time to pread %d bytes: %7.3fµs, %s%s%s\n", + LARGE_OBJECT_SIZE, usecs, + t_elapsed < usecs ? KGRN : KRED, bps, KNRM); + fflush(stdout); + munmap(stolen_pf_user, LARGE_OBJECT_SIZE); + } + munmap(stolen_nopf_user, LARGE_OBJECT_SIZE); + gem_close(fd, large_stolen); + } + + igt_fixture { free(src); gem_close(fd, dst); + free(dst_user); + gem_close(fd, src_stolen); close(fd); } diff -Nru intel-gpu-tools-1.13/tests/gem_pwrite.c intel-gpu-tools-1.14/tests/gem_pwrite.c --- intel-gpu-tools-1.13/tests/gem_pwrite.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_pwrite.c 2016-03-01 15:59:21.000000000 +0000 @@ -84,7 +84,7 @@ uint64_t offset, size; uint32_t handle; - size = scale * gem_aperture_size(fd) >> 2; + size = scale * gem_global_aperture_size(fd) >> 2; intel_require_memory(1, size, CHECK_RAM); igt_require(gem_mmap__has_wc(fd)); @@ -110,7 +110,7 @@ uint64_t *ptr; uint32_t handle; - size = scale * gem_aperture_size(fd) >> 2; + size = scale * gem_global_aperture_size(fd) >> 2; intel_require_memory(1, size, CHECK_RAM); igt_require(gem_mmap__has_wc(fd)); @@ -132,12 +132,15 @@ } uint32_t *src, dst; +uint32_t *src_user, dst_stolen; int fd; int main(int argc, char **argv) { int object_size = 0; - uint32_t buf[20]; + double usecs; + const char* bps; + char buf[100]; int count; const struct { int level; @@ -164,6 +167,8 @@ dst = gem_create(fd, object_size); src = malloc(object_size); + dst_stolen = gem_create_stolen(fd, object_size); + src_user = malloc(object_size); } igt_subtest("basic") { @@ -173,10 +178,10 @@ gettimeofday(&start, NULL); do_gem_write(fd, dst, src, object_size, count); gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); igt_info("Time to pwrite %d bytes x %6d: %7.3fµs, %s\n", - object_size, count, - elapsed(&start, &end, count), - bytes_per_sec((char *)buf, object_size/elapsed(&start, &end, count)*1e6)); + object_size, count, usecs, bps); fflush(stdout); } } @@ -191,10 +196,46 @@ gettimeofday(&start, NULL); do_gem_write(fd, dst, src, object_size, count); gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); igt_info("Time to %s pwrite %d bytes x %6d: %7.3fµs, %s\n", + c->name, object_size, count, usecs, bps); + fflush(stdout); + } + } + } + + igt_subtest("stolen-normal") { + for (count = 1; count <= 1<<17; count <<= 1) { + struct timeval start, end; + + gettimeofday(&start, NULL); + do_gem_write(fd, dst_stolen, src_user, + object_size, count); + gettimeofday(&end, NULL); + usecs = elapsed(&start, &end, count); + bps = bytes_per_sec(buf, object_size/usecs*1e6); + igt_info("Time to pwrite %d bytes x %6d: %7.3fµs, %s\n", + object_size, count, usecs, bps); + fflush(stdout); + } + } + + for (c = cache; c->level != -1; c++) { + igt_subtest_f("stolen-%s", c->name) { + gem_set_caching(fd, dst, c->level); + for (count = 1; count <= 1<<17; count <<= 1) { + struct timeval start, end; + + gettimeofday(&start, NULL); + do_gem_write(fd, dst_stolen, src_user, + object_size, count); + gettimeofday(&end, NULL); + bps = bytes_per_sec(buf, + object_size/usecs*1e6); + igt_info("Time to stolen-%s pwrite %d bytes x %6d: %7.3fµs, %s\n", c->name, object_size, count, - elapsed(&start, &end, count), - bytes_per_sec((char *)buf, object_size/elapsed(&start, &end, count)*1e6)); + usecs, bps); fflush(stdout); } } @@ -203,6 +244,8 @@ igt_fixture { free(src); gem_close(fd, dst); + free(src_user); + gem_close(fd, dst_stolen); } igt_subtest("big-cpu") diff -Nru intel-gpu-tools-1.13/tests/gem_read_read_speed.c intel-gpu-tools-1.14/tests/gem_read_read_speed.c --- intel-gpu-tools-1.13/tests/gem_read_read_speed.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_read_read_speed.c 2016-03-01 15:59:21.000000000 +0000 @@ -154,7 +154,8 @@ &tiling_mode, &pitch, 0); } -static void run(drm_intel_bufmgr *bufmgr, int _width, int _height) +static void run(drm_intel_bufmgr *bufmgr, int _width, int _height, + bool write_bcs, bool write_rcs) { drm_intel_bo *src = NULL, *bcs = NULL, *rcs = NULL; drm_intel_bo *bcs_batch, *rcs_batch; @@ -170,8 +171,16 @@ set_bo(src, 0xdeadbeef); - rcs_batch = rcs_copy_bo(rcs, src); - bcs_batch = bcs_copy_bo(bcs, src); + if (write_bcs) { + bcs_batch = bcs_copy_bo(src, bcs); + } else { + bcs_batch = bcs_copy_bo(bcs, src); + } + if (write_rcs) { + rcs_batch = rcs_copy_bo(src, rcs); + } else { + rcs_batch = rcs_copy_bo(rcs, src); + } drm_intel_bo_unreference(rcs); drm_intel_bo_unreference(bcs); @@ -185,7 +194,9 @@ drm_intel_gem_bo_start_gtt_access(src, true); clock_gettime(CLOCK_MONOTONIC, &end); - igt_info("Time to read-read %dx%d [%dk]: %7.3fµs\n", + igt_info("Time to %s-%s %dx%d [%dk]: %7.3fµs\n", + write_bcs ? "write" : "read", + write_rcs ? "write" : "read", width, height, 4*width*height/1024, elapsed(&start, &end, loops)); @@ -222,7 +233,14 @@ igt_info("Semaphores: %d\n", semaphores_enabled(fd)); } - for (i = 0; sizes[i] != 0; i++) + for (i = 0; sizes[i] != 0; i++) { igt_subtest_f("read-read-%dx%d", sizes[i], sizes[i]) - run(bufmgr, sizes[i], sizes[i]); + run(bufmgr, sizes[i], sizes[i], false, false); + igt_subtest_f("read-write-%dx%d", sizes[i], sizes[i]) + run(bufmgr, sizes[i], sizes[i], false, true); + igt_subtest_f("write-read-%dx%d", sizes[i], sizes[i]) + run(bufmgr, sizes[i], sizes[i], true, false); + igt_subtest_f("write-write-%dx%d", sizes[i], sizes[i]) + run(bufmgr, sizes[i], sizes[i], true, true); + } } diff -Nru intel-gpu-tools-1.13/tests/gem_reloc_vs_gpu.c intel-gpu-tools-1.14/tests/gem_reloc_vs_gpu.c --- intel-gpu-tools-1.13/tests/gem_reloc_vs_gpu.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_reloc_vs_gpu.c 2016-03-01 15:59:21.000000000 +0000 @@ -318,18 +318,14 @@ igt_subtest("interruptible") do_test(fd, false, no_hang); - igt_subtest("interruptible-hang") { - igt_require_hang_ring(fd, I915_EXEC_BLT); + igt_subtest("interruptible-hang") do_test(fd, false, bcs_hang); - } igt_subtest("faulting-reloc-interruptible") do_test(fd, true, no_hang); - igt_subtest("faulting-reloc-interruptible-hang") { - igt_require_hang_ring(fd, I915_EXEC_BLT); + igt_subtest("faulting-reloc-interruptible-hang") do_test(fd, true, bcs_hang); - } igt_stop_signal_helper(); for (unsigned flags = 0; flags <= ALL_FLAGS; flags++) { diff -Nru intel-gpu-tools-1.13/tests/gem_reset_stats.c intel-gpu-tools-1.14/tests/gem_reset_stats.c --- intel-gpu-tools-1.13/tests/gem_reset_stats.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_reset_stats.c 2016-03-01 15:59:21.000000000 +0000 @@ -47,6 +47,7 @@ #define RS_BATCH_PENDING (1 << 1) #define RS_UNKNOWN (1 << 2) + static uint32_t devid; struct local_drm_i915_reset_stats { @@ -64,65 +65,76 @@ #define LOCAL_I915_EXEC_VEBOX (4 << 0) -struct target_ring; - -static bool gem_has_render(int fd) +static void sync_gpu(void) { - return true; + int fd = drm_open_driver(DRIVER_INTEL); + gem_quiescent_gpu(fd); + close(fd); } -static const struct target_ring { - uint32_t exec; - bool (*present)(int fd); - const char *name; -} rings[] = { - { I915_EXEC_RENDER, gem_has_render, "render" }, - { I915_EXEC_BLT, gem_has_blt, "blt" }, - { I915_EXEC_BSD, gem_has_bsd, "bsd" }, - { LOCAL_I915_EXEC_VEBOX, gem_has_vebox, "vebox" }, -}; - -static void check_context(const struct target_ring *ring) +static int noop(int fd, uint32_t ctx, const struct intel_execution_engine *e) { - int fd = drm_open_driver(DRIVER_INTEL); + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 eb; + struct drm_i915_gem_exec_object2 exec; + int ret; - gem_context_destroy(fd, - gem_context_create(fd)); - close(fd); + memset(&exec, 0, sizeof(exec)); + exec.handle = gem_create(fd, 4096); + igt_assert((int)exec.handle > 0); + gem_write(fd, exec.handle, 0, &bbe, sizeof(bbe)); + + memset(&eb, 0, sizeof(eb)); + eb.buffers_ptr = (uintptr_t)&exec; + eb.buffer_count = 1; + eb.flags = e->exec_id | e->flags; + i915_execbuffer2_set_context_id(eb, ctx); + + ret = __gem_execbuf(fd, &eb); + if (ret < 0) { + gem_close(fd, exec.handle); + return ret; + } - igt_require(ring->exec == I915_EXEC_RENDER); + return exec.handle; } -#define NUM_RINGS (sizeof(rings)/sizeof(struct target_ring)) +static int has_engine(int fd, + uint32_t ctx, + const struct intel_execution_engine *e) +{ + int handle = noop(fd, ctx, e); + if (handle < 0) + return 0; + gem_close(fd, handle); + return 1; +} -static const struct target_ring *current_ring; +static void check_context(const struct intel_execution_engine *e) +{ + int fd = drm_open_driver(DRIVER_INTEL); + igt_require(has_engine(fd, gem_context_create(fd), e)); + close(fd); +} static int gem_reset_stats(int fd, int ctx_id, struct local_drm_i915_reset_stats *rs) { - int ret; - + memset(rs, 0, sizeof(*rs)); rs->ctx_id = ctx_id; - rs->flags = 0; - rs->reset_count = rand(); - rs->batch_active = rand(); - rs->batch_pending = rand(); - rs->pad = 0; - - do { - ret = ioctl(fd, GET_RESET_STATS_IOCTL, rs); - } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); + rs->reset_count = -1; - if (ret < 0) + if (drmIoctl(fd, GET_RESET_STATS_IOCTL, rs)) return -errno; + igt_assert(rs->reset_count != -1); return 0; } static int gem_reset_status(int fd, int ctx_id) { - int ret; struct local_drm_i915_reset_stats rs; + int ret; ret = gem_reset_stats(fd, ctx_id, &rs); if (ret) @@ -136,191 +148,47 @@ return RS_NO_ERROR; } -static int gem_exec(int fd, struct drm_i915_gem_execbuffer2 *execbuf) +#define BAN HANG_ALLOW_BAN +#define ASYNC 2 +static void inject_hang(int fd, uint32_t ctx, + const struct intel_execution_engine *e, + unsigned flags) { - int ret; - - ret = ioctl(fd, - DRM_IOCTL_I915_GEM_EXECBUFFER2, - execbuf); + igt_hang_ring_t hang; - if (ret < 0) - return -errno; - - return 0; + hang = igt_hang_ctx(fd, ctx, e->exec_id | e->flags, flags & BAN, NULL); + if ((flags & ASYNC) == 0) + igt_post_hang_ring(fd, hang); } -static int exec_valid_ring(int fd, int ctx, int ring) +static const char *status_to_string(int x) { - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 exec; - int ret; - - uint32_t buf[2] = { MI_BATCH_BUFFER_END, 0 }; - - exec.handle = gem_create(fd, 4096); - gem_write(fd, exec.handle, 0, buf, sizeof(buf)); - exec.relocation_count = 0; - exec.relocs_ptr = 0; - exec.alignment = 0; - exec.offset = 0; - exec.flags = 0; - exec.rsvd1 = 0; - exec.rsvd2 = 0; - - execbuf.buffers_ptr = (uintptr_t)&exec; - execbuf.buffer_count = 1; - execbuf.batch_start_offset = 0; - execbuf.batch_len = sizeof(buf); - execbuf.cliprects_ptr = 0; - execbuf.num_cliprects = 0; - execbuf.DR1 = 0; - execbuf.DR4 = 0; - execbuf.flags = ring; - i915_execbuffer2_set_context_id(execbuf, ctx); - execbuf.rsvd2 = 0; - - ret = gem_exec(fd, &execbuf); - if (ret < 0) - return ret; - - return exec.handle; + const char *strings[] = { + "No error", + "Guilty", + "Pending", + }; + if (x >= ARRAY_SIZE(strings)) + return "Unknown"; + return strings[x]; } -static int exec_valid(int fd, int ctx) -{ - return exec_valid_ring(fd, ctx, current_ring->exec); -} - -#define BUFSIZE (4 * 1024) -#define ITEMS (BUFSIZE >> 2) - -static int inject_hang_ring(int fd, int ctx, int ring, bool ignore_ban_error) -{ - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 exec; - uint64_t gtt_off; - uint32_t *buf; - int roff, i; - unsigned cmd_len = 2; - enum stop_ring_flags flags; - - srandom(time(NULL)); - - if (intel_gen(devid) >= 8) - cmd_len = 3; - - buf = malloc(BUFSIZE); - igt_assert(buf != NULL); - - buf[0] = MI_BATCH_BUFFER_END; - buf[1] = MI_NOOP; - - exec.handle = gem_create(fd, BUFSIZE); - gem_write(fd, exec.handle, 0, buf, BUFSIZE); - exec.relocation_count = 0; - exec.relocs_ptr = 0; - exec.alignment = 0; - exec.offset = 0; - exec.flags = 0; - exec.rsvd1 = 0; - exec.rsvd2 = 0; - - execbuf.buffers_ptr = (uintptr_t)&exec; - execbuf.buffer_count = 1; - execbuf.batch_start_offset = 0; - execbuf.batch_len = BUFSIZE; - execbuf.cliprects_ptr = 0; - execbuf.num_cliprects = 0; - execbuf.DR1 = 0; - execbuf.DR4 = 0; - execbuf.flags = ring; - i915_execbuffer2_set_context_id(execbuf, ctx); - execbuf.rsvd2 = 0; - - igt_assert_eq(gem_exec(fd, &execbuf), 0); - - gtt_off = exec.offset; - - for (i = 0; i < ITEMS; i++) - buf[i] = MI_NOOP; - - roff = random() % (ITEMS - cmd_len - 1); - buf[roff] = MI_BATCH_BUFFER_START | (cmd_len - 2); - buf[roff + 1] = (gtt_off & 0xfffffffc) + (roff << 2); - if (cmd_len == 3) - buf[roff + 2] = (gtt_off & 0xffffffff00000000ull) >> 32; - - buf[roff + cmd_len] = MI_BATCH_BUFFER_END; - - igt_debug("loop injected at 0x%lx (off 0x%x, bo_start 0x%lx, bo_end 0x%lx)\n", - (long unsigned int)((roff << 2) + gtt_off), - roff << 2, (long unsigned int)gtt_off, - (long unsigned int)(gtt_off + BUFSIZE - 1)); - gem_write(fd, exec.handle, 0, buf, BUFSIZE); - - exec.relocation_count = 0; - exec.relocs_ptr = 0; - exec.alignment = 0; - exec.offset = 0; - exec.flags = 0; - exec.rsvd1 = 0; - exec.rsvd2 = 0; - - execbuf.buffers_ptr = (uintptr_t)&exec; - execbuf.buffer_count = 1; - execbuf.batch_start_offset = 0; - execbuf.batch_len = BUFSIZE; - execbuf.cliprects_ptr = 0; - execbuf.num_cliprects = 0; - execbuf.DR1 = 0; - execbuf.DR4 = 0; - execbuf.flags = ring; - i915_execbuffer2_set_context_id(execbuf, ctx); - execbuf.rsvd2 = 0; - - igt_assert_eq(gem_exec(fd, &execbuf), 0); - - igt_assert(gtt_off == exec.offset); - - free(buf); - - flags = igt_to_stop_ring_flag(ring); - - flags |= STOP_RING_ALLOW_BAN; - - if (!ignore_ban_error) - flags |= STOP_RING_ALLOW_ERRORS; - - igt_set_stop_rings(flags); - - return exec.handle; -} - -static int inject_hang(int fd, int ctx) -{ - return inject_hang_ring(fd, ctx, current_ring->exec, false); -} - -static int inject_hang_no_ban_error(int fd, int ctx) -{ - return inject_hang_ring(fd, ctx, current_ring->exec, true); -} - -static int _assert_reset_status(int fd, int ctx, int status) +static int _assert_reset_status(int idx, int fd, int ctx, int status) { int rs; rs = gem_reset_status(fd, ctx); if (rs < 0) { igt_info("reset status for %d ctx %d returned %d\n", - fd, ctx, rs); + idx, ctx, rs); return rs; } if (rs != status) { - igt_info("%d:%d reset status %d differs from assumed %d\n", - fd, ctx, rs, status); + igt_info("%d:%d expected '%s' [%d], found '%s' [%d]\n", + idx, ctx, + status_to_string(status), status, + status_to_string(rs), rs); return 1; } @@ -328,62 +196,59 @@ return 0; } -#define assert_reset_status(fd, ctx, status) \ - igt_assert(_assert_reset_status(fd, ctx, status) == 0) +#define assert_reset_status(idx, fd, ctx, status) \ + igt_assert(_assert_reset_status(idx, fd, ctx, status) == 0) -static void test_rs(int num_fds, int hang_index, int rs_assumed_no_hang) +static void test_rs(const struct intel_execution_engine *e, + int num_fds, int hang_index, int rs_assumed_no_hang) { - int i; int fd[MAX_FD]; - int h[MAX_FD]; + int i; igt_assert_lte(num_fds, MAX_FD); igt_assert_lt(hang_index, MAX_FD); + igt_debug("num fds=%d, hang index=%d\n", num_fds, hang_index); + for (i = 0; i < num_fds; i++) { fd[i] = drm_open_driver(DRIVER_INTEL); - igt_assert(fd[i]); + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); } - for (i = 0; i < num_fds; i++) - assert_reset_status(fd[i], 0, RS_NO_ERROR); - + sync_gpu(); for (i = 0; i < num_fds; i++) { if (i == hang_index) - h[i] = inject_hang(fd[i], 0); + inject_hang(fd[i], 0, e, ASYNC); else - h[i] = exec_valid(fd[i], 0); + igt_assert(noop(fd[i], 0, e) > 0); } - - gem_sync(fd[num_fds - 1], h[num_fds - 1]); + sync_gpu(); for (i = 0; i < num_fds; i++) { if (hang_index < 0) { - assert_reset_status(fd[i], 0, rs_assumed_no_hang); + assert_reset_status(i, fd[i], 0, rs_assumed_no_hang); continue; } if (i < hang_index) - assert_reset_status(fd[i], 0, RS_NO_ERROR); + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); if (i == hang_index) - assert_reset_status(fd[i], 0, RS_BATCH_ACTIVE); + assert_reset_status(i, fd[i], 0, RS_BATCH_ACTIVE); if (i > hang_index) - assert_reset_status(fd[i], 0, RS_BATCH_PENDING); + assert_reset_status(i, fd[i], 0, RS_BATCH_PENDING); } - for (i = 0; i < num_fds; i++) { - gem_close(fd[i], h[i]); + for (i = 0; i < num_fds; i++) close(fd[i]); - } } #define MAX_CTX 100 -static void test_rs_ctx(int num_fds, int num_ctx, int hang_index, +static void test_rs_ctx(const struct intel_execution_engine *e, + int num_fds, int num_ctx, int hang_index, int hang_context) { int i, j; int fd[MAX_FD]; - int h[MAX_FD][MAX_CTX]; int ctx[MAX_FD][MAX_CTX]; igt_assert_lte(num_fds, MAX_FD); @@ -392,287 +257,210 @@ igt_assert_lte(num_ctx, MAX_CTX); igt_assert_lt(hang_context, MAX_CTX); - test_rs(num_fds, -1, RS_NO_ERROR); + test_rs(e, num_fds, -1, RS_NO_ERROR); for (i = 0; i < num_fds; i++) { fd[i] = drm_open_driver(DRIVER_INTEL); igt_assert(fd[i]); - assert_reset_status(fd[i], 0, RS_NO_ERROR); + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); for (j = 0; j < num_ctx; j++) { ctx[i][j] = gem_context_create(fd[i]); - } - assert_reset_status(fd[i], 0, RS_NO_ERROR); + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); } for (i = 0; i < num_fds; i++) { - - assert_reset_status(fd[i], 0, RS_NO_ERROR); + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); for (j = 0; j < num_ctx; j++) - assert_reset_status(fd[i], ctx[i][j], RS_NO_ERROR); + assert_reset_status(i, fd[i], ctx[i][j], RS_NO_ERROR); - assert_reset_status(fd[i], 0, RS_NO_ERROR); + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); } for (i = 0; i < num_fds; i++) { for (j = 0; j < num_ctx; j++) { if (i == hang_index && j == hang_context) - h[i][j] = inject_hang(fd[i], ctx[i][j]); + inject_hang(fd[i], ctx[i][j], e, ASYNC); else - h[i][j] = exec_valid(fd[i], ctx[i][j]); + igt_assert(noop(fd[i], ctx[i][j], e) > 0); } } - - gem_sync(fd[num_fds - 1], ctx[num_fds - 1][num_ctx - 1]); + sync_gpu(); for (i = 0; i < num_fds; i++) - assert_reset_status(fd[i], 0, RS_NO_ERROR); + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); for (i = 0; i < num_fds; i++) { for (j = 0; j < num_ctx; j++) { if (i < hang_index) - assert_reset_status(fd[i], ctx[i][j], RS_NO_ERROR); + assert_reset_status(i, fd[i], ctx[i][j], RS_NO_ERROR); if (i == hang_index && j < hang_context) - assert_reset_status(fd[i], ctx[i][j], RS_NO_ERROR); + assert_reset_status(i, fd[i], ctx[i][j], RS_NO_ERROR); if (i == hang_index && j == hang_context) - assert_reset_status(fd[i], ctx[i][j], + assert_reset_status(i, fd[i], ctx[i][j], RS_BATCH_ACTIVE); if (i == hang_index && j > hang_context) - assert_reset_status(fd[i], ctx[i][j], + assert_reset_status(i, fd[i], ctx[i][j], RS_BATCH_PENDING); if (i > hang_index) - assert_reset_status(fd[i], ctx[i][j], + assert_reset_status(i, fd[i], ctx[i][j], RS_BATCH_PENDING); } } for (i = 0; i < num_fds; i++) { - for (j = 0; j < num_ctx; j++) { - gem_close(fd[i], h[i][j]); - gem_context_destroy(fd[i], ctx[i][j]); - } - - assert_reset_status(fd[i], 0, RS_NO_ERROR); - + assert_reset_status(i, fd[i], 0, RS_NO_ERROR); close(fd[i]); } } -static void test_ban(void) +static void test_ban(const struct intel_execution_engine *e) { - int h1,h2,h3,h4,h5,h6,h7; + struct local_drm_i915_reset_stats rs_bad, rs_good; int fd_bad, fd_good; - int retry = 10; + int ban, retry = 10; int active_count = 0, pending_count = 0; - struct local_drm_i915_reset_stats rs_bad, rs_good; fd_bad = drm_open_driver(DRIVER_INTEL); - fd_good = drm_open_driver(DRIVER_INTEL); - assert_reset_status(fd_bad, 0, RS_NO_ERROR); - assert_reset_status(fd_good, 0, RS_NO_ERROR); + assert_reset_status(fd_bad, fd_bad, 0, RS_NO_ERROR); + assert_reset_status(fd_good, fd_good, 0, RS_NO_ERROR); - h1 = exec_valid(fd_bad, 0); - igt_assert_lte(0, h1); - h5 = exec_valid(fd_good, 0); - igt_assert_lte(0, h5); + noop(fd_bad, 0, e); + noop(fd_good, 0, e); - assert_reset_status(fd_bad, 0, RS_NO_ERROR); - assert_reset_status(fd_good, 0, RS_NO_ERROR); + assert_reset_status(fd_bad, fd_bad, 0, RS_NO_ERROR); + assert_reset_status(fd_good, fd_good, 0, RS_NO_ERROR); - h2 = inject_hang_no_ban_error(fd_bad, 0); - igt_assert_lte(0, h2); + inject_hang(fd_bad, 0, e, BAN | ASYNC); active_count++; - /* Second hang will be pending for this */ - pending_count++; - h6 = exec_valid(fd_good, 0); - h7 = exec_valid(fd_good, 0); + noop(fd_good, 0, e); + noop(fd_good, 0, e); - while (retry--) { - h3 = inject_hang_no_ban_error(fd_bad, 0); - igt_assert_lte(0, h3); - gem_sync(fd_bad, h3); + /* The second hang will count as pending and be discarded */ + active_count--; + pending_count += 2; /* inject hang does 2 execs (query, then hang) */ + while (retry--) { + inject_hang(fd_bad, 0, e, BAN); active_count++; - /* This second hand will count as pending */ - assert_reset_status(fd_bad, 0, RS_BATCH_ACTIVE); - h4 = exec_valid(fd_bad, 0); - if (h4 == -EIO) { - gem_close(fd_bad, h3); - break; - } - - /* Should not happen often but sometimes hang is declared too slow - * due to our way of faking hang using loop */ - - igt_assert_lte(0, h4); - gem_close(fd_bad, h3); - gem_close(fd_bad, h4); - - igt_info("retrying for ban (%d)\n", retry); - } + ban = noop(fd_bad, 0, e); + if (ban == -EIO) + break; - igt_assert_eq(h4, -EIO); - assert_reset_status(fd_bad, 0, RS_BATCH_ACTIVE); + /* Should not happen often but sometimes hang is declared too + * slow due to our way of faking hang using loop */ + gem_close(fd_bad, ban); - gem_sync(fd_good, h7); - assert_reset_status(fd_good, 0, RS_BATCH_PENDING); + igt_info("retrying for ban (%d)\n", retry); + } + igt_assert_eq(ban, -EIO); + igt_assert_lt(0, noop(fd_good, 0, e)); - igt_assert_eq(gem_reset_stats(fd_good, 0, &rs_good), 0); + assert_reset_status(fd_bad, fd_bad, 0, RS_BATCH_ACTIVE); igt_assert_eq(gem_reset_stats(fd_bad, 0, &rs_bad), 0); + igt_assert_eq(rs_bad.batch_active, active_count); + igt_assert_eq(rs_bad.batch_pending, pending_count); - igt_assert(rs_bad.batch_active == active_count); - igt_assert(rs_bad.batch_pending == pending_count); - igt_assert(rs_good.batch_active == 0); - igt_assert(rs_good.batch_pending == 2); - - gem_close(fd_bad, h1); - gem_close(fd_bad, h2); - gem_close(fd_good, h6); - gem_close(fd_good, h7); - - h1 = exec_valid(fd_good, 0); - igt_assert_lte(0, h1); - gem_close(fd_good, h1); + assert_reset_status(fd_good, fd_good, 0, RS_BATCH_PENDING); + igt_assert_eq(gem_reset_stats(fd_good, 0, &rs_good), 0); + igt_assert_eq(rs_good.batch_active, 0); + igt_assert_eq(rs_good.batch_pending, 2); close(fd_bad); close(fd_good); - - igt_assert_lt(gem_reset_status(fd_bad, 0), 0); - igt_assert_lt(gem_reset_status(fd_good, 0), 0); } -static void test_ban_ctx(void) +static void test_ban_ctx(const struct intel_execution_engine *e) { - int h1,h2,h3,h4,h5,h6,h7; - int ctx_good, ctx_bad; - int fd; - int retry = 10; - int active_count = 0, pending_count = 0; struct local_drm_i915_reset_stats rs_bad, rs_good; + int fd, ban, retry = 10; + uint32_t ctx_good, ctx_bad; + int active_count = 0, pending_count = 0; fd = drm_open_driver(DRIVER_INTEL); - assert_reset_status(fd, 0, RS_NO_ERROR); + assert_reset_status(fd, fd, 0, RS_NO_ERROR); ctx_good = gem_context_create(fd); ctx_bad = gem_context_create(fd); - assert_reset_status(fd, 0, RS_NO_ERROR); - assert_reset_status(fd, ctx_good, RS_NO_ERROR); - assert_reset_status(fd, ctx_bad, RS_NO_ERROR); - - h1 = exec_valid(fd, ctx_bad); - igt_assert_lte(0, h1); - h5 = exec_valid(fd, ctx_good); - igt_assert_lte(0, h5); + assert_reset_status(fd, fd, 0, RS_NO_ERROR); + assert_reset_status(fd, fd, ctx_good, RS_NO_ERROR); + assert_reset_status(fd, fd, ctx_bad, RS_NO_ERROR); + + noop(fd, ctx_bad, e); + noop(fd, ctx_good, e); - assert_reset_status(fd, ctx_good, RS_NO_ERROR); - assert_reset_status(fd, ctx_bad, RS_NO_ERROR); + assert_reset_status(fd, fd, ctx_good, RS_NO_ERROR); + assert_reset_status(fd, fd, ctx_bad, RS_NO_ERROR); - h2 = inject_hang_no_ban_error(fd, ctx_bad); - igt_assert_lte(0, h2); + inject_hang(fd, ctx_bad, e, BAN | ASYNC); active_count++; - /* Second hang will be pending for this */ - pending_count++; - h6 = exec_valid(fd, ctx_good); - h7 = exec_valid(fd, ctx_good); + noop(fd, ctx_good, e); + noop(fd, ctx_good, e); - while (retry--) { - h3 = inject_hang_no_ban_error(fd, ctx_bad); - igt_assert_lte(0, h3); - gem_sync(fd, h3); + /* This second hang will count as pending and be discarded */ + active_count--; + pending_count++; + while (retry--) { + inject_hang(fd, ctx_bad, e, BAN); active_count++; - /* This second hand will count as pending */ - assert_reset_status(fd, ctx_bad, RS_BATCH_ACTIVE); - - h4 = exec_valid(fd, ctx_bad); - if (h4 == -EIO) { - gem_close(fd, h3); - break; - } - - /* Should not happen often but sometimes hang is declared too slow - * due to our way of faking hang using loop */ - - igt_assert_lte(0, h4); - gem_close(fd, h3); - gem_close(fd, h4); - igt_info("retrying for ban (%d)\n", retry); - } + ban = noop(fd, ctx_bad, e); + if (ban == -EIO) + break; - igt_assert_eq(h4, -EIO); - assert_reset_status(fd, ctx_bad, RS_BATCH_ACTIVE); + /* Should not happen often but sometimes hang is declared too + * slow due to our way of faking hang using loop */ + gem_close(fd, ban); - gem_sync(fd, h7); - assert_reset_status(fd, ctx_good, RS_BATCH_PENDING); + igt_info("retrying for ban (%d)\n", retry); + } + igt_assert_eq(ban, -EIO); + igt_assert_lt(0, noop(fd, ctx_good, e)); - igt_assert_eq(gem_reset_stats(fd, ctx_good, &rs_good), 0); + assert_reset_status(fd, fd, ctx_bad, RS_BATCH_ACTIVE); igt_assert_eq(gem_reset_stats(fd, ctx_bad, &rs_bad), 0); + igt_assert_eq(rs_bad.batch_active, active_count); + igt_assert_eq(rs_bad.batch_pending, pending_count); - igt_assert(rs_bad.batch_active == active_count); - igt_assert(rs_bad.batch_pending == pending_count); - igt_assert(rs_good.batch_active == 0); - igt_assert(rs_good.batch_pending == 2); - - gem_close(fd, h1); - gem_close(fd, h2); - gem_close(fd, h6); - gem_close(fd, h7); - - h1 = exec_valid(fd, ctx_good); - igt_assert_lte(0, h1); - gem_close(fd, h1); - - gem_context_destroy(fd, ctx_good); - gem_context_destroy(fd, ctx_bad); - igt_assert_lt(gem_reset_status(fd, ctx_good), 0); - igt_assert_lt(gem_reset_status(fd, ctx_bad), 0); - igt_assert_lt(exec_valid(fd, ctx_good), 0); - igt_assert_lt(exec_valid(fd, ctx_bad), 0); + assert_reset_status(fd, fd, ctx_good, RS_BATCH_PENDING); + igt_assert_eq(gem_reset_stats(fd, ctx_good, &rs_good), 0); + igt_assert_eq(rs_good.batch_active, 0); + igt_assert_eq(rs_good.batch_pending, 2); close(fd); } -static void test_unrelated_ctx(void) +static void test_unrelated_ctx(const struct intel_execution_engine *e) { - int h1,h2; int fd1,fd2; int ctx_guilty, ctx_unrelated; fd1 = drm_open_driver(DRIVER_INTEL); fd2 = drm_open_driver(DRIVER_INTEL); - assert_reset_status(fd1, 0, RS_NO_ERROR); - assert_reset_status(fd2, 0, RS_NO_ERROR); + assert_reset_status(0, fd1, 0, RS_NO_ERROR); + assert_reset_status(1, fd2, 0, RS_NO_ERROR); ctx_guilty = gem_context_create(fd1); ctx_unrelated = gem_context_create(fd2); - assert_reset_status(fd1, ctx_guilty, RS_NO_ERROR); - assert_reset_status(fd2, ctx_unrelated, RS_NO_ERROR); - - h1 = inject_hang(fd1, ctx_guilty); - igt_assert_lte(0, h1); - gem_sync(fd1, h1); - assert_reset_status(fd1, ctx_guilty, RS_BATCH_ACTIVE); - assert_reset_status(fd2, ctx_unrelated, RS_NO_ERROR); - - h2 = exec_valid(fd2, ctx_unrelated); - igt_assert_lte(0, h2); - gem_sync(fd2, h2); - assert_reset_status(fd1, ctx_guilty, RS_BATCH_ACTIVE); - assert_reset_status(fd2, ctx_unrelated, RS_NO_ERROR); - gem_close(fd1, h1); - gem_close(fd2, h2); + assert_reset_status(0, fd1, ctx_guilty, RS_NO_ERROR); + assert_reset_status(1, fd2, ctx_unrelated, RS_NO_ERROR); - gem_context_destroy(fd1, ctx_guilty); - gem_context_destroy(fd2, ctx_unrelated); + inject_hang(fd1, ctx_guilty, e, 0); + assert_reset_status(0, fd1, ctx_guilty, RS_BATCH_ACTIVE); + assert_reset_status(1, fd2, ctx_unrelated, RS_NO_ERROR); + + gem_sync(fd2, noop(fd2, ctx_unrelated, e)); + assert_reset_status(0, fd1, ctx_guilty, RS_BATCH_ACTIVE); + assert_reset_status(1, fd2, ctx_unrelated, RS_NO_ERROR); close(fd1); close(fd2); @@ -690,98 +478,73 @@ return rs.reset_count; } -static void test_close_pending_ctx(void) +static void test_close_pending_ctx(const struct intel_execution_engine *e) { - int fd, h; - uint32_t ctx; - - fd = drm_open_driver(DRIVER_INTEL); - ctx = gem_context_create(fd); + int fd = drm_open_driver(DRIVER_INTEL); + uint32_t ctx = gem_context_create(fd); - assert_reset_status(fd, ctx, RS_NO_ERROR); + assert_reset_status(fd, fd, ctx, RS_NO_ERROR); - h = inject_hang(fd, ctx); - igt_assert_lte(0, h); + inject_hang(fd, ctx, e, 0); gem_context_destroy(fd, ctx); - igt_assert(__gem_context_destroy(fd, ctx) == -ENOENT); + igt_assert_eq(__gem_context_destroy(fd, ctx), -ENOENT); - gem_close(fd, h); close(fd); } -static void test_close_pending(void) +static void test_close_pending(const struct intel_execution_engine *e) { - int fd, h; - - fd = drm_open_driver(DRIVER_INTEL); - - assert_reset_status(fd, 0, RS_NO_ERROR); + int fd = drm_open_driver(DRIVER_INTEL); - h = inject_hang(fd, 0); - igt_assert_lte(0, h); + assert_reset_status(fd, fd, 0, RS_NO_ERROR); - gem_close(fd, h); + inject_hang(fd, 0, e, 0); close(fd); } -static void exec_noop_on_each_ring(int fd, const bool reverse) +static void noop_on_each_ring(int fd, const bool reverse) { - uint32_t batch[2] = {MI_BATCH_BUFFER_END, 0}; - uint32_t handle; - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 exec[1]; - - handle = gem_create(fd, 4096); - gem_write(fd, handle, 0, batch, sizeof(batch)); - - exec[0].handle = handle; - exec[0].relocation_count = 0; - exec[0].relocs_ptr = 0; - exec[0].alignment = 0; - exec[0].offset = 0; - exec[0].flags = 0; - exec[0].rsvd1 = 0; - exec[0].rsvd2 = 0; - - execbuf.buffers_ptr = (uintptr_t)exec; - execbuf.buffer_count = 1; - execbuf.batch_start_offset = 0; - execbuf.batch_len = 8; - execbuf.cliprects_ptr = 0; - execbuf.num_cliprects = 0; - execbuf.DR1 = 0; - execbuf.DR4 = 0; - execbuf.flags = 0; - i915_execbuffer2_set_context_id(execbuf, 0); - execbuf.rsvd2 = 0; - - for (unsigned i = 0; i < NUM_RINGS; i++) { - const struct target_ring *ring; - - ring = reverse ? &rings[NUM_RINGS - 1 - i] : &rings[i]; - - if (ring->present(fd)) { - execbuf.flags = ring->exec; - do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 eb; + struct drm_i915_gem_exec_object2 obj; + const struct intel_execution_engine *e; + + memset(&obj, 0, sizeof(obj)); + obj.handle = gem_create(fd, 4096); + gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe)); + + memset(&eb, 0, sizeof(eb)); + eb.buffers_ptr = (uintptr_t)&obj; + eb.buffer_count = 1; + + if (reverse) { + for (e = intel_execution_engines; e->name; e++) + ; + while (--e >= intel_execution_engines) { + eb.flags = e->exec_id | e->flags; + __gem_execbuf(fd, &eb); + } + } else { + for (e = intel_execution_engines; e->name; e++) { + eb.flags = e->exec_id | e->flags; + __gem_execbuf(fd, &eb); } } - gem_sync(fd, handle); - gem_close(fd, handle); + gem_sync(fd, obj.handle); + gem_close(fd, obj.handle); } -static void test_close_pending_fork(const bool reverse) +static void test_close_pending_fork(const struct intel_execution_engine *e, + const bool reverse) { + int fd = drm_open_driver(DRIVER_INTEL); + igt_hang_ring_t hang; int pid; - int fd, h; - - fd = drm_open_driver(DRIVER_INTEL); - assert_reset_status(fd, 0, RS_NO_ERROR); - - h = inject_hang(fd, 0); - igt_assert_lte(0, h); + assert_reset_status(fd, fd, 0, RS_NO_ERROR); + hang = igt_hang_ctx(fd, 0, e->exec_id | e->flags, 0, NULL); sleep(1); /* Avoid helpers as we need to kill the child @@ -797,10 +560,10 @@ * on each ring. This exercises batch_obj reference counting, * when gpu is reset and ring lists are cleared. */ - exec_noop_on_each_ring(fd2, reverse); - + noop_on_each_ring(fd2, reverse); close(fd2); - return; + pause(); + exit(0); } else { igt_assert_lt(0, pid); sleep(1); @@ -810,41 +573,30 @@ kill(pid, SIGKILL); } - gem_close(fd, h); - close(fd); - - /* Then we just wait on hang to happen */ - fd = drm_open_driver(DRIVER_INTEL); - - h = exec_valid(fd, 0); - igt_assert_lte(0, h); - - gem_sync(fd, h); - gem_close(fd, h); + igt_post_hang_ring(fd, hang); close(fd); } -static void test_reset_count(const bool create_ctx) +static void test_reset_count(const struct intel_execution_engine *e, + const bool create_ctx) { - int fd, h, ctx; + int fd = drm_open_driver(DRIVER_INTEL); + int ctx; long c1, c2; - fd = drm_open_driver(DRIVER_INTEL); if (create_ctx) ctx = gem_context_create(fd); else ctx = 0; - assert_reset_status(fd, ctx, RS_NO_ERROR); + assert_reset_status(fd, fd, ctx, RS_NO_ERROR); c1 = get_reset_count(fd, ctx); igt_assert(c1 >= 0); - h = inject_hang(fd, ctx); - igt_assert_lte(0, h); - gem_sync(fd, h); + inject_hang(fd, ctx, e, 0); - assert_reset_status(fd, ctx, RS_BATCH_ACTIVE); + assert_reset_status(fd, fd, ctx, RS_BATCH_ACTIVE); c2 = get_reset_count(fd, ctx); igt_assert(c2 >= 0); igt_assert(c2 == (c1 + 1)); @@ -862,8 +614,6 @@ igt_waitchildren(); - gem_close(fd, h); - if (create_ctx) gem_context_destroy(fd, ctx); @@ -873,8 +623,8 @@ static int _test_params(int fd, int ctx, uint32_t flags, uint32_t pad) { struct local_drm_i915_reset_stats rs; - int ret; + memset(&rs, 0, sizeof(rs)); rs.ctx_id = ctx; rs.flags = flags; rs.reset_count = rand(); @@ -882,11 +632,7 @@ rs.batch_pending = rand(); rs.pad = pad; - do { - ret = ioctl(fd, GET_RESET_STATS_IOCTL, &rs); - } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); - - if (ret < 0) + if (drmIoctl(fd, GET_RESET_STATS_IOCTL, &rs)) return -errno; return 0; @@ -937,13 +683,10 @@ static void test_params_ctx(void) { - int fd, ctx; + int fd; fd = drm_open_driver(DRIVER_INTEL); - ctx = gem_context_create(fd); - - _test_param(fd, ctx); - + _test_param(fd, gem_context_create(fd)); close(fd); } @@ -952,36 +695,41 @@ int fd; fd = drm_open_driver(DRIVER_INTEL); - _test_param(fd, 0); - close(fd); +} +static const struct intel_execution_engine * +next_engine(int fd, const struct intel_execution_engine *e) +{ + do { + e++; + if (e->name == NULL) + e = intel_execution_engines; + if (e->exec_id == 0) + e++; + } while (!has_engine(fd, 0, e)); + + return e; } -static void defer_hangcheck(int ring_num) +static void defer_hangcheck(const struct intel_execution_engine *engine) { + const struct intel_execution_engine *next; int fd, count_start, count_end; int seconds = 30; - const struct target_ring *next_ring; - fd = drm_open_driver(DRIVER_INTEL); - - do { - next_ring = &rings[(++ring_num) % NUM_RINGS]; - if (next_ring->present(fd)) - break; - - } while(next_ring != current_ring); + fd = drm_open_driver(DRIVER_INTEL); - igt_skip_on(next_ring == current_ring); + next = next_engine(fd, engine); + igt_skip_on(next == engine); count_start = get_reset_count(fd, 0); igt_assert_lte(0, count_start); - igt_assert(inject_hang_ring(fd, 0, current_ring->exec, true)); + inject_hang(fd, 0, engine, 0); while (--seconds) { - igt_assert(exec_valid_ring(fd, 0, next_ring->exec)); + noop(fd, 0, next); count_end = get_reset_count(fd, 0); igt_assert_lte(0, count_end); @@ -1019,41 +767,12 @@ return false; } -static void check_gpu_ok(void) -{ - int retry_count = 30; - enum stop_ring_flags flags; - int fd; - - igt_debug("checking gpu state\n"); - - while (retry_count--) { - flags = igt_get_stop_rings() & STOP_RING_ALL; - if (flags == 0) - break; - - igt_debug("waiting previous hang to clear\n"); - sleep(1); - } - - igt_assert(flags == 0); - - /* - * Clear the _ALLOW_ERRORS and _ALLOW_BAN flags; - * these are not cleared by individual ring reset. - */ - igt_set_stop_rings(0); - - fd = drm_open_driver(DRIVER_INTEL); - gem_quiescent_gpu(fd); - close(fd); -} - -#define RUN_TEST(...) do { check_gpu_ok(); __VA_ARGS__; check_gpu_ok(); } while (0) -#define RUN_CTX_TEST(...) do { check_context(current_ring); RUN_TEST(__VA_ARGS__); } while (0) +#define RUN_TEST(...) do { sync_gpu(); __VA_ARGS__; sync_gpu(); } while (0) +#define RUN_CTX_TEST(...) do { check_context(e); RUN_TEST(__VA_ARGS__); } while (0) igt_main { + const struct intel_execution_engine *e; igt_skip_on_simulation(); igt_fixture { @@ -1074,60 +793,44 @@ igt_subtest("params") test_params(); - for (int i = 0; i < NUM_RINGS; i++) { - const char *name; - - current_ring = &rings[i]; - name = current_ring->name; - - igt_fixture { - int fd = drm_open_driver(DRIVER_INTEL); - gem_require_ring(fd, current_ring->exec); - close(fd); - } - - igt_fixture - igt_require_f(intel_gen(devid) >= 4, - "gen %d doesn't support reset\n", intel_gen(devid)); - - igt_subtest_f("params-ctx-%s", name) - RUN_CTX_TEST(test_params_ctx()); - - igt_subtest_f("reset-stats-%s", name) - RUN_TEST(test_rs(4, 1, 0)); + igt_subtest_f("params-ctx") + RUN_TEST(test_params_ctx()); - igt_subtest_f("reset-stats-ctx-%s", name) - RUN_CTX_TEST(test_rs_ctx(4, 4, 1, 2)); + for (e = intel_execution_engines; e->name; e++) { + igt_subtest_f("reset-stats-%s", e->name) + RUN_TEST(test_rs(e, 4, 1, 0)); - igt_subtest_f("ban-%s", name) - RUN_TEST(test_ban()); + igt_subtest_f("reset-stats-ctx-%s", e->name) + RUN_CTX_TEST(test_rs_ctx(e, 4, 4, 1, 2)); - igt_subtest_f("ban-ctx-%s", name) - RUN_CTX_TEST(test_ban_ctx()); + igt_subtest_f("ban-%s", e->name) + RUN_TEST(test_ban(e)); - igt_subtest_f("reset-count-%s", name) - RUN_TEST(test_reset_count(false)); + igt_subtest_f("ban-ctx-%s", e->name) + RUN_CTX_TEST(test_ban_ctx(e)); - igt_subtest_f("reset-count-ctx-%s", name) - RUN_CTX_TEST(test_reset_count(true)); + igt_subtest_f("reset-count-%s", e->name) + RUN_TEST(test_reset_count(e, false)); - igt_subtest_f("unrelated-ctx-%s", name) - RUN_CTX_TEST(test_unrelated_ctx()); + igt_subtest_f("reset-count-ctx-%s", e->name) + RUN_CTX_TEST(test_reset_count(e, true)); - igt_subtest_f("close-pending-%s", name) - RUN_TEST(test_close_pending()); + igt_subtest_f("unrelated-ctx-%s", e->name) + RUN_CTX_TEST(test_unrelated_ctx(e)); - igt_subtest_f("close-pending-ctx-%s", name) - RUN_CTX_TEST(test_close_pending_ctx()); + igt_subtest_f("close-pending-%s", e->name) + RUN_TEST(test_close_pending(e)); - igt_subtest_f("close-pending-fork-%s", name) - RUN_TEST(test_close_pending_fork(false)); + igt_subtest_f("close-pending-ctx-%s", e->name) + RUN_CTX_TEST(test_close_pending_ctx(e)); - igt_subtest_f("close-pending-fork-reverse-%s", name) - RUN_TEST(test_close_pending_fork(true)); + igt_subtest_f("close-pending-fork-%s", e->name) + RUN_TEST(test_close_pending_fork(e, false)); - igt_subtest_f("defer-hangcheck-%s", name) - RUN_TEST(defer_hangcheck(i)); + igt_subtest_f("close-pending-fork-reverse-%s", e->name) + RUN_TEST(test_close_pending_fork(e, true)); + igt_subtest_f("defer-hangcheck-%s", e->name) + RUN_TEST(defer_hangcheck(e)); } } diff -Nru intel-gpu-tools-1.13/tests/gem_ringfill.c intel-gpu-tools-1.14/tests/gem_ringfill.c --- intel-gpu-tools-1.13/tests/gem_ringfill.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_ringfill.c 2016-03-01 15:59:21.000000000 +0000 @@ -32,109 +32,25 @@ */ #include "igt.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -struct bo { - const char *ring; - drm_intel_bo *src, *dst, *tmp; -}; - -static const int width = 512, height = 512; -int fd; - -static void create_bo(drm_intel_bufmgr *bufmgr, - struct bo *b, - const char *ring) -{ - int size = 4 * width * height, i; - uint32_t *map; - - b->ring = ring; - b->src = drm_intel_bo_alloc(bufmgr, "src", size, 4096); - b->dst = drm_intel_bo_alloc(bufmgr, "dst", size, 4096); - b->tmp = drm_intel_bo_alloc(bufmgr, "tmp", size, 4096); - - /* Fill the src with indexes of the pixels */ - drm_intel_bo_map(b->src, true); - map = b->src->virtual; - for (i = 0; i < width * height; i++) - map[i] = i; - drm_intel_bo_unmap(b->src); - - /* Fill the dst with garbage. */ - drm_intel_bo_map(b->dst, true); - map = b->dst->virtual; - for (i = 0; i < width * height; i++) - map[i] = 0xd0d0d0d0; - drm_intel_bo_unmap(b->dst); -} +#include "igt_gt.h" -static int check_bo(struct bo *b) +static void check_bo(int fd, uint32_t handle) { - const uint32_t *map; - int i, fails = 0; - - igt_debug("verifying\n"); - - do_or_die(drm_intel_bo_map(b->dst, false)); - - map = b->dst->virtual; - for (i = 0; i < width*height; i++) { - if (map[i] != i && ++fails <= 9) { - int x = i % width; - int y = i / width; - - igt_info("%s: copy #%d at %d,%d failed: read 0x%08x\n", - b->ring, i, x, y, map[i]); - } - } - drm_intel_bo_unmap(b->dst); - - return fails; -} + uint32_t *map; + int i; -static void destroy_bo(struct bo *b) -{ - drm_intel_bo_unreference(b->src); - drm_intel_bo_unreference(b->tmp); - drm_intel_bo_unreference(b->dst); + igt_debug("Verifying result\n"); + map = gem_mmap__cpu(fd, handle, 0, 4096, PROT_READ); + gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, 0); + for (i = 0; i < 1024; i++) + igt_assert_eq(map[i], i); + munmap(map, 4096); } -static void fill_ring(drm_intel_bufmgr *bufmgr, - const char *ring, - igt_render_copyfunc_t copy) +static void fill_ring(int fd, struct drm_i915_gem_execbuffer2 *execbuf) { - struct intel_batchbuffer *batch; - struct igt_buf src, tmp, dst; - struct bo bo; int i; - batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd)); - igt_assert(batch); - - create_bo(bufmgr, &bo, ring); - - src.stride = 4 * width; - src.tiling = 0; - src.size = 4 * width * height; - src.num_tiles = 4 * width * height; - dst = tmp = src; - - src.bo = bo.src; - tmp.bo = bo.tmp; - dst.bo = bo.dst; - /* The ring we've been using is 128k, and each rendering op * will use at least 8 dwords: * @@ -150,120 +66,155 @@ * So iterate just a little more than that -- if we don't fill the ring * doing this, we aren't likely to with this test. */ - for (i = 0; i < width * height; i++) { - int x = i % width; - int y = i / width; - - igt_assert_lt(y, height); - - /* Dummy load to fill the ring */ - copy(batch, NULL, &src, 0, 0, width, height, &tmp, 0, 0); - /* And copy the src into dst, pixel by pixel */ - copy(batch, NULL, &src, x, y, 1, 1, &dst, x, y); - } - - /* verify */ - igt_assert_eq(check_bo(&bo), 0); - destroy_bo(&bo); - intel_batchbuffer_free(batch); -} - -static void blt_copy(struct intel_batchbuffer *batch, - drm_intel_context *context, - struct igt_buf *src, unsigned src_x, unsigned src_y, - unsigned w, unsigned h, - struct igt_buf *dst, unsigned dst_x, unsigned dst_y) -{ - BLIT_COPY_BATCH_START(0); - OUT_BATCH((3 << 24) | /* 32 bits */ - (0xcc << 16) | /* copy ROP */ - dst->stride); - OUT_BATCH((dst_y << 16) | dst_x); /* dst x1,y1 */ - OUT_BATCH(((dst_y + h) << 16) | (dst_x + w)); /* dst x2,y2 */ - OUT_RELOC_FENCED(dst->bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0); - OUT_BATCH((src_y << 16) | src_x); /* src x1,y1 */ - OUT_BATCH(src->stride); - OUT_RELOC_FENCED(src->bo, I915_GEM_DOMAIN_RENDER, 0, 0); - ADVANCE_BATCH(); - - intel_batchbuffer_flush(batch); -} + igt_debug("Executing execbuf %d times\n", 128*1024/(8*4)); + for (i = 0; i < 128*1024 / (8 * 4); i++) + gem_execbuf(fd, execbuf); +} + +#define INTERRUPTIBLE 0x1 +#define HANG 0x2 +#define CHILD 0x8 +#define FORKED 0x8 +#define BOMB 0x10 + +static void run_test(int fd, unsigned ring, unsigned flags) +{ + const int gen = intel_gen(intel_get_drm_devid(fd)); + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_exec_object2 obj[2]; + struct drm_i915_gem_relocation_entry reloc[1024]; + struct drm_i915_gem_execbuffer2 execbuf; + struct igt_hang_ring hang; + uint32_t *batch, *b; + int i; -static void run_test(int ring, bool interruptible, int nchild) { - drm_intel_bufmgr *bufmgr; - igt_render_copyfunc_t copy; - const char* ring_name; - - bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); - igt_assert(bufmgr); - drm_intel_bufmgr_gem_enable_reuse(bufmgr); - - if (ring == I915_EXEC_RENDER) { - copy = igt_get_render_copyfunc(intel_get_drm_devid(fd)); - ring_name = "render"; - } else if (ring == I915_EXEC_BLT) { - copy = blt_copy; - ring_name = "blt"; - } else { - igt_fail_on_f(true, "Unsupported ring."); + gem_require_ring(fd, ring); + igt_skip_on_f(gen == 6 && (ring & ~(3<<13)) == I915_EXEC_BSD, + "MI_STORE_DATA broken on gen6 bsd\n"); + + gem_quiescent_gpu(fd); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)obj; + execbuf.buffer_count = 2; + execbuf.flags = ring | (1 << 11); + if (gen < 6) + execbuf.flags |= I915_EXEC_SECURE; + + memset(obj, 0, sizeof(obj)); + obj[0].handle = gem_create(fd, 4096); + obj[0].flags |= EXEC_OBJECT_WRITE; + obj[1].handle = gem_create(fd, 1024*16 + 4096); + gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe)); + igt_require(__gem_execbuf(fd, &execbuf) == 0); + + obj[1].relocs_ptr = (uintptr_t)reloc; + obj[1].relocation_count = 1024; + + batch = gem_mmap__cpu(fd, obj[1].handle, 0, 16*1024 + 4096, + PROT_WRITE | PROT_READ); + gem_set_domain(fd, obj[1].handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + + memset(reloc, 0, sizeof(reloc)); + b = batch; + for (i = 0; i < 1024; i++) { + uint64_t offset; + + reloc[i].target_handle = obj[0].handle; + reloc[i].presumed_offset = obj[0].offset; + reloc[i].offset = (b - batch + 1) * sizeof(*batch); + reloc[i].delta = i * sizeof(uint32_t); + reloc[i].read_domains = I915_GEM_DOMAIN_INSTRUCTION; + reloc[i].write_domain = I915_GEM_DOMAIN_INSTRUCTION; + + offset = obj[0].offset + reloc[i].delta; + *b++ = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0); + if (gen >= 8) { + *b++ = offset; + *b++ = offset >> 32; + } else if (gen >= 4) { + *b++ = 0; + *b++ = offset; + reloc[i].offset += sizeof(*batch); + } else { + b[-1] -= 1; + *b++ = offset; + } + *b++ = i; } + *b++ = MI_BATCH_BUFFER_END; + munmap(batch, 16*1024+4096); + gem_execbuf(fd, &execbuf); + check_bo(fd, obj[0].handle); + + memset(&hang, 0, sizeof(hang)); + if (flags & HANG) + hang = igt_hang_ring(fd, ring & ~(3<<13)); - /* Not all platforms have dedicated render ring. */ - igt_require(copy); - - if (interruptible) { + if (flags & INTERRUPTIBLE) igt_fork_signal_helper(); - } - if (nchild) { - igt_fork(child, nchild) { - fill_ring(bufmgr, ring_name, copy); - } + if (flags & (CHILD | FORKED | BOMB)) { + int nchild; + + if (flags & CHILD) + nchild = 1; + else if (flags & FORKED) + nchild = sysconf(_SC_NPROCESSORS_ONLN); + else + nchild = 8*sysconf(_SC_NPROCESSORS_ONLN); + + igt_debug("Forking %d children\n", nchild); + igt_fork(child, nchild) + fill_ring(fd, &execbuf); + igt_waitchildren(); - } else { - fill_ring(bufmgr, ring_name, copy); - } + } else + fill_ring(fd, &execbuf); - if (interruptible) { + if (flags & INTERRUPTIBLE) igt_stop_signal_helper(); - } - drm_intel_bufmgr_destroy(bufmgr); + if (flags & HANG) + igt_post_hang_ring(fd, hang); + else + check_bo(fd, obj[0].handle); + + gem_close(fd, obj[1].handle); + gem_close(fd, obj[0].handle); } igt_main { - igt_skip_on_simulation(); - - igt_fixture { - fd = drm_open_driver(DRIVER_INTEL); + const struct { + const char *suffix; + unsigned flags; + } modes[] = { + { "", 0 }, + { "-interruptible", INTERRUPTIBLE }, + { "-hang", HANG }, + { "-child", CHILD }, + { "-forked", FORKED }, + { "-bomb", BOMB | INTERRUPTIBLE }, + { NULL, 0 } + }, *mode; + const struct intel_execution_engine *e; + int fd; + + igt_fixture + fd = drm_open_driver_master(DRIVER_INTEL); + + for (mode = modes; mode->suffix; mode++) { + for (e = intel_execution_engines; e->name; e++) { + igt_subtest_f("%s%s%s", + e->exec_id ? "" : "basic-", + e->name, + mode->suffix) + run_test(fd, e->exec_id | e->flags, mode->flags); + } } - igt_subtest("blitter") - run_test(I915_EXEC_BLT, false, 0); - - igt_subtest("render") - run_test(I915_EXEC_RENDER, false, 0); - - igt_subtest("blitter-interruptible") - run_test(I915_EXEC_BLT, true, 0); - - igt_subtest("render-interruptible") - run_test(I915_EXEC_RENDER, true, 0); - - igt_subtest("blitter-forked-1") - run_test(I915_EXEC_BLT, false, 1); - - igt_subtest("render-forked-1") - run_test(I915_EXEC_RENDER, false, 1); - - igt_subtest("blitter-forked-4") - run_test(I915_EXEC_BLT, false, 4); - - igt_subtest("render-forked-4") - run_test(I915_EXEC_RENDER, false, 4); - - igt_fixture { + igt_fixture close(fd); - } } diff -Nru intel-gpu-tools-1.13/tests/gem_ring_sync_loop.c intel-gpu-tools-1.14/tests/gem_ring_sync_loop.c --- intel-gpu-tools-1.13/tests/gem_ring_sync_loop.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_ring_sync_loop.c 2016-03-01 15:59:21.000000000 +0000 @@ -26,23 +26,8 @@ */ #include "igt.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "drm.h" -#include "intel_bufmgr.h" -#include "i830_reg.h" - -IGT_TEST_DESCRIPTION("Basic check of ring<->ring sync using a dummy reloc."); - -static drm_intel_bufmgr *bufmgr; -struct intel_batchbuffer *batch; -static drm_intel_bo *target_buffer; + +IGT_TEST_DESCRIPTION("Basic check of ring<->ring write synchronisation."); /* * Testcase: Basic check of ring<->ring sync using a dummy reloc @@ -50,70 +35,64 @@ * Extremely efficient at catching missed irqs with semaphores=0 ... */ -#define MI_COND_BATCH_BUFFER_END (0x36<<23 | 1) -#define MI_DO_COMPARE (1<<21) - static void -store_dword_loop(int fd) +sync_loop(int fd) { - int i; + const uint32_t bbe = MI_BATCH_BUFFER_END; int num_rings = gem_get_num_rings(fd); + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object[2]; + struct drm_i915_gem_relocation_entry reloc[1]; + int i; + + memset(object, 0, sizeof(object)); + object[0].handle = gem_create(fd, 4096); + object[0].flags = EXEC_OBJECT_WRITE; + object[1].handle = gem_create(fd, 4096); + gem_write(fd, object[1].handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)object; + execbuf.buffer_count = 2; + + /* Check if we have no-reloc support first */ + if (__gem_execbuf(fd, &execbuf)) { + object[0].flags = 0; + object[1].relocs_ptr = (uintptr_t)reloc; + object[1].relocation_count = 1; + + /* Add a dummy relocation to mark the object as writing */ + memset(reloc, 0, sizeof(reloc)); + reloc->offset = 1000; + reloc->target_handle = object[0].handle; + reloc->read_domains = I915_GEM_DOMAIN_RENDER; + reloc->write_domain = I915_GEM_DOMAIN_RENDER; + + gem_execbuf(fd, &execbuf); + } srandom(0xdeadbeef); for (i = 0; i < SLOW_QUICK(0x100000, 10); i++) { - int ring = random() % num_rings + 1; - - if (ring == I915_EXEC_RENDER) { - BEGIN_BATCH(4, 1); - OUT_BATCH(MI_COND_BATCH_BUFFER_END | MI_DO_COMPARE); - OUT_BATCH(0xffffffff); /* compare dword */ - OUT_RELOC(target_buffer, I915_GEM_DOMAIN_RENDER, - I915_GEM_DOMAIN_RENDER, 0); - OUT_BATCH(MI_NOOP); - ADVANCE_BATCH(); - } else { - BEGIN_BATCH(4, 1); - OUT_BATCH(MI_FLUSH_DW | 1); - OUT_BATCH(0); /* reserved */ - OUT_RELOC(target_buffer, I915_GEM_DOMAIN_RENDER, - I915_GEM_DOMAIN_RENDER, 0); - OUT_BATCH(MI_NOOP | (1<<22) | (0xf)); - ADVANCE_BATCH(); - } - intel_batchbuffer_flush_on_ring(batch, ring); + execbuf.flags = random() % num_rings + 1; + gem_execbuf(fd, &execbuf); } - drm_intel_bo_map(target_buffer, 0); - // map to force waiting on rendering - drm_intel_bo_unmap(target_buffer); + gem_sync(fd, object[1].handle); + gem_close(fd, object[1].handle); + gem_close(fd, object[0].handle); } igt_simple_main { int fd; - int devid; fd = drm_open_driver(DRIVER_INTEL); - devid = intel_get_drm_devid(fd); - gem_require_ring(fd, I915_EXEC_BLT); - - - bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); - igt_assert(bufmgr); - drm_intel_bufmgr_gem_enable_reuse(bufmgr); - - batch = intel_batchbuffer_alloc(bufmgr, devid); - igt_assert(batch); - - target_buffer = drm_intel_bo_alloc(bufmgr, "target bo", 4096, 4096); - igt_assert(target_buffer); - - store_dword_loop(fd); + igt_require(gem_get_num_rings(fd) > 1); + intel_detect_and_clear_missed_interrupts(fd); - drm_intel_bo_unreference(target_buffer); - intel_batchbuffer_free(batch); - drm_intel_bufmgr_destroy(bufmgr); + sync_loop(fd); + igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); close(fd); } diff -Nru intel-gpu-tools-1.13/tests/gem_softpin.c intel-gpu-tools-1.14/tests/gem_softpin.c --- intel-gpu-tools-1.13/tests/gem_softpin.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_softpin.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,488 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Vinay Belgaumkar + * Thomas Daniel + * + */ + +#include "igt.h" + +#define EXEC_OBJECT_PINNED (1<<4) +#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3) + +/* gen8_canonical_addr + * Used to convert any address into canonical form, i.e. [63:48] == [47]. + * Based on kernel's sign_extend64 implementation. + * @address - a virtual address +*/ +#define GEN8_HIGH_ADDRESS_BIT 47 +static uint64_t gen8_canonical_addr(uint64_t address) +{ + __u8 shift = 63 - GEN8_HIGH_ADDRESS_BIT; + return (__s64)(address << shift) >> shift; +} + +static void test_invalid(int fd) +{ + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&object; + execbuf.buffer_count = 1; + + memset(&object, 0, sizeof(object)); + object.handle = gem_create(fd, 2*4096); + object.flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED; + gem_write(fd, object.handle, 0, &bbe, sizeof(bbe)); + + /* Check invalid alignment */ + object.offset = 4096; + object.alignment = 64*1024; + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL); + object.alignment = 0; + + /* Check wraparound */ + object.offset = -4096ULL; + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL); + + /* Check beyond bounds of aperture */ + object.offset = gem_aperture_size(fd) - 4096; + object.offset = gen8_canonical_addr(object.offset); + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL); + + /* Check gen8 canonical addressing */ + if (gem_aperture_size(fd) > 1ull< 1ull<<32) { + object.flags = EXEC_OBJECT_PINNED; + object.offset = 1ull<<32; + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL); + + object.offset = gen8_canonical_addr(object.offset); + object.flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS; + igt_assert_eq(__gem_execbuf(fd, &execbuf), 0); + } +} + +static void test_softpin(int fd) +{ + const uint32_t size = 1024 * 1024; + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object; + uint64_t offset, end; + uint32_t last_handle; + int loop; + + last_handle = gem_create(fd, size); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&object; + execbuf.buffer_count = 1; + for (loop = 0; loop < 1024; loop++) { + memset(&object, 0, sizeof(object)); + object.handle = gem_create(fd, 2*size); + gem_write(fd, object.handle, 0, &bbe, sizeof(bbe)); + + /* Find a hole */ + gem_execbuf(fd, &execbuf); + gem_close(fd, object.handle); + gem_close(fd, last_handle); + + igt_debug("Made a 2 MiB hole: %08llx\n", + object.offset); + + object.handle = gem_create(fd, size); + gem_write(fd, object.handle, 0, &bbe, sizeof(bbe)); + object.flags |= EXEC_OBJECT_PINNED; + + end = object.offset + size; + for (offset = object.offset; offset <= end; offset += 4096) { + object.offset = offset; + gem_execbuf(fd, &execbuf); + igt_assert_eq_u64(object.offset, offset); + } + + last_handle = object.handle; + } +} + +static void test_overlap(int fd) +{ + const uint32_t size = 1024 * 1024; + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object[2]; + uint64_t offset; + uint32_t handle; + + handle = gem_create(fd, 3*size); + gem_write(fd, handle, 0, &bbe, sizeof(bbe)); + + memset(object, 0, sizeof(object)); + object[0].handle = handle; + + /* Find a hole */ + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)object; + execbuf.buffer_count = 1; + gem_execbuf(fd, &execbuf); + + igt_debug("Made a 3x1 MiB hole: %08llx\n", + object[0].offset); + + object[0].handle = gem_create(fd, size); + object[0].offset += size; + object[0].flags |= EXEC_OBJECT_PINNED; + object[1].handle = gem_create(fd, size); + object[1].flags |= EXEC_OBJECT_PINNED; + gem_write(fd, object[1].handle, 0, &bbe, sizeof(bbe)); + execbuf.buffer_count = 2; + + /* Check that we fit into our hole */ + object[1].offset = object[0].offset - size; + gem_execbuf(fd, &execbuf); + igt_assert_eq_u64(object[1].offset + size, object[0].offset); + + object[1].offset = object[0].offset + size; + gem_execbuf(fd, &execbuf); + igt_assert_eq_u64(object[1].offset - size, object[0].offset); + + /* Try all possible page-aligned overlaps */ + for (offset = object[0].offset - size + 4096; + offset < object[0].offset + size; + offset += 4096) { + object[1].offset = offset; + igt_debug("[0]=[%08llx - %08llx] [1]=[%08llx - %08llx]\n", + (long long)object[0].offset, + (long long)object[0].offset + size, + (long long)object[1].offset, + (long long)object[1].offset + size); + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL); + igt_assert_eq_u64(object[1].offset, offset); + } + + gem_close(fd, object[1].handle); + gem_close(fd, object[0].handle); + gem_close(fd, handle); +} + +static uint64_t busy_batch(int fd) +{ + const int gen = intel_gen(intel_get_drm_devid(fd)); + const int has_64bit_reloc = gen >= 8; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object[2]; + uint32_t *map; + int factor = 10; + int i = 0; + + memset(object, 0, sizeof(object)); + object[0].handle = gem_create(fd, 1024*1024); + object[1].handle = gem_create(fd, 4096); + map = gem_mmap__cpu(fd, object[1].handle, 0, 4096, PROT_WRITE); + gem_set_domain(fd, object[1].handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + + *map = MI_BATCH_BUFFER_END; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)object; + execbuf.buffer_count = 2; + if (gen >= 6) + execbuf.flags = I915_EXEC_BLT; + gem_execbuf(fd, &execbuf); + + igt_debug("Active offsets = [%08llx, %08llx]\n", + object[0].offset, object[1].offset); + +#define COPY_BLT_CMD (2<<29|0x53<<22|0x6) +#define BLT_WRITE_ALPHA (1<<21) +#define BLT_WRITE_RGB (1<<20) + gem_set_domain(fd, object[1].handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + while (factor--) { + /* XY_SRC_COPY */ + map[i++] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB; + if (has_64bit_reloc) + map[i-1] += 2; + map[i++] = 0xcc << 16 | 1 << 25 | 1 << 24 | (4*1024); + map[i++] = 0; + map[i++] = 256 << 16 | 1024; + map[i++] = object[0].offset; + if (has_64bit_reloc) + map[i++] = object[0].offset >> 32; + map[i++] = 0; + map[i++] = 4096; + map[i++] = object[0].offset; + if (has_64bit_reloc) + map[i++] = object[0].offset >> 32; + } + map[i++] = MI_BATCH_BUFFER_END; + munmap(map, 4096); + + object[0].flags = EXEC_OBJECT_PINNED | EXEC_OBJECT_WRITE; + object[1].flags = EXEC_OBJECT_PINNED; + gem_execbuf(fd, &execbuf); + gem_close(fd, object[0].handle); + gem_close(fd, object[1].handle); + + return object[1].offset; +} + +static void test_evict_active(int fd) +{ + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object; + uint64_t expected; + + memset(&object, 0, sizeof(object)); + object.handle = gem_create(fd, 4096); + gem_write(fd, object.handle, 0, &bbe, sizeof(bbe)); + + expected = busy_batch(fd); + object.offset = expected; + object.flags = EXEC_OBJECT_PINNED; + + /* Replace the active batch with ourselves, forcing an eviction */ + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&object; + execbuf.buffer_count = 1; + + gem_execbuf(fd, &execbuf); + gem_close(fd, object.handle); + + igt_assert_eq_u64(object.offset, expected); +} + +static void test_evict_snoop(int fd) +{ + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object[2]; + uint64_t hole; + + igt_require(!gem_has_llc(fd)); + igt_require(!gem_uses_ppgtt(fd)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)object; + execbuf.buffer_count = 1; + + /* Find a hole */ + memset(object, 0, sizeof(object)); + object[0].handle = gem_create(fd, 3*4096); + gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe)); + gem_execbuf(fd, &execbuf); + gem_close(fd, object[0].handle); + hole = object[0].offset; + + /* Create a snoop + uncached pair */ + object[0].handle = gem_create(fd, 4096); + object[0].flags = EXEC_OBJECT_PINNED; + gem_set_caching(fd, object[0].handle, 1); + object[1].handle = gem_create(fd, 4096); + object[1].flags = EXEC_OBJECT_PINNED; + gem_write(fd, object[1].handle, 4096-sizeof(bbe), &bbe, sizeof(bbe)); + execbuf.buffer_count = 2; + + /* snoop abutting before uncached -> error */ + object[0].offset = hole; + object[1].offset = hole + 4096; + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL); + + /* snoop abutting after uncached -> error */ + object[0].offset = hole + 4096; + object[1].offset = hole; + igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL); + + /* with gap -> okay */ + object[0].offset = hole + 2*4096; + object[1].offset = hole; + igt_assert_eq(__gem_execbuf(fd, &execbuf), 0); + + /* And we should force the snoop away (or the GPU may hang) */ + object[0].flags = 0; + object[1].offset = hole + 4096; + igt_assert_eq(__gem_execbuf(fd, &execbuf), 0); + igt_assert(object[0].offset != hole); + igt_assert(object[0].offset != hole + 2*4096); + + gem_close(fd, object[0].handle); + gem_close(fd, object[1].handle); +} + +static void test_evict_hang(int fd) +{ + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object; + uint64_t expected; + igt_hang_ring_t hang; + + memset(&object, 0, sizeof(object)); + object.handle = gem_create(fd, 4096); + gem_write(fd, object.handle, 0, &bbe, sizeof(bbe)); + + hang = igt_hang_ctx(fd, 0, 0, 0, (uint64_t *)&expected); + object.offset = expected; + object.flags = EXEC_OBJECT_PINNED; + + /* Replace the hanging batch with ourselves, forcing an eviction */ + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&object; + execbuf.buffer_count = 1; + + gem_execbuf(fd, &execbuf); + gem_close(fd, object.handle); + + igt_assert_eq_u64(object.offset, expected); + + igt_post_hang_ring(fd, hang); +} + +static void xchg_offset(void *array, unsigned i, unsigned j) +{ + struct drm_i915_gem_exec_object2 *object = array; + uint64_t tmp = object[i].offset; + object[i].offset = object[j].offset; + object[j].offset = tmp; +} + +static void test_noreloc(int fd) +{ + const int gen = intel_gen(intel_get_drm_devid(fd)); + const uint32_t size = 4096; + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 object[257]; + uint64_t offset; + uint32_t handle; + uint32_t *batch, *b; + int i, loop; + + handle = gem_create(fd, (ARRAY_SIZE(object)+1)*size); + gem_write(fd, handle, 0, &bbe, sizeof(bbe)); + + memset(object, 0, sizeof(object)); + object[0].handle = handle; + + /* Find a hole */ + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)object; + execbuf.buffer_count = 1; + if (gen < 6) + execbuf.flags |= I915_EXEC_SECURE; + gem_execbuf(fd, &execbuf); + gem_close(fd, object[0].handle); + + igt_debug("Made a %dx%d KiB hole: %08llx\n", + (int)ARRAY_SIZE(object), size/1024, object[0].offset); + + offset = object[0].offset; + for (i = 0; i < ARRAY_SIZE(object) - 1; i++) { + object[i].handle = gem_create(fd, size); + object[i].offset = offset + i*size; + object[i].flags = EXEC_OBJECT_PINNED | EXEC_OBJECT_WRITE; + } + object[i].handle = gem_create(fd, 2*size); + object[i].offset = offset + i*size; + object[i].flags = EXEC_OBJECT_PINNED; + + b = batch = gem_mmap__cpu(fd, object[i].handle, 0, 2*size, PROT_WRITE); + gem_set_domain(fd, object[i].handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + for (i = 0; i < ARRAY_SIZE(object) - 1; i++) { + *b++ = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0); + if (gen >= 8) { + *b++ = object[i].offset; + *b++ = object[i].offset >> 32; + } else if (gen >= 4) { + *b++ = 0; + *b++ = object[i].offset; + } else { + b[-1]--; + *b++ = object[i].offset; + } + *b++ = i; + } + *b++ = MI_BATCH_BUFFER_END; + igt_assert(b - batch <= 2*size/sizeof(uint32_t)); + munmap(batch, size); + + execbuf.buffer_count = ARRAY_SIZE(object); + for (loop = 0; loop < 1024; loop++) { + igt_permute_array(object, ARRAY_SIZE(object)-1, xchg_offset); + gem_execbuf(fd, &execbuf); + + for (i = 0; i < ARRAY_SIZE(object) - 1; i++) { + uint32_t val; + + gem_read(fd, object[i].handle, 0, &val, sizeof(val)); + igt_assert_eq(val, (object[i].offset - offset)/size); + } + } + for (i = 0; i < ARRAY_SIZE(object); i++) + gem_close(fd, object[i].handle); +} + +igt_main +{ + int fd = -1; + + igt_skip_on_simulation(); + + igt_fixture { + fd = drm_open_driver_master(DRIVER_INTEL); + igt_require(gem_has_softpin(fd)); + } + + igt_subtest("invalid") + test_invalid(fd); + igt_subtest("softpin") + test_softpin(fd); + igt_subtest("overlap") + test_overlap(fd); + igt_subtest("noreloc") + test_noreloc(fd); + igt_subtest("evict-active") + test_evict_active(fd); + igt_subtest("evict-snoop") + test_evict_snoop(fd); + igt_subtest("evict-hang") + test_evict_hang(fd); + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/gem_stolen.c intel-gpu-tools-1.14/tests/gem_stolen.c --- intel-gpu-tools-1.13/tests/gem_stolen.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_stolen.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,360 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Ankitprasad Sharma + * + */ + +/** @file gem_create_stolen.c + * + * This is a test for the extended gem_create ioctl, that includes allocation + * of object from stolen memory. + * + * The goal is to simply ensure the basics work, and invalid input combinations + * are rejected. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "ioctl_wrappers.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_io.h" +#include "intel_chipset.h" +#include "igt_aux.h" +#include "drmtest.h" +#include "drm.h" +#include "i915_drm.h" + +IGT_TEST_DESCRIPTION("This test verifies the exetended gem_create ioctl," + " that includes allocation of obj from stolen region"); +#define CLEAR(s) memset(&s, 0, sizeof(s)) +#define SIZE 1024*1024 +#define DWORD_SIZE 4 +#define DATA 0xdead +#define LARGE_SIZE 0xffffffff +#define MAX_OBJECTS 100 + +static drm_intel_bufmgr *bufmgr; +static struct intel_batchbuffer *batch; + +static void verify_copy_op(drm_intel_bo *src, drm_intel_bo *dest) +{ + uint32_t *virt, i, ret; + /* Fill the src BO with dwords */ + ret = drm_intel_gem_bo_map_gtt(src); + igt_assert(!ret); + + virt = src->virtual; + for (i = 0; i < SIZE/DWORD_SIZE; i++) + virt[i] = i; + + intel_copy_bo(batch, dest, src, SIZE); + + ret = drm_intel_gem_bo_map_gtt(dest); + igt_assert(!ret); + + virt = dest->virtual; + /* verify */ + for (i = 0; i < SIZE/DWORD_SIZE; i++) + igt_assert_eq(virt[i], i); + + drm_intel_bo_unmap(src); + drm_intel_bo_unmap(dest); +} + +static void stolen_pwrite(int fd) +{ + drm_intel_bo *bo; + uint32_t buf[SIZE/DWORD_SIZE]; + uint32_t handle = 0; + uint32_t *virt; + int i, ret = 0; + + for (i = 0; i < SIZE/DWORD_SIZE; i++) + buf[i] = DATA; + + gem_require_stolen_support(fd); + + handle = gem_create_stolen(fd, SIZE); + + gem_write(fd, handle, 0, buf, SIZE); + bo = gem_handle_to_libdrm_bo(bufmgr, fd, "bo", handle); + + ret = drm_intel_gem_bo_map_gtt(bo); + igt_assert(!ret); + + virt = bo->virtual; + + for (i = 0; i < SIZE/DWORD_SIZE; i++) + igt_assert_eq(virt[i], DATA); + + drm_intel_bo_unmap(bo); + drm_intel_bo_unreference(bo); + gem_close(fd, handle); +} + +static void stolen_pread(int fd) +{ + drm_intel_bo *bo; + uint32_t buf[SIZE/DWORD_SIZE]; + uint32_t handle = 0; + uint32_t *virt; + int i, ret = 0; + + CLEAR(buf); + + gem_require_stolen_support(fd); + + handle = gem_create_stolen(fd, SIZE); + + bo = gem_handle_to_libdrm_bo(bufmgr, fd, "bo", handle); + + ret = drm_intel_gem_bo_map_gtt(bo); + igt_assert(!ret); + + virt = bo->virtual; + + for (i = 0; i < SIZE/DWORD_SIZE; i++) + virt[i] = DATA; + + drm_intel_bo_unmap(bo); + drm_intel_bo_unreference(bo); + + gem_read(fd, handle, 0, buf, SIZE); + + for (i = 0; i < SIZE/DWORD_SIZE; i++) + igt_assert_eq(buf[i], DATA); + + gem_close(fd, handle); +} + +static void copy_test(int fd) +{ + drm_intel_bo *src, *dest; + uint32_t src_handle = 0, dest_handle = 0; + + gem_require_stolen_support(fd); + + src_handle = gem_create_stolen(fd, SIZE); + dest_handle = gem_create_stolen(fd, SIZE); + + src = gem_handle_to_libdrm_bo(bufmgr, fd, "src_bo", src_handle); + dest = gem_handle_to_libdrm_bo(bufmgr, fd, "dst_bo", dest_handle); + + igt_assert(src != NULL); + igt_assert(dest != NULL); + + verify_copy_op(src, dest); + + drm_intel_bo_unreference(src); + drm_intel_bo_unreference(dest); + gem_close(fd, src_handle); + gem_close(fd, dest_handle); +} + +static void verify_object_clear(int fd) +{ + drm_intel_bo *bo; + uint32_t handle = 0; + uint32_t *virt; + int i, ret; + + gem_require_stolen_support(fd); + + handle = gem_create_stolen(fd, SIZE); + + bo = gem_handle_to_libdrm_bo(bufmgr, fd, "verify_bo", handle); + igt_assert(bo != NULL); + + ret = drm_intel_gem_bo_map_gtt(bo); + igt_assert(!ret); + + /* Verify if the BO is zeroed */ + virt = bo->virtual; + for (i = 0; i < SIZE / DWORD_SIZE; i++) + igt_assert(!virt[i]); + + drm_intel_bo_unmap(bo); + drm_intel_bo_unreference(bo); + gem_close(fd, handle); +} + +static void stolen_large_obj_alloc(int fd) +{ + uint32_t handle = 0; + + gem_require_stolen_support(fd); + handle = __gem_create_stolen(fd, (unsigned long long) LARGE_SIZE + 4096); + igt_assert(!handle); +} + +static void stolen_fill_purge_test(int fd) +{ + drm_intel_bo *bo; + int obj_count = 0, i = 0; + int _ret = 0, j = 0; + uint32_t handle[MAX_OBJECTS]; + uint32_t new_handle; + uint32_t *virt; + int retained; + + gem_require_stolen_support(fd); + + /* Exhaust Stolen space */ + do { + handle[i] = __gem_create_stolen(fd, SIZE); + if (handle[i] != 0) { + bo = gem_handle_to_libdrm_bo(bufmgr, fd, + "verify_bo", handle[i]); + igt_assert(bo != NULL); + + _ret = drm_intel_gem_bo_map_gtt(bo); + igt_assert(!_ret); + + virt = bo->virtual; + for (j = 0; j < SIZE/DWORD_SIZE; j++) + virt[j] = DATA; + + drm_intel_bo_unmap(bo); + drm_intel_bo_unreference(bo); + + obj_count++; + } + + i++; + } while (handle[i-1] && i < MAX_OBJECTS); + + igt_assert(obj_count > 0); + + /* Mark all stolen objects purgeable */ + for (i = 0; i < obj_count; i++) + retained = gem_madvise(fd, handle[i], I915_MADV_DONTNEED); + + /* Try to allocate one more object */ + new_handle = gem_create_stolen(fd, SIZE); + + /* Check if the retained object's memory contents are intact */ + for (i = 0; i < obj_count; i++) { + retained = gem_madvise(fd, handle[i], I915_MADV_WILLNEED); + if (retained) { + bo = gem_handle_to_libdrm_bo(bufmgr, fd, + "verify_bo", handle[i]); + igt_assert(bo != NULL); + + _ret = drm_intel_gem_bo_map_gtt(bo); + igt_assert(!_ret); + + virt = bo->virtual; + for (j = 0; j < SIZE/DWORD_SIZE; j++) + igt_assert_eq(virt[j], DATA); + + drm_intel_bo_unmap(bo); + drm_intel_bo_unreference(bo); + } + } + + gem_close(fd, new_handle); + for (i = 0; i < obj_count; i++) + gem_close(fd, handle[i]); +} + +static void +stolen_no_mmap(int fd) +{ + void *addr; + uint32_t handle = 0; + + gem_require_stolen_support(fd); + + handle = gem_create_stolen(fd, SIZE); + + addr = gem_mmap__cpu(fd, handle, 0, SIZE, PROT_READ | PROT_WRITE); + igt_assert(addr == NULL); + + gem_close(fd, handle); +} + +igt_main +{ + int fd; + uint32_t devid; + + igt_skip_on_simulation(); + + igt_fixture { + fd = drm_open_driver(DRIVER_INTEL); + devid = intel_get_drm_devid(fd); + + bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); + batch = intel_batchbuffer_alloc(bufmgr, devid); + } + + igt_subtest("stolen-clear") + verify_object_clear(fd); + + /* + * stolen mem special cases - checking for non cpu mappable + */ + igt_subtest("stolen-no-mmap") + stolen_no_mmap(fd); + + /* checking for pread/pwrite interfaces */ + igt_subtest("stolen-pwrite") + stolen_pwrite(fd); + + igt_subtest("stolen-pread") + stolen_pread(fd); + + /* Functional Test - blt copy */ + igt_subtest("stolen-copy") + copy_test(fd); + + igt_subtest("large-object-alloc") + stolen_large_obj_alloc(fd); + + /* Filling stolen completely and marking all the objects + * purgeable. Then trying to add one more object, to verify + * the purging logic. + * Again marking all objects WILLNEED and verifying the + * contents of the retained objects. + */ + igt_subtest("stolen-fill-purge") + stolen_fill_purge_test(fd); + + igt_fixture { + intel_batchbuffer_free(batch); + drm_intel_bufmgr_destroy(bufmgr); + } +} diff -Nru intel-gpu-tools-1.13/tests/gem_storedw_batches_loop.c intel-gpu-tools-1.14/tests/gem_storedw_batches_loop.c --- intel-gpu-tools-1.13/tests/gem_storedw_batches_loop.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_storedw_batches_loop.c 2016-03-01 15:59:21.000000000 +0000 @@ -136,7 +136,7 @@ fd = drm_open_driver(DRIVER_INTEL); devid = intel_get_drm_devid(fd); - has_ppgtt = gem_uses_aliasing_ppgtt(fd); + has_ppgtt = gem_uses_ppgtt(fd); /* storedw needs gtt address on gen4+/g33 and snoopable memory. * Strictly speaking we could implement this now ... */ diff -Nru intel-gpu-tools-1.13/tests/gem_storedw_loop.c intel-gpu-tools-1.14/tests/gem_storedw_loop.c --- intel-gpu-tools-1.13/tests/gem_storedw_loop.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_storedw_loop.c 2016-03-01 15:59:21.000000000 +0000 @@ -36,110 +36,129 @@ #include #include #include "drm.h" -#include "intel_bufmgr.h" IGT_TEST_DESCRIPTION("Basic CS check using MI_STORE_DATA_IMM."); #define LOCAL_I915_EXEC_VEBOX (4<<0) -static drm_intel_bufmgr *bufmgr; -struct intel_batchbuffer *batch; -static drm_intel_bo *target_buffer; static int devid; /* * Testcase: Basic bsd MI check using MI_STORE_DATA_IMM */ -static void -emit_store_dword_imm(drm_intel_bo *dest, uint32_t val) -{ - int cmd; - cmd = MI_STORE_DWORD_IMM; +static unsigned coherent_domain; - BEGIN_BATCH(4, 0); - OUT_BATCH(cmd); - if (batch->gen >= 8) { - OUT_RELOC(dest, I915_GEM_DOMAIN_INSTRUCTION, - I915_GEM_DOMAIN_INSTRUCTION, 0); - OUT_BATCH(val); - } else { - OUT_BATCH(0); /* reserved */ - OUT_RELOC(dest, I915_GEM_DOMAIN_INSTRUCTION, - I915_GEM_DOMAIN_INSTRUCTION, 0); - OUT_BATCH(val); +static void * +mmap_coherent(int fd, uint32_t handle, int size) +{ + if (gem_has_llc(fd)) { + coherent_domain = I915_GEM_DOMAIN_CPU; + return gem_mmap__cpu(fd, handle, 0, size, PROT_WRITE); } - ADVANCE_BATCH(); + + coherent_domain = I915_GEM_DOMAIN_GTT; + if (gem_mmap__has_wc(fd)) + return gem_mmap__wc(fd, handle, 0, size, PROT_WRITE); + else + return gem_mmap__gtt(fd, handle, size, PROT_WRITE); } static void -store_dword_loop(int ring, int count, int divider) +store_dword_loop(int fd, int ring, int count, int divider) { int i, val = 0; - uint32_t *buf; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj[2]; + struct drm_i915_gem_relocation_entry reloc[divider]; + uint32_t handle[divider]; + uint32_t *batch[divider]; + uint32_t *target; + int gen = intel_gen(devid); + + memset(obj, 0, sizeof(obj)); + obj[0].handle = gem_create(fd, 4096); + target = mmap_coherent(fd, obj[0].handle, 4096); + + memset(reloc, 0, sizeof(reloc)); + for (i = 0; i < divider; i++) { + uint32_t *b; + + handle[i] = gem_create(fd, 4096); + batch[i] = mmap_coherent(fd, handle[i], 4096); + gem_set_domain(fd, handle[i], coherent_domain, coherent_domain); + + b = batch[i]; + *b++ = MI_STORE_DWORD_IMM; + *b++ = 0; + *b++ = 0; + *b++ = 0; + *b++ = MI_BATCH_BUFFER_END; + + reloc[i].target_handle = obj[0].handle; + reloc[i].offset = 4; + if (gen < 8) + reloc[i].offset += 4; + reloc[i].read_domains = I915_GEM_DOMAIN_INSTRUCTION; + reloc[i].write_domain = I915_GEM_DOMAIN_INSTRUCTION; + obj[1].relocation_count = 1; + } + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)obj; + execbuf.buffer_count = 2; + execbuf.flags = ring; igt_info("running storedw loop on render with stall every %i batch\n", divider); for (i = 0; i < SLOW_QUICK(0x2000, 0x10); i++) { - emit_store_dword_imm(target_buffer, val); - intel_batchbuffer_flush_on_ring(batch, ring); - - if (i % divider != 0) - goto cont; + int j = i % divider; - drm_intel_bo_map(target_buffer, 0); - - buf = target_buffer->virtual; - igt_assert_f(buf[0] == val, - "value mismatch: cur 0x%08x, stored 0x%08x\n", - buf[0], val); - - drm_intel_bo_unmap(target_buffer); + gem_set_domain(fd, handle[j], coherent_domain, coherent_domain); + batch[j][3] = val; + obj[1].handle = handle[j]; + obj[1].relocs_ptr = (uintptr_t)&reloc[j]; + gem_execbuf(fd, &execbuf); + + if (j == 0) { + gem_set_domain(fd, obj[0].handle, coherent_domain, 0); + igt_assert_f(*target == val, + "%d: value mismatch: stored 0x%08x, expected 0x%08x\n", + i, *target, val); + } -cont: val++; } - drm_intel_bo_map(target_buffer, 0); - buf = target_buffer->virtual; - - igt_info("completed %d writes successfully, current value: 0x%08x\n", i, - buf[0]); - drm_intel_bo_unmap(target_buffer); + gem_set_domain(fd, obj[0].handle, coherent_domain, 0); + igt_info("completed %d writes successfully, current value: 0x%08x\n", + i, target[0]); + + munmap(target, 4096); + gem_close(fd, obj[0].handle); + for (i = 0; i < divider; ++i) { + munmap(batch[i], 4096); + gem_close(fd, handle[i]); + } } static void -store_test(int ring, int count) +store_test(int fd, int ring, int count) { - drm_intel_bufmgr_gem_enable_reuse(bufmgr); - - batch = intel_batchbuffer_alloc(bufmgr, devid); - igt_assert(batch); - - target_buffer = drm_intel_bo_alloc(bufmgr, "target bo", 4096, 4096); - igt_assert(target_buffer); - - store_dword_loop(ring, count, 1); - store_dword_loop(ring, count, 2); + gem_require_ring(fd, ring); + store_dword_loop(fd, ring, count, 1); + store_dword_loop(fd, ring, count, 2); if (!igt_run_in_simulation()) { - store_dword_loop(ring, count, 3); - store_dword_loop(ring, count, 5); + store_dword_loop(fd, ring, count, 3); + store_dword_loop(fd, ring, count, 5); + store_dword_loop(fd, ring, count, 7); + store_dword_loop(fd, ring, count, 11); + store_dword_loop(fd, ring, count, 13); + store_dword_loop(fd, ring, count, 17); + store_dword_loop(fd, ring, count, 19); } - - drm_intel_bo_unreference(target_buffer); - intel_batchbuffer_free(batch); } -struct ring { - const char *name; - int id; -} rings[] = { - { "bsd", I915_EXEC_BSD }, - { "render", I915_EXEC_RENDER }, - { "blt", I915_EXEC_BLT }, - { "vebox", I915_EXEC_VEBOX }, -}; - static void check_test_requirements(int fd, int ringid) { @@ -150,38 +169,34 @@ igt_main { - int fd, i; + const struct intel_execution_engine *e; + int fd; igt_fixture { fd = drm_open_driver(DRIVER_INTEL); devid = intel_get_drm_devid(fd); - bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); - igt_assert(bufmgr); - igt_skip_on_f(intel_gen(devid) < 6, "MI_STORE_DATA can only use GTT address on gen4+/g33 and " "needs snoopable mem on pre-gen6\n"); /* This only works with ppgtt */ - igt_require(gem_uses_aliasing_ppgtt(fd)); + igt_require(gem_uses_ppgtt(fd)); } - for (i = 0; i < ARRAY_SIZE(rings); i++) { - - igt_subtest_f("basic-%s", rings[i].name) { - check_test_requirements(fd, rings[i].id); - store_test(rings[i].id, 16*1024); + for (e = intel_execution_engines; e->name; e++) { + igt_subtest_f("basic-%s", e->name) { + check_test_requirements(fd, e->exec_id); + store_test(fd, e->exec_id | e->flags, 16*1024); } - igt_subtest_f("long-%s", rings[i].name) { - check_test_requirements(fd, rings[i].id); - store_test(rings[i].id, 1024*1024); + igt_subtest_f("long-%s", e->name) { + check_test_requirements(fd, e->exec_id); + store_test(fd, e->exec_id | e->flags, 1024*1024); } } igt_fixture { - drm_intel_bufmgr_destroy(bufmgr); close(fd); } } diff -Nru intel-gpu-tools-1.13/tests/gem_streaming_writes.c intel-gpu-tools-1.14/tests/gem_streaming_writes.c --- intel-gpu-tools-1.13/tests/gem_streaming_writes.c 2015-11-30 16:26:22.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_streaming_writes.c 2016-03-01 15:59:21.000000000 +0000 @@ -51,11 +51,6 @@ IGT_TEST_DESCRIPTION("Test of streaming writes into active GPU sources"); -static bool __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb) -{ - return drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb) == 0; -} - #define SRC 0 #define DST 1 #define BATCH 2 @@ -109,9 +104,9 @@ execbuf.buffers_ptr = (uintptr_t)exec; execbuf.buffer_count = 2; execbuf.flags = LOCAL_I915_EXEC_HANDLE_LUT; - if (!__gem_execbuf(fd, &execbuf)) { + if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = 0; - igt_require(__gem_execbuf(fd, &execbuf)); + igt_require(__gem_execbuf(fd, &execbuf) == 0); } /* We assume that the active objects are fixed to avoid relocations */ __src_offset = src_offset; @@ -135,7 +130,7 @@ reloc[2*i+1].read_domains = I915_GEM_DOMAIN_RENDER; reloc[2*i+1].write_domain = 0; } - igt_assert(__gem_execbuf(fd, &execbuf)); + gem_execbuf(fd, &execbuf); igt_assert_eq_u64(__src_offset, src_offset); igt_assert_eq_u64(__dst_offset, dst_offset); @@ -154,6 +149,8 @@ batch[i].offset = 0; base = gem_mmap__cpu(fd, batch[i].handle, 0, 4096, PROT_WRITE); + gem_set_domain(fd, batch[i].handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); for (int j = 0; j < 64; j++) { unsigned x = (n * CHUNK_SIZE) % 4096 >> 2; @@ -243,6 +240,7 @@ struct drm_i915_gem_relocation_entry reloc[2]; uint32_t tmp[] = { MI_BATCH_BUFFER_END }; uint64_t __src_offset, __dst_offset; + bool need_64b_start_offset = true; uint64_t batch_size; uint32_t *s, *d; uint32_t *base; @@ -302,7 +300,7 @@ execbuf.flags = LOCAL_I915_EXEC_HANDLE_LUT; if (gem_has_blt(fd)) execbuf.flags |= I915_EXEC_BLT; - if (!__gem_execbuf(fd, &execbuf)) { + if (__gem_execbuf(fd, &execbuf)) { execbuf.flags &= ~LOCAL_I915_EXEC_HANDLE_LUT; gem_execbuf(fd, &execbuf); } @@ -327,7 +325,8 @@ int k; execbuf.batch_start_offset = 128 * offset; - execbuf.batch_start_offset += 8 * (pass & 7); + if (!need_64b_start_offset) + execbuf.batch_start_offset += 8 * (pass & 7); igt_assert(execbuf.batch_start_offset <= batch_size - 64); if (reverse) execbuf.batch_start_offset = batch_size - execbuf.batch_start_offset - 64; diff -Nru intel-gpu-tools-1.13/tests/gem_sync.c intel-gpu-tools-1.14/tests/gem_sync.c --- intel-gpu-tools-1.13/tests/gem_sync.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_sync.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,187 @@ +/* + * Copyright © 2016 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include + +#include "igt.h" + +IGT_TEST_DESCRIPTION("Basic check of ring<->ring write synchronisation."); + +/* + * Testcase: Basic check of sync + * + * Extremely efficient at catching missed irqs + */ + +static double gettime(void) +{ + static clockid_t clock = -1; + struct timespec ts; + + /* Stay on the same clock for consistency. */ + if (clock != (clockid_t)-1) { + if (clock_gettime(clock, &ts)) + goto error; + goto out; + } + +#ifdef CLOCK_MONOTONIC_RAW + if (!clock_gettime(clock = CLOCK_MONOTONIC_RAW, &ts)) + goto out; +#endif +#ifdef CLOCK_MONOTONIC_COARSE + if (!clock_gettime(clock = CLOCK_MONOTONIC_COARSE, &ts)) + goto out; +#endif + if (!clock_gettime(clock = CLOCK_MONOTONIC, &ts)) + goto out; +error: + igt_warn("Could not read monotonic time: %s\n", + strerror(errno)); + igt_assert(0); + return 0; + +out: + return ts.tv_sec + 1e-9*ts.tv_nsec; +} + +static int has_engine(int fd, const struct intel_execution_engine *e) +{ + uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 exec; + int ret; + + memset(&exec, 0, sizeof(exec)); + exec.handle = gem_create(fd, 4096); + gem_write(fd, exec.handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&exec; + execbuf.buffer_count = 1; + execbuf.flags = e->exec_id | e->flags; + ret = __gem_execbuf(fd, &execbuf); + gem_close(fd, exec.handle); + + return ret; +} + +static void +sync_ring(int fd, unsigned ring, int num_children) +{ + unsigned engines[16]; + const char *names[16]; + int num_engines = 0; + + if (ring == ~0u) { + const struct intel_execution_engine *e; + + for (e = intel_execution_engines; e->name; e++) { + if (e->exec_id == 0) + continue; + + if (has_engine(fd, e)) + continue; + + if (e->exec_id == I915_EXEC_BSD) { + int is_bsd2 = e->flags != 0; + if (gem_has_bsd2(fd) != is_bsd2) + continue; + } + + names[num_engines] = e->name; + engines[num_engines++] = e->exec_id | e->flags; + if (num_engines == ARRAY_SIZE(engines)) + break; + } + + num_children *= num_engines; + } else { + gem_require_ring(fd, ring); + names[num_engines] = NULL; + engines[num_engines++] = ring; + } + + intel_detect_and_clear_missed_interrupts(fd); + igt_fork(child, num_children) { + const uint32_t bbe = MI_BATCH_BUFFER_END; + struct drm_i915_gem_exec_object2 object; + struct drm_i915_gem_execbuffer2 execbuf; + double start, elapsed; + unsigned long cycles; + + memset(&object, 0, sizeof(object)); + object.handle = gem_create(fd, 4096); + gem_write(fd, object.handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = (uintptr_t)&object; + execbuf.buffer_count = 1; + execbuf.flags = engines[child % num_engines]; + gem_execbuf(fd, &execbuf); + + start = gettime(); + cycles = 0; + do { + do { + gem_execbuf(fd, &execbuf); + gem_sync(fd, object.handle); + } while (++cycles & 1023); + } while ((elapsed = gettime() - start) < SLOW_QUICK(10, 1)); + igt_info("%s%sompleted %ld cycles: %.3f us\n", + names[child % num_engines] ?: "", + names[child % num_engines] ? " c" : "C", + cycles, elapsed*1e6/cycles); + + gem_close(fd, object.handle); + } + igt_waitchildren_timeout(20, NULL); + igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); +} + +igt_main +{ + const struct intel_execution_engine *e; + const int ncpus = sysconf(_SC_NPROCESSORS_ONLN); + int fd = -1; + + igt_skip_on_simulation(); + + igt_fixture + fd = drm_open_driver(DRIVER_INTEL); + + for (e = intel_execution_engines; e->name; e++) { + igt_subtest_f("basic-%s", e->name) + sync_ring(fd, e->exec_id | e->flags, 1); + igt_subtest_f("forked-%s", e->name) + sync_ring(fd, e->exec_id | e->flags, ncpus); + } + + igt_subtest("basic-all") + sync_ring(fd, ~0u, 1); + igt_subtest("forked-all") + sync_ring(fd, ~0u, ncpus); + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/gem_userptr_blits.c intel-gpu-tools-1.14/tests/gem_userptr_blits.c --- intel-gpu-tools-1.13/tests/gem_userptr_blits.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_userptr_blits.c 2016-03-01 15:59:21.000000000 +0000 @@ -61,17 +61,6 @@ #define PAGE_SIZE 4096 #endif -#define LOCAL_I915_GEM_USERPTR 0x33 -#define LOCAL_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + LOCAL_I915_GEM_USERPTR, struct local_i915_gem_userptr) -struct local_i915_gem_userptr { - uint64_t user_ptr; - uint64_t user_size; - uint32_t flags; -#define LOCAL_I915_USERPTR_READ_ONLY (1<<0) -#define LOCAL_I915_USERPTR_UNSYNCHRONIZED (1<<31) - uint32_t handle; -}; - static uint32_t userptr_flags = LOCAL_I915_USERPTR_UNSYNCHRONIZED; #define WIDTH 512 @@ -89,32 +78,6 @@ userptr_flags = 0; } -static int gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t *handle) -{ - struct local_i915_gem_userptr userptr; - int ret; - - memset(&userptr, 0, sizeof(userptr)); - userptr.user_ptr = (uintptr_t)ptr; - userptr.user_size = size; - userptr.flags = userptr_flags; - if (read_only) - userptr.flags |= LOCAL_I915_USERPTR_READ_ONLY; - - ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr); - if (ret) - ret = errno; - igt_skip_on_f(ret == ENODEV && - (userptr_flags & LOCAL_I915_USERPTR_UNSYNCHRONIZED) == 0 && - !read_only, - "Skipping, synchronized mappings with no kernel CONFIG_MMU_NOTIFIER?"); - if (ret == 0) - *handle = userptr.handle; - - return ret; -} - - static void gem_userptr_sync(int fd, uint32_t handle) { gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); @@ -173,8 +136,8 @@ reloc[1].read_domains = I915_GEM_DOMAIN_RENDER; reloc[1].write_domain = 0; + memset(&exec, 0, sizeof(exec)); memset(obj, 0, sizeof(obj)); - exec.buffer_count = 0; obj[exec.buffer_count++].handle = dst; if (src != dst) obj[exec.buffer_count++].handle = src; @@ -183,26 +146,15 @@ obj[exec.buffer_count].relocs_ptr = (uintptr_t)reloc; exec.buffer_count++; exec.buffers_ptr = (uintptr_t)obj; - - exec.batch_start_offset = 0; - exec.batch_len = i * 4; - exec.DR1 = exec.DR4 = 0; - exec.num_cliprects = 0; - exec.cliprects_ptr = 0; exec.flags = HAS_BLT_RING(intel_get_drm_devid(fd)) ? I915_EXEC_BLT : 0; - i915_execbuffer2_set_context_id(exec, 0); - exec.rsvd2 = 0; - ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &exec); - if (ret) - ret = errno; + ret = __gem_execbuf(fd, &exec); + gem_close(fd, handle); if (error == ~0) igt_assert_neq(ret, 0); else - igt_assert(ret == error); - - gem_close(fd, handle); + igt_assert_eq(ret, -error); } static int @@ -257,6 +209,7 @@ reloc[1].read_domains = I915_GEM_DOMAIN_RENDER; reloc[1].write_domain = 0; + memset(&exec, 0, sizeof(exec)); obj = calloc(n_bo + 1, sizeof(*obj)); for (n = 0; n < n_bo; n++) obj[n].handle = all_bo[n]; @@ -266,19 +219,9 @@ exec.buffers_ptr = (uintptr_t)obj; exec.buffer_count = n_bo + 1; - exec.batch_start_offset = 0; - exec.batch_len = i * 4; - exec.DR1 = exec.DR4 = 0; - exec.num_cliprects = 0; - exec.cliprects_ptr = 0; exec.flags = HAS_BLT_RING(intel_get_drm_devid(fd)) ? I915_EXEC_BLT : 0; - i915_execbuffer2_set_context_id(exec, 0); - exec.rsvd2 = 0; - - ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &exec); - if (ret) - ret = errno; + ret = __gem_execbuf(fd, &exec); gem_close(fd, handle); free(obj); @@ -289,10 +232,9 @@ create_userptr(int fd, uint32_t val, uint32_t *ptr) { uint32_t handle; - int i, ret; + int i; - ret = gem_userptr(fd, ptr, sizeof(linear), 0, &handle); - igt_assert_eq(ret, 0); + gem_userptr(fd, ptr, sizeof(linear), 0, userptr_flags, &handle); igt_assert(handle != 0); /* Fill the BO with dwords starting at val */ @@ -363,7 +305,6 @@ { void *ptr; uint32_t handle; - int ret; ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, @@ -371,8 +312,7 @@ -1, 0); igt_assert(ptr != MAP_FAILED); - ret = gem_userptr(fd, (uint32_t *)ptr, size, 0, &handle); - igt_assert_eq(ret, 0); + gem_userptr(fd, (uint32_t *)ptr, size, 0, userptr_flags, &handle); add_handle_ptr(handle, ptr, size); return handle; @@ -388,7 +328,7 @@ handle_size_map[old_handle]); } -static void clear(int fd, uint32_t handle, int size) +static void clear(int fd, uint32_t handle, uint64_t size) { void *ptr = get_handle_ptr(handle); @@ -450,7 +390,7 @@ igt_assert(posix_memalign(&ptr, PAGE_SIZE, PAGE_SIZE) == 0); oldflags = userptr_flags; gem_userptr_test_unsynchronized(); - ret = gem_userptr(fd, ptr, PAGE_SIZE, 0, &handle); + ret = __gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle); userptr_flags = oldflags; if (ret != 0) { free(ptr); @@ -509,7 +449,7 @@ igt_assert(posix_memalign(&ptr, PAGE_SIZE, PAGE_SIZE) == 0); - ret = gem_userptr(fd, ptr, PAGE_SIZE, 0, &handle); + ret = __gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle); if (ret == 0) gem_close(fd, handle); free(ptr); @@ -524,11 +464,9 @@ static int test_invalid_null_pointer(int fd) { uint32_t handle; - int ret; /* NULL pointer. */ - ret = gem_userptr(fd, NULL, PAGE_SIZE, 0, &handle); - igt_assert_eq(ret, 0); + gem_userptr(fd, NULL, PAGE_SIZE, 0, userptr_flags, &handle); copy(fd, handle, handle, ~0); /* QQQ Precise errno? */ gem_close(fd, handle); @@ -540,7 +478,6 @@ { uint32_t handle, handle2; void *ptr; - int ret; /* GTT mapping */ handle = create_bo(fd, 0); @@ -550,8 +487,7 @@ igt_assert(((unsigned long)ptr & (PAGE_SIZE - 1)) == 0); igt_assert((sizeof(linear) & (PAGE_SIZE - 1)) == 0); - ret = gem_userptr(fd, ptr, sizeof(linear), 0, &handle2); - igt_assert_eq(ret, 0); + gem_userptr(fd, ptr, sizeof(linear), 0, userptr_flags, &handle2); copy(fd, handle2, handle2, ~0); /* QQQ Precise errno? */ gem_close(fd, handle2); @@ -594,8 +530,7 @@ #ifdef MADV_DONTFORK ret |= madvise(ptr1, sizeof(linear), MADV_DONTFORK); #endif - ret |= gem_userptr(fd, ptr1, sizeof(linear), 0, &handle1); - igt_assert_eq(ret, 0); + gem_userptr(fd, ptr1, sizeof(linear), 0, userptr_flags, &handle1); igt_assert(ptr1); igt_assert(handle1); @@ -603,8 +538,7 @@ #ifdef MADV_DONTFORK ret |= madvise(ptr2, sizeof(linear), MADV_DONTFORK); #endif - ret |= gem_userptr(fd, ptr2, sizeof(linear), 0, &handle2); - igt_assert_eq(ret, 0); + gem_userptr(fd, ptr2, sizeof(linear), 0, userptr_flags, &handle2); igt_assert(ptr2); igt_assert(handle2); @@ -651,8 +585,7 @@ igt_assert(posix_memalign(&ptr, PAGE_SIZE, PAGE_SIZE) == 0); - ret = gem_userptr(fd, ptr, PAGE_SIZE, 0, &handle); - igt_assert_eq(ret, 0); + gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle); /* pread/pwrite are not always forbidden, but when they * are they should fail with EINVAL. @@ -677,6 +610,45 @@ return 0; } +static void test_relocations(int fd) +{ + struct drm_i915_gem_relocation_entry *reloc; + struct drm_i915_gem_exec_object2 obj; + struct drm_i915_gem_execbuffer2 exec; + unsigned size; + void *ptr; + int i; + + size = PAGE_SIZE + ALIGN(sizeof(*reloc)*256, PAGE_SIZE); + + memset(&obj, 0, sizeof(obj)); + igt_assert(posix_memalign(&ptr, PAGE_SIZE, size) == 0); + gem_userptr(fd, ptr, size, 0, userptr_flags, &obj.handle); + if (!gem_has_llc(fd)) + gem_set_caching(fd, obj.handle, 0); + *(uint32_t *)ptr = MI_BATCH_BUFFER_END; + + reloc = (typeof(reloc))((char *)ptr + PAGE_SIZE); + obj.relocs_ptr = (uintptr_t)reloc; + obj.relocation_count = 256; + + memset(reloc, 0, 256*sizeof(*reloc)); + for (i = 0; i < 256; i++) { + reloc[i].offset = 2048 - 4*i; + reloc[i].target_handle = obj.handle; + reloc[i].read_domains = I915_GEM_DOMAIN_INSTRUCTION; + } + + memset(&exec, 0, sizeof(exec)); + exec.buffers_ptr = (uintptr_t)&obj; + exec.buffer_count = 1; + gem_execbuf(fd, &exec); + + gem_sync(fd, obj.handle); + gem_close(fd, obj.handle); + free(ptr); +} + static unsigned char counter; static void (* volatile orig_sigbus)(int sig, siginfo_t *info, void *param); @@ -839,19 +811,19 @@ igt_assert(posix_memalign(&ptr, PAGE_SIZE, PAGE_SIZE * 2) == 0); /* Address not aligned. */ - ret = gem_userptr(fd, (char *)ptr + 1, PAGE_SIZE, 0, &handle); + ret = __gem_userptr(fd, (char *)ptr + 1, PAGE_SIZE, 0, userptr_flags, &handle); igt_assert_neq(ret, 0); /* Size not rounded to page size. */ - ret = gem_userptr(fd, ptr, PAGE_SIZE - 1, 0, &handle); + ret = __gem_userptr(fd, ptr, PAGE_SIZE - 1, 0, userptr_flags, &handle); igt_assert_neq(ret, 0); /* Both wrong. */ - ret = gem_userptr(fd, (char *)ptr + 1, PAGE_SIZE - 1, 0, &handle); + ret = __gem_userptr(fd, (char *)ptr + 1, PAGE_SIZE - 1, 0, userptr_flags, &handle); igt_assert_neq(ret, 0); /* Read-only not supported. */ - ret = gem_userptr(fd, (char *)ptr, PAGE_SIZE, 1, &handle); + ret = __gem_userptr(fd, (char *)ptr, PAGE_SIZE, 1, userptr_flags, &handle); igt_assert_neq(ret, 0); free(ptr); @@ -873,7 +845,7 @@ for (n = 0; n < 1000; n++) { igt_assert(posix_memalign(&ptr, PAGE_SIZE, PAGE_SIZE) == 0); - do_or_die(gem_userptr(fd, ptr, PAGE_SIZE, 0, &handle)); + do_or_die(__gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle)); gem_close(fd, handle); free(ptr); @@ -1028,6 +1000,7 @@ static void test_mlocked_evictions(int fd, int size, int count) { + count = min(256, count/2); mlocked_evictions(fd, &fault_ops, size, count); reset_handle_ptr(); } @@ -1065,41 +1038,40 @@ igt_assert(posix_memalign((void *)&ptr, PAGE_SIZE, PAGE_SIZE * 3) == 0); - ret = gem_userptr(fd, ptr + PAGE_SIZE, PAGE_SIZE, 0, &handle); - igt_assert_eq(ret, 0); + gem_userptr(fd, ptr + PAGE_SIZE, PAGE_SIZE, 0, userptr_flags, &handle); /* before, no overlap */ - ret = gem_userptr(fd, ptr, PAGE_SIZE, 0, &handle2); + ret = __gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle2); if (ret == 0) gem_close(fd, handle2); igt_assert_eq(ret, 0); /* after, no overlap */ - ret = gem_userptr(fd, ptr + PAGE_SIZE * 2, PAGE_SIZE, 0, &handle2); + ret = __gem_userptr(fd, ptr + PAGE_SIZE * 2, PAGE_SIZE, 0, userptr_flags, &handle2); if (ret == 0) gem_close(fd, handle2); igt_assert_eq(ret, 0); /* exactly overlapping */ - ret = gem_userptr(fd, ptr + PAGE_SIZE, PAGE_SIZE, 0, &handle2); + ret = __gem_userptr(fd, ptr + PAGE_SIZE, PAGE_SIZE, 0, userptr_flags, &handle2); if (ret == 0) gem_close(fd, handle2); igt_assert(ret == 0 || ret == expected); /* start overlaps */ - ret = gem_userptr(fd, ptr, PAGE_SIZE * 2, 0, &handle2); + ret = __gem_userptr(fd, ptr, PAGE_SIZE * 2, 0, userptr_flags, &handle2); if (ret == 0) gem_close(fd, handle2); igt_assert(ret == 0 || ret == expected); /* end overlaps */ - ret = gem_userptr(fd, ptr + PAGE_SIZE, PAGE_SIZE * 2, 0, &handle2); + ret = __gem_userptr(fd, ptr + PAGE_SIZE, PAGE_SIZE * 2, 0, userptr_flags, &handle2); if (ret == 0) gem_close(fd, handle2); igt_assert(ret == 0 || ret == expected); /* subsumes */ - ret = gem_userptr(fd, ptr, PAGE_SIZE * 3, 0, &handle2); + ret = __gem_userptr(fd, ptr, PAGE_SIZE * 3, 0, userptr_flags, &handle2); if (ret == 0) gem_close(fd, handle2); igt_assert(ret == 0 || ret == expected); @@ -1124,8 +1096,7 @@ bo_ptr = (char *)ALIGN((unsigned long)ptr, PAGE_SIZE); for (i = 0; i < num_obj; i++, bo_ptr += sizeof(linear)) { - ret = gem_userptr(fd, bo_ptr, sizeof(linear), 0, &bo[i]); - igt_assert_eq(ret, 0); + gem_userptr(fd, bo_ptr, sizeof(linear), 0, userptr_flags, &bo[i]); } bo[num_obj] = create_bo(fd, 0); @@ -1159,8 +1130,7 @@ bo_ptr = (char *)ALIGN((unsigned long)ptr, PAGE_SIZE); for (i = 0; i < num_obj; i++, bo_ptr += sizeof(linear)) { - ret = gem_userptr(fd, bo_ptr, sizeof(linear), 0, &bo[i]); - igt_assert_eq(ret, 0); + gem_userptr(fd, bo_ptr, sizeof(linear), 0, userptr_flags, &bo[i]); } bo[num_obj] = create_bo(fd, 0); @@ -1230,8 +1200,7 @@ igt_assert_eq(ret, 0); while (loops--) { - ret = gem_userptr(fd, ptr, PAGE_SIZE, 0, &handle); - igt_assert_eq(ret, 0); + gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle); gem_close(fd, handle); } @@ -1265,8 +1234,7 @@ while (!t->stop) { pthread_mutex_unlock(&t->mutex); for (int i = 0; i < num_handles; i++) - igt_assert_eq(gem_userptr(t->fd, t->ptr, PAGE_SIZE, 0, &handle[i]), - 0); + gem_userptr(t->fd, t->ptr, PAGE_SIZE, 0, userptr_flags, &handle[i]); for (int i = 0; i < num_handles; i++) gem_close(t->fd, handle[i]); pthread_mutex_lock(&t->mutex); @@ -1305,7 +1273,7 @@ free(t_data.ptr); } -unsigned int total_ram; +uint64_t total_ram; uint64_t aperture_size; int fd, count; @@ -1337,7 +1305,7 @@ count = 2 * aperture_size / (1024*1024) / 3; total_ram = intel_get_total_ram_mb(); - igt_info("Total RAM is %u MiB\n", total_ram); + igt_info("Total RAM is %'llu MiB\n", (long long)total_ram); if (count > total_ram * 3 / 4) { count = intel_get_total_ram_mb() * 3 / 4; @@ -1363,6 +1331,9 @@ igt_subtest("forbidden-operations") test_forbidden_ops(fd); + igt_subtest("relocations") + test_relocations(fd); + igt_info("Testing unsynchronized mappings...\n"); gem_userptr_test_unsynchronized(); diff -Nru intel-gpu-tools-1.13/tests/gem_wait.c intel-gpu-tools-1.14/tests/gem_wait.c --- intel-gpu-tools-1.13/tests/gem_wait.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_wait.c 2016-03-01 15:59:21.000000000 +0000 @@ -64,23 +64,6 @@ return ret; } -static int -gem_bo_wait_timeout(int fd, uint32_t handle, int64_t *timeout_ns) -{ - struct drm_i915_gem_wait wait; - int ret; - - igt_assert(timeout_ns); - - wait.bo_handle = handle; - wait.timeout_ns = *timeout_ns; - wait.flags = 0; - ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_WAIT, &wait); - *timeout_ns = wait.timeout_ns; - - return ret ? -errno : 0; -} - static void blt_color_fill(struct intel_batchbuffer *batch, drm_intel_bo *buf, const unsigned int pages) @@ -122,7 +105,7 @@ dst = drm_intel_bo_alloc(bufmgr, "dst", BUF_SIZE, 4096); dst2 = drm_intel_bo_alloc(bufmgr, "dst2", BUF_SIZE, 4096); - igt_skip_on_f(gem_bo_wait_timeout(fd, dst->handle, &timeout) == -EINVAL, + igt_skip_on_f(gem_wait(fd, dst->handle, &timeout) == -EINVAL, "kernel doesn't support wait_timeout, skipping test\n"); timeout = ENOUGH_WORK_IN_SECONDS * NSEC_PER_SEC; @@ -155,7 +138,7 @@ igt_assert_lt(iter, 1000000); - igt_info("%d iters is enough work\n", iter); + igt_debug("%d iters is enough work\n", iter); gem_quiescent_gpu(fd); if (do_signals) igt_fork_signal_helper(); @@ -169,18 +152,17 @@ intel_batchbuffer_flush(batch); igt_assert(gem_bo_busy(fd, dst2->handle) == true); - igt_assert_eq(gem_bo_wait_timeout(fd, dst2->handle, &timeout), 0); + igt_assert_eq(gem_wait(fd, dst2->handle, &timeout), 0); igt_assert(gem_bo_busy(fd, dst2->handle) == false); igt_assert_neq(timeout, 0); if (timeout == (ENOUGH_WORK_IN_SECONDS * NSEC_PER_SEC)) igt_info("Buffer was already done!\n"); - else { - igt_info("Finished with %" PRIu64 " time remaining\n", timeout); - } + else + igt_info("Finished with %fs remaining\n", timeout*1e-9); /* check that polling with timeout=0 works. */ timeout = 0; - igt_assert_eq(gem_bo_wait_timeout(fd, dst2->handle, &timeout), 0); + igt_assert_eq(gem_wait(fd, dst2->handle, &timeout), 0); igt_assert_eq(timeout, 0); /* Now check that we correctly time out, twice the auto-tune load should @@ -191,14 +173,14 @@ intel_batchbuffer_flush(batch); - ret = gem_bo_wait_timeout(fd, dst2->handle, &timeout); + ret = gem_wait(fd, dst2->handle, &timeout); igt_assert_eq(ret, -ETIME); igt_assert_eq(timeout, 0); igt_assert(gem_bo_busy(fd, dst2->handle) == true); /* check that polling with timeout=0 works. */ timeout = 0; - igt_assert_eq(gem_bo_wait_timeout(fd, dst2->handle, &timeout), -ETIME); + igt_assert_eq(gem_wait(fd, dst2->handle, &timeout), -ETIME); igt_assert_eq(timeout, 0); @@ -209,7 +191,7 @@ intel_batchbuffer_flush(batch); - igt_assert_eq(gem_bo_wait_timeout(fd, dst2->handle, &negative_timeout), 0); + igt_assert_eq(gem_wait(fd, dst2->handle, &negative_timeout), 0); igt_assert_eq(negative_timeout, -1); /* infinity always remains */ igt_assert(gem_bo_busy(fd, dst2->handle) == false); diff -Nru intel-gpu-tools-1.13/tests/gem_workarounds.c intel-gpu-tools-1.14/tests/gem_workarounds.c --- intel-gpu-tools-1.13/tests/gem_workarounds.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/gem_workarounds.c 2016-03-01 15:59:21.000000000 +0000 @@ -27,25 +27,11 @@ #define _GNU_SOURCE #include "igt.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - enum operation { - GPU_RESET = 0x01, - SUSPEND_RESUME = 0x02, - SIMPLE_READ = 0x03, + GPU_RESET, + SUSPEND_RESUME, + SIMPLE_READ, }; struct intel_wa_reg { @@ -54,57 +40,21 @@ uint32_t mask; }; -static int drm_fd; -static uint32_t devid; -static drm_intel_bufmgr *bufmgr; -struct intel_batchbuffer *batch; -static int num_wa_regs; - static struct intel_wa_reg *wa_regs; +static int num_wa_regs; static void wait_gpu(void) { - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 gem_exec; - uint32_t b[2] = {MI_BATCH_BUFFER_END}; - - memset(&gem_exec, 0, sizeof(gem_exec)); - gem_exec.handle = gem_create(drm_fd, 4096); - gem_write(drm_fd, gem_exec.handle, 0, b, sizeof(b)); - - memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)&gem_exec; - execbuf.buffer_count = 1; - execbuf.batch_len = sizeof(b); - - drmIoctl(drm_fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); - - gem_sync(drm_fd, gem_exec.handle); - - gem_close(drm_fd, gem_exec.handle); + int fd = drm_open_driver(DRIVER_INTEL); + gem_quiescent_gpu(fd); + close(fd); } static void test_hang_gpu(void) { - int retry_count = 30; - enum stop_ring_flags flags; - - igt_assert(retry_count); - igt_set_stop_rings(STOP_RING_DEFAULTS); - - wait_gpu(); - - while(retry_count--) { - flags = igt_get_stop_rings(); - if (flags == 0) - break; - igt_info("gpu hang not yet cleared, retries left %d\n", retry_count); - sleep(1); - } - - flags = igt_get_stop_rings(); - if (flags) - igt_set_stop_rings(STOP_RING_NONE); + int fd = drm_open_driver(DRIVER_INTEL); + igt_post_hang_ring(fd, igt_hang_ring(fd, I915_EXEC_DEFAULT)); + close(fd); } static void test_suspend_resume(void) @@ -117,8 +67,6 @@ { int i, fail_count = 0; - intel_register_access_init(intel_get_pci_device(), 0); - /* There is a small delay after coming ot of rc6 to the correct render context values will get loaded by hardware (bdw,chv). This here ensures that we have the correct context loaded before @@ -145,8 +93,6 @@ } } - intel_register_access_fini(); - return fail_count; } @@ -176,48 +122,44 @@ igt_main { igt_fixture { - int i; - int fd; - int ret; + struct pci_device *pci_dev; FILE *file; char *line = NULL; size_t line_size; + int i; - drm_fd = drm_open_driver(DRIVER_INTEL); - - bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); - devid = intel_get_drm_devid(drm_fd); - batch = intel_batchbuffer_alloc(bufmgr, devid); - - fd = igt_debugfs_open("i915_wa_registers", O_RDONLY); - igt_assert(fd >= 0); + pci_dev = intel_get_pci_device(); + igt_require(pci_dev); - file = fdopen(fd, "r"); - igt_assert(file > 0); + intel_register_access_init(pci_dev, 0); - ret = getline(&line, &line_size, file); - igt_assert(ret > 0); + file = igt_debugfs_fopen("i915_wa_registers", "r"); + igt_assert(getline(&line, &line_size, file) > 0); + igt_debug("i915_wa_registers: %s", line); sscanf(line, "Workarounds applied: %d", &num_wa_regs); - if (IS_BROADWELL(devid) || - IS_CHERRYVIEW(devid)) + if (IS_BROADWELL(pci_dev->device_id) || + IS_CHERRYVIEW(pci_dev->device_id)) igt_assert(num_wa_regs > 0); else igt_assert(num_wa_regs >= 0); wa_regs = malloc(num_wa_regs * sizeof(*wa_regs)); + igt_assert(wa_regs); i = 0; - while(getline(&line, &line_size, file) > 0) { - sscanf(line, "0x%X: 0x%08X, mask: 0x%08X", - &wa_regs[i].addr, &wa_regs[i].value, - &wa_regs[i].mask); - ++i; + while (getline(&line, &line_size, file) > 0) { + igt_debug("%s", line); + igt_assert(i < num_wa_regs); + if (sscanf(line, "0x%X: 0x%08X, mask: 0x%08X", + &wa_regs[i].addr, + &wa_regs[i].value, + &wa_regs[i].mask) == 3) + i++; } free(line); fclose(file); - close(fd); } igt_subtest("read") @@ -231,6 +173,7 @@ igt_fixture { free(wa_regs); - close(drm_fd); + intel_register_access_fini(); } + } diff -Nru intel-gpu-tools-1.13/tests/kms_3d.c intel-gpu-tools-1.14/tests/kms_3d.c --- intel-gpu-tools-1.13/tests/kms_3d.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_3d.c 2016-03-01 15:59:21.000000000 +0000 @@ -43,7 +43,7 @@ /* find an hdmi connector */ for (int i = 0; i < res->count_connectors; i++) { - connector = drmModeGetConnector(drm_fd, res->connectors[i]); + connector = drmModeGetConnectorCurrent(drm_fd, res->connectors[i]); if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA && connector->connection == DRM_MODE_DISCONNECTED) @@ -66,7 +66,7 @@ /* check for 3D modes */ mode_count = 0; - connector = drmModeGetConnector(drm_fd, connector_id); + connector = drmModeGetConnectorCurrent(drm_fd, connector_id); for (int i = 0; i < connector->count_modes; i++) { if (connector->modes[i].flags & DRM_MODE_FLAG_3D_MASK) mode_count++; diff -Nru intel-gpu-tools-1.13/tests/kms_atomic.c intel-gpu-tools-1.14/tests/kms_atomic.c --- intel-gpu-tools-1.13/tests/kms_atomic.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_atomic.c 2016-03-01 15:59:21.000000000 +0000 @@ -843,7 +843,7 @@ plane_kms = drmModeGetPlane(plane->state->desc->fd, plane->obj); igt_assert(plane_kms); - igt_get_all_formats(&igt_formats, &num_igt_formats); + igt_get_all_cairo_formats(&igt_formats, &num_igt_formats); for (i = 0; i < num_igt_formats; i++) { int j; @@ -867,7 +867,6 @@ uint32_t format = plane_get_igt_format(&plane); drmModeAtomicReq *req = drmModeAtomicAlloc(); struct igt_fb fb; - cairo_t *cr; igt_require(req); igt_require(format != 0); @@ -881,12 +880,9 @@ plane.crtc_w = mode->hdisplay / 2; plane.crtc_h = mode->vdisplay / 2; plane.crtc_id = crtc->obj; - plane.fb_id = igt_create_fb(plane.state->desc->fd, - plane.crtc_w, plane.crtc_h, - format, I915_TILING_NONE, &fb); - - cr = igt_get_cairo_ctx(plane.state->desc->fd, &fb); - igt_paint_test_pattern(cr, plane.crtc_w, plane.crtc_h); + plane.fb_id = igt_create_pattern_fb(plane.state->desc->fd, + plane.crtc_w, plane.crtc_h, + format, I915_TILING_NONE, &fb); /* Enable the overlay plane using the atomic API, and double-check * state is what we think it should be. */ @@ -913,20 +909,7 @@ struct kms_atomic_plane_state plane = *plane_old; uint32_t format = plane_get_igt_format(&plane); drmModeAtomicReq *req = drmModeAtomicAlloc(); - uint32_t *connectors; - int num_connectors; struct igt_fb fb; - cairo_t *cr; - int i; - - connectors = calloc(crtc->state->num_connectors, sizeof(*connectors)); - igt_assert(connectors); - - for (i = 0; i < crtc->state->num_connectors; i++) { - if (crtc->state->connectors[i].crtc_id == crtc->obj) - connectors[num_connectors++] = - crtc->state->connectors[i].obj; - } igt_require(format != 0); @@ -939,12 +922,9 @@ plane.crtc_w = mode->hdisplay; plane.crtc_h = mode->vdisplay; plane.crtc_id = crtc->obj; - plane.fb_id = igt_create_fb(plane.state->desc->fd, - plane.crtc_w, plane.crtc_h, - format, I915_TILING_NONE, &fb); - - cr = igt_get_cairo_ctx(plane.state->desc->fd, &fb); - igt_paint_test_pattern(cr, plane.crtc_w, plane.crtc_h); + plane.fb_id = igt_create_pattern_fb(plane.state->desc->fd, + plane.crtc_w, plane.crtc_h, + format, I915_TILING_NONE, &fb); /* Flip the primary plane using the atomic API, and double-check * state is what we think it should be. */ @@ -1044,7 +1024,6 @@ uint32_t format = plane_get_igt_format(&plane); drmModeAtomicReq *req = drmModeAtomicAlloc(); struct igt_fb fb; - cairo_t *cr; /* Pass a series of invalid object IDs for the FB ID. */ plane.fb_id = plane.obj; @@ -1098,12 +1077,9 @@ plane.crtc_w = mode->hdisplay; plane.crtc_h = mode->vdisplay; plane.crtc_id = crtc->obj; - plane.fb_id = igt_create_fb(plane.state->desc->fd, - plane.crtc_w - 1, plane.crtc_h - 1, - format, I915_TILING_NONE, &fb); - - cr = igt_get_cairo_ctx(plane.state->desc->fd, &fb); - igt_paint_test_pattern(cr, plane.crtc_w - 1, plane.crtc_h - 1); + plane.fb_id = igt_create_pattern_fb(plane.state->desc->fd, + plane.crtc_w - 1, plane.crtc_h - 1, + format, I915_TILING_NONE, &fb); plane_commit_atomic_err(&plane, plane_old, req, ATOMIC_RELAX_NONE, ENOSPC); diff -Nru intel-gpu-tools-1.13/tests/kms_chv_cursor_fail.c intel-gpu-tools-1.14/tests/kms_chv_cursor_fail.c --- intel-gpu-tools-1.13/tests/kms_chv_cursor_fail.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_chv_cursor_fail.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,429 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ + +#include "igt.h" +#include +#include +#include +#include +#include + +IGT_TEST_DESCRIPTION("Exercise CHV pipe C cursor fail"); + +#ifndef DRM_CAP_CURSOR_WIDTH +#define DRM_CAP_CURSOR_WIDTH 0x8 +#endif +#ifndef DRM_CAP_CURSOR_HEIGHT +#define DRM_CAP_CURSOR_HEIGHT 0x9 +#endif + +typedef struct { + int drm_fd; + igt_display_t display; + struct igt_fb primary_fb; + struct igt_fb fb; + igt_output_t *output; + enum pipe pipe; + igt_crc_t ref_crc; + int curw, curh; /* cursor size */ + igt_pipe_crc_t *pipe_crc; + uint32_t devid; + bool colored, jump, disable; + int jump_x, jump_y; +} data_t; + +enum { + EDGE_LEFT = 0x1, + EDGE_RIGHT = 0x2, + EDGE_TOP = 0x4, + EDGE_BOTTOM = 0x8, +}; + +static void cursor_disable(data_t *data) +{ + igt_output_t *output = data->output; + igt_plane_t *cursor; + + cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR); + igt_plane_set_fb(cursor, NULL); +} + +static void create_cursor_fb(data_t *data, int cur_w, int cur_h) +{ + cairo_t *cr; + uint32_t fb_id; + + fb_id = igt_create_fb(data->drm_fd, cur_w, cur_h, + DRM_FORMAT_ARGB8888, + LOCAL_DRM_FORMAT_MOD_NONE, + &data->fb); + igt_assert(fb_id); + + cr = igt_get_cairo_ctx(data->drm_fd, &data->fb); + if (data->colored) + igt_paint_color_alpha(cr, 0, 0, data->fb.width, data->fb.height, + 1.0, 0.0, 0.0, 1.0); + else + igt_paint_color_alpha(cr, 0, 0, data->fb.width, data->fb.height, + 0.0, 0.0, 0.0, 0.0); + igt_assert(cairo_status(cr) == 0); + cairo_destroy(cr); +} + +static void cursor_move(data_t *data, int x, int y, int i) +{ + int crtc_id = data->output->config.crtc->crtc_id; + + igt_debug("[%d] x=%d, y=%d\n", i, x, y); + + /* + * The "fixed" kernel will refuse the ioctl when pipe C cursor + * would straddle the left screen edge (which is when the hw + * fails). So let's accept a failure from the ioctl in that case. + */ + igt_assert(drmModeMoveCursor(data->drm_fd, crtc_id, x, y) == 0 || + (IS_CHERRYVIEW(data->devid) && data->pipe == PIPE_C && + x < 0 && x > -data->curw)); + igt_wait_for_vblank(data->drm_fd, data->pipe); +} + +#define XSTEP 8 +#define YSTEP 32 +#define XOFF 0 +#define NCRC 128 + +static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis) +{ + igt_crc_t *crc = NULL; + int i, n, x, xdir; + + if (sx > ex) + xdir = -1; + else + xdir = 1; + + igt_pipe_crc_start(data->pipe_crc); + + i = 0; + for (x = sx + XOFF; xdir * (x - ex - XOFF) <= 0; x += xdir * XSTEP) { + int xx, yy; + + if (swap_axis) { + xx = y; + yy = x; + } else { + xx = x; + yy = y; + } + + if (data->jump) { + cursor_move(data, data->jump_x, data->jump_y, i++); + } + if (data->disable) { + cursor_move(data, -data->curw, -data->curh, i++); + } + cursor_move(data, xx, yy, i++); + if (data->jump) { + cursor_move(data, data->jump_x, data->jump_y, i++); + } + if (data->disable) { + cursor_move(data, -data->curw, -data->curh, i++); + } + } + + n = igt_pipe_crc_get_crcs(data->pipe_crc, NCRC, &crc); + igt_pipe_crc_stop(data->pipe_crc); + + if (!data->colored) { + igt_debug("Checking CRCs: "); + for (i = 0; i < n; i++) { + igt_debug("[%d] ", i); + igt_assert_crc_equal(&data->ref_crc, &crc[i]); + } + igt_debug("\n"); + } + + + igt_pipe_crc_start(data->pipe_crc); +} + +static void test_edge(data_t *data, int sy, int ey, int sx, int ex, bool swap_axis) +{ + int crtc_id = data->output->config.crtc->crtc_id; + int y, ydir; + + if (sy > ey) + ydir = -1; + else + ydir = 1; + + igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0); + igt_assert_eq(drmModeSetCursor(data->drm_fd, crtc_id, data->fb.gem_handle, data->curw, data->curh), 0); + + for (y = sy; ydir * (y - ey) <= 0; ) { + test_edge_pos(data, sx, ex, y, swap_axis); + y += ydir * YSTEP; + test_edge_pos(data, ex, sx, y, swap_axis); + y += ydir * YSTEP; + } + + igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0); + igt_assert_eq(drmModeSetCursor(data->drm_fd, crtc_id, 0, data->curw, data->curh), 0); +} + +static void test_edges(data_t *data, unsigned int edges) +{ + drmModeModeInfo *mode = igt_output_get_mode(data->output); + + if (edges & EDGE_LEFT) { + test_edge(data, mode->vdisplay, -data->curh, + -data->curw, 0, false); + test_edge(data, -data->curh, mode->vdisplay, + -data->curw, 0, false); + } + + if (edges & EDGE_RIGHT) { + test_edge(data, mode->vdisplay, -data->curh, + mode->hdisplay - data->curw, mode->hdisplay, false); + test_edge(data, -data->curh, mode->vdisplay, + mode->hdisplay - data->curw, mode->hdisplay, false); + } + + if (edges & EDGE_TOP) { + test_edge(data, mode->hdisplay, -data->curw, + -data->curh, 0, true); + test_edge(data, -data->curw, mode->hdisplay, + -data->curh, 0, true); + } + + if (edges & EDGE_BOTTOM) { + test_edge(data, mode->hdisplay, -data->curw, + mode->vdisplay - data->curh, mode->vdisplay, true); + test_edge(data, -data->curw, mode->hdisplay, + mode->vdisplay - data->curh, mode->vdisplay, true); + } +} + +static bool prepare_crtc(data_t *data) +{ + drmModeModeInfo *mode; + igt_display_t *display = &data->display; + igt_plane_t *primary; + + /* select the pipe we want to use */ + igt_output_set_pipe(data->output, data->pipe); + cursor_disable(data); + igt_display_commit(display); + + if (!data->output->valid) { + igt_output_set_pipe(data->output, PIPE_ANY); + igt_display_commit(display); + return false; + } + + mode = igt_output_get_mode(data->output); + igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, + LOCAL_DRM_FORMAT_MOD_NONE, + &data->primary_fb); + + primary = igt_output_get_plane(data->output, IGT_PLANE_PRIMARY); + igt_plane_set_fb(primary, &data->primary_fb); + + igt_display_commit(display); + + data->jump_x = (mode->hdisplay - data->curw) / 2; + data->jump_y = (mode->vdisplay - data->curh) / 2; + + /* create the pipe_crc object for this pipe */ + if (data->pipe_crc) + igt_pipe_crc_free(data->pipe_crc); + + data->pipe_crc = igt_pipe_crc_new_nonblock(data->pipe, + INTEL_PIPE_CRC_SOURCE_AUTO); + + /* make sure cursor is disabled */ + cursor_disable(data); + igt_wait_for_vblank(data->drm_fd, data->pipe); + + /* get reference crc w/o cursor */ + igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); + igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); + igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); + + return true; +} + +static void cleanup_crtc(data_t *data) +{ + igt_display_t *display = &data->display; + igt_plane_t *primary; + + igt_pipe_crc_free(data->pipe_crc); + data->pipe_crc = NULL; + + igt_remove_fb(data->drm_fd, &data->primary_fb); + + primary = igt_output_get_plane(data->output, IGT_PLANE_PRIMARY); + igt_plane_set_fb(primary, NULL); + + igt_output_set_pipe(data->output, PIPE_ANY); + igt_display_commit(display); +} + +static void test_crtc(data_t *data, unsigned int edges) +{ + igt_display_t *display = &data->display; + int valid_tests = 0; + + create_cursor_fb(data, data->curw, data->curh); + + for_each_connected_output(display, data->output) { + if (!prepare_crtc(data)) + continue; + + valid_tests++; + + igt_info("Beginning %s on pipe %s, connector %s\n", + igt_subtest_name(), + kmstest_pipe_name(data->pipe), + igt_output_name(data->output)); + + test_edges(data, edges); + + igt_info("\n%s on pipe %s, connector %s: PASSED\n\n", + igt_subtest_name(), + kmstest_pipe_name(data->pipe), + igt_output_name(data->output)); + + /* cleanup what prepare_crtc() has done */ + cleanup_crtc(data); + } + + igt_remove_fb(data->drm_fd, &data->fb); + + igt_require_f(valid_tests, "no valid crtc/connector combinations found\n"); +} + +static int opt_handler(int opt, int opt_index, void *_data) +{ + data_t *data = _data; + + switch (opt) { + case 'c': + data->colored = true; + break; + case 'd': + data->disable = true; + break; + case 'j': + data->jump = true; + break; + default: + break; + } + + return 0; +} + +static data_t data; +static uint64_t max_curw = 64, max_curh = 64; + +int main(int argc, char **argv) +{ + static const struct option long_opts[] = { + { .name = "colored", .val = 'c' }, + { .name = "disable", .val = 'd'}, + { .name = "jump", .val = 'j' }, + {} + }; + static const char *help_str = + " --colored\t\tUse a colored cursor (disables CRC checks)\n" + " --disable\t\tDisable the cursor between each step\n" + " --jump\t\tJump the cursor to middle of the screen between each step)\n"; + + igt_subtest_init_parse_opts(&argc, argv, "", long_opts, help_str, + opt_handler, &data); + + igt_skip_on_simulation(); + + igt_fixture { + int ret; + + data.drm_fd = drm_open_driver_master(DRIVER_INTEL); + + data.devid = intel_get_drm_devid(data.drm_fd); + + ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_WIDTH, &max_curw); + igt_assert(ret == 0 || errno == EINVAL); + /* Not making use of cursor_height since it is same as width, still reading */ + ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_HEIGHT, &max_curh); + igt_assert(ret == 0 || errno == EINVAL); + + kmstest_set_vt_graphics_mode(); + + igt_require_pipe_crc(); + + igt_display_init(&data.display, data.drm_fd); + } + + for (data.curw = 64; data.curw <= 256; data.curw *= 2) { + data.curh = data.curw; + for (data.pipe = PIPE_A; data.pipe <= PIPE_C; data.pipe++) { + igt_subtest_f("pipe-%s-%dx%d-left-edge", + kmstest_pipe_name(data.pipe), + data.curw, data.curh) { + igt_require(data.pipe < data.display.n_pipes); + igt_require(data.curw <= max_curw && data.curh <= max_curh); + test_crtc(&data, EDGE_LEFT); + } + igt_subtest_f("pipe-%s-%dx%d-right-edge", + kmstest_pipe_name(data.pipe), + data.curw, data.curh) { + igt_require(data.pipe < data.display.n_pipes); + igt_require(data.curw <= max_curw && data.curh <= max_curh); + test_crtc(&data, EDGE_RIGHT); + } + igt_subtest_f("pipe-%s-%dx%d-top-edge", + kmstest_pipe_name(data.pipe), + data.curw, data.curh) { + igt_require(data.pipe < data.display.n_pipes); + igt_require(data.curw <= max_curw && data.curh <= max_curh); + test_crtc(&data, EDGE_TOP); + } + igt_subtest_f("pipe-%s-%dx%d-bottom-edge", + kmstest_pipe_name(data.pipe), + data.curw, data.curh) { + igt_require(data.pipe < data.display.n_pipes); + igt_require(data.curw <= max_curw && data.curh <= max_curh); + test_crtc(&data, EDGE_BOTTOM); + } + } + } + + igt_fixture + igt_display_fini(&data.display); + + igt_exit(); +} diff -Nru intel-gpu-tools-1.13/tests/kms_draw_crc.c intel-gpu-tools-1.14/tests/kms_draw_crc.c --- intel-gpu-tools-1.13/tests/kms_draw_crc.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_draw_crc.c 2016-03-01 15:59:21.000000000 +0000 @@ -232,8 +232,8 @@ igt_assert(drm_res->count_connectors <= MAX_CONNECTORS); for (i = 0; i < drm_res->count_connectors; i++) - drm_connectors[i] = drmModeGetConnector(drm_fd, - drm_res->connectors[i]); + drm_connectors[i] = drmModeGetConnectorCurrent(drm_fd, + drm_res->connectors[i]); kmstest_set_vt_graphics_mode(); diff -Nru intel-gpu-tools-1.13/tests/kms_fbcon_fbt.c intel-gpu-tools-1.14/tests/kms_fbcon_fbt.c --- intel-gpu-tools-1.13/tests/kms_fbcon_fbt.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_fbcon_fbt.c 2016-03-01 15:59:21.000000000 +0000 @@ -63,7 +63,7 @@ igt_assert(drm->res->count_connectors <= MAX_CONNECTORS); for (i = 0; i < drm->res->count_connectors; i++) - drm->connectors[i] = drmModeGetConnector(drm->fd, + drm->connectors[i] = drmModeGetConnectorCurrent(drm->fd, drm->res->connectors[i]); kmstest_set_vt_graphics_mode(); diff -Nru intel-gpu-tools-1.13/tests/kms_flip.c intel-gpu-tools-1.14/tests/kms_flip.c --- intel-gpu-tools-1.13/tests/kms_flip.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_flip.c 2016-03-01 15:59:21.000000000 +0000 @@ -132,11 +132,11 @@ static void dump_event_state(const struct event_state *es) { igt_debug("name = %s\n" - "last_ts = %lu.%lu usec\n" - "last_received_ts = %lu.%lu usec\n" + "last_ts = %ld.%ld usec\n" + "last_received_ts = %ld.%ld usec\n" "last_seq = %u\n" - "current_ts = %lu.%lu usec\n" - "current_received_ts = %lu.%lu usec\n" + "current_ts = %ld.%ld usec\n" + "current_received_ts = %ld.%ld usec\n" "current_seq = %u\n" "count = %u\n" "seq_step = %d\n", @@ -418,7 +418,7 @@ goto next; } - connector = drmModeGetConnector(drm_fd, connector_id); + connector = drmModeGetConnectorCurrent(drm_fd, connector_id); kmstest_set_connector_dpms(drm_fd, connector, DRM_MODE_DPMS_ON); kmstest_set_connector_dpms(drm_fd, connector, DRM_MODE_DPMS_OFF); @@ -644,8 +644,8 @@ timersub(&es->current_ts, &es->current_received_ts, &diff); if (!analog_tv_connector(o)) { igt_assert_f(diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_usec <= 2000), - "%s ts delayed for too long: %is, %iusec\n", - es->name, (int)diff.tv_sec, (int)diff.tv_usec); + "%s ts delayed for too long: %lds, %ldusec\n", + es->name, diff.tv_sec, diff.tv_usec); } @@ -655,9 +655,9 @@ timersub(&es->current_ts, &es->last_received_ts, &diff); igt_assert_f(timercmp(&es->last_received_ts, &es->current_ts, <), "%s ts before the %s was issued!\n" - "timerdiff %is, %ius\n", + "timerdiff %lds, %ldusec\n", es->name, es->name, - (int) diff.tv_sec, (int) diff.tv_usec); + diff.tv_sec, diff.tv_usec); /* check only valid if no modeset happens in between, that increments by * (1 << 23) on each step. This bounding matches the one in @@ -674,9 +674,9 @@ igt_assert_f(es->current_seq - es->last_seq >= 0, "unexpected %s seq %u, should be >= %u\n", es->name, es->current_seq, es->last_seq); - igt_assert_f(es->current_seq - es->last_seq <= 100, + igt_assert_f(es->current_seq - es->last_seq <= 150, "unexpected %s seq %u, should be < %u\n", - es->name, es->current_seq, es->last_seq + 100); + es->name, es->current_seq, es->last_seq + 150); igt_debug("testing ts continuity: Current frame %u, old frame %u\n", es->current_seq, es->last_seq); @@ -688,8 +688,8 @@ igt_assert_f(fabs((((double) diff.tv_usec) - usec_interflip) / usec_interflip) <= 0.005, - "inter-%s ts jitter: %is, %ius\n", - es->name, (int) diff.tv_sec, (int) diff.tv_usec); + "inter-%s ts jitter: %lds, %ldusec\n", + es->name, diff.tv_sec, diff.tv_usec); igt_assert_f(es->current_seq == es->last_seq + o->seq_step, "unexpected %s seq %u, expected %u\n", diff -Nru intel-gpu-tools-1.13/tests/kms_flip_tiling.c intel-gpu-tools-1.14/tests/kms_flip_tiling.c --- intel-gpu-tools-1.13/tests/kms_flip_tiling.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_flip_tiling.c 2016-03-01 15:59:21.000000000 +0000 @@ -39,16 +39,6 @@ int gen; } data_t; -static void -fill_fb(struct igt_fb *fb, data_t *data, drmModeModeInfo *mode) -{ - cairo_t *cr; - - cr = igt_get_cairo_ctx(data->drm_fd, fb); - igt_paint_test_pattern(cr, mode->hdisplay, mode->vdisplay); - cairo_destroy(cr); -} - static igt_pipe_crc_t *_pipe_crc; static igt_pipe_crc_t *pipe_crc_new(int pipe) @@ -75,7 +65,7 @@ static void wait_for_pageflip(int fd) { drmEventContext evctx = { .version = DRM_EVENT_CONTEXT_VERSION }; - struct timeval timeout = { .tv_sec = 0, .tv_usec = 32000 }; + struct timeval timeout = { .tv_sec = 0, .tv_usec = 50000 }; fd_set fds; int ret; @@ -121,20 +111,17 @@ width *= 2; } - fb_id = igt_create_fb(data->drm_fd, width, mode->vdisplay, - DRM_FORMAT_XRGB8888, tiling[0], - &fb[0]); + fb_id = igt_create_pattern_fb(data->drm_fd, width, mode->vdisplay, + DRM_FORMAT_XRGB8888, tiling[0], + &fb[0]); igt_assert(fb_id); /* Second fb has different background so CRC does not match. */ - fb_id = igt_create_color_fb(data->drm_fd, width, mode->vdisplay, - DRM_FORMAT_XRGB8888, tiling[1], - 0.5, 0.5, 0.5, &fb[1]); + fb_id = igt_create_color_pattern_fb(data->drm_fd, width, mode->vdisplay, + DRM_FORMAT_XRGB8888, tiling[1], + 0.5, 0.5, 0.5, &fb[1]); igt_assert(fb_id); - fill_fb(&fb[0], data, mode); - fill_fb(&fb[1], data, mode); - /* Set the crtc and generate a reference CRC. */ igt_plane_set_fb(primary, &fb[1]); igt_display_commit(&data->display); diff -Nru intel-gpu-tools-1.13/tests/kms_force_connector_basic.c intel-gpu-tools-1.14/tests/kms_force_connector_basic.c --- intel-gpu-tools-1.13/tests/kms_force_connector_basic.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_force_connector_basic.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,254 @@ +/* + * Copyright © 2014 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ + +#include "igt.h" + +IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work" + " correctly."); + +#define CHECK_MODE(m, h, w, r) \ + igt_assert_eq(m.hdisplay, h); igt_assert_eq(m.vdisplay, w); \ + igt_assert_eq(m.vrefresh, r); + +static void reset_connectors(void) +{ + int drm_fd = 0; + drmModeRes *res; + drmModeConnector *connector = NULL; + + drm_fd = drm_open_driver_master(DRIVER_INTEL); + res = drmModeGetResources(drm_fd); + + for (int i = 0; i < res->count_connectors; i++) { + + connector = drmModeGetConnectorCurrent(drm_fd, + res->connectors[i]); + + kmstest_force_connector(drm_fd, connector, + FORCE_CONNECTOR_UNSPECIFIED); + + kmstest_force_edid(drm_fd, connector, NULL, 0); + + drmModeFreeConnector(connector); + } + + igt_set_module_param_int("load_detect_test", 0); +} + +static int opt_handler(int opt, int opt_index, void *data) +{ + switch (opt) { + case 'r': + reset_connectors(); + exit(0); + break; + } + + return 0; +} + +int main(int argc, char **argv) +{ + /* force the VGA output and test that it worked */ + int drm_fd = 0; + drmModeRes *res; + drmModeConnector *vga_connector = NULL, *temp; + int start_n_modes, start_connection; + struct option long_opts[] = { + {"reset", 0, 0, 'r'}, + {0, 0, 0, 0} + }; + const char *help_str = + " --reset\t\tReset all connector force states and edid.\n"; + + igt_subtest_init_parse_opts(&argc, argv, "", long_opts, help_str, + opt_handler, NULL); + + igt_fixture { + drm_fd = drm_open_driver_master(DRIVER_INTEL); + res = drmModeGetResources(drm_fd); + igt_assert(res); + + /* find the vga connector */ + for (int i = 0; i < res->count_connectors; i++) { + + vga_connector = drmModeGetConnectorCurrent(drm_fd, + res->connectors[i]); + + if (vga_connector->connector_type == DRM_MODE_CONNECTOR_VGA) { + start_n_modes = vga_connector->count_modes; + start_connection = vga_connector->connection; + break; + } + + drmModeFreeConnector(vga_connector); + + vga_connector = NULL; + } + + igt_require(vga_connector); + igt_skip_on(vga_connector->connection == DRM_MODE_CONNECTED); + } + + igt_subtest("force-load-detect") { + /* + * disable all outputs to make sure we have a + * free crtc available for load detect + */ + kmstest_set_vt_graphics_mode(); + kmstest_unset_all_crtcs(drm_fd, res); + + igt_set_module_param_int("load_detect_test", 1); + + /* This can't use drmModeGetConnectorCurrent + * because connector probing is the point of this test. + */ + temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); + + igt_set_module_param_int("load_detect_test", 0); + + igt_assert(temp->connection != DRM_MODE_UNKNOWNCONNECTION); + + drmModeFreeConnector(temp); + } + + igt_subtest("force-connector-state") { + igt_display_t display; + + /* force the connector on and check the reported values */ + kmstest_force_connector(drm_fd, vga_connector, FORCE_CONNECTOR_ON); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + igt_assert_eq(temp->connection, DRM_MODE_CONNECTED); + igt_assert_lt(0, temp->count_modes); + drmModeFreeConnector(temp); + + /* attempt to use the display */ + kmstest_set_vt_graphics_mode(); + igt_display_init(&display, drm_fd); + igt_display_commit(&display); + igt_display_fini(&display); + + + /* force the connector off */ + kmstest_force_connector(drm_fd, vga_connector, + FORCE_CONNECTOR_OFF); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + igt_assert_eq(temp->connection, DRM_MODE_DISCONNECTED); + igt_assert_eq(0, temp->count_modes); + drmModeFreeConnector(temp); + + /* check that the previous state is restored */ + kmstest_force_connector(drm_fd, vga_connector, + FORCE_CONNECTOR_UNSPECIFIED); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + igt_assert_eq(temp->connection, start_connection); + drmModeFreeConnector(temp); + } + + igt_subtest("force-edid") { + kmstest_force_connector(drm_fd, vga_connector, + FORCE_CONNECTOR_ON); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + drmModeFreeConnector(temp); + + /* test edid forcing */ + kmstest_force_edid(drm_fd, vga_connector, + igt_kms_get_base_edid(), EDID_LENGTH); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + + igt_debug("num_conn %i\n", temp->count_modes); + + CHECK_MODE(temp->modes[0], 1920, 1080, 60); + /* Don't check non-preferred modes to avoid to tight coupling + * with the in-kernel EDID parser. */ + + drmModeFreeConnector(temp); + + /* remove edid */ + kmstest_force_edid(drm_fd, vga_connector, NULL, 0); + kmstest_force_connector(drm_fd, vga_connector, + FORCE_CONNECTOR_UNSPECIFIED); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + /* the connector should now have the same number of modes that + * it started with */ + igt_assert_eq(temp->count_modes, start_n_modes); + drmModeFreeConnector(temp); + + } + + igt_subtest("prune-stale-modes") { + int i; + + kmstest_force_connector(drm_fd, vga_connector, + FORCE_CONNECTOR_ON); + + /* test pruning of stale modes */ + kmstest_force_edid(drm_fd, vga_connector, + igt_kms_get_alt_edid(), EDID_LENGTH); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + + for (i = 0; i < temp->count_modes; i++) { + if (temp->modes[i].hdisplay == 1400 && + temp->modes[i].vdisplay == 1050) + break; + } + igt_assert_f(i != temp->count_modes, "1400x1050 not on mode list\n"); + + drmModeFreeConnector(temp); + + kmstest_force_edid(drm_fd, vga_connector, + igt_kms_get_base_edid(), EDID_LENGTH); + temp = drmModeGetConnectorCurrent(drm_fd, + vga_connector->connector_id); + + for (i = 0; i < temp->count_modes; i++) { + if (temp->modes[i].hdisplay == 1400 && + temp->modes[i].vdisplay == 1050) + break; + } + igt_assert_f(i == temp->count_modes, "1400x1050 not pruned from mode list\n"); + + drmModeFreeConnector(temp); + + kmstest_force_edid(drm_fd, vga_connector, NULL, 0); + kmstest_force_connector(drm_fd, vga_connector, + FORCE_CONNECTOR_UNSPECIFIED); + } + + igt_fixture { + drmModeFreeConnector(vga_connector); + close(drm_fd); + + reset_connectors(); + } + + igt_exit(); +} diff -Nru intel-gpu-tools-1.13/tests/kms_force_connector.c intel-gpu-tools-1.14/tests/kms_force_connector.c --- intel-gpu-tools-1.13/tests/kms_force_connector.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_force_connector.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,180 +0,0 @@ -/* - * Copyright © 2014 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - */ - -#include "igt.h" - -IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work" - " correctly."); - -#define CHECK_MODE(m, h, w, r) \ - igt_assert_eq(m.hdisplay, h); igt_assert_eq(m.vdisplay, w); \ - igt_assert_eq(m.vrefresh, r); - -static void reset_connectors(void) -{ - int drm_fd = 0; - drmModeRes *res; - drmModeConnector *connector = NULL; - - drm_fd = drm_open_driver_master(DRIVER_INTEL); - res = drmModeGetResources(drm_fd); - - for (int i = 0; i < res->count_connectors; i++) { - - connector = drmModeGetConnector(drm_fd, res->connectors[i]); - - kmstest_force_connector(drm_fd, connector, - FORCE_CONNECTOR_UNSPECIFIED); - - kmstest_force_edid(drm_fd, connector, NULL, 0); - - drmModeFreeConnector(connector); - } -} - -static int opt_handler(int opt, int opt_index, void *data) -{ - switch (opt) { - case 'r': - reset_connectors(); - exit(0); - break; - } - - return 0; -} - -int main(int argc, char **argv) -{ - /* force the VGA output and test that it worked */ - int drm_fd = 0; - drmModeRes *res; - drmModeConnector *vga_connector = NULL, *temp; - int start_n_modes; - struct option long_opts[] = { - {"reset", 0, 0, 'r'}, - {0, 0, 0, 0} - }; - const char *help_str = - " --reset\t\tReset all connector force states and edid.\n"; - - igt_subtest_init_parse_opts(&argc, argv, "", long_opts, help_str, - opt_handler, NULL); - - igt_fixture { - drm_fd = drm_open_driver_master(DRIVER_INTEL); - res = drmModeGetResources(drm_fd); - - /* find the vga connector */ - for (int i = 0; i < res->count_connectors; i++) { - - vga_connector = drmModeGetConnector(drm_fd, res->connectors[i]); - - if (vga_connector->connector_type == DRM_MODE_CONNECTOR_VGA) - break; - - drmModeFreeConnector(vga_connector); - - vga_connector = NULL; - } - - igt_require(vga_connector); - igt_skip_on(vga_connector->connection == DRM_MODE_CONNECTED); - } - - igt_subtest("force-connector-state") { - igt_display_t display; - - /* force the connector on and check the reported values */ - kmstest_force_connector(drm_fd, vga_connector, FORCE_CONNECTOR_ON); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - igt_assert_eq(temp->connection, DRM_MODE_CONNECTED); - igt_assert_lt(0, temp->count_modes); - drmModeFreeConnector(temp); - - /* attempt to use the display */ - kmstest_set_vt_graphics_mode(); - igt_display_init(&display, drm_fd); - igt_display_commit(&display); - igt_display_fini(&display); - - - /* force the connector off */ - kmstest_force_connector(drm_fd, vga_connector, - FORCE_CONNECTOR_OFF); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - igt_assert_eq(temp->connection, DRM_MODE_DISCONNECTED); - igt_assert_eq(0, temp->count_modes); - drmModeFreeConnector(temp); - - /* check that the previous state is restored */ - kmstest_force_connector(drm_fd, vga_connector, - FORCE_CONNECTOR_UNSPECIFIED); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - igt_assert_eq(temp->connection, vga_connector->connection); - drmModeFreeConnector(temp); - } - - igt_subtest("force-edid") { - kmstest_force_connector(drm_fd, vga_connector, - FORCE_CONNECTOR_ON); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - start_n_modes = temp->count_modes; - drmModeFreeConnector(temp); - - /* test edid forcing */ - kmstest_force_edid(drm_fd, vga_connector, - igt_kms_get_base_edid(), EDID_LENGTH); - temp = drmModeGetConnector(drm_fd, - vga_connector->connector_id); - - CHECK_MODE(temp->modes[0], 1920, 1080, 60); - CHECK_MODE(temp->modes[1], 1280, 720, 60); - CHECK_MODE(temp->modes[2], 1024, 768, 60); - CHECK_MODE(temp->modes[3], 800, 600, 60); - CHECK_MODE(temp->modes[4], 640, 480, 60); - - drmModeFreeConnector(temp); - - /* remove edid */ - kmstest_force_edid(drm_fd, vga_connector, NULL, 0); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - /* the connector should now have the same number of modes that - * it started with */ - igt_assert_eq(temp->count_modes, start_n_modes); - drmModeFreeConnector(temp); - - kmstest_force_connector(drm_fd, vga_connector, - FORCE_CONNECTOR_UNSPECIFIED); - } - - igt_fixture { - drmModeFreeConnector(vga_connector); - close(drm_fd); - - reset_connectors(); - } - - igt_exit(); -} diff -Nru intel-gpu-tools-1.13/tests/kms_frontbuffer_tracking.c intel-gpu-tools-1.14/tests/kms_frontbuffer_tracking.c --- intel-gpu-tools-1.13/tests/kms_frontbuffer_tracking.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_frontbuffer_tracking.c 2016-03-01 15:59:21.000000000 +0000 @@ -97,12 +97,15 @@ FBS_COUNT, } fbs; - /* Which features are we going to test now? This is a mask! */ + /* Which features are we going to test now? This is a mask! + * FEATURE_DEFAULT is a special value which instruct the test to just + * keep what's already enabled by default in the Kernel. */ enum { FEATURE_NONE = 0, FEATURE_FBC = 1, FEATURE_PSR = 2, FEATURE_COUNT = 4, + FEATURE_DEFAULT = 4, } feature; /* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and @@ -483,6 +486,9 @@ uint64_t tiling, int plane, struct igt_fb *fb) { uint32_t format; + unsigned int size, stride; + int bpp; + uint64_t tiling_for_size; switch (pformat) { case FORMAT_RGB888: @@ -512,7 +518,21 @@ igt_assert(false); } - igt_create_fb(drm.fd, width, height, format, tiling, fb); + /* We want all frontbuffers with the same width/height/format to have + * the same size regardless of tiling since we want to properly exercise + * the Kernel's specific tiling-checking code paths without accidentally + * hitting size-checking ones first. */ + bpp = igt_drm_format_to_bpp(format); + if (plane == PLANE_CUR) + tiling_for_size = LOCAL_DRM_FORMAT_MOD_NONE; + else + tiling_for_size = LOCAL_I915_FORMAT_MOD_X_TILED; + + igt_calc_fb_size(drm.fd, width, height, bpp, tiling_for_size, &size, + &stride); + + igt_create_fb_with_bo_size(drm.fd, width, height, format, tiling, fb, + size, stride); } static uint32_t pick_color(struct igt_fb *fb, enum color ecolor) @@ -851,7 +871,7 @@ static bool psr_wait_until_enabled(void) { - return igt_wait(psr_is_enabled(), 2000, 1); + return igt_wait(psr_is_enabled(), 5000, 1); } #define fbc_enable() igt_set_module_param_int("enable_fbc", 1) @@ -859,12 +879,22 @@ #define psr_enable() igt_set_module_param_int("enable_psr", 1) #define psr_disable() igt_set_module_param_int("enable_psr", 0) -static void get_sink_crc(sink_crc_t *crc) +static void get_sink_crc(sink_crc_t *crc, bool mandatory) { + int rc, errno_; + lseek(sink_crc.fd, 0, SEEK_SET); - igt_assert(read(sink_crc.fd, crc->data, SINK_CRC_SIZE) == - SINK_CRC_SIZE); + rc = read(sink_crc.fd, crc->data, SINK_CRC_SIZE); + errno_ = errno; + + if (rc == -1 && errno_ == ETIMEDOUT) { + if (mandatory) + igt_skip("Sink CRC is unreliable on this machine. Try running this test again individually\n"); + else + igt_info("Sink CRC is unreliable on this machine. Try running this test again individually\n"); + } + igt_assert(rc == SINK_CRC_SIZE); } static bool sink_crc_equal(sink_crc_t *a, sink_crc_t *b) @@ -1074,8 +1104,11 @@ } } -static void disable_features(void) +static void disable_features(const struct test_mode *t) { + if (t->feature == FEATURE_DEFAULT) + return; + fbc_disable(); psr_disable(); } @@ -1092,21 +1125,6 @@ pthread_exit(0); } -static int fb_get_bpp(struct igt_fb *fb) -{ - switch (fb->drm_format) { - case DRM_FORMAT_RGB565: - return 16; - case DRM_FORMAT_XRGB8888: - case DRM_FORMAT_ARGB8888: - case DRM_FORMAT_ARGB2101010: - case DRM_FORMAT_XRGB2101010: - return 32; - default: - igt_assert(false); - } -} - static void start_busy_thread(struct igt_fb *fb) { int rc; @@ -1119,7 +1137,7 @@ busy_thread.width = fb->width; busy_thread.height = fb->height; busy_thread.color = pick_color(fb, COLOR_PRIM_BG); - busy_thread.bpp = fb_get_bpp(fb); + busy_thread.bpp = igt_drm_format_to_bpp(fb->drm_format); rc = pthread_create(&busy_thread.thread, NULL, busy_thread_func, NULL); igt_assert_eq(rc, 0); @@ -1148,17 +1166,17 @@ free(pipe_str); } -static void collect_crcs(struct both_crcs *crcs) +static void collect_crcs(struct both_crcs *crcs, bool mandatory_sink_crc) { igt_pipe_crc_collect_crc(pipe_crc, &crcs->pipe); if (sink_crc.supported) - get_sink_crc(&crcs->sink); + get_sink_crc(&crcs->sink, mandatory_sink_crc); else memcpy(&crcs->sink, "unsupported!", SINK_CRC_SIZE); } -static void init_blue_crc(enum pixel_format format) +static void init_blue_crc(enum pixel_format format, bool mandatory_sink_crc) { struct igt_fb blue; int rc; @@ -1176,7 +1194,7 @@ blue.fb_id, 0, 0, &prim_mode_params.connector_id, 1, prim_mode_params.mode); igt_assert_eq(rc, 0); - collect_crcs(&blue_crcs[format].crc); + collect_crcs(&blue_crcs[format].crc, mandatory_sink_crc); print_crc("Blue CRC: ", &blue_crcs[format].crc); @@ -1188,7 +1206,8 @@ } static void init_crcs(enum pixel_format format, - struct draw_pattern_info *pattern) + struct draw_pattern_info *pattern, + bool mandatory_sink_crc) { int r, r_, rc; struct igt_fb tmp_fbs[pattern->n_rects]; @@ -1224,7 +1243,7 @@ &prim_mode_params.connector_id, 1, prim_mode_params.mode); igt_assert_eq(rc, 0); - collect_crcs(&pattern->crcs[format][r]); + collect_crcs(&pattern->crcs[format][r], mandatory_sink_crc); } for (r = 0; r < pattern->n_rects; r++) { @@ -1266,7 +1285,7 @@ igt_assert(drm.res->count_connectors <= MAX_CONNECTORS); for (i = 0; i < drm.res->count_connectors; i++) - drm.connectors[i] = drmModeGetConnector(drm.fd, + drm.connectors[i] = drmModeGetConnectorCurrent(drm.fd, drm.res->connectors[i]); rc = drmSetClientCap(drm.fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1); @@ -1345,10 +1364,12 @@ errno_ = errno; if (rc == -1 && errno_ == ENOTTY) igt_info("Sink CRC not supported: panel doesn't support it\n"); + if (rc == -1 && errno_ == ETIMEDOUT) + igt_info("Sink CRC not reliable on this panel: skipping it\n"); else if (rc == SINK_CRC_SIZE) sink_crc.supported = true; else - igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n", + igt_info("Unexpected sink CRC error, rc=:%zd errno:%d %s\n", rc, errno_, strerror(errno_)); } @@ -1570,19 +1591,23 @@ return flags; } -#define do_crc_assertions(flags) do { \ +#define do_crc_assertions(flags, mandatory_sink_crc) do { \ int flags__ = (flags); \ struct both_crcs crc_; \ \ if (!opt.check_crc || (flags__ & DONT_ASSERT_CRC)) \ break; \ \ - collect_crcs(&crc_); \ + collect_crcs(&crc_, mandatory_sink_crc); \ print_crc("Calculated CRC:", &crc_); \ \ igt_assert(wanted_crc); \ igt_assert_crc_equal(&crc_.pipe, &wanted_crc->pipe); \ - assert_sink_crc_equal(&crc_.sink, &wanted_crc->sink); \ + if (mandatory_sink_crc) \ + assert_sink_crc_equal(&crc_.sink, &wanted_crc->sink); \ + else \ + if (!sink_crc_equal(&crc_.sink, &wanted_crc->sink)) \ + igt_info("Sink CRC differ, but not required\n"); \ } while (0) #define do_status_assertions(flags_) do { \ @@ -1618,12 +1643,13 @@ #define do_assertions(flags) do { \ int flags_ = adjust_assertion_flags(t, (flags)); \ + bool mandatory_sink_crc = t->feature & FEATURE_PSR; \ \ wait_user(2, "Paused before assertions."); \ \ /* Check the CRC to make sure the drawing operations work \ * immediately, independently of the features being enabled. */ \ - do_crc_assertions(flags_); \ + do_crc_assertions(flags_, mandatory_sink_crc); \ \ /* Now we can flush things to make the test faster. */ \ do_flush(t); \ @@ -1636,7 +1662,7 @@ * would only delay the test suite while adding no value to the \ * test suite. */ \ if (t->screen == SCREEN_PRIM) \ - do_crc_assertions(flags_); \ + do_crc_assertions(flags_, mandatory_sink_crc); \ \ if (fbc.supports_last_action && opt.fbc_check_last_action) { \ if (flags_ & ASSERT_LAST_ACTION_CHANGED) \ @@ -1705,6 +1731,9 @@ static void enable_features_for_test(const struct test_mode *t) { + if (t->feature == FEATURE_DEFAULT) + return; + if (t->feature & FEATURE_FBC) fbc_enable(); if (t->feature & FEATURE_PSR) @@ -1784,7 +1813,7 @@ stop_busy_thread(); - disable_features(); + disable_features(t); set_crtc_fbs(t); if (t->screen == SCREEN_OFFSCREEN) @@ -1792,9 +1821,9 @@ unset_all_crtcs(); - init_blue_crc(t->format); + init_blue_crc(t->format, t->feature & FEATURE_PSR); if (pattern) - init_crcs(t->format, pattern); + init_crcs(t->format, pattern, t->feature & FEATURE_PSR); enable_features_for_test(t); } @@ -2800,9 +2829,10 @@ struct modeset_params *params = pick_params(t); struct draw_pattern_info *pattern = &pattern1; struct fb_region *target; - int max_height; + int max_height, assertions = 0; + int gen = intel_gen(intel_get_drm_devid(drm.fd)); - switch (intel_gen(intel_get_drm_devid(drm.fd))) { + switch (gen) { case 2: max_height = 2048; break; @@ -2814,6 +2844,11 @@ break; } + /* Gen 9 doesn't do the same dspaddr_offset magic as the older + * gens, so FBC may not be enabled there. */ + if (gen >= 9) + assertions |= DONT_ASSERT_FEATURE_STATUS; + prepare_subtest(t, pattern); target = pick_target(t, params); @@ -2826,13 +2861,14 @@ params->fb.x = 0; params->fb.y = max_height - params->mode->vdisplay; set_mode_for_params(params); - do_assertions(0); + do_assertions(assertions); for (r = 0; r < pattern->n_rects; r++) { draw_rect(pattern, target, t->method, r); update_wanted_crc(t, &pattern->crcs[t->format][r]); + /* GTT draws disable PSR. */ - do_assertions(ASSERT_PSR_DISABLED); + do_assertions(assertions | ASSERT_PSR_DISABLED); } igt_remove_fb(drm.fd, &tall_fb); @@ -3034,6 +3070,64 @@ } } +/* + * basic - do some basic operations regardless of which features are enabled + * + * METHOD + * This subtest does page flips and draw operations and checks the CRCs of the + * results. The big difference between this and the others is that here we + * don't enable/disable any features such as FBC or PSR: we go with whatever + * the Kernel has enabled by default for us. This subtest only does things + * that are exercised by the other subtests and in a less exhaustive way: it's + * completely redundant. On the other hand, it is very quick and was created + * with the CI system in mind: it's a quick way to detect regressions, so if + * it fails, then we can run the other subtests to find out why. + * + * EXPECTED RESULTS + * Passed CRC assertions. + * + * FAILURES + * If you get a failure here, you should run the more specific draw and flip + * subtests of each feature in order to discover what exactly is failing and + * why. + * + * TODO: do sink CRC assertions in case sink_crc.supported. Only do this after + * our sink CRC code gets 100% reliable, in order to avoid CI false negatives. + */ +static void basic_subtest(const struct test_mode *t) +{ + struct draw_pattern_info *pattern = &pattern1; + struct modeset_params *params = pick_params(t); + enum igt_draw_method method; + struct igt_fb *fb1, fb2; + int r; + int assertions = DONT_ASSERT_FEATURE_STATUS; + + prepare_subtest(t, pattern); + + create_fb(t->format, params->fb.fb->width, params->fb.fb->height, + LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2); + fb1 = params->fb.fb; + + for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++, r++) { + if (r == pattern->n_rects) { + params->fb.fb = (params->fb.fb == fb1) ? &fb2 : fb1; + + fill_fb_region(¶ms->fb, COLOR_PRIM_BG); + update_wanted_crc(t, &blue_crcs[t->format].crc); + + page_flip_for_params(params, t->flip); + do_assertions(assertions); + + r = 0; + } + + draw_rect(pattern, ¶ms->fb, method, r); + update_wanted_crc(t, &pattern->crcs[t->format][r]); + do_assertions(assertions); + } +} + static int opt_handler(int option, int option_index, void *data) { switch (option) { @@ -3436,6 +3530,16 @@ suspend_subtest(&t); TEST_MODE_ITER_END + t.pipes = PIPE_SINGLE; + t.screen = SCREEN_PRIM; + t.plane = PLANE_PRI; + t.fbs = FBS_INDIVIDUAL; + t.feature = FEATURE_DEFAULT; + t.format = FORMAT_DEFAULT; + t.flip = FLIP_PAGEFLIP; + igt_subtest("basic") + basic_subtest(&t); + igt_fixture teardown_environment(); diff -Nru intel-gpu-tools-1.13/tests/kms_mmap_write_crc.c intel-gpu-tools-1.14/tests/kms_mmap_write_crc.c --- intel-gpu-tools-1.13/tests/kms_mmap_write_crc.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_mmap_write_crc.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,313 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Tiago Vignatti + */ + +#include +#include +#include +#include +#include + +#include "drmtest.h" +#include "igt_debugfs.h" +#include "igt_kms.h" +#include "intel_chipset.h" +#include "ioctl_wrappers.h" +#include "igt_aux.h" + +IGT_TEST_DESCRIPTION( + "Use the display CRC support to validate mmap write to an already uncached future scanout buffer."); + +#define ROUNDS 10 + +typedef struct { + int drm_fd; + igt_display_t display; + struct igt_fb fb[2]; + igt_output_t *output; + igt_plane_t *primary; + enum pipe pipe; + igt_crc_t ref_crc; + igt_pipe_crc_t *pipe_crc; + uint32_t devid; +} data_t; + +static int ioctl_sync = true; +int dma_buf_fd; + +static char *dmabuf_mmap_framebuffer(int drm_fd, struct igt_fb *fb) +{ + char *ptr = NULL; + + dma_buf_fd = prime_handle_to_fd_for_mmap(drm_fd, fb->gem_handle); + igt_skip_on(dma_buf_fd == -1 && errno == EINVAL); + + ptr = mmap(NULL, fb->size, PROT_READ | PROT_WRITE, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + + return ptr; +} + +static void test(data_t *data) +{ + igt_display_t *display = &data->display; + igt_output_t *output = data->output; + struct igt_fb *fb = &data->fb[1]; + drmModeModeInfo *mode; + cairo_t *cr; + char *ptr; + uint32_t caching; + void *buf; + igt_crc_t crc; + + mode = igt_output_get_mode(output); + + /* create a non-white fb where we can write later */ + igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, fb); + + ptr = dmabuf_mmap_framebuffer(data->drm_fd, fb); + + cr = igt_get_cairo_ctx(data->drm_fd, fb); + igt_paint_test_pattern(cr, fb->width, fb->height); + cairo_destroy(cr); + + /* flip to it to make it UC/WC and fully flushed */ + igt_plane_set_fb(data->primary, fb); + igt_display_commit(display); + + /* flip back the original white buffer */ + igt_plane_set_fb(data->primary, &data->fb[0]); + igt_display_commit(display); + + /* make sure caching mode has become UC/WT */ + caching = gem_get_caching(data->drm_fd, fb->gem_handle); + igt_assert(caching == I915_CACHING_NONE || caching == I915_CACHING_DISPLAY); + + /* + * firstly demonstrate the need for DMA_BUF_SYNC_START ("begin_cpu_access") + */ + if (ioctl_sync) + prime_sync_start(dma_buf_fd, true); + + /* use dmabuf pointer to make the other fb all white too */ + buf = malloc(fb->size); + igt_assert(buf != NULL); + memset(buf, 0xff, fb->size); + memcpy(ptr, buf, fb->size); + free(buf); + + /* and flip to it */ + igt_plane_set_fb(data->primary, fb); + igt_display_commit(display); + + /* check that the crc is as expected, which requires that caches got flushed */ + igt_pipe_crc_collect_crc(data->pipe_crc, &crc); + igt_assert_crc_equal(&crc, &data->ref_crc); + + /* + * now demonstrates the need for DMA_BUF_SYNC_END ("end_cpu_access") + */ + + /* start over, writing non-white to the fb again and flip to it to make it + * fully flushed */ + cr = igt_get_cairo_ctx(data->drm_fd, fb); + igt_paint_test_pattern(cr, fb->width, fb->height); + cairo_destroy(cr); + + igt_plane_set_fb(data->primary, fb); + igt_display_commit(display); + + /* sync start, to move to CPU domain */ + if (ioctl_sync) + prime_sync_start(dma_buf_fd, true); + + /* use dmabuf pointer in the same fb to make it all white */ + buf = malloc(fb->size); + igt_assert(buf != NULL); + memset(buf, 0xff, fb->size); + memcpy(ptr, buf, fb->size); + free(buf); + + /* if we don't change to the GTT domain again, the whites won't get flushed + * and therefore we demonstrates the need for sync end here */ + if (ioctl_sync) + prime_sync_end(dma_buf_fd, true); + + /* check that the crc is as expected, which requires that caches got flushed */ + igt_pipe_crc_collect_crc(data->pipe_crc, &crc); + igt_assert_crc_equal(&crc, &data->ref_crc); +} + +static bool prepare_crtc(data_t *data) +{ + igt_display_t *display = &data->display; + igt_output_t *output = data->output; + drmModeModeInfo *mode; + + /* select the pipe we want to use */ + igt_output_set_pipe(output, data->pipe); + igt_display_commit(display); + + if (!output->valid) { + igt_output_set_pipe(output, PIPE_ANY); + igt_display_commit(display); + return false; + } + + mode = igt_output_get_mode(output); + + /* create a white reference fb and flip to it */ + igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, + 1.0, 1.0, 1.0, &data->fb[0]); + + data->primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY); + + igt_plane_set_fb(data->primary, &data->fb[0]); + igt_display_commit(display); + + if (data->pipe_crc) + igt_pipe_crc_free(data->pipe_crc); + + data->pipe_crc = igt_pipe_crc_new(data->pipe, + INTEL_PIPE_CRC_SOURCE_AUTO); + + /* get reference crc for the white fb */ + igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); + + return true; +} + +static void cleanup_crtc(data_t *data) +{ + igt_display_t *display = &data->display; + igt_output_t *output = data->output; + + igt_pipe_crc_free(data->pipe_crc); + data->pipe_crc = NULL; + + igt_plane_set_fb(data->primary, NULL); + + igt_output_set_pipe(output, PIPE_ANY); + igt_display_commit(display); + + igt_remove_fb(data->drm_fd, &data->fb[0]); + igt_remove_fb(data->drm_fd, &data->fb[1]); +} + +static void run_test(data_t *data) +{ + igt_display_t *display = &data->display; + igt_output_t *output; + enum pipe pipe; + + for_each_connected_output(display, output) { + data->output = output; + for_each_pipe(display, pipe) { + data->pipe = pipe; + + if (!prepare_crtc(data)) + continue; + + test(data); + cleanup_crtc(data); + + /* once is enough */ + return; + } + } + + igt_skip("no valid crtc/connector combinations found\n"); +} + +/** + * fork_cpuhog_helper: + * + * Fork a child process that loops indefinitely to consume CPU. This is used to + * fill the CPU caches with random information so they can get stalled, + * provoking incoherency with the GPU most likely. + */ +static void fork_cpuhog_helper(void) { + + /* TODO: if the parent is about to die before its child, e.g. + * igt_assert_crc_equal() fails, there will be a boring exit handler + * waiting the child to exit also. A workaround is to simply disable that + * handler, buy this needs to be fixed properly in an elegant way. */ + igt_disable_exit_handler(); + + igt_fork(hog, 1) { + while (1) { + usleep(10); /* quite ramdom really. */ + + if ((int)getppid() == 1) /* Parent has died, so must we. */ + exit(0); + } + } +} + +static int opt_handler(int opt, int opt_index, void *data) +{ + if (opt == 'n') { + ioctl_sync = false; + igt_info("set via cmd line to not use sync ioctls\n"); + } + + return 0; +} + +static data_t data; + +int main(int argc, char **argv) +{ + int i; + igt_simple_init_parse_opts(&argc, argv, "n", NULL, NULL, opt_handler, NULL); + + igt_skip_on_simulation(); + + igt_fixture { + data.drm_fd = drm_open_driver_master(DRIVER_INTEL); + + data.devid = intel_get_drm_devid(data.drm_fd); + + kmstest_set_vt_graphics_mode(); + + igt_require_pipe_crc(); + + igt_display_init(&data.display, data.drm_fd); + } + + igt_info("Using %d rounds for the test\n", ROUNDS); + fork_cpuhog_helper(); + + for (i = 0; i < ROUNDS; i++) + run_test(&data); + + igt_fixture { + igt_display_fini(&data.display); + } + + igt_exit(); +} diff -Nru intel-gpu-tools-1.13/tests/kms_panel_fitting.c intel-gpu-tools-1.14/tests/kms_panel_fitting.c --- intel-gpu-tools-1.13/tests/kms_panel_fitting.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_panel_fitting.c 2016-03-01 15:59:21.000000000 +0000 @@ -53,26 +53,6 @@ #define FILE_NAME "1080p-left.png" -static void -paint_color(data_t *d, struct igt_fb *fb, uint16_t w, uint16_t h) -{ - cairo_t *cr; - - cr = igt_get_cairo_ctx(d->drm_fd, fb); - igt_paint_test_pattern(cr, w, h); - cairo_destroy(cr); -} - -static void -paint_image(data_t *d, struct igt_fb *fb, uint16_t w, uint16_t h) -{ - cairo_t *cr; - - cr = igt_get_cairo_ctx(d->drm_fd, fb); - igt_paint_image(cr, FILE_NAME, 0, 0, w, h); - cairo_destroy(cr); -} - static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, igt_plane_t *plane, drmModeModeInfo *mode, enum igt_commit_style s) { @@ -91,15 +71,13 @@ } /* allocate fb for plane 1 */ - data->fb_id1 = igt_create_fb(data->drm_fd, - mode->hdisplay, mode->vdisplay, - DRM_FORMAT_XRGB8888, - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ - &data->fb1); + data->fb_id1 = igt_create_pattern_fb(data->drm_fd, + mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ + &data->fb1); igt_assert(data->fb_id1); - paint_color(data, &data->fb1, mode->hdisplay, mode->vdisplay); - /* * We always set the primary plane to actually enable the pipe as * there's no way (that works) to light up a pipe with only a sprite @@ -188,13 +166,11 @@ d->image_h = cairo_image_surface_get_height(image); cairo_surface_destroy(image); - d->fb_id2 = igt_create_fb(d->drm_fd, - d->image_w, d->image_h, - DRM_FORMAT_XRGB8888, - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ - &d->fb2); + d->fb_id2 = igt_create_image_fb(d->drm_fd, 0, 0, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ + FILE_NAME, &d->fb2); igt_assert(d->fb_id2); - paint_image(d, &d->fb2, d->fb2.width, d->fb2.height); /* Set up display to enable panel fitting */ mode->hdisplay = 640; diff -Nru intel-gpu-tools-1.13/tests/kms_pipe_crc_basic.c intel-gpu-tools-1.14/tests/kms_pipe_crc_basic.c --- intel-gpu-tools-1.13/tests/kms_pipe_crc_basic.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_pipe_crc_basic.c 2016-03-01 15:59:21.000000000 +0000 @@ -110,6 +110,7 @@ #define N_CRCS 3 #define TEST_SEQUENCE (1<<0) +#define TEST_NONBLOCK (1<<1) static int test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output, @@ -124,6 +125,7 @@ for (c = 0; c < ARRAY_SIZE(colors); c++) { char *crc_str; + int n_crcs; igt_output_set_pipe(output, pipe); igt_display_commit(display); @@ -151,12 +153,28 @@ igt_display_commit(display); - pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO); + if (flags & TEST_NONBLOCK) + pipe_crc = igt_pipe_crc_new_nonblock(pipe, INTEL_PIPE_CRC_SOURCE_AUTO); + else + pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO); igt_pipe_crc_start(pipe_crc); /* wait for N_CRCS vblanks and the corresponding N_CRCS CRCs */ - igt_pipe_crc_get_crcs(pipe_crc, N_CRCS, &crcs); + if (flags & TEST_NONBLOCK) { + int i; + + for (i = 0; i < N_CRCS; i++) + igt_wait_for_vblank(data->drm_fd, pipe); + + n_crcs = igt_pipe_crc_get_crcs(pipe_crc, N_CRCS * 3, &crcs); + /* allow a one frame difference */ + igt_assert_lte(n_crcs, N_CRCS + 1); + igt_assert_lte(N_CRCS, n_crcs + 1); + } else { + n_crcs = igt_pipe_crc_get_crcs(pipe_crc, N_CRCS, &crcs); + igt_assert_eq(n_crcs, N_CRCS); + } igt_pipe_crc_stop(pipe_crc); @@ -171,12 +189,12 @@ free(crc_str); /* and ensure that they'are all equal, we haven't changed the fb */ - for (j = 0; j < (N_CRCS - 1); j++) + for (j = 0; j < (n_crcs - 1); j++) igt_assert_crc_equal(&crcs[j], &crcs[j + 1]); if (flags & TEST_SEQUENCE) - for (j = 0; j < (N_CRCS - 1); j++) - igt_assert(crcs[j].frame + 1 == crcs[j + 1].frame); + for (j = 0; j < (n_crcs - 1); j++) + igt_assert_eq(crcs[j].frame + 1, crcs[j + 1].frame); free(crcs); igt_pipe_crc_free(pipe_crc); @@ -246,6 +264,12 @@ igt_subtest_f("read-crc-pipe-%c-frame-sequence", 'A'+i) test_read_crc(&data, i, TEST_SEQUENCE); + igt_subtest_f("nonblocking-crc-pipe-%c", 'A'+i) + test_read_crc(&data, i, TEST_NONBLOCK); + + igt_subtest_f("nonblocking-crc-pipe-%c-frame-sequence", 'A'+i) + test_read_crc(&data, i, TEST_SEQUENCE | TEST_NONBLOCK); + igt_subtest_f("suspend-read-crc-pipe-%c", 'A'+i) { igt_system_suspend_autoresume(); diff -Nru intel-gpu-tools-1.13/tests/kms_plane_scaling.c intel-gpu-tools-1.14/tests/kms_plane_scaling.c --- intel-gpu-tools-1.13/tests/kms_plane_scaling.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_plane_scaling.c 2016-03-01 15:59:21.000000000 +0000 @@ -55,26 +55,6 @@ #define FILE_NAME "1080p-left.png" -static void -paint_color(data_t *d, struct igt_fb *fb, uint16_t w, uint16_t h) -{ - cairo_t *cr; - - cr = igt_get_cairo_ctx(d->drm_fd, fb); - igt_paint_test_pattern(cr, w, h); - cairo_destroy(cr); -} - -static void -paint_image(data_t *d, struct igt_fb *fb, uint16_t w, uint16_t h) -{ - cairo_t *cr; - - cr = igt_get_cairo_ctx(d->drm_fd, fb); - igt_paint_image(cr, FILE_NAME, 0, 0, w, h); - cairo_destroy(cr); -} - static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, igt_plane_t *plane, drmModeModeInfo *mode, enum igt_commit_style s) { @@ -93,15 +73,13 @@ } /* allocate fb for plane 1 */ - data->fb_id1 = igt_create_fb(data->drm_fd, - mode->hdisplay, mode->vdisplay, - DRM_FORMAT_XRGB8888, - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ - &data->fb1); + data->fb_id1 = igt_create_pattern_fb(data->drm_fd, + mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ + &data->fb1); igt_assert(data->fb_id1); - paint_color(data, &data->fb1, mode->hdisplay, mode->vdisplay); - /* * We always set the primary plane to actually enable the pipe as * there's no way (that works) to light up a pipe with only a sprite @@ -201,7 +179,6 @@ { igt_display_t *display = &d->display; igt_output_t *output; - cairo_surface_t *image; enum pipe pipe; int valid_tests = 0; int primary_plane_scaling = 0; /* For now */ @@ -218,27 +195,18 @@ mode = igt_output_get_mode(output); /* allocate fb2 with image size */ - image = cairo_image_surface_create_from_png(FILE_NAME); - igt_assert(cairo_surface_status(image) == CAIRO_STATUS_SUCCESS); - d->image_w = cairo_image_surface_get_width(image); - d->image_h = cairo_image_surface_get_height(image); - cairo_surface_destroy(image); - - d->fb_id2 = igt_create_fb(d->drm_fd, - d->image_w, d->image_h, - DRM_FORMAT_XRGB8888, - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ - &d->fb2); + d->fb_id2 = igt_create_image_fb(d->drm_fd, 0, 0, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ + FILE_NAME, &d->fb2); igt_assert(d->fb_id2); - paint_image(d, &d->fb2, d->fb2.width, d->fb2.height); - d->fb_id3 = igt_create_fb(d->drm_fd, - mode->hdisplay, mode->vdisplay, - DRM_FORMAT_XRGB8888, - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ - &d->fb3); + d->fb_id3 = igt_create_pattern_fb(d->drm_fd, + mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */ + &d->fb3); igt_assert(d->fb_id3); - paint_color(d, &d->fb3, mode->hdisplay, mode->vdisplay); /* Set up display with plane 1 */ d->plane1 = igt_output_get_plane(output, IGT_PLANE_PRIMARY); diff -Nru intel-gpu-tools-1.13/tests/kms_psr_sink_crc.c intel-gpu-tools-1.14/tests/kms_psr_sink_crc.c --- intel-gpu-tools-1.13/tests/kms_psr_sink_crc.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_psr_sink_crc.c 2016-03-01 15:59:21.000000000 +0000 @@ -199,68 +199,27 @@ static bool psr_possible(data_t *data) { - FILE *file; - char buf[4096]; - int ret; + char buf[512]; - if (running_with_psr_disabled) - return true; + igt_debugfs_read("i915_edp_psr_status", buf); - file = igt_debugfs_fopen("i915_edp_psr_status", "r"); - igt_require(file); - - /* First dump the entire file into the debug log for later analysis - * if required. - */ - ret = fread(buf, 1, 4095, file); - igt_require(ret > 0); - buf[ret] = '\0'; - igt_debug("i915_edp_psr_status:\n%s", buf); - fseek(file, 0, SEEK_SET); - - /* Now check that we have all the preconditions required for PSR */ - ret = fscanf(file, "Sink_Support: %s\n", buf); - igt_require_f(ret == 1 && strcmp(buf, "yes") == 0, - "Sink_Support: %s\n", buf); - - fclose(file); - return true; + return running_with_psr_disabled || + strstr(buf, "Sink_Support: yes\n"); } static bool psr_active(data_t *data) { - int ret; - FILE *file; - char str[4]; - - if (running_with_psr_disabled) - return true; + char buf[512]; - file = igt_debugfs_fopen("i915_edp_psr_status", "r"); - igt_require(file); + igt_debugfs_read("i915_edp_psr_status", buf); - ret = fscanf(file, "Sink_Support: %s\n", str); - igt_assert_neq(ret, 0); - ret = fscanf(file, "Source_OK: %s\n", str); - igt_assert_neq(ret, 0); - ret = fscanf(file, "Enabled: %s\n", str); - igt_assert_neq(ret, 0); - ret = fscanf(file, "Active: %s\n", str); - igt_assert_neq(ret, 0); - ret = fscanf(file, "Busy frontbuffer bits: %s\n", str); - igt_assert_neq(ret, 0); - ret = fscanf(file, "Re-enable work scheduled: %s\n", str); - igt_assert_neq(ret, 0); - ret = fscanf(file, "HW Enabled & Active bit: %s\n", str); - igt_assert_neq(ret, 0); - - fclose(file); - return strcmp(str, "yes") == 0; + return running_with_psr_disabled || + strstr(buf, "HW Enabled & Active bit: yes\n"); } static bool wait_psr_entry(data_t *data) { - int timeout = 10; + int timeout = 5; while (timeout--) { if (psr_active(data)) return true; @@ -557,7 +516,8 @@ kmstest_set_vt_graphics_mode(); data.devid = intel_get_drm_devid(data.drm_fd); - igt_set_module_param_int("enable_psr", 1); + igt_set_module_param_int("enable_psr", running_with_psr_disabled ? + 0 : 1); igt_skip_on(!psr_possible(&data)); @@ -568,6 +528,11 @@ display_init(&data); } + igt_subtest("psr_basic") { + setup_test_plane(&data); + igt_assert(wait_psr_entry(&data)); + } + for (op = PAGE_FLIP; op <= RENDER; op++) { igt_subtest_f("primary_%s", op_str(op)) { data.test_plane = PRIMARY; @@ -622,6 +587,30 @@ igt_assert(wait_psr_entry(&data)); run_test(&data); + test_cleanup(&data); + } + + igt_subtest_f("suspend_psr_active") { + data.test_plane = PRIMARY; + data.op = PAGE_FLIP; + setup_test_plane(&data); + igt_assert(wait_psr_entry(&data)); + + igt_system_suspend_autoresume(); + + run_test(&data); + test_cleanup(&data); + } + + igt_subtest_f("suspend_psr_exit") { + data.test_plane = CURSOR; + data.op = PLANE_ONOFF; + setup_test_plane(&data); + + igt_system_suspend_autoresume(); + + igt_assert(wait_psr_entry(&data)); + run_test(&data); test_cleanup(&data); } diff -Nru intel-gpu-tools-1.13/tests/kms_pwrite_crc.c intel-gpu-tools-1.14/tests/kms_pwrite_crc.c --- intel-gpu-tools-1.13/tests/kms_pwrite_crc.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_pwrite_crc.c 2016-03-01 15:59:21.000000000 +0000 @@ -50,7 +50,6 @@ igt_output_t *output = data->output; struct igt_fb *fb = &data->fb[1]; drmModeModeInfo *mode; - cairo_t *cr; uint32_t caching; void *buf; igt_crc_t crc; @@ -58,12 +57,8 @@ mode = igt_output_get_mode(output); /* create a non-white fb where we can pwrite later */ - igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, - DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, fb); - - cr = igt_get_cairo_ctx(data->drm_fd, fb); - igt_paint_test_pattern(cr, fb->width, fb->height); - cairo_destroy(cr); + igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, fb); /* flip to it to make it UC/WC and fully flushed */ drmModeSetPlane(data->drm_fd, diff -Nru intel-gpu-tools-1.13/tests/kms_render.c intel-gpu-tools-1.14/tests/kms_render.c --- intel-gpu-tools-1.13/tests/kms_render.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_render.c 2016-03-01 15:59:21.000000000 +0000 @@ -173,7 +173,7 @@ int format_count; int i; - igt_get_all_formats(&formats, &format_count); + igt_get_all_cairo_formats(&formats, &format_count); for (i = 0; i < format_count; i++) { if (intel_gen(intel_get_drm_devid(drm_fd)) < 4 && formats[i] == DRM_FORMAT_XRGB2101010) { diff -Nru intel-gpu-tools-1.13/tests/kms_rotation_crc.c intel-gpu-tools-1.14/tests/kms_rotation_crc.c --- intel-gpu-tools-1.13/tests/kms_rotation_crc.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_rotation_crc.c 2016-03-01 15:59:21.000000000 +0000 @@ -220,7 +220,7 @@ static void wait_for_pageflip(int fd) { drmEventContext evctx = { .version = DRM_EVENT_CONTEXT_VERSION }; - struct timeval timeout = { .tv_sec = 0, .tv_usec = 32000 }; + struct timeval timeout = { .tv_sec = 0, .tv_usec = 50000 }; fd_set fds; int ret; diff -Nru intel-gpu-tools-1.13/tests/kms_setmode.c intel-gpu-tools-1.14/tests/kms_setmode.c --- intel-gpu-tools-1.13/tests/kms_setmode.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_setmode.c 2016-03-01 15:59:21.000000000 +0000 @@ -146,8 +146,6 @@ cr = igt_get_cairo_ctx(drm_fd, fb); - igt_paint_test_pattern(cr, fb->width, fb->height); - cairo_move_to(cr, fb->width / 2, fb->height / 2); cairo_set_font_size(cr, 24); igt_cairo_printf_line(cr, align_hcenter, 40, "%s", test_name); @@ -180,10 +178,11 @@ bpp = 32; depth = 24; - fb_id = igt_create_fb(drm_fd, crtc->mode.hdisplay, - crtc->mode.vdisplay, - igt_bpp_depth_to_drm_format(bpp, depth), - LOCAL_DRM_FORMAT_MOD_NONE, fb_info); + fb_id = igt_create_pattern_fb(drm_fd, crtc->mode.hdisplay, + crtc->mode.vdisplay, + igt_bpp_depth_to_drm_format(bpp, depth), + LOCAL_DRM_FORMAT_MOD_NONE, + fb_info); igt_assert_lt(0, fb_id); } @@ -504,7 +503,7 @@ drmModeConnector *connector; drmModeModeInfo mode; - connector = drmModeGetConnector(drm_fd, connector_id); + connector = drmModeGetConnectorCurrent(drm_fd, connector_id); igt_assert(connector); cconf->connector = connector; diff -Nru intel-gpu-tools-1.13/tests/kms_sysfs_edid_timing intel-gpu-tools-1.14/tests/kms_sysfs_edid_timing --- intel-gpu-tools-1.13/tests/kms_sysfs_edid_timing 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/kms_sysfs_edid_timing 2016-03-01 15:59:21.000000000 +0000 @@ -19,7 +19,7 @@ if [ $RES -gt 600 ]; then echo "Talking to outputs took ${RES}ms, something is wrong" - exit 1 + exit $IGT_EXIT_FAILURE fi -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/Makefile.am intel-gpu-tools-1.14/tests/Makefile.am --- intel-gpu-tools-1.13/tests/Makefile.am 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tests/Makefile.am 2016-03-01 15:59:21.000000000 +0000 @@ -4,6 +4,10 @@ TESTS_progs_M += $(NOUVEAU_TESTS_M) endif +if HAVE_VC4 + TESTS_progs_M += $(VC4_TESTS_M) +endif + if BUILD_TESTS test-list.txt: Makefile.sources @echo TESTLIST > $@ @@ -32,12 +36,16 @@ $(IMAGES) \ $(NULL) +all-local: .gitignore +.gitignore: Makefile.sources + @echo "$(pkglibexec_PROGRAMS) $(HANG) test-list.txt .gitignore" | sed 's/\s\+/\n/g' | sort > $@ + pkgdata_DATA = test-list.txt EXTRA_PROGRAMS = $(HANG) EXTRA_DIST = $(common_files) -CLEANFILES = $(EXTRA_PROGRAMS) test-list.txt +CLEANFILES = $(EXTRA_PROGRAMS) test-list.txt .gitignore AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS)\ -I$(srcdir)/.. \ @@ -93,5 +101,11 @@ prime_nv_api_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS) prime_nv_pcopy_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS) prime_nv_pcopy_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS) +vc4_create_bo_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_create_bo_LDADD = $(LDADD) $(DRM_VC4_LIBS) +vc4_wait_bo_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_wait_bo_LDADD = $(LDADD) $(DRM_VC4_LIBS) +vc4_wait_seqno_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_wait_seqno_LDADD = $(LDADD) $(DRM_VC4_LIBS) endif diff -Nru intel-gpu-tools-1.13/tests/Makefile.in intel-gpu-tools-1.14/tests/Makefile.in --- intel-gpu-tools-1.13/tests/Makefile.in 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/tests/Makefile.in 2016-03-01 16:02:44.000000000 +0000 @@ -90,19 +90,20 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ @HAVE_NOUVEAU_TRUE@am__append_1 = $(NOUVEAU_TESTS_M) +@HAVE_VC4_TRUE@am__append_2 = $(VC4_TESTS_M) @BUILD_TESTS_TRUE@noinst_PROGRAMS = $(am__EXEEXT_1) @BUILD_TESTS_TRUE@pkglibexec_PROGRAMS = gem_alive$(EXEEXT) \ @BUILD_TESTS_TRUE@ gem_stress$(EXEEXT) $(am__EXEEXT_2) \ -@BUILD_TESTS_TRUE@ $(am__EXEEXT_5) +@BUILD_TESTS_TRUE@ $(am__EXEEXT_7) @BUILD_TESTS_TRUE@EXTRA_PROGRAMS = $(am__EXEEXT_1) subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am \ @@ -137,7 +138,7 @@ gem_ring_sync_loop$(EXEEXT) gem_multi_bsd_sync_loop$(EXEEXT) \ gem_seqno_wrap$(EXEEXT) gem_set_tiling_vs_gtt$(EXEEXT) \ gem_set_tiling_vs_pwrite$(EXEEXT) gem_storedw_loop$(EXEEXT) \ - gem_threaded_access_tiled$(EXEEXT) \ + gem_sync$(EXEEXT) gem_threaded_access_tiled$(EXEEXT) \ gem_tiled_fence_blits$(EXEEXT) gem_tiled_pread_basic$(EXEEXT) \ gem_tiled_pread_pwrite$(EXEEXT) gem_tiled_swapping$(EXEEXT) \ gem_tiled_wb$(EXEEXT) gem_tiled_wc$(EXEEXT) \ @@ -150,29 +151,34 @@ gen3_render_tiledx_blits$(EXEEXT) \ gen3_render_tiledy_blits$(EXEEXT) gen7_forcewake_mt$(EXEEXT) \ kms_3d$(EXEEXT) kms_fence_pin_leak$(EXEEXT) \ - kms_force_connector$(EXEEXT) kms_pwrite_crc$(EXEEXT) \ - kms_sink_crc_basic$(EXEEXT) prime_udl$(EXEEXT) \ - testdisplay$(EXEEXT) + kms_force_connector_basic$(EXEEXT) kms_mmap_write_crc$(EXEEXT) \ + kms_pwrite_crc$(EXEEXT) kms_sink_crc_basic$(EXEEXT) \ + prime_udl$(EXEEXT) testdisplay$(EXEEXT) am__EXEEXT_3 = prime_nv_api$(EXEEXT) prime_nv_pcopy$(EXEEXT) \ prime_nv_test$(EXEEXT) @HAVE_NOUVEAU_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3) -am__EXEEXT_5 = core_get_client_auth$(EXEEXT) \ +am__EXEEXT_5 = vc4_create_bo$(EXEEXT) vc4_wait_bo$(EXEEXT) \ + vc4_wait_seqno$(EXEEXT) +@HAVE_VC4_TRUE@am__EXEEXT_6 = $(am__EXEEXT_5) +am__EXEEXT_7 = core_get_client_auth$(EXEEXT) \ drv_getparams_basic$(EXEEXT) drv_suspend$(EXEEXT) \ drv_hangman$(EXEEXT) gem_bad_reloc$(EXEEXT) gem_basic$(EXEEXT) \ - gem_caching$(EXEEXT) gem_close_race$(EXEEXT) \ + gem_busy$(EXEEXT) gem_caching$(EXEEXT) gem_close_race$(EXEEXT) \ gem_concurrent_blit$(EXEEXT) gem_concurrent_all$(EXEEXT) \ - gem_cs_tlb$(EXEEXT) gem_ctx_param_basic$(EXEEXT) \ - gem_ctx_bad_exec$(EXEEXT) gem_ctx_exec$(EXEEXT) \ - gem_dummy_reloc_loop$(EXEEXT) gem_eio$(EXEEXT) \ - gem_evict_alignment$(EXEEXT) gem_evict_everything$(EXEEXT) \ - gem_exec_alignment$(EXEEXT) gem_exec_bad_domains$(EXEEXT) \ + gem_create$(EXEEXT) gem_cs_tlb$(EXEEXT) \ + gem_ctx_param_basic$(EXEEXT) gem_ctx_bad_exec$(EXEEXT) \ + gem_ctx_exec$(EXEEXT) gem_dummy_reloc_loop$(EXEEXT) \ + gem_eio$(EXEEXT) gem_evict_alignment$(EXEEXT) \ + gem_evict_everything$(EXEEXT) gem_exec_alignment$(EXEEXT) \ + gem_exec_bad_domains$(EXEEXT) gem_exec_basic$(EXEEXT) \ gem_exec_faulting_reloc$(EXEEXT) gem_exec_nop$(EXEEXT) \ gem_exec_params$(EXEEXT) gem_exec_parse$(EXEEXT) \ - gem_fenced_exec_thrash$(EXEEXT) gem_fence_thrash$(EXEEXT) \ - gem_fence_upload$(EXEEXT) gem_flink_basic$(EXEEXT) \ - gem_flink_race$(EXEEXT) gem_linear_blits$(EXEEXT) \ - gem_madvise$(EXEEXT) gem_mmap$(EXEEXT) gem_mmap_gtt$(EXEEXT) \ - gem_mmap_wc$(EXEEXT) gem_partial_pwrite_pread$(EXEEXT) \ + gem_exec_reloc$(EXEEXT) gem_fenced_exec_thrash$(EXEEXT) \ + gem_fence_thrash$(EXEEXT) gem_fence_upload$(EXEEXT) \ + gem_flink_basic$(EXEEXT) gem_flink_race$(EXEEXT) \ + gem_linear_blits$(EXEEXT) gem_madvise$(EXEEXT) \ + gem_mmap$(EXEEXT) gem_mmap_gtt$(EXEEXT) gem_mmap_wc$(EXEEXT) \ + gem_partial_pwrite_pread$(EXEEXT) \ gem_persistent_relocs$(EXEEXT) \ gem_pipe_control_store_loop$(EXEEXT) gem_ppgtt$(EXEEXT) \ gem_pread$(EXEEXT) gem_pread_after_blit$(EXEEXT) \ @@ -182,13 +188,15 @@ gem_reloc_vs_gpu$(EXEEXT) gem_render_copy_redux$(EXEEXT) \ gem_request_retire$(EXEEXT) gem_reset_stats$(EXEEXT) \ gem_ringfill$(EXEEXT) gem_set_tiling_vs_blt$(EXEEXT) \ + gem_softpin$(EXEEXT) gem_stolen$(EXEEXT) \ gem_storedw_batches_loop$(EXEEXT) \ gem_streaming_writes$(EXEEXT) gem_tiled_blits$(EXEEXT) \ gem_tiled_partial_pwrite_pread$(EXEEXT) \ gem_userptr_blits$(EXEEXT) gem_write_read_ring_switch$(EXEEXT) \ kms_addfb_basic$(EXEEXT) kms_atomic$(EXEEXT) \ - kms_cursor_crc$(EXEEXT) kms_draw_crc$(EXEEXT) \ - kms_fbc_crc$(EXEEXT) kms_fbcon_fbt$(EXEEXT) kms_flip$(EXEEXT) \ + kms_chv_cursor_fail$(EXEEXT) kms_cursor_crc$(EXEEXT) \ + kms_draw_crc$(EXEEXT) kms_fbc_crc$(EXEEXT) \ + kms_fbcon_fbt$(EXEEXT) kms_flip$(EXEEXT) \ kms_flip_event_leak$(EXEEXT) kms_flip_tiling$(EXEEXT) \ kms_frontbuffer_tracking$(EXEEXT) kms_legacy_colorkey$(EXEEXT) \ kms_mmio_vs_cs_flip$(EXEEXT) kms_pipe_b_c_ivb$(EXEEXT) \ @@ -199,8 +207,9 @@ kms_crtc_background_color$(EXEEXT) kms_plane_scaling$(EXEEXT) \ kms_panel_fitting$(EXEEXT) pm_backlight$(EXEEXT) \ pm_lpsp$(EXEEXT) pm_rpm$(EXEEXT) pm_rps$(EXEEXT) \ - pm_rc6_residency$(EXEEXT) pm_sseu$(EXEEXT) \ - prime_self_import$(EXEEXT) template$(EXEEXT) $(am__EXEEXT_4) + pm_rc6_residency$(EXEEXT) pm_sseu$(EXEEXT) prime_mmap$(EXEEXT) \ + prime_mmap_coherency$(EXEEXT) prime_self_import$(EXEEXT) \ + template$(EXEEXT) $(am__EXEEXT_4) $(am__EXEEXT_6) am__installdirs = "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(pkgdatadir)" \ "$(DESTDIR)$(pkgdatadir)" @@ -393,6 +402,13 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_busy_SOURCES = gem_busy.c +gem_busy_OBJECTS = gem_busy.$(OBJEXT) +gem_busy_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@gem_busy_DEPENDENCIES = ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gem_caching_SOURCES = gem_caching.c gem_caching_OBJECTS = gem_caching.$(OBJEXT) gem_caching_LDADD = $(LDADD) @@ -431,6 +447,13 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_create_SOURCES = gem_create.c +gem_create_OBJECTS = gem_create.$(OBJEXT) +gem_create_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@gem_create_DEPENDENCIES = ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gem_cs_prefetch_SOURCES = gem_cs_prefetch.c gem_cs_prefetch_OBJECTS = gem_cs_prefetch.$(OBJEXT) gem_cs_prefetch_LDADD = $(LDADD) @@ -554,6 +577,14 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_exec_basic_SOURCES = gem_exec_basic.c +gem_exec_basic_OBJECTS = gem_exec_basic.$(OBJEXT) +gem_exec_basic_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@gem_exec_basic_DEPENDENCIES = \ +@BUILD_TESTS_TRUE@ ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gem_exec_big_SOURCES = gem_exec_big.c gem_exec_big_OBJECTS = gem_exec_big.$(OBJEXT) gem_exec_big_LDADD = $(LDADD) @@ -610,6 +641,14 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_exec_reloc_SOURCES = gem_exec_reloc.c +gem_exec_reloc_OBJECTS = gem_exec_reloc.$(OBJEXT) +gem_exec_reloc_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@gem_exec_reloc_DEPENDENCIES = \ +@BUILD_TESTS_TRUE@ ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gem_fd_exhaustion_SOURCES = gem_fd_exhaustion.c gem_fd_exhaustion_OBJECTS = gem_fd_exhaustion.$(OBJEXT) gem_fd_exhaustion_LDADD = $(LDADD) @@ -1009,6 +1048,20 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_softpin_SOURCES = gem_softpin.c +gem_softpin_OBJECTS = gem_softpin.$(OBJEXT) +gem_softpin_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@gem_softpin_DEPENDENCIES = ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_stolen_SOURCES = gem_stolen.c +gem_stolen_OBJECTS = gem_stolen.$(OBJEXT) +gem_stolen_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@gem_stolen_DEPENDENCIES = ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gem_storedw_batches_loop_SOURCES = gem_storedw_batches_loop.c gem_storedw_batches_loop_OBJECTS = gem_storedw_batches_loop.$(OBJEXT) gem_storedw_batches_loop_LDADD = $(LDADD) @@ -1040,6 +1093,13 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +gem_sync_SOURCES = gem_sync.c +gem_sync_OBJECTS = gem_sync.$(OBJEXT) +gem_sync_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@gem_sync_DEPENDENCIES = ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gem_threaded_access_tiled_SOURCES = gem_threaded_access_tiled.c gem_threaded_access_tiled_OBJECTS = \ gem_threaded_access_tiled-gem_threaded_access_tiled.$(OBJEXT) @@ -1241,6 +1301,14 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +kms_chv_cursor_fail_SOURCES = kms_chv_cursor_fail.c +kms_chv_cursor_fail_OBJECTS = kms_chv_cursor_fail.$(OBJEXT) +kms_chv_cursor_fail_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@kms_chv_cursor_fail_DEPENDENCIES = \ +@BUILD_TESTS_TRUE@ ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) kms_crtc_background_color_SOURCES = kms_crtc_background_color.c kms_crtc_background_color_OBJECTS = \ kms_crtc_background_color.$(OBJEXT) @@ -1308,10 +1376,11 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -kms_force_connector_SOURCES = kms_force_connector.c -kms_force_connector_OBJECTS = kms_force_connector.$(OBJEXT) -kms_force_connector_LDADD = $(LDADD) -@BUILD_TESTS_TRUE@kms_force_connector_DEPENDENCIES = \ +kms_force_connector_basic_SOURCES = kms_force_connector_basic.c +kms_force_connector_basic_OBJECTS = \ + kms_force_connector_basic.$(OBJEXT) +kms_force_connector_basic_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@kms_force_connector_basic_DEPENDENCIES = \ @BUILD_TESTS_TRUE@ ../lib/libintel_tools.la \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @@ -1332,6 +1401,14 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +kms_mmap_write_crc_SOURCES = kms_mmap_write_crc.c +kms_mmap_write_crc_OBJECTS = kms_mmap_write_crc.$(OBJEXT) +kms_mmap_write_crc_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@kms_mmap_write_crc_DEPENDENCIES = \ +@BUILD_TESTS_TRUE@ ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) kms_mmio_vs_cs_flip_SOURCES = kms_mmio_vs_cs_flip.c kms_mmio_vs_cs_flip_OBJECTS = kms_mmio_vs_cs_flip.$(OBJEXT) kms_mmio_vs_cs_flip_LDADD = $(LDADD) @@ -1480,6 +1557,21 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +prime_mmap_SOURCES = prime_mmap.c +prime_mmap_OBJECTS = prime_mmap.$(OBJEXT) +prime_mmap_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@prime_mmap_DEPENDENCIES = ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +prime_mmap_coherency_SOURCES = prime_mmap_coherency.c +prime_mmap_coherency_OBJECTS = prime_mmap_coherency.$(OBJEXT) +prime_mmap_coherency_LDADD = $(LDADD) +@BUILD_TESTS_TRUE@prime_mmap_coherency_DEPENDENCIES = \ +@BUILD_TESTS_TRUE@ ../lib/libintel_tools.la \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) prime_nv_api_SOURCES = prime_nv_api.c prime_nv_api_OBJECTS = prime_nv_api-prime_nv_api.$(OBJEXT) @BUILD_TESTS_TRUE@prime_nv_api_DEPENDENCIES = $(am__DEPENDENCIES_2) \ @@ -1533,6 +1625,28 @@ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +vc4_create_bo_SOURCES = vc4_create_bo.c +vc4_create_bo_OBJECTS = vc4_create_bo-vc4_create_bo.$(OBJEXT) +@BUILD_TESTS_TRUE@vc4_create_bo_DEPENDENCIES = $(am__DEPENDENCIES_2) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) +vc4_create_bo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(vc4_create_bo_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +vc4_wait_bo_SOURCES = vc4_wait_bo.c +vc4_wait_bo_OBJECTS = vc4_wait_bo-vc4_wait_bo.$(OBJEXT) +@BUILD_TESTS_TRUE@vc4_wait_bo_DEPENDENCIES = $(am__DEPENDENCIES_2) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) +vc4_wait_bo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(vc4_wait_bo_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +vc4_wait_seqno_SOURCES = vc4_wait_seqno.c +vc4_wait_seqno_OBJECTS = vc4_wait_seqno-vc4_wait_seqno.$(OBJEXT) +@BUILD_TESTS_TRUE@vc4_wait_seqno_DEPENDENCIES = $(am__DEPENDENCIES_2) \ +@BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) +vc4_wait_seqno_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(vc4_wait_seqno_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ am__dist_pkglibexec_SCRIPTS_DIST = debugfs_emon_crash \ drv_debugfs_reader drv_missed_irq_hang drv_module_reload_basic \ kms_sysfs_edid_timing sysfs_l3_parity test_rte_check \ @@ -1607,23 +1721,24 @@ drm_vma_limiter_cpu.c drm_vma_limiter_gtt.c \ drv_getparams_basic.c drv_hangman.c drv_suspend.c gem_alive.c \ gem_bad_address.c gem_bad_batch.c gem_bad_blit.c \ - gem_bad_length.c gem_bad_reloc.c gem_basic.c gem_caching.c \ - gem_close_race.c gem_concurrent_all.c gem_concurrent_blit.c \ - gem_cpu_reloc.c gem_cs_prefetch.c gem_cs_tlb.c \ - gem_ctx_bad_destroy.c gem_ctx_bad_exec.c gem_ctx_basic.c \ - gem_ctx_create.c gem_ctx_exec.c gem_ctx_param_basic.c \ - gem_ctx_thrash.c gem_double_irq_loop.c gem_dummy_reloc_loop.c \ - gem_eio.c gem_evict_alignment.c gem_evict_everything.c \ - gem_exec_alignment.c gem_exec_bad_domains.c gem_exec_big.c \ - gem_exec_blt.c gem_exec_faulting_reloc.c gem_exec_lut_handle.c \ - gem_exec_nop.c gem_exec_params.c gem_exec_parse.c \ - gem_fd_exhaustion.c gem_fence_thrash.c gem_fence_upload.c \ - gem_fenced_exec_thrash.c gem_flink_basic.c gem_flink_race.c \ - gem_gpgpu_fill.c gem_gtt_cpu_tlb.c gem_gtt_hog.c \ - gem_gtt_speed.c gem_hang.c gem_hangcheck_forcewake.c \ - gem_largeobject.c gem_linear_blits.c gem_lut_handle.c \ - gem_madvise.c gem_media_fill.c gem_mmap.c gem_mmap_gtt.c \ - gem_mmap_offset_exhaustion.c gem_mmap_wc.c \ + gem_bad_length.c gem_bad_reloc.c gem_basic.c gem_busy.c \ + gem_caching.c gem_close_race.c gem_concurrent_all.c \ + gem_concurrent_blit.c gem_cpu_reloc.c gem_create.c \ + gem_cs_prefetch.c gem_cs_tlb.c gem_ctx_bad_destroy.c \ + gem_ctx_bad_exec.c gem_ctx_basic.c gem_ctx_create.c \ + gem_ctx_exec.c gem_ctx_param_basic.c gem_ctx_thrash.c \ + gem_double_irq_loop.c gem_dummy_reloc_loop.c gem_eio.c \ + gem_evict_alignment.c gem_evict_everything.c \ + gem_exec_alignment.c gem_exec_bad_domains.c gem_exec_basic.c \ + gem_exec_big.c gem_exec_blt.c gem_exec_faulting_reloc.c \ + gem_exec_lut_handle.c gem_exec_nop.c gem_exec_params.c \ + gem_exec_parse.c gem_exec_reloc.c gem_fd_exhaustion.c \ + gem_fence_thrash.c gem_fence_upload.c gem_fenced_exec_thrash.c \ + gem_flink_basic.c gem_flink_race.c gem_gpgpu_fill.c \ + gem_gtt_cpu_tlb.c gem_gtt_hog.c gem_gtt_speed.c gem_hang.c \ + gem_hangcheck_forcewake.c gem_largeobject.c gem_linear_blits.c \ + gem_lut_handle.c gem_madvise.c gem_media_fill.c gem_mmap.c \ + gem_mmap_gtt.c gem_mmap_offset_exhaustion.c gem_mmap_wc.c \ gem_multi_bsd_sync_loop.c gem_non_secure_batch.c \ gem_partial_pwrite_pread.c gem_persistent_relocs.c gem_pin.c \ gem_pipe_control_store_loop.c gem_ppgtt.c gem_pread.c \ @@ -1635,8 +1750,9 @@ gem_request_retire.c gem_reset_stats.c gem_ring_sync_copy.c \ gem_ring_sync_loop.c gem_ringfill.c gem_seqno_wrap.c \ gem_set_tiling_vs_blt.c gem_set_tiling_vs_gtt.c \ - gem_set_tiling_vs_pwrite.c gem_storedw_batches_loop.c \ - gem_storedw_loop.c gem_streaming_writes.c gem_stress.c \ + gem_set_tiling_vs_pwrite.c gem_softpin.c gem_stolen.c \ + gem_storedw_batches_loop.c gem_storedw_loop.c \ + gem_streaming_writes.c gem_stress.c gem_sync.c \ gem_threaded_access_tiled.c gem_tiled_blits.c \ gem_tiled_fence_blits.c gem_tiled_partial_pwrite_pread.c \ gem_tiled_pread_basic.c gem_tiled_pread_pwrite.c \ @@ -1647,19 +1763,22 @@ gen3_mixed_blits.c gen3_render_linear_blits.c \ gen3_render_mixed_blits.c gen3_render_tiledx_blits.c \ gen3_render_tiledy_blits.c gen7_forcewake_mt.c kms_3d.c \ - kms_addfb_basic.c kms_atomic.c kms_crtc_background_color.c \ - kms_cursor_crc.c kms_draw_crc.c kms_fbc_crc.c kms_fbcon_fbt.c \ - kms_fence_pin_leak.c kms_flip.c kms_flip_event_leak.c \ - kms_flip_tiling.c kms_force_connector.c \ - kms_frontbuffer_tracking.c kms_legacy_colorkey.c \ + kms_addfb_basic.c kms_atomic.c kms_chv_cursor_fail.c \ + kms_crtc_background_color.c kms_cursor_crc.c kms_draw_crc.c \ + kms_fbc_crc.c kms_fbcon_fbt.c kms_fence_pin_leak.c kms_flip.c \ + kms_flip_event_leak.c kms_flip_tiling.c \ + kms_force_connector_basic.c kms_frontbuffer_tracking.c \ + kms_legacy_colorkey.c kms_mmap_write_crc.c \ kms_mmio_vs_cs_flip.c kms_panel_fitting.c kms_pipe_b_c_ivb.c \ kms_pipe_crc_basic.c kms_plane.c kms_plane_scaling.c \ kms_psr_sink_crc.c kms_pwrite_crc.c kms_render.c \ kms_rotation_crc.c kms_setmode.c kms_sink_crc_basic.c \ kms_universal_plane.c kms_vblank.c pm_backlight.c pm_lpsp.c \ - pm_rc6_residency.c pm_rpm.c pm_rps.c pm_sseu.c prime_nv_api.c \ - prime_nv_pcopy.c prime_nv_test.c prime_self_import.c \ - prime_udl.c template.c $(testdisplay_SOURCES) + pm_rc6_residency.c pm_rpm.c pm_rps.c pm_sseu.c prime_mmap.c \ + prime_mmap_coherency.c prime_nv_api.c prime_nv_pcopy.c \ + prime_nv_test.c prime_self_import.c prime_udl.c template.c \ + $(testdisplay_SOURCES) vc4_create_bo.c vc4_wait_bo.c \ + vc4_wait_seqno.c DIST_SOURCES = core_auth.c core_get_client_auth.c core_getclient.c \ core_getstats.c core_getversion.c core_prop_blob.c \ core_setmaster_vs_auth.c drm_import_export.c drm_read.c \ @@ -1667,23 +1786,24 @@ drm_vma_limiter_cpu.c drm_vma_limiter_gtt.c \ drv_getparams_basic.c drv_hangman.c drv_suspend.c gem_alive.c \ gem_bad_address.c gem_bad_batch.c gem_bad_blit.c \ - gem_bad_length.c gem_bad_reloc.c gem_basic.c gem_caching.c \ - gem_close_race.c gem_concurrent_all.c gem_concurrent_blit.c \ - gem_cpu_reloc.c gem_cs_prefetch.c gem_cs_tlb.c \ - gem_ctx_bad_destroy.c gem_ctx_bad_exec.c gem_ctx_basic.c \ - gem_ctx_create.c gem_ctx_exec.c gem_ctx_param_basic.c \ - gem_ctx_thrash.c gem_double_irq_loop.c gem_dummy_reloc_loop.c \ - gem_eio.c gem_evict_alignment.c gem_evict_everything.c \ - gem_exec_alignment.c gem_exec_bad_domains.c gem_exec_big.c \ - gem_exec_blt.c gem_exec_faulting_reloc.c gem_exec_lut_handle.c \ - gem_exec_nop.c gem_exec_params.c gem_exec_parse.c \ - gem_fd_exhaustion.c gem_fence_thrash.c gem_fence_upload.c \ - gem_fenced_exec_thrash.c gem_flink_basic.c gem_flink_race.c \ - gem_gpgpu_fill.c gem_gtt_cpu_tlb.c gem_gtt_hog.c \ - gem_gtt_speed.c gem_hang.c gem_hangcheck_forcewake.c \ - gem_largeobject.c gem_linear_blits.c gem_lut_handle.c \ - gem_madvise.c gem_media_fill.c gem_mmap.c gem_mmap_gtt.c \ - gem_mmap_offset_exhaustion.c gem_mmap_wc.c \ + gem_bad_length.c gem_bad_reloc.c gem_basic.c gem_busy.c \ + gem_caching.c gem_close_race.c gem_concurrent_all.c \ + gem_concurrent_blit.c gem_cpu_reloc.c gem_create.c \ + gem_cs_prefetch.c gem_cs_tlb.c gem_ctx_bad_destroy.c \ + gem_ctx_bad_exec.c gem_ctx_basic.c gem_ctx_create.c \ + gem_ctx_exec.c gem_ctx_param_basic.c gem_ctx_thrash.c \ + gem_double_irq_loop.c gem_dummy_reloc_loop.c gem_eio.c \ + gem_evict_alignment.c gem_evict_everything.c \ + gem_exec_alignment.c gem_exec_bad_domains.c gem_exec_basic.c \ + gem_exec_big.c gem_exec_blt.c gem_exec_faulting_reloc.c \ + gem_exec_lut_handle.c gem_exec_nop.c gem_exec_params.c \ + gem_exec_parse.c gem_exec_reloc.c gem_fd_exhaustion.c \ + gem_fence_thrash.c gem_fence_upload.c gem_fenced_exec_thrash.c \ + gem_flink_basic.c gem_flink_race.c gem_gpgpu_fill.c \ + gem_gtt_cpu_tlb.c gem_gtt_hog.c gem_gtt_speed.c gem_hang.c \ + gem_hangcheck_forcewake.c gem_largeobject.c gem_linear_blits.c \ + gem_lut_handle.c gem_madvise.c gem_media_fill.c gem_mmap.c \ + gem_mmap_gtt.c gem_mmap_offset_exhaustion.c gem_mmap_wc.c \ gem_multi_bsd_sync_loop.c gem_non_secure_batch.c \ gem_partial_pwrite_pread.c gem_persistent_relocs.c gem_pin.c \ gem_pipe_control_store_loop.c gem_ppgtt.c gem_pread.c \ @@ -1695,8 +1815,9 @@ gem_request_retire.c gem_reset_stats.c gem_ring_sync_copy.c \ gem_ring_sync_loop.c gem_ringfill.c gem_seqno_wrap.c \ gem_set_tiling_vs_blt.c gem_set_tiling_vs_gtt.c \ - gem_set_tiling_vs_pwrite.c gem_storedw_batches_loop.c \ - gem_storedw_loop.c gem_streaming_writes.c gem_stress.c \ + gem_set_tiling_vs_pwrite.c gem_softpin.c gem_stolen.c \ + gem_storedw_batches_loop.c gem_storedw_loop.c \ + gem_streaming_writes.c gem_stress.c gem_sync.c \ gem_threaded_access_tiled.c gem_tiled_blits.c \ gem_tiled_fence_blits.c gem_tiled_partial_pwrite_pread.c \ gem_tiled_pread_basic.c gem_tiled_pread_pwrite.c \ @@ -1707,19 +1828,22 @@ gen3_mixed_blits.c gen3_render_linear_blits.c \ gen3_render_mixed_blits.c gen3_render_tiledx_blits.c \ gen3_render_tiledy_blits.c gen7_forcewake_mt.c kms_3d.c \ - kms_addfb_basic.c kms_atomic.c kms_crtc_background_color.c \ - kms_cursor_crc.c kms_draw_crc.c kms_fbc_crc.c kms_fbcon_fbt.c \ - kms_fence_pin_leak.c kms_flip.c kms_flip_event_leak.c \ - kms_flip_tiling.c kms_force_connector.c \ - kms_frontbuffer_tracking.c kms_legacy_colorkey.c \ + kms_addfb_basic.c kms_atomic.c kms_chv_cursor_fail.c \ + kms_crtc_background_color.c kms_cursor_crc.c kms_draw_crc.c \ + kms_fbc_crc.c kms_fbcon_fbt.c kms_fence_pin_leak.c kms_flip.c \ + kms_flip_event_leak.c kms_flip_tiling.c \ + kms_force_connector_basic.c kms_frontbuffer_tracking.c \ + kms_legacy_colorkey.c kms_mmap_write_crc.c \ kms_mmio_vs_cs_flip.c kms_panel_fitting.c kms_pipe_b_c_ivb.c \ kms_pipe_crc_basic.c kms_plane.c kms_plane_scaling.c \ kms_psr_sink_crc.c kms_pwrite_crc.c kms_render.c \ kms_rotation_crc.c kms_setmode.c kms_sink_crc_basic.c \ kms_universal_plane.c kms_vblank.c pm_backlight.c pm_lpsp.c \ - pm_rc6_residency.c pm_rpm.c pm_rps.c pm_sseu.c prime_nv_api.c \ - prime_nv_pcopy.c prime_nv_test.c prime_self_import.c \ - prime_udl.c template.c $(testdisplay_SOURCES) + pm_rc6_residency.c pm_rpm.c pm_rps.c pm_sseu.c prime_mmap.c \ + prime_mmap_coherency.c prime_nv_api.c prime_nv_pcopy.c \ + prime_nv_test.c prime_self_import.c prime_udl.c template.c \ + $(testdisplay_SOURCES) vc4_create_bo.c vc4_wait_bo.c \ + vc4_wait_seqno.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -1783,6 +1907,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -1827,6 +1953,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -1925,11 +2052,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -1939,34 +2071,42 @@ prime_nv_test \ $(NULL) +VC4_TESTS_M = \ + vc4_create_bo \ + vc4_wait_bo \ + vc4_wait_seqno \ + $(NULL) + TESTS_progs_M = core_get_client_auth drv_getparams_basic drv_suspend \ - drv_hangman gem_bad_reloc gem_basic gem_caching gem_close_race \ - gem_concurrent_blit gem_concurrent_all gem_cs_tlb \ - gem_ctx_param_basic gem_ctx_bad_exec gem_ctx_exec \ - gem_dummy_reloc_loop gem_eio gem_evict_alignment \ + drv_hangman gem_bad_reloc gem_basic gem_busy gem_caching \ + gem_close_race gem_concurrent_blit gem_concurrent_all \ + gem_create gem_cs_tlb gem_ctx_param_basic gem_ctx_bad_exec \ + gem_ctx_exec gem_dummy_reloc_loop gem_eio gem_evict_alignment \ gem_evict_everything gem_exec_alignment gem_exec_bad_domains \ - gem_exec_faulting_reloc gem_exec_nop gem_exec_params \ - gem_exec_parse gem_fenced_exec_thrash gem_fence_thrash \ - gem_fence_upload gem_flink_basic gem_flink_race \ - gem_linear_blits gem_madvise gem_mmap gem_mmap_gtt gem_mmap_wc \ - gem_partial_pwrite_pread gem_persistent_relocs \ - gem_pipe_control_store_loop gem_ppgtt gem_pread \ - gem_pread_after_blit gem_pwrite gem_pwrite_pread \ + gem_exec_basic gem_exec_faulting_reloc gem_exec_nop \ + gem_exec_params gem_exec_parse gem_exec_reloc \ + gem_fenced_exec_thrash gem_fence_thrash gem_fence_upload \ + gem_flink_basic gem_flink_race gem_linear_blits gem_madvise \ + gem_mmap gem_mmap_gtt gem_mmap_wc gem_partial_pwrite_pread \ + gem_persistent_relocs gem_pipe_control_store_loop gem_ppgtt \ + gem_pread gem_pread_after_blit gem_pwrite gem_pwrite_pread \ gem_pwrite_snooped gem_readwrite gem_read_read_speed \ gem_reloc_overflow gem_reloc_vs_gpu gem_render_copy_redux \ gem_request_retire gem_reset_stats gem_ringfill \ - gem_set_tiling_vs_blt gem_storedw_batches_loop \ - gem_streaming_writes gem_tiled_blits \ + gem_set_tiling_vs_blt gem_softpin gem_stolen \ + gem_storedw_batches_loop gem_streaming_writes gem_tiled_blits \ gem_tiled_partial_pwrite_pread gem_userptr_blits \ gem_write_read_ring_switch kms_addfb_basic kms_atomic \ - kms_cursor_crc kms_draw_crc kms_fbc_crc kms_fbcon_fbt kms_flip \ - kms_flip_event_leak kms_flip_tiling kms_frontbuffer_tracking \ - kms_legacy_colorkey kms_mmio_vs_cs_flip kms_pipe_b_c_ivb \ - kms_pipe_crc_basic kms_plane kms_psr_sink_crc kms_render \ - kms_rotation_crc kms_setmode kms_universal_plane kms_vblank \ + kms_chv_cursor_fail kms_cursor_crc kms_draw_crc kms_fbc_crc \ + kms_fbcon_fbt kms_flip kms_flip_event_leak kms_flip_tiling \ + kms_frontbuffer_tracking kms_legacy_colorkey \ + kms_mmio_vs_cs_flip kms_pipe_b_c_ivb kms_pipe_crc_basic \ + kms_plane kms_psr_sink_crc kms_render kms_rotation_crc \ + kms_setmode kms_universal_plane kms_vblank \ kms_crtc_background_color kms_plane_scaling kms_panel_fitting \ pm_backlight pm_lpsp pm_rpm pm_rps pm_rc6_residency pm_sseu \ - prime_self_import template $(NULL) $(am__append_1) + prime_mmap prime_mmap_coherency prime_self_import template \ + $(NULL) $(am__append_1) $(am__append_2) TESTS_progs = core_auth core_getclient core_getstats core_getversion \ core_prop_blob core_setmaster_vs_auth drm_import_export \ drm_read drm_vma_limiter drm_vma_limiter_cached \ @@ -1981,7 +2121,7 @@ gem_render_copy gem_render_linear_blits gem_render_tiled_blits \ gem_ring_sync_copy gem_ring_sync_loop gem_multi_bsd_sync_loop \ gem_seqno_wrap gem_set_tiling_vs_gtt gem_set_tiling_vs_pwrite \ - gem_storedw_loop gem_threaded_access_tiled \ + gem_storedw_loop gem_sync gem_threaded_access_tiled \ gem_tiled_fence_blits gem_tiled_pread_basic \ gem_tiled_pread_pwrite gem_tiled_swapping gem_tiled_wb \ gem_tiled_wc gem_tiling_max_stride gem_unfence_active_buffers \ @@ -1989,8 +2129,9 @@ gen3_mixed_blits gen3_render_linear_blits \ gen3_render_mixed_blits gen3_render_tiledx_blits \ gen3_render_tiledy_blits gen7_forcewake_mt kms_3d \ - kms_fence_pin_leak kms_force_connector kms_pwrite_crc \ - kms_sink_crc_basic prime_udl $(NULL) testdisplay + kms_fence_pin_leak kms_force_connector_basic \ + kms_mmap_write_crc kms_pwrite_crc kms_sink_crc_basic prime_udl \ + $(NULL) testdisplay # IMPORTANT: The ZZ_ tests need to be run last! # ... and make can't deal with inlined comments ... @@ -2085,7 +2226,7 @@ @BUILD_TESTS_TRUE@pkgdata_DATA = test-list.txt @BUILD_TESTS_TRUE@EXTRA_DIST = $(common_files) -@BUILD_TESTS_TRUE@CLEANFILES = $(EXTRA_PROGRAMS) test-list.txt +@BUILD_TESTS_TRUE@CLEANFILES = $(EXTRA_PROGRAMS) test-list.txt .gitignore @BUILD_TESTS_TRUE@AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ @BUILD_TESTS_TRUE@ $(DEBUG_CFLAGS) -I$(srcdir)/.. \ @BUILD_TESTS_TRUE@ -I$(srcdir)/../lib -include \ @@ -2135,6 +2276,12 @@ @BUILD_TESTS_TRUE@prime_nv_api_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS) @BUILD_TESTS_TRUE@prime_nv_pcopy_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS) @BUILD_TESTS_TRUE@prime_nv_pcopy_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS) +@BUILD_TESTS_TRUE@vc4_create_bo_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +@BUILD_TESTS_TRUE@vc4_create_bo_LDADD = $(LDADD) $(DRM_VC4_LIBS) +@BUILD_TESTS_TRUE@vc4_wait_bo_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +@BUILD_TESTS_TRUE@vc4_wait_bo_LDADD = $(LDADD) $(DRM_VC4_LIBS) +@BUILD_TESTS_TRUE@vc4_wait_seqno_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +@BUILD_TESTS_TRUE@vc4_wait_seqno_LDADD = $(LDADD) $(DRM_VC4_LIBS) all: all-am .SUFFIXES: @@ -2320,6 +2467,10 @@ @rm -f gem_basic$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_basic_OBJECTS) $(gem_basic_LDADD) $(LIBS) +gem_busy$(EXEEXT): $(gem_busy_OBJECTS) $(gem_busy_DEPENDENCIES) $(EXTRA_gem_busy_DEPENDENCIES) + @rm -f gem_busy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gem_busy_OBJECTS) $(gem_busy_LDADD) $(LIBS) + gem_caching$(EXEEXT): $(gem_caching_OBJECTS) $(gem_caching_DEPENDENCIES) $(EXTRA_gem_caching_DEPENDENCIES) @rm -f gem_caching$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_caching_OBJECTS) $(gem_caching_LDADD) $(LIBS) @@ -2340,6 +2491,10 @@ @rm -f gem_cpu_reloc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_cpu_reloc_OBJECTS) $(gem_cpu_reloc_LDADD) $(LIBS) +gem_create$(EXEEXT): $(gem_create_OBJECTS) $(gem_create_DEPENDENCIES) $(EXTRA_gem_create_DEPENDENCIES) + @rm -f gem_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gem_create_OBJECTS) $(gem_create_LDADD) $(LIBS) + gem_cs_prefetch$(EXEEXT): $(gem_cs_prefetch_OBJECTS) $(gem_cs_prefetch_DEPENDENCIES) $(EXTRA_gem_cs_prefetch_DEPENDENCIES) @rm -f gem_cs_prefetch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_cs_prefetch_OBJECTS) $(gem_cs_prefetch_LDADD) $(LIBS) @@ -2404,6 +2559,10 @@ @rm -f gem_exec_bad_domains$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_exec_bad_domains_OBJECTS) $(gem_exec_bad_domains_LDADD) $(LIBS) +gem_exec_basic$(EXEEXT): $(gem_exec_basic_OBJECTS) $(gem_exec_basic_DEPENDENCIES) $(EXTRA_gem_exec_basic_DEPENDENCIES) + @rm -f gem_exec_basic$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gem_exec_basic_OBJECTS) $(gem_exec_basic_LDADD) $(LIBS) + gem_exec_big$(EXEEXT): $(gem_exec_big_OBJECTS) $(gem_exec_big_DEPENDENCIES) $(EXTRA_gem_exec_big_DEPENDENCIES) @rm -f gem_exec_big$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_exec_big_OBJECTS) $(gem_exec_big_LDADD) $(LIBS) @@ -2432,6 +2591,10 @@ @rm -f gem_exec_parse$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_exec_parse_OBJECTS) $(gem_exec_parse_LDADD) $(LIBS) +gem_exec_reloc$(EXEEXT): $(gem_exec_reloc_OBJECTS) $(gem_exec_reloc_DEPENDENCIES) $(EXTRA_gem_exec_reloc_DEPENDENCIES) + @rm -f gem_exec_reloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gem_exec_reloc_OBJECTS) $(gem_exec_reloc_LDADD) $(LIBS) + gem_fd_exhaustion$(EXEEXT): $(gem_fd_exhaustion_OBJECTS) $(gem_fd_exhaustion_DEPENDENCIES) $(EXTRA_gem_fd_exhaustion_DEPENDENCIES) @rm -f gem_fd_exhaustion$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_fd_exhaustion_OBJECTS) $(gem_fd_exhaustion_LDADD) $(LIBS) @@ -2636,6 +2799,14 @@ @rm -f gem_set_tiling_vs_pwrite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_set_tiling_vs_pwrite_OBJECTS) $(gem_set_tiling_vs_pwrite_LDADD) $(LIBS) +gem_softpin$(EXEEXT): $(gem_softpin_OBJECTS) $(gem_softpin_DEPENDENCIES) $(EXTRA_gem_softpin_DEPENDENCIES) + @rm -f gem_softpin$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gem_softpin_OBJECTS) $(gem_softpin_LDADD) $(LIBS) + +gem_stolen$(EXEEXT): $(gem_stolen_OBJECTS) $(gem_stolen_DEPENDENCIES) $(EXTRA_gem_stolen_DEPENDENCIES) + @rm -f gem_stolen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gem_stolen_OBJECTS) $(gem_stolen_LDADD) $(LIBS) + gem_storedw_batches_loop$(EXEEXT): $(gem_storedw_batches_loop_OBJECTS) $(gem_storedw_batches_loop_DEPENDENCIES) $(EXTRA_gem_storedw_batches_loop_DEPENDENCIES) @rm -f gem_storedw_batches_loop$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_storedw_batches_loop_OBJECTS) $(gem_storedw_batches_loop_LDADD) $(LIBS) @@ -2652,6 +2823,10 @@ @rm -f gem_stress$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gem_stress_OBJECTS) $(gem_stress_LDADD) $(LIBS) +gem_sync$(EXEEXT): $(gem_sync_OBJECTS) $(gem_sync_DEPENDENCIES) $(EXTRA_gem_sync_DEPENDENCIES) + @rm -f gem_sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gem_sync_OBJECTS) $(gem_sync_LDADD) $(LIBS) + gem_threaded_access_tiled$(EXEEXT): $(gem_threaded_access_tiled_OBJECTS) $(gem_threaded_access_tiled_DEPENDENCIES) $(EXTRA_gem_threaded_access_tiled_DEPENDENCIES) @rm -f gem_threaded_access_tiled$(EXEEXT) $(AM_V_CCLD)$(gem_threaded_access_tiled_LINK) $(gem_threaded_access_tiled_OBJECTS) $(gem_threaded_access_tiled_LDADD) $(LIBS) @@ -2752,6 +2927,10 @@ @rm -f kms_atomic$(EXEEXT) $(AM_V_CCLD)$(LINK) $(kms_atomic_OBJECTS) $(kms_atomic_LDADD) $(LIBS) +kms_chv_cursor_fail$(EXEEXT): $(kms_chv_cursor_fail_OBJECTS) $(kms_chv_cursor_fail_DEPENDENCIES) $(EXTRA_kms_chv_cursor_fail_DEPENDENCIES) + @rm -f kms_chv_cursor_fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kms_chv_cursor_fail_OBJECTS) $(kms_chv_cursor_fail_LDADD) $(LIBS) + kms_crtc_background_color$(EXEEXT): $(kms_crtc_background_color_OBJECTS) $(kms_crtc_background_color_DEPENDENCIES) $(EXTRA_kms_crtc_background_color_DEPENDENCIES) @rm -f kms_crtc_background_color$(EXEEXT) $(AM_V_CCLD)$(LINK) $(kms_crtc_background_color_OBJECTS) $(kms_crtc_background_color_LDADD) $(LIBS) @@ -2788,9 +2967,9 @@ @rm -f kms_flip_tiling$(EXEEXT) $(AM_V_CCLD)$(LINK) $(kms_flip_tiling_OBJECTS) $(kms_flip_tiling_LDADD) $(LIBS) -kms_force_connector$(EXEEXT): $(kms_force_connector_OBJECTS) $(kms_force_connector_DEPENDENCIES) $(EXTRA_kms_force_connector_DEPENDENCIES) - @rm -f kms_force_connector$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(kms_force_connector_OBJECTS) $(kms_force_connector_LDADD) $(LIBS) +kms_force_connector_basic$(EXEEXT): $(kms_force_connector_basic_OBJECTS) $(kms_force_connector_basic_DEPENDENCIES) $(EXTRA_kms_force_connector_basic_DEPENDENCIES) + @rm -f kms_force_connector_basic$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kms_force_connector_basic_OBJECTS) $(kms_force_connector_basic_LDADD) $(LIBS) kms_frontbuffer_tracking$(EXEEXT): $(kms_frontbuffer_tracking_OBJECTS) $(kms_frontbuffer_tracking_DEPENDENCIES) $(EXTRA_kms_frontbuffer_tracking_DEPENDENCIES) @rm -f kms_frontbuffer_tracking$(EXEEXT) @@ -2800,6 +2979,10 @@ @rm -f kms_legacy_colorkey$(EXEEXT) $(AM_V_CCLD)$(LINK) $(kms_legacy_colorkey_OBJECTS) $(kms_legacy_colorkey_LDADD) $(LIBS) +kms_mmap_write_crc$(EXEEXT): $(kms_mmap_write_crc_OBJECTS) $(kms_mmap_write_crc_DEPENDENCIES) $(EXTRA_kms_mmap_write_crc_DEPENDENCIES) + @rm -f kms_mmap_write_crc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kms_mmap_write_crc_OBJECTS) $(kms_mmap_write_crc_LDADD) $(LIBS) + kms_mmio_vs_cs_flip$(EXEEXT): $(kms_mmio_vs_cs_flip_OBJECTS) $(kms_mmio_vs_cs_flip_DEPENDENCIES) $(EXTRA_kms_mmio_vs_cs_flip_DEPENDENCIES) @rm -f kms_mmio_vs_cs_flip$(EXEEXT) $(AM_V_CCLD)$(LINK) $(kms_mmio_vs_cs_flip_OBJECTS) $(kms_mmio_vs_cs_flip_LDADD) $(LIBS) @@ -2880,6 +3063,14 @@ @rm -f pm_sseu$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pm_sseu_OBJECTS) $(pm_sseu_LDADD) $(LIBS) +prime_mmap$(EXEEXT): $(prime_mmap_OBJECTS) $(prime_mmap_DEPENDENCIES) $(EXTRA_prime_mmap_DEPENDENCIES) + @rm -f prime_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prime_mmap_OBJECTS) $(prime_mmap_LDADD) $(LIBS) + +prime_mmap_coherency$(EXEEXT): $(prime_mmap_coherency_OBJECTS) $(prime_mmap_coherency_DEPENDENCIES) $(EXTRA_prime_mmap_coherency_DEPENDENCIES) + @rm -f prime_mmap_coherency$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prime_mmap_coherency_OBJECTS) $(prime_mmap_coherency_LDADD) $(LIBS) + prime_nv_api$(EXEEXT): $(prime_nv_api_OBJECTS) $(prime_nv_api_DEPENDENCIES) $(EXTRA_prime_nv_api_DEPENDENCIES) @rm -f prime_nv_api$(EXEEXT) $(AM_V_CCLD)$(prime_nv_api_LINK) $(prime_nv_api_OBJECTS) $(prime_nv_api_LDADD) $(LIBS) @@ -2907,6 +3098,18 @@ testdisplay$(EXEEXT): $(testdisplay_OBJECTS) $(testdisplay_DEPENDENCIES) $(EXTRA_testdisplay_DEPENDENCIES) @rm -f testdisplay$(EXEEXT) $(AM_V_CCLD)$(LINK) $(testdisplay_OBJECTS) $(testdisplay_LDADD) $(LIBS) + +vc4_create_bo$(EXEEXT): $(vc4_create_bo_OBJECTS) $(vc4_create_bo_DEPENDENCIES) $(EXTRA_vc4_create_bo_DEPENDENCIES) + @rm -f vc4_create_bo$(EXEEXT) + $(AM_V_CCLD)$(vc4_create_bo_LINK) $(vc4_create_bo_OBJECTS) $(vc4_create_bo_LDADD) $(LIBS) + +vc4_wait_bo$(EXEEXT): $(vc4_wait_bo_OBJECTS) $(vc4_wait_bo_DEPENDENCIES) $(EXTRA_vc4_wait_bo_DEPENDENCIES) + @rm -f vc4_wait_bo$(EXEEXT) + $(AM_V_CCLD)$(vc4_wait_bo_LINK) $(vc4_wait_bo_OBJECTS) $(vc4_wait_bo_LDADD) $(LIBS) + +vc4_wait_seqno$(EXEEXT): $(vc4_wait_seqno_OBJECTS) $(vc4_wait_seqno_DEPENDENCIES) $(EXTRA_vc4_wait_seqno_DEPENDENCIES) + @rm -f vc4_wait_seqno$(EXEEXT) + $(AM_V_CCLD)$(vc4_wait_seqno_LINK) $(vc4_wait_seqno_OBJECTS) $(vc4_wait_seqno_LDADD) $(LIBS) install-dist_pkglibexecSCRIPTS: $(dist_pkglibexec_SCRIPTS) @$(NORMAL_INSTALL) @list='$(dist_pkglibexec_SCRIPTS)'; test -n "$(pkglibexecdir)" || list=; \ @@ -2972,11 +3175,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_bad_length.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_bad_reloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_basic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_busy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_caching.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_close_race-gem_close_race.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_concurrent_all.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_concurrent_blit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_cpu_reloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_cs_prefetch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_cs_tlb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_ctx_bad_destroy.Po@am__quote@ @@ -2993,6 +3198,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_evict_everything.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_alignment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_bad_domains.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_basic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_big.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_blt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_faulting_reloc.Po@am__quote@ @@ -3000,6 +3206,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_nop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_params.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_exec_reloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_fd_exhaustion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_fence_thrash-gem_fence_thrash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_fence_upload-gem_fence_upload.Po@am__quote@ @@ -3051,10 +3258,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_set_tiling_vs_blt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_set_tiling_vs_gtt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_set_tiling_vs_pwrite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_softpin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_stolen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_storedw_batches_loop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_storedw_loop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_streaming_writes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_stress.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_sync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_threaded_access_tiled-gem_threaded_access_tiled.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_tiled_blits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gem_tiled_fence_blits.Po@am__quote@ @@ -3080,6 +3290,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_3d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_addfb_basic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_atomic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_chv_cursor_fail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_crtc_background_color.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_cursor_crc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_draw_crc.Po@am__quote@ @@ -3089,9 +3300,10 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_flip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_flip_event_leak.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_flip_tiling.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_force_connector.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_force_connector_basic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_frontbuffer_tracking.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_legacy_colorkey.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_mmap_write_crc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_mmio_vs_cs_flip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_panel_fitting.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kms_pipe_b_c_ivb.Po@am__quote@ @@ -3112,6 +3324,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_rpm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_rps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_sseu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prime_mmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prime_mmap_coherency.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prime_nv_api-prime_nv_api.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prime_nv_pcopy-prime_nv_pcopy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prime_nv_test-prime_nv_test.Po@am__quote@ @@ -3120,6 +3334,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdisplay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdisplay_hotplug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vc4_create_bo-vc4_create_bo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vc4_wait_bo-vc4_wait_bo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vc4_wait_seqno-vc4_wait_seqno.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -3383,6 +3600,48 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prime_self_import_CFLAGS) $(CFLAGS) -c -o prime_self_import-prime_self_import.obj `if test -f 'prime_self_import.c'; then $(CYGPATH_W) 'prime_self_import.c'; else $(CYGPATH_W) '$(srcdir)/prime_self_import.c'; fi` +vc4_create_bo-vc4_create_bo.o: vc4_create_bo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_create_bo_CFLAGS) $(CFLAGS) -MT vc4_create_bo-vc4_create_bo.o -MD -MP -MF $(DEPDIR)/vc4_create_bo-vc4_create_bo.Tpo -c -o vc4_create_bo-vc4_create_bo.o `test -f 'vc4_create_bo.c' || echo '$(srcdir)/'`vc4_create_bo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vc4_create_bo-vc4_create_bo.Tpo $(DEPDIR)/vc4_create_bo-vc4_create_bo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vc4_create_bo.c' object='vc4_create_bo-vc4_create_bo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_create_bo_CFLAGS) $(CFLAGS) -c -o vc4_create_bo-vc4_create_bo.o `test -f 'vc4_create_bo.c' || echo '$(srcdir)/'`vc4_create_bo.c + +vc4_create_bo-vc4_create_bo.obj: vc4_create_bo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_create_bo_CFLAGS) $(CFLAGS) -MT vc4_create_bo-vc4_create_bo.obj -MD -MP -MF $(DEPDIR)/vc4_create_bo-vc4_create_bo.Tpo -c -o vc4_create_bo-vc4_create_bo.obj `if test -f 'vc4_create_bo.c'; then $(CYGPATH_W) 'vc4_create_bo.c'; else $(CYGPATH_W) '$(srcdir)/vc4_create_bo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vc4_create_bo-vc4_create_bo.Tpo $(DEPDIR)/vc4_create_bo-vc4_create_bo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vc4_create_bo.c' object='vc4_create_bo-vc4_create_bo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_create_bo_CFLAGS) $(CFLAGS) -c -o vc4_create_bo-vc4_create_bo.obj `if test -f 'vc4_create_bo.c'; then $(CYGPATH_W) 'vc4_create_bo.c'; else $(CYGPATH_W) '$(srcdir)/vc4_create_bo.c'; fi` + +vc4_wait_bo-vc4_wait_bo.o: vc4_wait_bo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_bo_CFLAGS) $(CFLAGS) -MT vc4_wait_bo-vc4_wait_bo.o -MD -MP -MF $(DEPDIR)/vc4_wait_bo-vc4_wait_bo.Tpo -c -o vc4_wait_bo-vc4_wait_bo.o `test -f 'vc4_wait_bo.c' || echo '$(srcdir)/'`vc4_wait_bo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vc4_wait_bo-vc4_wait_bo.Tpo $(DEPDIR)/vc4_wait_bo-vc4_wait_bo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vc4_wait_bo.c' object='vc4_wait_bo-vc4_wait_bo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_bo_CFLAGS) $(CFLAGS) -c -o vc4_wait_bo-vc4_wait_bo.o `test -f 'vc4_wait_bo.c' || echo '$(srcdir)/'`vc4_wait_bo.c + +vc4_wait_bo-vc4_wait_bo.obj: vc4_wait_bo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_bo_CFLAGS) $(CFLAGS) -MT vc4_wait_bo-vc4_wait_bo.obj -MD -MP -MF $(DEPDIR)/vc4_wait_bo-vc4_wait_bo.Tpo -c -o vc4_wait_bo-vc4_wait_bo.obj `if test -f 'vc4_wait_bo.c'; then $(CYGPATH_W) 'vc4_wait_bo.c'; else $(CYGPATH_W) '$(srcdir)/vc4_wait_bo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vc4_wait_bo-vc4_wait_bo.Tpo $(DEPDIR)/vc4_wait_bo-vc4_wait_bo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vc4_wait_bo.c' object='vc4_wait_bo-vc4_wait_bo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_bo_CFLAGS) $(CFLAGS) -c -o vc4_wait_bo-vc4_wait_bo.obj `if test -f 'vc4_wait_bo.c'; then $(CYGPATH_W) 'vc4_wait_bo.c'; else $(CYGPATH_W) '$(srcdir)/vc4_wait_bo.c'; fi` + +vc4_wait_seqno-vc4_wait_seqno.o: vc4_wait_seqno.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_seqno_CFLAGS) $(CFLAGS) -MT vc4_wait_seqno-vc4_wait_seqno.o -MD -MP -MF $(DEPDIR)/vc4_wait_seqno-vc4_wait_seqno.Tpo -c -o vc4_wait_seqno-vc4_wait_seqno.o `test -f 'vc4_wait_seqno.c' || echo '$(srcdir)/'`vc4_wait_seqno.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vc4_wait_seqno-vc4_wait_seqno.Tpo $(DEPDIR)/vc4_wait_seqno-vc4_wait_seqno.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vc4_wait_seqno.c' object='vc4_wait_seqno-vc4_wait_seqno.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_seqno_CFLAGS) $(CFLAGS) -c -o vc4_wait_seqno-vc4_wait_seqno.o `test -f 'vc4_wait_seqno.c' || echo '$(srcdir)/'`vc4_wait_seqno.c + +vc4_wait_seqno-vc4_wait_seqno.obj: vc4_wait_seqno.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_seqno_CFLAGS) $(CFLAGS) -MT vc4_wait_seqno-vc4_wait_seqno.obj -MD -MP -MF $(DEPDIR)/vc4_wait_seqno-vc4_wait_seqno.Tpo -c -o vc4_wait_seqno-vc4_wait_seqno.obj `if test -f 'vc4_wait_seqno.c'; then $(CYGPATH_W) 'vc4_wait_seqno.c'; else $(CYGPATH_W) '$(srcdir)/vc4_wait_seqno.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vc4_wait_seqno-vc4_wait_seqno.Tpo $(DEPDIR)/vc4_wait_seqno-vc4_wait_seqno.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vc4_wait_seqno.c' object='vc4_wait_seqno-vc4_wait_seqno.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vc4_wait_seqno_CFLAGS) $(CFLAGS) -c -o vc4_wait_seqno-vc4_wait_seqno.obj `if test -f 'vc4_wait_seqno.c'; then $(CYGPATH_W) 'vc4_wait_seqno.c'; else $(CYGPATH_W) '$(srcdir)/vc4_wait_seqno.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -3515,7 +3774,8 @@ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) +@BUILD_TESTS_FALSE@all-local: +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -3627,12 +3887,13 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS clean-pkglibexecPROGRAMS \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_pkgdataDATA \ +.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \ + clean-generic clean-libtool clean-noinstPROGRAMS \ + clean-pkglibexecPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dist_pkgdataDATA \ install-dist_pkglibexecSCRIPTS install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ @@ -3653,6 +3914,10 @@ @BUILD_TESTS_TRUE@ @echo ${single_kernel_tests} ${multi_kernel_tests} >> $@ @BUILD_TESTS_TRUE@ @echo END TESTLIST >> $@ +@BUILD_TESTS_TRUE@all-local: .gitignore +@BUILD_TESTS_TRUE@.gitignore: Makefile.sources +@BUILD_TESTS_TRUE@ @echo "$(pkglibexec_PROGRAMS) $(HANG) test-list.txt .gitignore" | sed 's/\s\+/\n/g' | sort > $@ + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru intel-gpu-tools-1.13/tests/Makefile.sources intel-gpu-tools-1.14/tests/Makefile.sources --- intel-gpu-tools-1.13/tests/Makefile.sources 2015-12-02 10:41:28.000000000 +0000 +++ intel-gpu-tools-1.14/tests/Makefile.sources 2016-03-01 15:59:21.000000000 +0000 @@ -4,6 +4,12 @@ prime_nv_test \ $(NULL) +VC4_TESTS_M = \ + vc4_create_bo \ + vc4_wait_bo \ + vc4_wait_seqno \ + $(NULL) + TESTS_progs_M = \ core_get_client_auth \ drv_getparams_basic \ @@ -11,10 +17,12 @@ drv_hangman \ gem_bad_reloc \ gem_basic \ + gem_busy \ gem_caching \ gem_close_race \ gem_concurrent_blit \ gem_concurrent_all \ + gem_create \ gem_cs_tlb \ gem_ctx_param_basic \ gem_ctx_bad_exec \ @@ -25,10 +33,12 @@ gem_evict_everything \ gem_exec_alignment \ gem_exec_bad_domains \ + gem_exec_basic \ gem_exec_faulting_reloc \ gem_exec_nop \ gem_exec_params \ gem_exec_parse \ + gem_exec_reloc \ gem_fenced_exec_thrash \ gem_fence_thrash \ gem_fence_upload \ @@ -57,6 +67,8 @@ gem_reset_stats \ gem_ringfill \ gem_set_tiling_vs_blt \ + gem_softpin \ + gem_stolen \ gem_storedw_batches_loop \ gem_streaming_writes \ gem_tiled_blits \ @@ -65,6 +77,7 @@ gem_write_read_ring_switch \ kms_addfb_basic \ kms_atomic \ + kms_chv_cursor_fail \ kms_cursor_crc \ kms_draw_crc \ kms_fbc_crc \ @@ -93,6 +106,8 @@ pm_rps \ pm_rc6_residency \ pm_sseu \ + prime_mmap \ + prime_mmap_coherency \ prime_self_import \ template \ $(NULL) @@ -143,6 +158,7 @@ gem_set_tiling_vs_gtt \ gem_set_tiling_vs_pwrite \ gem_storedw_loop \ + gem_sync \ gem_threaded_access_tiled \ gem_tiled_fence_blits \ gem_tiled_pread_basic \ @@ -163,7 +179,8 @@ gen7_forcewake_mt \ kms_3d \ kms_fence_pin_leak \ - kms_force_connector \ + kms_force_connector_basic \ + kms_mmap_write_crc \ kms_pwrite_crc \ kms_sink_crc_basic \ prime_udl \ diff -Nru intel-gpu-tools-1.13/tests/pm_lpsp.c intel-gpu-tools-1.14/tests/pm_lpsp.c --- intel-gpu-tools-1.13/tests/pm_lpsp.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/pm_lpsp.c 2016-03-01 15:59:21.000000000 +0000 @@ -31,29 +31,6 @@ #include -/* We know that if we don't enable audio runtime PM, snd_hda_intel will never - * release its power well refcount, and we'll never reach the LPSP sate. OTOH - * there's no guarantee that it will release the power well if we enable runtime - * PM, but at least we can try. We don't have any assertions since the user may - * not even have snd_hda_intel loaded, which is not a problem. */ -static void disable_audio_runtime_pm(void) -{ - int fd; - - fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY); - if (fd >= 0) { - igt_assert_eq(write(fd, "1\n", 2), 2); - close(fd); - } - fd = open("/sys/bus/pci/devices/0000:00:03.0/power/control", O_WRONLY); - if (fd >= 0) { - igt_assert_eq(write(fd, "auto\n", 5), 5); - close(fd); - } - /* Give some time for it to react. */ - sleep(1); -} - static bool supports_lpsp(uint32_t devid) { return IS_HASWELL(devid) || IS_BROADWELL(devid); @@ -78,16 +55,9 @@ static uint32_t create_fb(int drm_fd, int width, int height) { struct igt_fb fb; - cairo_t *cr; - uint32_t buffer_id; - - buffer_id = igt_create_fb(drm_fd, width, height, DRM_FORMAT_XRGB8888, - LOCAL_DRM_FORMAT_MOD_NONE, &fb); - cr = igt_get_cairo_ctx(drm_fd, &fb); - igt_paint_test_pattern(cr, width, height); - cairo_destroy(cr); - return buffer_id; + return igt_create_pattern_fb(drm_fd, width, height, DRM_FORMAT_XRGB8888, + LOCAL_DRM_FORMAT_MOD_NONE, &fb); } static void edp_subtest(int drm_fd, drmModeResPtr drm_res, @@ -231,10 +201,10 @@ igt_assert(drm_res->count_connectors <= MAX_CONNECTORS); for (i = 0; i < drm_res->count_connectors; i++) - drm_connectors[i] = drmModeGetConnector(drm_fd, + drm_connectors[i] = drmModeGetConnectorCurrent(drm_fd, drm_res->connectors[i]); - disable_audio_runtime_pm(); + igt_pm_enable_audio_runtime_pm(); igt_require(supports_lpsp(devid)); diff -Nru intel-gpu-tools-1.13/tests/pm_rpm.c intel-gpu-tools-1.14/tests/pm_rpm.c --- intel-gpu-tools-1.13/tests/pm_rpm.c 2015-12-02 10:41:28.000000000 +0000 +++ intel-gpu-tools-1.14/tests/pm_rpm.c 2016-03-01 15:59:21.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2013 Intel Corporation + * Copyright © 2013, 2015 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -52,8 +52,6 @@ #define MAX_ENCODERS 32 #define MAX_CRTCS 16 -#define POWER_DIR "/sys/devices/pci0000:00/0000:00:02.0/power" - enum pc8_status { PC8_ENABLED, PC8_DISABLED @@ -111,6 +109,8 @@ struct modeset_params non_lpsp_mode_params; struct modeset_params *default_mode_params; +static int8_t *pm_data = NULL; + /* If the read fails, then the machine doesn't support PC8+ residencies. */ static bool supports_pc8_plus_residencies(void) { @@ -226,14 +226,34 @@ igt_assert(wait_for_suspended()); \ } while (0) +static uint32_t find_crtc_for_connector(drmModeResPtr res, + drmModeConnectorPtr connector) +{ + drmModeEncoderPtr e; + uint32_t crtc_id = 0; + int i, j; + + for (i = 0; i < connector->count_encoders && !crtc_id; i++) { + e = drmModeGetEncoder(drm_fd, connector->encoders[i]); + + for (j = 0; (e->possible_crtcs >> j) && !crtc_id; j++) + if (e->possible_crtcs & (1 << j)) + crtc_id = res->crtcs[j]; + + drmModeFreeEncoder(e); + } + + igt_assert(crtc_id); + return crtc_id; +} + static bool init_modeset_params_for_type(struct mode_set_data *data, struct modeset_params *params, enum screen_type type) { int i; - uint32_t connector_id = 0; + drmModeConnectorPtr connector = NULL; drmModeModeInfoPtr mode = NULL; - cairo_t *cr; for (i = 0; i < data->res->count_connectors; i++) { drmModeConnectorPtr c = data->connectors[i]; @@ -247,24 +267,21 @@ continue; if (c->connection == DRM_MODE_CONNECTED && c->count_modes) { - connector_id = c->connector_id; + connector = c; mode = &c->modes[0]; break; } } - if (!connector_id) + if (!connector) return false; - igt_create_fb(drm_fd, mode->hdisplay, mode->vdisplay, - DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, - ¶ms->fb); - cr = igt_get_cairo_ctx(drm_fd, ¶ms->fb); - igt_paint_test_pattern(cr, mode->hdisplay, mode->vdisplay); - cairo_destroy(cr); + igt_create_pattern_fb(drm_fd, mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, + ¶ms->fb); - params->crtc_id = data->res->crtcs[0]; - params->connector_id = connector_id; + params->crtc_id = find_crtc_for_connector(data->res, connector); + params->connector_id = connector->connector_id; params->mode = mode; return true; @@ -370,7 +387,7 @@ igt_assert(data->res->count_connectors <= MAX_CONNECTORS); for (i = 0; i < data->res->count_connectors; i++) { - data->connectors[i] = drmModeGetConnector(drm_fd, + data->connectors[i] = drmModeGetConnectorCurrent(drm_fd, data->res->connectors[i]); data->edids[i] = get_connector_edid(data->connectors[i], i); } @@ -405,6 +422,8 @@ igt_assert(data->res->count_crtcs <= MAX_CRTCS); for (i = 0; i < data->res->count_connectors; i++) { + /* Don't use GetConnectorCurrent, we want to force a reprobe + * here. */ data->connectors[i] = drmModeGetConnector(drm_fd, data->res->connectors[i]); data->edids[i] = get_connector_edid(data->connectors[i], i); @@ -668,41 +687,13 @@ has_pc8 = true; } -/* If we want to actually reach PC8+ states, we need to properly configure all - * the devices on the system to allow this. This function will try to setup the - * things we know we need, but won't scream in case anything fails: we don't - * know which devices are present on your machine, so we can't really expect - * anything, just try to help with the more common problems. */ -static void setup_non_graphics_runtime_pm(void) -{ - int fd, i; - char *file_name; - - /* Disk runtime PM policies. */ - file_name = malloc(PATH_MAX); - for (i = 0; ; i++) { - - snprintf(file_name, PATH_MAX, - "/sys/class/scsi_host/host%d/link_power_management_policy", - i); - - fd = open(file_name, O_WRONLY); - if (fd < 0) - break; - - igt_assert(write(fd, "min_power\n", 10) == 10); - close(fd); - } - free(file_name); -} - static void setup_environment(void) { drm_fd = drm_open_driver_master(DRIVER_INTEL); init_mode_set_data(&ms_data); - setup_non_graphics_runtime_pm(); + pm_data = igt_pm_enable_sata_link_power_management(); has_runtime_pm = igt_setup_runtime_pm(); setup_pc8(); @@ -711,11 +702,17 @@ igt_info("PC8 residency support: %d\n", has_pc8); igt_require(has_runtime_pm); +} +static void restore_environment(void) +{ + igt_pm_restore_sata_link_power_management(pm_data); + free(pm_data); } static void teardown_environment(void) { + restore_environment(); fini_mode_set_data(&ms_data); drmClose(drm_fd); close(msr_fd); @@ -1603,7 +1600,6 @@ disable_all_screens_and_wait(&ms_data); - igt_require(default_mode_params); crtc_id = default_mode_params->crtc_id; switch (plane_type) { @@ -1685,12 +1681,26 @@ igt_assert(wait_for_suspended()); } +static int get_crtc_idx(drmModeResPtr res, uint32_t crtc_id) +{ + int i; + + for (i = 0; i < res->count_crtcs; i++) + if (res->crtcs[i] == crtc_id) + return i; + + igt_assert(false); +} + /* This one also triggered WARNs on our driver at some point in time. */ static void planes_subtest(bool universal, bool dpms) { - int i, rc, planes_tested = 0; + int i, rc, planes_tested = 0, crtc_idx; drmModePlaneResPtr planes; + igt_require(default_mode_params); + crtc_idx = get_crtc_idx(ms_data.res, default_mode_params->crtc_id); + if (universal) { rc = drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1); @@ -1704,9 +1714,7 @@ plane = drmModeGetPlane(drm_fd, planes->planes[i]); igt_assert(plane); - /* We just pick the first CRTC on the list, so we can test for - * 0x1 as the index. */ - if (plane->possible_crtcs & 0x1) { + if (plane->possible_crtcs & (1 << crtc_idx)) { enum plane_type type; type = universal ? get_plane_type(plane->plane_id) : diff -Nru intel-gpu-tools-1.13/tests/pm_rps.c intel-gpu-tools-1.14/tests/pm_rps.c --- intel-gpu-tools-1.13/tests/pm_rps.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/pm_rps.c 2016-03-01 15:59:21.000000000 +0000 @@ -146,7 +146,7 @@ { igt_assert_lte(freqs[MIN], freqs[MAX]); igt_assert_lte(freqs[CUR], freqs[MAX]); - igt_assert_lte(freqs[MIN], freqs[CUR]); + igt_assert_lte(freqs[RPn], freqs[CUR]); igt_assert_lte(freqs[RPn], freqs[MIN]); igt_assert_lte(freqs[MAX], freqs[RP0]); igt_assert_lte(freqs[RP1], freqs[RP0]); @@ -288,7 +288,7 @@ static void load_helper_init(void) { lh.devid = intel_get_drm_devid(drm_fd); - lh.has_ppgtt = gem_uses_aliasing_ppgtt(drm_fd); + lh.has_ppgtt = gem_uses_ppgtt(drm_fd); /* MI_STORE_DATA can only use GTT address on gen4+/g33 and needs * snoopable mem on pre-gen6. Hence load-helper only works on gen6+, but @@ -388,10 +388,14 @@ igt_debug("\nIncrease min to midpoint...\n"); writeval(stuff[MIN].filp, fmid); + if (load_gpu) + do_load_gpu(); check(); igt_debug("\nIncrease min to RP0...\n"); writeval(stuff[MIN].filp, origfreqs[RP0]); + if (load_gpu) + do_load_gpu(); check(); igt_debug("\nIncrease min above RP0 (invalid)...\n"); @@ -472,14 +476,14 @@ read_freqs(freqs); dump(freqs); checkit(freqs); - if (freqs[CUR] == freqs[MIN]) + if (freqs[CUR] == freqs[RPn]) break; usleep(1000 * IDLE_WAIT_TIMESTEP_MSEC); wait += IDLE_WAIT_TIMESTEP_MSEC; } while (wait < IDLE_WAIT_TIMEOUT_MSEC); - igt_assert_eq(freqs[CUR], freqs[MIN]); - igt_debug("Required %d msec to reach cur=min\n", wait); + igt_assert_eq(freqs[CUR], freqs[RPn]); + igt_debug("Required %d msec to reach cur=idle\n", wait); } #define LOADED_WAIT_TIMESTEP_MSEC 100 diff -Nru intel-gpu-tools-1.13/tests/pm_sseu.c intel-gpu-tools-1.14/tests/pm_sseu.c --- intel-gpu-tools-1.13/tests/pm_sseu.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/pm_sseu.c 2016-03-01 15:59:21.000000000 +0000 @@ -258,7 +258,7 @@ gem.gen = intel_gen(gem.devid); igt_require_f(gem.gen >= 8, "SSEU power gating only relevant for Gen8+"); - gem.has_ppgtt = gem_uses_aliasing_ppgtt(gem.drm_fd); + gem.has_ppgtt = gem_uses_ppgtt(gem.drm_fd); gem.bufmgr = drm_intel_bufmgr_gem_init(gem.drm_fd, 4096); igt_assert(gem.bufmgr); diff -Nru intel-gpu-tools-1.13/tests/prime_mmap.c intel-gpu-tools-1.14/tests/prime_mmap.c --- intel-gpu-tools-1.13/tests/prime_mmap.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/prime_mmap.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,519 @@ +/* + * Copyright © 2014 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Rob Bradford + * Tiago Vignatti + * + */ + +/* + * Testcase: Check whether mmap()ing dma-buf works + */ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "igt_debugfs.h" +#include "ioctl_wrappers.h" + +#define BO_SIZE (16*1024) + +static int fd; + +char pattern[] = {0xff, 0x00, 0x00, 0x00, + 0x00, 0xff, 0x00, 0x00, + 0x00, 0x00, 0xff, 0x00, + 0x00, 0x00, 0x00, 0xff}; + +static void +fill_bo(uint32_t handle, size_t size) +{ + off_t i; + for (i = 0; i < size; i+=sizeof(pattern)) + { + gem_write(fd, handle, i, pattern, sizeof(pattern)); + } +} + +static void +fill_bo_cpu(char *ptr) +{ + memcpy(ptr, pattern, sizeof(pattern)); +} + +static void +test_correct(void) +{ + int dma_buf_fd; + char *ptr1, *ptr2; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + + /* Check correctness vs GEM_MMAP_GTT */ + ptr1 = gem_mmap__gtt(fd, handle, BO_SIZE, PROT_READ); + ptr2 = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr1 != MAP_FAILED); + igt_assert(ptr2 != MAP_FAILED); + igt_assert(memcmp(ptr1, ptr2, BO_SIZE) == 0); + + /* Check pattern correctness */ + igt_assert(memcmp(ptr2, pattern, sizeof(pattern)) == 0); + + munmap(ptr1, BO_SIZE); + munmap(ptr2, BO_SIZE); + close(dma_buf_fd); + gem_close(fd, handle); +} + +static void +test_map_unmap(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + + /* Unmap and remap */ + munmap(ptr, BO_SIZE); + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + + munmap(ptr, BO_SIZE); + close(dma_buf_fd); + gem_close(fd, handle); +} + +/* prime and then unprime and then prime again the same handle */ +static void +test_reprime(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + + close (dma_buf_fd); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + munmap(ptr, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd(fd, handle); + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + + munmap(ptr, BO_SIZE); + close(dma_buf_fd); + gem_close(fd, handle); +} + +/* map from another process */ +static void +test_forked(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + + igt_fork(childno, 1) { + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + munmap(ptr, BO_SIZE); + close(dma_buf_fd); + } + close(dma_buf_fd); + igt_waitchildren(); + gem_close(fd, handle); +} + +/* test simple CPU write */ +static void +test_correct_cpu_write(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd_for_mmap(fd, handle); + + /* Skip if DRM_RDWR is not supported */ + igt_skip_on(errno == EINVAL); + + /* Check correctness of map using write protection (PROT_WRITE) */ + ptr = mmap(NULL, BO_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + + /* Fill bo using CPU */ + fill_bo_cpu(ptr); + + /* Check pattern correctness */ + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + + munmap(ptr, BO_SIZE); + close(dma_buf_fd); + gem_close(fd, handle); +} + +/* map from another process and then write using CPU */ +static void +test_forked_cpu_write(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd_for_mmap(fd, handle); + + /* Skip if DRM_RDWR is not supported */ + igt_skip_on(errno == EINVAL); + + igt_fork(childno, 1) { + ptr = mmap(NULL, BO_SIZE, PROT_READ | PROT_WRITE , MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + fill_bo_cpu(ptr); + + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + munmap(ptr, BO_SIZE); + close(dma_buf_fd); + } + close(dma_buf_fd); + igt_waitchildren(); + gem_close(fd, handle); +} + +static void +test_refcounting(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + /* Close gem object before mapping */ + gem_close(fd, handle); + + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + munmap(ptr, BO_SIZE); + close (dma_buf_fd); +} + +/* dup before mmap */ +static void +test_dup(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + + dma_buf_fd = dup(prime_handle_to_fd(fd, handle)); + igt_assert(errno == 0); + + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr != MAP_FAILED); + igt_assert(memcmp(ptr, pattern, sizeof(pattern)) == 0); + munmap(ptr, BO_SIZE); + gem_close(fd, handle); + close (dma_buf_fd); +} + +/* Used for error case testing to avoid wrapper */ +static int prime_handle_to_fd_no_assert(uint32_t handle, int flags, int *fd_out) +{ + struct drm_prime_handle args; + int ret; + + args.handle = handle; + args.flags = flags; + args.fd = -1; + + ret = drmIoctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); + if (ret) + ret = errno; + *fd_out = args.fd; + + return ret; +} + +/* test for mmap(dma_buf_export(userptr)) */ +static void +test_userptr(void) +{ + int ret, dma_buf_fd; + void *ptr; + uint32_t handle; + + /* create userptr bo */ + ret = posix_memalign(&ptr, 4096, BO_SIZE); + igt_assert_eq(ret, 0); + + /* we are not allowed to export unsynchronized userptr. Just create a normal + * one */ + gem_userptr(fd, (uint32_t *)ptr, BO_SIZE, 0, 0, &handle); + + /* export userptr */ + ret = prime_handle_to_fd_no_assert(handle, DRM_CLOEXEC, &dma_buf_fd); + if (ret) { + igt_assert(ret == EINVAL || ret == ENODEV); + goto free_userptr; + } else { + igt_assert_eq(ret, 0); + igt_assert_lte(0, dma_buf_fd); + } + + /* a userptr doesn't have the obj->base.filp, but can be exported via + * dma-buf, so make sure it fails here */ + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr == MAP_FAILED && errno == ENODEV); +free_userptr: + gem_close(fd, handle); + close(dma_buf_fd); +} + +static void +test_errors(void) +{ + int i, dma_buf_fd; + char *ptr; + uint32_t handle; + int invalid_flags[] = {DRM_CLOEXEC - 1, DRM_CLOEXEC + 1, + DRM_RDWR - 1, DRM_RDWR + 1}; + + /* Test for invalid flags */ + handle = gem_create(fd, BO_SIZE); + for (i = 0; i < sizeof(invalid_flags) / sizeof(invalid_flags[0]); i++) { + prime_handle_to_fd_no_assert(handle, invalid_flags[i], &dma_buf_fd); + igt_assert_eq(errno, EINVAL); + errno = 0; + } + + /* Close gem object before priming */ + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + gem_close(fd, handle); + prime_handle_to_fd_no_assert(handle, DRM_CLOEXEC, &dma_buf_fd); + igt_assert(dma_buf_fd == -1 && errno == ENOENT); + errno = 0; + + /* close fd before mapping */ + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + close(dma_buf_fd); + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr == MAP_FAILED && errno == EBADF); + errno = 0; + gem_close(fd, handle); + + /* Map too big */ + handle = gem_create(fd, BO_SIZE); + fill_bo(handle, BO_SIZE); + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + ptr = mmap(NULL, BO_SIZE * 2, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr == MAP_FAILED && errno == EINVAL); + errno = 0; + close(dma_buf_fd); + gem_close(fd, handle); + + /* Overlapping the end of the buffer */ + handle = gem_create(fd, BO_SIZE); + dma_buf_fd = prime_handle_to_fd(fd, handle); + igt_assert(errno == 0); + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, BO_SIZE / 2); + igt_assert(ptr == MAP_FAILED && errno == EINVAL); + errno = 0; + close(dma_buf_fd); + gem_close(fd, handle); +} + +/* Test for invalid flags on sync ioctl */ +static void +test_invalid_sync_flags(void) +{ + int i, dma_buf_fd; + uint32_t handle; + struct local_dma_buf_sync sync; + int invalid_flags[] = {-1, + 0x00, + LOCAL_DMA_BUF_SYNC_RW + 1, + LOCAL_DMA_BUF_SYNC_VALID_FLAGS_MASK + 1}; + + handle = gem_create(fd, BO_SIZE); + dma_buf_fd = prime_handle_to_fd(fd, handle); + for (i = 0; i < sizeof(invalid_flags) / sizeof(invalid_flags[0]); i++) { + memset(&sync, 0, sizeof(sync)); + sync.flags = invalid_flags[i]; + + drmIoctl(dma_buf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync); + igt_assert_eq(errno, EINVAL); + errno = 0; + } +} + +static void +test_aperture_limit(void) +{ + int dma_buf_fd1, dma_buf_fd2; + char *ptr1, *ptr2; + uint32_t handle1, handle2; + /* Two buffers the sum of which > mappable aperture */ + uint64_t size1 = (gem_mappable_aperture_size() * 7) / 8; + uint64_t size2 = (gem_mappable_aperture_size() * 3) / 8; + + handle1 = gem_create(fd, size1); + fill_bo(handle1, BO_SIZE); + + dma_buf_fd1 = prime_handle_to_fd(fd, handle1); + igt_assert(errno == 0); + ptr1 = mmap(NULL, size1, PROT_READ, MAP_SHARED, dma_buf_fd1, 0); + igt_assert(ptr1 != MAP_FAILED); + igt_assert(memcmp(ptr1, pattern, sizeof(pattern)) == 0); + + handle2 = gem_create(fd, size1); + fill_bo(handle2, BO_SIZE); + dma_buf_fd2 = prime_handle_to_fd(fd, handle2); + igt_assert(errno == 0); + ptr2 = mmap(NULL, size2, PROT_READ, MAP_SHARED, dma_buf_fd2, 0); + igt_assert(ptr2 != MAP_FAILED); + igt_assert(memcmp(ptr2, pattern, sizeof(pattern)) == 0); + + igt_assert(memcmp(ptr1, ptr2, BO_SIZE) == 0); + + munmap(ptr1, size1); + munmap(ptr2, size2); + close(dma_buf_fd1); + close(dma_buf_fd2); + gem_close(fd, handle1); + gem_close(fd, handle2); +} + +static int +check_for_dma_buf_mmap(void) +{ + int dma_buf_fd; + char *ptr; + uint32_t handle; + int ret = 1; + + handle = gem_create(fd, BO_SIZE); + dma_buf_fd = prime_handle_to_fd(fd, handle); + ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); + if (ptr != MAP_FAILED) + ret = 0; + munmap(ptr, BO_SIZE); + gem_close(fd, handle); + close(dma_buf_fd); + return ret; +} + +igt_main +{ + struct { + const char *name; + void (*fn)(void); + } tests[] = { + { "test_correct", test_correct }, + { "test_map_unmap", test_map_unmap }, + { "test_reprime", test_reprime }, + { "test_forked", test_forked }, + { "test_correct_cpu_write", test_correct_cpu_write }, + { "test_forked_cpu_write", test_forked_cpu_write }, + { "test_refcounting", test_refcounting }, + { "test_dup", test_dup }, + { "test_userptr", test_userptr }, + { "test_errors", test_errors }, + { "test_invalid_sync_flags", test_invalid_sync_flags }, + { "test_aperture_limit", test_aperture_limit }, + }; + int i; + + igt_fixture { + fd = drm_open_driver(DRIVER_INTEL); + igt_skip_on((check_for_dma_buf_mmap() != 0)); + errno = 0; + } + + + for (i = 0; i < ARRAY_SIZE(tests); i++) { + igt_subtest(tests[i].name) + tests[i].fn(); + } + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/prime_mmap_coherency.c intel-gpu-tools-1.14/tests/prime_mmap_coherency.c --- intel-gpu-tools-1.13/tests/prime_mmap_coherency.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/prime_mmap_coherency.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,246 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Tiago Vignatti + */ + +/** @file prime_mmap_coherency.c + * + * TODO: need to show the need for prime_sync_end(). + */ + +#include "igt.h" + +IGT_TEST_DESCRIPTION("Test dma-buf mmap on !llc platforms mostly and provoke" + " coherency bugs so we know for sure where we need the sync ioctls."); + +#define ROUNDS 20 + +int fd; +int stale = 0; +static drm_intel_bufmgr *bufmgr; +struct intel_batchbuffer *batch; +static int width = 1024, height = 1024; + +/* + * Exercises the need for read flush: + * 1. create a BO and write '0's, in GTT domain. + * 2. read BO using the dma-buf CPU mmap. + * 3. write '1's, in GTT domain. + * 4. read again through the mapped dma-buf. + */ +static void test_read_flush(bool expect_stale_cache) +{ + drm_intel_bo *bo_1; + drm_intel_bo *bo_2; + uint32_t *ptr_cpu; + uint32_t *ptr_gtt; + int dma_buf_fd, i; + + if (expect_stale_cache) + igt_require(!gem_has_llc(fd)); + + bo_1 = drm_intel_bo_alloc(bufmgr, "BO 1", width * height * 4, 4096); + + /* STEP #1: put the BO 1 in GTT domain. We use the blitter to copy and fill + * zeros to BO 1, so commands will be submitted and likely to place BO 1 in + * the GTT domain. */ + bo_2 = drm_intel_bo_alloc(bufmgr, "BO 2", width * height * 4, 4096); + intel_copy_bo(batch, bo_1, bo_2, width * height); + gem_sync(fd, bo_1->handle); + drm_intel_bo_unreference(bo_2); + + /* STEP #2: read BO 1 using the dma-buf CPU mmap. This dirties the CPU caches. */ + dma_buf_fd = prime_handle_to_fd_for_mmap(fd, bo_1->handle); + igt_skip_on(errno == EINVAL); + + ptr_cpu = mmap(NULL, width * height, PROT_READ | PROT_WRITE, + MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr_cpu != MAP_FAILED); + + for (i = 0; i < (width * height) / 4; i++) + igt_assert_eq(ptr_cpu[i], 0); + + /* STEP #3: write 0x11 into BO 1. */ + bo_2 = drm_intel_bo_alloc(bufmgr, "BO 2", width * height * 4, 4096); + ptr_gtt = gem_mmap__gtt(fd, bo_2->handle, width * height, PROT_READ | PROT_WRITE); + memset(ptr_gtt, 0x11, width * height); + munmap(ptr_gtt, width * height); + + intel_copy_bo(batch, bo_1, bo_2, width * height); + gem_sync(fd, bo_1->handle); + drm_intel_bo_unreference(bo_2); + + /* STEP #4: read again using the CPU mmap. Doing #1 before #3 makes sure we + * don't do a full CPU cache flush in step #3 again. That makes sure all the + * stale cachelines from step #2 survive (mostly, a few will be evicted) + * until we try to read them again in step #4. This behavior could be fixed + * by flush CPU read right before accessing the CPU pointer */ + if (!expect_stale_cache) + prime_sync_start(dma_buf_fd, false); + + for (i = 0; i < (width * height) / 4; i++) + if (ptr_cpu[i] != 0x11111111) { + igt_warn_on_f(!expect_stale_cache, + "Found 0x%08x at offset 0x%08x\n", ptr_cpu[i], i); + stale++; + } + + drm_intel_bo_unreference(bo_1); + munmap(ptr_cpu, width * height); +} + +/* + * Exercises the need for write flush: + * 1. create BO 1 and write '0's, in GTT domain. + * 2. write '1's into BO 1 using the dma-buf CPU mmap. + * 3. copy BO 1 to new BO 2, in GTT domain. + * 4. read via dma-buf mmap BO 2. + */ +static void test_write_flush(bool expect_stale_cache) +{ + drm_intel_bo *bo_1; + drm_intel_bo *bo_2; + uint32_t *ptr_cpu; + uint32_t *ptr2_cpu; + int dma_buf_fd, dma_buf2_fd, i; + + if (expect_stale_cache) + igt_require(!gem_has_llc(fd)); + + bo_1 = drm_intel_bo_alloc(bufmgr, "BO 1", width * height * 4, 4096); + + /* STEP #1: Put the BO 1 in GTT domain. We use the blitter to copy and fill + * zeros to BO 1, so commands will be submitted and likely to place BO 1 in + * the GTT domain. */ + bo_2 = drm_intel_bo_alloc(bufmgr, "BO 2", width * height * 4, 4096); + intel_copy_bo(batch, bo_1, bo_2, width * height); + gem_sync(fd, bo_1->handle); + drm_intel_bo_unreference(bo_2); + + /* STEP #2: Write '1's into BO 1 using the dma-buf CPU mmap. */ + dma_buf_fd = prime_handle_to_fd_for_mmap(fd, bo_1->handle); + igt_skip_on(errno == EINVAL); + + ptr_cpu = mmap(NULL, width * height, PROT_READ | PROT_WRITE, + MAP_SHARED, dma_buf_fd, 0); + igt_assert(ptr_cpu != MAP_FAILED); + + /* This is the main point of this test: !llc hw requires a cache write + * flush right here (explained in step #4). */ + if (!expect_stale_cache) + prime_sync_start(dma_buf_fd, true); + + memset(ptr_cpu, 0x11, width * height); + + /* STEP #3: Copy BO 1 into BO 2, using blitter. */ + bo_2 = drm_intel_bo_alloc(bufmgr, "BO 2", width * height * 4, 4096); + intel_copy_bo(batch, bo_2, bo_1, width * height); + gem_sync(fd, bo_2->handle); + + /* STEP #4: compare BO 2 against written BO 1. In !llc hardware, there + * should be some cache lines that didn't get flushed out and are still 0, + * requiring cache flush before the write in step 2. */ + dma_buf2_fd = prime_handle_to_fd_for_mmap(fd, bo_2->handle); + igt_skip_on(errno == EINVAL); + + ptr2_cpu = mmap(NULL, width * height, PROT_READ | PROT_WRITE, + MAP_SHARED, dma_buf2_fd, 0); + igt_assert(ptr2_cpu != MAP_FAILED); + + for (i = 0; i < (width * height) / 4; i++) + if (ptr2_cpu[i] != 0x11111111) { + igt_warn_on_f(!expect_stale_cache, + "Found 0x%08x at offset 0x%08x\n", ptr2_cpu[i], i); + stale++; + } + + drm_intel_bo_unreference(bo_1); + drm_intel_bo_unreference(bo_2); + munmap(ptr_cpu, width * height); +} + +int main(int argc, char **argv) +{ + int i; + bool expect_stale_cache; + igt_subtest_init(argc, argv); + + igt_fixture { + fd = drm_open_driver(DRIVER_INTEL); + + bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); + batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd)); + } + + /* Cache coherency and the eviction are pretty much unpredictable, so + * reproducing boils down to trial and error to hit different scenarios. + * TODO: We may want to improve tests a bit by picking random subranges. */ + igt_info("%d rounds for each test\n", ROUNDS); + igt_subtest("read") { + stale = 0; + expect_stale_cache = false; + igt_info("exercising read flush\n"); + for (i = 0; i < ROUNDS; i++) + test_read_flush(expect_stale_cache); + igt_fail_on_f(stale, "num of stale cache lines %d\n", stale); + } + + /* Only for !llc platforms */ + igt_subtest("read-and-fail") { + stale = 0; + expect_stale_cache = true; + igt_info("exercising read flush and expect to fail on !llc\n"); + for (i = 0; i < ROUNDS; i++) + test_read_flush(expect_stale_cache); + igt_fail_on_f(!stale, "couldn't find any stale cache lines\n"); + } + + igt_subtest("write") { + stale = 0; + expect_stale_cache = false; + igt_info("exercising write flush\n"); + for (i = 0; i < ROUNDS; i++) + test_write_flush(expect_stale_cache); + igt_fail_on_f(stale, "num of stale cache lines %d\n", stale); + } + + /* Only for !llc platforms */ + igt_subtest("write-and-fail") { + stale = 0; + expect_stale_cache = true; + igt_info("exercising write flush and expect to fail on !llc\n"); + for (i = 0; i < ROUNDS; i++) + test_write_flush(expect_stale_cache); + igt_fail_on_f(!stale, "couldn't find any stale cache lines\n"); + } + + igt_fixture { + intel_batchbuffer_free(batch); + drm_intel_bufmgr_destroy(bufmgr); + + close(fd); + } + + igt_exit(); +} diff -Nru intel-gpu-tools-1.13/tests/prime_self_import.c intel-gpu-tools-1.14/tests/prime_self_import.c --- intel-gpu-tools-1.13/tests/prime_self_import.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/prime_self_import.c 2016-03-01 15:59:21.000000000 +0000 @@ -47,7 +47,7 @@ #include "drm.h" IGT_TEST_DESCRIPTION("Check whether prime import/export works on the same" - " device."); + " device... but with different fds."); #define BO_SIZE (16*1024) @@ -157,7 +157,7 @@ dma_buf_fd2 = prime_handle_to_fd(fd2, handle_open); handle_import = prime_fd_to_handle(fd2, dma_buf_fd2); - /* dma-buf selfimporting an flink bo should give the same handle */ + /* dma-buf self importing an flink bo should give the same handle */ igt_assert_eq_u32(handle_import, handle_open); close(fd1); @@ -211,21 +211,6 @@ check_bo(fd2, handle_import1, fd2, handle_import1); } -static int get_object_count(void) -{ - FILE *file; - int ret, scanned; - - igt_drop_caches_set(DROP_RETIRE | DROP_ACTIVE); - - file = igt_debugfs_fopen("i915_gem_objects", "r"); - - scanned = fscanf(file, "%i objects", &ret); - igt_assert_eq(scanned, 1); - - return ret; -} - static void *thread_fn_reimport_vs_close(void *p) { struct drm_gem_close close_bo; @@ -258,8 +243,7 @@ * up the counts */ fake = drm_open_driver(DRIVER_INTEL); - gem_quiescent_gpu(fake); - obj_count = get_object_count(); + obj_count = igt_get_stable_obj_count(fake); num_threads = sysconf(_SC_NPROCESSORS_ONLN); @@ -290,8 +274,7 @@ close(fds[0]); close(fds[1]); - gem_quiescent_gpu(fake); - obj_count = get_object_count() - obj_count; + obj_count = igt_get_stable_obj_count(fake) - obj_count; igt_info("leaked %i objects\n", obj_count); @@ -350,8 +333,7 @@ * up the counts */ fake = drm_open_driver(DRIVER_INTEL); - gem_quiescent_gpu(fake); - obj_count = get_object_count(); + obj_count = igt_get_stable_obj_count(fake); fd = drm_open_driver(DRIVER_INTEL); @@ -373,8 +355,7 @@ close(fd); - gem_quiescent_gpu(fake); - obj_count = get_object_count() - obj_count; + obj_count = igt_get_stable_obj_count(fake) - obj_count; igt_info("leaked %i objects\n", obj_count); diff -Nru intel-gpu-tools-1.13/tests/sysfs_l3_parity intel-gpu-tools-1.14/tests/sysfs_l3_parity --- intel-gpu-tools-1.13/tests/sysfs_l3_parity 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/sysfs_l3_parity 2016-03-01 15:59:21.000000000 +0000 @@ -5,7 +5,7 @@ if ! find /sys/class/drm/card*/ | grep l3_parity > /dev/null ; then echo "no l3_parity interface, skipping test" - exit 77 + exit $IGT_EXIT_SKIP fi $SOURCE_DIR/../tools/intel_l3_parity -r 0 -b 0 -s 0 -e @@ -15,7 +15,7 @@ disabled=`$SOURCE_DIR/../tools/intel_l3_parity -l | grep -c 'Row 0, Bank 0, Subbank 0 is disabled'` if [ "$disabled" != "1" ] ; then echo "Fail" - exit 1 + exit $IGT_EXIT_FAILURE fi $SOURCE_DIR/../tools/intel_l3_parity -r 0 -b 0 -s 0 -e @@ -23,5 +23,5 @@ #Check that we can clear remaps if [ `$SOURCE_DIR/../tools/intel_l3_parity -l | wc -l` != 1 ] ; then echo "Fail 2" - exit 1 + exit $IGT_EXIT_FAILURE fi diff -Nru intel-gpu-tools-1.13/tests/testdisplay.c intel-gpu-tools-1.14/tests/testdisplay.c --- intel-gpu-tools-1.13/tests/testdisplay.c 2015-11-30 16:26:23.000000000 +0000 +++ intel-gpu-tools-1.14/tests/testdisplay.c 2016-03-01 15:59:21.000000000 +0000 @@ -132,7 +132,8 @@ for (i = 0; i < mode_resources->count_connectors; i++) { drmModeConnector *connector; - connector = drmModeGetConnector(drmfd, mode_resources->connectors[i]); + connector = drmModeGetConnectorCurrent(drmfd, + mode_resources->connectors[i]); if (!connector) { igt_warn("could not get connector %i: %s\n", mode_resources->connectors[i], strerror(errno)); continue; @@ -190,12 +191,19 @@ static void connector_find_preferred_mode(uint32_t connector_id, unsigned long crtc_idx_mask, - int mode_num, struct connector *c) + int mode_num, struct connector *c, + bool probe) { struct kmstest_connector_config config; + bool ret; - if (!kmstest_get_connector_config(drm_fd, connector_id, crtc_idx_mask, - &config)) { + if (probe) + ret = kmstest_probe_connector_config(drm_fd, connector_id, + crtc_idx_mask, &config); + else + ret = kmstest_get_connector_config(drm_fd, connector_id, + crtc_idx_mask, &config); + if (!ret) { c->mode_valid = 0; return; } @@ -258,8 +266,6 @@ double max_width; int i; - igt_paint_test_pattern(cr, l_width, l_height); - cairo_move_to(cr, l_width / 2, l_height / 2); /* Print connector and mode name */ @@ -352,9 +358,9 @@ width = c->mode.hdisplay; height = c->mode.vdisplay; - fb_id = igt_create_fb(drm_fd, width, height, - igt_bpp_depth_to_drm_format(bpp, depth), - tiling, &fb_info[current_fb]); + fb_id = igt_create_pattern_fb(drm_fd, width, height, + igt_bpp_depth_to_drm_format(bpp, depth), + tiling, &fb_info[current_fb]); paint_output_info(c, &fb_info[current_fb]); paint_color_key(&fb_info[current_fb]); @@ -457,7 +463,7 @@ * Each connector has a corresponding encoder, except in the SDVO case * where an encoder may have multiple connectors. */ -int update_display(void) +int update_display(bool probe) { struct connector *connectors; int c; @@ -489,7 +495,7 @@ connector_find_preferred_mode(connector->id, crtc_idx_mask, specified_mode_num, - connector); + connector, probe); if (!connector->mode_valid) continue; @@ -514,7 +520,7 @@ connector_find_preferred_mode(connector->id, -1UL, specified_mode_num, - connector); + connector, probe); if (!connector->mode_valid) continue; @@ -766,7 +772,7 @@ ret = 0; - if (!update_display()) { + if (!update_display(false)) { ret = 1; goto out_stdio; } diff -Nru intel-gpu-tools-1.13/tests/testdisplay.h intel-gpu-tools-1.14/tests/testdisplay.h --- intel-gpu-tools-1.13/tests/testdisplay.h 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/tests/testdisplay.h 2016-03-01 15:59:21.000000000 +0000 @@ -32,4 +32,4 @@ void testdisplay_cleanup_hotplug(void); /* called by the hotplug code */ -int update_display(void); +int update_display(bool probe); diff -Nru intel-gpu-tools-1.13/tests/testdisplay_hotplug.c intel-gpu-tools-1.14/tests/testdisplay_hotplug.c --- intel-gpu-tools-1.13/tests/testdisplay_hotplug.c 2015-11-30 16:15:31.000000000 +0000 +++ intel-gpu-tools-1.14/tests/testdisplay_hotplug.c 2016-03-01 15:59:21.000000000 +0000 @@ -59,7 +59,7 @@ if (memcmp(&s.st_rdev, &udev_devnum, sizeof(dev_t)) == 0 && hotplug && atoi(hotplug) == 1) - update_display(); + update_display(true); udev_device_unref(dev); out: diff -Nru intel-gpu-tools-1.13/tests/test_rte_check intel-gpu-tools-1.14/tests/test_rte_check --- intel-gpu-tools-1.13/tests/test_rte_check 2015-08-06 15:22:11.000000000 +0000 +++ intel-gpu-tools-1.14/tests/test_rte_check 2016-03-01 15:59:21.000000000 +0000 @@ -3,4 +3,4 @@ SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" . $SOURCE_DIR/drm_lib.sh -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/tools_test intel-gpu-tools-1.14/tests/tools_test --- intel-gpu-tools-1.13/tests/tools_test 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tests/tools_test 2016-03-01 15:59:21.000000000 +0000 @@ -12,5 +12,5 @@ # TODO: Add more tests -exit 0 +exit $IGT_EXIT_SUCCESS diff -Nru intel-gpu-tools-1.13/tests/vc4_create_bo.c intel-gpu-tools-1.14/tests/vc4_create_bo.c --- intel-gpu-tools-1.13/tests/vc4_create_bo.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/vc4_create_bo.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,89 @@ +/* + * Copyright © 2016 Broadcom + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "igt.h" +#include "igt_vc4.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "vc4_drm.h" + +igt_main +{ + int fd; + + igt_fixture { + fd = drm_open_driver(DRIVER_VC4); + } + + igt_subtest("create-bo-4096") { + int handle = igt_vc4_create_bo(fd, 4096); + gem_close(fd, handle); + } + + igt_subtest("create-bo-0") { + struct drm_vc4_create_bo arg = { + .size = 0, + }; + do_ioctl_err(fd, DRM_IOCTL_VC4_CREATE_BO, &arg, EINVAL); + } + + igt_subtest("create-bo-zeroed") { + int fd2 = drm_open_driver(DRIVER_VC4); + int handle; + uint32_t *map; + /* A size different from any used in our other tests, to try + * to convince it to land as the only one of its size in the + * kernel BO cache + */ + size_t size = 3 * 4096, i; + + /* Make a BO and free it on our main fd. */ + handle = igt_vc4_create_bo(fd, size); + map = igt_vc4_mmap_bo(fd, handle, size, PROT_READ | PROT_WRITE); + memset(map, 0xd0, size); + munmap(map, size); + gem_close(fd, handle); + + /* Now, allocate a BO on the other fd and make sure it doesn't + * have the old contents. + */ + handle = igt_vc4_create_bo(fd2, size); + map = igt_vc4_mmap_bo(fd2, handle, size, PROT_READ | PROT_WRITE); + for (i = 0; i < size / 4; i++) + igt_assert_eq_u32(map[i], 0x0); + munmap(map, size); + gem_close(fd2, handle); + + close(fd2); + } + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/vc4_wait_bo.c intel-gpu-tools-1.14/tests/vc4_wait_bo.c --- intel-gpu-tools-1.13/tests/vc4_wait_bo.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/vc4_wait_bo.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * Copyright © 2016 Broadcom + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "igt.h" +#include "igt_vc4.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "vc4_drm.h" + +static void +test_used_bo(int fd, uint64_t timeout) +{ + size_t size = 4096; + uint32_t clearval = 0xaabbccdd + timeout; + int handle = igt_vc4_get_cleared_bo(fd, size, clearval); + struct drm_vc4_wait_bo wait = { + .timeout_ns = timeout, + .handle = handle, + }; + int ret, i; + + ret = ioctl(fd, DRM_IOCTL_VC4_WAIT_BO, &wait); + if (timeout == ~0ull) { + igt_assert_eq_u32(ret, 0); + } else { + if (ret == -1 && errno == ETIME) + igt_debug("Timeout triggered\n"); + igt_assert(ret == 0 || (ret == -1 && errno == ETIME)); + } + + if (ret == 0) { + uint32_t *map = igt_vc4_mmap_bo(fd, handle, size, PROT_READ); + for (i = 0; i < size / 4; i++) { + igt_assert_eq_u32(map[i], clearval); + } + munmap((void *)map, size); + } + + gem_close(fd, handle); +} + +igt_main +{ + int fd; + int bo_handle; + + igt_fixture { + fd = drm_open_driver(DRIVER_VC4); + bo_handle = igt_vc4_create_bo(fd, 4096); + } + + igt_subtest("bad-bo") { + struct drm_vc4_wait_bo arg = { + .handle = bo_handle + 1, + .timeout_ns = 0, + }; + do_ioctl_err(fd, DRM_IOCTL_VC4_WAIT_BO, &arg, EINVAL); + } + + igt_subtest("bad-pad") { + struct drm_vc4_wait_bo arg = { + .pad = 1, + .handle = bo_handle, + .timeout_ns = 0, + }; + do_ioctl_err(fd, DRM_IOCTL_VC4_WAIT_BO, &arg, EINVAL); + } + + igt_subtest("unused-bo-0ns") { + struct drm_vc4_wait_bo arg = { + .handle = bo_handle, + .timeout_ns = 0, + }; + do_ioctl(fd, DRM_IOCTL_VC4_WAIT_BO, &arg); + } + + igt_subtest("unused-bo-1ns") { + struct drm_vc4_wait_bo arg = { + .handle = bo_handle, + .timeout_ns = 1, + }; + do_ioctl(fd, DRM_IOCTL_VC4_WAIT_BO, &arg); + } + + igt_subtest("used-bo-0ns") + test_used_bo(fd, 0); + + igt_subtest("used-bo-1ns") + test_used_bo(fd, 1); + + igt_subtest("used-bo") + test_used_bo(fd, ~0ull); + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/vc4_wait_seqno.c intel-gpu-tools-1.14/tests/vc4_wait_seqno.c --- intel-gpu-tools-1.13/tests/vc4_wait_seqno.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/vc4_wait_seqno.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Copyright © 2016 Broadcom + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "igt.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "vc4_drm.h" + +igt_main +{ + int fd; + + igt_fixture + fd = drm_open_driver(DRIVER_VC4); + + /* A 64-bit seqno should never hit the maximum value over the + * lifetime of the system. (A submit per 1000 cycles at 1Ghz + * would still take 584000 years). As a result, we can wait + * for it and be sure of a timeout. + */ + igt_subtest("bad-seqno-0ns") { + struct drm_vc4_wait_seqno arg = { + .seqno = ~0ull, + .timeout_ns = 0, + }; + do_ioctl_err(fd, DRM_IOCTL_VC4_WAIT_SEQNO, &arg, ETIME); + } + + igt_subtest("bad-seqno-1ns") { + struct drm_vc4_wait_seqno arg = { + .seqno = ~0ull, + .timeout_ns = 1, + }; + do_ioctl_err(fd, DRM_IOCTL_VC4_WAIT_SEQNO, &arg, ETIME); + } + + igt_fixture + close(fd); +} diff -Nru intel-gpu-tools-1.13/tests/ZZ_check_dmesg intel-gpu-tools-1.14/tests/ZZ_check_dmesg --- intel-gpu-tools-1.13/tests/ZZ_check_dmesg 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tests/ZZ_check_dmesg 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +if dmesg | grep '\*ERROR\*' > /dev/null ; then + echo "DRM_ERROR dirt in dmesg" + exit 1 +fi + +if dmesg | grep -- '------\[ cut here \]----' > /dev/null ; then + echo "found a backtrace in dmesg" + exit 1 +fi diff -Nru intel-gpu-tools-1.13/tools/Android.mk intel-gpu-tools-1.14/tools/Android.mk --- intel-gpu-tools-1.13/tools/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tools/Android.mk 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,72 @@ +LOCAL_PATH := $(call my-dir) + +include $(LOCAL_PATH)/Makefile.sources + +LOCAL_TOOLS_DIR := intel/validation/core/igt/tools + +#================# + +define add_tool + include $(CLEAR_VARS) + + ifeq ($($(1)_SOURCES),) + LOCAL_SRC_FILES := $1.c + else + LOCAL_SRC_FILES := $($(1)_SOURCES) + endif + + LOCAL_CFLAGS += -DHAVE_TERMIOS_H + LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM + LOCAL_CFLAGS += -DANDROID -UNDEBUG + LOCAL_CFLAGS += -std=gnu99 + # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit + LOCAL_CFLAGS += -Wno-error=return-type + # Excessive complaining for established cases. Rely on the Linux version warnings. + LOCAL_CFLAGS += -Wno-sign-compare + ifeq ($($(1)_LDFLAGS),) + else + LOCAL_LDFLAGS += $($(1)_LDFLAGS) + endif + + LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib + LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm + LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/zlib + + LOCAL_MODULE := $1_tool + LOCAL_MODULE_TAGS := optional + + LOCAL_STATIC_LIBRARIES := libintel_gpu_tools + + LOCAL_SHARED_LIBRARIES := libpciaccess \ + libdrm \ + libdrm_intel + + # Tools dir on host + LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR) + # Tools dir on target. + LOCAL_CFLAGS += -DPKGDATADIR=\"/system/vendor/$(LOCAL_TOOLS_DIR)\" + + include $(BUILD_EXECUTABLE) +endef + +#================# + +# Copy the register files +$(shell mkdir -p $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)/registers) +$(shell cp $(LOCAL_PATH)/registers/* $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)/registers) + + +skip_tools_list := \ + intel_framebuffer_dump \ + intel_reg_dumper \ + intel_vga_read \ + intel_vga_write + +ifneq ("${ANDROID_HAS_CAIRO}", "1") + skip_tools_list += intel_display_crc + skip_tools_list += intel_residency +endif + +tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS)) + +$(foreach item,$(tools_list),$(eval $(call add_tool,$(item)))) diff -Nru intel-gpu-tools-1.13/tools/aubdump.c intel-gpu-tools-1.14/tools/aubdump.c --- intel-gpu-tools-1.13/tools/aubdump.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tools/aubdump.c 2016-03-01 15:59:21.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -42,8 +43,11 @@ #include "intel_aub.h" #include "intel_chipset.h" -static int (*libc_close)(int fd); -static int (*libc_ioctl)(int fd, unsigned long request, void *argp); +static int close_init_helper(int fd); +static int ioctl_init_helper(int fd, unsigned long request, ...); + +static int (*libc_close)(int fd) = close_init_helper; +static int (*libc_ioctl)(int fd, unsigned long request, ...) = ioctl_init_helper; static int drm_fd = -1; static char *filename; @@ -106,7 +110,19 @@ vfprintf(stderr, format, args); va_end(args); - exit(1); + raise(SIGTRAP); +} + +static struct bo * +get_bo(uint32_t handle) +{ + struct bo *bo; + + fail_if(handle >= MAX_BO_COUNT, "bo handle too large\n"); + bo = &bos[handle]; + fail_if(bo->size == 0, "invalid bo handle (%d) in execbuf\n", handle); + + return bo; } static inline uint32_t @@ -262,7 +278,7 @@ handle = relocs[i].target_handle; dw = (uint32_t*)(((char *) relocated) + relocs[i].offset); - *dw = bos[handle].offset + relocs[i].delta; + *dw = get_bo(handle)->offset + relocs[i].delta; } return relocated; @@ -338,7 +354,7 @@ for (uint32_t i = 0; i < execbuffer2->buffer_count; i++) { obj = &exec_objects[i]; - bo = &bos[obj->handle]; + bo = get_bo(obj->handle); bo->offset = offset; offset = align_u32(offset + bo->size + 4095, 4096); @@ -348,10 +364,10 @@ fail_if(bo->map == MAP_FAILED, "intel_aubdump: bo mmap failed\n"); } - batch_bo = &bos[exec_objects[execbuffer2->buffer_count - 1].handle]; + batch_bo = get_bo(exec_objects[execbuffer2->buffer_count - 1].handle); for (uint32_t i = 0; i < execbuffer2->buffer_count; i++) { obj = &exec_objects[i]; - bo = &bos[obj->handle]; + bo = get_bo(obj->handle); if (obj->relocation_count > 0) data = relocate_bo(bo, execbuffer2, obj); @@ -390,7 +406,7 @@ static void remove_bo(int handle) { - struct bo *bo = &bos[handle]; + struct bo *bo = get_bo(handle); if (bo->map && !IS_USERPTR(bo->map)) munmap(bo->map, bo->size); @@ -527,7 +543,7 @@ } } -static void __attribute__ ((constructor)) +static void init(void) { const char *args = getenv("INTEL_AUBDUMP_ARGS"); @@ -552,6 +568,27 @@ fail_if(file == NULL, "intel_aubdump: failed to open file '%s'\n", filename); } +static int +close_init_helper(int fd) +{ + init(); + return libc_close(fd); +} + +static int +ioctl_init_helper(int fd, unsigned long request, ...) +{ + va_list args; + void *argp; + + va_start(args, request); + argp = va_arg(args, void *); + va_end(args); + + init(); + return libc_ioctl(fd, request, argp); +} + static void __attribute__ ((destructor)) fini(void) { diff -Nru intel-gpu-tools-1.13/tools/hsw_compute_wrpll.c intel-gpu-tools-1.14/tools/hsw_compute_wrpll.c --- intel-gpu-tools-1.13/tools/hsw_compute_wrpll.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tools/hsw_compute_wrpll.c 2016-03-01 15:59:21.000000000 +0000 @@ -642,7 +642,7 @@ wrpll_compute_rnp(ref->clock, &r2, &n2, &p); igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p, - "Computed value differs for %li Hz:\n"" Reference: (%u,%u,%u)\n"" Computed: (%u,%u,%u)\n", (int64_t)ref->clock * 1000, ref->r2, ref->n2, ref->p, r2, n2, p); + "Computed value differs for %"PRId64" Hz:\n"" Reference: (%u,%u,%u)\n"" Computed: (%u,%u,%u)\n", (int64_t)ref->clock * 1000, ref->r2, ref->n2, ref->p, r2, n2, p); } return 0; diff -Nru intel-gpu-tools-1.13/tools/intel_bios.h intel-gpu-tools-1.14/tools/intel_bios.h --- intel-gpu-tools-1.13/tools/intel_bios.h 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tools/intel_bios.h 2016-03-01 15:59:21.000000000 +0000 @@ -763,22 +763,31 @@ uint8_t data[0]; } __attribute__ ((packed)); -/* MIPI Sequnece Block definitions */ -enum MIPI_SEQ { - MIPI_SEQ_UNDEFINED = 0, +/* MIPI Sequence Block definitions */ +enum mipi_seq { + MIPI_SEQ_END = 0, MIPI_SEQ_ASSERT_RESET, MIPI_SEQ_INIT_OTP, MIPI_SEQ_DISPLAY_ON, MIPI_SEQ_DISPLAY_OFF, MIPI_SEQ_DEASSERT_RESET, + MIPI_SEQ_BACKLIGHT_ON, /* sequence block v2+ */ + MIPI_SEQ_BACKLIGHT_OFF, /* sequence block v2+ */ + MIPI_SEQ_TEAR_ON, /* sequence block v2+ */ + MIPI_SEQ_TEAR_OFF, /* sequence block v3+ */ + MIPI_SEQ_POWER_ON, /* sequence block v3+ */ + MIPI_SEQ_POWER_OFF, /* sequence block v3+ */ MIPI_SEQ_MAX }; -enum MIPI_SEQ_ELEMENT { - MIPI_SEQ_ELEM_UNDEFINED = 0, +enum mipi_seq_element { + MIPI_SEQ_ELEM_END = 0, MIPI_SEQ_ELEM_SEND_PKT, MIPI_SEQ_ELEM_DELAY, MIPI_SEQ_ELEM_GPIO, + MIPI_SEQ_ELEM_I2C, /* sequence block v2+ */ + MIPI_SEQ_ELEM_SPI, /* sequence block v3+ */ + MIPI_SEQ_ELEM_PMIC, /* sequence block v3+ */ MIPI_SEQ_ELEM_MAX }; diff -Nru intel-gpu-tools-1.13/tools/intel_bios_reader.c intel-gpu-tools-1.14/tools/intel_bios_reader.c --- intel-gpu-tools-1.13/tools/intel_bios_reader.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tools/intel_bios_reader.c 2016-03-01 15:59:21.000000000 +0000 @@ -65,37 +65,39 @@ #define YESNO(val) ((val) ? "yes" : "no") +/* This is not for mapping to memory layout. */ struct bdb_block { uint8_t id; - uint16_t size; - void *data; + uint32_t size; + const void *data; }; -static const char * const seq_name[] = { - "UNDEFINED", - "MIPI_SEQ_ASSERT_RESET", - "MIPI_SEQ_INIT_OTP", - "MIPI_SEQ_DISPLAY_ON", - "MIPI_SEQ_DISPLAY_OFF", - "MIPI_SEQ_DEASSERT_RESET", -}; - -struct bdb_header *bdb; -struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs; +const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs; static int tv_present; static int lvds_present; static int panel_type; -static struct bdb_block *find_section(int section_id, int length) +/* Get BDB block size given a pointer to Block ID. */ +static uint32_t _get_blocksize(const uint8_t *block_base) +{ + /* The MIPI Sequence Block v3+ has a separate size field. */ + if (*block_base == BDB_MIPI_SEQUENCE && *(block_base + 3) >= 3) + return *((const uint32_t *)(block_base + 4)); + else + return *((const uint16_t *)(block_base + 1)); +} + +static struct bdb_block *find_section(const struct bdb_header *bdb, + int section_id, int length) { struct bdb_block *block; - unsigned char *base = (unsigned char *)bdb; - int idx = 0; - uint16_t total, current_size; + const uint8_t *base = (const uint8_t *)bdb; + int index = 0; + uint32_t total, current_size; unsigned char current_id; /* skip to first section */ - idx += bdb->header_size; + index += bdb->header_size; total = bdb->bdb_size; if (total > length) total = length; @@ -107,29 +109,32 @@ } /* walk the sections looking for section_id */ - while (idx + 3 < total) { - current_id = *(base + idx); - current_size = *(uint16_t *)(base + idx + 1); - if (idx + current_size > total) + while (index + 3 < total) { + current_id = *(base + index); + current_size = _get_blocksize(base + index); + index += 3; + + if (index + current_size > total) return NULL; if (current_id == section_id) { block->id = current_id; block->size = current_size; - block->data = base + idx + 3; + block->data = base + index; return block; } - idx += current_size + 3; + index += current_size; } free(block); return NULL; } -static void dump_general_features(const struct bdb_block *block) +static void dump_general_features(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_general_features *features = block->data; + const struct bdb_general_features *features = block->data; printf("\tPanel fitting: "); switch (features->panel_fitting) { @@ -179,10 +184,11 @@ lvds_present = 1; /* should be based on IS_MOBILE() */ } -static void dump_backlight_info(const struct bdb_block *block) +static void dump_backlight_info(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_lvds_backlight *backlight = block->data; - struct blc_struct *blc; + const struct bdb_lvds_backlight *backlight = block->data; + const struct blc_struct *blc; if (sizeof(struct blc_struct) != backlight->blcstruct_size) { printf("\tBacklight struct sizes don't match (expected %zu, got %u), skipping\n", @@ -361,7 +367,8 @@ -static void dump_child_device(struct child_device_config *child) +static void dump_child_device(const struct bdb_header *bdb, + struct child_device_config *child) { char child_id[11]; @@ -399,9 +406,10 @@ } } -static void dump_general_definitions(const struct bdb_block *block) +static void dump_general_definitions(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_general_definitions *defs = block->data; + const struct bdb_general_definitions *defs = block->data; int i; int child_device_num; @@ -418,13 +426,14 @@ child_device_num = (block->size - sizeof(*defs)) / defs->child_dev_size; for (i = 0; i < child_device_num; i++) - dump_child_device((void*)&defs->devices[i * defs->child_dev_size]); + dump_child_device(bdb,(void*)&defs->devices[i * defs->child_dev_size]); } -static void dump_child_devices(const struct bdb_block *block) +static void dump_child_devices(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_child_devices *child_devs = block->data; - struct child_device_config *child; + const struct bdb_child_devices *child_devs = block->data; + const struct child_device_config *child; int i; for (i = 0; i < DEVICE_CHILD_SIZE; i++) { @@ -444,9 +453,10 @@ } } -static void dump_lvds_options(const struct bdb_block *block) +static void dump_lvds_options(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_lvds_options *options = block->data; + const struct bdb_lvds_options *options = block->data; panel_type = options->panel_type; printf("\tPanel type: %d\n", panel_type); @@ -460,9 +470,10 @@ printf("\tPFIT mode: %d\n", options->pfit_mode); } -static void dump_lvds_ptr_data(const struct bdb_block *block) +static void dump_lvds_ptr_data(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_lvds_lfp_data_ptrs *ptrs = block->data; + const struct bdb_lvds_lfp_data_ptrs *ptrs = block->data; printf("\tNumber of entries: %d\n", ptrs->lvds_entries); @@ -470,10 +481,11 @@ lvds_lfp_data_ptrs = ptrs; } -static void dump_lvds_data(const struct bdb_block *block) +static void dump_lvds_data(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_lvds_lfp_data *lvds_data = block->data; - struct bdb_lvds_lfp_data_ptrs *ptrs = lvds_lfp_data_ptrs; + const struct bdb_lvds_lfp_data *lvds_data = block->data; + const struct bdb_lvds_lfp_data_ptrs *ptrs = lvds_lfp_data_ptrs; int num_entries; int i; int hdisplay, hsyncstart, hsyncend, htotal; @@ -497,11 +509,11 @@ num_entries); for (i = 0; i < num_entries; i++) { - uint8_t *lfp_data_ptr = - (uint8_t *) lvds_data->data + lfp_data_size * i; - uint8_t *timing_data = lfp_data_ptr + dvo_offset; - struct bdb_lvds_lfp_data_entry *lfp_data = - (struct bdb_lvds_lfp_data_entry *)lfp_data_ptr; + const uint8_t *lfp_data_ptr = + (const uint8_t *) lvds_data->data + lfp_data_size * i; + const uint8_t *timing_data = lfp_data_ptr + dvo_offset; + const struct bdb_lvds_lfp_data_entry *lfp_data = + (const struct bdb_lvds_lfp_data_entry *)lfp_data_ptr; char marker; if (i == panel_type) @@ -542,9 +554,10 @@ } } -static void dump_driver_feature(const struct bdb_block *block) +static void dump_driver_feature(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_driver_feature *feature = block->data; + const struct bdb_driver_feature *feature = block->data; printf("\tBoot Device Algorithm: %s\n", feature->boot_dev_algorithm ? "driver default" : "os default"); @@ -608,9 +621,10 @@ feature->legacy_crt_max_refresh); } -static void dump_edp(const struct bdb_block *block) +static void dump_edp(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_edp *edp = block->data; + const struct bdb_edp *edp = block->data; int bpp, msa; int i; @@ -709,7 +723,7 @@ } static void -print_detail_timing_data(struct lvds_dvo_timing2 *dvo_timing) +print_detail_timing_data(const struct lvds_dvo_timing2 *dvo_timing) { int display, sync_start, sync_end, total; @@ -737,9 +751,10 @@ printf("\tclock: %d\n", dvo_timing->clock * 10); } -static void dump_sdvo_panel_dtds(const struct bdb_block *block) +static void dump_sdvo_panel_dtds(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct lvds_dvo_timing2 *dvo_timing = block->data; + const struct lvds_dvo_timing2 *dvo_timing = block->data; int n, count; count = block->size / sizeof(struct lvds_dvo_timing2); @@ -749,9 +764,10 @@ } } -static void dump_sdvo_lvds_options(const struct bdb_block *block) +static void dump_sdvo_lvds_options(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_sdvo_lvds_options *options = block->data; + const struct bdb_sdvo_lvds_options *options = block->data; printf("\tbacklight: %d\n", options->panel_backlight); printf("\th40 type: %d\n", options->h40_set_panel_type); @@ -770,11 +786,12 @@ printf("\tmisc[3]: %x\n", options->panel_misc_bits_4); } -static void dump_mipi_config(const struct bdb_block *block) +static void dump_mipi_config(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_mipi_config *start = block->data; - struct mipi_config *config; - struct mipi_pps_data *pps; + const struct bdb_mipi_config *start = block->data; + const struct mipi_config *config; + const struct mipi_pps_data *pps; config = &start->config[panel_type]; pps = &start->pps[panel_type]; @@ -852,183 +869,318 @@ printf("\tMIPI PPS\n"); printf("\t\tPanel power ON delay: %d\n", pps->panel_on_delay); - printf("\t\tPanel power on to Baklight enable delay: %d\n", pps->bl_enable_delay); + printf("\t\tPanel power on to Backlight enable delay: %d\n", pps->bl_enable_delay); printf("\t\tBacklight disable to Panel power OFF delay: %d\n", pps->bl_disable_delay); printf("\t\tPanel power OFF delay: %d\n", pps->panel_off_delay); printf("\t\tPanel power cycle delay: %d\n", pps->panel_power_cycle_delay); } -static uint8_t *mipi_dump_send_packet(uint8_t *data) +static const uint8_t *mipi_dump_send_packet(const uint8_t *data) { - uint8_t type, byte, count; - uint16_t len; + uint8_t flags, type; + uint16_t len, i; - byte = *data++; - /* get packet type and increment the pointer */ + flags = *data++; type = *data++; - len = *((uint16_t *) data); data += 2; - printf("\t\t SEND COMMAND: "); - printf("0x%x 0x%x 0x%x", byte, type, len); - for (count = 0; count < len; count++) - printf(" 0x%x",*(data+count)); + + printf("\t\tSend DCS: Port %s, VC %d, %s, Type %02x, Length %u, Data", + (flags >> 3) & 1 ? "C" : "A", + (flags >> 1) & 3, + flags & 1 ? "HS" : "LP", + type, + len); + for (i = 0; i < len; i++) + printf(" %02x", *data++); printf("\n"); - data += len; + return data; } -static uint8_t *mipi_dump_delay(uint8_t *data) +static const uint8_t *mipi_dump_delay(const uint8_t *data) +{ + printf("\t\tDelay: %u us\n", *((const uint32_t *)data)); + + return data + 4; +} + +static const uint8_t *mipi_dump_gpio(const uint8_t *data) { - printf("\t\t Delay : 0x%x 0x%x 0x%x 0x%x\n", data[0], data[1], data[2], data[3]); - data += 4; + uint8_t index, flags; + + index = *data++; + flags = *data++; + + printf("\t\tGPIO index %u, source %d, set %d\n", + index, + (flags >> 1) & 3, + flags & 1); + return data; } -static uint8_t *mipi_dump_gpio(uint8_t *data) +static const uint8_t *mipi_dump_i2c(const uint8_t *data) { - uint8_t gpio, action; + uint8_t flags, index, bus, offset, len, i; + uint16_t address; - printf("\t\t GPIO value:"); - gpio = *data++; + flags = *data++; + index = *data++; + bus = *data++; + address = *((uint16_t *) data); + data += 2; + offset = *data++; + len = *data++; + + printf("\t\tSend I2C: Flags %02x, Index %02x, Bus %02x, Address %04x, Offset %02x, Length %u, Data", + flags, index, bus, address, offset, len); + for (i = 0; i < len; i++) + printf(" %02x", *data++); + printf("\n"); - /* pull up/down */ - action = *data++; - printf(" 0x%x 0x%x\n", gpio, action); return data; } -typedef uint8_t * (*fn_mipi_elem_dump)(uint8_t *data); +typedef const uint8_t * (*fn_mipi_elem_dump)(const uint8_t *data); static const fn_mipi_elem_dump dump_elem[] = { - NULL, /* reserved */ - mipi_dump_send_packet, - mipi_dump_delay, - mipi_dump_gpio, - NULL, /* status read; later */ + [MIPI_SEQ_ELEM_SEND_PKT] = mipi_dump_send_packet, + [MIPI_SEQ_ELEM_DELAY] = mipi_dump_delay, + [MIPI_SEQ_ELEM_GPIO] = mipi_dump_gpio, + [MIPI_SEQ_ELEM_I2C] = mipi_dump_i2c, }; -static void dump_sequence(uint8_t *sequence) +static const char * const seq_name[] = { + [MIPI_SEQ_ASSERT_RESET] = "MIPI_SEQ_ASSERT_RESET", + [MIPI_SEQ_INIT_OTP] = "MIPI_SEQ_INIT_OTP", + [MIPI_SEQ_DISPLAY_ON] = "MIPI_SEQ_DISPLAY_ON", + [MIPI_SEQ_DISPLAY_OFF] = "MIPI_SEQ_DISPLAY_OFF", + [MIPI_SEQ_DEASSERT_RESET] = "MIPI_SEQ_DEASSERT_RESET", + [MIPI_SEQ_BACKLIGHT_ON] = "MIPI_SEQ_BACKLIGHT_ON", + [MIPI_SEQ_BACKLIGHT_OFF] = "MIPI_SEQ_BACKLIGHT_OFF", + [MIPI_SEQ_TEAR_ON] = "MIPI_SEQ_TEAR_ON", + [MIPI_SEQ_TEAR_OFF] = "MIPI_SEQ_TEAR_OFF", + [MIPI_SEQ_POWER_ON] = "MIPI_SEQ_POWER_ON", + [MIPI_SEQ_POWER_OFF] = "MIPI_SEQ_POWER_OFF", +}; + +static const char *sequence_name(enum mipi_seq seq_id) { - uint8_t *data = sequence; - fn_mipi_elem_dump mipi_elem_dump; - int index_no; + if (seq_id < ARRAY_SIZE(seq_name) && seq_name[seq_id]) + return seq_name[seq_id]; + else + return "(unknown)"; +} - if (!sequence) - return; +static const uint8_t *dump_sequence(const uint8_t *data, uint8_t seq_version) +{ + fn_mipi_elem_dump mipi_elem_dump; - printf("\tSequence Name: %s\n", seq_name[*data]); + printf("\tSequence %u - %s\n", *data, sequence_name(*data)); - /* go to the first element of the sequence */ + /* Skip Sequence Byte. */ data++; - /* parse each byte till we reach end of sequence byte - 0x00 */ + /* Skip Size of Sequence. */ + if (seq_version >= 3) + data += 4; + while (1) { - index_no = *data; - mipi_elem_dump = dump_elem[index_no]; - if (!mipi_elem_dump) { - printf("Error: Unsupported MIPI element, skipping sequence execution\n"); - return; + uint8_t operation_byte = *data++; + uint8_t operation_size = 0; + + if (operation_byte == MIPI_SEQ_ELEM_END) + break; + + if (operation_byte < ARRAY_SIZE(dump_elem)) + mipi_elem_dump = dump_elem[operation_byte]; + else + mipi_elem_dump = NULL; + + /* Size of Operation. */ + if (seq_version >= 3) + operation_size = *data++; + + if (mipi_elem_dump) { + data = mipi_elem_dump(data); + } else if (operation_size) { + /* We have size, skip. */ + data += operation_size; + } else { + /* No size, can't skip without parsing. */ + printf("Error: Unsupported MIPI element %u\n", + operation_byte); + return NULL; } - /* goto element payload */ - data++; + } - /* execute the element specifc rotines */ - data = mipi_elem_dump(data); + return data; +} - /* - * After processing the element, data should point to - * next element or end of sequence - * check if have we reached end of sequence - */ +/* Find the sequence block and size for the given panel. */ +static const uint8_t * +find_panel_sequence_block(const struct bdb_mipi_sequence *sequence, + uint16_t panel_id, uint32_t total, uint32_t *seq_size) +{ + const uint8_t *data = &sequence->data[0]; + uint8_t current_id; + uint32_t current_size; + int header_size = sequence->version >= 3 ? 5 : 3; + int index = 0; + int i; - if (*data == 0x00) - break; + /* skip new block size */ + if (sequence->version >= 3) + data += 4; + + for (i = 0; i < MAX_MIPI_CONFIGURATIONS && index < total; i++) { + if (index + header_size > total) { + fprintf(stderr, "Invalid sequence block (header)\n"); + return NULL; + } + + current_id = *(data + index); + if (sequence->version >= 3) + current_size = *((const uint32_t *)(data + index + 1)); + else + current_size = *((const uint16_t *)(data + index + 1)); + + index += header_size; + + if (index + current_size > total) { + fprintf(stderr, "Invalid sequence block\n"); + return NULL; + } + + if (current_id == panel_id) { + *seq_size = current_size; + return data + index; + } + + index += current_size; } + + fprintf(stderr, "Sequence block detected but no valid configuration\n"); + + return NULL; } -static uint8_t *goto_next_sequence(uint8_t *data, int *size) +static int goto_next_sequence(const uint8_t *data, int index, int total) { uint16_t len; - int tmp = *size; - - if (--tmp < 0) - return NULL; - /* goto first element */ - data++; - while (1) { - switch (*data) { + /* Skip Sequence Byte. */ + for (index = index + 1; index < total; index += len) { + uint8_t operation_byte = *(data + index); + index++; + + switch (operation_byte) { + case MIPI_SEQ_ELEM_END: + return index; case MIPI_SEQ_ELEM_SEND_PKT: - /* - * skip by this element payload size - * skip elem id, command flag and data type - */ - tmp -= 5; - if (tmp < 0) - return NULL; - - data += 3; - len = *((uint16_t *)data); - - tmp -= len; - if (tmp < 0) - return NULL; + if (index + 4 > total) + return 0; - /* skip by len */ - data = data + 2 + len; + len = *((const uint16_t *)(data + index + 2)) + 4; break; case MIPI_SEQ_ELEM_DELAY: - /* skip by elem id, and delay is 4 bytes */ - tmp -= 5; - if (tmp < 0) - return NULL; - - data += 5; + len = 4; break; case MIPI_SEQ_ELEM_GPIO: - tmp -= 3; - if (tmp < 0) - return NULL; - - data += 3; + len = 2; + break; + case MIPI_SEQ_ELEM_I2C: + if (index + 7 > total) + return 0; + len = *(data + index + 6) + 7; break; default: - printf("Unknown element\n"); - return NULL; - } + fprintf(stderr, "Unknown operation byte\n"); + return 0; + } + } - /* end of sequence ? */ - if (*data == 0) - break; - } + return 0; +} + +static int goto_next_sequence_v3(const uint8_t *data, int index, int total) +{ + int seq_end; + uint16_t len; + uint32_t size_of_sequence; - /* goto next sequence or end of block byte */ - if (--tmp < 0) - return NULL; + /* + * Could skip sequence based on Size of Sequence alone, but also do some + * checking on the structure. + */ + if (total < 5) { + fprintf(stderr, "Too small sequence size\n"); + return 0; + } - data++; + /* Skip Sequence Byte. */ + index++; - /* update amount of data left for the sequence block to be parsed */ - *size = tmp; - return data; -} + /* + * Size of Sequence. Excludes the Sequence Byte and the size itself, + * includes MIPI_SEQ_ELEM_END byte, excludes the final MIPI_SEQ_END + * byte. + */ + size_of_sequence = *((const uint32_t *)(data + index)); + index += 4; -static uint16_t get_blocksize(void *p) -{ - uint16_t *block_ptr, block_size; + seq_end = index + size_of_sequence; + if (seq_end > total) { + fprintf(stderr, "Invalid sequence size\n"); + return 0; + } + + for (; index < total; index += len) { + uint8_t operation_byte = *(data + index); + index++; + + if (operation_byte == MIPI_SEQ_ELEM_END) { + if (index != seq_end) { + fprintf(stderr, "Invalid element structure\n"); + return 0; + } + return index; + } + + len = *(data + index); + index++; - block_ptr = (uint16_t *)((char *)p - 2); - block_size = *block_ptr; - return block_size; + /* + * FIXME: Would be nice to check elements like for v1/v2 in + * goto_next_sequence() above. + */ + switch (operation_byte) { + case MIPI_SEQ_ELEM_SEND_PKT: + case MIPI_SEQ_ELEM_DELAY: + case MIPI_SEQ_ELEM_GPIO: + case MIPI_SEQ_ELEM_I2C: + case MIPI_SEQ_ELEM_SPI: + case MIPI_SEQ_ELEM_PMIC: + break; + default: + fprintf(stderr, "Unknown operation byte %u\n", + operation_byte); + break; + } + } + + return 0; } -static void dump_mipi_sequence(const struct bdb_block *block) +static void dump_mipi_sequence(const struct bdb_header *bdb, + const struct bdb_block *block) { - struct bdb_mipi_sequence *sequence = block->data; - uint8_t *data, *seq_data; - int i, panel_id, seq_size; - uint16_t block_size; + const struct bdb_mipi_sequence *sequence = block->data; + const uint8_t *data; + uint32_t seq_size; + int index = 0, i; + const uint8_t *sequence_ptrs[MIPI_SEQ_MAX] = {}; /* Check if we have sequence block as well */ if (!sequence) { @@ -1036,85 +1188,49 @@ return; } - block_size = get_blocksize(sequence); + printf("\tSequence block version v%u\n", sequence->version); - /* - * parse the sequence block for individual sequences - */ - seq_data = &sequence->data[0]; + /* Fail gracefully for forward incompatible sequence block. */ + if (sequence->version >= 4) { + fprintf(stderr, "Unable to parse MIPI Sequence Block v%u\n", + sequence->version); + return; + } - /* - * sequence block is variable length and hence we need to parse and - * get the sequence data for specific panel id - */ - for (i = 0; i < MAX_MIPI_CONFIGURATIONS; i++) { - panel_id = *seq_data; - seq_size = *((uint16_t *) (seq_data + 1)); - if (panel_id == panel_type) + data = find_panel_sequence_block(sequence, panel_type, + block->size, &seq_size); + if (!data) + return; + + /* Parse the sequences. Corresponds to VBT parsing in the kernel. */ + for (;;) { + uint8_t seq_id = *(data + index); + if (seq_id == MIPI_SEQ_END) break; - /* skip the sequence including seq header of 3 bytes */ - seq_data = seq_data + 3 + seq_size; - if ((seq_data - &sequence->data[0]) > block_size) { - printf("Sequence start is beyond sequence block size, corrupted sequence block\n"); + if (seq_id >= MIPI_SEQ_MAX) { + fprintf(stderr, "Unknown sequence %u\n", seq_id); return; } - } - if (i == MAX_MIPI_CONFIGURATIONS) { - printf("Sequence block detected but no valid configuration\n"); - return; - } - - /* check if found sequence is completely within the sequence block - * just being paranoid */ - if (seq_size > block_size) { - printf("Corrupted sequence/size, bailing out\n"); - return; - } + sequence_ptrs[seq_id] = data + index; - /* skip the panel id(1 byte) and seq size(2 bytes) */ - data = (uint8_t *) calloc(1, seq_size); - if (data) - memmove(data, seq_data + 3, seq_size); - else { - printf("Memory not allocated for sequence data\n"); - return; + if (sequence->version >= 3) + index = goto_next_sequence_v3(data, index, seq_size); + else + index = goto_next_sequence(data, index, seq_size); + if (!index) { + fprintf(stderr, "Invalid sequence %u\n", seq_id); + return; + } } - /* - * loop into the sequence data and split into multiple sequneces - * There are only 5 types of sequences as of now - */ - /* two consecutive 0x00 indicate end of all sequences */ - while (1) { - int seq_id = *data; - if (MIPI_SEQ_MAX > seq_id && seq_id > MIPI_SEQ_UNDEFINED) - dump_sequence(data); - else { - printf("Error:undefined sequence\n"); - goto err; - } - - /* partial parsing to skip elements */ - data = goto_next_sequence(data, &seq_size); - - if (data == NULL) { - printf("Sequence elements going beyond block itself. Sequence block parsing failed\n"); - goto err; - } - - if (*data == 0) - break; /* end of sequence reached */ - } - return; - -err: - free(data); - data = NULL; + /* Dump the sequences. Corresponds to sequence execution in kernel. */ + for (i = 0; i < ARRAY_SIZE(sequence_ptrs); i++) + if (sequence_ptrs[i]) + dump_sequence(sequence_ptrs[i], sequence->version); } - static int get_device_id(unsigned char *bios, int size) { @@ -1138,7 +1254,8 @@ struct dumper { uint8_t id; const char *name; - void (*dump)(const struct bdb_block *block); + void (*dump)(const struct bdb_header *bdb, + const struct bdb_block *block); }; struct dumper dumpers[] = { @@ -1212,7 +1329,7 @@ static void hex_dump(const struct bdb_block *block) { int i; - uint8_t *p = block->data; + const uint8_t *p = block->data; for (i = 0; i < block->size; i++) { if (i % 16 == 0) @@ -1230,7 +1347,7 @@ printf("\n\n"); } -static void dump_section(int section_id, int size) +static void dump_section(const struct bdb_header *bdb, int section_id, int size) { struct dumper *dumper = NULL; const struct bdb_block *block; @@ -1241,7 +1358,7 @@ return; done[section_id] = 1; - block = find_section(section_id, size); + block = find_section(bdb, section_id, size); if (!block) return; @@ -1259,7 +1376,7 @@ hex_dump(block); if (dumper && dumper->dump) - dumper->dump(block); + dumper->dump(bdb, block); printf("\n"); } @@ -1272,6 +1389,7 @@ struct stat finfo; int size; struct bdb_block *block; + struct bdb_header *bdb; char signature[17]; char *devid_string; @@ -1354,7 +1472,7 @@ printf("Available sections: "); for (i = 0; i < 256; i++) { - block = find_section(i, size); + block = find_section(bdb, i, size); if (!block) continue; printf("%d ", i); @@ -1367,24 +1485,24 @@ if (devid == -1) printf("Warning: could not find PCI device ID!\n"); - dump_section(BDB_GENERAL_FEATURES, size); - dump_section(BDB_GENERAL_DEFINITIONS, size); - dump_section(BDB_CHILD_DEVICE_TABLE, size); - dump_section(BDB_LVDS_OPTIONS, size); - dump_section(BDB_LVDS_LFP_DATA_PTRS, size); - dump_section(BDB_LVDS_LFP_DATA, size); - dump_section(BDB_LVDS_BACKLIGHT, size); - - dump_section(BDB_SDVO_LVDS_OPTIONS, size); - dump_section(BDB_SDVO_PANEL_DTDS, size); - - dump_section(BDB_DRIVER_FEATURES, size); - dump_section(BDB_EDP, size); - dump_section(BDB_MIPI_CONFIG, size); - dump_section(BDB_MIPI_SEQUENCE, size); + dump_section(bdb, BDB_GENERAL_FEATURES, size); + dump_section(bdb, BDB_GENERAL_DEFINITIONS, size); + dump_section(bdb, BDB_CHILD_DEVICE_TABLE, size); + dump_section(bdb, BDB_LVDS_OPTIONS, size); + dump_section(bdb, BDB_LVDS_LFP_DATA_PTRS, size); + dump_section(bdb, BDB_LVDS_LFP_DATA, size); + dump_section(bdb, BDB_LVDS_BACKLIGHT, size); + + dump_section(bdb, BDB_SDVO_LVDS_OPTIONS, size); + dump_section(bdb, BDB_SDVO_PANEL_DTDS, size); + + dump_section(bdb, BDB_DRIVER_FEATURES, size); + dump_section(bdb, BDB_EDP, size); + dump_section(bdb, BDB_MIPI_CONFIG, size); + dump_section(bdb, BDB_MIPI_SEQUENCE, size); for (i = 0; i < 256; i++) - dump_section(i, size); + dump_section(bdb, i, size); return 0; } diff -Nru intel-gpu-tools-1.13/tools/intel_error_decode.c intel-gpu-tools-1.14/tools/intel_error_decode.c --- intel-gpu-tools-1.13/tools/intel_error_decode.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tools/intel_error_decode.c 2016-03-01 15:59:21.000000000 +0000 @@ -51,6 +51,7 @@ #include #include #include +#include #include "intel_chipset.h" #include "intel_io.h" @@ -433,45 +434,131 @@ } #define MAX_RINGS 10 /* I really hope this never... */ -uint32_t head[MAX_RINGS]; -int head_ndx = 0; -int num_rings = 0; -static void print_batch(int is_batch, const char *ring_name, uint32_t gtt_offset) -{ - const char *buffer_type[2] = { "ringbuffer", "batchbuffer" }; - if (is_batch || !num_rings) - printf("%s (%s) at 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset); - else - printf("%s (%s) at 0x%08x; HEAD points to: 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset, head[head_ndx++ % num_rings] + gtt_offset); -} -static void decode(struct drm_intel_decode *ctx, bool is_batch, - const char *ring_name, uint32_t gtt_offset, uint32_t *data, +static void decode(struct drm_intel_decode *ctx, + const char *buffer_name, + const char *ring_name, + uint64_t gtt_offset, + uint32_t head_offset, + uint32_t *data, int *count) { if (!*count) return; - print_batch(is_batch, ring_name, gtt_offset); + printf("%s (%s) at 0x%08x_%08x", buffer_name, ring_name, + (unsigned)(gtt_offset >> 32), + (unsigned)(gtt_offset & 0xffffffff)); + if (head_offset != -1) + printf("; HEAD points to: 0x%08x_%08x", + (unsigned)((head_offset + gtt_offset) >> 32), + (unsigned)((head_offset + gtt_offset) & 0xffffffff)); + printf("\n"); + drm_intel_decode_set_batch_pointer(ctx, data, gtt_offset, *count); drm_intel_decode(ctx); *count = 0; } +static int zlib_inflate(uint32_t **ptr, int len) +{ + struct z_stream_s zstream; + void *out; + + memset(&zstream, 0, sizeof(zstream)); + + zstream.next_in = (unsigned char *)*ptr; + zstream.avail_in = 4*len; + + if (inflateInit(&zstream) != Z_OK) + return 0; + + out = malloc(128*4096); /* approximate obj size */ + zstream.next_out = out; + zstream.avail_out = 40*len; + + do { + switch (inflate(&zstream, Z_SYNC_FLUSH)) { + case Z_STREAM_END: + goto end; + case Z_OK: + break; + default: + inflateEnd(&zstream); + return 0; + } + + if (zstream.avail_out) + break; + + out = realloc(out, 2*zstream.total_out); + if (out == NULL) { + inflateEnd(&zstream); + return 0; + } + + zstream.next_out = (unsigned char *)out + zstream.total_out; + zstream.avail_out = zstream.total_out; + } while (1); +end: + inflateEnd(&zstream); + free(*ptr); + *ptr = out; + return zstream.total_out / 4; +} + +static int ascii85_decode(const char *in, uint32_t **out) +{ + int len = 0, size = 1024; + + *out = realloc(*out, sizeof(uint32_t)*size); + if (*out == NULL) + return 0; + + while (*in >= '!' && *in <= 'z') { + uint32_t v = 0; + + if (len == size) { + size *= 2; + *out = realloc(*out, sizeof(uint32_t)*size); + if (*out == NULL) + return 0; + } + + if (*in == 'z') { + in++; + } else { + v += in[0] - 33; v *= 85; + v += in[1] - 33; v *= 85; + v += in[2] - 33; v *= 85; + v += in[3] - 33; v *= 85; + v += in[4] - 33; + in += 5; + } + (*out)[len++] = v; + } + + return zlib_inflate(out, len); +} + static void read_data_file(FILE *file) { struct drm_intel_decode *decode_ctx = NULL; uint32_t devid = PCI_CHIP_I855_GM; uint32_t *data = NULL; + uint32_t head[MAX_RINGS]; + int head_idx = 0; + int num_rings = 0; long long unsigned fence; int data_size = 0, count = 0, line_number = 0, matched; char *line = NULL; size_t line_size; uint32_t offset, value, ring_length = 0; - uint32_t gtt_offset = 0, new_gtt_offset; + uint64_t gtt_offset = 0, new_gtt_offset; + uint32_t head_offset = -1; + const char *buffer_name = "batch buffer"; char *ring_name = NULL; - int is_batch = 1; while (getline(&line, &line_size, file) > 0) { char *dashes; @@ -479,44 +566,99 @@ dashes = strstr(line, "---"); if (dashes) { + uint32_t lo, hi; char *new_ring_name = malloc(dashes - line); strncpy(new_ring_name, line, dashes - line); new_ring_name[dashes - line - 1] = '\0'; - if (num_rings == -1) - num_rings = head_ndx; + matched = sscanf(dashes, "--- gtt_offset = 0x%08x %08x\n", + &hi, &lo); + if (matched > 0) { + new_gtt_offset = hi; + if (matched == 2) { + new_gtt_offset <<= 32; + new_gtt_offset |= lo; + } + + decode(decode_ctx, + buffer_name, ring_name, + gtt_offset, head_offset, + data, &count); + gtt_offset = new_gtt_offset; + head_offset = -1; + free(ring_name); + ring_name = new_ring_name; + buffer_name = "batch buffer"; + continue; + } - matched = sscanf(dashes, "--- gtt_offset = 0x%08x\n", - &new_gtt_offset); - if (matched == 1) { - decode(decode_ctx, is_batch, ring_name, - gtt_offset, data, &count); + matched = sscanf(dashes, "--- ringbuffer = 0x%08x %08x\n", + &hi, &lo); + if (matched > 0) { + new_gtt_offset = hi; + if (matched == 2) { + new_gtt_offset <<= 32; + new_gtt_offset |= lo; + } + + decode(decode_ctx, + buffer_name, ring_name, + gtt_offset, head_offset, + data, &count); gtt_offset = new_gtt_offset; - is_batch = 1; + if (head_idx < num_rings) + head_offset = head[head_idx++]; + else + head_offset = -1; free(ring_name); ring_name = new_ring_name; + buffer_name = "ring buffer"; continue; } - matched = sscanf(dashes, "--- ringbuffer = 0x%08x\n", - &new_gtt_offset); - if (matched == 1) { - decode(decode_ctx, is_batch, ring_name, - gtt_offset, data, &count); + matched = sscanf(dashes, "--- HW Context = 0x%08x %08x\n", + &hi, &lo); + if (matched > 0) { + new_gtt_offset = hi; + if (matched == 2) { + new_gtt_offset <<= 32; + new_gtt_offset |= lo; + } + + decode(decode_ctx, + buffer_name, ring_name, + gtt_offset, head_offset, + data, &count); gtt_offset = new_gtt_offset; - is_batch = 0; + head_offset = -1; free(ring_name); ring_name = new_ring_name; + buffer_name = "HW Context"; continue; } } + if (line[0] == ':') { + count = ascii85_decode(line+1, &data); + if (count == 0) { + fprintf(stderr, "ASCII85 decode failed.\n"); + exit(1); + } + decode(decode_ctx, + buffer_name, ring_name, + gtt_offset, head_offset, + data, &count); + continue; + } + matched = sscanf(line, "%08x : %08x", &offset, &value); if (matched != 2) { unsigned int reg, reg2; /* display reg section is after the ringbuffers, don't mix them */ - decode(decode_ctx, is_batch, ring_name, gtt_offset, + decode(decode_ctx, + buffer_name, ring_name, + gtt_offset, head_offset, data, &count); printf("%s", line); @@ -597,7 +739,10 @@ data[count-1] = value; } - decode(decode_ctx, is_batch, ring_name, gtt_offset, data, &count); + decode(decode_ctx, + buffer_name, ring_name, + gtt_offset, head_offset, + data, &count); free(data); free(line); diff -Nru intel-gpu-tools-1.13/tools/intel_firmware_decode.c intel-gpu-tools-1.14/tools/intel_firmware_decode.c --- intel-gpu-tools-1.13/tools/intel_firmware_decode.c 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tools/intel_firmware_decode.c 2016-03-01 15:59:21.000000000 +0000 @@ -25,6 +25,7 @@ */ #include +#include #include #include #include @@ -166,7 +167,7 @@ ctx->fd, 0); igt_fail_on_f(ctx->base == MAP_FAILED, "Couldn't mmap %s\n", filename); - printf("Firmware: %s (%zd bytes)\n", filename, st.st_size); + printf("Firmware: %s (%"PRId64" bytes)\n", filename, (int64_t)st.st_size); ctx->css_header = (struct intel_css_header *)ctx->base; ctx->package_header = (struct intel_package_header *) diff -Nru intel-gpu-tools-1.13/tools/intel_gpu_top.c intel-gpu-tools-1.14/tools/intel_gpu_top.c --- intel-gpu-tools-1.13/tools/intel_gpu_top.c 2015-08-17 17:17:55.000000000 +0000 +++ intel-gpu-tools-1.14/tools/intel_gpu_top.c 2016-03-01 15:59:21.000000000 +0000 @@ -679,7 +679,7 @@ for (i = 0; i < MAX_NUM_TOP_BITS; i++) { if (i < STATS_COUNT && HAS_STATS_REGS(devid)) { - fprintf(output, "%lu\t", + fprintf(output, "%"PRIu64"\t", stats[i] - last_stats[i]); last_stats[i] = stats[i]; } diff -Nru intel-gpu-tools-1.13/tools/intel_opregion_decode.c intel-gpu-tools-1.14/tools/intel_opregion_decode.c --- intel-gpu-tools-1.13/tools/intel_opregion_decode.c 2015-08-17 17:17:55.000000000 +0000 +++ intel-gpu-tools-1.14/tools/intel_opregion_decode.c 2016-03-01 15:59:21.000000000 +0000 @@ -122,7 +122,9 @@ uint8_t fdss[8]; uint32_t fdsp; uint32_t stat; - uint8_t rsvd[86]; + uint64_t rvda; /* Physical address of raw vbt data */ + uint32_t rvds; /* Size of raw vbt data */ + uint8_t rsvd[58]; } __attribute__((packed)); /* OpRegion mailbox #4: VBT */ @@ -308,6 +310,8 @@ printf("\tfdsp:\t0x%08x\n", asle->fdsp); printf("\tstat:\t0x%08x\n", asle->stat); + printf("\trvda:\t0x%016lx\n", asle->rvda); + printf("\trvds:\t0x%08x\n", asle->rvds); printf("\n"); } diff -Nru intel-gpu-tools-1.13/tools/intel_residency.c intel-gpu-tools-1.14/tools/intel_residency.c --- intel-gpu-tools-1.13/tools/intel_residency.c 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tools/intel_residency.c 2016-03-01 15:59:21.000000000 +0000 @@ -0,0 +1,713 @@ +/* + * Copyright © 2016 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: Paulo Zanoni + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "igt.h" + +#define IA32_TIME_STAMP_COUNTER 0x10 + +#define MSR_PKG_CST_CONFIG_CONTROL 0xE2 +#define PKG_CST_LIMIT_MASK 0x7 +#define PKG_CST_LIMIT_C0 0x0 +#define PKG_CST_LIMIT_C2 0x1 +#define PKG_CST_LIMIT_C3 0x2 +#define PKG_CST_LIMIT_C6 0x3 +#define PKG_CST_LIMIT_C7 0x4 +#define PKG_CST_LIMIT_C7s 0x5 +#define PKG_CST_NO_LIMIT 0x7 + +#define MSR_PKG_C2_RESIDENCY 0x60D +#define MSR_PKG_C3_RESIDENCY 0x3F8 +#define MSR_PKG_C6_RESIDENCY 0x3F9 +#define MSR_PKG_C7_RESIDENCY 0x3FA +#define MSR_PKG_C8_RESIDENCY 0x630 +#define MSR_PKG_C9_RESIDENCY 0x631 +#define MSR_PKG_C10_RESIDENCY 0x632 + +#define NUM_PC_STATES 7 + +const char *res_msr_names[] = { + "PC2", "PC3", "PC6", "PC7", "PC8", "PC9", "PC10" +}; + +const uint32_t res_msr_addrs[] = { + MSR_PKG_C2_RESIDENCY, + MSR_PKG_C3_RESIDENCY, + MSR_PKG_C6_RESIDENCY, + MSR_PKG_C7_RESIDENCY, + MSR_PKG_C8_RESIDENCY, + MSR_PKG_C9_RESIDENCY, + MSR_PKG_C10_RESIDENCY, +}; + +int msr_fd; + +uint32_t deepest_pc_state; +uint64_t idle_res; + +#define MAX_CONNECTORS 32 +#define MAX_PLANES 32 +struct { + int fd; + drmModeResPtr res; + drmModeConnectorPtr connectors[MAX_CONNECTORS]; + drm_intel_bufmgr *bufmgr; +} drm; + +struct { + uint32_t crtc_id; + uint32_t connector_id; + drmModeModeInfoPtr mode; +} modeset; + +int vblank_interval_us; +struct igt_fb fbs[2], cursor, *front_fb, *back_fb; + +struct { + int draw_size; + bool do_page_flip; + bool do_draw; + bool do_draw_and_flip; + int res_warm_time; + int res_calc_time; + int loop_inc; + char *test_name; +} opts = { + .draw_size = 0, + .do_page_flip = true, + .do_draw = true, + .do_draw_and_flip = true, + .res_warm_time = 1, + .res_calc_time = 4, + .loop_inc = 2, + .test_name = NULL, +}; + +static uint64_t msr_read(uint32_t addr) +{ + int rc; + uint64_t ret; + + rc = pread(msr_fd, &ret, sizeof(uint64_t), addr); + igt_assert(rc == sizeof(ret)); + + return ret; +} + +static void setup_msr(void) +{ +#if 0 + uint64_t control; + const char *limit; +#endif + + /* Make sure our Kernel supports MSR and the module is loaded. */ + igt_assert(system("modprobe -q msr > /dev/null 2>&1") != -1); + + msr_fd = open("/dev/cpu/0/msr", O_RDONLY); + igt_assert_f(msr_fd >= 0, + "Can't open /dev/cpu/0/msr.\n"); + +#if 0 + /* FIXME: why is this code not printing the truth? */ + control = msr_read(MSR_PKG_CST_CONFIG_CONTROL); + printf("Control: 0x016%" PRIx64 "\n", control); + switch (control & PKG_CST_LIMIT_MASK) { + case PKG_CST_LIMIT_C0: + limit = "C0"; + break; + case PKG_CST_LIMIT_C2: + limit = "C2"; + break; + case PKG_CST_LIMIT_C3: + limit = "C3"; + break; + case PKG_CST_LIMIT_C6: + limit = "C6"; + break; + case PKG_CST_LIMIT_C7: + limit = "C7"; + break; + case PKG_CST_LIMIT_C7s: + limit = "C7s"; + break; + case PKG_CST_NO_LIMIT: + limit = "no limit"; + break; + default: + limit = "unknown"; + break; + } + printf("Package C state limit: %s\n", limit); +#endif +} + +static void teardown_msr(void) +{ + close(msr_fd); +} + +static void setup_drm(void) +{ + int i; + + drm.fd = drm_open_driver_master(DRIVER_INTEL); + + drm.res = drmModeGetResources(drm.fd); + igt_assert(drm.res->count_connectors <= MAX_CONNECTORS); + + for (i = 0; i < drm.res->count_connectors; i++) + drm.connectors[i] = drmModeGetConnector(drm.fd, + drm.res->connectors[i]); + + drm.bufmgr = drm_intel_bufmgr_gem_init(drm.fd, 4096); + igt_assert(drm.bufmgr); + drm_intel_bufmgr_gem_enable_reuse(drm.bufmgr); +} + +static void teardown_drm(void) +{ + int i; + + drm_intel_bufmgr_destroy(drm.bufmgr); + + for (i = 0; i < drm.res->count_connectors; i++) + drmModeFreeConnector(drm.connectors[i]); + + drmModeFreeResources(drm.res); + close(drm.fd); +} + +static void draw_rect(struct igt_fb *fb, enum igt_draw_method method, + uint32_t color) +{ + drmModeClip clip; + int rc; + + switch (opts.draw_size) { + case 0: + clip.x1 = fb->width / 2 - 32; + clip.x2 = fb->width / 2 + 32; + clip.y1 = fb->height / 2 - 32; + clip.y2 = fb->height / 2 + 32; + break; + case 1: + clip.x1 = fb->width / 4; + clip.x2 = fb->width / 4 + fb->width / 2; + clip.y1 = fb->height / 4; + clip.y2 = fb->height / 4 + fb->height / 2; + break; + case 2: + clip.x1 = 0; + clip.x2 = fb->width; + clip.y1 = 0; + clip.y2 = fb->height; + break; + default: + igt_assert(false); + } + + igt_draw_rect_fb(drm.fd, drm.bufmgr, NULL, fb, method, clip.x1, clip.y1, + clip.x2 - clip.x1, clip.y2 - clip.y1, color); + + if (method == IGT_DRAW_MMAP_WC) { + rc = drmModeDirtyFB(drm.fd, fb->fb_id, &clip, 1); + igt_assert(rc == 0 || rc == -ENOSYS); + } +} + +static void setup_modeset(void) +{ + int i; + + for (i = 0; i < drm.res->count_connectors; i++) { + drmModeConnectorPtr c = drm.connectors[i]; + + if (c->connection == DRM_MODE_CONNECTED && + c->count_modes > 0) { + modeset.connector_id = c->connector_id; + modeset.mode = &c->modes[0]; + break; + } + } + igt_assert(i < drm.res->count_connectors); + + modeset.crtc_id = drm.res->crtcs[0]; + + for (i = 0; i < 2; i++) { + igt_create_fb(drm.fd, modeset.mode->hdisplay, + modeset.mode->vdisplay, DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, &fbs[i]); + igt_draw_fill_fb(drm.fd, &fbs[i], 0x80); + } + draw_rect(&fbs[1], IGT_DRAW_BLT, 0x800000); + + igt_create_fb(drm.fd, 64, 64, DRM_FORMAT_ARGB8888, + LOCAL_DRM_FORMAT_MOD_NONE, &cursor); + igt_draw_fill_fb(drm.fd, &cursor, 0xFF008000); +} + +static void teardown_modeset(void) +{ + igt_remove_fb(drm.fd, &fbs[0]); + igt_remove_fb(drm.fd, &fbs[1]); + igt_remove_fb(drm.fd, &cursor); +} + +static void setup_vblank_interval(void) +{ + uint64_t vrefresh, interval; + + vrefresh = ((uint64_t) modeset.mode->clock * 1000 * 1000) / + (modeset.mode->htotal * modeset.mode->vtotal); + interval = 1000000000 / vrefresh; + + vblank_interval_us = interval; + + printf("Interval between vblanks:\t%dus\n", vblank_interval_us); +} + +bool alarm_received; +static void alarm_handler(int signal) +{ + alarm_received = true; +} + +static void setup_alarm(void) +{ + struct sigaction sa; + + sa.sa_handler = alarm_handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sigaction(SIGALRM, &sa, NULL); +} + +static void set_alarm(time_t sec, suseconds_t usec) +{ + struct itimerval timerval = {{0, 0}, {sec, usec}}; + + alarm_received = false; + igt_assert(setitimer(ITIMER_REAL, &timerval, NULL) == 0); +} + +static void unset_mode(void) +{ + int rc; + + kmstest_unset_all_crtcs(drm.fd, drm.res); + rc = drmModeSetCursor(drm.fd, modeset.crtc_id, 0, 0, 0); + igt_assert(rc == 0); +} + +static void set_mode(void) +{ + int rc; + + front_fb = &fbs[0]; + back_fb = &fbs[1]; + rc = drmModeSetCrtc(drm.fd, modeset.crtc_id, front_fb->fb_id, 0, 0, + &modeset.connector_id, 1, modeset.mode); + igt_assert(rc == 0); + + /* TODO: it seems we need a cursor in order to reach PC7 on BDW. Why? */ + rc = drmModeMoveCursor(drm.fd, modeset.crtc_id, 0, 0); + igt_assert(rc == 0); + + rc = drmModeSetCursor(drm.fd, modeset.crtc_id, cursor.gem_handle, + cursor.width, cursor.height); + igt_assert(rc == 0); +} + +static void wait_vblanks(int n_vblanks) +{ + drmVBlank vblank; + + if (!n_vblanks) + return; + + vblank.request.type = DRM_VBLANK_RELATIVE; + vblank.request.sequence = n_vblanks; + vblank.request.signal = 0; + drmWaitVBlank(drm.fd, &vblank); +} + +static void page_flip(void) +{ + struct igt_fb *tmp_fb; + int rc; + + rc = drmModePageFlip(drm.fd, modeset.crtc_id, back_fb->fb_id, 0, NULL); + igt_assert(rc == 0); + + tmp_fb = front_fb; + front_fb = back_fb; + back_fb = tmp_fb; +} + +static void wait_until_idle(void) +{ + uint64_t tsc, pc, res; + + do { + set_alarm(0, 500 * 1000); + + tsc = msr_read(IA32_TIME_STAMP_COUNTER); + pc = msr_read(deepest_pc_state); + + while (!alarm_received) + pause(); + + pc = msr_read(deepest_pc_state) - pc; + tsc = msr_read(IA32_TIME_STAMP_COUNTER) - tsc; + + res = pc * 100 / tsc; + + /*printf("res:%02"PRIu64"\n", res);*/ + } while (res < idle_res && idle_res - res > 3); + + if (res > idle_res && res - idle_res > 3) + fprintf(stderr, "The calculated idle residency may be too low " + "(got %02"PRIu64"%%)\n", res); +} + +static uint64_t do_measurement(void (*callback)(void *ptr), void *ptr) +{ + uint64_t tsc, pc; + + wait_until_idle(); + + set_alarm(opts.res_warm_time, 0); + callback(ptr); + + set_alarm(opts.res_calc_time, 0); + + tsc = msr_read(IA32_TIME_STAMP_COUNTER); + pc = msr_read(deepest_pc_state); + + callback(ptr); + + pc = msr_read(deepest_pc_state) - pc; + tsc = msr_read(IA32_TIME_STAMP_COUNTER) - tsc; + + return pc * 100 / tsc; +} + +static void setup_idle(void) +{ + uint64_t tsc, pc[NUM_PC_STATES], res, best_res; + int pc_i, best_pc_i = 0, retries, consecutive_not_best; + + for (retries = 0; ; retries++) { + + set_alarm(opts.res_warm_time, 0); + while (!alarm_received) + pause(); + + set_alarm(opts.res_calc_time, 0); + + tsc = msr_read(IA32_TIME_STAMP_COUNTER); + for (pc_i = best_pc_i; pc_i < NUM_PC_STATES; pc_i++) + pc[pc_i] = msr_read(res_msr_addrs[pc_i]); + + while (!alarm_received) + pause(); + + for (pc_i = best_pc_i; pc_i < NUM_PC_STATES; pc_i++) + pc[pc_i] = msr_read(res_msr_addrs[pc_i]) - pc[pc_i]; + tsc = msr_read(IA32_TIME_STAMP_COUNTER) - tsc; + + for (pc_i = NUM_PC_STATES -1; pc_i >= best_pc_i; pc_i--) + if (pc[pc_i] != 0) + break; + igt_require_f(pc_i >= 0, "We're not reaching any PC states!\n"); + + res = pc[pc_i] * 100 / tsc; + + if (retries == 0 || pc_i > best_pc_i || res > best_res) { + best_pc_i = pc_i; + best_res = res; + consecutive_not_best = 0; + } else { + consecutive_not_best++; + if (consecutive_not_best > 2) + break; + } + } + + deepest_pc_state = res_msr_addrs[best_pc_i]; + idle_res = best_res; + + printf("Stable idle residency retries:\t%d\n", retries); + printf("Deepest PC state reached when idle:\t%s\n", + res_msr_names[best_pc_i]); + printf("Idle residency for this state:\t%02"PRIu64"%%\n", idle_res); +} + +static void print_result(int ops, int vblanks, uint64_t res) +{ + printf("- %02d ops every %02d vblanks:\t%02"PRIu64"%%\n", + ops, vblanks, res); + fflush(stdout); +} + +struct page_flip_data { + int n_vblanks; +}; + +static void page_flip_cb(void *ptr) +{ + struct page_flip_data *data = ptr; + + while (!alarm_received) { + page_flip(); + wait_vblanks(data->n_vblanks); + } +} + +static void page_flip_test(void) +{ + struct page_flip_data data; + int n_vblanks; + uint64_t res; + + printf("\nPage flip test:\n"); + + for (n_vblanks = 1; n_vblanks <= 64; n_vblanks *= opts.loop_inc) { + data.n_vblanks = n_vblanks; + res = do_measurement(page_flip_cb, &data); + print_result(1, n_vblanks, res); + } +} + +struct draw_data { + enum igt_draw_method method; + int n_vblanks; + int ops_per_vblank; +}; + +static void draw_cb(void *ptr) +{ + struct draw_data *data = ptr; + struct timespec req; + int i, ops; + + req.tv_sec = 0; + req.tv_nsec = vblank_interval_us * 1000 / data->ops_per_vblank; + + for (i = 0; !alarm_received; i++) { + for (ops = 0; ops < data->ops_per_vblank; ops++) { + draw_rect(front_fb, data->method, i << 8); + + /* The code that stops the callbacks relies on SIGALRM, + * so we have to use nanosleep since it doesn't use + * signals. */ + if (data->ops_per_vblank > 1) + nanosleep(&req, NULL); + } + + if (data->n_vblanks) + wait_vblanks(data->n_vblanks); + } +} + +static void draw_test(void) +{ + struct draw_data data; + enum igt_draw_method method; + int i; + uint64_t res; + + for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) { + data.method = method; + + printf("\nDraw %s test:\n", + igt_draw_get_method_name(method)); + + data.n_vblanks = 0; + for (i = 32; i >= 2; i /= opts.loop_inc) { + data.ops_per_vblank = i; + res = do_measurement(draw_cb, &data); + print_result(i, 1, res); + } + + data.ops_per_vblank = 1; + for (i = 1; i <= 64; i *= opts.loop_inc) { + data.n_vblanks = i ; + res = do_measurement(draw_cb, &data); + print_result(1, i, res); + } + } +} + +static void draw_and_flip_cb(void *ptr) +{ + struct draw_data *data = ptr; + int i, ops; + + for (i = 0; !alarm_received; i++) { + for (ops = 0; ops < data->ops_per_vblank; ops++) + draw_rect(back_fb, data->method, i << 8); + + page_flip(); + wait_vblanks(1); + } +} + +static void draw_and_flip_test(void) +{ + struct draw_data data; + enum igt_draw_method method; + int i; + uint64_t res; + + for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) { + data.method = method; + + /* Doing everything consumes too much time! */ + if (method != IGT_DRAW_MMAP_CPU && method != IGT_DRAW_BLT) + continue; + + printf("\nDraw and flip %s test:\n", + igt_draw_get_method_name(method)); + + for (i = 16; i >= 1; i /= opts.loop_inc) { + data.ops_per_vblank = 1; + res = do_measurement(draw_and_flip_cb, &data); + print_result(i, 1, res); + } + } +} + +static void parse_opts(int argc, char *argv[]) +{ + int opt; + char short_opts[] = "d:lrbw:c:i:fsn:"; + struct option long_opts[] = { + { "draw-size", required_argument, NULL, 'd'}, + { "no-flip", no_argument, NULL, 'l'}, + { "no-draw", no_argument, NULL, 'r'}, + { "no-draw-and-flip", no_argument, NULL, 'b'}, + { "warm-time", required_argument, NULL, 'w'}, + { "calc-time", required_argument, NULL, 'c'}, + { "loop-increment", required_argument, NULL, 'i'}, + { "fast", no_argument, NULL, 'f'}, + { "slow", no_argument, NULL, 's'}, + { "name", required_argument, NULL, 'n'}, + { 0 }, + }; + + while (1) { + opt = getopt_long(argc, argv, short_opts, long_opts, NULL); + + switch (opt) { + case 'd': + if (strcmp(optarg, "s") == 0) + opts.draw_size = 0; + else if (strcmp(optarg, "m") == 0) + opts.draw_size = 1; + else if (strcmp(optarg, "l") == 0) + opts.draw_size = 2; + else + igt_assert(false); + break; + case 'l': + opts.do_page_flip = false; + break; + case 'r': + opts.do_draw = false; + break; + case 'b': + opts.do_draw_and_flip = false; + break; + case 'w': + opts.res_warm_time = atoi(optarg); + break; + case 'c': + opts.res_calc_time = atoi(optarg); + break; + case 'i': + opts.loop_inc = atoi(optarg); + break; + case 'f': + opts.res_warm_time = 1; + opts.res_calc_time = 2; + opts.loop_inc = 4; + break; + case 's': + opts.res_warm_time = 2; + opts.res_calc_time = 6; + opts.loop_inc = 2; + break; + case 'n': + opts.test_name = optarg; + break; + case -1: + return; + default: + igt_assert(false); + } + } +} + +int main(int argc, char *argv[]) +{ + parse_opts(argc, argv); + + setup_msr(); + setup_drm(); + setup_modeset(); + setup_vblank_interval(); + setup_alarm(); + + printf("Test name:\t%s\n", opts.test_name); + + unset_mode(); + set_mode(); + + setup_idle(); + + if (opts.do_page_flip) + page_flip_test(); + + if (opts.do_draw) + draw_test(); + + if (opts.do_draw_and_flip) + draw_and_flip_test(); + + teardown_modeset(); + teardown_drm(); + teardown_msr(); + return 0; +} diff -Nru intel-gpu-tools-1.13/tools/Makefile.in intel-gpu-tools-1.14/tools/Makefile.in --- intel-gpu-tools-1.13/tools/Makefile.in 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/tools/Makefile.in 2016-03-01 16:02:44.000000000 +0000 @@ -90,6 +90,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ noinst_PROGRAMS = hsw_compute_wrpll$(EXEEXT) \ skl_compute_wrpll$(EXEEXT) skl_ddb_allocation$(EXEEXT) bin_PROGRAMS = igt_stats$(EXEEXT) intel_audio_dump$(EXEEXT) \ @@ -104,14 +105,14 @@ intel_l3_parity$(EXEEXT) intel_lid$(EXEEXT) \ intel_opregion_decode$(EXEEXT) intel_panel_fitter$(EXEEXT) \ intel_perf_counters$(EXEEXT) intel_reg_checker$(EXEEXT) \ - intel_stepping$(EXEEXT) intel_watermark$(EXEEXT) + intel_residency$(EXEEXT) intel_stepping$(EXEEXT) \ + intel_watermark$(EXEEXT) subdir = tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \ @@ -233,6 +234,10 @@ $(top_builddir)/lib/libintel_tools.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +intel_error_decode_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(intel_error_decode_LDFLAGS) \ + $(LDFLAGS) -o $@ intel_firmware_decode_SOURCES = intel_firmware_decode.c intel_firmware_decode_OBJECTS = intel_firmware_decode.$(OBJEXT) intel_firmware_decode_LDADD = $(LDADD) @@ -340,6 +345,13 @@ $(top_builddir)/lib/libintel_tools.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +intel_residency_SOURCES = intel_residency.c +intel_residency_OBJECTS = intel_residency.$(OBJEXT) +intel_residency_LDADD = $(LDADD) +intel_residency_DEPENDENCIES = $(top_builddir)/lib/libintel_tools.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) intel_stepping_SOURCES = intel_stepping.c intel_stepping_OBJECTS = intel_stepping.$(OBJEXT) intel_stepping_LDADD = $(LDADD) @@ -413,8 +425,8 @@ intel_gtt.c intel_infoframes.c $(intel_l3_parity_SOURCES) \ intel_lid.c intel_opregion_decode.c intel_panel_fitter.c \ intel_perf_counters.c $(intel_reg_SOURCES) intel_reg_checker.c \ - intel_stepping.c intel_watermark.c skl_compute_wrpll.c \ - skl_ddb_allocation.c + intel_residency.c intel_stepping.c intel_watermark.c \ + skl_compute_wrpll.c skl_ddb_allocation.c DIST_SOURCES = $(intel_aubdump_la_SOURCES) hsw_compute_wrpll.c \ igt_stats.c intel_audio_dump.c intel_backlight.c \ intel_bios_dumper.c $(intel_bios_reader_SOURCES) \ @@ -426,8 +438,8 @@ intel_infoframes.c $(intel_l3_parity_SOURCES) intel_lid.c \ intel_opregion_decode.c intel_panel_fitter.c \ intel_perf_counters.c $(intel_reg_SOURCES) intel_reg_checker.c \ - intel_stepping.c intel_watermark.c skl_compute_wrpll.c \ - skl_ddb_allocation.c + intel_residency.c intel_stepping.c intel_watermark.c \ + skl_compute_wrpll.c skl_ddb_allocation.c RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ @@ -531,6 +543,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -575,6 +589,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -673,11 +688,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -694,6 +714,7 @@ intel_error_decode_SOURCES = \ intel_error_decode.c +intel_error_decode_LDFLAGS = -lz intel_bios_reader_SOURCES = \ intel_bios_reader.c \ intel_bios.h @@ -888,7 +909,7 @@ intel_error_decode$(EXEEXT): $(intel_error_decode_OBJECTS) $(intel_error_decode_DEPENDENCIES) $(EXTRA_intel_error_decode_DEPENDENCIES) @rm -f intel_error_decode$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(intel_error_decode_OBJECTS) $(intel_error_decode_LDADD) $(LIBS) + $(AM_V_CCLD)$(intel_error_decode_LINK) $(intel_error_decode_OBJECTS) $(intel_error_decode_LDADD) $(LIBS) intel_firmware_decode$(EXEEXT): $(intel_firmware_decode_OBJECTS) $(intel_firmware_decode_DEPENDENCIES) $(EXTRA_intel_firmware_decode_DEPENDENCIES) @rm -f intel_firmware_decode$(EXEEXT) @@ -950,6 +971,10 @@ @rm -f intel_reg_checker$(EXEEXT) $(AM_V_CCLD)$(LINK) $(intel_reg_checker_OBJECTS) $(intel_reg_checker_LDADD) $(LIBS) +intel_residency$(EXEEXT): $(intel_residency_OBJECTS) $(intel_residency_DEPENDENCIES) $(EXTRA_intel_residency_DEPENDENCIES) + @rm -f intel_residency$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(intel_residency_OBJECTS) $(intel_residency_LDADD) $(LIBS) + intel_stepping$(EXEEXT): $(intel_stepping_OBJECTS) $(intel_stepping_DEPENDENCIES) $(EXTRA_intel_stepping_DEPENDENCIES) @rm -f intel_stepping$(EXEEXT) $(AM_V_CCLD)$(LINK) $(intel_stepping_OBJECTS) $(intel_stepping_LDADD) $(LIBS) @@ -1071,6 +1096,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_reg_checker.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_reg_decode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_reg_spec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_residency.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_stepping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intel_watermark.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skl_compute_wrpll.Po@am__quote@ diff -Nru intel-gpu-tools-1.13/tools/Makefile.sources intel-gpu-tools-1.14/tools/Makefile.sources --- intel-gpu-tools-1.13/tools/Makefile.sources 2015-11-12 17:30:48.000000000 +0000 +++ intel-gpu-tools-1.14/tools/Makefile.sources 2016-03-01 15:59:21.000000000 +0000 @@ -29,6 +29,7 @@ intel_panel_fitter \ intel_perf_counters \ intel_reg_checker \ + intel_residency \ intel_stepping \ intel_watermark @@ -45,6 +46,7 @@ intel_error_decode_SOURCES = \ intel_error_decode.c +intel_error_decode_LDFLAGS = -lz intel_bios_reader_SOURCES = \ intel_bios_reader.c \ diff -Nru intel-gpu-tools-1.13/tools/null_state_gen/Makefile.in intel-gpu-tools-1.14/tools/null_state_gen/Makefile.in --- intel-gpu-tools-1.13/tools/null_state_gen/Makefile.in 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/tools/null_state_gen/Makefile.in 2016-03-01 16:02:44.000000000 +0000 @@ -88,14 +88,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ noinst_PROGRAMS = intel_null_state_gen$(EXEEXT) subdir = tools/null_state_gen ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -213,6 +213,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -257,6 +259,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -355,11 +358,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/tools/registers/base_interrupt.txt intel-gpu-tools-1.14/tools/registers/base_interrupt.txt --- intel-gpu-tools-1.13/tools/registers/base_interrupt.txt 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tools/registers/base_interrupt.txt 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,20 @@ +('GEN6_PMINTRMSK', '0x0000a168', '') +('DEISR', '0x00044000', '') +('DEIMR', '0x00044004', '') +('DEIIR', '0x00044008', '') +('DEIER', '0x0004400c', '') +('GTISR', '0x00044010', '') +('GTIMR', '0x00044014', '') +('GTIIR', '0x00044018', '') +('GTIER', '0x0004401c', '') +('GEN6_PMISR', '0x00044020', '') +('GEN6_PMIMR', '0x00044024', '') +('GEN6_PMIIR', '0x00044028', '') +('GEN6_PMIER', '0x0004402c', '') +('SDEISR', '0x000c4000', '') +('SDEIMR', '0x000c4004', '') +('SDEIIR', '0x000c4008', '') +('SDEIER', '0x000c400c', '') +('RENDER_IMR', '0x000020a8', '') +('BSD_IMR', '0x000120a8', '') +('BLT_IMR', '0x000220a8', '') diff -Nru intel-gpu-tools-1.13/tools/registers/base_other.txt intel-gpu-tools-1.14/tools/registers/base_other.txt --- intel-gpu-tools-1.13/tools/registers/base_other.txt 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tools/registers/base_other.txt 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,7 @@ +('PGETBL_CTL', '0x00002020', '') +('MI_MODE', '0x0000209c', '') +('CCID', '0x00002180', '') +('ERROR_GEN6', '0x000040a0', '') +('RENDER_HWSTAM', '0x00002098', '') +('GEN6_BSD_HWSTAM', '0x00012098', '') +('GEN6_BLITTER_HWSTAM', '0x00022098', '') diff -Nru intel-gpu-tools-1.13/tools/registers/base_power.txt intel-gpu-tools-1.14/tools/registers/base_power.txt --- intel-gpu-tools-1.13/tools/registers/base_power.txt 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tools/registers/base_power.txt 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,21 @@ +('GEN6_RPNSWREQ', '0x0000a008', '') +('GEN6_RC_VIDEO_FREQ', '0x0000a00c', '') +('GEN6_RP_DOWN_TIMEOUT', '0x0000a010', '') +('GEN6_RP_INTERRUPT_LIMITS', '0x0000a014', '') +('GEN6_RP_CONTROL', '0x0000a024', '') +('GEN6_RP_UP_THRESHOLD', '0x0000a02c', '') +('GEN6_RP_UP_EI', '0x0000a068', '') +('GEN6_RP_DOWN_EI', '0x0000a06c', '') +('GEN6_RP_IDLE_HYSTERSIS', '0x0000a070', '') +('GEN6_RC_CONTROL', '0x0000a090', '') +('GEN6_RC_STATE', '0x0000a094', '') +('GEN6_RC1_WAKE_RATE_LIMIT', '0x0000a098', '') +('GEN6_RC6_WAKE_RATE_LIMIT', '0x0000a09c', '') +('GEN6_RC_EVALUATION_INTERVAL', '0x0000a0a8', '') +('GEN6_RC_IDLE_HYSTERSIS', '0x0000a0ac', '') +('GEN6_RC_SLEEP', '0x0000a0b0', '') +('GEN6_RC1e_THRESHOLD', '0x0000a0b4', '') +('GEN6_RC6_THRESHOLD', '0x0000a0b8', '') +('RC6_RESIDENCY_TIME', '0x00138108', '') +('RC6p_RESIDENCY_TIME', '0x0013810c', '') +('RC6pp_RESIDENCY_TIME', '0x00138110', '') diff -Nru intel-gpu-tools-1.13/tools/registers/base_rings.txt intel-gpu-tools-1.14/tools/registers/base_rings.txt --- intel-gpu-tools-1.13/tools/registers/base_rings.txt 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tools/registers/base_rings.txt 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,33 @@ +('RENDER_INSTPM', '0x20c0', '') +('BSD_INSTPM', '0x120c0', '') +('BLT_INSTPM', '0x220c0', '') +('RENDER_RING_TAIL', '0x2030', '') +('BSD_RING_TAIL', '0x12030', '') +('BLT_RING_TAIL', '0x22030', '') +('RENDER_RING_HEAD', '0x2034', '') +('BSD_RING_HEAD', '0x12034', '') +('BLT_RING_HEAD', '0x22034', '') +('RENDER_RING_START', '0x2038', '') +('BSD_RING_START', '0x12038', '') +('BLT_RING_START', '0x22038', '') +('RENDER_RING_CTL', '0x203c', '') +('BSD_RING_CTL', '0x1203c', '') +('BLT_RING_CTL', '0x2203c', '') +('RENDER_IPEIR', '0x2064', '') +('BSD_IPEIR', '0x12064', '') +('BLT_IPEIR', '0x22064', '') +('RENDER_IPEHR', '0x2068', '') +('BSD_IPEHR', '0x12068', '') +('BLT_IPEHR', '0x22068', '') +('RENDER_INSTDONE', '0x206c', '') +('BSD_INSTDONE', '0x1206c', '') +('BLT_INSTDONE', '0x2206c', '') +('RENDER_INSTPS', '0x2070', '') +('BSD_INSTPS', '0x12070', '') +('BLT_INSTPS', '0x22070', '') +('RENDER_RING_ACTHD', '0x2074', '') +('BSD_RING_ACTHD', '0x12074', '') +('BLT_RING_ACTHD', '0x22074', '') +('RENDER_FADDR', '0x2078', '') +('BSD_FADDR', '0x12078', '') +('BLT_FADDR', '0x22078', '') diff -Nru intel-gpu-tools-1.13/tools/registers/Makefile.in intel-gpu-tools-1.14/tools/registers/Makefile.in --- intel-gpu-tools-1.13/tools/registers/Makefile.in 2015-12-02 16:47:59.000000000 +0000 +++ intel-gpu-tools-1.14/tools/registers/Makefile.in 2016-03-01 16:02:44.000000000 +0000 @@ -88,13 +88,13 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = tools/registers ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_register_definition_DATA) \ @@ -188,6 +188,8 @@ DRM_LIBS = @DRM_LIBS@ DRM_NOUVEAU_CFLAGS = @DRM_NOUVEAU_CFLAGS@ DRM_NOUVEAU_LIBS = @DRM_NOUVEAU_LIBS@ +DRM_VC4_CFLAGS = @DRM_VC4_CFLAGS@ +DRM_VC4_LIBS = @DRM_VC4_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -232,6 +234,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -330,11 +333,16 @@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff -Nru intel-gpu-tools-1.13/tools/registers/vlv_power.txt intel-gpu-tools-1.14/tools/registers/vlv_power.txt --- intel-gpu-tools-1.13/tools/registers/vlv_power.txt 1970-01-01 00:00:00.000000000 +0000 +++ intel-gpu-tools-1.14/tools/registers/vlv_power.txt 2016-03-11 12:55:27.000000000 +0000 @@ -0,0 +1,14 @@ +('GTLC wake control', '0x130090', '') +('GTLC power well status', '0x130094', '') +('Render forcewake req', '0x1300b0', '') +('Render forcewake ack', '0x1300b4', '') +('Counter control', '0x138104', '') +('RC6 counter', '0x138108', '') +('RC6_SLEEP', 0xa0b0, '') +('RC6_WAKE_LIMIT', 0xa09c, '') +('RC_EI', 0xa0a8, '') +('RC_IDLE_HYSTERESIS', 0xa0ac, '') +('RC6_THRESHOLD', 0xa0b8, '') +('RC6p_THRESHOLD', 0xa0bc, '') +('RC6pp_THRESHOLD', 0xa0c0, '') +('RC_CONTROL', 0xa090, '')