[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libdrm: Changes to 'debian-jessie-backports'



 Makefile.am                      |    1 
 README                           |    2 -
 configure.ac                     |    2 -
 debian/changelog                 |   16 ++++++++++++
 debian/compat                    |    2 -
 debian/control                   |    3 --
 debian/libdrm-freedreno1.symbols |    1 
 debian/libdrm-intel1.symbols     |    1 
 debian/libdrm2.symbols           |    1 
 debian/rules                     |    8 +++---
 debian/upstream/signing-key.asc  |   29 ++++++++++++++++++++++
 etnaviv/etnaviv-symbol-check     |    3 ++
 etnaviv/etnaviv_bo.c             |    2 -
 etnaviv/etnaviv_device.c         |   23 +++++++++++++++++
 etnaviv/etnaviv_drmif.h          |    3 ++
 etnaviv/etnaviv_pipe.c           |    9 +++++-
 etnaviv/etnaviv_priv.h           |    8 +++---
 freedreno/freedreno-symbol-check |    1 
 freedreno/freedreno_pipe.c       |    4 +++
 freedreno/freedreno_priv.h       |    1 
 freedreno/freedreno_ringbuffer.c |    9 ++++++
 freedreno/freedreno_ringbuffer.h |    6 +++-
 freedreno/kgsl/kgsl_pipe.c       |    5 +++
 freedreno/msm/msm_ringbuffer.c   |   27 ++++++++++++++++++--
 include/drm/README               |    2 -
 include/drm/vc4_drm.h            |    2 +
 intel/intel-symbol-check         |    1 
 intel/intel_bufmgr.h             |    2 +
 intel/intel_bufmgr_fake.c        |    4 +--
 intel/intel_bufmgr_gem.c         |   17 ++++++++++---
 intel/intel_chipset.h            |   13 +++++++--
 radeon/radeon_cs_gem.c           |   10 +++----
 radeon/radeon_surface.c          |    2 -
 tests/kms/kms-universal-planes.c |    2 -
 xf86drm.c                        |   51 +++++++++++++++++++++++++++++++++++++++
 xf86drm.h                        |    5 +++
 36 files changed, 243 insertions(+), 35 deletions(-)

New commits:
commit 18b4af6f6cfd779c73cdfd242b1e40420d022534
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Jan 10 15:30:28 2017 +0100

    Rebuild for jessie-backports.

diff --git a/debian/changelog b/debian/changelog
index 591a64b..c8d0513 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libdrm (2.4.74-1~bpo8+1) jessie-backports; urgency=medium
+
+  * Rebuild for jessie-backports.
+
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 10 Jan 2017 15:30:11 +0100
+
 libdrm (2.4.74-1) unstable; urgency=medium
 
   * New upstream release.

commit a4d943024af59e7bd81847aae9097d13537378e6
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Nov 29 19:01:17 2016 +0100

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 72384ad..b7897da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libdrm (2.4.74-1) UNRELEASED; urgency=medium
+libdrm (2.4.74-1) unstable; urgency=medium
 
   * New upstream release.
   * Update debian/upstream/signing-key.asc.
@@ -6,7 +6,7 @@ libdrm (2.4.74-1) UNRELEASED; urgency=medium
     shlibs.
   * Bump debhelper compat to 10.
 
- -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 29 Nov 2016 18:19:05 +0100
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 29 Nov 2016 19:01:04 +0100
 
 libdrm (2.4.73-1) unstable; urgency=medium
 

commit d963fbc94795e4903f9ada320540380a3e774b7b
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Nov 29 18:52:03 2016 +0100

    Bump debhelper compat to 10.

diff --git a/debian/changelog b/debian/changelog
index 48539d7..72384ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ libdrm (2.4.74-1) UNRELEASED; urgency=medium
   * Update debian/upstream/signing-key.asc.
   * Bump libdrm2's, libdrm-freedreno1's and libdrm-intel1's symbols and
     shlibs.
+  * Bump debhelper compat to 10.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 29 Nov 2016 18:19:05 +0100
 
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 7854824..e60a4aa 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,7 @@ Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 Uploaders: Andreas Boll <andreas.boll.dev@gmail.com>
 Build-Depends:
- debhelper (>= 9),
- dh-autoreconf,
+ debhelper (>= 10),
  quilt,
  xsltproc,
  docbook-xsl,
diff --git a/debian/rules b/debian/rules
index ebc5a9a..34abe72 100755
--- a/debian/rules
+++ b/debian/rules
@@ -135,4 +135,4 @@ ifeq ($(FREEDRENO), yes)
 endif
 
 %:
-	dh $@ --with quilt,autoreconf --builddirectory=build/
+	dh $@ --with quilt --builddirectory=build/

commit 59f71414c0a4e45fa75bda9990c2d97cc5687519
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Nov 29 18:49:09 2016 +0100

    Bump libdrm2's, libdrm-freedreno1's and libdrm-intel1's symbols and shlibs.

diff --git a/debian/changelog b/debian/changelog
index d74fb38..48539d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ libdrm (2.4.74-1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Update debian/upstream/signing-key.asc.
+  * Bump libdrm2's, libdrm-freedreno1's and libdrm-intel1's symbols and
+    shlibs.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 29 Nov 2016 18:19:05 +0100
 
diff --git a/debian/libdrm-freedreno1.symbols b/debian/libdrm-freedreno1.symbols
index 70b84cd..c015b50 100644
--- a/debian/libdrm-freedreno1.symbols
+++ b/debian/libdrm-freedreno1.symbols
@@ -32,6 +32,7 @@ libdrm_freedreno.so.1 libdrm-freedreno1 #MINVER#
  fd_ringbuffer_flush@Base 0
  fd_ringbuffer_grow@Base 2.4.70
  fd_ringbuffer_new@Base 0
+ fd_ringbuffer_reloc2@Base 2.4.74
  fd_ringbuffer_reloc@Base 0
  fd_ringbuffer_reset@Base 0
  fd_ringbuffer_set_parent@Base 0
diff --git a/debian/libdrm-intel1.symbols b/debian/libdrm-intel1.symbols
index 102f799..bf64a62 100644
--- a/debian/libdrm-intel1.symbols
+++ b/debian/libdrm-intel1.symbols
@@ -69,6 +69,7 @@ libdrm_intel.so.1 libdrm-intel1 #MINVER#
  drm_intel_gem_bo_wait@Base 2.4.36
  drm_intel_gem_context_create@Base 2.4.37
  drm_intel_gem_context_destroy@Base 2.4.37
+ drm_intel_gem_context_get_id@Base 2.4.74
  drm_intel_get_aperture_sizes@Base 2.4.26
  drm_intel_get_eu_total@Base 2.4.60
  drm_intel_get_min_eu_in_pool@Base 2.4.71
diff --git a/debian/libdrm2.symbols b/debian/libdrm2.symbols
index 1a57179..275a4e9 100644
--- a/debian/libdrm2.symbols
+++ b/debian/libdrm2.symbols
@@ -54,6 +54,7 @@ libdrm.so.2 libdrm2 #MINVER#
  drmGetContextPrivateMapping@Base 2.3.1
  drmGetContextTag@Base 2.3.1
  drmGetDevice@Base 2.4.66
+ drmGetDeviceNameFromFd2@Base 2.4.74
  drmGetDeviceNameFromFd@Base 2.4.16
  drmGetDevices@Base 2.4.65
  drmGetEntry@Base 2.3.1
diff --git a/debian/rules b/debian/rules
index 2a7b70b..ebc5a9a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -114,9 +114,9 @@ endif
 	dh_strip -s --remaining-packages
 
 override_dh_makeshlibs:
-	dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.73)' --add-udeb=libdrm2-udeb -- -c4
+	dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.74)' --add-udeb=libdrm2-udeb -- -c4
 ifeq ($(INTEL), yes)
