1 |
chithanh 14/03/25 15:26:52 |
2 |
|
3 |
Added: xf86-video-vmware-13.0.1-xatracker-2.patch |
4 |
xf86-video-vmware-13.0.1-xa-compat-2.patch |
5 |
Log: |
6 |
Fix building against newer mesa, bug #504252. |
7 |
|
8 |
(Portage version: 2.2.8-r1/cvs/Linux x86_64, unsigned Manifest commit) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 x11-drivers/xf86-video-vmware/files/xf86-video-vmware-13.0.1-xatracker-2.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-vmware/files/xf86-video-vmware-13.0.1-xatracker-2.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-vmware/files/xf86-video-vmware-13.0.1-xatracker-2.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: xf86-video-vmware-13.0.1-xatracker-2.patch |
17 |
=================================================================== |
18 |
From 0945bea5fc32eacb7bf42639efbd45dcd43e7ab5 Mon Sep 17 00:00:00 2001 |
19 |
From: Rob Clark <robdclark@×××××.com> |
20 |
Date: Mon, 10 Jun 2013 17:31:31 +0000 |
21 |
Subject: vmwgfx: update for XA API changes |
22 |
|
23 |
Signed-off-by: Rob Clark <robdclark@×××××.com> |
24 |
Signed-off-by: Jakob Bornecrantz <jakob@××××××.com> |
25 |
Reviewed-by: Jakob Bornecrantz <jakob@××××××.com> |
26 |
Tested-by: Jakob Bornecrantz <jakob@××××××.com> |
27 |
--- |
28 |
diff --git a/configure.ac b/configure.ac |
29 |
index 0631bcc..dccfb27 100644 |
30 |
--- a/configure.ac |
31 |
+++ b/configure.ac |
32 |
@@ -118,7 +118,7 @@ if test x$BUILD_VMWGFX = xyes; then |
33 |
PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no]) |
34 |
fi |
35 |
if test x$BUILD_VMWGFX = xyes; then |
36 |
- PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],[],[BUILD_VMWGFX=no]) |
37 |
+ PKG_CHECK_MODULES([XATRACKER], [xatracker >= 2.0.0],[],[BUILD_VMWGFX=no]) |
38 |
fi |
39 |
|
40 |
DRIVER_NAME=vmware |
41 |
diff --git a/vmwgfx/vmwgfx_dri2.c b/vmwgfx/vmwgfx_dri2.c |
42 |
index 7de0772..2f007f0 100644 |
43 |
--- a/vmwgfx/vmwgfx_dri2.c |
44 |
+++ b/vmwgfx/vmwgfx_dri2.c |
45 |
@@ -201,7 +201,8 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2Buffer2Ptr buffer, unsigned int for |
46 |
} |
47 |
|
48 |
private->srf = srf; |
49 |
- if (xa_surface_handle(srf, &buffer->name, &buffer->pitch) != 0) |
50 |
+ if (xa_surface_handle(srf, xa_handle_type_shared, |
51 |
+ &buffer->name, &buffer->pitch) != 0) |
52 |
return FALSE; |
53 |
|
54 |
buffer->cpp = xa_format_depth(xa_surface_format(srf)) / 8; |
55 |
@@ -222,7 +223,7 @@ dri2_do_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer) |
56 |
struct vmwgfx_saa_pixmap *vpix = vmwgfx_saa_pixmap(private->pPixmap); |
57 |
|
58 |
if (--private->refcount == 0 && srf) { |
59 |
- xa_surface_destroy(srf); |
60 |
+ xa_surface_unref(srf); |
61 |
} |
62 |
|
63 |
/* |
64 |
diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c |
65 |
index 7863ba2..3002285 100644 |
66 |
--- a/vmwgfx/vmwgfx_driver.c |
67 |
+++ b/vmwgfx/vmwgfx_driver.c |
68 |
@@ -617,7 +617,8 @@ vmwgfx_scanout_present(ScreenPtr pScreen, int drm_fd, |
69 |
return FALSE; |
70 |
} |
71 |
|
72 |
- if (xa_surface_handle(vpix->hw, &handle, &dummy) != 0) { |
73 |
+ if (xa_surface_handle(vpix->hw, xa_handle_type_shared, |
74 |
+ &handle, &dummy) != 0) { |
75 |
LogMessage(X_ERROR, "Could not get present surface handle.\n"); |
76 |
return FALSE; |
77 |
} |
78 |
diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c |
79 |
index 63df3a1..ed3c1ee 100644 |
80 |
--- a/vmwgfx/vmwgfx_saa.c |
81 |
+++ b/vmwgfx/vmwgfx_saa.c |
82 |
@@ -140,7 +140,7 @@ vmwgfx_pixmap_free_storage(struct vmwgfx_saa_pixmap *vpix) |
83 |
vpix->malloc = NULL; |
84 |
} |
85 |
if (!(vpix->backing & VMWGFX_PIX_SURFACE) && vpix->hw) { |
86 |
- xa_surface_destroy(vpix->hw); |
87 |
+ xa_surface_unref(vpix->hw); |
88 |
vpix->hw = NULL; |
89 |
} |
90 |
if (!(vpix->backing & VMWGFX_PIX_GMR) && vpix->gmr) { |
91 |
@@ -286,7 +286,8 @@ vmwgfx_saa_dma(struct vmwgfx_saa *vsaa, |
92 |
if (vpix->gmr && vsaa->can_optimize_dma) { |
93 |
uint32_t handle, dummy; |
94 |
|
95 |
- if (xa_surface_handle(vpix->hw, &handle, &dummy) != 0) |
96 |
+ if (xa_surface_handle(vpix->hw, xa_handle_type_shared, |
97 |
+ &handle, &dummy) != 0) |
98 |
goto out_err; |
99 |
if (vmwgfx_dma(0, 0, reg, vpix->gmr, pixmap->devKind, handle, |
100 |
to_hw) != 0) |
101 |
@@ -305,6 +306,8 @@ vmwgfx_saa_dma(struct vmwgfx_saa *vsaa, |
102 |
(int) to_hw, |
103 |
(struct xa_box *) REGION_RECTS(reg), |
104 |
REGION_NUM_RECTS(reg)); |
105 |
+ if (to_hw) |
106 |
+ xa_context_flush(vsaa->xa_ctx); |
107 |
if (vpix->gmr) |
108 |
vmwgfx_dmabuf_unmap(vpix->gmr); |
109 |
if (ret) |
110 |
@@ -441,7 +444,7 @@ vmwgfx_hw_kill(struct vmwgfx_saa *vsaa, |
111 |
&spix->dirty_hw)) |
112 |
return FALSE; |
113 |
|
114 |
- xa_surface_destroy(vpix->hw); |
115 |
+ xa_surface_unref(vpix->hw); |
116 |
vpix->hw = NULL; |
117 |
|
118 |
/* |
119 |
@@ -683,7 +686,8 @@ vmwgfx_present_prepare(struct vmwgfx_saa *vsaa, |
120 |
|
121 |
(void) pScreen; |
122 |
if (src_vpix == dst_vpix || !src_vpix->hw || |
123 |
- xa_surface_handle(src_vpix->hw, &vsaa->src_handle, &dummy) != 0) |
124 |
+ xa_surface_handle(src_vpix->hw, xa_handle_type_shared, |
125 |
+ &vsaa->src_handle, &dummy) != 0) |
126 |
return FALSE; |
127 |
|
128 |
REGION_NULL(pScreen, &vsaa->present_region); |
129 |
@@ -784,7 +788,7 @@ vmwgfx_create_hw(struct vmwgfx_saa *vsaa, |
130 |
return TRUE; |
131 |
|
132 |
out_no_damage: |
133 |
- xa_surface_destroy(hw); |
134 |
+ xa_surface_unref(hw); |
135 |
return FALSE; |
136 |
} |
137 |
|
138 |
@@ -929,6 +933,7 @@ vmwgfx_copy_prepare(struct saa_driver *driver, |
139 |
|
140 |
if (!vmwgfx_hw_validate(src_pixmap, src_reg)) { |
141 |
xa_copy_done(vsaa->xa_ctx); |
142 |
+ xa_context_flush(vsaa->xa_ctx); |
143 |
return FALSE; |
144 |
} |
145 |
|
146 |
@@ -1029,6 +1034,7 @@ vmwgfx_copy_done(struct saa_driver *driver) |
147 |
return; |
148 |
} |
149 |
xa_copy_done(vsaa->xa_ctx); |
150 |
+ xa_context_flush(vsaa->xa_ctx); |
151 |
} |
152 |
|
153 |
static Bool |
154 |
@@ -1175,6 +1181,7 @@ vmwgfx_composite_done(struct saa_driver *driver) |
155 |
struct vmwgfx_saa *vsaa = to_vmwgfx_saa(driver); |
156 |
|
157 |
xa_composite_done(vsaa->xa_ctx); |
158 |
+ xa_context_flush(vsaa->xa_ctx); |
159 |
} |
160 |
|
161 |
static void |
162 |
@@ -1436,7 +1443,8 @@ vmwgfx_scanout_ref(struct vmwgfx_screen_entry *entry) |
163 |
*/ |
164 |
if (!vmwgfx_hw_accel_validate(pixmap, 0, XA_FLAG_SCANOUT, 0, NULL)) |
165 |
goto out_err; |
166 |
- if (xa_surface_handle(vpix->hw, &handle, &dummy) != 0) |
167 |
+ if (xa_surface_handle(vpix->hw, xa_handle_type_shared, |
168 |
+ &handle, &dummy) != 0) |
169 |
goto out_err; |
170 |
depth = xa_format_depth(xa_surface_format(vpix->hw)); |
171 |
|
172 |
diff --git a/vmwgfx/vmwgfx_tex_video.c b/vmwgfx/vmwgfx_tex_video.c |
173 |
index 449266b..2971ed7 100644 |
174 |
--- a/vmwgfx/vmwgfx_tex_video.c |
175 |
+++ b/vmwgfx/vmwgfx_tex_video.c |
176 |
@@ -199,7 +199,7 @@ stop_video(ScrnInfoPtr pScrn, pointer data, Bool shutdown) |
177 |
|
178 |
for (i=0; i<3; ++i) { |
179 |
if (priv->yuv[i]) { |
180 |
- xa_surface_destroy(priv->yuv[i]); |
181 |
+ xa_surface_unref(priv->yuv[i]); |
182 |
priv->yuv[i] = NULL; |
183 |
} |
184 |
for (j=0; j<2; ++j) { |
185 |
@@ -539,7 +539,8 @@ copy_packed_data(ScrnInfoPtr pScrn, |
186 |
REGION_RESET(pScrn->pScreen, ®, &box); |
187 |
} |
188 |
|
189 |
- if (xa_surface_handle(srf, &handle, &stride) != 0) { |
190 |
+ if (xa_surface_handle(srf, xa_handle_type_shared, |
191 |
+ &handle, &stride) != 0) { |
192 |
ret = BadAlloc; |
193 |
break; |
194 |
} |
195 |
-- |
196 |
cgit v0.9.0.2-2-gbebe |
197 |
|
198 |
|
199 |
|
200 |
1.1 x11-drivers/xf86-video-vmware/files/xf86-video-vmware-13.0.1-xa-compat-2.patch |
201 |
|
202 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-vmware/files/xf86-video-vmware-13.0.1-xa-compat-2.patch?rev=1.1&view=markup |
203 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-vmware/files/xf86-video-vmware-13.0.1-xa-compat-2.patch?rev=1.1&content-type=text/plain |
204 |
|
205 |
Index: xf86-video-vmware-13.0.1-xa-compat-2.patch |
206 |
=================================================================== |
207 |
From 93228f3dd3355a25583d22dbb96791678b93be3e Mon Sep 17 00:00:00 2001 |
208 |
From: Thomas Hellstrom <thellstrom@××××××.com> |
209 |
Date: Wed, 11 Dec 2013 14:54:02 +0000 |
210 |
Subject: vmwgfx: Really allow XA version 2. |
211 |
|
212 |
When XA starts to correctly advertise version 2, we didn't allow it. |
213 |
Fix this. |
214 |
|
215 |
Signed-off-by: Thomas Hellstrom <thellstrom@××××××.com> |
216 |
Reviewed-by: Jakob Bornecrantz <jakob@××××××.com> |
217 |
--- |
218 |
diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c |
219 |
index 6301c29..4e28097 100644 |
220 |
--- a/vmwgfx/vmwgfx_driver.c |
221 |
+++ b/vmwgfx/vmwgfx_driver.c |
222 |
@@ -79,7 +79,7 @@ typedef uint8_t uint8; |
223 |
|
224 |
#define XA_VERSION_MINOR_REQUIRED 0 |
225 |
#define XA_VERSION_MAJOR_REQUIRED 1 |
226 |
-#define XA_VERSION_MAJOR_COMPAT 1 |
227 |
+#define XA_VERSION_MAJOR_COMPAT 2 |
228 |
|
229 |
#define DRM_VERSION_MAJOR_REQUIRED 2 |
230 |
#define DRM_VERSION_MINOR_REQUIRED 3 |
231 |
-- |
232 |
cgit v0.9.0.2-2-gbebe |