Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1190)

Side by Side Diff: x11-libs/libdrm/files/libdrm-2.4.23-solaris.patch

Issue 6778012: x11-libs/libdrm: get newest version from main Gentoo tree (Closed) Base URL: http://git.chromium.org/git/portage-stable.git@master
Patch Set: No more eclass changes Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | x11-libs/libdrm/libdrm-2.4.24.ebuild » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Index: libdrm-2.4.23/include/drm/drm.h
2 ===================================================================
3 --- libdrm-2.4.23.orig/include/drm/drm.h
4 +++ libdrm-2.4.23/include/drm/drm.h
5 @@ -54,7 +54,11 @@ typedef int32_t __s32;
6 typedef uint32_t __u32;
7 typedef int64_t __s64;
8 typedef uint64_t __u64;
9 +#if defined(__sun)
10 +typedef unsigned long long drm_handle_t;
11 +#else
12 typedef unsigned long drm_handle_t;
13 +#endif
14
15 #endif
16
17 @@ -210,12 +214,22 @@ struct drm_ctx_priv_map {
18 * \sa drmAddMap().
19 */
20 struct drm_map {
21 +#ifdef __sun
22 + unsigned long long offset;
23 + /**< Requested physical address (0 for SAREA)*/
24 + unsigned long long handle;
25 + /**< User-space: "Handle" to pass to mmap() */
26 + /**< Kernel-space: kernel-virtual address */
27 +#else
28 unsigned long offset; /**< Requested physical address (0 for SAREA)*/
29 +#endif
30 unsigned long size; /**< Requested physical size (bytes) */
31 enum drm_map_type type; /**< Type of memory to map */
32 enum drm_map_flags flags; /**< Flags */
33 +#ifndef __sun
34 void *handle; /**< User-space: "Handle" to pass to mmap() */
35 /**< Kernel-space: kernel-virtual address */
36 +#endif
37 int mtrr; /**< MTRR slot used */
38 /* Private data */
39 };
40 @@ -379,6 +393,9 @@ struct drm_buf_map {
41 void *virtual; /**< Mmap'd area in user-virtual */
42 #endif
43 struct drm_buf_pub *list; /**< Buffer information */
44 +#ifdef __sun
45 + int fd;
46 +#endif
47 };
48
49 /**
50 Index: libdrm-2.4.23/radeon/radeon_bo_gem.c
51 ===================================================================
52 --- libdrm-2.4.23.orig/radeon/radeon_bo_gem.c
53 +++ libdrm-2.4.23/radeon/radeon_bo_gem.c
54 @@ -38,6 +38,13 @@
55 #include <string.h>
56 #include <sys/mman.h>
57 #include <errno.h>
58 +
59 +/* On solaris unistd.h and stropts.h are needed for ioctl */
60 +#ifdef __sun
61 +#include <unistd.h>
62 +#include <stropts.h>
63 +#endif
64 +
65 #include "xf86drm.h"
66 #include "xf86atomic.h"
67 #include "drm.h"
68 Index: libdrm-2.4.23/xf86drm.c
69 ===================================================================
70 --- libdrm-2.4.23.orig/xf86drm.c
71 +++ libdrm-2.4.23/xf86drm.c
72 @@ -972,7 +972,11 @@ int drmRmMap(int fd, drm_handle_t handle
73 {
74 drm_map_t map;
75
76 +#ifdef __sun
77 + map.handle = handle;
78 +#else
79 map.handle = (void *)handle;
80 +#endif
81
82 if(drmIoctl(fd, DRM_IOCTL_RM_MAP, &map))
83 return -errno;
84 @@ -1210,6 +1214,9 @@ drmBufMapPtr drmMapBufs(int fd)
85 bufs.count = 0;
86 bufs.list = NULL;
87 bufs.virtual = NULL;
88 +#ifdef __sun
89 + bufs.fd = fd;
90 +#endif
91 if (drmIoctl(fd, DRM_IOCTL_MAP_BUFS, &bufs))
92 return NULL;
93
94 Index: libdrm-2.4.23/xf86drm.h
95 ===================================================================
96 --- libdrm-2.4.23.orig/xf86drm.h
97 +++ libdrm-2.4.23/xf86drm.h
98 @@ -64,6 +64,13 @@
99
100 #endif
101
102 +#if defined(__sun) && !defined(_IOC)
103 +#define _IOC(dir, group, nr, size) \
104 + (dir == DRM_IOC_READWRITE ? _IOWRN(group, nr, size) : \
105 + (dir == DRM_IOC_WRITE ? _IOWN(group, nr, size) : \
106 + /* dir == DRM_IOC_READ */ _IORN(group, nr, size) ))
107 +#endif
108 +
109 /* Defaults, if nothing set in xf86config */
110 #define DRM_DEV_UID 0
111 #define DRM_DEV_GID 0
OLDNEW
« no previous file with comments | « no previous file | x11-libs/libdrm/libdrm-2.4.24.ebuild » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698