Hello community,

here is the log from the commit of package libdrm for openSUSE:Factory checked 
in at 2015-08-21 12:42:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdrm (Old)
 and      /work/SRC/openSUSE:Factory/.libdrm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdrm"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdrm/libdrm.changes    2015-08-17 
17:26:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libdrm.new/libdrm.changes       2015-08-21 
12:42:43.000000000 +0200
@@ -1,0 +2,30 @@
+Wed Aug 19 14:18:09 UTC 2015 - tobias.johannes.klausm...@mni.thm.de
+
+- Add libdrm_amdgpu1 as a requirement for libdrm-devel
+
+-------------------------------------------------------------------
+Tue Aug 18 20:14:40 UTC 2015 - zai...@opensuse.org
+
+- Update to version 2.4.64:
+  + amdgpu:
+    - Improve amdgpu_vamgr_init.
+    - Add flag to support 32bit VA address v4.
+    - Make vamgr per device v2.
+  + tests/amdgpu:
+    - Include config.h first.
+    - Remove unused local variable 'i'.
+  + freedreno/msm:
+    - Reorg ringbuffer struct.
+    - Fix issue where same bo is on multiple rings.
+    - Dump out submit info on error.
+  + freedreno:
+    - Add fd_pipe_wait_timeout().
+    - Update freedreno-symbol-check.
+  + tests: modetest: Accept connector names in addition to
+    connector IDs.
+  + libdrm:
+    - Remove gratuitous blank lines.
+    - Make indentation consistent.
+- Use url to tarball as source.
+
+-------------------------------------------------------------------

Old:
----
  libdrm-2.4.63.tar.bz2

New:
----
  libdrm-2.4.64.tar.bz2

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

Other differences:
------------------
++++++ libdrm.spec ++++++
--- /var/tmp/diff_new_pack.XuIHbi/_old  2015-08-21 12:42:43.000000000 +0200
+++ /var/tmp/diff_new_pack.XuIHbi/_new  2015-08-21 12:42:43.000000000 +0200
@@ -18,7 +18,7 @@
 
 Name:           libdrm
 Url:            http://dri.freedesktop.org/
-Version:        2.4.63
+Version:        2.4.64
 Release:        0
 Provides:       libdrm23 = %{version}
 Obsoletes:      libdrm23 < %{version}
@@ -35,7 +35,7 @@
 #Git-Clone:    git://anongit.freedesktop.org/git/mesa/drm
 #Git-Web:      http://cgit.freedesktop.org/mesa/drm/
 # Source URL:   http://dri.freedesktop.org/libdrm/
-Source:         %{name}-%{version}.tar.bz2
+Source:         http://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.bz2
 Source2:        baselibs.conf
 # PATCH-FIX-UPSTREAM libdrm-implicit-defs.diff fdo#48599 -- Fix compiler 
warnings in tests/radeon/radeon_ttm.c
 Patch2:         u_Fix-compilation-on-systems-that-don-t-provide-O_CLOE.patch
@@ -70,6 +70,7 @@
 Summary:        Libraries, includes and more to develop libdrm applications
 Group:          Development/Libraries/X11
 Requires:       libdrm2 = %version
+Requires:       libdrm_amdgpu1 = %version
 Requires:       libdrm_nouveau2 = %version
 Requires:       libdrm_radeon1 = %version
 %ifarch %arm aarch64

++++++ libdrm-2.4.63.tar.bz2 -> libdrm-2.4.64.tar.bz2 ++++++
++++ 4614 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/amdgpu/amdgpu.h new/libdrm-2.4.64/amdgpu/amdgpu.h
--- old/libdrm-2.4.63/amdgpu/amdgpu.h   2015-08-14 14:12:40.000000000 +0200
+++ new/libdrm-2.4.64/amdgpu/amdgpu.h   2015-08-18 03:33:56.000000000 +0200
@@ -1075,6 +1075,11 @@
                             uint32_t *values);
 
 /**
+ * Flag to request VA address range in the 32bit address space
+*/
+#define AMDGPU_VA_RANGE_32_BIT         0x1
+
+/**
  * Allocate virtual address range
  *
  * \param dev - [in] Device handle. See #amdgpu_device_initialize()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/amdgpu/amdgpu_device.c 
new/libdrm-2.4.64/amdgpu/amdgpu_device.c
--- old/libdrm-2.4.63/amdgpu/amdgpu_device.c    2015-08-14 14:12:40.000000000 
+0200
+++ new/libdrm-2.4.64/amdgpu/amdgpu_device.c    2015-08-18 03:33:56.000000000 
+0200
@@ -43,6 +43,7 @@
 #include "amdgpu_drm.h"
 #include "amdgpu_internal.h"
 #include "util_hash_table.h"
+#include "util_math.h"
 
 #define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x)))
 #define UINT_TO_PTR(x) ((void *)((intptr_t)(x)))
@@ -129,7 +130,8 @@
 
 static void amdgpu_device_free_internal(amdgpu_device_handle dev)
 {
-       amdgpu_vamgr_reference(&dev->vamgr, NULL);
+       amdgpu_vamgr_deinit(dev->vamgr);
+       free(dev->vamgr);
        util_hash_table_destroy(dev->bo_flink_names);
        util_hash_table_destroy(dev->bo_handles);
        pthread_mutex_destroy(&dev->bo_table_mutex);
@@ -173,6 +175,7 @@
        int flag_auth = 0;
        int flag_authexist=0;
        uint32_t accel_working = 0;
+       uint64_t start, max;
 
        *device_handle = NULL;
 
@@ -249,7 +252,26 @@
        if (r)
                goto cleanup;
 
-       dev->vamgr = amdgpu_vamgr_get_global(dev);
+       dev->vamgr = calloc(1, sizeof(struct amdgpu_bo_va_mgr));
+       if (dev->vamgr == NULL)
+               goto cleanup;
+
+       amdgpu_vamgr_init(dev->vamgr, dev->dev_info.virtual_address_offset,
+                         dev->dev_info.virtual_address_max,
+                         dev->dev_info.virtual_address_alignment);
+
+       max = MIN2(dev->dev_info.virtual_address_max, 0xffffffff);
+       start = amdgpu_vamgr_find_va(dev->vamgr,
+                                    max - dev->dev_info.virtual_address_offset,
+                                    dev->dev_info.virtual_address_alignment, 
0);
+       if (start > 0xffffffff)
+               goto free_va; /* shouldn't get here */
+
+       dev->vamgr_32 =  calloc(1, sizeof(struct amdgpu_bo_va_mgr));
+       if (dev->vamgr_32 == NULL)
+               goto free_va;
+       amdgpu_vamgr_init(dev->vamgr_32, start, max,
+                         dev->dev_info.virtual_address_alignment);
 
        *major_version = dev->major_version;
        *minor_version = dev->minor_version;
