Hello community, here is the log from the commit of package libdrm for openSUSE:Factory checked in at 2013-12-11 17:21:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2013-11-28 07:37:04.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libdrm.new/libdrm.changes 2013-12-11 17:21:49.000000000 +0100 @@ -1,0 +2,9 @@ +Wed Dec 4 00:35:02 UTC 2013 - hrvoje.sen...@gmail.com + +- Update to version 2.4.50: + + intel: Track known prime buffers for re-use + + radeon: Update unaligned offset for 2D->1D tiling transition on SI +- Droped U_update-unaligned-offset-for-2D-1D-tiling-transition-on-SI.patch, + included in this release + +------------------------------------------------------------------- Old: ---- U_update-unaligned-offset-for-2D-1D-tiling-transition-on-SI.patch libdrm-2.4.49.tar.bz2 New: ---- libdrm-2.4.50.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdrm.spec ++++++ --- /var/tmp/diff_new_pack.Yql7aN/_old 2013-12-11 17:21:50.000000000 +0100 +++ /var/tmp/diff_new_pack.Yql7aN/_new 2013-12-11 17:21:50.000000000 +0100 @@ -18,7 +18,7 @@ Name: libdrm Url: http://dri.freedesktop.org/ -Version: 2.4.49 +Version: 2.4.50 Release: 0 Provides: libdrm23 = %{version} Obsoletes: libdrm23 < %{version} @@ -39,9 +39,6 @@ # PATCH-FIX-UPSTREAM libdrm-implicit-defs.diff fdo#48599 -- Fix compiler warnings in tests/radeon/radeon_ttm.c Patch1: libdrm-implicit-defs.diff Patch2: u_Fix-compilation-on-systems-that-don-t-provide-O_CLOE.patch -# PATCH-FIX-UPSTREAM U_update-unaligned-offset-for-2D-1D-tiling-transition-on-SI.patch -- fdo#71983, resolves crasing on radeon -# SI chips wth 2.4.49 -Patch3: U_update-unaligned-offset-for-2D-1D-tiling-transition-on-SI.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf >= 2.63 @@ -159,7 +156,6 @@ %setup -q %patch1 -p1 %patch2 -p1 -%patch3 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ++++++ libdrm-2.4.49.tar.bz2 -> libdrm-2.4.50.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdrm-2.4.49/configure new/libdrm-2.4.50/configure --- old/libdrm-2.4.49/configure 2013-11-23 01:10:42.000000000 +0100 +++ new/libdrm-2.4.50/configure 2013-12-03 19:47:32.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libdrm 2.4.49. +# Generated by GNU Autoconf 2.69 for libdrm 2.4.50. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=DRI>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='libdrm' PACKAGE_TARNAME='libdrm' -PACKAGE_VERSION='2.4.49' -PACKAGE_STRING='libdrm 2.4.49' +PACKAGE_VERSION='2.4.50' +PACKAGE_STRING='libdrm 2.4.50' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=DRI' PACKAGE_URL='' @@ -1388,7 +1388,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libdrm 2.4.49 to adapt to many kinds of systems. +\`configure' configures libdrm 2.4.50 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1458,7 +1458,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libdrm 2.4.49:";; + short | recursive ) echo "Configuration of libdrm 2.4.50:";; esac cat <<\_ACEOF @@ -1610,7 +1610,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libdrm configure 2.4.49 +libdrm configure 2.4.50 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2033,7 +2033,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libdrm $as_me 2.4.49, which was +It was created by libdrm $as_me 2.4.50, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2854,7 +2854,7 @@ # Define the identity of the package. PACKAGE='libdrm' - VERSION='2.4.49' + VERSION='2.4.50' cat >>confdefs.h <<_ACEOF @@ -13747,7 +13747,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libdrm $as_me 2.4.49, which was +This file was extended by libdrm $as_me 2.4.50, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13813,7 +13813,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libdrm config.status 2.4.49 +libdrm config.status 2.4.50 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdrm-2.4.49/configure.ac new/libdrm-2.4.50/configure.ac --- old/libdrm-2.4.49/configure.ac 2013-11-23 01:10:16.000000000 +0100 +++ new/libdrm-2.4.50/configure.ac 2013-12-03 19:46:47.000000000 +0100 @@ -20,7 +20,7 @@ AC_PREREQ([2.63]) AC_INIT([libdrm], - [2.4.49], + [2.4.50], [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI], [libdrm]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdrm-2.4.49/include/drm/Makefile new/libdrm-2.4.50/include/drm/Makefile --- old/libdrm-2.4.49/include/drm/Makefile 2013-11-23 01:10:45.000000000 +0100 +++ new/libdrm-2.4.50/include/drm/Makefile 2013-12-03 19:47:36.000000000 +0100 @@ -198,10 +198,10 @@ PACKAGE = libdrm PACKAGE_BUGREPORT = https://bugs.freedesktop.org/enter_bug.cgi?product=DRI PACKAGE_NAME = libdrm -PACKAGE_STRING = libdrm 2.4.49 +PACKAGE_STRING = libdrm 2.4.50 PACKAGE_TARNAME = libdrm PACKAGE_URL = -PACKAGE_VERSION = 2.4.49 +PACKAGE_VERSION = 2.4.50 PATH_SEPARATOR = : PCIACCESS_CFLAGS = PCIACCESS_LIBS = -lpciaccess @@ -217,7 +217,7 @@ STRIP = strip VALGRIND_CFLAGS = -I/usr/include/valgrind VALGRIND_LIBS = -L/usr/lib/valgrind -lcoregrind-x86-linux -lvex-x86-linux -lgcc -VERSION = 2.4.49 +VERSION = 2.4.50 WARN_CFLAGS = -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Wdeclaration-after-statement -Wold-style-definition -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline XSLTPROC = /usr/bin/xsltproc abs_builddir = /home/marek/dev/drm/include/drm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdrm-2.4.49/include/drm/radeon_drm.h new/libdrm-2.4.50/include/drm/radeon_drm.h --- old/libdrm-2.4.49/include/drm/radeon_drm.h 2013-11-23 00:35:39.000000000 +0100 +++ new/libdrm-2.4.50/include/drm/radeon_drm.h 2013-11-26 17:51:24.000000000 +0100 @@ -807,6 +807,7 @@ #define RADEON_TILING_MACRO 0x1 #define RADEON_TILING_MICRO 0x2 #define RADEON_TILING_SWAP_16BIT 0x4 +#define RADEON_TILING_R600_NO_SCANOUT RADEON_TILING_SWAP_16BIT #define RADEON_TILING_SWAP_32BIT 0x8 /* this object requires a surface when mapped - i.e. front buffer */ #define RADEON_TILING_SURFACE 0x10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdrm-2.4.49/intel/intel_bufmgr_gem.c new/libdrm-2.4.50/intel/intel_bufmgr_gem.c --- old/libdrm-2.4.49/intel/intel_bufmgr_gem.c 2013-11-22 16:25:06.000000000 +0100 +++ new/libdrm-2.4.50/intel/intel_bufmgr_gem.c 2013-11-28 16:27:16.000000000 +0100 @@ -149,6 +149,8 @@ /** * Kenel-assigned global name for this object + * + * List contains both flink named and prime fd'd objects */ unsigned int global_name; drmMMListHead name_list; @@ -862,10 +864,6 @@ } } - bo_gem = calloc(1, sizeof(*bo_gem)); - if (!bo_gem) - return NULL; - VG_CLEAR(open_arg); open_arg.name = handle; ret = drmIoctl(bufmgr_gem->fd, @@ -874,9 +872,26 @@ if (ret != 0) { DBG("Couldn't reference %s handle 0x%08x: %s\n", name, handle, strerror(errno)); - free(bo_gem); return NULL; } + /* Now see if someone has used a prime handle to get this + * object from the kernel before by looking through the list + * again for a matching gem_handle + */ + for (list = bufmgr_gem->named.next; + list != &bufmgr_gem->named; + list = list->next) { + bo_gem = DRMLISTENTRY(drm_intel_bo_gem, list, name_list); + if (bo_gem->gem_handle == open_arg.handle) { + drm_intel_gem_bo_reference(&bo_gem->bo); + return &bo_gem->bo; + } + } + + bo_gem = calloc(1, sizeof(*bo_gem)); + if (!bo_gem) + return NULL; + bo_gem->bo.size = open_arg.size; bo_gem->bo.offset = 0; bo_gem->bo.virtual = NULL; @@ -2451,8 +2466,25 @@ uint32_t handle; drm_intel_bo_gem *bo_gem; struct drm_i915_gem_get_tiling get_tiling; + drmMMListHead *list; ret = drmPrimeFDToHandle(bufmgr_gem->fd, prime_fd, &handle); + + /* + * See if the kernel has already returned this buffer to us. Just as + * for named buffers, we must not create two bo's pointing at the same + * kernel object + */ + for (list = bufmgr_gem->named.next; + list != &bufmgr_gem->named; + list = list->next) { + bo_gem = DRMLISTENTRY(drm_intel_bo_gem, list, name_list); + if (bo_gem->gem_handle == handle) { + drm_intel_gem_bo_reference(&bo_gem->bo); + return &bo_gem->bo; + } + } + if (ret) { fprintf(stderr,"ret is %d %d\n", ret, errno); return NULL; @@ -2487,8 +2519,8 @@ bo_gem->has_error = false; bo_gem->reusable = false; - DRMINITLISTHEAD(&bo_gem->name_list); DRMINITLISTHEAD(&bo_gem->vma_list); + DRMLISTADDTAIL(&bo_gem->name_list, &bufmgr_gem->named); VG_CLEAR(get_tiling); get_tiling.handle = bo_gem->gem_handle; @@ -2513,6 +2545,9 @@ drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; + if (DRMLISTEMPTY(&bo_gem->name_list)) + DRMLISTADDTAIL(&bo_gem->name_list, &bufmgr_gem->named); + if (drmPrimeHandleToFD(bufmgr_gem->fd, bo_gem->gem_handle, DRM_CLOEXEC, prime_fd) != 0) return -errno; @@ -2542,7 +2577,8 @@ bo_gem->global_name = flink.name; bo_gem->reusable = false; - DRMLISTADDTAIL(&bo_gem->name_list, &bufmgr_gem->named); + if (DRMLISTEMPTY(&bo_gem->name_list)) + DRMLISTADDTAIL(&bo_gem->name_list, &bufmgr_gem->named); } *name = bo_gem->global_name; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdrm-2.4.49/radeon/radeon_surface.c new/libdrm-2.4.50/radeon/radeon_surface.c --- old/libdrm-2.4.49/radeon/radeon_surface.c 2013-11-23 00:35:42.000000000 +0100 +++ new/libdrm-2.4.50/radeon/radeon_surface.c 2013-11-26 15:40:46.000000000 +0100 @@ -1667,7 +1667,7 @@ return si_surface_init_1d(surf_man, surf, level, bpe, tile_mode, offset, i); } /* level0 and first mipmap need to have alignment */ - aligned_offset = surf->bo_size; + aligned_offset = offset = surf->bo_size; if ((i == 0)) { aligned_offset = ALIGN(aligned_offset, surf->bo_alignment); } -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org