Gentoo Archives: gentoo-commits

From: "Jeremy Olexa (darkside)" <darkside@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-libs/libdrm/files: libdrm-2.4.16-solaris.patch libdrm-2.4.15-solaris.patch
Date: Thu, 27 Jan 2011 16:55:53
Message-Id: 20110127165539.5E68C20057@flycatcher.gentoo.org
1 darkside 11/01/27 16:55:39
2
3 Added: libdrm-2.4.16-solaris.patch
4 libdrm-2.4.15-solaris.patch
5 Log:
6 Push Gentoo Prefix changes from x11 overlay, as approved
7
8 (Portage version: 2.1.9.35/cvs/Linux i686)
9
10 Revision Changes Path
11 1.1 x11-libs/libdrm/files/libdrm-2.4.16-solaris.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libdrm/files/libdrm-2.4.16-solaris.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libdrm/files/libdrm-2.4.16-solaris.patch?rev=1.1&content-type=text/plain
15
16 Index: libdrm-2.4.16-solaris.patch
17 ===================================================================
18 This is a reapply (hopefully in the relevant places) of the original
19 patch found here:
20 http://www.mail-archive.com/dri-devel@×××××××××××××××××.net/msg35327.html
21
22 --- libdrm-2.4.16/include/drm/drm.h
23 +++ libdrm-2.4.16/include/drm/drm.h
24 @@ -54,7 +54,11 @@
25 typedef uint32_t __u32;
26 typedef int64_t __s64;
27 typedef uint64_t __u64;
28 +#if defined(__sun)
29 +typedef unsigned long long drm_handle_t;
30 +#else
31 typedef unsigned long drm_handle_t;
32 +#endif
33
34 #endif
35
36 @@ -210,12 +214,22 @@
37 * \sa drmAddMap().
38 */
39 struct drm_map {
40 +#ifdef __sun
41 + unsigned long long offset;
42 + /**< Requested physical address (0 for SAREA)*/
43 + unsigned long long handle;
44 + /**< User-space: "Handle" to pass to mmap() */
45 + /**< Kernel-space: kernel-virtual address */
46 +#else
47 unsigned long offset; /**< Requested physical address (0 for SAREA)*/
48 +#endif
49 unsigned long size; /**< Requested physical size (bytes) */
50 enum drm_map_type type; /**< Type of memory to map */
51 enum drm_map_flags flags; /**< Flags */
52 +#ifndef __sun
53 void *handle; /**< User-space: "Handle" to pass to mmap() */
54 /**< Kernel-space: kernel-virtual address */
55 +#endif
56 int mtrr; /**< MTRR slot used */
57 /* Private data */
58 };
59 @@ -375,6 +389,9 @@
60 int count; /**< Length of the buffer list */
61 void *virtual; /**< Mmap'd area in user-virtual */
62 struct drm_buf_pub *list; /**< Buffer information */
63 +#ifdef __sun
64 + int fd;
65 +#endif
66 };
67
68 /**
69 --- libdrm-2.4.16/xf86drm.c
70 +++ libdrm-2.4.16/xf86drm.c
71 @@ -967,7 +967,11 @@
72 {
73 drm_map_t map;
74
75 +#ifdef __sun
76 + map.handle = handle;
77 +#else
78 map.handle = (void *)handle;
79 +#endif
80
81 if(drmIoctl(fd, DRM_IOCTL_RM_MAP, &map))
82 return -errno;
83 @@ -1205,6 +1209,9 @@
84 bufs.count = 0;
85 bufs.list = NULL;
86 bufs.virtual = NULL;
87 +#ifdef __sun
88 + bufs.fd = fd;
89 +#endif
90 if (drmIoctl(fd, DRM_IOCTL_MAP_BUFS, &bufs))
91 return NULL;
92
93 --- libdrm-2.4.16/xf86drm.h
94 +++ libdrm-2.4.16/xf86drm.h
95 @@ -64,6 +64,13 @@
96
97 #endif
98
99 +#if defined(__sun) && !defined(_IOC)
100 +#define _IOC(dir, group, nr, size) \
101 + (dir == DRM_IOC_READWRITE ? _IOWRN(group, nr, size) : \
102 + (dir == DRM_IOC_WRITE ? _IOWN(group, nr, size) : \
103 + /* dir == DRM_IOC_READ */ _IORN(group, nr, size) ))
104 +#endif
105 +
106 /* Defaults, if nothing set in xf86config */
107 #define DRM_DEV_UID 0
108 #define DRM_DEV_GID 0
109
110
111
112 1.1 x11-libs/libdrm/files/libdrm-2.4.15-solaris.patch
113
114 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libdrm/files/libdrm-2.4.15-solaris.patch?rev=1.1&view=markup
115 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libdrm/files/libdrm-2.4.15-solaris.patch?rev=1.1&content-type=text/plain
116
117 Index: libdrm-2.4.15-solaris.patch
118 ===================================================================
119 http://bugs.gentoo.org/show_bug.cgi?id=288064
120
121 --- libdrm/nouveau/nouveau_bo.c
122 +++ libdrm/nouveau/nouveau_bo.c
123 @@ -31,6 +31,12 @@
124 #include <sys/mman.h>
125 #include <sys/ioctl.h>
126
127 +/* On solaris unistd.h and stropts.h are needed for ioctl */
128 +#ifdef __sun
129 +#include <unistd.h>
130 +#include <stropts.h>
131 +#endif
132 +
133 #include "nouveau_private.h"
134
135 int
136 --- libdrm/radeon/radeon_bo_gem.c
137 +++ libdrm/radeon/radeon_bo_gem.c
138 @@ -39,6 +39,13 @@
139 #include <sys/mman.h>
140 #include <sys/ioctl.h>
141 #include <errno.h>
142 +
143 +/* On solaris unistd.h and stropts.h are needed for ioctl */
144 +#ifdef __sun
145 +#include <unistd.h>
146 +#include <stropts.h>
147 +#endif
148 +
149 #include "xf86drm.h"
150 #include "drm.h"
151 #include "radeon_drm.h"