@@ -259,6 +281,13 @@
 
        return 0;
 
+free_va:
+       r = -ENOMEM;
+       amdgpu_vamgr_free_va(dev->vamgr, start,
+                            max - dev->dev_info.virtual_address_offset);
+       amdgpu_vamgr_deinit(dev->vamgr);
+       free(dev->vamgr);
+
 cleanup:
        if (dev->fd >= 0)
                close(dev->fd);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/amdgpu/amdgpu_internal.h 
new/libdrm-2.4.64/amdgpu/amdgpu_internal.h
--- old/libdrm-2.4.63/amdgpu/amdgpu_internal.h  2015-08-14 14:12:40.000000000 
+0200
+++ new/libdrm-2.4.64/amdgpu/amdgpu_internal.h  2015-08-18 03:33:56.000000000 
+0200
@@ -52,7 +52,6 @@
 };
 
 struct amdgpu_bo_va_mgr {
-       atomic_t refcount;
        /* the start virtual address */
        uint64_t va_offset;
        uint64_t va_max;
@@ -66,6 +65,7 @@
        uint64_t address;
        uint64_t size;
        enum amdgpu_gpu_va_range range;
+       struct amdgpu_bo_va_mgr *vamgr;
 };
 
 struct amdgpu_device {
@@ -83,7 +83,10 @@
        pthread_mutex_t bo_table_mutex;
        struct drm_amdgpu_info_device dev_info;
        struct amdgpu_gpu_info info;
+       /** The global VA manager for the whole virtual address space */
        struct amdgpu_bo_va_mgr *vamgr;
+       /** The VA manager for the 32bit address space */
+       struct amdgpu_bo_va_mgr *vamgr_32;
 };
 
 struct amdgpu_bo {
@@ -121,12 +124,10 @@
 
 drm_private void amdgpu_bo_free_internal(amdgpu_bo_handle bo);
 
-drm_private struct amdgpu_bo_va_mgr*
-amdgpu_vamgr_get_global(struct amdgpu_device *dev);
+drm_private void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, uint64_t 
start,
+                      uint64_t max, uint64_t alignment);
 
-drm_private void
-amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst,
-                      struct amdgpu_bo_va_mgr *src);
+drm_private void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr);
 
 drm_private uint64_t
 amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/amdgpu/amdgpu_vamgr.c new/libdrm-2.4.64/amdgpu/amdgpu_vamgr.c
--- old/libdrm-2.4.63/amdgpu/amdgpu_vamgr.c     2015-08-14 14:12:40.000000000 
+0200
+++ new/libdrm-2.4.64/amdgpu/amdgpu_vamgr.c     2015-08-18 03:33:56.000000000 
+0200
@@ -33,8 +33,6 @@
 #include "amdgpu_internal.h"
 #include "util_math.h"
 
-static struct amdgpu_bo_va_mgr vamgr = {{0}};
-
 int amdgpu_va_range_query(amdgpu_device_handle dev,
                          enum amdgpu_gpu_va_range type, uint64_t *start, 
uint64_t *end)
 {
@@ -46,17 +44,18 @@
        return -EINVAL;
 }
 
-static void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, struct 
amdgpu_device *dev)
+drm_private void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, uint64_t 
start,
+                             uint64_t max, uint64_t alignment)
 {
-       mgr->va_offset = dev->dev_info.virtual_address_offset;
-       mgr->va_max = dev->dev_info.virtual_address_max;
-       mgr->va_alignment = dev->dev_info.virtual_address_alignment;
+       mgr->va_offset = start;
+       mgr->va_max = max;
+       mgr->va_alignment = alignment;
 
        list_inithead(&mgr->va_holes);
        pthread_mutex_init(&mgr->bo_va_mutex, NULL);
 }
 
-static void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr)
+drm_private void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr)
 {
        struct amdgpu_bo_va_hole *hole;
        LIST_FOR_EACH_ENTRY(hole, &mgr->va_holes, list) {
@@ -66,26 +65,6 @@
        pthread_mutex_destroy(&mgr->bo_va_mutex);
 }
 
-drm_private struct amdgpu_bo_va_mgr *
-amdgpu_vamgr_get_global(struct amdgpu_device *dev)
-{
-       int ref;
-       ref = atomic_inc_return(&vamgr.refcount);
-
-       if (ref == 1)
-               amdgpu_vamgr_init(&vamgr, dev);
-       return &vamgr;
-}
-
-drm_private void
-amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst,
-                      struct amdgpu_bo_va_mgr *src)
-{
-       if (update_references(&(*dst)->refcount, NULL))
-               amdgpu_vamgr_deinit(*dst);
-       *dst = src;
-}
-
 drm_private uint64_t
 amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
                     uint64_t alignment, uint64_t base_required)
@@ -102,7 +81,7 @@
        pthread_mutex_lock(&mgr->bo_va_mutex);
        /* TODO: using more appropriate way to track the holes */
        /* first look for a hole */
