libdrm: Changes to 'upstream-experimental'
configure.ac | 2 -
intel/intel_bufmgr_gem.c | 2 +
omap/omap_drm.h | 3 +-
radeon/Makefile.am | 2 -
radeon/radeon_bo_gem.c | 48 +++++++++++++++++++++++++++++++++++++++++++++-
radeon/radeon_bo_gem.h | 4 +++
radeon/radeon_surface.c | 4 +--
tests/modetest/modetest.c | 1
8 files changed, 60 insertions(+), 6 deletions(-)
New commits:
commit ae3ac8225fe1c6781ce425c57ef5fb6c5af6ccf4
Author: Marek Olšák <maraeo@gmail.com>
Date: Fri Aug 24 17:03:13 2012 +0200
configure: bump version for 2.4.39 release
diff --git a/configure.ac b/configure.ac
index 3e2792e..9506827 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
AC_PREREQ([2.63])
AC_INIT([libdrm],
- [2.4.38],
+ [2.4.39],
[https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
[libdrm])
commit 853429b939c792c4bc0bc91fdef696e3251b88d9
Author: Marek Olšák <maraeo@gmail.com>
Date: Mon Aug 20 17:15:15 2012 +0200
radeon: align r600 msaa buffers to a multiple of macrotile size * num samples
I am not sure whether this is needed, but better be safe than sorry.
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index 98f4aaf..4118a37 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -356,7 +356,7 @@ static int r6_surface_init_2d(struct radeon_surface_manager *surf_man,
surf->bo_alignment =
MAX2(surf_man->hw_info.num_pipes *
surf_man->hw_info.num_banks *
- surf->bpe * 64,
+ surf->nsamples * surf->bpe * 64,
xalign * yalign * surf->nsamples * surf->bpe);
}
commit 58545722d0ee52f112859322466d9366915575b5
Author: Marek Olšák <maraeo@gmail.com>
Date: Sun Aug 19 03:54:34 2012 +0200
radeon: fix allocation of MSAA surfaces on r600-r700
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index 892dca6..98f4aaf 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -165,7 +165,7 @@ static void surf_minify(struct radeon_surface *surf,
surf->level[level].nblk_z = ALIGN(surf->level[level].nblk_z, zalign);
surf->level[level].offset = offset;
- surf->level[level].pitch_bytes = surf->level[level].nblk_x * surf->bpe;
+ surf->level[level].pitch_bytes = surf->level[level].nblk_x * surf->bpe * surf->nsamples;
surf->level[level].slice_size = surf->level[level].pitch_bytes * surf->level[level].nblk_y;
surf->bo_size = offset + surf->level[level].slice_size * surf->level[level].nblk_z * surf->array_size;
commit f215d651377d98f5998118c6824aeb2db75513be
Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Date: Thu Aug 9 13:34:54 2012 +0200
omap: include omap_drm.h independently
omap_drm.h uses data type defined in stdint.h, but that header was
not included.
omap_drm.h includes drm.h as a local file when it is part of the
compiler c flags.
This two issues are fixed. New code can include omap_drm.h alone.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Rob Clark <rob@ti.com>
diff --git a/omap/omap_drm.h b/omap/omap_drm.h
index f677cd8..9c6c0e4 100644
--- a/omap/omap_drm.h
+++ b/omap/omap_drm.h
@@ -29,7 +29,8 @@
#ifndef __OMAP_DRM_H__
#define __OMAP_DRM_H__
-#include "drm.h"
+#include <stdint.h>
+#include <drm.h>
/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints.
commit 3163cfe4db925429760407e77140e2d595338bc2
Author: Dave Airlie <airlied@redhat.com>
Date: Tue Jun 12 17:31:12 2012 +0100
radeon: add prime import/export support
this adds radeon version of the prime import/export support.
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/radeon/Makefile.am b/radeon/Makefile.am
index 37be8cc..a8cd100 100644
--- a/radeon/Makefile.am
+++ b/radeon/Makefile.am
@@ -31,7 +31,7 @@ AM_CFLAGS = \
libdrm_radeon_la_LTLIBRARIES = libdrm_radeon.la
libdrm_radeon_ladir = $(libdir)
-libdrm_radeon_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+libdrm_radeon_la_LDFLAGS = -version-number 1:0:1 -no-undefined
libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
libdrm_radeon_la_SOURCES = \
diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c
index 719fba7..265f177 100644
--- a/radeon/radeon_bo_gem.c
+++ b/radeon/radeon_bo_gem.c
@@ -45,7 +45,7 @@
#include "radeon_bo.h"
#include "radeon_bo_int.h"
#include "radeon_bo_gem.h"
-
+#include <fcntl.h>
struct radeon_bo_gem {
struct radeon_bo_int base;
uint32_t name;
@@ -349,3 +349,49 @@ int radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t
sizeof(args));
return r;
}
+
+int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle)
+{
+ struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
+ int ret;
+
+ ret = drmPrimeHandleToFD(bo_gem->base.bom->fd, bo->handle, DRM_CLOEXEC, handle);
+ return ret;
+}
+
+struct radeon_bo *radeon_gem_bo_open_prime(struct radeon_bo_manager *bom,
+ int fd_handle,
+ uint32_t size)
+{
+ struct radeon_bo_gem *bo;
+ int r;
+ uint32_t handle;
+
+ bo = (struct radeon_bo_gem*)calloc(1, sizeof(struct radeon_bo_gem));
+ if (bo == NULL) {
+ return NULL;
+ }
+
+ bo->base.bom = bom;
+ bo->base.handle = 0;
+ bo->base.size = size;
+ bo->base.alignment = 0;
+ bo->base.domains = RADEON_GEM_DOMAIN_GTT;
+ bo->base.flags = 0;
+ bo->base.ptr = NULL;
+ atomic_set(&bo->reloc_in_cs, 0);
+ bo->map_count = 0;
+
+ r = drmPrimeFDToHandle(bom->fd, fd_handle, &handle);
+ if (r != 0) {
+ free(bo);
+ return NULL;
+ }
+
+ bo->base.handle = handle;
+ bo->name = handle;
+
+ radeon_bo_ref((struct radeon_bo *)bo);
+ return (struct radeon_bo *)bo;
+
+}
diff --git a/radeon/radeon_bo_gem.h b/radeon/radeon_bo_gem.h
index 0af8610..08965f3 100644
--- a/radeon/radeon_bo_gem.h
+++ b/radeon/radeon_bo_gem.h
@@ -41,4 +41,8 @@ uint32_t radeon_gem_name_bo(struct radeon_bo *bo);
void *radeon_gem_get_reloc_in_cs(struct radeon_bo *bo);
int radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain);
int radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name);
+int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle);
+struct radeon_bo *radeon_gem_bo_open_prime(struct radeon_bo_manager *bom,
+ int fd_handle,
+ uint32_t size);
#endif
commit a9412fa9de219e38df361852a12df37688c891db
Author: Kenneth Graunke <kenneth@whitecape.org>
Date: Sun Aug 12 13:33:05 2012 -0700
intel: Use VG_CLEAR on the context destroy ioctl as well.
Otherwise pad appears uninitialized and valgrind grumbles.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 0ea6260..7953137 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2936,6 +2936,8 @@ drm_intel_gem_context_destroy(drm_intel_context *ctx)
if (ctx == NULL)
return;
+ VG_CLEAR(destroy);
+
bufmgr_gem = (drm_intel_bufmgr_gem *)ctx->bufmgr;
destroy.ctx_id = ctx->ctx_id;
ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_CONTEXT_DESTROY,
commit 6fa2b29d226306870eebe93afb2106ca7d79569b
Author: Tobias Klausmann <tobias.klausmann@mni.thm.de>
Date: Sun Aug 12 00:00:40 2012 +0200
tests/modetest: Add a forgotten return, needed for opensuse buildservice
Signed-off-by: Marek Olšák <maraeo@gmail.com>
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index e0fd66c..c91bb9d 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -125,6 +125,7 @@ char * res##_str(int type) { \
sep = ", "; \
} \
} \
+ return NULL; \
}
static const char *mode_type_names[] = {
Reply to: