- add r500 support patch
- resync to F9 version
This commit is contained in:
parent
9fee969ca2
commit
ee0de6fe36
54
libdrm-2.4.0-no-bc.patch
Normal file
54
libdrm-2.4.0-no-bc.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
diff -up libdrm-20080303/libdrm/xf86drm.c.jx libdrm-20080303/libdrm/xf86drm.c
|
||||||
|
--- libdrm-20080303/libdrm/xf86drm.c.jx 2008-04-29 10:07:13.000000000 -0400
|
||||||
|
+++ libdrm-20080303/libdrm/xf86drm.c 2008-04-29 10:07:25.000000000 -0400
|
||||||
|
@@ -383,11 +383,6 @@ int drmAvailable(void)
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
if ((fd = drmOpenMinor(0, 1, DRM_NODE_RENDER)) < 0) {
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* Try proc for backward Linux compatibility */
|
||||||
|
- if (!access("/proc/dri/0", R_OK))
|
||||||
|
- return 1;
|
||||||
|
-#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -506,38 +501,6 @@ static int drmOpenByName(const char *nam
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* Backward-compatibility /proc support */
|
||||||
|
- for (i = 0; i < 8; i++) {
|
||||||
|
- char proc_name[64], buf[512];
|
||||||
|
- char *driver, *pt, *devstring;
|
||||||
|
- int retcode;
|
||||||
|
-
|
||||||
|
- sprintf(proc_name, "/proc/dri/%d/name", i);
|
||||||
|
- if ((fd = open(proc_name, 0, 0)) >= 0) {
|
||||||
|
- retcode = read(fd, buf, sizeof(buf)-1);
|
||||||
|
- close(fd);
|
||||||
|
- if (retcode) {
|
||||||
|
- buf[retcode-1] = '\0';
|
||||||
|
- for (driver = pt = buf; *pt && *pt != ' '; ++pt)
|
||||||
|
- ;
|
||||||
|
- if (*pt) { /* Device is next */
|
||||||
|
- *pt = '\0';
|
||||||
|
- if (!strcmp(driver, name)) { /* Match */
|
||||||
|
- for (devstring = ++pt; *pt && *pt != ' '; ++pt)
|
||||||
|
- ;
|
||||||
|
- if (*pt) { /* Found busid */
|
||||||
|
- return drmOpenByBusid(++pt);
|
||||||
|
- } else { /* No busid */
|
||||||
|
- return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_RENDER);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
55
libdrm-radeon-r500.patch
Normal file
55
libdrm-radeon-r500.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
diff --git a/shared-core/radeon_drm.h b/shared-core/radeon_drm.h
|
||||||
|
index 0971f97..ffaa46e 100644
|
||||||
|
--- a/shared-core/radeon_drm.h
|
||||||
|
+++ b/shared-core/radeon_drm.h
|
||||||
|
@@ -225,9 +225,22 @@ typedef union {
|
||||||
|
#define R300_CMD_WAIT 7
|
||||||
|
# define R300_WAIT_2D 0x1
|
||||||
|
# define R300_WAIT_3D 0x2
|
||||||
|
+/* these two defines are DOING IT WRONG - however
|
||||||
|
+ * we have userspace which relies on using these.
|
||||||
|
+ * The wait interface is backwards compat new
|
||||||
|
+ * code should use the NEW_WAIT defines below
|
||||||
|
+ * THESE ARE NOT BIT FIELDS
|
||||||
|
+ */
|
||||||
|
# define R300_WAIT_2D_CLEAN 0x3
|
||||||
|
# define R300_WAIT_3D_CLEAN 0x4
|
||||||
|
+
|
||||||
|
+# define R300_NEW_WAIT_2D_3D 0x3
|
||||||
|
+# define R300_NEW_WAIT_2D_2D_CLEAN 0x4
|
||||||
|
+# define R300_NEW_WAIT_3D_3D_CLEAN 0x6
|
||||||
|
+# define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8
|
||||||
|
+
|
||||||
|
#define R300_CMD_SCRATCH 8
|
||||||
|
+#define R300_CMD_R500FP 9
|
||||||
|
|
||||||
|
typedef union {
|
||||||
|
unsigned int u;
|
||||||
|
@@ -256,6 +269,9 @@ typedef union {
|
||||||
|
struct {
|
||||||
|
unsigned char cmd_type, reg, n_bufs, flags;
|
||||||
|
} scratch;
|
||||||
|
+ struct {
|
||||||
|
+ unsigned char cmd_type, count, adrlo, adrhi_flags;
|
||||||
|
+ } r500fp;
|
||||||
|
} drm_r300_cmd_header_t;
|
||||||
|
|
||||||
|
#define RADEON_FRONT 0x1
|
||||||
|
@@ -266,6 +282,9 @@ typedef union {
|
||||||
|
#define RADEON_USE_HIERZ 0x40000000
|
||||||
|
#define RADEON_USE_COMP_ZBUF 0x20000000
|
||||||
|
|
||||||
|
+#define R500FP_CONSTANT_TYPE (1 << 1)
|
||||||
|
+#define R500FP_CONSTANT_CLAMP (1 << 2)
|
||||||
|
+
|
||||||
|
/* Primitive types
|
||||||
|
*/
|
||||||
|
#define RADEON_POINTS 0x1
|
||||||
|
@@ -657,6 +676,7 @@ typedef struct drm_radeon_indirect {
|
||||||
|
#define RADEON_PARAM_CARD_TYPE 12
|
||||||
|
#define RADEON_PARAM_VBLANK_CRTC 13 /* VBLANK CRTC */
|
||||||
|
#define RADEON_PARAM_FB_LOCATION 14 /* FB location */
|
||||||
|
+#define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */
|
||||||
|
|
||||||
|
typedef struct drm_radeon_getparam {
|
||||||
|
int param;
|
14
libdrm.spec
14
libdrm.spec
@ -3,7 +3,7 @@
|
|||||||
Summary: Direct Rendering Manager runtime library
|
Summary: Direct Rendering Manager runtime library
|
||||||
Name: libdrm
|
Name: libdrm
|
||||||
Version: 2.4.0
|
Version: 2.4.0
|
||||||
Release: 0.10%{?dist}
|
Release: 0.12%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://dri.sourceforge.net
|
URL: http://dri.sourceforge.net
|
||||||
@ -22,6 +22,8 @@ Patch2: libdrm-2.4.0-no-freaking-mknod.patch
|
|||||||
# udev vs pam.console vs hal vs xml vs ConsoleKit
|
# udev vs pam.console vs hal vs xml vs ConsoleKit
|
||||||
# - funk that just bash it direct for now -
|
# - funk that just bash it direct for now -
|
||||||
Patch3: libdrm-make-dri-perms-okay.patch
|
Patch3: libdrm-make-dri-perms-okay.patch
|
||||||
|
Patch4: libdrm-2.4.0-no-bc.patch
|
||||||
|
Patch5: libdrm-radeon-r500.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Direct Rendering Manager runtime library
|
Direct Rendering Manager runtime library
|
||||||
@ -39,6 +41,8 @@ Direct Rendering Manager development package
|
|||||||
%patch1 -p1 -b .modesetting
|
%patch1 -p1 -b .modesetting
|
||||||
#patch2 -p1 -b .mknod
|
#patch2 -p1 -b .mknod
|
||||||
%patch3 -p1 -b .forceperms
|
%patch3 -p1 -b .forceperms
|
||||||
|
%patch4 -p1 -b .no-bc
|
||||||
|
%patch5 -p1 -b .r500
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -v --install || exit 1
|
autoreconf -v --install || exit 1
|
||||||
@ -96,6 +100,14 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/libdrm.pc
|
%{_libdir}/pkgconfig/libdrm.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 28 2008 Dave Airlie <airlied@redhat.com> 2.4.0-0.12
|
||||||
|
- add r500 support patch
|
||||||
|
|
||||||
|
* Tue Apr 29 2008 Adam Jackson <ajax@redhat.com> 2.4.0-0.11
|
||||||
|
- libdrm-2.4.0-no-bc.patch: Delete the /proc/dri BC code. It's not needed,
|
||||||
|
and the kernel implementation is sufficiently broken that we should avoid
|
||||||
|
ever touching it.
|
||||||
|
|
||||||
* Wed Mar 19 2008 Dave Airlie <airlied@redhat.com> 2.4.0-0.10
|
* Wed Mar 19 2008 Dave Airlie <airlied@redhat.com> 2.4.0-0.10
|
||||||
- force libdrm to make the node perms useful to everyone
|
- force libdrm to make the node perms useful to everyone
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user