-       LIST_FOR_EACH_ENTRY_SAFE(hole, n, &vamgr.va_holes, list) {
+       LIST_FOR_EACH_ENTRY_SAFE(hole, n, &mgr->va_holes, list) {
                if (base_required) {
                        if(hole->offset > base_required ||
                                (hole->offset + hole->size) < (base_required + 
size))
@@ -252,23 +231,39 @@
                          amdgpu_va_handle *va_range_handle,
                          uint64_t flags)
 {
-       va_base_alignment = MAX2(va_base_alignment, dev->vamgr->va_alignment);
-       size = ALIGN(size, vamgr.va_alignment);
+       struct amdgpu_bo_va_mgr *vamgr;
+
+       if (flags & AMDGPU_VA_RANGE_32_BIT)
+               vamgr = dev->vamgr_32;
+       else
+               vamgr = dev->vamgr;
 
-       *va_base_allocated = amdgpu_vamgr_find_va(dev->vamgr, size,
+       va_base_alignment = MAX2(va_base_alignment, vamgr->va_alignment);
+       size = ALIGN(size, vamgr->va_alignment);
+
+       *va_base_allocated = amdgpu_vamgr_find_va(vamgr, size,
                                        va_base_alignment, va_base_required);
 
+       if (!(flags & AMDGPU_VA_RANGE_32_BIT) &&
+           (*va_base_allocated == AMDGPU_INVALID_VA_ADDRESS)) {
+               /* fallback to 32bit address */
+               vamgr = dev->vamgr_32;
+               *va_base_allocated = amdgpu_vamgr_find_va(vamgr, size,
+                                       va_base_alignment, va_base_required);
+       }
+
        if (*va_base_allocated != AMDGPU_INVALID_VA_ADDRESS) {
                struct amdgpu_va* va;
                va = calloc(1, sizeof(struct amdgpu_va));
                if(!va){
-                       amdgpu_vamgr_free_va(dev->vamgr, *va_base_allocated, 
size);
+                       amdgpu_vamgr_free_va(vamgr, *va_base_allocated, size);
                        return -ENOMEM;
                }
                va->dev = dev;
                va->address = *va_base_allocated;
                va->size = size;
                va->range = va_range_type;
+               va->vamgr = vamgr;
                *va_range_handle = va;
        } else {
                return -EINVAL;
@@ -281,7 +276,9 @@
 {
        if(!va_range_handle || !va_range_handle->address)
                return 0;
-       amdgpu_vamgr_free_va(va_range_handle->dev->vamgr, 
va_range_handle->address,
+
+       amdgpu_vamgr_free_va(va_range_handle->vamgr,
+                       va_range_handle->address,
                        va_range_handle->size);
        free(va_range_handle);
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/build-aux/compile new/libdrm-2.4.64/build-aux/compile
--- old/libdrm-2.4.63/build-aux/compile 2015-08-14 14:16:21.000000000 +0200
+++ new/libdrm-2.4.64/build-aux/compile 2015-08-18 17:57:14.000000000 +0200
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/build-aux/missing new/libdrm-2.4.64/build-aux/missing
--- old/libdrm-2.4.63/build-aux/missing 2015-08-14 14:16:21.000000000 +0200
+++ new/libdrm-2.4.64/build-aux/missing 2015-08-18 17:57:14.000000000 +0200
@@ -3,7 +3,7 @@
 
 scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/build-aux/test-driver new/libdrm-2.4.64/build-aux/test-driver
--- old/libdrm-2.4.63/build-aux/test-driver     2015-08-14 14:16:22.000000000 
+0200
+++ new/libdrm-2.4.64/build-aux/test-driver     2015-08-18 17:57:15.000000000 
+0200
@@ -3,7 +3,7 @@
 
 scriptversion=2013-07-13.22; # UTC
 
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 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
@@ -106,11 +106,14 @@
 # Test script is run here.
 "$@" >$log_file 2>&1
 estatus=$?
+
 if test $enable_hard_errors = no && test $estatus -eq 99; then
-  estatus=1
+  tweaked_estatus=1
+else
+  tweaked_estatus=$estatus
 fi
 
-case $estatus:$expect_failure in
+case $tweaked_estatus:$expect_failure in
   0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
   0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
   77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
@@ -119,6 +122,12 @@
   *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
 esac
 
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
 # Report outcome to console.
 echo "${col}${res}${std}: $test_name"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/configure.ac new/libdrm-2.4.64/configure.ac
--- old/libdrm-2.4.63/configure.ac      2015-08-14 14:15:48.000000000 +0200
+++ new/libdrm-2.4.64/configure.ac      2015-08-18 16:53:56.000000000 +0200
@@ -20,7 +20,7 @@
 
 AC_PREREQ([2.63])
 AC_INIT([libdrm],
-        [2.4.63],
+        [2.4.64],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
         [libdrm])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/freedreno-symbol-check 
new/libdrm-2.4.64/freedreno/freedreno-symbol-check
--- old/libdrm-2.4.63/freedreno/freedreno-symbol-check  2015-08-14 
00:27:03.000000000 +0200
+++ new/libdrm-2.4.64/freedreno/freedreno-symbol-check  2015-08-18 
16:53:56.000000000 +0200
@@ -32,6 +32,7 @@
 fd_pipe_get_param
 fd_pipe_new
 fd_pipe_wait
+fd_pipe_wait_timeout
 fd_ringbuffer_del
 fd_ringbuffer_emit_reloc_ring
 fd_ringbuffer_flush
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/freedreno_drmif.h 
new/libdrm-2.4.64/freedreno/freedreno_drmif.h
--- old/libdrm-2.4.63/freedreno/freedreno_drmif.h       2015-04-07 
12:36:25.000000000 +0200
+++ new/libdrm-2.4.64/freedreno/freedreno_drmif.h       2015-08-17 
16:35:08.000000000 +0200
@@ -86,6 +86,9 @@
 int fd_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
                uint64_t *value);
 int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp);
+/* timeout in nanosec */
+int fd_pipe_wait_timeout(struct fd_pipe *pipe, uint32_t timestamp,
+               uint64_t timeout);
 
 
 /* buffer-object functions:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/freedreno_pipe.c 
new/libdrm-2.4.64/freedreno/freedreno_pipe.c
--- old/libdrm-2.4.63/freedreno/freedreno_pipe.c        2015-08-14 
00:27:03.000000000 +0200
+++ new/libdrm-2.4.64/freedreno/freedreno_pipe.c        2015-08-17 
16:35:08.000000000 +0200
@@ -72,5 +72,11 @@
 
 int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
 {
-       return pipe->funcs->wait(pipe, timestamp);
+       return fd_pipe_wait_timeout(pipe, timestamp, ~0);
+}
+
+int fd_pipe_wait_timeout(struct fd_pipe *pipe, uint32_t timestamp,
+               uint64_t timeout)
+{
+       return pipe->funcs->wait(pipe, timestamp, timeout);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/freedreno_priv.h 
new/libdrm-2.4.64/freedreno/freedreno_priv.h
--- old/libdrm-2.4.63/freedreno/freedreno_priv.h        2015-08-14 
00:27:03.000000000 +0200
+++ new/libdrm-2.4.64/freedreno/freedreno_priv.h        2015-08-17 
16:35:08.000000000 +0200
@@ -100,7 +100,7 @@
 struct fd_pipe_funcs {
        struct fd_ringbuffer * (*ringbuffer_new)(struct fd_pipe *pipe, uint32_t 
size);
        int (*get_param)(struct fd_pipe *pipe, enum fd_param_id param, uint64_t 
*value);
-       int (*wait)(struct fd_pipe *pipe, uint32_t timestamp);
+       int (*wait)(struct fd_pipe *pipe, uint32_t timestamp, uint64_t timeout);
        void (*destroy)(struct fd_pipe *pipe);
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/kgsl/kgsl_pipe.c 
new/libdrm-2.4.64/freedreno/kgsl/kgsl_pipe.c
--- old/libdrm-2.4.63/freedreno/kgsl/kgsl_pipe.c        2015-08-14 
00:27:03.000000000 +0200
+++ new/libdrm-2.4.64/freedreno/kgsl/kgsl_pipe.c        2015-08-17 
16:35:08.000000000 +0200
@@ -56,7 +56,8 @@
        }
 }
 
-static int kgsl_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
+static int kgsl_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp,
+               uint64_t timeout)
 {
        struct kgsl_pipe *kgsl_pipe = to_kgsl_pipe(pipe);
        struct kgsl_device_waittimestamp req = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/msm/msm_bo.c 
new/libdrm-2.4.64/freedreno/msm/msm_bo.c
--- old/libdrm-2.4.63/freedreno/msm/msm_bo.c    2015-08-14 00:27:03.000000000 
+0200
+++ new/libdrm-2.4.64/freedreno/msm/msm_bo.c    2015-08-17 16:35:08.000000000 
+0200
@@ -75,7 +75,7 @@
                        .op = op,
        };
 
-       get_abs_timeout(&req.timeout, 5000);
+       get_abs_timeout(&req.timeout, 5000000000);
 
        return drmCommandWrite(bo->dev->fd, DRM_MSM_GEM_CPU_PREP, &req, 
sizeof(req));
 }
@@ -129,7 +129,6 @@
 {
        struct msm_bo *msm_bo;
        struct fd_bo *bo;
-       unsigned i;
 
        msm_bo = calloc(1, sizeof(*msm_bo));
        if (!msm_bo)
@@ -139,8 +138,5 @@
        bo->funcs = &funcs;
        bo->fd = -1;
 
-       for (i = 0; i < ARRAY_SIZE(msm_bo->list); i++)
-               list_inithead(&msm_bo->list[i]);
-
        return bo;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/msm/msm_pipe.c 
new/libdrm-2.4.64/freedreno/msm/msm_pipe.c
--- old/libdrm-2.4.63/freedreno/msm/msm_pipe.c  2015-08-14 00:27:03.000000000 
+0200
+++ new/libdrm-2.4.64/freedreno/msm/msm_pipe.c  2015-08-17 16:35:08.000000000 
+0200
@@ -54,7 +54,8 @@
        }
 }
 
-static int msm_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
+static int msm_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp,
+               uint64_t timeout)
 {
        struct fd_device *dev = pipe->dev;
        struct drm_msm_wait_fence req = {
@@ -62,7 +63,7 @@
        };
        int ret;
 
-       get_abs_timeout(&req.timeout, 5000);
+       get_abs_timeout(&req.timeout, timeout);
 
        ret = drmCommandWrite(dev->fd, DRM_MSM_WAIT_FENCE, &req, sizeof(req));
        if (ret) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/msm/msm_priv.h 
new/libdrm-2.4.64/freedreno/msm/msm_priv.h
--- old/libdrm-2.4.63/freedreno/msm/msm_priv.h  2015-08-14 00:27:03.000000000 
+0200
+++ new/libdrm-2.4.64/freedreno/msm/msm_priv.h  2015-08-17 16:35:08.000000000 
+0200
@@ -71,8 +71,19 @@
        struct fd_bo base;
        uint64_t offset;
        uint64_t presumed;
-       uint32_t indexp1[FD_PIPE_MAX]; /* index plus 1 */
-       struct list_head list[FD_PIPE_MAX];
+       /* in the common case, a bo won't be referenced by more than a single
+        * (parent) ring[*].  So to avoid looping over all the bo's in the
+        * reloc table to find the idx of a bo that might already be in the
+        * table, we cache the idx in the bo.  But in order to detect the
+        * slow-path where bo is ref'd in multiple rb's, we also must track
+        * the current_ring for which the idx is valid.  See bo2idx().
+        *
+        * [*] in case multiple ringbuffers, ie. one toplevel and other rb(s)
+        *     used for IB target(s), the toplevel rb is the parent which is
+        *     tracking bo's for the submit
+        */
+       struct fd_ringbuffer *current_ring;
+       uint32_t idx;
 };
 
 static inline struct msm_bo * to_msm_bo(struct fd_bo *x)
@@ -85,13 +96,13 @@
 drm_private struct fd_bo * msm_bo_from_handle(struct fd_device *dev,
                uint32_t size, uint32_t handle);
 
-static inline void get_abs_timeout(struct drm_msm_timespec *tv, uint32_t ms)
+static inline void get_abs_timeout(struct drm_msm_timespec *tv, uint64_t ns)
 {
        struct timespec t;
-       uint32_t s = ms / 1000;
+       uint32_t s = ns / 1000000000;
        clock_gettime(CLOCK_MONOTONIC, &t);
        tv->tv_sec = t.tv_sec + s;
-       tv->tv_nsec = t.tv_nsec + ((ms - (s * 1000)) * 1000000);
+       tv->tv_nsec = t.tv_nsec + ns - (s * 1000000000);
 }
 
 #endif /* MSM_PRIV_H_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/freedreno/msm/msm_ringbuffer.c 
new/libdrm-2.4.64/freedreno/msm/msm_ringbuffer.c
--- old/libdrm-2.4.63/freedreno/msm/msm_ringbuffer.c    2015-08-14 
00:27:03.000000000 +0200
+++ new/libdrm-2.4.64/freedreno/msm/msm_ringbuffer.c    2015-08-17 
16:35:08.000000000 +0200
@@ -31,6 +31,7 @@
 #endif
 
 #include <assert.h>
+#include <inttypes.h>
 
 #include "freedreno_ringbuffer.h"
 #include "msm_priv.h"
@@ -39,23 +40,32 @@
        struct fd_ringbuffer base;
        struct fd_bo *ring_bo;
 
-       struct list_head submit_list;
+       /* submit ioctl related tables: */
+       struct {
+               /* bo's table: */
+               struct drm_msm_gem_submit_bo *bos;
+               uint32_t nr_bos, max_bos;
+
+               /* cmd's table: */
+               struct drm_msm_gem_submit_cmd *cmds;
+               uint32_t nr_cmds, max_cmds;
+
+               /* reloc's table: */
+               struct drm_msm_gem_submit_reloc *relocs;
+               uint32_t nr_relocs, max_relocs;
+       } submit;
 
-       /* bo's table: */
-       struct drm_msm_gem_submit_bo *bos;
+       /* should have matching entries in submit.bos: */
+       struct fd_bo **bos;
        uint32_t nr_bos, max_bos;
 
-       /* cmd's table: */
-       struct drm_msm_gem_submit_cmd *cmds;
-       uint32_t nr_cmds, max_cmds;
+       /* should have matching entries in submit.cmds: */
        struct fd_ringbuffer **rings;
        uint32_t nr_rings, max_rings;
-
-       /* reloc's table: */
-       struct drm_msm_gem_submit_reloc *relocs;
-       uint32_t nr_relocs, max_relocs;
 };
 
+static pthread_mutex_t idx_lock = PTHREAD_MUTEX_INITIALIZER;
+
 static void *grow(void *ptr, uint32_t nr, uint32_t *max, uint32_t sz)
 {
        if ((nr + 1) > *max) {
@@ -78,31 +88,51 @@
        return (struct msm_ringbuffer *)x;
 }
 
+static uint32_t append_bo(struct fd_ringbuffer *ring, struct fd_bo *bo)
+{
+       struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring);
+       uint32_t idx;
+
+       idx = APPEND(&msm_ring->submit, bos);
+       idx = APPEND(msm_ring, bos);
+
+       msm_ring->submit.bos[idx].flags = 0;
+       msm_ring->submit.bos[idx].handle = bo->handle;
+       msm_ring->submit.bos[idx].presumed = to_msm_bo(bo)->presumed;
+
+       msm_ring->bos[idx] = fd_bo_ref(bo);
+
+       return idx;
+}
+
 /* add (if needed) bo, return idx: */
 static uint32_t bo2idx(struct fd_ringbuffer *ring, struct fd_bo *bo, uint32_t 
flags)
 {
        struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring);
        struct msm_bo *msm_bo = to_msm_bo(bo);
-       int id = ring->pipe->id;
        uint32_t idx;
-       if (!msm_bo->indexp1[id]) {
-               struct list_head *list = &msm_bo->list[id];
-               idx = APPEND(msm_ring, bos);
-               msm_ring->bos[idx].flags = 0;
-               msm_ring->bos[idx].handle = bo->handle;
-               msm_ring->bos[idx].presumed = msm_bo->presumed;
-               msm_bo->indexp1[id] = idx + 1;
-
-               assert(LIST_IS_EMPTY(list));
-               fd_bo_ref(bo);
-               list_addtail(list, &msm_ring->submit_list);
+       pthread_mutex_lock(&idx_lock);
+       if (!msm_bo->current_ring) {
+               idx = append_bo(ring, bo);
+               msm_bo->current_ring = ring;
+               msm_bo->idx = idx;
+       } else if (msm_bo->current_ring == ring) {
+               idx = msm_bo->idx;
        } else {
-               idx = msm_bo->indexp1[id] - 1;
+               /* slow-path: */
+               for (idx = 0; idx < msm_ring->nr_bos; idx++)
+                       if (msm_ring->bos[idx] == bo)
+                               break;
+               if (idx == msm_ring->nr_bos) {
+                       /* not found */
+                       idx = append_bo(ring, bo);
+               }
        }
+       pthread_mutex_unlock(&idx_lock);
        if (flags & FD_RELOC_READ)
-               msm_ring->bos[idx].flags |= MSM_SUBMIT_BO_READ;
+               msm_ring->submit.bos[idx].flags |= MSM_SUBMIT_BO_READ;
        if (flags & FD_RELOC_WRITE)
-               msm_ring->bos[idx].flags |= MSM_SUBMIT_BO_WRITE;
+               msm_ring->submit.bos[idx].flags |= MSM_SUBMIT_BO_WRITE;
        return idx;
 }
 
@@ -110,7 +140,7 @@
                struct drm_msm_gem_submit_cmd *cmd, struct fd_bo *bo)
 {
        struct msm_ringbuffer *msm_ring = to_msm_ringbuffer(ring);
-       return msm_ring->bos[cmd->submit_idx].handle == bo->handle;
+       return msm_ring->submit.bos[cmd->submit_idx].handle == bo->handle;
 }
 
 static uint32_t offset_bytes(void *end, void *start)
@@ -127,8 +157,8 @@
        uint32_t i;
 
        /* figure out if we already have a cmd buf: */
-       for (i = 0; i < msm_ring->nr_cmds; i++) {
-               cmd = &msm_ring->cmds[i];
+       for (i = 0; i < msm_ring->submit.nr_cmds; i++) {
+               cmd = &msm_ring->submit.cmds[i];
                if ((cmd->submit_offset == submit_offset) &&
                                (cmd->size == size) &&
                                (cmd->type == type) &&
@@ -139,10 +169,10 @@
 
        /* create cmd buf if not: */
        if (!cmd) {
-               uint32_t idx = APPEND(msm_ring, cmds);
+               uint32_t idx = APPEND(&msm_ring->submit, cmds);
                APPEND(msm_ring, rings);
                msm_ring->rings[idx] = target_ring;
-               cmd = &msm_ring->cmds[idx];
+               cmd = &msm_ring->submit.cmds[idx];
                cmd->type = type;
                cmd->submit_idx = bo2idx(ring, target_bo, FD_RELOC_READ);
                cmd->submit_offset = submit_offset;
@@ -165,8 +195,8 @@
        uint32_t i;
 
        /* a binary search would be more clever.. */
-       for (i = start; i < msm_ring->nr_relocs; i++) {
-               struct drm_msm_gem_submit_reloc *reloc = &msm_ring->relocs[i];
+       for (i = start; i < msm_ring->submit.nr_relocs; i++) {
+               struct drm_msm_gem_submit_reloc *reloc = 
&msm_ring->submit.relocs[i];
                if (reloc->submit_offset >= offset)
                        return i;
        }
@@ -180,13 +210,15 @@
        unsigned i;
 
        /* for each of the cmd buffers, clear their reloc's: */
-       for (i = 0; i < msm_ring->nr_cmds; i++) {
+       for (i = 0; i < msm_ring->submit.nr_cmds; i++) {
                struct msm_ringbuffer *target_ring = 
to_msm_ringbuffer(msm_ring->rings[i]);
-               target_ring->nr_relocs = 0;
+               target_ring->submit.nr_relocs = 0;
        }
 
-       msm_ring->nr_relocs = 0;
-       msm_ring->nr_cmds = 0;
+       msm_ring->submit.nr_relocs = 0;
+       msm_ring->submit.nr_cmds = 0;
+       msm_ring->submit.nr_bos = 0;
+       msm_ring->nr_rings = 0;
        msm_ring->nr_bos = 0;
 }
 
@@ -197,9 +229,8 @@
        struct drm_msm_gem_submit req = {
                        .pipe = to_msm_pipe(ring->pipe)->pipe,
        };
-       struct msm_bo *msm_bo = NULL, *tmp;
-       uint32_t i, submit_offset, size;
-       int ret, id = ring->pipe->id;
+       uint32_t i, j, submit_offset, size;
+       int ret;
 
        submit_offset = offset_bytes(last_start, ring->start);
        size = offset_bytes(ring->cur, last_start);
@@ -207,18 +238,18 @@
        get_cmd(ring, ring, ring_bo, submit_offset, size, MSM_SUBMIT_CMD_BUF);
 
        /* needs to be after get_cmd() as that could create bos/cmds table: */
-       req.bos = VOID2U64(msm_ring->bos),
-       req.nr_bos = msm_ring->nr_bos;
-       req.cmds = VOID2U64(msm_ring->cmds),
-       req.nr_cmds = msm_ring->nr_cmds;
+       req.bos = VOID2U64(msm_ring->submit.bos),
+       req.nr_bos = msm_ring->submit.nr_bos;
+       req.cmds = VOID2U64(msm_ring->submit.cmds),
+       req.nr_cmds = msm_ring->submit.nr_cmds;
 
        /* for each of the cmd's fix up their reloc's: */
-       for (i = 0; i < msm_ring->nr_cmds; i++) {
-               struct drm_msm_gem_submit_cmd *cmd = &msm_ring->cmds[i];
+       for (i = 0; i < msm_ring->submit.nr_cmds; i++) {
+               struct drm_msm_gem_submit_cmd *cmd = &msm_ring->submit.cmds[i];
                struct msm_ringbuffer *target_ring = 
to_msm_ringbuffer(msm_ring->rings[i]);
                uint32_t a = find_next_reloc_idx(target_ring, 0, 
cmd->submit_offset);
                uint32_t b = find_next_reloc_idx(target_ring, a, 
cmd->submit_offset + cmd->size);
-               cmd->relocs = VOID2U64(&target_ring->relocs[a]);
+               cmd->relocs = VOID2U64(&target_ring->submit.relocs[a]);
                cmd->nr_relocs = (b > a) ? b - a : 0;
        }
 
@@ -228,19 +259,35 @@
                        &req, sizeof(req));
        if (ret) {
                ERROR_MSG("submit failed: %d (%s)", ret, strerror(errno));
+               ERROR_MSG("  pipe:  %u", req.pipe);
+               for (i = 0; i < msm_ring->submit.nr_bos; i++) {
+                       struct drm_msm_gem_submit_bo *bo = 
&msm_ring->submit.bos[i];
+                       ERROR_MSG("  bos[%d]: handle=%u, flags=%x", i, 
bo->handle, bo->flags);
+               }
+               for (i = 0; i < msm_ring->submit.nr_cmds; i++) {
+                       struct drm_msm_gem_submit_cmd *cmd = 
&msm_ring->submit.cmds[i];
+                       struct drm_msm_gem_submit_reloc *relocs = 
U642VOID(cmd->relocs);
+                       ERROR_MSG("  cmd[%d]: type=%u, submit_idx=%u, 
submit_offset=%u, size=%u\n",
+                                       i, cmd->type, cmd->submit_idx, 
cmd->submit_offset, cmd->size);
+                       for (j = 0; j < cmd->nr_relocs; j++) {
+                               struct drm_msm_gem_submit_reloc *r = &relocs[j];
+                               ERROR_MSG("    reloc[%d]: submit_offset=%u, 
or=%08x, shift=%d, reloc_idx=%u"
+                                               ", reloc_offset=%"PRIu64, j, 
r->submit_offset, r->or, r->shift,
+                                               r->reloc_idx, r->reloc_offset);
+                       }
+               }
        } else {
                /* update timestamp on all rings associated with submit: */
-               for (i = 0; i < msm_ring->nr_cmds; i++) {
+               for (i = 0; i < msm_ring->submit.nr_cmds; i++) {
                        struct fd_ringbuffer *target_ring = msm_ring->rings[i];
                        if (!ret)
                                target_ring->last_timestamp = req.fence;
                }
        }
 
-       LIST_FOR_EACH_ENTRY_SAFE(msm_bo, tmp, &msm_ring->submit_list, list[id]) 
{
-               struct list_head *list = &msm_bo->list[id];
-               list_delinit(list);
-               msm_bo->indexp1[id] = 0;
+       for (i = 0; i < msm_ring->nr_bos; i++) {
+               struct msm_bo *msm_bo = to_msm_bo(msm_ring->bos[i]);
+               msm_bo->current_ring = NULL;
                fd_bo_del(&msm_bo->base);
        }
 
@@ -261,10 +308,10 @@
        struct fd_ringbuffer *parent = ring->parent ? ring->parent : ring;
        struct msm_bo *msm_bo = to_msm_bo(r->bo);
        struct drm_msm_gem_submit_reloc *reloc;
-       uint32_t idx = APPEND(msm_ring, relocs);
+       uint32_t idx = APPEND(&msm_ring->submit, relocs);
        uint32_t addr;
 
-       reloc = &msm_ring->relocs[idx];
+       reloc = &msm_ring->submit.relocs[idx];
 
        reloc->reloc_idx = bo2idx(parent, r->bo, r->flags);
        reloc->reloc_offset = r->offset;
@@ -333,8 +380,6 @@
        ring = &msm_ring->base;
        ring->funcs = &funcs;
 
-       list_inithead(&msm_ring->submit_list);
-
        msm_ring->ring_bo = fd_bo_new(pipe->dev, size, 0);
        if (!msm_ring->ring_bo) {
                ERROR_MSG("ringbuffer allocation failed");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/m4/libtool.m4 new/libdrm-2.4.64/m4/libtool.m4
--- old/libdrm-2.4.63/m4/libtool.m4     2015-08-14 14:16:18.000000000 +0200
+++ new/libdrm-2.4.64/m4/libtool.m4     2015-08-18 17:57:09.000000000 +0200
@@ -1324,19 +1324,12 @@
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           case `/usr/bin/file conftest.o` in
-             *x86-64*)
-               LD="${LD-ld} -m elf32_x86_64"
-               ;;
-             *)
-               LD="${LD-ld} -m elf_i386"
-               ;;
-           esac
+           LD="${LD-ld} -m elf_i386"
            ;;
-         powerpc64le-*)
+         powerpc64le-*linux*)
            LD="${LD-ld} -m elf32lppclinux"
            ;;
-         powerpc64-*)
+         powerpc64-*linux*)
            LD="${LD-ld} -m elf32ppclinux"
            ;;
          s390x-*linux*)
@@ -1355,10 +1348,10 @@
          x86_64-*linux*)
            LD="${LD-ld} -m elf_x86_64"
            ;;
-         powerpcle-*)
+         powerpcle-*linux*)
            LD="${LD-ld} -m elf64lppc"
            ;;
-         powerpc-*)
+         powerpc-*linux*)
            LD="${LD-ld} -m elf64ppc"
            ;;
          s390*-*linux*|s390*-*tpf*)
@@ -1701,8 +1694,7 @@
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len" && \
-       test undefined != "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$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
@@ -2526,6 +2518,17 @@
   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
@@ -2642,7 +2645,7 @@
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
@@ -2672,10 +2675,14 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 
2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < 
/etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ 
/g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -2687,18 +2694,6 @@
   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
@@ -3258,6 +3253,10 @@
   fi
   ;;
 
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3296,11 +3295,11 @@
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd* | netbsdelf*-gnu)
+netbsd*)
   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
@@ -4048,7 +4047,7 @@
            ;;
        esac
        ;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
        case $cc_basename in
          KCC*)
            # KAI C++ Compiler
@@ -4112,7 +4111,7 @@
            ;;
        esac
        ;;
-      netbsd* | netbsdelf*-gnu)
+      netbsd*)
        ;;
       *qnx* | *nto*)
         # QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4347,7 +4346,7 @@
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -4589,9 +4588,6 @@
       ;;
     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'
     ;;
@@ -4654,9 +4650,6 @@
   openbsd*)
     with_gnu_ld=no
     ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -4878,7 +4871,7 @@
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs 
$linker_flags -o $lib'
        wlarc=
