From f24a26bf204c2655b14eaf356a36adffd44f5f55 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 1 Oct 2008 05:24:16 +0000 Subject: [PATCH] - move intel bufmgr code around - update patches --- libdrm-2.4.0-intel-handle.patch | 44 +++++++++++++++++++++++++++++++++ libdrm-fix-link.patch | 11 +++++++++ libdrm.spec | 4 +++ 3 files changed, 59 insertions(+) create mode 100644 libdrm-2.4.0-intel-handle.patch create mode 100644 libdrm-fix-link.patch diff --git a/libdrm-2.4.0-intel-handle.patch b/libdrm-2.4.0-intel-handle.patch new file mode 100644 index 0000000..f9bb5a8 --- /dev/null +++ b/libdrm-2.4.0-intel-handle.patch @@ -0,0 +1,44 @@ +From af2323b4b3b76070fb453531147a8956161b3718 Mon Sep 17 00:00:00 2001 +From: Jesse Barnes +Date: Tue, 30 Sep 2008 16:35:26 -0700 +Subject: [PATCH] intel bufmgr: reinstate buffer handle tracking + +We need a way of getting at the underlying handle for use with mode +setting. We can either export it in the dri_bo object or provide a new +callback to get it. +--- + libdrm/intel/intel_bufmgr.h | 4 ++++ + libdrm/intel/intel_bufmgr_gem.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/libdrm/intel/intel_bufmgr.h b/libdrm/intel/intel_bufmgr.h +index c44d596..67dba6a 100644 +--- a/libdrm/intel/intel_bufmgr.h ++++ b/libdrm/intel/intel_bufmgr.h +@@ -59,6 +59,10 @@ struct _dri_bo { + + /** Buffer manager context associated with this buffer object */ + dri_bufmgr *bufmgr; ++ /** ++ * MM-specific handle for accessing object ++ */ ++ int handle; + }; + + dri_bo *dri_bo_alloc(dri_bufmgr *bufmgr, const char *name, unsigned long size, +diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c +index 4ca49d0..70cdca7 100644 +--- a/libdrm/intel/intel_bufmgr_gem.c ++++ b/libdrm/intel/intel_bufmgr_gem.c +@@ -316,7 +316,7 @@ dri_gem_bo_alloc(dri_bufmgr *bufmgr, const char *name, + + ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_CREATE, &create); + bo_gem->gem_handle = create.handle; +- //bo_gem->bo.handle = bo_gem->gem_handle; ++ bo_gem->bo.handle = bo_gem->gem_handle; + if (ret != 0) { + free(bo_gem); + return NULL; +-- +1.5.5.1 + diff --git a/libdrm-fix-link.patch b/libdrm-fix-link.patch new file mode 100644 index 0000000..e4c6a94 --- /dev/null +++ b/libdrm-fix-link.patch @@ -0,0 +1,11 @@ +diff -up libdrm-20080930/libdrm/Makefile.am.fixlink libdrm-20080930/libdrm/Makefile.am +--- libdrm-20080930/libdrm/Makefile.am.fixlink 2008-10-01 11:18:36.000000000 +1000 ++++ libdrm-20080930/libdrm/Makefile.am 2008-10-01 11:18:44.000000000 +1000 +@@ -27,7 +27,6 @@ libdrm_la_LDFLAGS = -version-number 2:3: + AM_CFLAGS = -I$(top_srcdir)/shared-core + libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c \ + xf86drmMode.c +-libdrm_la_LIBADD = intel/libdrm_intel.la + + libdrmincludedir = ${includedir} + libdrminclude_HEADERS = xf86drm.h xf86drmMode.h diff --git a/libdrm.spec b/libdrm.spec index 02d70ed..985bd95 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -25,7 +25,9 @@ Patch2: libdrm-2.4.0-no-freaking-mknod.patch # - funk that just bash it direct for now - Patch3: libdrm-make-dri-perms-okay.patch Patch4: libdrm-2.4.0-no-bc.patch +Patch5: libdrm-2.4.0-intel-handle.patch Patch6: libdrm-gtt-map-support-3.patch +Patch7: libdrm-fix-link.patch %description Direct Rendering Manager runtime library @@ -44,7 +46,9 @@ Direct Rendering Manager development package #patch2 -p1 -b .mknod %patch3 -p1 -b .forceperms %patch4 -p1 -b .no-bc +%patch5 -p1 -b .intel-handle %patch6 -p1 -b .gttmap +%patch7 -p1 -b .fixlink %build autoreconf -v --install || exit 1