diff -Nru plymouth-0.8.4/debian/changelog plymouth-0.8.4/debian/changelog --- plymouth-0.8.4/debian/changelog 2012-05-04 22:19:05.000000000 -0300 +++ plymouth-0.8.4/debian/changelog 2012-08-16 02:51:30.000000000 -0300 @@ -1,3 +1,17 @@ +plymouth (0.8.4-0ubuntu2) quantal; urgency=low + + * debian/patches/upstream-add-generic-driver-to-drm-renderer-plugin.patch: + - Add the generic driver to the drm render plugin, which is the only one + supported on latest upstream, working also for omap. Not yet disabling + the others, as they can still be used in case the generic one fails, + which keeps plymouth safe for x86 (LP: #1018907) + * debian/patches/update-libdrm-nouveau-library-dependency.patch: + - Old nouveau driver is now called libdrm_nouveau1 at the latest libdrm + package (>= 2.4.38) + * Refresh autoreconf.patch. + + -- Ricardo Salveti de Araujo Thu, 16 Aug 2012 01:53:54 -0300 + plymouth (0.8.4-0ubuntu1) quantal; urgency=low * New upstream release. diff -Nru plymouth-0.8.4/debian/patches/autoreconf.patch plymouth-0.8.4/debian/patches/autoreconf.patch --- plymouth-0.8.4/debian/patches/autoreconf.patch 2012-04-29 22:22:18.000000000 -0300 +++ plymouth-0.8.4/debian/patches/autoreconf.patch 2012-08-16 03:49:10.000000000 -0300 @@ -91,6 +91,19 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +@@ -125,6 +132,12 @@ + /* Version number of package */ + #undef VERSION + ++/* Number of bits in a file offset, on hosts where this is settable. */ ++#undef _FILE_OFFSET_BITS ++ ++/* Define for large files, on AIX-style hosts. */ ++#undef _LARGE_FILES ++ + /* Define to 1 if on MINIX. */ + #undef _MINIX + Index: trunk/INSTALL =================================================================== --- trunk.orig/INSTALL @@ -913,7 +926,23 @@ RELEASE_FILE background_end_color background_start_color -@@ -2017,6 +2019,52 @@ +@@ -809,6 +811,7 @@ + ac_subst_files='' + ac_user_opts=' + enable_option_checking ++enable_largefile + enable_dependency_tracking + enable_silent_rules + enable_maintainer_mode +@@ -1490,6 +1493,7 @@ + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --disable-largefile omit support for large files + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: `make V=1') +@@ -2017,6 +2021,52 @@ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -966,7 +995,212 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -@@ -5248,6 +5296,7 @@ +@@ -3651,6 +3701,204 @@ + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + ++# Check whether --enable-largefile was given. ++if test "${enable_largefile+set}" = set; then : ++ enableval=$enable_largefile; ++fi ++ ++if test "$enable_largefile" != no; then ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 ++$as_echo_n "checking for special C compiler options needed for large files... " >&6; } ++if ${ac_cv_sys_largefile_CC+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_cv_sys_largefile_CC=no ++ if test "$GCC" != yes; then ++ ac_save_CC=$CC ++ while :; do ++ # IRIX 6.2 and later do not support large files by default, ++ # so use the C compiler's -n32 option if that helps. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ 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)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++ if ac_fn_c_try_compile "$LINENO"; then : ++ break ++fi ++rm -f core conftest.err conftest.$ac_objext ++ CC="$CC -n32" ++ if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_sys_largefile_CC=' -n32'; break ++fi ++rm -f core conftest.err conftest.$ac_objext ++ break ++ done ++ CC=$ac_save_CC ++ rm -f conftest.$ac_ext ++ fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 ++$as_echo "$ac_cv_sys_largefile_CC" >&6; } ++ if test "$ac_cv_sys_largefile_CC" != no; then ++ CC=$CC$ac_cv_sys_largefile_CC ++ fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 ++$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } ++if ${ac_cv_sys_file_offset_bits+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ while :; do ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ 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)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_sys_file_offset_bits=no; break ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#define _FILE_OFFSET_BITS 64 ++#include ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ 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)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_sys_file_offset_bits=64; break ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_cv_sys_file_offset_bits=unknown ++ break ++done ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 ++$as_echo "$ac_cv_sys_file_offset_bits" >&6; } ++case $ac_cv_sys_file_offset_bits in #( ++ no | unknown) ;; ++ *) ++cat >>confdefs.h <<_ACEOF ++#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits ++_ACEOF ++;; ++esac ++rm -rf conftest* ++ if test $ac_cv_sys_file_offset_bits = unknown; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 ++$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } ++if ${ac_cv_sys_large_files+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ while :; do ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ 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)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_sys_large_files=no; break ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#define _LARGE_FILES 1 ++#include ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ 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)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_sys_large_files=1; break ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_cv_sys_large_files=unknown ++ break ++done ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 ++$as_echo "$ac_cv_sys_large_files" >&6; } ++case $ac_cv_sys_large_files in #( ++ no | unknown) ;; ++ *) ++cat >>confdefs.h <<_ACEOF ++#define _LARGE_FILES $ac_cv_sys_large_files ++_ACEOF ++;; ++esac ++rm -rf conftest* ++ fi ++fi ++ + for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -5248,6 +5496,7 @@ @@ -974,7 +1208,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -@@ -6563,7 +6612,7 @@ +@@ -6563,7 +6812,7 @@ lt_cv_deplibs_check_method=pass_all ;; @@ -983,7 +1217,7 @@ 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 -@@ -9692,6 +9741,9 @@ +@@ -9692,6 +9941,9 @@ openbsd*) with_gnu_ld=no ;; @@ -993,7 +1227,7 @@ esac ld_shlibs=yes -@@ -9913,7 +9965,7 @@ +@@ -9913,7 +10165,7 @@ fi ;; @@ -1002,7 +1236,7 @@ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= -@@ -10090,6 +10142,7 @@ +@@ -10090,6 +10342,7 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi @@ -1010,7 +1244,7 @@ else # not using gcc if test "$host_cpu" = ia64; then -@@ -10543,7 +10596,7 @@ +@@ -10543,7 +10796,7 @@ link_all_deplibs=yes ;; @@ -1019,7 +1253,7 @@ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else -@@ -11556,14 +11609,10 @@ +@@ -11556,14 +11809,10 @@ # before this can be enabled. hardcode_into_libs=yes @@ -1035,7 +1269,7 @@ fi # We used to test for /lib/ld.so.1 and disable shared libraries on -@@ -11575,6 +11624,18 @@ +@@ -11575,6 +11824,18 @@ dynamic_linker='GNU/Linux ld.so' ;; @@ -1054,7 +1288,7 @@ netbsd*) version_type=sunos need_lib_prefix=no -@@ -12577,6 +12638,7 @@ +@@ -12577,6 +12838,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGE_CFLAGS=`$PKG_CONFIG --cflags "libpng >= 1.2.16 " 2>/dev/null` @@ -1062,7 +1296,7 @@ else pkg_failed=yes fi -@@ -12593,6 +12655,7 @@ +@@ -12593,6 +12855,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGE_LIBS=`$PKG_CONFIG --libs "libpng >= 1.2.16 " 2>/dev/null` @@ -1070,7 +1304,7 @@ else pkg_failed=yes fi -@@ -12612,9 +12675,9 @@ +@@ -12612,9 +12875,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1082,7 +1316,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$IMAGE_PKG_ERRORS" >&5 -@@ -12629,7 +12692,6 @@ +@@ -12629,7 +12892,6 @@ Alternatively, you may set the environment variables IMAGE_CFLAGS and IMAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1090,7 +1324,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -12645,7 +12707,6 @@ +@@ -12645,7 +12907,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1098,7 +1332,7 @@ else IMAGE_CFLAGS=$pkg_cv_IMAGE_CFLAGS IMAGE_LIBS=$pkg_cv_IMAGE_LIBS -@@ -12694,6 +12755,7 @@ +@@ -12694,6 +12955,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pangocairo >= 1.21.0 " 2>/dev/null` @@ -1106,7 +1340,7 @@ else pkg_failed=yes fi -@@ -12710,6 +12772,7 @@ +@@ -12710,6 +12972,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGO_LIBS=`$PKG_CONFIG --libs "pangocairo >= 1.21.0 " 2>/dev/null` @@ -1114,7 +1348,7 @@ else pkg_failed=yes fi -@@ -12729,9 +12792,9 @@ +@@ -12729,9 +12992,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1126,7 +1360,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$PANGO_PKG_ERRORS" >&5 -@@ -12746,7 +12809,6 @@ +@@ -12746,7 +13009,6 @@ Alternatively, you may set the environment variables PANGO_CFLAGS and PANGO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1134,7 +1368,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -12762,7 +12824,6 @@ +@@ -12762,7 +13024,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1142,7 +1376,7 @@ else PANGO_CFLAGS=$pkg_cv_PANGO_CFLAGS PANGO_LIBS=$pkg_cv_PANGO_LIBS -@@ -12789,6 +12850,7 @@ +@@ -12789,6 +13050,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12.0 " 2>/dev/null` @@ -1150,7 +1384,7 @@ else pkg_failed=yes fi -@@ -12805,6 +12867,7 @@ +@@ -12805,6 +13067,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12.0 " 2>/dev/null` @@ -1158,7 +1392,7 @@ else pkg_failed=yes fi -@@ -12824,9 +12887,9 @@ +@@ -12824,9 +13087,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1170,7 +1404,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 -@@ -12841,7 +12904,6 @@ +@@ -12841,7 +13104,6 @@ Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1178,7 +1412,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -12857,7 +12919,6 @@ +@@ -12857,7 +13119,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1186,7 +1420,7 @@ else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS -@@ -12900,6 +12961,7 @@ +@@ -12900,6 +13161,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRM_INTEL_CFLAGS=`$PKG_CONFIG --cflags "libdrm libdrm_intel" 2>/dev/null` @@ -1194,7 +1428,7 @@ else pkg_failed=yes fi -@@ -12916,6 +12978,7 @@ +@@ -12916,6 +13178,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRM_INTEL_LIBS=`$PKG_CONFIG --libs "libdrm libdrm_intel" 2>/dev/null` @@ -1202,7 +1436,7 @@ else pkg_failed=yes fi -@@ -12935,9 +12998,9 @@ +@@ -12935,9 +13198,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1214,7 +1448,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$DRM_INTEL_PKG_ERRORS" >&5 -@@ -12952,7 +13015,6 @@ +@@ -12952,7 +13215,6 @@ Alternatively, you may set the environment variables DRM_INTEL_CFLAGS and DRM_INTEL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1222,7 +1456,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -12968,7 +13030,6 @@ +@@ -12968,7 +13230,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1230,7 +1464,7 @@ else DRM_INTEL_CFLAGS=$pkg_cv_DRM_INTEL_CFLAGS DRM_INTEL_LIBS=$pkg_cv_DRM_INTEL_LIBS -@@ -13085,6 +13146,7 @@ +@@ -13085,6 +13346,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRM_RADEON_CFLAGS=`$PKG_CONFIG --cflags "libdrm libdrm_radeon" 2>/dev/null` @@ -1238,7 +1472,7 @@ else pkg_failed=yes fi -@@ -13101,6 +13163,7 @@ +@@ -13101,6 +13363,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRM_RADEON_LIBS=`$PKG_CONFIG --libs "libdrm libdrm_radeon" 2>/dev/null` @@ -1246,7 +1480,7 @@ else pkg_failed=yes fi -@@ -13120,9 +13183,9 @@ +@@ -13120,9 +13383,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1258,7 +1492,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$DRM_RADEON_PKG_ERRORS" >&5 -@@ -13137,7 +13200,6 @@ +@@ -13137,7 +13400,6 @@ Alternatively, you may set the environment variables DRM_RADEON_CFLAGS and DRM_RADEON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1266,7 +1500,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -13153,7 +13215,6 @@ +@@ -13153,7 +13415,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1274,35 +1508,59 @@ else DRM_RADEON_CFLAGS=$pkg_cv_DRM_RADEON_CFLAGS DRM_RADEON_LIBS=$pkg_cv_DRM_RADEON_LIBS -@@ -13270,6 +13331,7 @@ +@@ -13264,12 +13525,13 @@ + pkg_cv_DRM_NOUVEAU_CFLAGS="$DRM_NOUVEAU_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 libdrm_nouveau\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libdrm libdrm_nouveau") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm libdrm_nouveau1\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libdrm libdrm_nouveau1") 2>&5 + ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DRM_NOUVEAU_CFLAGS=`$PKG_CONFIG --cflags "libdrm libdrm_nouveau" 2>/dev/null` +- pkg_cv_DRM_NOUVEAU_CFLAGS=`$PKG_CONFIG --cflags "libdrm libdrm_nouveau" 2>/dev/null` ++ pkg_cv_DRM_NOUVEAU_CFLAGS=`$PKG_CONFIG --cflags "libdrm libdrm_nouveau1" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi -@@ -13286,6 +13348,7 @@ +@@ -13280,12 +13542,13 @@ + pkg_cv_DRM_NOUVEAU_LIBS="$DRM_NOUVEAU_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 libdrm_nouveau\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libdrm libdrm_nouveau") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm libdrm_nouveau1\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libdrm libdrm_nouveau1") 2>&5 + ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DRM_NOUVEAU_LIBS=`$PKG_CONFIG --libs "libdrm libdrm_nouveau" 2>/dev/null` +- pkg_cv_DRM_NOUVEAU_LIBS=`$PKG_CONFIG --libs "libdrm libdrm_nouveau" 2>/dev/null` ++ pkg_cv_DRM_NOUVEAU_LIBS=`$PKG_CONFIG --libs "libdrm libdrm_nouveau1" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi -@@ -13305,9 +13368,9 @@ +@@ -13305,14 +13568,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm libdrm_nouveau" 2>&1` -+ DRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm libdrm_nouveau" 2>&1` ++ DRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm libdrm_nouveau1" 2>&1` else - DRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm libdrm_nouveau" 2>&1` -+ DRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm libdrm_nouveau" 2>&1` ++ DRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm libdrm_nouveau1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRM_NOUVEAU_PKG_ERRORS" >&5 -@@ -13322,7 +13385,6 @@ + +- as_fn_error $? "Package requirements (libdrm libdrm_nouveau) were not met: ++ as_fn_error $? "Package requirements (libdrm libdrm_nouveau1) were not met: + + $DRM_NOUVEAU_PKG_ERRORS + +@@ -13322,7 +13585,6 @@ Alternatively, you may set the environment variables DRM_NOUVEAU_CFLAGS and DRM_NOUVEAU_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1310,7 +1568,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -13338,7 +13400,6 @@ +@@ -13338,7 +13600,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1318,7 +1576,7 @@ else DRM_NOUVEAU_CFLAGS=$pkg_cv_DRM_NOUVEAU_CFLAGS DRM_NOUVEAU_LIBS=$pkg_cv_DRM_NOUVEAU_LIBS -@@ -13455,6 +13516,7 @@ +@@ -13455,6 +13716,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBKMS_CFLAGS=`$PKG_CONFIG --cflags "libdrm libkms" 2>/dev/null` @@ -1326,7 +1584,7 @@ else pkg_failed=yes fi -@@ -13471,6 +13533,7 @@ +@@ -13471,6 +13733,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBKMS_LIBS=`$PKG_CONFIG --libs "libdrm libkms" 2>/dev/null` @@ -1334,7 +1592,7 @@ else pkg_failed=yes fi -@@ -13490,9 +13553,9 @@ +@@ -13490,9 +13753,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1346,7 +1604,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$LIBKMS_PKG_ERRORS" >&5 -@@ -13507,7 +13570,6 @@ +@@ -13507,7 +13770,6 @@ Alternatively, you may set the environment variables LIBKMS_CFLAGS and LIBKMS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1354,7 +1612,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -13523,7 +13585,6 @@ +@@ -13523,7 +13785,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1362,7 +1620,7 @@ else LIBKMS_CFLAGS=$pkg_cv_LIBKMS_CFLAGS LIBKMS_LIBS=$pkg_cv_LIBKMS_LIBS -@@ -13623,6 +13684,7 @@ +@@ -13623,6 +13884,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null` @@ -1370,7 +1628,7 @@ else pkg_failed=yes fi -@@ -13639,6 +13701,7 @@ +@@ -13639,6 +13901,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null` @@ -1378,7 +1636,7 @@ else pkg_failed=yes fi -@@ -13658,9 +13721,9 @@ +@@ -13658,9 +13921,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1390,7 +1648,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$DBUS_PKG_ERRORS" >&5 -@@ -13675,7 +13738,6 @@ +@@ -13675,7 +13938,6 @@ Alternatively, you may set the environment variables DBUS_CFLAGS and DBUS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 @@ -1398,7 +1656,7 @@ elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -13691,7 +13753,6 @@ +@@ -13691,7 +13953,6 @@ To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } @@ -1406,7 +1664,7 @@ else DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS DBUS_LIBS=$pkg_cv_DBUS_LIBS -@@ -14162,6 +14223,40 @@ +@@ -14162,6 +14423,40 @@ _ACEOF @@ -1447,7 +1705,7 @@ # Turn on the additional warnings last, so -Werror doesn't affect other tests. -@@ -14471,7 +14566,7 @@ +@@ -14471,7 +14766,7 @@ exec_prefix=$exec_prefix_save @@ -1456,7 +1714,7 @@ cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure -@@ -14658,6 +14753,10 @@ +@@ -14658,6 +14953,10 @@ as_fn_error $? "conditional \"INSTALL_FALLBACK_LOGO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -1467,7 +1725,7 @@ : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 -@@ -15553,9 +15652,11 @@ +@@ -15553,9 +15852,11 @@ "src/plugins/renderers/frame-buffer/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/renderers/frame-buffer/Makefile" ;; "src/plugins/renderers/drm/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/renderers/drm/Makefile" ;; "src/plugins/renderers/x11/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/renderers/x11/Makefile" ;; @@ -1479,7 +1737,7 @@ "src/plugins/splash/text/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/splash/text/Makefile" ;; "src/plugins/splash/details/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/splash/details/Makefile" ;; "src/plugins/splash/space-flares/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/splash/space-flares/Makefile" ;; -@@ -15580,6 +15681,9 @@ +@@ -15580,6 +15881,9 @@ "themes/glow/Makefile") CONFIG_FILES="$CONFIG_FILES themes/glow/Makefile" ;; "themes/spinner/Makefile") CONFIG_FILES="$CONFIG_FILES themes/spinner/Makefile" ;; "themes/script/Makefile") CONFIG_FILES="$CONFIG_FILES themes/script/Makefile" ;; @@ -4192,3 +4450,55 @@ +# 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: +Index: trunk/src/plugins/renderers/drm/Makefile.in +=================================================================== +--- trunk.orig/src/plugins/renderers/drm/Makefile.in ++++ trunk/src/plugins/renderers/drm/Makefile.in +@@ -97,6 +97,8 @@ + @ENABLE_DRM_RENDERER_TRUE@ $(am__DEPENDENCIES_2) + am__drm_la_SOURCES_DIST = $(srcdir)/plugin.c \ + $(srcdir)/ply-renderer-driver.h \ ++ $(srcdir)/ply-renderer-generic-driver.h \ ++ $(srcdir)/ply-renderer-generic-driver.c \ + $(srcdir)/ply-renderer-i915-driver.h \ + $(srcdir)/ply-renderer-i915-driver.c \ + $(srcdir)/ply-renderer-radeon-driver.h \ +@@ -110,6 +112,7 @@ + @ENABLE_DRM_RENDERER_TRUE@@ENABLE_LIBDRM_NOUVEAU_TRUE@am__objects_3 = drm_la-ply-renderer-nouveau-driver.lo + @ENABLE_DRM_RENDERER_TRUE@@ENABLE_LIBKMS_TRUE@am__objects_4 = drm_la-ply-renderer-libkms-driver.lo + @ENABLE_DRM_RENDERER_TRUE@am_drm_la_OBJECTS = drm_la-plugin.lo \ ++@ENABLE_DRM_RENDERER_TRUE@ drm_la-ply-renderer-generic-driver.lo \ + @ENABLE_DRM_RENDERER_TRUE@ $(am__objects_1) $(am__objects_2) \ + @ENABLE_DRM_RENDERER_TRUE@ $(am__objects_3) $(am__objects_4) + drm_la_OBJECTS = $(am_drm_la_OBJECTS) +@@ -331,6 +334,8 @@ + @ENABLE_DRM_RENDERER_TRUE@ $(am__append_4) + @ENABLE_DRM_RENDERER_TRUE@drm_la_SOURCES = $(srcdir)/plugin.c \ + @ENABLE_DRM_RENDERER_TRUE@ $(srcdir)/ply-renderer-driver.h \ ++@ENABLE_DRM_RENDERER_TRUE@ $(srcdir)/ply-renderer-generic-driver.h \ ++@ENABLE_DRM_RENDERER_TRUE@ $(srcdir)/ply-renderer-generic-driver.c \ + @ENABLE_DRM_RENDERER_TRUE@ $(am__append_1) $(am__append_2) \ + @ENABLE_DRM_RENDERER_TRUE@ $(am__append_3) $(am__append_6) + MAINTAINERCLEANFILES = Makefile.in +@@ -409,6 +414,7 @@ + -rm -f *.tab.c + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drm_la-plugin.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drm_la-ply-renderer-generic-driver.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drm_la-ply-renderer-i915-driver.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drm_la-ply-renderer-libkms-driver.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drm_la-ply-renderer-nouveau-driver.Plo@am__quote@ +@@ -442,6 +448,13 @@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(drm_la_CFLAGS) $(CFLAGS) -c -o drm_la-plugin.lo `test -f '$(srcdir)/plugin.c' || echo '$(srcdir)/'`$(srcdir)/plugin.c + ++drm_la-ply-renderer-generic-driver.lo: $(srcdir)/ply-renderer-generic-driver.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(drm_la_CFLAGS) $(CFLAGS) -MT drm_la-ply-renderer-generic-driver.lo -MD -MP -MF $(DEPDIR)/drm_la-ply-renderer-generic-driver.Tpo -c -o drm_la-ply-renderer-generic-driver.lo `test -f '$(srcdir)/ply-renderer-generic-driver.c' || echo '$(srcdir)/'`$(srcdir)/ply-renderer-generic-driver.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/drm_la-ply-renderer-generic-driver.Tpo $(DEPDIR)/drm_la-ply-renderer-generic-driver.Plo ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/ply-renderer-generic-driver.c' object='drm_la-ply-renderer-generic-driver.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(drm_la_CFLAGS) $(CFLAGS) -c -o drm_la-ply-renderer-generic-driver.lo `test -f '$(srcdir)/ply-renderer-generic-driver.c' || echo '$(srcdir)/'`$(srcdir)/ply-renderer-generic-driver.c ++ + drm_la-ply-renderer-i915-driver.lo: $(srcdir)/ply-renderer-i915-driver.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(drm_la_CFLAGS) $(CFLAGS) -MT drm_la-ply-renderer-i915-driver.lo -MD -MP -MF $(DEPDIR)/drm_la-ply-renderer-i915-driver.Tpo -c -o drm_la-ply-renderer-i915-driver.lo `test -f '$(srcdir)/ply-renderer-i915-driver.c' || echo '$(srcdir)/'`$(srcdir)/ply-renderer-i915-driver.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/drm_la-ply-renderer-i915-driver.Tpo $(DEPDIR)/drm_la-ply-renderer-i915-driver.Plo diff -Nru plymouth-0.8.4/debian/patches/series plymouth-0.8.4/debian/patches/series --- plymouth-0.8.4/debian/patches/series 2012-04-29 21:20:51.000000000 -0300 +++ plymouth-0.8.4/debian/patches/series 2012-08-16 02:50:12.000000000 -0300 @@ -11,4 +11,6 @@ avoid-sigpipe.patch tty1-after-boot.patch invalid-event-source-workaround.patch +upstream-add-generic-driver-to-drm-renderer-plugin.patch +update-libdrm-nouveau-library-dependency.patch autoreconf.patch diff -Nru plymouth-0.8.4/debian/patches/update-libdrm-nouveau-library-dependency.patch plymouth-0.8.4/debian/patches/update-libdrm-nouveau-library-dependency.patch --- plymouth-0.8.4/debian/patches/update-libdrm-nouveau-library-dependency.patch 1969-12-31 21:00:00.000000000 -0300 +++ plymouth-0.8.4/debian/patches/update-libdrm-nouveau-library-dependency.patch 2012-08-16 03:06:03.000000000 -0300 @@ -0,0 +1,19 @@ +Description: Old nouveau driver is now called libdrm_nouveau1 at the latest libdrm package + Upstream nouveau 2 driver is now just called libdrm_nouveau, and at Ubuntu the libdrm + package is still maintaining the older library, but as libdrm_nouveau1 +Forwarded: not-needed +Author: Ricardo Salveti + +Index: plymouth-0.8.4/configure.ac +=================================================================== +--- plymouth-0.8.4.orig/configure.ac 2012-08-16 02:47:21.845313178 -0300 ++++ plymouth-0.8.4/configure.ac 2012-08-16 02:49:41.150003950 -0300 +@@ -148,7 +148,7 @@ + AM_CONDITIONAL(ENABLE_LIBDRM_NOUVEAU, [test "$enable_libdrm_nouveau" = yes]) + + if test x$enable_libdrm_nouveau = xyes; then +- PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm libdrm_nouveau]) ++ PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm libdrm_nouveau1]) + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $DRM_NOUVEAU_CFLAGS" + AC_MSG_CHECKING([if nouveau_drm.h is in include path]) diff -Nru plymouth-0.8.4/debian/patches/upstream-add-generic-driver-to-drm-renderer-plugin.patch plymouth-0.8.4/debian/patches/upstream-add-generic-driver-to-drm-renderer-plugin.patch --- plymouth-0.8.4/debian/patches/upstream-add-generic-driver-to-drm-renderer-plugin.patch 1969-12-31 21:00:00.000000000 -0300 +++ plymouth-0.8.4/debian/patches/upstream-add-generic-driver-to-drm-renderer-plugin.patch 2012-08-16 03:12:14.000000000 -0300 @@ -0,0 +1,504 @@ +From: Dave Airlie +Subject: drm: add generic driver to drm renderer plugin + +Since around 2.6.39, the kernel has offered a generic ioctl interface +for modesetting (the KMS 'dumb' interface). This interface is now +provided by most all of the modesetting drivers. + +Adding support for this interface means that plymouth will automatically +gain support for new modesetting drivers going forward. + +This commit adds that support. Some changes made by Ray Strode. + +Origin: upstream, http://cgit.freedesktop.org/plymouth/commit/?id=527400d +Bug-Ubuntu: https://launchpad.net/bugs/1018907 + +diff --git a/configure.ac b/configure.ac +index db29de8..d872b18 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4,6 +4,7 @@ AC_CONFIG_HEADER(config.h) + AC_CONFIG_AUX_DIR(build-tools) + + AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + AC_PROG_AWK + AC_PROG_CC + AM_PROG_CC_C_O +diff --git a/src/plugins/renderers/drm/Makefile.am b/src/plugins/renderers/drm/Makefile.am +index 8434d0e..2209b30 100644 +--- a/src/plugins/renderers/drm/Makefile.am ++++ b/src/plugins/renderers/drm/Makefile.am +@@ -18,6 +18,9 @@ drm_la_LIBADD = $(PLYMOUTH_LIBS) $(DRM_LIBS) \ + ../../../libply-splash-core/libply-splash-core.la + drm_la_SOURCES = $(srcdir)/plugin.c \ + $(srcdir)/ply-renderer-driver.h ++drm_la_SOURCES += $(srcdir)/ply-renderer-generic-driver.h \ ++ $(srcdir)/ply-renderer-generic-driver.c ++ + if ENABLE_LIBDRM_INTEL + drm_la_SOURCES += $(srcdir)/ply-renderer-i915-driver.h \ + $(srcdir)/ply-renderer-i915-driver.c +diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c +index ab42d0b..6f4ba07 100644 +--- a/src/plugins/renderers/drm/plugin.c ++++ b/src/plugins/renderers/drm/plugin.c +@@ -59,6 +59,7 @@ + #include "ply-renderer.h" + #include "ply-renderer-plugin.h" + #include "ply-renderer-driver.h" ++#include "ply-renderer-generic-driver.h" + #ifdef PLY_ENABLE_LIBDRM_INTEL + #include "ply-renderer-i915-driver.h" + #endif +@@ -506,6 +507,25 @@ load_driver (ply_renderer_backend_t *backend) + return false; + } + backend->driver_interface = NULL; ++ ++/* Try intel driver first if we're supporting the legacy GDM transition ++ * since it can map the kernel console, which gives us the ability to do ++ * a more seamless transition when plymouth quits before X starts ++ */ ++#if defined(PLY_ENABLE_GDM_TRANSITION) && defined(PLY_ENABLE_LIBDRM_INTEL) ++ if (backend->driver_interface == NULL && strcmp (driver_name, "i915") == 0) ++ { ++ backend->driver_interface = ply_renderer_i915_driver_get_interface (); ++ backend->driver_supports_mapping_console = true; ++ } ++#endif ++ ++ if (backend->driver_interface == NULL) ++ { ++ backend->driver_interface = ply_renderer_generic_driver_get_interface (device_fd); ++ backend->driver_supports_mapping_console = false; ++ } ++ + #ifdef PLY_ENABLE_LIBDRM_INTEL + if (backend->driver_interface == NULL && strcmp (driver_name, "i915") == 0) + { +diff --git a/src/plugins/renderers/drm/ply-renderer-generic-driver.c b/src/plugins/renderers/drm/ply-renderer-generic-driver.c +new file mode 100644 +index 0000000..50fde64 +--- /dev/null ++++ b/src/plugins/renderers/drm/ply-renderer-generic-driver.c +@@ -0,0 +1,377 @@ ++/* ply-renderer-generic-driver.c - interface to generic drm kms api ++ * ++ * Copyright (C) 2012 Red Hat, 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 ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ * 02111-1307, USA. ++ * ++ * Written by: Dave Airlie ++ * Based on other renderer drivers written by Ray Strode ++ */ ++#include "config.h" ++ ++#include "ply-renderer-generic-driver.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "ply-hashtable.h" ++#include "ply-logger.h" ++#include "ply-renderer-driver.h" ++ ++typedef struct _ply_renderer_buffer ply_renderer_buffer_t; ++ ++struct _ply_renderer_buffer ++{ ++ uint32_t id; ++ ++ uint32_t handle; ++ uint32_t width; ++ uint32_t height; ++ uint32_t row_stride; ++ ++ void *map_address; ++ uint32_t map_size; ++ int map_count; ++ ++ uint32_t added_fb : 1; ++}; ++ ++struct _ply_renderer_driver ++{ ++ int device_fd; ++ ply_hashtable_t *buffers; ++}; ++ ++static bool ++ply_renderer_buffer_map (ply_renderer_driver_t *driver, ++ ply_renderer_buffer_t *buffer) ++{ ++ struct drm_mode_map_dumb map_dumb_buffer_request; ++ void *map_address; ++ ++ if (buffer->map_address != MAP_FAILED) ++ { ++ buffer->map_count++; ++ return true; ++ } ++ ++ memset (&map_dumb_buffer_request, 0, sizeof (struct drm_mode_map_dumb)); ++ map_dumb_buffer_request.handle = buffer->handle; ++ if (drmIoctl (driver->device_fd, DRM_IOCTL_MODE_MAP_DUMB, &map_dumb_buffer_request) < 0) ++ { ++ ply_trace ("Could not map GEM object %u: %m", buffer->handle); ++ return false; ++ } ++ ++ map_address = mmap (0, buffer->map_size, ++ PROT_READ | PROT_WRITE, MAP_SHARED, ++ driver->device_fd, map_dumb_buffer_request.offset); ++ ++ if (map_address == MAP_FAILED) ++ return false; ++ ++ buffer->map_address = map_address; ++ buffer->map_count++; ++ ++ return true; ++} ++ ++static void ++ply_renderer_buffer_unmap (ply_renderer_driver_t *driver, ++ ply_renderer_buffer_t *buffer) ++{ ++ buffer->map_count--; ++ ++ assert (buffer->map_count >= 0); ++} ++ ++static ply_renderer_driver_t * ++create_driver (int device_fd) ++{ ++ ply_renderer_driver_t *driver; ++ ++ driver = calloc (1, sizeof (ply_renderer_driver_t)); ++ driver->device_fd = device_fd; ++ ++ driver->buffers = ply_hashtable_new (ply_hashtable_direct_hash, ++ ply_hashtable_direct_compare); ++ ++ return driver; ++} ++ ++static void ++destroy_driver (ply_renderer_driver_t *driver) ++{ ++ ply_hashtable_free (driver->buffers); ++ ++ free (driver); ++} ++ ++static ply_renderer_buffer_t * ++ply_renderer_buffer_new (ply_renderer_driver_t *driver, ++ uint32_t width, ++ uint32_t height) ++{ ++ ply_renderer_buffer_t *buffer; ++ struct drm_mode_create_dumb create_dumb_buffer_request; ++ ++ buffer = calloc (1, sizeof (ply_renderer_buffer_t)); ++ buffer->width = width; ++ buffer->height = height; ++ buffer->map_address = MAP_FAILED; ++ ++ memset (&create_dumb_buffer_request, 0, sizeof (struct drm_mode_create_dumb)); ++ ++ create_dumb_buffer_request.width = width; ++ create_dumb_buffer_request.height = height; ++ create_dumb_buffer_request.bpp = 32; ++ create_dumb_buffer_request.flags = 0; ++ ++ if (drmIoctl (driver->device_fd, ++ DRM_IOCTL_MODE_CREATE_DUMB, ++ &create_dumb_buffer_request) < 0) ++ { ++ free (buffer); ++ ply_trace ("Could not allocate GEM object for frame buffer: %m"); ++ return NULL; ++ } ++ ++ buffer->handle = create_dumb_buffer_request.handle; ++ buffer->row_stride = create_dumb_buffer_request.pitch; ++ buffer->map_size = create_dumb_buffer_request.size; ++ ++ ply_trace ("returning %ux%u buffer with stride %u", ++ width, height, buffer->row_stride); ++ ++ return buffer; ++} ++ ++static void ++ply_renderer_buffer_free (ply_renderer_driver_t *driver, ++ ply_renderer_buffer_t *buffer) ++{ ++ struct drm_mode_destroy_dumb destroy_dumb_buffer_request; ++ ++ if (buffer->added_fb) ++ drmModeRmFB (driver->device_fd, buffer->id); ++ ++ if (buffer->map_address != MAP_FAILED) ++ { ++ munmap (buffer->map_address, buffer->map_size); ++ buffer->map_address = MAP_FAILED; ++ } ++ ++ memset (&destroy_dumb_buffer_request, 0, sizeof (struct drm_mode_destroy_dumb)); ++ destroy_dumb_buffer_request.handle = buffer->handle; ++ ++ if (drmIoctl (driver->device_fd, ++ DRM_IOCTL_MODE_DESTROY_DUMB, ++ &destroy_dumb_buffer_request) < 0) ++ { ++ ply_trace ("Could not deallocate GEM object %u: %m", buffer->handle); ++ } ++ ++ free (buffer); ++} ++ ++static ply_renderer_buffer_t * ++get_buffer_from_id (ply_renderer_driver_t *driver, ++ uint32_t id) ++{ ++ static ply_renderer_buffer_t *buffer; ++ ++ buffer = ply_hashtable_lookup (driver->buffers, (void *) (uintptr_t) id); ++ ++ return buffer; ++} ++ ++static bool ++fetch_buffer (ply_renderer_driver_t *driver, ++ uint32_t buffer_id, ++ unsigned long *width, ++ unsigned long *height, ++ unsigned long *row_stride) ++{ ++ ply_renderer_buffer_t *buffer; ++ ++ buffer = get_buffer_from_id (driver, buffer_id); ++ ++ if (buffer == NULL) ++ { ++ ply_trace ("could not fetch buffer %u", buffer_id); ++ return false; ++ } ++ ++ if (width != NULL) ++ *width = buffer->width; ++ ++ if (height != NULL) ++ *height = buffer->height; ++ ++ if (row_stride != NULL) ++ *row_stride = buffer->row_stride; ++ ++ ply_trace ("fetched %ux%u buffer with stride %u", ++ buffer->width, buffer->height, buffer->row_stride); ++ return true; ++} ++ ++static uint32_t ++create_buffer (ply_renderer_driver_t *driver, ++ unsigned long width, ++ unsigned long height, ++ unsigned long *row_stride) ++{ ++ ply_renderer_buffer_t *buffer; ++ ++ buffer = ply_renderer_buffer_new (driver, width, height); ++ ++ if (buffer == NULL) ++ { ++ ply_trace ("Could not allocate GEM object for frame buffer: %m"); ++ return 0; ++ } ++ ++ if (drmModeAddFB (driver->device_fd, width, height, ++ 24, 32, buffer->row_stride, buffer->handle, ++ &buffer->id) != 0) ++ { ++ ply_trace ("Could not set up GEM object as frame buffer: %m"); ++ ply_renderer_buffer_free (driver, buffer); ++ return 0; ++ } ++ ++ *row_stride = buffer->row_stride; ++ ++ buffer->added_fb = true; ++ ply_hashtable_insert (driver->buffers, ++ (void *) (uintptr_t) buffer->id, ++ buffer); ++ ++ return buffer->id; ++} ++ ++static bool ++map_buffer (ply_renderer_driver_t *driver, ++ uint32_t buffer_id) ++{ ++ ply_renderer_buffer_t *buffer; ++ ++ buffer = get_buffer_from_id (driver, buffer_id); ++ ++ assert (buffer != NULL); ++ ++ return ply_renderer_buffer_map (driver, buffer); ++} ++ ++static void ++unmap_buffer (ply_renderer_driver_t *driver, ++ uint32_t buffer_id) ++{ ++ ply_renderer_buffer_t *buffer; ++ ++ buffer = get_buffer_from_id (driver, buffer_id); ++ ++ assert (buffer != NULL); ++ ++ ply_renderer_buffer_unmap (driver, buffer); ++} ++ ++static char * ++begin_flush (ply_renderer_driver_t *driver, ++ uint32_t buffer_id) ++{ ++ ply_renderer_buffer_t *buffer; ++ ++ buffer = get_buffer_from_id (driver, buffer_id); ++ ++ assert (buffer != NULL); ++ ++ return buffer->map_address; ++} ++ ++static void ++end_flush (ply_renderer_driver_t *driver, ++ uint32_t buffer_id) ++{ ++ ply_renderer_buffer_t *buffer; ++ ++ buffer = get_buffer_from_id (driver, buffer_id); ++ ++ assert (buffer != NULL); ++} ++ ++static void ++destroy_buffer (ply_renderer_driver_t *driver, ++ uint32_t buffer_id) ++{ ++ ply_renderer_buffer_t *buffer; ++ ++ buffer = ply_hashtable_remove (driver->buffers, ++ (void *) (uintptr_t) buffer_id); ++ ++ assert (buffer != NULL); ++ ++ ply_renderer_buffer_free (driver, buffer); ++} ++ ++ply_renderer_driver_interface_t * ++ply_renderer_generic_driver_get_interface (int device_fd) ++{ ++ uint64_t supports_dumb_buffers; ++ ++ static ply_renderer_driver_interface_t driver_interface = ++ { ++ .create_driver = create_driver, ++ .destroy_driver = destroy_driver, ++ .create_buffer = create_buffer, ++ .fetch_buffer = fetch_buffer, ++ .map_buffer = map_buffer, ++ .unmap_buffer = unmap_buffer, ++ .begin_flush = begin_flush, ++ .end_flush = end_flush, ++ .destroy_buffer = destroy_buffer, ++ }; ++ ++ ++ if (drmGetCap (device_fd, DRM_CAP_DUMB_BUFFER, &supports_dumb_buffers) < 0) ++ return NULL; ++ ++ if (!supports_dumb_buffers) ++ return NULL; ++ ++ return &driver_interface; ++} ++ ++/* vim: set ts=4 sw=4 et ai ci cino={.5s,^-2,+.5s,t0,g0,e-2,n-2,p2s, (0,=.5s,:.5s */ +diff --git a/src/plugins/renderers/drm/ply-renderer-generic-driver.h b/src/plugins/renderers/drm/ply-renderer-generic-driver.h +new file mode 100644 +index 0000000..053587a +--- /dev/null ++++ b/src/plugins/renderers/drm/ply-renderer-generic-driver.h +@@ -0,0 +1,33 @@ ++/* ply-renderer-generic-driver.h ++ * ++ * Copyright (C) 2012 Red Hat, 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 ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ * 02111-1307, USA. ++ * ++ * Written by: Dave Airlie ++ * Based on other renderer drivers written by Ray Strode ++ */ ++#ifndef PLY_RENDERER_DUMB_DRIVER_H ++#define PLY_RENDERER_DUMB_DRIVER_H ++ ++#include "ply-renderer-driver.h" ++ ++#ifndef PLY_HIDE_FUNCTION_DECLARATIONS ++ply_renderer_driver_interface_t *ply_renderer_generic_driver_get_interface (int device_fd); ++#endif ++ ++#endif /* PLY_RENDERER_GENERIC_DRIVER_H */ ++/* vim: set ts=4 sw=4 et ai ci cino={.5s,^-2,+.5s,t0,g0,e-2,n-2,p2s,(0,=.5s,:.5s */ +-- +1.7.9.5 +