@@ -5055,7 +5048,6 @@
        if test "$aix_use_runtimelinking" = yes; then
          shared_flag="$shared_flag "'${wl}-G'
        fi
-       _LT_TAGVAR(link_all_deplibs, $1)=no
       else
        # not using gcc
        if test "$host_cpu" = ia64; then
@@ -5360,7 +5352,7 @@
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       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
@@ -6240,6 +6232,9 @@
         _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(link_all_deplibs, $1)=yes
@@ -6401,7 +6396,7 @@
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
         case $cc_basename in
           KCC*)
            # Kuck and Associates, Inc. (KAI) C++ Compiler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/tests/amdgpu/amdgpu_test.c 
new/libdrm-2.4.64/tests/amdgpu/amdgpu_test.c
--- old/libdrm-2.4.63/tests/amdgpu/amdgpu_test.c        2015-08-14 
00:27:03.000000000 +0200
+++ new/libdrm-2.4.64/tests/amdgpu/amdgpu_test.c        2015-08-17 
16:08:11.000000000 +0200
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/tests/amdgpu/basic_tests.c 
new/libdrm-2.4.64/tests/amdgpu/basic_tests.c
--- old/libdrm-2.4.63/tests/amdgpu/basic_tests.c        2015-08-14 
14:12:40.000000000 +0200
+++ new/libdrm-2.4.64/tests/amdgpu/basic_tests.c        2015-08-17 
16:08:11.000000000 +0200
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/tests/amdgpu/bo_tests.c 
new/libdrm-2.4.64/tests/amdgpu/bo_tests.c
--- old/libdrm-2.4.63/tests/amdgpu/bo_tests.c   2015-08-14 00:27:03.000000000 
+0200
+++ new/libdrm-2.4.64/tests/amdgpu/bo_tests.c   2015-08-17 16:08:11.000000000 
+0200
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 
 #include "CUnit/Basic.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/tests/amdgpu/cs_tests.c 