-	dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.73)' -- -c4
+	dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.74)' -- -c4
 endif
 ifeq ($(NOUVEAU), yes)
 	dh_makeshlibs -plibdrm-nouveau2 -V'libdrm-nouveau2 (>= 2.4.66)' -- -c4
@@ -131,7 +131,7 @@ ifeq ($(TEGRA), yes)
 	dh_makeshlibs -plibdrm-tegra0 -V'libdrm-tegra0' -- -c4
 endif
 ifeq ($(FREEDRENO), yes)
-	dh_makeshlibs -plibdrm-freedreno1 -V'libdrm-freedreno1 (>= 2.4.73)' -- -c4
+	dh_makeshlibs -plibdrm-freedreno1 -V'libdrm-freedreno1 (>= 2.4.74)' -- -c4
 endif
 
 %:

commit 5836305282a58989107ac7e83483e81a762a63b2
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Nov 29 18:19:53 2016 +0100

    Update debian/upstream/signing-key.asc.

diff --git a/debian/changelog b/debian/changelog
index d3131eb..d74fb38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 libdrm (2.4.74-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Update debian/upstream/signing-key.asc.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 29 Nov 2016 18:19:05 +0100
 
diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
index 825d341..e632747 100644
--- a/debian/upstream/signing-key.asc
+++ b/debian/upstream/signing-key.asc
@@ -569,3 +569,32 @@ RORfs8GvAfjXb7SSmoPfSWdhV1tlAWL0+jR6beSUOnzNvD0cXGkzm3xjv1hH2oq9
 iqrZxglMEU1kp5n7vQ2OKB8g+29kluBxlWkTaQ==
 =zFx6
 -----END PGP PUBLIC KEY BLOCK-----
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQGiBEnu/8YRBADLqkTjmVAbTDVC/jhoOT4KWonJ6XA2or/E6ncsAappM5J8Mnop
+B24BSSeO7g8wD4bxVdqP95daIon10q+ahYVNmBrpfM0CPtvopILDnysb0YG6YvrZ
+e1edEFzEdb0x2/3gN5fIjl/5jNzlneMw+0CBD7Pw9p93LQmHGVmACUM8owCgg3J7
+NbDOO/j8/AiHQbUj9rV9nqED/3XVJ+CD8/gXKukPSv3fAMH4GLgDiYO4GXryIafp
+oX3ughgLZRHc/QnaQCtvqIUOoVfMv9AKGeQjyjok6GlDm2hIlxOUjD6hH7wE+2yJ
+Ysv+gc3tJWVJaDPW0JguOGAP6POYv5+hG6+kBJpdB5wD6Cc/Yk7c1i6EiogChgiO
+2/xEBADLjfVOyLwlOAuFLx8W7t2BhYWzJAOEjEqhUsLBMLnfQAz2IOjlyE+0gn6i
+8lLHqFZtqTUG5rszr8QNuCReN9NJAPy4vvk7xuM4KJ0APK8LAjR4oPsSkRYZfG1u
+e9dJLFMIoOzZ4EduT8v0qw+83yEreaoUBI3qikEC/aPdi1v5xLQjUm9iZXJ0IEJy
+YWdnIDxyb2JlcnRAc2l4YnluaW5lLm9yZz6IYAQTEQIAIAUCSe7/xgIbAwYLCQgH
+AwIEFQIIAwQWAgMBAh4BAheAAAoJEIzR31UpdSl7E/oAn1j4l0ji2iVRIlGn3nZ2
+tF+rh94TAJwIUPgIubyVVTCEIk6YK0HMPdSeBLkCDQRJ7v/GEAgA9yNw33b1n6TA
+AAunUiQ2txNIA0rR+Cpn0vACPDqdBVBMGzy/tlz68LVP9vlCJu1Kev44wX+K8XWc
+T93TlrOuVI53YAKq4l3dajl4RQxoFLTSMOrTZwe2vlgZ2jSaT0y9BroEsCzynJnR
+4VebAm0ZhB5rGsjHwOVa/KKOyRFyDCjOkmov/AWJPnjyfIwqFMEqMcA7cgS9NdGq
+Omj3NsCV0q1I4c4n6qKwSeuZSpCTPueZKoiPciQh+/lhX+B+ugvc/xVKvGzFVEew
+aRfdcTBUSP9aflt+lqAavuLgO334kBj6BK081xZ1T0hbUgsEIl//ToORg3MWBpEj
+mp1xKgcPYwADBggAwdPSBUBoqyBlUwO7rCvKEz1AqBsOaBPY3Hg8vPOpHnaZWS2t
+ipIdN9qS5KJ9664HVNpEvzcmR8LQq7EbPkURqXSYiIjucN1e+JMYm4InBagLrVoJ
+S3Tp1HyGqlRZf2RTbYya0xcXyancm6LL3c8wGL+Km3uuOJF6ArSpRATTebLAY5Rc
+wnY10rL26Elt5SDQd1l0uP3rRvqIdu+X5VCw3jWHPCEbmnwm6mhQtSCQWdVQ+HsU
+wFJEnyYIhZwCk9kWHzNluo2BiHt8pV6chCxwYC+YJOrMn97rpVbCb0KH4YCXsxKD
+tRzsltiiTnUj1X/a9GXQ4c9Cei99t8YapwBOUohJBBgRAgAJBQJJ7v/GAhsMAAoJ
+EIzR31UpdSl7BfsAniKIAni1DrAS4TqxwrtBFVRcuzONAJ0RP4DQCKBzcJGXntI0
+U9e5j9NIWQ==
+=+7XN
+-----END PGP PUBLIC KEY BLOCK-----

commit 148ff518547eea61335312c9ec4583e7e9b038cc
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Nov 29 18:19:23 2016 +0100

    Bump changelog

diff --git a/debian/changelog b/debian/changelog
index afe749c..d3131eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libdrm (2.4.74-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 29 Nov 2016 18:19:05 +0100
+
 libdrm (2.4.73-1) unstable; urgency=medium
 
   * New upstream release.

commit dae413e43866d36500538c2801cc66a5a89e426d
Author: Robert Bragg <robert.bragg@intel.com>
Date:   Tue Nov 29 10:42:38 2016 +0000

    Bump version for release

diff --git a/configure.ac b/configure.ac
index 9f25a4c..708c562 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
 
 AC_PREREQ([2.63])
 AC_INIT([libdrm],
-        [2.4.73],
+        [2.4.74],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
         [libdrm])
 

commit a8315834a9d975efa901ba2add7f5001d645119e
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Nov 16 17:06:10 2016 -0800

    vc4: Add new GETPARAMs that have been merged to drm-next.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>

diff --git a/include/drm/vc4_drm.h b/include/drm/vc4_drm.h
index 919eece..319881d 100644
--- a/include/drm/vc4_drm.h
+++ b/include/drm/vc4_drm.h
@@ -286,6 +286,8 @@ struct drm_vc4_get_hang_state {
 #define DRM_VC4_PARAM_V3D_IDENT1		1
 #define DRM_VC4_PARAM_V3D_IDENT2		2
 #define DRM_VC4_PARAM_SUPPORTS_BRANCHES		3
+#define DRM_VC4_PARAM_SUPPORTS_ETC1		4
+#define DRM_VC4_PARAM_SUPPORTS_THREADED_FS	5
 
 struct drm_vc4_get_param {
 	__u32 param;

commit 23d10b82440f59f2a685db34d3662d75f4a3784b
Author: Rob Clark <robclark@freedesktop.org>
Date:   Wed Nov 9 09:02:09 2016 -0500

    freedreno: 64bit support
    
    a5xx and later are 64bit devices.. make reloc's handle that.  A new
    public symbol is introduced to avoid silent problems with new mesa and
    old libdrm (since on 64b reloc consumes two dwords).
    
    Signed-off-by: Rob Clark <robclark@freedesktop.org>

diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
index ad367fc..42f2c43 100755
--- a/freedreno/freedreno-symbol-check
+++ b/freedreno/freedreno-symbol-check
@@ -43,6 +43,7 @@ fd_ringbuffer_flush
 fd_ringbuffer_grow
 fd_ringbuffer_new
 fd_ringbuffer_reloc
+fd_ringbuffer_reloc2
 fd_ringbuffer_reset
 fd_ringbuffer_set_parent
 fd_ringbuffer_timestamp
diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c
index 4a756d7..3f8c834 100644
--- a/freedreno/freedreno_pipe.c
+++ b/freedreno/freedreno_pipe.c
@@ -37,6 +37,7 @@ struct fd_pipe *
 fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
 {
 	struct fd_pipe *pipe = NULL;
+	uint64_t val;
 
 	if (id > FD_PIPE_MAX) {
 		ERROR_MSG("invalid pipe id: %d", id);
@@ -52,6 +53,9 @@ fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
 	pipe->dev = dev;
 	pipe->id = id;
 
+	fd_pipe_get_param(pipe, FD_GPU_ID, &val);
+	pipe->gpu_id = val;
+
 	return pipe;
 fail:
 	if (pipe)
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 86da83b..3217039 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -123,6 +123,7 @@ struct fd_pipe_funcs {
 struct fd_pipe {
 	struct fd_device *dev;
 	enum fd_pipe_id id;
+	uint32_t gpu_id;
 	const struct fd_pipe_funcs *funcs;
 };
 
diff --git a/freedreno/freedreno_ringbuffer.c b/freedreno/freedreno_ringbuffer.c
index c132145..7310f1f 100644
--- a/freedreno/freedreno_ringbuffer.c
+++ b/freedreno/freedreno_ringbuffer.c
@@ -115,6 +115,13 @@ uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring)
 void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,
 				    const struct fd_reloc *reloc)
 {
+	assert(ring->pipe->gpu_id < 500);
+	ring->funcs->emit_reloc(ring, reloc);
+}
+
+void fd_ringbuffer_reloc2(struct fd_ringbuffer *ring,
+				     const struct fd_reloc *reloc)
+{
 	ring->funcs->emit_reloc(ring, reloc);
 }
 
@@ -123,6 +130,8 @@ void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
 {
 	uint32_t submit_offset, size;
 
+	/* This function is deprecated and not supported on 64b devices: */
+	assert(ring->pipe->gpu_id < 500);
 	assert(target->ring == end->ring);
 
 	submit_offset = offset_bytes(target->cur, target->ring->start);
diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h
index 108d5a6..c501fba 100644
--- a/freedreno/freedreno_ringbuffer.h
+++ b/freedreno/freedreno_ringbuffer.h
@@ -78,9 +78,13 @@ struct fd_reloc {
 	uint32_t offset;
 	uint32_t or;
 	int32_t  shift;
+	uint32_t orhi;      /* used for a5xx+ */
 };
 
-void fd_ringbuffer_reloc(struct fd_ringbuffer *ring, const struct fd_reloc *reloc);
+/* NOTE: relocs are 2 dwords on a5xx+ */
+
+void fd_ringbuffer_reloc2(struct fd_ringbuffer *ring, const struct fd_reloc *reloc);
+will_be_deprecated void fd_ringbuffer_reloc(struct fd_ringbuffer *ring, const struct fd_reloc *reloc);
 will_be_deprecated void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
 		struct fd_ringmarker *target, struct fd_ringmarker *end);
 uint32_t fd_ringbuffer_cmd_count(struct fd_ringbuffer *ring);
diff --git a/freedreno/kgsl/kgsl_pipe.c b/freedreno/kgsl/kgsl_pipe.c
index 3546718..8a39eb4 100644
--- a/freedreno/kgsl/kgsl_pipe.c
+++ b/freedreno/kgsl/kgsl_pipe.c
@@ -255,6 +255,11 @@ drm_private struct fd_pipe * kgsl_pipe_new(struct fd_device *dev,
 	GETPROP(fd, VERSION,     kgsl_pipe->version);
 	GETPROP(fd, DEVICE_INFO, kgsl_pipe->devinfo);
 
+	if (kgsl_pipe->devinfo.gpu_id >= 500) {
+		ERROR_MSG("64b unsupported with kgsl");
+		goto fail;
+	}
+
 	INFO_MSG("Pipe Info:");
 	INFO_MSG(" Device:          %s", paths[id]);
 	INFO_MSG(" Chip-id:         %d.%d.%d.%d",
diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c
index 5117df1..17194f4 100644
--- a/freedreno/msm/msm_ringbuffer.c
+++ b/freedreno/msm/msm_ringbuffer.c
@@ -487,11 +487,32 @@ static void msm_ringbuffer_emit_reloc(struct fd_ringbuffer *ring,
 	reloc->submit_offset = offset_bytes(ring->cur, ring->start);
 
 	addr = msm_bo->presumed;
-	if (r->shift < 0)
-		addr >>= -r->shift;
+	if (reloc->shift < 0)
+		addr >>= -reloc->shift;
 	else
-		addr <<= r->shift;
+		addr <<= reloc->shift;
 	(*ring->cur++) = addr | r->or;
+
+	if (ring->pipe->gpu_id >= 500) {
+		struct drm_msm_gem_submit_reloc *reloc_hi;
+
+		idx = APPEND(cmd, relocs);
+
+		reloc_hi = &cmd->relocs[idx];
+
+		reloc_hi->reloc_idx = reloc->reloc_idx;
+		reloc_hi->reloc_offset = r->offset;
+		reloc_hi->or = r->orhi;
+		reloc_hi->shift = r->shift - 32;
+		reloc_hi->submit_offset = offset_bytes(ring->cur, ring->start);
+
+		addr = msm_bo->presumed >> 32;
+		if (reloc_hi->shift < 0)
+			addr >>= -reloc_hi->shift;
+		else
+			addr <<= reloc_hi->shift;
+		(*ring->cur++) = addr | r->orhi;
+	}
 }
 
 static uint32_t msm_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,

commit d15515aea3c3e51336f9ab29691162c69acc9807
Author: Christian Gmeiner <christian.gmeiner@gmail.com>
Date:   Wed Nov 23 22:09:11 2016 +0100

    etnaviv: add etna_pipe_wait_ns(..)
    
    We need to pass through a timeout parameter to implement
    pipe->fence_finish() properly. The new fxn accepts a timeout
    in nanoseconds. Simplify etna_pipe_wait(..) by using
    etna_pipe_wait_ns(..).
    
    Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/etnaviv/etnaviv-symbol-check b/etnaviv/etnaviv-symbol-check
index 72f2bc5..22afd16 100755
--- a/etnaviv/etnaviv-symbol-check
+++ b/etnaviv/etnaviv-symbol-check
@@ -21,6 +21,7 @@ etna_gpu_get_param
 etna_pipe_new
 etna_pipe_del
 etna_pipe_wait
+etna_pipe_wait_ns
 etna_bo_new
 etna_bo_from_handle
 etna_bo_from_name
diff --git a/etnaviv/etnaviv_drmif.h b/etnaviv/etnaviv_drmif.h
index fe9d5db..8119baa 100644
--- a/etnaviv/etnaviv_drmif.h
+++ b/etnaviv/etnaviv_drmif.h
@@ -104,6 +104,7 @@ int etna_gpu_get_param(struct etna_gpu *gpu, enum etna_param_id param,
 struct etna_pipe *etna_pipe_new(struct etna_gpu *gpu, enum etna_pipe_id id);
 void etna_pipe_del(struct etna_pipe *pipe);
 int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms);
+int etna_pipe_wait_ns(struct etna_pipe *pipe, uint32_t timestamp, uint64_t ns);
 
 
 /* buffer-object functions:
diff --git a/etnaviv/etnaviv_pipe.c b/etnaviv/etnaviv_pipe.c
index 1157fa6..94c5d37 100644
--- a/etnaviv/etnaviv_pipe.c
+++ b/etnaviv/etnaviv_pipe.c
@@ -32,6 +32,11 @@
 
 int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms)
 {
+	return etna_pipe_wait_ns(pipe, timestamp, ms * 1000000);
+}
+
+int etna_pipe_wait_ns(struct etna_pipe *pipe, uint32_t timestamp, uint64_t ns)
+{
 	struct etna_device *dev = pipe->gpu->dev;
 	int ret;
 
@@ -40,10 +45,10 @@ int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms)
 		.fence = timestamp,
 	};
 
-	if (ms == 0)
+	if (ns == 0)
 		req.flags |= ETNA_WAIT_NONBLOCK;
 
-	get_abs_timeout(&req.timeout, ms * 1000000);
+	get_abs_timeout(&req.timeout, ns);
 
 	ret = drmCommandWrite(dev->fd, DRM_ETNAVIV_WAIT_FENCE, &req, sizeof(req));
 	if (ret) {

commit 4f750ec756e66e1012b312dbc7f2d11fc9848ce2
Author: Christian Gmeiner <christian.gmeiner@gmail.com>
Date:   Wed Nov 23 22:02:25 2016 +0100

    etnaviv: change get_abs_timeout(..) to use ns.
    
    Also update all callers.
    
    Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/etnaviv/etnaviv_bo.c b/etnaviv/etnaviv_bo.c
index 833f8bd..4ad0434 100644
--- a/etnaviv/etnaviv_bo.c
+++ b/etnaviv/etnaviv_bo.c
@@ -330,7 +330,7 @@ int etna_bo_cpu_prep(struct etna_bo *bo, uint32_t op)
 		.op = op,
 	};
 
-	get_abs_timeout(&req.timeout, 5000);
+	get_abs_timeout(&req.timeout, 5000000000);
 
 	return drmCommandWrite(bo->dev->fd, DRM_ETNAVIV_GEM_CPU_PREP,
 			&req, sizeof(req));
diff --git a/etnaviv/etnaviv_pipe.c b/etnaviv/etnaviv_pipe.c
index 402b71d..1157fa6 100644
--- a/etnaviv/etnaviv_pipe.c
+++ b/etnaviv/etnaviv_pipe.c
@@ -43,7 +43,7 @@ int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms)
 	if (ms == 0)
 		req.flags |= ETNA_WAIT_NONBLOCK;
 
-	get_abs_timeout(&req.timeout, ms);
+	get_abs_timeout(&req.timeout, ms * 1000000);
 
 	ret = drmCommandWrite(dev->fd, DRM_ETNAVIV_WAIT_FENCE, &req, sizeof(req));
 	if (ret) {
diff --git a/etnaviv/etnaviv_priv.h b/etnaviv/etnaviv_priv.h
index eb62ed3..feaa5ad 100644
--- a/etnaviv/etnaviv_priv.h
+++ b/etnaviv/etnaviv_priv.h
@@ -189,13 +189,13 @@ struct etna_cmd_stream_priv {
 
 #define VOID2U64(x) ((uint64_t)(unsigned long)(x))
 
-static inline void get_abs_timeout(struct drm_etnaviv_timespec *tv, uint32_t ms)
+static inline void get_abs_timeout(struct drm_etnaviv_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 /* ETNAVIV_PRIV_H_ */

commit 1924b6704aa34bb3dd044b8e1e29558c521c6902
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Sun Nov 20 20:25:46 2016 +0200

    libdrm: random typo fixes
    
    Just some trivial boring typo fixes all over the tree.
    READMEs and comments only.
    
    Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/README b/README
index 603a1c1..7eeae38 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 libdrm - userspace library for drm
 
 This  is libdrm,  a userspace  library for  accessing the  DRM, direct
-rendering  manager, on  Linux,  BSD and  other  operating systes  that
+rendering  manager, on  Linux,  BSD and  other  operating systems that
 support the  ioctl interface.  The library  provides wrapper functions
 for the  ioctls to avoid  exposing the kernel interface  directly, and
 for chipsets with drm memory manager, support for tracking relocations
diff --git a/include/drm/README b/include/drm/README
index c3292f3..a50b02c 100644
--- a/include/drm/README
+++ b/include/drm/README
@@ -89,7 +89,7 @@ Nearly all headers:
 Status: Trivial.
 
 Most UMS headers:
- - Not using fixed size interers - compat ioctls are broken.
+ - Not using fixed size integers - compat ioctls are broken.
 Status: ?
 Promote to fixed size ints, which match the current (32bit) ones.
 
diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c
index 24b3732..641df6a 100644
--- a/intel/intel_bufmgr_fake.c
+++ b/intel/intel_bufmgr_fake.c
@@ -737,7 +737,7 @@ drm_intel_bufmgr_fake_wait_idle(drm_intel_bufmgr_fake *bufmgr_fake)
 /**
  * Wait for rendering to a buffer to complete.
  *
- * It is assumed that the bathcbuffer which performed the rendering included
+ * It is assumed that the batchbuffer which performed the rendering included
  * the necessary flushing.
  */
 static void
@@ -1200,7 +1200,7 @@ static int
 		assert(!(bo_fake->flags & (BM_NO_BACKING_STORE | BM_PINNED)));
 
 		/* Actually, should be able to just wait for a fence on the
-		 * mmory, hich we would be tracking when we free it.  Waiting
+		 * memory, which we would be tracking when we free it. Waiting
 		 * for idle is a sufficiently large hammer for now.
 		 */
 		drm_intel_bufmgr_fake_wait_idle(bufmgr_fake);
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 5fc022a..75949b9 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -256,7 +256,7 @@ struct _drm_intel_bo_gem {
 	 * Boolean of whether the GPU is definitely not accessing the buffer.
 	 *
 	 * This is only valid when reusable, since non-reusable
-	 * buffers are those that have been shared wth other
+	 * buffers are those that have been shared with other
 	 * processes, so we don't know their state.
 	 */
 	bool idle;
@@ -294,7 +294,7 @@ struct _drm_intel_bo_gem {
 	 */
 	int reloc_tree_fences;
 
-	/** Flags that we may need to do the SW_FINSIH ioctl on unmap. */
+	/** Flags that we may need to do the SW_FINISH ioctl on unmap. */
 	bool mapped_cpu_write;
 };
 
@@ -1719,7 +1719,7 @@ static int drm_intel_gem_bo_unmap(drm_intel_bo *bo)
 	}
 
 	/* We need to unmap after every innovation as we cannot track
-	 * an open vma for every bo as that will exhaasut the system
+	 * an open vma for every bo as that will exhaust the system
 	 * limits and cause later failures.
 	 */
 	if (--bo_gem->map_count == 0) {
diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c
index 23f33af..f3dccb6 100644
--- a/radeon/radeon_cs_gem.c
+++ b/radeon/radeon_cs_gem.c
@@ -189,7 +189,7 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs,
     /* check domains */
     if ((read_domain && write_domain) || (!read_domain && !write_domain)) {
         /* in one CS a bo can only be in read or write domain but not
-         * in read & write domain at the same sime
+         * in read & write domain at the same time
          */
         return -EINVAL;
     }
@@ -242,7 +242,7 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs,
     }
     /* new relocation */
     if (csg->base.crelocs >= csg->nrelocs) {
-        /* allocate more memory (TODO: should use a slab allocatore maybe) */
+        /* allocate more memory (TODO: should use a slab allocator maybe) */
         uint32_t *tmp, size;
         size = ((csg->nrelocs + 1) * sizeof(struct radeon_bo*));
         tmp = (uint32_t*)realloc(csg->relocs_bo, size);
@@ -268,7 +268,7 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs,
     reloc->flags = flags;
     csg->chunks[1].length_dw += RELOC_SIZE;
     radeon_bo_ref(bo);
-    /* bo might be referenced from another context so have to use atomic opertions */
+    /* bo might be referenced from another context so have to use atomic operations */
     atomic_add((atomic_t *)radeon_gem_get_reloc_in_cs(bo), cs->id);
     cs->relocs_total_size += boi->size;
     radeon_cs_write_dword((struct radeon_cs *)cs, 0xc0001000);
@@ -449,7 +449,7 @@ static int cs_gem_emit(struct radeon_cs_int *cs)
                             &csg->cs, sizeof(struct drm_radeon_cs));
     for (i = 0; i < csg->base.crelocs; i++) {
         csg->relocs_bo[i]->space_accounted = 0;
-        /* bo might be referenced from another context so have to use atomic opertions */
+        /* bo might be referenced from another context so have to use atomic operations */
         atomic_dec((atomic_t *)radeon_gem_get_reloc_in_cs((struct radeon_bo*)csg->relocs_bo[i]), cs->id);
         radeon_bo_unref((struct radeon_bo *)csg->relocs_bo[i]);
         csg->relocs_bo[i] = NULL;
@@ -481,7 +481,7 @@ static int cs_gem_erase(struct radeon_cs_int *cs)
     if (csg->relocs_bo) {
         for (i = 0; i < csg->base.crelocs; i++) {
             if (csg->relocs_bo[i]) {
-                /* bo might be referenced from another context so have to use atomic opertions */
+                /* bo might be referenced from another context so have to use atomic operations */
                 atomic_dec((atomic_t *)radeon_gem_get_reloc_in_cs((struct radeon_bo*)csg->relocs_bo[i]), cs->id);
                 radeon_bo_unref((struct radeon_bo *)csg->relocs_bo[i]);
                 csg->relocs_bo[i] = NULL;
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index 16a8b00..965be24 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -981,7 +981,7 @@ static int eg_surface_best(struct radeon_surface_manager *surf_man,
     /* bankw or bankh greater than 1 increase alignment requirement, not
      * sure if it's worth using smaller bankw & bankh to stick with 2D
      * tiling on small surface rather than falling back to 1D tiling.
-     * Use recommanded value based on tile size for now.
+     * Use recommended value based on tile size for now.
      *
      * fmask buffer has different optimal value figure them out once we
      * use it.

commit 1fc32f1cc5046fe76f2d5094fc576e097ea031e7
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Sun Nov 20 20:25:47 2016 +0200

    tests: kms: fix shadowed declaration warning
    
    There is no need to maintain the value in the shadowed variable from
    what I can see.
    
    Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/tests/kms/kms-universal-planes.c b/tests/kms/kms-universal-planes.c
index d8e5fc4..89057bb 100644
--- a/tests/kms/kms-universal-planes.c
+++ b/tests/kms/kms-universal-planes.c
@@ -212,9 +212,9 @@ int main(int argc, char *argv[])
 		printf("Planes: %u\n", device->num_planes);
 
 		for (i = 0; i < device->num_planes; i++) {
-			struct kms_plane *plane = device->planes[i];
 			const char *type = NULL;
 
+			plane = device->planes[i];
 			switch (plane->type) {
 			case DRM_PLANE_TYPE_OVERLAY:
 				type = "overlay";

commit 37d790f7d449874d0bf199d9ca9871d12b4d599a
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Thu Nov 10 17:26:50 2016 +0000

    xf86drm: introduce drmGetDeviceNameFromFd2
    
    The original version considered only card devices, while this will pick
    the device/node name regardless - card, control, renderD, other...
    
    Current implementation is "linux" specific, in such that it relies on
    sysfs/uevent file. At the same time this gives us the flexibility to
    support any nodes even future ones, as long as they're within DRM_MAJOR.
    
    Shamelessly copied from mesa, latter by: Gary Wong <gtw@gnu.org>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

diff --git a/xf86drm.c b/xf86drm.c
index 9b97bbb..ed924a7 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -3303,3 +3303,54 @@ free_locals:
     free(local_devices);
     return ret;
 }
+
+char *drmGetDeviceNameFromFd2(int fd)
+{
+#ifdef __linux__
+    struct stat sbuf;
+    char *device_name = NULL;
+    unsigned int maj, min;
+    FILE *f;
+    char buf[512];
+    static const char match[9] = "\nDEVNAME=";
+    int expected = 1;
+
+
+    if (fstat(fd, &sbuf))
+        return NULL;
+
+    maj = major(sbuf.st_rdev);
+    min = minor(sbuf.st_rdev);
+
+    if (maj != DRM_MAJOR || !S_ISCHR(sbuf.st_mode))
+        return NULL;
+
+    snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/uevent", maj, min);
+    if (!(f = fopen(buf, "r")))
+        return NULL;
+
+    while (expected < sizeof(match)) {
+        int c = getc(f);
+
+        if (c == EOF) {
+            fclose(f);
+            return NULL;
+        } else if (c == match[expected] )
+            expected++;
+        else
+            expected = 0;
+    }
+
+    strcpy(buf, "/dev/");
+    if (fgets(buf + 5, sizeof(buf) - 5, f)) {
+        buf[strcspn(buf, "\n")] = '\0';
+        device_name = strdup(buf);
+    }
+
+    fclose(f);
+    return device_name;
+#else
+#warning "Missing implementation of drmGetDeviceNameFromFd2"
+    return NULL;
+#endif
+}
diff --git a/xf86drm.h b/xf86drm.h
index 481d882..4da6bd3 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -753,6 +753,11 @@ typedef struct _drmEventContext {
 extern int drmHandleEvent(int fd, drmEventContextPtr evctx);
 
 extern char *drmGetDeviceNameFromFd(int fd);
+
+/* Improved version of drmGetDeviceNameFromFd which attributes for any type of
+ * device/node - card, control or renderD.
+ */
+extern char *drmGetDeviceNameFromFd2(int fd);
 extern int drmGetNodeTypeFromFd(int fd);
 
 extern int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd);

commit 7e0bc3bf1c247e1d53733d0e2e2ada52d29b5327
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sat Nov 12 20:45:25 2016 +0000

    automake: make the build less chatty
    
    Having the "Entering|Leaving directory X" messages it not required nor
    useful in vast majority of the cases.
    
    One can always have them printed by `make -w' or by overriding the
    AM_MAKEFLAGS variable.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/Makefile.am b/Makefile.am
index 2e46bde..dfb8fcd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,7 @@ include Makefile.sources
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
+AM_MAKEFLAGS = -s
 AM_DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-udev \
 	--enable-libkms \

commit 911280cb4a0106b869405e36f7317957628181d5
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Nov 22 15:48:12 2016 +0900

    intel: Add drm_intel_gem_context_get_id to intel-symbols-check
    
    Fixes make check. Trivial.

diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check
index 4462533..038c982 100755
--- a/intel/intel-symbol-check
+++ b/intel/intel-symbol-check
@@ -80,6 +80,7 @@ drm_intel_gem_bo_unmap_gtt
 drm_intel_gem_bo_wait
 drm_intel_gem_context_create
 drm_intel_gem_context_destroy
+drm_intel_gem_context_get_id
 drm_intel_get_aperture_sizes
 drm_intel_get_eu_total
 drm_intel_get_min_eu_in_pool

commit 770f6bc424f93ab92f2c2f651615d02240f7387a
Author: Robert Bragg <robert@sixbynine.org>
Date:   Mon Jan 26 16:11:26 2015 +0000

    intel: Add a getter for the intel_context ctx_id
    
    Exposing the u32 context ID makes it possible to define new drm kernel
    interfaces based on the same IDs that e.g. execbuf uses to identify a
    gem context, that aren't themselves abstracted by libdrm but need to be
    used by libdrm/drm_intel_context based clients such as (parts of) i-g-t
    or Mesa.
    
    For example this can be used to configure an i915-perf stream to collect
    metrics for a specific context.
    
    v2: s/drm_intel_gem_context_get_context_id/drm_intel_gem_context_get_id/
    
    Signed-off-by: Robert Bragg <robert@sixbynine.org>
    Reviewed-by: Matthew Auld <matthew.auld@intel.com>

diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
index ce4e70d..85e4ff7 100644
--- a/intel/intel_bufmgr.h
+++ b/intel/intel_bufmgr.h
@@ -212,6 +212,8 @@ int drm_intel_bufmgr_gem_get_devid(drm_intel_bufmgr *bufmgr);
 int drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns);
 
 drm_intel_context *drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr);
+int drm_intel_gem_context_get_id(drm_intel_context *ctx,
+                                 uint32_t *ctx_id);
 void drm_intel_gem_context_destroy(drm_intel_context *ctx);
 int drm_intel_gem_bo_context_exec(drm_intel_bo *bo, drm_intel_context *ctx,
 				  int used, unsigned int flags);
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 15c79b3..5fc022a 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -3184,6 +3184,17 @@ drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr)
 	return context;
 }
 
+int
+drm_intel_gem_context_get_id(drm_intel_context *ctx, uint32_t *ctx_id)
+{
+	if (ctx == NULL)
+		return -EINVAL;
+
+	*ctx_id = ctx->ctx_id;
+
+	return 0;
+}
+


Reply to: