From 635fa191d0837b248941048920e5bffc733043c9 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 27 Aug 2012 17:24:07 +1000 Subject: [PATCH 1/2] upstream 2.4.39 release --- .gitignore | 1 + libdrm.spec | 10 ++--- radeon-prime.patch | 106 --------------------------------------------- sources | 2 +- 4 files changed, 7 insertions(+), 112 deletions(-) delete mode 100644 radeon-prime.patch diff --git a/.gitignore b/.gitignore index 93d0162..843cdc2 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ libdrm-20100612.tar.bz2 /libdrm-2.4.36.tar.bz2 /libdrm-2.4.37.tar.bz2 /libdrm-2.4.38.tar.bz2 +/libdrm-2.4.39.tar.bz2 diff --git a/libdrm.spec b/libdrm.spec index 405b6dd..7610cbe 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -2,8 +2,8 @@ Summary: Direct Rendering Manager runtime library Name: libdrm -Version: 2.4.38 -Release: 2%{?dist} +Version: 2.4.39 +Release: 1%{?dist} License: MIT Group: System Environment/Libraries URL: http://dri.sourceforge.net @@ -32,8 +32,6 @@ Patch3: libdrm-make-dri-perms-okay.patch Patch4: libdrm-2.4.0-no-bc.patch # make rule to print the list of test programs Patch5: libdrm-2.4.25-check-programs.patch -# backport from master radeon prime support -Patch6: radeon-prime.patch %description Direct Rendering Manager runtime library @@ -61,7 +59,6 @@ Utility programs for the kernel DRM interface. Will void your warranty. %patch3 -p1 -b .forceperms %patch4 -p1 -b .no-bc %patch5 -p1 -b .check -%patch6 -p1 -b .radeon-prime %build autoreconf -v --install || exit 1 @@ -182,6 +179,9 @@ done %{_libdir}/pkgconfig/libdrm_nouveau.pc %changelog +* Mon Aug 27 2012 Dave Airlie 2.4.39-1 +- upstream 2.4.39 release + * Tue Aug 14 2012 Dave Airlie 2.4.38-2 - add radeon prime support diff --git a/radeon-prime.patch b/radeon-prime.patch deleted file mode 100644 index f5d692c..0000000 --- a/radeon-prime.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 3163cfe4db925429760407e77140e2d595338bc2 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Tue, 12 Jun 2012 17:31:12 +0100 -Subject: [PATCH] radeon: add prime import/export support - -this adds radeon version of the prime import/export support. - -Signed-off-by: Dave Airlie ---- - radeon/Makefile.am | 2 +- - radeon/radeon_bo_gem.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- - radeon/radeon_bo_gem.h | 4 ++++ - 3 files changed, 52 insertions(+), 2 deletions(-) - -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 - 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 --- -1.7.11.2 - diff --git a/sources b/sources index 1f8b5a7..b027695 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a910d1305adcaa6561a7450899949105 libdrm-2.4.38.tar.bz2 +9a299e021d81bab6c82307582c78319d libdrm-2.4.39.tar.bz2 From 3a92839318914a1c87c28bbe5a878f07ff22e573 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 8 Oct 2012 10:59:49 -0400 Subject: [PATCH 2/2] Add exynos to arm --- libdrm.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libdrm.spec b/libdrm.spec index 7610cbe..12edcf1 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -3,7 +3,7 @@ Summary: Direct Rendering Manager runtime library Name: libdrm Version: 2.4.39 -Release: 1%{?dist} +Release: 3%{?dist} License: MIT Group: System Environment/Libraries URL: http://dri.sourceforge.net @@ -65,6 +65,7 @@ autoreconf -v --install || exit 1 %configure \ %ifarch %{arm} --enable-omap-experimental-api \ + --enable-exynos-experimental-api \ %endif --enable-udev --disable-libkms make %{?_smp_mflags} @@ -104,6 +105,8 @@ done %{_libdir}/libdrm_intel.so.1.0.0 %endif %ifarch %{arm} +%{_libdir}/libdrm_exynos.so.1 +%{_libdir}/libdrm_exynos.so.1.0.0 %{_libdir}/libdrm_omap.so.1 %{_libdir}/libdrm_omap.so.1.0.0 %endif @@ -146,6 +149,8 @@ done %{_includedir}/libdrm/intel_debug.h %endif %ifarch %{arm} +%{_includedir}/libdrm/exynos_drmif.h +%{_includedir}/exynos/ %{_includedir}/libdrm/omap_drmif.h %{_includedir}/omap/ %endif @@ -164,6 +169,7 @@ done %{_libdir}/libdrm_intel.so %endif %ifarch %{arm} +%{_libdir}/libdrm_exynos.so %{_libdir}/libdrm_omap.so %endif %{_libdir}/libdrm_radeon.so @@ -173,12 +179,16 @@ done %{_libdir}/pkgconfig/libdrm_intel.pc %endif %ifarch %{arm} +%{_libdir}/pkgconfig/libdrm_exynos.pc %{_libdir}/pkgconfig/libdrm_omap.pc %endif %{_libdir}/pkgconfig/libdrm_radeon.pc %{_libdir}/pkgconfig/libdrm_nouveau.pc %changelog +* Mon Oct 08 2012 Adam Jackson 2.4.39-3 +- Add exynos to arm + * Mon Aug 27 2012 Dave Airlie 2.4.39-1 - upstream 2.4.39 release