- move intel bufmgr code around - update patches
This commit is contained in:
parent
a5d4dec6cd
commit
8504220ddf
@ -1 +1 @@
|
||||
libdrm-20080814.tar.bz2
|
||||
libdrm-20080930.tar.bz2
|
||||
|
@ -1,28 +1,15 @@
|
||||
diff --git a/libdrm/intel/intel_bufmgr.h b/libdrm/intel/intel_bufmgr.h
|
||||
index 4d33521..59def00 100644
|
||||
--- a/libdrm/intel/intel_bufmgr.h
|
||||
+++ b/libdrm/intel/intel_bufmgr.h
|
||||
@@ -126,5 +126,7 @@ int intel_bo_set_tiling(dri_bo *buf, uint32_t *tiling_mode);
|
||||
|
||||
int intel_bo_flink(dri_bo *buf, uint32_t *name);
|
||||
|
||||
+int dri_gem_bo_map_gtt(dri_bo *bo);
|
||||
+
|
||||
#endif /* INTEL_BUFMGR_GEM_H */
|
||||
|
||||
diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
|
||||
index af20efb..ba49b24 100644
|
||||
--- a/libdrm/intel/intel_bufmgr_gem.c
|
||||
+++ b/libdrm/intel/intel_bufmgr_gem.c
|
||||
@@ -35,6 +35,7 @@
|
||||
*/
|
||||
diff -up libdrm-20080930/libdrm/intel/intel_bufmgr_gem.c.gttmap libdrm-20080930/libdrm/intel/intel_bufmgr_gem.c
|
||||
--- libdrm-20080930/libdrm/intel/intel_bufmgr_gem.c.gttmap 2008-09-30 14:17:27.000000000 +1000
|
||||
+++ libdrm-20080930/libdrm/intel/intel_bufmgr_gem.c 2008-09-30 17:35:51.000000000 +1000
|
||||
@@ -39,6 +39,7 @@
|
||||
#endif
|
||||
|
||||
#include <xf86drm.h>
|
||||
+#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -42,6 +43,8 @@
|
||||
@@ -46,6 +47,8 @@
|
||||
#include <assert.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
@ -30,16 +17,8 @@ index af20efb..ba49b24 100644
|
||||
+#include <sys/types.h>
|
||||
|
||||
#include "errno.h"
|
||||
#include "dri_bufmgr.h"
|
||||
@@ -370,6 +373,7 @@ intel_bo_gem_create_from_name(dri_bufmgr *bufmgr, const char *name,
|
||||
bo_gem->refcount = 1;
|
||||
bo_gem->validate_index = -1;
|
||||
bo_gem->gem_handle = open_arg.handle;
|
||||
+ bo_gem->bo.handle = bo_gem->gem_handle;
|
||||
|
||||
DBG("bo_create_from_handle: %d (%s)\n", handle, bo_gem->name);
|
||||
|
||||
@@ -517,6 +521,90 @@ dri_gem_bo_map(dri_bo *bo, int write_enable)
|
||||
#include "intel_bufmgr.h"
|
||||
@@ -518,6 +521,90 @@ dri_gem_bo_map(dri_bo *bo, int write_ena
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -130,7 +109,7 @@ index af20efb..ba49b24 100644
|
||||
static int
|
||||
dri_gem_bo_unmap(dri_bo *bo)
|
||||
{
|
||||
@@ -593,7 +681,7 @@ dri_gem_bo_get_subdata (dri_bo *bo, unsigned long offset,
|
||||
@@ -594,7 +681,7 @@ dri_gem_bo_get_subdata (dri_bo *bo, unsi
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -139,9 +118,21 @@ index af20efb..ba49b24 100644
|
||||
dri_gem_bo_wait_rendering(dri_bo *bo)
|
||||
{
|
||||
dri_bufmgr_gem *bufmgr_gem = (dri_bufmgr_gem *)bo->bufmgr;
|
||||
diff -up libdrm-20080814/shared-core/i915_drm.h.da libdrm-20080814/shared-core/i915_drm.h
|
||||
--- libdrm-20080814/shared-core/i915_drm.h.da 2008-09-09 16:43:43.000000000 +1000
|
||||
+++ libdrm-20080814/shared-core/i915_drm.h 2008-09-09 16:43:45.000000000 +1000
|
||||
diff -up libdrm-20080930/libdrm/intel/intel_bufmgr.h.gttmap libdrm-20080930/libdrm/intel/intel_bufmgr.h
|
||||
--- libdrm-20080930/libdrm/intel/intel_bufmgr.h.gttmap 2008-09-30 14:17:27.000000000 +1000
|
||||
+++ libdrm-20080930/libdrm/intel/intel_bufmgr.h 2008-09-30 17:34:10.000000000 +1000
|
||||
@@ -89,6 +89,8 @@ int dri_bo_unpin(dri_bo *buf);
|
||||
int dri_bo_set_tiling(dri_bo *buf, uint32_t *tiling_mode);
|
||||
int dri_bo_flink(dri_bo *buf, uint32_t *name);
|
||||
|
||||
+int dri_gem_bo_map_gtt(dri_bo *bo);
|
||||
+
|
||||
/* intel_bufmgr_gem.c */
|
||||
dri_bufmgr *intel_bufmgr_gem_init(int fd, int batch_size);
|
||||
dri_bo *intel_bo_gem_create_from_name(dri_bufmgr *bufmgr, const char *name,
|
||||
diff -up libdrm-20080930/shared-core/i915_drm.h.gttmap libdrm-20080930/shared-core/i915_drm.h
|
||||
--- libdrm-20080930/shared-core/i915_drm.h.gttmap 2008-09-30 14:17:27.000000000 +1000
|
||||
+++ libdrm-20080930/shared-core/i915_drm.h 2008-09-30 17:01:13.000000000 +1000
|
||||
@@ -99,7 +99,7 @@ typedef struct drm_i915_sarea {
|
||||
int tex_size;
|
||||
int log_tex_granularity;
|
||||
|
@ -1,68 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1cf877d..0cf0974 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -34,6 +34,9 @@ AC_SYS_LARGEFILE
|
||||
|
||||
pkgconfigdir=${libdir}/pkgconfig
|
||||
AC_SUBST(pkgconfigdir)
|
||||
+AC_ARG_ENABLE(udev, AS_HELP_STRING([--enable-udev],
|
||||
+ [Enable support for using udev instead of mknod (default: disabled)]),
|
||||
+ [UDEV=$enableval], [UDEV=no])
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
@@ -101,6 +104,10 @@ AC_CACHE_CHECK([for supported warning flags], libdrm_cv_warn_cflags, [
|
||||
AC_MSG_CHECKING([which warning flags were supported])])
|
||||
WARN_CFLAGS="$libdrm_cv_warn_cflags"
|
||||
|
||||
+if test "x$UDEV" = xyes; then
|
||||
+ AC_DEFINE(UDEV, 1, [Have UDEV support])
|
||||
+fi
|
||||
+
|
||||
AC_SUBST(WARN_CFLAGS)
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
|
||||
index 150dd5f..5d8819a 100644
|
||||
--- a/libdrm/xf86drm.c
|
||||
+++ b/libdrm/xf86drm.c
|
||||
@@ -297,6 +297,7 @@ static int drmOpenDevice(long dev, int minor)
|
||||
group = (serv_group >= 0) ? serv_group : DRM_DEV_GID;
|
||||
}
|
||||
|
||||
+#if !defined(UDEV)
|
||||
if (stat(DRM_DIR_NAME, &st)) {
|
||||
if (!isroot)
|
||||
return DRM_ERR_NOT_ROOT;
|
||||
@@ -317,6 +318,30 @@ static int drmOpenDevice(long dev, int minor)
|
||||
chown(buf, user, group);
|
||||
chmod(buf, devmode);
|
||||
}
|
||||
+#else
|
||||
+ /* if we modprobed then wait for udev */
|
||||
+ {
|
||||
+ int udev_count = 0;
|
||||
+wait_for_udev:
|
||||
+ if (stat(DRM_DIR_NAME, &st)) {
|
||||
+ usleep(20);
|
||||
+ udev_count++;
|
||||
+
|
||||
+ if (udev_count == 50)
|
||||
+ return -1;
|
||||
+ goto wait_for_udev;
|
||||
+ }
|
||||
+
|
||||
+ if (stat(buf, &st)) {
|
||||
+ usleep(20);
|
||||
+ udev_count++;
|
||||
+
|
||||
+ if (udev_count == 50)
|
||||
+ return -1;
|
||||
+ goto wait_for_udev;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
fd = open(buf, O_RDWR, 0);
|
||||
drmMsg("drmOpenDevice: open result is %d, (%s)\n",
|
15
libdrm.spec
15
libdrm.spec
@ -1,9 +1,9 @@
|
||||
%define gitdate 20080814
|
||||
%define gitdate 20080930
|
||||
|
||||
Summary: Direct Rendering Manager runtime library
|
||||
Name: libdrm
|
||||
Version: 2.4.0
|
||||
Release: 0.20%{?dist}
|
||||
Release: 0.21%{?dist}
|
||||
License: MIT
|
||||
Group: System Environment/Libraries
|
||||
URL: http://dri.sourceforge.net
|
||||
@ -25,7 +25,6 @@ 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-wait-udev.patch
|
||||
Patch6: libdrm-gtt-map-support-3.patch
|
||||
|
||||
%description
|
||||
@ -45,7 +44,6 @@ Direct Rendering Manager development package
|
||||
#patch2 -p1 -b .mknod
|
||||
%patch3 -p1 -b .forceperms
|
||||
%patch4 -p1 -b .no-bc
|
||||
%patch5 -p1 -b .udev-wait
|
||||
%patch6 -p1 -b .gttmap
|
||||
|
||||
%build
|
||||
@ -65,7 +63,7 @@ install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/
|
||||
# NOTE: We intentionally don't ship *.la files
|
||||
find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || :
|
||||
find $RPM_BUILD_ROOT -type f -name '*_drm.h' | xargs rm -f -- || :
|
||||
for i in drm.h drm_sarea.h r300_reg.h via_3d_reg.h
|
||||
for i in drm.h drm_mode.h drm_sarea.h r300_reg.h via_3d_reg.h
|
||||
do
|
||||
rm -f $RPM_BUILD_ROOT/usr/include/drm/$i
|
||||
done
|
||||
@ -81,6 +79,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc README
|
||||
%{_libdir}/libdrm.so.2
|
||||
%{_libdir}/libdrm.so.2.3.0
|
||||
%{_libdir}/libdrm_intel.so.1
|
||||
%{_libdir}/libdrm_intel.so.1.0.0
|
||||
%{_sysconfdir}/udev/rules.d/91-drm-modeset.rules
|
||||
%{_sysconfdir}/modprobe.d/i915modeset
|
||||
|
||||
@ -89,12 +89,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
# FIXME should be in drm/ too
|
||||
%{_includedir}/xf86drm.h
|
||||
%{_includedir}/xf86drmMode.h
|
||||
%{_includedir}/dri_bufmgr.h
|
||||
%{_includedir}/intel_bufmgr.h
|
||||
%{_libdir}/libdrm.so
|
||||
%{_libdir}/libdrm_intel.so
|
||||
%{_libdir}/pkgconfig/libdrm.pc
|
||||
|
||||
%changelog
|
||||
* Tue Sep 30 2008 Dave Airlie <airlied@redhat.com> 2.4.0-0.21
|
||||
- move intel bufmgr code around - update patches
|
||||
|
||||
* Tue Sep 09 2008 Dave Airlie <airlied@redhat.com> 2.4.0-0.20
|
||||
- add gtt mapping for intel modesetting
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user