new/libdrm-2.4.64/tests/amdgpu/cs_tests.c
--- old/libdrm-2.4.63/tests/amdgpu/cs_tests.c   2015-08-14 00:27:03.000000000 
+0200
+++ new/libdrm-2.4.64/tests/amdgpu/cs_tests.c   2015-08-17 16:08:11.000000000 
+0200
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 
 #include "CUnit/Basic.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/tests/amdgpu/vce_tests.c 
new/libdrm-2.4.64/tests/amdgpu/vce_tests.c
--- old/libdrm-2.4.63/tests/amdgpu/vce_tests.c  2015-08-14 00:27:03.000000000 
+0200
+++ new/libdrm-2.4.64/tests/amdgpu/vce_tests.c  2015-08-17 16:08:11.000000000 
+0200
@@ -21,6 +21,10 @@
  *
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <inttypes.h>
 
@@ -396,7 +400,7 @@
 static void amdgpu_cs_vce_encode(void)
 {
        uint32_t vbuf_size, bs_size = 0x154000, cpb_size;
-       int i, r;
+       int r;
 
        vbuf_size = enc.width * enc.height * 1.5;
        cpb_size = vbuf_size * 10;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/tests/modetest/modetest.c 
new/libdrm-2.4.64/tests/modetest/modetest.c
--- old/libdrm-2.4.63/tests/modetest/modetest.c 2015-08-14 00:27:03.000000000 
+0200
+++ new/libdrm-2.4.64/tests/modetest/modetest.c 2015-08-17 16:08:11.000000000 
+0200
@@ -77,6 +77,7 @@
        drmModeConnector *connector;
        drmModeObjectProperties *props;
        drmModePropertyRes **props_info;
+       char *name;
 };
 
 struct fb {
@@ -372,18 +373,18 @@
        int i, j;
 
        printf("Connectors:\n");
-       printf("id\tencoder\tstatus\t\ttype\tsize (mm)\tmodes\tencoders\n");
+       printf("id\tencoder\tstatus\t\tname\t\tsize (mm)\tmodes\tencoders\n");
        for (i = 0; i < dev->resources->res->count_connectors; i++) {
                struct connector *_connector = &dev->resources->connectors[i];
                drmModeConnector *connector = _connector->connector;
                if (!connector)
                        continue;
 
-               printf("%d\t%d\t%s\t%s\t%dx%d\t\t%d\t",
+               printf("%d\t%d\t%s\t%-15s\t%dx%d\t\t%d\t",
                       connector->connector_id,
                       connector->encoder_id,
                       connector_status_str(connector->connection),
-                      connector_type_str(connector->connector_type),
+                      _connector->name,
                       connector->mmWidth, connector->mmHeight,
                       connector->count_modes);
 
@@ -509,12 +510,13 @@
 
 static void free_resources(struct resources *res)
 {
+       int i;
+
        if (!res)
                return;
 
 #define free_resource(_res, __res, type, Type)                                 
\
        do {                                                                    
\
-               int i;                                                          
\
                if (!(_res)->type##s)                                           
\
                        break;                                                  
\
                for (i = 0; i < (int)(_res)->__res->count_##type##s; ++i) {     
\
@@ -527,7 +529,6 @@
 
 #define free_properties(_res, __res, type)                                     
\
        do {                                                                    
\
-               int i;                                                          
\
                for (i = 0; i < (int)(_res)->__res->count_##type##s; ++i) {     
\
                        drmModeFreeObjectProperties(res->type##s[i].props);     
\
                        free(res->type##s[i].props_info);                       
\
@@ -539,6 +540,10 @@
 
                free_resource(res, res, crtc, Crtc);
                free_resource(res, res, encoder, Encoder);
+
+               for (i = 0; i < res->res->count_connectors; i++)
+                       free(res->connectors[i].name);
+
                free_resource(res, res, connector, Connector);
                free_resource(res, res, fb, FB);
 
@@ -600,6 +605,15 @@
        get_resource(res, res, connector, Connector);
        get_resource(res, res, fb, FB);
 
+       /* Set the name of all connectors based on the type name and the 
per-type ID. */
+       for (i = 0; i < res->res->count_connectors; i++) {
+               struct connector *connector = &res->connectors[i];
+
+               asprintf(&connector->name, "%s-%u",
+                        
connector_type_str(connector->connector->connector_type),
+                        connector->connector->connector_type_id);
+       }
+
 #define get_properties(_res, __res, type, Type)                                
        \
        do {                                                                    
\
                int i;                                                          
\
@@ -666,6 +680,21 @@
        return -1;
 }
 
+static drmModeConnector *get_connector_by_name(struct device *dev, const char 
*name)
+{
+       struct connector *connector;
+       int i;
+
+       for (i = 0; i < dev->resources->res->count_connectors; i++) {
+               connector = &dev->resources->connectors[i];
+
+               if (strcmp(connector->name, name) == 0)
+                       return connector->connector;
+       }
+
+       return NULL;
+}
+
 static drmModeConnector *get_connector_by_id(struct device *dev, uint32_t id)
 {
        drmModeConnector *connector;
@@ -706,6 +735,7 @@
  * can bind it with a free crtc.
  */
 struct pipe_arg {
+       const char **cons;
        uint32_t *con_ids;
        unsigned int num_cons;
        uint32_t crtc_id;
@@ -821,8 +851,8 @@
                                           pipe->mode_str, pipe->vrefresh);
                if (mode == NULL) {
                        fprintf(stderr,
-                               "failed to find mode \"%s\" for connector %u\n",
-                               pipe->mode_str, pipe->con_ids[i]);
+                               "failed to find mode \"%s\" for connector %s\n",
+                               pipe->mode_str, pipe->cons[i]);
                        return -EINVAL;
                }
        }
@@ -1122,7 +1152,7 @@
                printf("setting mode %s-%dHz@%s on connectors ",
                       pipe->mode_str, pipe->mode->vrefresh, pipe->format_str);
                for (j = 0; j < pipe->num_cons; ++j)
-                       printf("%u, ", pipe->con_ids[j]);
+                       printf("%s, ", pipe->cons[j]);
                printf("crtc %d\n", pipe->crtc->crtc->crtc_id);
 
                ret = drmModeSetCrtc(dev->fd, pipe->crtc->crtc->crtc_id, fb_id,
@@ -1311,18 +1341,24 @@
 
        /* Count the number of connectors and allocate them. */
        pipe->num_cons = 1;
-       for (p = arg; isdigit(*p) || *p == ','; ++p) {
+       for (p = arg; *p && *p != ':' && *p != '@'; ++p) {
                if (*p == ',')
                        pipe->num_cons++;
        }
 
        pipe->con_ids = calloc(pipe->num_cons, sizeof(*pipe->con_ids));
-       if (pipe->con_ids == NULL)
+       pipe->cons = calloc(pipe->num_cons, sizeof(*pipe->cons));
+       if (pipe->con_ids == NULL || pipe->cons == NULL)
                return -1;
 
        /* Parse the connectors. */
        for (i = 0, p = arg; i < pipe->num_cons; ++i, p = endp + 1) {
-               pipe->con_ids[i] = strtoul(p, &endp, 10);
+               endp = strpbrk(p, ",@:");
+               if (!endp)
+                       break;
+
+               pipe->cons[i] = strndup(p, endp - p);
+
                if (*endp != ',')
                        break;
        }
@@ -1484,6 +1520,32 @@
        return 1;
 }
 
+static int pipe_resolve_connectors(struct device *dev, struct pipe_arg *pipe)
+{
+       drmModeConnector *connector;
+       unsigned int i;
+       uint32_t id;
+       char *endp;
+
+       for (i = 0; i < pipe->num_cons; i++) {
+               id = strtoul(pipe->cons[i], &endp, 10);
+               if (endp == pipe->cons[i]) {
+                       connector = get_connector_by_name(dev, pipe->cons[i]);
+                       if (!connector) {
+                               fprintf(stderr, "no connector named '%s'\n",
+                                       pipe->cons[i]);
+                               return -ENODEV;
+                       }
+
+                       id = connector->connector_id;
+               }
+
+               pipe->con_ids[i] = id;
+       }
+
+       return 0;
+}
+
 static char optstr[] = "cdD:efM:P:ps:Cvw:";
 
 int main(int argc, char **argv)
@@ -1499,7 +1561,7 @@
        char *device = NULL;
        char *module = NULL;
        unsigned int i;
-       int count = 0, plane_count = 0;
+       unsigned int count = 0, plane_count = 0;
        unsigned int prop_count = 0;
        struct pipe_arg *pipe_args = NULL;
        struct plane_arg *plane_args = NULL;
@@ -1641,6 +1703,14 @@
                return 1;
        }
 
+       for (i = 0; i < count; i++) {
+               if (pipe_resolve_connectors(&dev, &pipe_args[i]) < 0) {
+                       free_resources(dev.resources);
+                       drmClose(dev.fd);
+                       return 1;
+               }
+       }
+
 #define dump_resource(dev, res) if (res) dump_##res(dev)
 
        dump_resource(&dev, encoders);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdrm-2.4.63/xf86drmMode.c new/libdrm-2.4.64/xf86drmMode.c
--- old/libdrm-2.4.63/xf86drmMode.c     2015-08-14 00:27:03.000000000 +0200
+++ new/libdrm-2.4.64/xf86drmMode.c     2015-08-18 12:45:06.000000000 +0200
@@ -114,7 +114,6 @@
        drmFree(ptr->connectors);
        drmFree(ptr->encoders);
        drmFree(ptr);
-
 }
 
 void drmModeFreeFB(drmModeFBPtr ptr)
@@ -132,7 +131,6 @@
                return;
 
        drmFree(ptr);
-
 }
 
 void drmModeFreeConnector(drmModeConnectorPtr ptr)
@@ -145,7 +143,6 @@
        drmFree(ptr->props);
        drmFree(ptr->modes);
        drmFree(ptr);
-
 }
 
 void drmModeFreeEncoder(drmModeEncoderPtr ptr)
@@ -252,7 +249,7 @@
 }
 
 int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
-                 uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
+                uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
                 uint32_t *buf_id)
 {
        struct drm_mode_fb_cmd f;
@@ -340,7 +337,6 @@
        return DRM_IOCTL(fd, DRM_IOCTL_MODE_DIRTYFB, &dirty);
 }
 
-
 /*
  * Crtc functions
  */
@@ -377,9 +373,8 @@
        return r;
 }
 
-
 int drmModeSetCrtc(int fd, uint32_t crtcId, uint32_t bufferId,
-                   uint32_t x, uint32_t y, uint32_t *connectors, int count,
+                  uint32_t x, uint32_t y, uint32_t *connectors, int count,
                   drmModeModeInfoPtr mode)
 {
        struct drm_mode_crtc crtc;
@@ -610,7 +605,6 @@
        return DRM_IOCTL(fd, DRM_IOCTL_MODE_DETACHMODE, &res);
 }
 
-
 drmModePropertyPtr drmModeGetProperty(int fd, uint32_t property_id)
 {
        struct drm_mode_get_property prop;
@@ -944,7 +938,6 @@
                    uint32_t crtc_w, uint32_t crtc_h,
                    uint32_t src_x, uint32_t src_y,
                    uint32_t src_w, uint32_t src_h)
-
 {
        struct drm_mode_set_plane s;
 
@@ -965,7 +958,6 @@
        return DRM_IOCTL(fd, DRM_IOCTL_MODE_SETPLANE, &s);
 }
 
-
 drmModePlanePtr drmModeGetPlane(int fd, uint32_t plane_id)
 {
        struct drm_mode_get_plane ovr, counts;


Reply via email to