- move intel bufmgr code around - update patches

This commit is contained in:
Dave Airlie 2008-10-01 05:24:16 +00:00
parent 8504220ddf
commit f24a26bf20
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From af2323b4b3b76070fb453531147a8956161b3718 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
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

11
libdrm-fix-link.patch Normal file
View File

@ -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

View File

@ -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