Hello community, here is the log from the commit of package libdrm for openSUSE:Factory checked in at Tue May 19 00:47:58 CEST 2009. -------- --- libdrm/libdrm.changes 2009-04-18 13:58:14.000000000 +0200 +++ libdrm/libdrm.changes 2009-05-16 03:21:45.000000000 +0200 @@ -1,0 +2,9 @@ +Sat May 16 03:05:19 CEST 2009 - sndirsch@suse.de + +- libdrm 2.4.11 + * Two releases in one, so twice the usual tiny amount of changes. + Both of the new libdrm_intel interfaces enable KMS fixes in the + Intel 2D driver. +- enabled build of Nouveau's experimental API + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libdrm-2.4.9.tar.bz2 New: ---- libdrm-2.4.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdrm.spec ++++++ --- /var/tmp/diff_new_pack.a23925/_old 2009-05-19 00:46:19.000000000 +0200 +++ /var/tmp/diff_new_pack.a23925/_new 2009-05-19 00:46:19.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package libdrm (Version 2.4.9) +# spec file for package libdrm (Version 2.4.11) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -31,7 +31,7 @@ Obsoletes: libdrm-64bit %endif # -Version: 2.4.9 +Version: 2.4.11 Release: 1 Summary: Userspace Interface for Kernel DRM Services Source: %{name}-%{version}.tar.bz2 @@ -118,7 +118,7 @@ %build autoreconf -fi export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -%configure --with-pic +%configure --with-pic --enable-nouveau-experimental-api make %install @@ -137,21 +137,33 @@ /usr/%{_lib}/libdrm.so.2.4.0 /usr/%{_lib}/libdrm_intel.so.1 /usr/%{_lib}/libdrm_intel.so.1.0.0 +/usr/%{_lib}/libdrm_nouveau.so.1 +/usr/%{_lib}/libdrm_nouveau.so.1.0.0 %files devel %defattr(-,root,root) /usr/include/drm/ +/usr/include/nouveau/ /usr/include/xf86drm.h /usr/include/xf86drmMode.h /usr/include/intel_bufmgr.h /usr/%{_lib}/libdrm.so /usr/%{_lib}/libdrm_intel.so +/usr/%{_lib}/libdrm_nouveau.so /usr/%{_lib}/pkgconfig/libdrm.pc /usr/%{_lib}/pkgconfig/libdrm_intel.pc +/usr/%{_lib}/pkgconfig/libdrm_nouveau.pc %exclude %{_libdir}/libdrm.la %exclude %{_libdir}/libdrm_intel.la +%exclude %{_libdir}/libdrm_nouveau.la %changelog +* Sat May 16 2009 sndirsch@suse.de +- libdrm 2.4.11 + * Two releases in one, so twice the usual tiny amount of changes. + Both of the new libdrm_intel interfaces enable KMS fixes in the + Intel 2D driver. +- enabled build of Nouveau's experimental API * Sat Apr 18 2009 sndirsch@suse.de - libdrm 2.4.9 * Aka, the "kick jbarnes" release. Not only did I push the ++++++ libdrm-2.4.9.tar.bz2 -> libdrm-2.4.11.tar.bz2 ++++++ ++++ 3326 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.9/configure.ac new/libdrm-2.4.11/configure.ac --- old/libdrm-2.4.9/configure.ac 2009-04-11 00:34:07.000000000 +0200 +++ new/libdrm-2.4.11/configure.ac 2009-05-16 01:13:57.000000000 +0200 @@ -19,7 +19,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libdrm], 2.4.9, [dri-devel@lists.sourceforge.net], libdrm) +AC_INIT([libdrm], 2.4.11, [dri-devel@lists.sourceforge.net], libdrm) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) 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.9/libdrm/intel/intel_bufmgr.c new/libdrm-2.4.11/libdrm/intel/intel_bufmgr.c --- old/libdrm-2.4.9/libdrm/intel/intel_bufmgr.c 2009-03-19 00:51:12.000000000 +0100 +++ new/libdrm-2.4.11/libdrm/intel/intel_bufmgr.c 2009-05-16 01:13:57.000000000 +0200 @@ -212,3 +212,19 @@ *swizzle_mode = I915_BIT_6_SWIZZLE_NONE; return 0; } + +int drm_intel_bo_disable_reuse(drm_intel_bo *bo) +{ + if (bo->bufmgr->bo_disable_reuse) + return bo->bufmgr->bo_disable_reuse(bo); + return 0; +} + +int +drm_intel_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) +{ + if (bufmgr->get_pipe_from_crtc_id) + return bufmgr->get_pipe_from_crtc_id(bufmgr, crtc_id); + return -1; +} + 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.9/libdrm/intel/intel_bufmgr_fake.c new/libdrm-2.4.11/libdrm/intel/intel_bufmgr_fake.c --- old/libdrm-2.4.9/libdrm/intel/intel_bufmgr_fake.c 2009-03-19 00:51:12.000000000 +0100 +++ new/libdrm-2.4.11/libdrm/intel/intel_bufmgr_fake.c 2009-04-27 20:49:16.000000000 +0200 @@ -1467,8 +1467,10 @@ assert(DRMLISTEMPTY(&bufmgr_fake->on_hardware)); DRMLISTFOREACHSAFE(block, tmp, &bufmgr_fake->lru) { + drm_intel_bo_fake *bo_fake = (drm_intel_bo_fake *)block->bo; /* Releases the memory, and memcpys dirty contents out if necessary. */ free_block(bufmgr_fake, block, 0); + bo_fake->block = NULL; } pthread_mutex_unlock(&bufmgr_fake->lock); 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.9/libdrm/intel/intel_bufmgr_gem.c new/libdrm-2.4.11/libdrm/intel/intel_bufmgr_gem.c --- old/libdrm-2.4.9/libdrm/intel/intel_bufmgr_gem.c 2009-03-31 19:58:20.000000000 +0200 +++ new/libdrm-2.4.11/libdrm/intel/intel_bufmgr_gem.c 2009-05-16 01:13:57.000000000 +0200 @@ -166,6 +166,11 @@ char used_as_reloc_target; /** + * Boolean of whether this buffer can be re-used + */ + char reusable; + + /** * Size in bytes of this buffer and its relocation descendents. * * Used to avoid costly tree walking in drm_intel_bufmgr_check_aperture in @@ -420,6 +425,7 @@ bo_gem->used_as_reloc_target = 0; bo_gem->tiling_mode = I915_TILING_NONE; bo_gem->swizzle_mode = I915_BIT_6_SWIZZLE_NONE; + bo_gem->reusable = 1; DBG("bo_create: buf %d (%s) %ldb\n", bo_gem->gem_handle, bo_gem->name, size); @@ -479,6 +485,7 @@ bo_gem->validate_index = -1; bo_gem->gem_handle = open_arg.handle; bo_gem->global_name = handle; + bo_gem->reusable = 0; memset(&get_tiling, 0, sizeof(get_tiling)); get_tiling.handle = bo_gem->gem_handle; @@ -505,6 +512,7 @@ drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bo->bufmgr; drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo; + assert(bo_gem->refcount > 0); pthread_mutex_lock(&bufmgr_gem->lock); bo_gem->refcount++; pthread_mutex_unlock(&bufmgr_gem->lock); @@ -515,6 +523,7 @@ { drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo; + assert(bo_gem->refcount > 0); bo_gem->refcount++; } @@ -549,6 +558,7 @@ drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bo->bufmgr; drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo; + assert(bo_gem->refcount > 0); if (--bo_gem->refcount == 0) { struct drm_intel_gem_bo_bucket *bucket; uint32_t tiling_mode; @@ -569,7 +579,7 @@ bucket = drm_intel_gem_bo_bucket_for_size(bufmgr_gem, bo->size); /* Put the buffer into our internal cache for reuse if we can. */ tiling_mode = I915_TILING_NONE; - if (bo_gem->global_name == 0 && + if (bo_gem->reusable && bucket != NULL && (bucket->max_entries == -1 || (bucket->max_entries > 0 && @@ -806,6 +816,29 @@ } static int +drm_intel_gem_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) +{ + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; + struct drm_i915_get_pipe_from_crtc_id get_pipe_from_crtc_id; + int ret; + + get_pipe_from_crtc_id.crtc_id = crtc_id; + ret = ioctl (bufmgr_gem->fd, DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID, + &get_pipe_from_crtc_id); + if (ret != 0) { + /* We return -1 here to signal that we don't + * know which pipe is associated with this crtc. + * This lets the caller know that this information + * isn't available; using the wrong pipe for + * vblank waiting can cause the chipset to lock up + */ + return -1; + } + + return get_pipe_from_crtc_id.pipe; +} + +static int drm_intel_gem_bo_get_subdata (drm_intel_bo *bo, unsigned long offset, unsigned long size, void *data) { @@ -1165,6 +1198,7 @@ if (ret != 0) return -errno; bo_gem->global_name = flink.name; + bo_gem->reusable = 0; } *name = bo_gem->global_name; @@ -1353,6 +1387,19 @@ } } +/* + * Disable buffer reuse for objects which are shared with the kernel + * as scanout buffers + */ +static int +drm_intel_gem_bo_disable_reuse(drm_intel_bo *bo) +{ + drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo; + + bo_gem->reusable = 0; + return 0; +} + /** * Initializes the GEM buffer manager, which uses the kernel to allocate, map, * and manage map buffer objections. @@ -1434,6 +1481,8 @@ bufmgr_gem->bufmgr.destroy = drm_intel_bufmgr_gem_destroy; bufmgr_gem->bufmgr.debug = 0; bufmgr_gem->bufmgr.check_aperture_space = drm_intel_gem_check_aperture_space; + bufmgr_gem->bufmgr.bo_disable_reuse = drm_intel_gem_bo_disable_reuse; + bufmgr_gem->bufmgr.get_pipe_from_crtc_id = drm_intel_gem_get_pipe_from_crtc_id; /* Initialize the linked lists for BO reuse cache. */ for (i = 0; i < DRM_INTEL_GEM_BO_BUCKETS; i++) DRMINITLISTHEAD(&bufmgr_gem->cache_bucket[i].head); 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.9/libdrm/intel/intel_bufmgr.h new/libdrm-2.4.11/libdrm/intel/intel_bufmgr.h --- old/libdrm-2.4.9/libdrm/intel/intel_bufmgr.h 2009-03-31 19:58:20.000000000 +0200 +++ new/libdrm-2.4.11/libdrm/intel/intel_bufmgr.h 2009-05-16 01:13:57.000000000 +0200 @@ -108,6 +108,8 @@ uint32_t *swizzle_mode); int drm_intel_bo_flink(drm_intel_bo *bo, uint32_t *name); +int drm_intel_bo_disable_reuse(drm_intel_bo *bo); + /* drm_intel_bufmgr_gem.c */ drm_intel_bufmgr *drm_intel_bufmgr_gem_init(int fd, int batch_size); drm_intel_bo *drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr, @@ -118,6 +120,8 @@ int drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo); void drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable); +int drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id); + /* drm_intel_bufmgr_fake.c */ drm_intel_bufmgr *drm_intel_bufmgr_fake_init(int fd, unsigned long low_offset, 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.9/libdrm/intel/intel_bufmgr_priv.h new/libdrm-2.4.11/libdrm/intel/intel_bufmgr_priv.h --- old/libdrm-2.4.9/libdrm/intel/intel_bufmgr_priv.h 2009-03-19 00:51:12.000000000 +0100 +++ new/libdrm-2.4.11/libdrm/intel/intel_bufmgr_priv.h 2009-05-16 01:13:57.000000000 +0200 @@ -178,6 +178,29 @@ int (*bo_flink)(drm_intel_bo *bo, uint32_t *name); int (*check_aperture_space)(drm_intel_bo **bo_array, int count); + + /** + * Disable buffer reuse for buffers which will be shared in some way, + * as with scanout buffers. When the buffer reference count goes to zero, + * it will be freed and not placed in the reuse list. + * + * \param bo Buffer to disable reuse for + */ + int (*bo_disable_reuse)(drm_intel_bo *bo); + + /** + * + * Return the pipe associated with a crtc_id so that vblank + * synchronization can use the correct data in the request. + * This is only supported for KMS and gem at this point, when + * unsupported, this function returns -1 and leaves the decision + * of what to do in that case to the caller + * + * \param bufmgr the associated buffer manager + * \param crtc_id the crtc identifier + */ + int (*get_pipe_from_crtc_id)(drm_intel_bufmgr *bufmgr, int crtc_id); + int debug; /**< Enables verbose debugging printouts */ }; 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.9/libdrm/Makefile.am new/libdrm-2.4.11/libdrm/Makefile.am --- old/libdrm-2.4.9/libdrm/Makefile.am 2009-03-19 00:51:12.000000000 +0100 +++ new/libdrm-2.4.11/libdrm/Makefile.am 2009-05-16 01:13:57.000000000 +0200 @@ -32,7 +32,6 @@ AM_CFLAGS = -I$(top_srcdir)/shared-core libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c \ xf86drmMode.c libdrm_lists.h - libdrm_lists.h libdrmincludedir = ${includedir} libdrminclude_HEADERS = xf86drm.h xf86drmMode.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.9/libdrm/nouveau/nouveau_bo.c new/libdrm-2.4.11/libdrm/nouveau/nouveau_bo.c --- old/libdrm-2.4.9/libdrm/nouveau/nouveau_bo.c 2009-03-31 19:58:20.000000000 +0200 +++ new/libdrm-2.4.11/libdrm/nouveau/nouveau_bo.c 2009-04-27 20:49:16.000000000 +0200 @@ -404,7 +404,8 @@ nvbo->size = req.size; nvbo->handle = req.handle; } - + + nvbo->base.handle = nvbo->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.9/libdrm/nouveau/nouveau_dma.c new/libdrm-2.4.11/libdrm/nouveau/nouveau_dma.c --- old/libdrm-2.4.9/libdrm/nouveau/nouveau_dma.c 2009-03-19 00:51:12.000000000 +0100 +++ new/libdrm-2.4.11/libdrm/nouveau/nouveau_dma.c 2009-04-27 20:49:16.000000000 +0200 @@ -41,6 +41,7 @@ volatile int dum; NOUVEAU_DMA_BARRIER; + dum = nvchan->pushbuf[0]; dum = READ_GET(nvchan); *nvchan->put = put; 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.9/libdrm/xf86drmMode.c new/libdrm-2.4.11/libdrm/xf86drmMode.c --- old/libdrm-2.4.9/libdrm/xf86drmMode.c 2009-04-11 00:24:10.000000000 +0200 +++ new/libdrm-2.4.11/libdrm/xf86drmMode.c 2009-04-27 20:49:16.000000000 +0200 @@ -395,7 +395,8 @@ r->connection = conn.connection; r->mmWidth = conn.mm_width; r->mmHeight = conn.mm_height; - r->subpixel = conn.subpixel; + /* convert subpixel from kernel to userspace */ + r->subpixel = conn.subpixel + 1; r->count_modes = conn.count_modes; /* TODO we should test if these alloc & cpy fails. */ r->count_props = conn.count_props; 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.9/shared-core/drm.h new/libdrm-2.4.11/shared-core/drm.h --- old/libdrm-2.4.9/shared-core/drm.h 2009-03-19 00:51:13.000000000 +0100 +++ new/libdrm-2.4.11/shared-core/drm.h 2009-05-16 01:13:57.000000000 +0200 @@ -69,6 +69,12 @@ # define DEPRECATED __attribute__ ((deprecated)) #else # define DEPRECATED +# ifndef __FUNCTION__ +# define __FUNCTION__ __func__ /* C99 */ +# endif +# ifndef __volatile__ +# define __volatile__ volatile +# endif #endif #if defined(__linux__) 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.9/shared-core/i915_drm.h new/libdrm-2.4.11/shared-core/i915_drm.h --- old/libdrm-2.4.9/shared-core/i915_drm.h 2009-03-19 00:51:13.000000000 +0100 +++ new/libdrm-2.4.11/shared-core/i915_drm.h 2009-05-16 01:13:57.000000000 +0200 @@ -205,6 +205,7 @@ #define DRM_I915_GEM_GET_TILING 0x22 #define DRM_I915_GEM_GET_APERTURE 0x23 #define DRM_I915_GEM_MMAP_GTT 0x24 +#define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) @@ -242,6 +243,7 @@ #define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) +#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id) /* Asynchronous page flipping: */ @@ -769,4 +771,12 @@ uint64_t aper_available_size; }; +struct drm_i915_get_pipe_from_crtc_id { + /** ID of CRTC being requested **/ + uint32_t crtc_id; + + /** pipe of requested CRTC **/ + uint32_t pipe; +}; + #endif /* _I915_DRM_H_ */ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org