[PATCH 1/3] change drm term to gbm
Halley Zhao
halley.zhao at intel.com
Thu Apr 19 01:33:21 PDT 2012
---
src/egl/drivers/dri2/egl_dri2.c | 34 +++---
src/egl/drivers/dri2/egl_dri2.h | 6 +-
src/egl/drivers/dri2/platform_wayland.c | 72 +++++++-------
.../wayland/wayland-drm/protocol/wayland-drm.xml | 8 +-
src/egl/wayland/wayland-drm/wayland-drm.c | 110 ++++++++++-------=
---
src/egl/wayland/wayland-drm/wayland-drm.h | 22 ++--
.../egl/common/native_wayland_drm_bufmgr_helper.c | 12 +-
.../egl/common/native_wayland_drm_bufmgr_helper.h | 12 +-
src/gallium/state_trackers/egl/drm/native_drm.c | 22 ++--
src/gallium/state_trackers/egl/drm/native_drm.h | 2 +-
.../state_trackers/egl/wayland/native_drm.c | 66 ++++++------
src/gallium/state_trackers/egl/x11/native_dri2.c | 24 ++--
12 files changed, 195 insertions(+), 195 deletions(-)
mode change 100644 =3D> 100755 src/egl/wayland/wayland-drm/protocol/wayland=
-drm.xml
mode change 100644 =3D> 100755 src/egl/wayland/wayland-drm/wayland-drm.h
mode change 100644 =3D> 100755 src/gallium/state_trackers/egl/wayland/nativ=
e_drm.c
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri=
2.c
index 4a02838..c9589c1 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1078,10 +1078,10 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *di=
sp, _EGLContext *ctx,
_EGLImageAttribs attrs;
EGLint format, name, stride, pitch, err;
- if (!wayland_buffer_is_drm(buffer))
+ if (!wayland_buffer_is_gbm(buffer))
return NULL;
- dri_image =3D wayland_drm_buffer_get_buffer(buffer);
+ dri_image =3D wayland_gbm_buffer_get_buffer(buffer);
dri2_dpy->image->queryImage(dri_image, __DRI_IMAGE_ATTRIB_NAME, &name);
dri2_dpy->image->queryImage(dri_image, __DRI_IMAGE_ATTRIB_STRIDE, &stri=
de);
@@ -1093,11 +1093,11 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *di=
sp, _EGLContext *ctx,
attrs.Width =3D buffer->width;
attrs.Height =3D buffer->height;
- switch (wayland_drm_buffer_get_format(buffer)) {
- case WL_DRM_FORMAT_ARGB8888:
+ switch (wayland_gbm_buffer_get_format(buffer)) {
+ case WL_GBM_FORMAT_ARGB8888:
format =3D __DRI_IMAGE_FORMAT_ARGB8888;
break;
- case WL_DRM_FORMAT_XRGB8888:
+ case WL_GBM_FORMAT_XRGB8888:
format =3D __DRI_IMAGE_FORMAT_XRGB8888;
break;
default:
@@ -1272,10 +1272,10 @@ dri2_wl_reference_buffer(void *user_data, uint32_t =
name,
int dri_format;
switch (format) {
- case WL_DRM_FORMAT_ARGB8888:
+ case WL_GBM_FORMAT_ARGB8888:
dri_format =3D__DRI_IMAGE_FORMAT_ARGB8888;
break;
- case WL_DRM_FORMAT_XRGB8888:
+ case WL_GBM_FORMAT_XRGB8888:
dri_format =3D __DRI_IMAGE_FORMAT_XRGB8888;
break;
default:
@@ -1300,7 +1300,7 @@ dri2_wl_release_buffer(void *user_data, void *buffer)
dri2_dpy->image->destroyImage(image);
}
-static struct wayland_drm_callbacks wl_drm_callbacks =3D {
+static struct wayland_gbm_callbacks wl_gbm_callbacks =3D {
.authenticate =3D NULL,
.reference_buffer =3D dri2_wl_reference_buffer,
.release_buffer =3D dri2_wl_release_buffer
@@ -1314,17 +1314,17 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLD=
isplay *disp,
(void) drv;
- if (dri2_dpy->wl_server_drm)
+ if (dri2_dpy->wl_server_gbm)
return EGL_FALSE;
- wl_drm_callbacks.authenticate =3D
+ wl_gbm_callbacks.authenticate =3D
(int(*)(void *, uint32_t)) dri2_dpy->authenticate;
- dri2_dpy->wl_server_drm =3D
- wayland_drm_init(wl_dpy, dri2_dpy->device_name,
- &wl_drm_callbacks, disp);
+ dri2_dpy->wl_server_gbm =3D
+ wayland_gbm_init(wl_dpy, dri2_dpy->device_name,
+ &wl_gbm_callbacks, disp);
- if (!dri2_dpy->wl_server_drm)
+ if (!dri2_dpy->wl_server_gbm)
return EGL_FALSE;
return EGL_TRUE;
@@ -1338,11 +1338,11 @@ dri2_unbind_wayland_display_wl(_EGLDriver *drv, _EG=
LDisplay *disp,
(void) drv;
- if (!dri2_dpy->wl_server_drm)
+ if (!dri2_dpy->wl_server_gbm)
return EGL_FALSE;
- wayland_drm_uninit(dri2_dpy->wl_server_drm);
- dri2_dpy->wl_server_drm =3D NULL;
+ wayland_gbm_uninit(dri2_dpy->wl_server_gbm);
+ dri2_dpy->wl_server_gbm =3D NULL;
return EGL_TRUE;
}
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri=
2.h
index c30e230..ae80562 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -121,8 +121,8 @@ struct dri2_egl_display
#ifdef HAVE_WAYLAND_PLATFORM
struct wl_display *wl_dpy;
- struct wl_drm *wl_server_drm;
- struct wl_drm *wl_drm;
+ struct wl_gbm *wl_server_gbm;
+ struct wl_gbm *wl_gbm;
int authenticated;
int formats;
#endif
@@ -166,7 +166,7 @@ struct dri2_egl_surface
#ifdef HAVE_WAYLAND_PLATFORM
struct wl_egl_window *wl_win;
struct wl_egl_pixmap *wl_pix;
- struct wl_buffer *wl_drm_buffer[WL_BUFFER_COUNT];
+ struct wl_buffer *wl_gbm_buffer[WL_BUFFER_COUNT];
int wl_buffer_lock[WL_BUFFER_COUNT];
int dx;
int dy;
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2=
/platform_wayland.c
index d291f0f..cbc48eb 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -40,7 +40,7 @@
#include <wayland-client.h>
#include "wayland-drm-client-protocol.h"
-enum wl_drm_format_flags {
+enum wl_gbm_format_flags {
HAS_ARGB8888 =3D 1,
HAS_XRGB8888 =3D 2
};
@@ -52,7 +52,7 @@ wl_buffer_release(void *data, struct wl_buffer *buffer)
int i;
for (i =3D 0; i < WL_BUFFER_COUNT; ++i)
- if (dri2_surf->wl_drm_buffer[i] =3D=3D buffer)
+ if (dri2_surf->wl_gbm_buffer[i] =3D=3D buffer)
break;
assert(i <=3D WL_BUFFER_COUNT);
@@ -95,7 +95,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, E=
GLint type,
goto cleanup_surf;
for (i =3D 0; i < WL_BUFFER_COUNT; ++i) {
- dri2_surf->wl_drm_buffer[i] =3D NULL;
+ dri2_surf->wl_gbm_buffer[i] =3D NULL;
dri2_surf->wl_buffer_lock[i] =3D 0;
}
@@ -107,9 +107,9 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp,=
EGLint type,
dri2_surf->block_swap_buffers =3D EGL_FALSE;
if (conf->AlphaSize =3D=3D 0)
- dri2_surf->format =3D WL_DRM_FORMAT_XRGB8888;
+ dri2_surf->format =3D WL_GBM_FORMAT_XRGB8888;
else
- dri2_surf->format =3D WL_DRM_FORMAT_ARGB8888;
+ dri2_surf->format =3D WL_GBM_FORMAT_ARGB8888;
switch (type) {
case EGL_WINDOW_BIT:
@@ -193,8 +193,8 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp=
, _EGLSurface *surf)
(*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
for (i =3D 0; i < WL_BUFFER_COUNT; ++i)
- if (dri2_surf->wl_drm_buffer[i])
- wl_buffer_destroy(dri2_surf->wl_drm_buffer[i]);
+ if (dri2_surf->wl_gbm_buffer[i])
+ wl_buffer_destroy(dri2_surf->wl_gbm_buffer[i]);
for (i =3D 0; i < __DRI_BUFFER_COUNT; ++i)
if (dri2_surf->dri_buffers[i] && !(i =3D=3D __DRI_BUFFER_FRONT_LEFT =
&&
@@ -236,7 +236,7 @@ wayland_create_buffer(struct dri2_egl_surface *dri2_sur=
f,
dri2_egl_display(dri2_surf->base.Resource.Display);
struct wl_buffer *buf;
- buf =3D wl_drm_create_buffer(dri2_dpy->wl_drm, buffer->name,
+ buf =3D wl_gbm_create_buffer(dri2_dpy->wl_gbm, buffer->name,
dri2_surf->base.Width, dri2_surf->base.Heigh=
t,
buffer->pitch, dri2_surf->format);
wl_buffer_add_listener(buf, &wl_buffer_listener, dri2_surf);
@@ -370,9 +370,9 @@ destroy_third_buffer(struct dri2_egl_surface *dri2_surf=
)
dri2_surf->third_buffer);
dri2_surf->third_buffer =3D NULL;
- if (dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD])
- wl_buffer_destroy(dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD]);
- dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD] =3D NULL;
+ if (dri2_surf->wl_gbm_buffer[WL_BUFFER_THIRD])
+ wl_buffer_destroy(dri2_surf->wl_gbm_buffer[WL_BUFFER_THIRD]);
+ dri2_surf->wl_gbm_buffer[WL_BUFFER_THIRD] =3D NULL;
dri2_surf->wl_buffer_lock[WL_BUFFER_THIRD] =3D 0;
}
@@ -386,8 +386,8 @@ swap_wl_buffers(struct dri2_egl_surface *dri2_surf,
dri2_surf->wl_buffer_lock[a] =3D dri2_surf->wl_buffer_lock[b];
dri2_surf->wl_buffer_lock[b] =3D tmp;
- pointer_swap((const void **) &dri2_surf->wl_drm_buffer[a],
- (const void **) &dri2_surf->wl_drm_buffer[b]);
+ pointer_swap((const void **) &dri2_surf->wl_gbm_buffer[a],
+ (const void **) &dri2_surf->wl_gbm_buffer[b]);
}
static void
@@ -442,9 +442,9 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawabl=
e,
dri2_surf->dy =3D dri2_surf->wl_win->dy;
for (i =3D 0; i < WL_BUFFER_COUNT; ++i) {
- if (dri2_surf->wl_drm_buffer[i])
- wl_buffer_destroy(dri2_surf->wl_drm_buffer[i]);
- dri2_surf->wl_drm_buffer[i] =3D NULL;
+ if (dri2_surf->wl_gbm_buffer[i])
+ wl_buffer_destroy(dri2_surf->wl_gbm_buffer[i]);
+ dri2_surf->wl_gbm_buffer[i] =3D NULL;
dri2_surf->wl_buffer_lock[i] =3D 0;
}
}
@@ -593,13 +593,13 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp,=
_EGLSurface *draw)
swap_wl_buffers(dri2_surf, WL_BUFFER_FRONT, WL_BUFFER_BACK);
- if (!dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT])
- dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT] =3D
+ if (!dri2_surf->wl_gbm_buffer[WL_BUFFER_FRONT])
+ dri2_surf->wl_gbm_buffer[WL_BUFFER_FRONT] =3D
wayland_create_buffer(dri2_surf,
dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_=
LEFT]);
wl_surface_attach(dri2_surf->wl_win->surface,
- dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],
+ dri2_surf->wl_gbm_buffer[WL_BUFFER_FRONT],
dri2_surf->dx, dri2_surf->dy);
dri2_surf->wl_buffer_lock[WL_BUFFER_FRONT] =3D 1;
@@ -661,12 +661,12 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLC=
ontext *ctx,
/* FIXME: Get buffer format from attr_list somehow... or from the
wl_egl_piaxmap. */
wl_egl_pixmap->buffer =3D
- wl_drm_create_buffer(dri2_dpy->wl_drm,
+ wl_gbm_create_buffer(dri2_dpy->wl_gbm,
dri2_buf->dri_buffer->nam=
e,
wl_egl_pixmap->width,
wl_egl_pixmap->height,
dri2_buf->dri_buffer->pit=
ch,
- WL_DRM_FORMAT_ARGB8888);
+ WL_GBM_FORMAT_ARGB8888);
wl_attr_list[1] =3D wl_egl_pixmap->width;
wl_attr_list[3] =3D wl_egl_pixmap->height;
@@ -699,7 +699,7 @@ dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t i=
d)
dri2_dpy->authenticated =3D 0;
- wl_drm_authenticate(dri2_dpy->wl_drm, id);
+ wl_gbm_authenticate(dri2_dpy->wl_gbm, id);
wl_display_roundtrip(dri2_dpy->wl_dpy);
if (!dri2_dpy->authenticated)
@@ -727,7 +727,7 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
dlclose(dri2_dpy->driver);
free(dri2_dpy->driver_name);
free(dri2_dpy->device_name);
- wl_drm_destroy(dri2_dpy->wl_drm);
+ wl_gbm_destroy(dri2_dpy->wl_gbm);
if (dri2_dpy->own_device)
wl_display_disconnect(dri2_dpy->wl_dpy);
free(dri2_dpy);
@@ -737,7 +737,7 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
}
static void
-drm_handle_device(void *data, struct wl_drm *drm, const char *device)
+drm_handle_device(void *data, struct wl_gbm *drm, const char *device)
{
struct dri2_egl_display *dri2_dpy =3D data;
drm_magic_t magic;
@@ -763,33 +763,33 @@ drm_handle_device(void *data, struct wl_drm *drm, con=
st char *device)
}
drmGetMagic(dri2_dpy->fd, &magic);
- wl_drm_authenticate(dri2_dpy->wl_drm, magic);
+ wl_gbm_authenticate(dri2_dpy->wl_gbm, magic);
}
static void
-drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
+drm_handle_format(void *data, struct wl_gbm *drm, uint32_t format)
{
struct dri2_egl_display *dri2_dpy =3D data;
switch (format) {
- case WL_DRM_FORMAT_ARGB8888:
+ case WL_GBM_FORMAT_ARGB8888:
dri2_dpy->formats |=3D HAS_ARGB8888;
break;
- case WL_DRM_FORMAT_XRGB8888:
+ case WL_GBM_FORMAT_XRGB8888:
dri2_dpy->formats |=3D HAS_XRGB8888;
break;
}
}
static void
-drm_handle_authenticated(void *data, struct wl_drm *drm)
+drm_handle_authenticated(void *data, struct wl_gbm *drm)
{
struct dri2_egl_display *dri2_dpy =3D data;
dri2_dpy->authenticated =3D 1;
}
-static const struct wl_drm_listener drm_listener =3D {
+static const struct wl_gbm_listener drm_listener =3D {
drm_handle_device,
drm_handle_format,
drm_handle_authenticated
@@ -829,16 +829,16 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay =
*disp)
dri2_dpy->wl_dpy =3D disp->PlatformDisplay;
}
- id =3D wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
+ id =3D wl_display_get_global(dri2_dpy->wl_dpy, "wl_gbm", 1);
if (id =3D=3D 0)
wl_display_roundtrip(dri2_dpy->wl_dpy);
- id =3D wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
+ id =3D wl_display_get_global(dri2_dpy->wl_dpy, "wl_gbm", 1);
if (id =3D=3D 0)
goto cleanup_dpy;
- dri2_dpy->wl_drm =3D wl_display_bind(dri2_dpy->wl_dpy, id, &wl_drm_inte=
rface);
- if (!dri2_dpy->wl_drm)
+ dri2_dpy->wl_gbm =3D wl_display_bind(dri2_dpy->wl_dpy, id, &wl_gbm_inte=
rface);
+ if (!dri2_dpy->wl_gbm)
goto cleanup_dpy;
- wl_drm_add_listener(dri2_dpy->wl_drm, &drm_listener, dri2_dpy);
+ wl_gbm_add_listener(dri2_dpy->wl_gbm, &drm_listener, dri2_dpy);
wl_display_roundtrip(dri2_dpy->wl_dpy);
if (dri2_dpy->fd =3D=3D -1)
goto cleanup_drm;
@@ -899,7 +899,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *d=
isp)
close(dri2_dpy->fd);
cleanup_drm:
free(dri2_dpy->device_name);
- wl_drm_destroy(dri2_dpy->wl_drm);
+ wl_gbm_destroy(dri2_dpy->wl_gbm);
cleanup_dpy:
free(dri2_dpy);
diff --git a/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml b/src/egl=
/wayland/wayland-drm/protocol/wayland-drm.xml
old mode 100644
new mode 100755
index 89fd8f0..1615baf
--- a/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
+++ b/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
@@ -1,5 +1,5 @@
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
-<protocol name=3D"drm">
+<protocol name=3D"gbm">
<copyright>
Copyright =A9 2008-2011 Kristian H=F8gsberg
@@ -27,9 +27,9 @@
THIS SOFTWARE.
</copyright>
- <!-- drm support. This object is created by the server and published
+ <!-- gbm support. This object is created by the server and published
using the display's global event. -->
- <interface name=3D"wl_drm" version=3D"1">
+ <interface name=3D"wl_gbm" version=3D"1">
<enum name=3D"error">
<entry name=3D"authenticate_fail" value=3D"0"/>
<entry name=3D"invalid_format" value=3D"1"/>
@@ -37,7 +37,7 @@
</enum>
<enum name=3D"format">
- <!-- The drm format codes match the #defines in drm_fourcc.h.
+ <!-- The gbm format codes match the #defines in drm_fourcc.h.
The formats actually supported by the compositor will be
reported by the format event. -->
<entry name=3D"c8" value=3D"0x20203843"/>
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wa=
yland-drm/wayland-drm.c
index 5f831b3..a743191 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -47,18 +47,18 @@
#define HAS_WAYLAND_0_85
#endif
-struct wl_drm {
+struct wl_gbm {
struct wl_display *display;
void *user_data;
char *device_name;
- struct wayland_drm_callbacks *callbacks;
+ struct wayland_gbm_callbacks *callbacks;
};
-struct wl_drm_buffer {
+struct wl_gbm_buffer {
struct wl_buffer buffer;
- struct wl_drm *drm;
+ struct wl_gbm *gbm;
uint32_t format;
void *driver_buffer;
@@ -67,10 +67,10 @@ struct wl_drm_buffer {
static void
destroy_buffer(struct wl_resource *resource)
{
- struct wl_drm_buffer *buffer =3D resource->data;
- struct wl_drm *drm =3D buffer->drm;
+ struct wl_gbm_buffer *buffer =3D resource->data;
+ struct wl_gbm *gbm =3D buffer->gbm;
- drm->callbacks->release_buffer(drm->user_data,
+ gbm->callbacks->release_buffer(gbm->user_data,
buffe=
r->driver_buffer);
free(buffer);
}
@@ -93,7 +93,7 @@ buffer_damage(struct wl_client *client, struct wl_resourc=
e *buffer,
}
#endif
-const static struct wl_buffer_interface drm_buffer_interface =3D {
+const static struct wl_buffer_interface gbm_buffer_interface =3D {
#ifdef HAS_WAYLAND_0_85
buffer_damage,
#endif
@@ -101,20 +101,20 @@ const static struct wl_buffer_interface drm_buffer_in=
terface =3D {
};
static void
-drm_create_buffer(struct wl_client *client, struct wl_resource *resource,
+gbm_create_buffer(struct wl_client *client, struct wl_resource *resource,
uint32_t id, uint32_t name, int32_t width,=
int32_t height,
uint32_t stride, uint32_t format)
{
- struct wl_drm *drm =3D resource->data;
- struct wl_drm_buffer *buffer;
+ struct wl_gbm *gbm =3D resource->data;
+ struct wl_gbm_buffer *buffer;
switch (format) {
- case WL_DRM_FORMAT_ARGB8888:
- case WL_DRM_FORMAT_XRGB8888:
+ case WL_GBM_FORMAT_ARGB8888:
+ case WL_GBM_FORMAT_XRGB8888:
break;
default:
wl_resource_post_error(resource,
- WL_DR=
M_ERROR_INVALID_FORMAT,
+ WL_GB=
M_ERROR_INVALID_FORMAT,
"inva=
lid format");
return;
}
@@ -125,19 +125,19 @@ drm_create_buffer(struct wl_client *client, struct wl=
_resource *resource,
return;
}
- buffer->drm =3D drm;
+ buffer->gbm =3D gbm;
buffer->buffer.width =3D width;
buffer->buffer.height =3D height;
buffer->format =3D format;
buffer->driver_buffer =3D
- drm->callbacks->reference_buffer(drm->user_d=
ata, name,
+ gbm->callbacks->reference_buffer(gbm->user_d=
ata, name,
=
width, height,
=
stride, format);
if (buffer->driver_buffer =3D=3D NULL) {
wl_resource_post_error(resource,
- WL_DR=
M_ERROR_INVALID_NAME,
+ WL_GB=
M_ERROR_INVALID_NAME,
"inva=
lid name");
return;
}
@@ -145,7 +145,7 @@ drm_create_buffer(struct wl_client *client, struct wl_r=
esource *resource,
buffer->buffer.resource.object.id =3D id;
buffer->buffer.resource.object.interface =3D &wl_buffer_inte=
rface;
buffer->buffer.resource.object.implementation =3D
- (void (**)(void)) &drm_buffer_interface;
+ (void (**)(void)) &gbm_buffer_interface;
buffer->buffer.resource.data =3D buffer;
buffer->buffer.resource.destroy =3D destroy_buffer;
@@ -155,86 +155,86 @@ drm_create_buffer(struct wl_client *client, struct wl=
_resource *resource,
}
static void
-drm_authenticate(struct wl_client *client,
+gbm_authenticate(struct wl_client *client,
struct wl_resource *resource, uint32_t id)
{
- struct wl_drm *drm =3D resource->data;
+ struct wl_gbm *gbm =3D resource->data;
- if (drm->callbacks->authenticate(drm->user_data, id) < 0)
+ if (gbm->callbacks->authenticate(gbm->user_data, id) < 0)
wl_resource_post_error(resource,
- WL_DR=
M_ERROR_AUTHENTICATE_FAIL,
+ WL_GB=
M_ERROR_AUTHENTICATE_FAIL,
"auth=
enicate failed");
else
- wl_resource_post_event(resource, WL_DRM_AUTH=
ENTICATED);
+ wl_resource_post_event(resource, WL_GBM_AUTH=
ENTICATED);
}
-const static struct wl_drm_interface drm_interface =3D {
- drm_authenticate,
- drm_create_buffer
+const static struct wl_gbm_interface gbm_interface =3D {
+ gbm_authenticate,
+ gbm_create_buffer
};
static void
-bind_drm(struct wl_client *client, void *data, uint32_t version, uint32_t =
id)
+bind_gbm(struct wl_client *client, void *data, uint32_t version, uint32_t =
id)
{
- struct wl_drm *drm =3D data;
+ struct wl_gbm *gbm =3D data;
struct wl_resource *resource;
- resource =3D wl_client_add_object(client, &wl_drm_interface,
- =
&drm_interface, id, data);
- wl_resource_post_event(resource, WL_DRM_DEVICE, drm->device_=
name);
- wl_resource_post_event(resource, WL_DRM_FORMAT,
- WL_DRM_FORMAT_ARGB888=
8);
- wl_resource_post_event(resource, WL_DRM_FORMAT,
- WL_DRM_FORMAT_XRGB888=
8);
+ resource =3D wl_client_add_object(client, &wl_gbm_interface,
+ =
&gbm_interface, id, data);
+ wl_resource_post_event(resource, WL_GBM_DEVICE, gbm->device_=
name);
+ wl_resource_post_event(resource, WL_GBM_FORMAT,
+ WL_GBM_FORMAT_ARGB888=
8);
+ wl_resource_post_event(resource, WL_GBM_FORMAT,
+ WL_GBM_FORMAT_XRGB888=
8);
}
-struct wl_drm *
-wayland_drm_init(struct wl_display *display, char *device_name,
- struct wayland_drm_callbacks *callbacks, void *user_data)
+struct wl_gbm *
+wayland_gbm_init(struct wl_display *display, char *device_name,
+ struct wayland_gbm_callbacks *callbacks, void *user_data)
{
- struct wl_drm *drm;
+ struct wl_gbm *gbm;
- drm =3D malloc(sizeof *drm);
+ gbm =3D malloc(sizeof *gbm);
- drm->display =3D display;
- drm->device_name =3D strdup(device_name);
- drm->callbacks =3D callbacks;
- drm->user_data =3D user_data;
+ gbm->display =3D display;
+ gbm->device_name =3D strdup(device_name);
+ gbm->callbacks =3D callbacks;
+ gbm->user_data =3D user_data;
- wl_display_add_global(display, &wl_drm_interface, drm, bind_=
drm);
+ wl_display_add_global(display, &wl_gbm_interface, gbm, bind_=
gbm);
- return drm;
+ return gbm;
}
void
-wayland_drm_uninit(struct wl_drm *drm)
+wayland_gbm_uninit(struct wl_gbm *gbm)
{
- free(drm->device_name);
+ free(gbm->device_name);
/* FIXME: need wl_display_del_{object,global} */
- free(drm);
+ free(gbm);
}
int
-wayland_buffer_is_drm(struct wl_buffer *buffer)
+wayland_buffer_is_gbm(struct wl_buffer *buffer)
{
return buffer->resource.object.implementation =3D=3D
- (void (**)(void)) &drm_buffer_interface;
+ (void (**)(void)) &gbm_buffer_interface;
}
uint32_t
-wayland_drm_buffer_get_format(struct wl_buffer *buffer_base)
+wayland_gbm_buffer_get_format(struct wl_buffer *buffer_base)
{
- struct wl_drm_buffer *buffer =3D (struct wl_drm_buffer *) bu=
ffer_base;
+ struct wl_gbm_buffer *buffer =3D (struct wl_gbm_buffer *) bu=
ffer_base;
return buffer->format;
}
void *
-wayland_drm_buffer_get_buffer(struct wl_buffer *buffer_base)
+wayland_gbm_buffer_get_buffer(struct wl_buffer *buffer_base)
{
- struct wl_drm_buffer *buffer =3D (struct wl_drm_buffer *) bu=
ffer_base;
+ struct wl_gbm_buffer *buffer =3D (struct wl_gbm_buffer *) bu=
ffer_base;
return buffer->driver_buffer;
}
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.h b/src/egl/wayland/wa=
yland-drm/wayland-drm.h
old mode 100644
new mode 100755
index bec50a5..787e00b
--- a/src/egl/wayland/wayland-drm/wayland-drm.h
+++ b/src/egl/wayland/wayland-drm/wayland-drm.h
@@ -1,5 +1,5 @@
-#ifndef WAYLAND_DRM_H
-#define WAYLAND_DRM_H
+#ifndef WAYLAND_GBM_H
+#define WAYLAND_GBM_H
#include "egldisplay.h"
#include "eglimage.h"
@@ -7,9 +7,9 @@
#include <wayland-server.h>
#include "wayland-drm-server-protocol.h"
-struct wl_drm;
+struct wl_gbm;
-struct wayland_drm_callbacks {
+struct wayland_gbm_callbacks {
int (*authenticate)(void *user_data, uint32_t id);
void *(*reference_buffer)(void *user_data, uint32_t name,
@@ -19,20 +19,20 @@ struct wayland_drm_callbacks {
void (*release_buffer)(void *user_data, void *buffer);
};
-struct wl_drm *
-wayland_drm_init(struct wl_display *display, char *device_name,
- struct wayland_drm_callbacks *callbacks, voi=
d *user_data);
+struct wl_gbm *
+wayland_gbm_init(struct wl_display *display, char *device_name,
+ struct wayland_gbm_callbacks *callbacks, voi=
d *user_data);
void
-wayland_drm_uninit(struct wl_drm *drm);
+wayland_gbm_uninit(struct wl_gbm *gbm);
int
-wayland_buffer_is_drm(struct wl_buffer *buffer);
+wayland_buffer_is_gbm(struct wl_buffer *buffer);
uint32_t
-wayland_drm_buffer_get_format(struct wl_buffer *buffer_base);
+wayland_gbm_buffer_get_format(struct wl_buffer *buffer_base);
void *
-wayland_drm_buffer_get_buffer(struct wl_buffer *buffer);
+wayland_gbm_buffer_get_buffer(struct wl_buffer *buffer);
#endif
diff --git a/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmg=
r_helper.c b/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmg=
r_helper.c
index 80b3f22..d35cf47 100644
--- a/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helpe=
r.c
+++ b/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helpe=
r.c
@@ -13,7 +13,7 @@
#include "native_wayland_drm_bufmgr_helper.h"
void *
-egl_g3d_wl_drm_helper_reference_buffer(void *user_data, uint32_t name,
+egl_g3d_wl_gbm_helper_reference_buffer(void *user_data, uint32_t name,
int32_t width, int32_t height,
uint32_t stride, uint32_t format)
{
@@ -23,10 +23,10 @@ egl_g3d_wl_drm_helper_reference_buffer(void *user_data,=
uint32_t name,
enum pipe_format pf;
switch (format) {
- case WL_DRM_FORMAT_ARGB8888:
+ case WL_GBM_FORMAT_ARGB8888:
pf =3D PIPE_FORMAT_B8G8R8A8_UNORM;
break;
- case WL_DRM_FORMAT_XRGB8888:
+ case WL_GBM_FORMAT_XRGB8888:
pf =3D PIPE_FORMAT_B8G8R8X8_UNORM;
break;
default:
@@ -54,7 +54,7 @@ egl_g3d_wl_drm_helper_reference_buffer(void *user_data, u=
int32_t name,
}
void
-egl_g3d_wl_drm_helper_unreference_buffer(void *user_data, void *buffer)
+egl_g3d_wl_gbm_helper_unreference_buffer(void *user_data, void *buffer)
{
struct pipe_resource *resource =3D buffer;
@@ -62,10 +62,10 @@ egl_g3d_wl_drm_helper_unreference_buffer(void *user_dat=
a, void *buffer)
}
struct pipe_resource *
-egl_g3d_wl_drm_common_wl_buffer_get_resource(struct native_display *ndpy,
+egl_g3d_wl_gbm_common_wl_buffer_get_resource(struct native_display *ndpy,
struct wl_buffer *buffer)
{
- return wayland_drm_buffer_get_buffer(buffer);
+ return wayland_gbm_buffer_get_buffer(buffer);
}
#endif
diff --git a/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmg=
r_helper.h b/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmg=
r_helper.h
index 6085875..4d9a41d 100644
--- a/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helpe=
r.h
+++ b/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helpe=
r.h
@@ -23,21 +23,21 @@
* DEALINGS IN THE SOFTWARE.
*/
-#ifndef _NATIVE_WAYLAND_DRM_BUFMGR_HELPER_H_
-#define _NATIVE_WAYLAND_DRM_BUFMGR_HELPER_H_
+#ifndef _NATIVE_WAYLAND_GBM_BUFMGR_HELPER_H_
+#define _NATIVE_WAYLAND_GBM_BUFMGR_HELPER_H_
#include "wayland-drm.h"
void *
-egl_g3d_wl_drm_helper_reference_buffer(void *user_data, uint32_t name,
+egl_g3d_wl_gbm_helper_reference_buffer(void *user_data, uint32_t name,
int32_t width, int32_t height,
uint32_t stride, uint32_t format);
void
-egl_g3d_wl_drm_helper_unreference_buffer(void *user_data, void *buffer);
+egl_g3d_wl_gbm_helper_unreference_buffer(void *user_data, void *buffer);
struct pipe_resource *
-egl_g3d_wl_drm_common_wl_buffer_get_resource(struct native_display *ndpy,
+egl_g3d_wl_gbm_common_wl_buffer_get_resource(struct native_display *ndpy,
struct wl_buffer *buffer);
-#endif /* _NATIVE_WAYLAND_DRM_BUFMGR_HELPER_H_ */
+#endif /* _NATIVE_WAYLAND_GBM_BUFMGR_HELPER_H_ */
diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/=
state_trackers/egl/drm/native_drm.c
index 3c4c19f..95c35e3 100644
--- a/src/gallium/state_trackers/egl/drm/native_drm.c
+++ b/src/gallium/state_trackers/egl/drm/native_drm.c
@@ -197,10 +197,10 @@ drm_display_authenticate(void *user_data, uint32_t ma=
gic)
return drmAuthMagic(drmdpy->fd, magic);
}
-static struct wayland_drm_callbacks wl_drm_callbacks =3D {
+static struct wayland_gbm_callbacks wl_gbm_callbacks =3D {
drm_display_authenticate,
- egl_g3d_wl_drm_helper_reference_buffer,
- egl_g3d_wl_drm_helper_unreference_buffer
+ egl_g3d_wl_gbm_helper_reference_buffer,
+ egl_g3d_wl_gbm_helper_unreference_buffer
};
static boolean
@@ -209,14 +209,14 @@ drm_display_bind_wayland_display(struct native_displa=
y *ndpy,
{
struct drm_display *drmdpy =3D drm_display(ndpy);
- if (drmdpy->wl_server_drm)
+ if (drmdpy->wl_server_gbm)
return FALSE;
- drmdpy->wl_server_drm =3D wayland_drm_init(wl_dpy,
+ drmdpy->wl_server_gbm =3D wayland_gbm_init(wl_dpy,
drmdpy->device_name,
- &wl_drm_callbacks, ndpy);
+ &wl_gbm_callbacks, ndpy);
- if (!drmdpy->wl_server_drm)
+ if (!drmdpy->wl_server_gbm)
return FALSE;
return TRUE;
@@ -228,11 +228,11 @@ drm_display_unbind_wayland_display(struct native_disp=
lay *ndpy,
{
struct drm_display *drmdpy =3D drm_display(ndpy);
- if (!drmdpy->wl_server_drm)
+ if (!drmdpy->wl_server_gbm)
return FALSE;
- wayland_drm_uninit(drmdpy->wl_server_drm);
- drmdpy->wl_server_drm =3D NULL;
+ wayland_gbm_uninit(drmdpy->wl_server_gbm);
+ drmdpy->wl_server_gbm =3D NULL;
return TRUE;
}
@@ -240,7 +240,7 @@ drm_display_unbind_wayland_display(struct native_displa=
y *ndpy,
static struct native_display_wayland_bufmgr drm_display_wayland_bufmgr =3D =
{
drm_display_bind_wayland_display,
drm_display_unbind_wayland_display,
- egl_g3d_wl_drm_common_wl_buffer_get_resource
+ egl_g3d_wl_gbm_common_wl_buffer_get_resource
};
#endif /* HAVE_WAYLAND_BACKEND */
--_000_81DD1C3FC6BE1E4EAA454D486F820044092366SHSMSX101ccrcorpi_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">(resend, the patch is blocked since it is big)<o:p><=
/o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Hi bnf/krh:<o:p></o:p></p>
<p class=3D"MsoNormal">EGL implements wayland-drm protocol, however, it has=
n’t been used by vappi yet since EGL doesn’t export wl_drm(you =
think it is bad style).<o:p></o:p></p>
<p class=3D"MsoNormal">After some thought, I improve wayland-drm to base on=
gbm instead.
<o:p></o:p></p>
<p class=3D"MsoNormal">The module name can change to wayland-gbm as well, g=
bm is platform independent, do you think it’s ok to export wl_gbm thr=
ough libEGL?<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Todo: change file names from *<b>_drm</b>* to *_<b>g=
bm</b>*<o:p></o:p></p>
<p class=3D"MsoNormal">Additional proposal: could we move wayland-drm.xml f=
rom mesa/egl to Weston? I think Weston is the better place to define protoc=
ol, while egl is one backend to implement it.<o:p></o:p></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
<p class=3D"MsoNormal">First half of patch 1 since it is a little big<o:p><=
/o:p></p>
<p class=3D"MsoNormal">This patch is just term change from drm to gbm in so=
urce files.<o:p></o:p></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">From 04aba58c8e942abb3=
73e356e684d96b9c5de5dbf Mon Sep 17 00:00:00 2001<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">From: Halley Zhao <=
halley.zhao at intel.com><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">Date: Thu, 19 Apr 2012=
16:33:21 +0800<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">Subject: [PATCH 1/3] c=
hange drm term to gbm<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">---<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/drivers/dri2/e=
gl_dri2.c =
| 34 ++=
;+---<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/drivers/dri2/e=
gl_dri2.h =
| 6 +=
;-<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/drivers/dri2/p=
latform_wayland.c &nbs=
p; | 72 +++++++-------<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../wayland/wayland-dr=
m/protocol/wayland-drm.xml | 8 +-<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/wayland/waylan=
d-drm/wayland-drm.c |=
110 ++++++++++----------<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/wayland/waylan=
d-drm/wayland-drm.h |=
22 ++--<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../egl/common/native_=
wayland_drm_bufmgr_helper.c | 12 +-<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../egl/common/native_=
wayland_drm_bufmgr_helper.h | 12 +-<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gallium/state_trac=
kers/egl/drm/native_drm.c | 22 ++--<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gallium/state_trac=
kers/egl/drm/native_drm.h | 2 +-<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../state_trackers/egl=
/wayland/native_drm.c | &nbs=
p; 66 ++++++------<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gallium/state_trac=
kers/egl/x11/native_dri2.c | 24 ++--<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">12 files changed, 195 =
insertions(+), 195 deletions(-)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/egl/wayland/wayland-drm/protocol/wayland-drm.xml<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/egl/wayland/wayland-drm/wayland-drm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gallium/state_trackers/egl/wayland/native_drm.c<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/d=
rivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index 4a02838..c9589c1=
100644<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/drivers/=
dri2/egl_dri2.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/drivers/dri2/egl_dri2.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1078,10 +1078,=
10 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *c=
tx,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> _EG=
LImageAttribs attrs;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> EGL=
int format, name, stride, pitch, err;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (!way=
land_buffer_is_drm(buffer))<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
!wayland_buffer_is_gbm(buffer))<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- dri_imag=
e =3D wayland_drm_buffer_get_buffer(buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri_=
image =3D wayland_gbm_buffer_get_buffer(buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> <o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;dri2_dpy->image->queryImage(dri_image, __DRI_IMAGE_ATTRIB_NAME, &am=
p;name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
2_dpy->image->queryImage(dri_image, __DRI_IMAGE_ATTRIB_STRIDE, &s=
tride);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1093,11 +1093,=
11 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *c=
tx,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> att=
rs.Width =3D buffer->width;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> att=
rs.Height =3D buffer->height;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- switch (=
wayland_drm_buffer_get_format(buffer)) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ swit=
ch (wayland_gbm_buffer_get_format(buffer)) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; format =3D __DRI_IMAGE_FORMAT_ARGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; format =3D __DRI_IMAGE_FORMAT_XRGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> def=
ault:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1272,10 +1272,=
10 @@ dri2_wl_reference_buffer(void *user_data, uint32_t name,<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int=
dri_format;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;switch (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri_format =3D__DRI_IMAGE_FORMAT_ARGB8888;<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri_format =3D __DRI_IMAGE_FORMAT_XRGB8888;<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> def=
ault:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1300,7 +1300,7=
@@ dri2_wl_release_buffer(void *user_data, void *buffer)<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
2_dpy->image->destroyImage(image);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-static struct wayland=
_drm_callbacks wl_drm_callbacks =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+static struct way=
land_gbm_callbacks wl_gbm_callbacks =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; .authenticat=
e =3D NULL,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; .reference_b=
uffer =3D dri2_wl_reference_buffer,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; .release_buf=
fer =3D dri2_wl_release_buffer<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1314,17 +1314,=
17 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;(void) drv;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (dri2=
_dpy->wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
dri2_dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
return EGL_FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wl_drm_c=
allbacks.authenticate =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wl_g=
bm_callbacks.authenticate =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; (int(*)(void *, uint32_t)) dri2_dpy->authenticate;<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- dri2_dpy=
->wl_server_drm =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wayl=
and_drm_init(wl_dpy, dri2_dpy->device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&wl_=
drm_callbacks, disp);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri2=
_dpy->wl_server_gbm =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; =
wayland_gbm_init(wl_dpy, dri2_dpy->device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; &=
;wl_gbm_callbacks, disp);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (!dri=
2_dpy->wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
!dri2_dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
return EGL_FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;return EGL_TRUE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1338,11 +1338,=
11 @@ dri2_unbind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;(void) drv;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (!dri=
2_dpy->wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
!dri2_dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
return EGL_FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wayland_=
drm_uninit(dri2_dpy->wl_server_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- dri2_dpy=
->wl_server_drm =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wayl=
and_gbm_uninit(dri2_dpy->wl_server_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri2=
_dpy->wl_server_gbm =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;return EGL_TRUE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/d=
rivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index c30e230..ae80562=
100644<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/drivers/=
dri2/egl_dri2.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/drivers/dri2/egl_dri2.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -121,8 +121,8 @=
@ struct dri2_egl_display<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> #ifdef HAVE_WAYL=
AND_PLATFORM<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct wl_display *wl_dpy;<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- struct w=
l_drm *wl=
_server_drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- struct w=
l_drm *wl=
_drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ stru=
ct wl_gbm =
*wl_server_gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ stru=
ct wl_gbm =
*wl_gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int=
&nb=
sp; =
&n=
bsp; authenticated;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int=
&nb=
sp; =
&n=
bsp; formats;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#endif<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -166,7 +166,7 @=
@ struct dri2_egl_surface<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#ifdef HAVE_WAYLAND_PL=
ATFORM<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct wl_egl_window *wl_win;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct wl_egl_pixmap *wl_pix;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- struct w=
l_buffer *wl_drm_buffer[WL_BUFFER_COUNT];<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ stru=
ct wl_buffer *wl_gbm_buffer[WL_BUFFER_COUNT];=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int=
&nb=
sp; wl_buffer_lock[WL_BUFFER_COUNT];<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int=
&nb=
sp; dx;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int=
&nb=
sp; dy;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/d=
rivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index d291f0f..cbc48eb=
100644<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/drivers/=
dri2/platform_wayland.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/drivers/dri2/platform_wayland.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -40,7 +40,7 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include <wayland-c=
lient.h><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include "wayland=
-drm-client-protocol.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-enum wl_drm_format_fl=
ags {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+enum wl_gbm_forma=
t_flags {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> HAS=
_ARGB8888 =3D 1,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> HAS=
_XRGB8888 =3D 2<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -52,7 +52,7 @@ =
wl_buffer_release(void *data, struct wl_buffer *buffer)<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int=
i;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;for (i =3D 0; i < WL_BUFFER_COUNT; ++i)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; if (dri2_surf->wl_drm_buffer[i] =3D=3D buffer)<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ &nbs=
p; if (dri2_surf->wl_gbm_buffer[i] =3D=3D buffer)<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;assert(i <=3D WL_BUFFER_COUNT);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -95,7 +95,7 @@ =
dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; goto cleanup_surf;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;for (i =3D 0; i < WL_BUFFER_COUNT; ++i) {<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; dri2_surf->wl_drm_buffer[i] =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri2_surf->wl_gbm_buffer[i] =3D NULL;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_surf->wl_buffer_lock[i] =3D 0;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> }<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -107,9 +107,9 @=
@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
2_surf->block_swap_buffers =3D EGL_FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;if (conf->AlphaSize =3D=3D 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; dri2_surf->format =3D WL_DRM_FORMAT_XRGB8888;<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri2_surf->format =3D WL_GBM_FORMAT_XRGB8888;<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> els=
e<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; dri2_surf->format =3D WL_DRM_FORMAT_ARGB8888;<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri2_surf->format =3D WL_GBM_FORMAT_ARGB8888;<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;switch (type) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> cas=
e EGL_WINDOW_BIT:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -193,8 +193,8 @=
@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *sur=
f)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> (*d=
ri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;for (i =3D 0; i < WL_BUFFER_COUNT; ++i)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; if (dri2_surf->wl_drm_buffer[i])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_buffer_destroy(dri2_surf->wl_drm_buffer[i=
]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; if (dri2_surf->wl_gbm_buffer[i])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_buffer_destroy(dri2_surf->wl_gbm_buff=
er[i]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;for (i =3D 0; i < __DRI_BUFFER_COUNT; ++i)<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; if (dri2_surf->dri_buffers[i] && !(i =3D=3D __DRI=
_BUFFER_FRONT_LEFT &&<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -236,7 +236,7 @=
@ wayland_create_buffer(struct dri2_egl_surface *dri2_surf,<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_egl_display(dri2_surf->base.Resource.Display);<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct wl_buffer *buf;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- buf =3D =
wl_drm_create_buffer(dri2_dpy->wl_drm, buffer->name,<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ buf =
=3D wl_gbm_create_buffer(dri2_dpy->wl_gbm, buffer->name,<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; dri2_surf->base.Width, dri2_surf->base.Height,<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; buffer->pitch, dri2_surf->format);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> wl_=
buffer_add_listener(buf, &wl_buffer_listener, dri2_surf);<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -370,9 +370,9 @=
@ destroy_third_buffer(struct dri2_egl_surface *dri2_surf)<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; dri2_surf->third_buffer);<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
2_surf->third_buffer =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (dri2=
_surf->wl_drm_buffer[WL_BUFFER_THIRD])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_buffer_destroy(dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD]);<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- dri2_sur=
f->wl_drm_buffer[WL_BUFFER_THIRD] =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
dri2_surf->wl_gbm_buffer[WL_BUFFER_THIRD])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_buffer_destroy(dri2_surf->wl_gbm_buffer[WL_BUFFER_THIRD=
]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri2=
_surf->wl_gbm_buffer[WL_BUFFER_THIRD] =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
2_surf->wl_buffer_lock[WL_BUFFER_THIRD] =3D 0;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -386,8 +386,8 @=
@ swap_wl_buffers(struct dri2_egl_surface *dri2_surf,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
2_surf->wl_buffer_lock[a] =3D dri2_surf->wl_buffer_lock[b];<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
2_surf->wl_buffer_lock[b] =3D tmp;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; <o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- pointer_=
swap((const void **) &dri2_surf->wl_drm_buffer[a],<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; (cons=
t void **) &dri2_surf->wl_drm_buffer[b]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ poin=
ter_swap((const void **) &dri2_surf->wl_gbm_buffer[a],<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; (=
const void **) &dri2_surf->wl_gbm_buffer[b]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -442,9 +442,9 @=
@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_surf->dy =3D dri2_surf->wl_win->dy;<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; for (i =3D 0; i < WL_BUFFER_COUNT; ++i) {<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; if (dri2_surf->wl_drm_buffer[i])<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_buffer_destroy(dri2_surf-&=
gt;wl_drm_buffer[i]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; dri2_surf->wl_drm_buffer[i] =3D NULL;<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; if (dri2_surf->wl_gbm_buffer[i])<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_buffer_destroy(dri2_su=
rf->wl_gbm_buffer[i]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri2_surf->wl_gbm_buffer[i] =3D NU=
LL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_surf->wl_buffer_lock[i] =3D 0;<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; }<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> }<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -593,13 +593,13=
@@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw=
)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; swap_wl_buffers(dri2_surf, WL_BUFFER_FRONT, WL_BUFFER_B=
ACK);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; if (!dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT])<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; dri2_surf->wl_=
drm_buffer[WL_BUFFER_FRONT] =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; if (!dri2_surf->wl_gbm_buffer[WL_BUFFER_FRONT])<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri2_surf->=
;wl_gbm_buffer[WL_BUFFER_FRONT] =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
wayland_create_buffer(dri2_surf,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]);<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; wl_surface_attach(dri2_surf->wl_win->surface,<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp;  =
; dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &=
nbsp; dri2_surf->wl_gbm_buffer[WL_BUFFER_FRONT],<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
dri2_surf->dx, dri2_surf->dy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_surf->wl_buffer_lock[WL_BUFFER_FRONT] =3D 1;<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -661,12 +661,12=
@@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> /* =
FIXME: Get buffer format from attr_list somehow... or from the<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; wl_egl_piaxmap. */<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> wl_=
egl_pixmap->buffer =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_drm_create_buffer(dri2_dpy->wl_drm,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_gbm_create_buffer(dri2_dpy->wl_gbm,<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; dri2_buf->dri_buffer->=
;name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; wl_egl_pixmap->width,<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; wl_egl_pixmap->height,<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; dri2_buf->dri_buffer->=
;pitch,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
WL_DRM_FORMAT_ARGB8888);<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp; WL_GBM_FORMAT_ARGB8888);<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;wl_attr_list[1] =3D wl_egl_pixmap->width;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> wl_=
attr_list[3] =3D wl_egl_pixmap->height;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -699,7 +699,7 @=
@ dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;dri2_dpy->authenticated =3D 0;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wl_drm_a=
uthenticate(dri2_dpy->wl_drm, id);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wl_g=
bm_authenticate(dri2_dpy->wl_gbm, id);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> wl_=
display_roundtrip(dri2_dpy->wl_dpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;if (!dri2_dpy->authenticated)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -727,7 +727,7 @=
@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dlc=
lose(dri2_dpy->driver);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> fre=
e(dri2_dpy->driver_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> fre=
e(dri2_dpy->device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wl_drm_d=
estroy(dri2_dpy->wl_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wl_g=
bm_destroy(dri2_dpy->wl_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> if =
(dri2_dpy->own_device)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; wl_display_disconnect(dri2_dpy->wl_dpy);<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> fre=
e(dri2_dpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -737,7 +737,7 @=
@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-drm_handle_device(voi=
d *data, struct wl_drm *drm, const char *device)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+drm_handle_device=
(void *data, struct wl_gbm *drm, const char *device)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct dri2_egl_display *dri2_dpy =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> drm=
_magic_t magic;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -763,33 +763,33=
@@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> }<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;drmGetMagic(dri2_dpy->fd, &magic);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wl_drm_a=
uthenticate(dri2_dpy->wl_drm, magic);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wl_g=
bm_authenticate(dri2_dpy->wl_gbm, magic);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-drm_handle_format(voi=
d *data, struct wl_drm *drm, uint32_t format)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+drm_handle_format=
(void *data, struct wl_gbm *drm, uint32_t format)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct dri2_egl_display *dri2_dpy =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;switch (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_dpy->formats |=3D HAS_ARGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_dpy->formats |=3D HAS_XRGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> }<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-drm_handle_authentica=
ted(void *data, struct wl_drm *drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+drm_handle_authen=
ticated(void *data, struct wl_gbm *drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct dri2_egl_display *dri2_dpy =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;dri2_dpy->authenticated =3D 1;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-static const struct w=
l_drm_listener drm_listener =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+static const stru=
ct wl_gbm_listener drm_listener =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; drm_handle_d=
evice,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; drm_handle_f=
ormat,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; drm_handle_a=
uthenticated<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -829,16 +829,16=
@@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; dri2_dpy->wl_dpy =3D disp->PlatformDisplay;<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> }<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- id =3D w=
l_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ id =
=3D wl_display_get_global(dri2_dpy->wl_dpy, "wl_gbm", 1);<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> if =
(id =3D=3D 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; wl_display_roundtrip(dri2_dpy->wl_dpy);<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- id =3D w=
l_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ id =
=3D wl_display_get_global(dri2_dpy->wl_dpy, "wl_gbm", 1);<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> if =
(id =3D=3D 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; goto cleanup_dpy;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- dri2_dpy=
->wl_drm =3D wl_display_bind(dri2_dpy->wl_dpy, id, &wl_drm_interf=
ace);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (!dri=
2_dpy->wl_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri2=
_dpy->wl_gbm =3D wl_display_bind(dri2_dpy->wl_dpy, id, &wl_gbm_in=
terface);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
!dri2_dpy->wl_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; goto cleanup_dpy;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wl_drm_a=
dd_listener(dri2_dpy->wl_drm, &drm_listener, dri2_dpy);<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wl_g=
bm_add_listener(dri2_dpy->wl_gbm, &drm_listener, dri2_dpy);<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> wl_=
display_roundtrip(dri2_dpy->wl_dpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> if =
(dri2_dpy->fd =3D=3D -1)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; goto cleanup_drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -899,7 +899,7 @=
@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> clo=
se(dri2_dpy->fd);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> cleanup_drm:<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> fre=
e(dri2_dpy->device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wl_drm_d=
estroy(dri2_dpy->wl_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wl_g=
bm_destroy(dri2_dpy->wl_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> cleanup_dpy:<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> fre=
e(dri2_dpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> <o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/w=
ayland/wayland-drm/protocol/wayland-drm.xml b/src/egl/wayland/wayland-drm/p=
rotocol/wayland-drm.xml<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">old mode 100644<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">new mode 100755<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index 89fd8f0..1615baf=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/wayland/=
wayland-drm/protocol/wayland-drm.xml<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/wayland/wayland-drm/protocol/wayland-drm.xml<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1,5 +1,5 @@<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><?xml version=3D&qu=
ot;1.0" encoding=3D"UTF-8"?><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-<protocol name=3D&=
quot;drm"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<protocol name=
=3D"gbm"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> <=
copyright><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; Copyright =A9 2008-2011 Kristian H=F8gsberg<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -27,9 +27,9 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; THIS SOFTWARE.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> </copy=
right><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- <!-- drm su=
pport. This object is created by the server and published<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ <!-- gb=
m support. This object is created by the server and published<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; using the display's global event. --><o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- <interface =
name=3D"wl_drm" version=3D"1"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ <interf=
ace name=3D"wl_gbm" version=3D"1"><o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; <enum name=3D"error"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; <entry name=3D"authenticate_fail" value=3D"=
;0"/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; <entry name=3D"invalid_format" value=3D"1&=
quot;/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -37,7 +37,7 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; </enum><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; <enum name=3D"format"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; <!-- The drm format codes match the #defines in drm_fourcc.h.<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; <!-- The gbm format codes match the #defines in drm_fourcc=
.h.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; The formats actually supported=
by the compositor will be<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; reported by the format event. =
--><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; <entry name=3D"c8" value=3D"0x20203843&quo=
t;/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/w=
ayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.=
c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index 5f831b3..a743191=
100644<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/wayland/=
wayland-drm/wayland-drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/wayland/wayland-drm/wayland-drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -47,18 +47,18 @=
@<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#define HAS_WAYLAND_0_=
85<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#endif<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-struct wl_drm {<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+struct wl_gbm {<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; struct wl_di=
splay *display;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; void *=
user_data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; char *device=
_name;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wayland_dr=
m_callbacks *callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct waylan=
d_gbm_callbacks *callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-struct wl_drm_buffer =
{<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+struct wl_gbm_buf=
fer {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; struct wl_bu=
ffer buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm *dr=
m;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
*gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; uint32_t for=
mat;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; void *=
driver_buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -67,10 +67,10 @=
@ struct wl_drm_buffer {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">static void<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">destroy_buffer(struct =
wl_resource *resource)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm_buf=
fer *buffer =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm *dr=
m =3D buffer->drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
_buffer *buffer =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
*gbm =3D buffer->gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm->callbacks=
->release_buffer(drm->user_data,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm->callb=
acks->release_buffer(gbm->user_data,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; =
buffer->driver_buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; free(buffer)=
;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -93,7 +93,7 @@ =
buffer_damage(struct wl_client *client, struct wl_resource *buffer,<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#endif<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-const static struct w=
l_buffer_interface drm_buffer_interface =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+const static stru=
ct wl_buffer_interface gbm_buffer_interface =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#ifdef HAS_WAYLAND_0_8=
5<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer_damag=
e,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#endif<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -101,20 +101,20=
@@ const static struct wl_buffer_interface drm_buffer_interface =3D {<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-drm_create_buffer(str=
uct wl_client *client, struct wl_resource *resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+gbm_create_buffer=
(struct wl_client *client, struct wl_resource *resource,<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; uint32_t id, uint32_t name, int32_t width, int32_t hei=
ght,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; uint32_t stride, uint32_t format)<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm *dr=
m =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm_buf=
fer *buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
*gbm =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
_buffer *buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; switch=
(format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; case WL_DRM_FORMA=
T_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; case WL_DRM_FORMA=
T_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; case WL_GBM_F=
ORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; case WL_GBM_F=
ORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; default:<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp;  =
; WL_DRM_ERROR_INVALID_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp;  =
; &=
nbsp; WL_GBM_ERROR_INVALID_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; =
"invalid format");<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; }<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -125,19 +125,19=
@@ drm_create_buffer(struct wl_client *client, struct wl_resource *resourc=
e,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; }<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; buffer->drm =
=3D drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; buffer->gb=
m =3D gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.width =3D width;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.height =3D height;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->f=
ormat =3D format;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer=
->driver_buffer =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; drm->callbacks->reference_buffer(drm->user_data, name,<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; gbm->callbacks->reference_buffer(gbm->user_data, name,<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; width, height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; stride, format);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; if (bu=
ffer->driver_buffer =3D=3D NULL) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp;  =
; WL_DRM_ERROR_INVALID_NAME,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp;  =
; &=
nbsp; WL_GBM_ERROR_INVALID_NAME,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; =
"invalid name");<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; }<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -145,7 +145,7 @=
@ drm_create_buffer(struct wl_client *client, struct wl_resource *resource,=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.resource.object.id =3D id;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.resource.object.interface =3D &wl_buffer_interface;<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.resource.object.implementation =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; (void (**)(void)) &drm_buffer_interface;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; (void (**)(void)) &gbm_buffer_interface;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.resource.data =3D buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer=
->buffer.resource.destroy =3D destroy_buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -155,86 +155,86=
@@ drm_create_buffer(struct wl_client *client, struct wl_resource *resourc=
e,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-drm_authenticate(stru=
ct wl_client *client,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+gbm_authenticate(=
struct wl_client *client,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; struct wl_resource *resource, uint32_t id)<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm *dr=
m =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
*gbm =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; if (drm->callb=
acks->authenticate(drm->user_data, id) < 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; if (gbm->c=
allbacks->authenticate(gbm->user_data, id) < 0)<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp;  =
; WL_DRM_ERROR_AUTHENTICATE_FAIL,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp;  =
; &=
nbsp; WL_GBM_ERROR_AUTHENTICATE_FAIL,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; =
"authenicate failed");<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; else<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; wl_resource_post_event(resource, WL_DRM_AUTHENTICATED);<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; wl_resource_post_event(resource, WL_GBM_AUTHENTICATED);<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-const static struct w=
l_drm_interface drm_interface =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm_authenticate,=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm_create_buffer=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+const static stru=
ct wl_gbm_interface gbm_interface =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm_authentic=
ate,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm_create_bu=
ffer<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-bind_drm(struct wl_cl=
ient *client, void *data, uint32_t version, uint32_t id)<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+bind_gbm(struct w=
l_client *client, void *data, uint32_t version, uint32_t id)<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm *dr=
m =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
*gbm =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; struct wl_re=
source *resource;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; resource =3D wl_c=
lient_add_object(client, &wl_drm_interface,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp; =
&drm=
_interface, id, data);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_resource_post_=
event(resource, WL_DRM_DEVICE, drm->device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_resource_post_=
event(resource, WL_DRM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
WL_DRM_FORMAT=
_ARGB8888);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_resource_post_=
event(resource, WL_DRM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
WL_DRM_FORMAT=
_XRGB8888);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; resource =3D =
wl_client_add_object(client, &wl_gbm_interface,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp;  =
; &n=
bsp; &=
;gbm_interface, id, data);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_resource_p=
ost_event(resource, WL_GBM_DEVICE, gbm->device_name);<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_resource_p=
ost_event(resource, WL_GBM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp; WL_GBM_FO=
RMAT_ARGB8888);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_resource_p=
ost_event(resource, WL_GBM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp; WL_GBM_FO=
RMAT_XRGB8888);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-struct wl_drm *<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_init(stru=
ct wl_display *display, char *device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
struct wayland_drm_callbacks *callbacks, void *user_data)<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+struct wl_gbm *<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_init(=
struct wl_display *display, char *device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; struct wayland_gbm_callbacks *callbacks, void *user_data)<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm *dr=
m;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
*gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm =3D malloc(si=
zeof *drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm =3D mallo=
c(sizeof *gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm->display =
=3D display;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm->device_na=
me =3D strdup(device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm->callbacks=
=3D callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drm->user_data=
=3D user_data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm->displ=
ay =3D display;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm->devic=
e_name =3D strdup(device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm->callb=
acks =3D callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm->user_=
data =3D user_data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wl_display_add_gl=
obal(display, &wl_drm_interface, drm, bind_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_display_ad=
d_global(display, &wl_gbm_interface, gbm, bind_gbm);<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; return drm;<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; return gbm;<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_uninit(st=
ruct wl_drm *drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_unini=
t(struct wl_gbm *gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; free(drm->devi=
ce_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; free(gbm->=
device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; /* FIX=
ME: need wl_display_del_{object,global} */<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; free(drm);<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; free(gbm);<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_buffer_is_drm=
(struct wl_buffer *buffer)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_buffer_is=
_gbm(struct wl_buffer *buffer)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return buffe=
r->resource.object.implementation =3D=3D
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; (void (**)(void)) &drm_buffer_interface;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; (void (**)(void)) &gbm_buffer_interface;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> uint32_t<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_buffer_ge=
t_format(struct wl_buffer *buffer_base)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_buffe=
r_get_format(struct wl_buffer *buffer_base)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm_buf=
fer *buffer =3D (struct wl_drm_buffer *) buffer_base;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
_buffer *buffer =3D (struct wl_gbm_buffer *) buffer_base;<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return=
buffer->format;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void *<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_buffer_ge=
t_buffer(struct wl_buffer *buffer_base)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_buffe=
r_get_buffer(struct wl_buffer *buffer_base)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; struct wl_drm_buf=
fer *buffer =3D (struct wl_drm_buffer *) buffer_base;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct wl_gbm=
_buffer *buffer =3D (struct wl_gbm_buffer *) buffer_base;<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return=
buffer->driver_buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/w=
ayland/wayland-drm/wayland-drm.h b/src/egl/wayland/wayland-drm/wayland-drm.=
h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">old mode 100644<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">new mode 100755<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index bec50a5..787e00b=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/wayland/=
wayland-drm/wayland-drm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/wayland/wayland-drm/wayland-drm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1,5 +1,5 @@<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-#ifndef WAYLAND_DRM_H=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-#define WAYLAND_DRM_H=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+#ifndef WAYLAND_G=
BM_H<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+#define WAYLAND_G=
BM_H<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> #include "e=
gldisplay.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include "eglimag=
e.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -7,9 +7,9 @@<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include <wayland-s=
erver.h><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include "wayland=
-drm-server-protocol.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-struct wl_drm;<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+struct wl_gbm;<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-struct wayland_drm_ca=
llbacks {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+struct wayland_gb=
m_callbacks {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; int (*authen=
ticate)(void *user_data, uint32_t id);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; void *=
(*reference_buffer)(void *user_data, uint32_t name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -19,20 +19,20 @=
@ struct wayland_drm_callbacks {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; void (*relea=
se_buffer)(void *user_data, void *buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-struct wl_drm *<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_init(stru=
ct wl_display *display, char *device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; struct wayland_drm_callbacks *callbacks, void *user_data);<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+struct wl_gbm *<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_init(=
struct wl_display *display, char *device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; struct wayland_gbm_callbacks *callbacks, void *user_data);<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_uninit(st=
ruct wl_drm *drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_unini=
t(struct wl_gbm *gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> int<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_buffer_is_drm=
(struct wl_buffer *buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_buffer_is=
_gbm(struct wl_buffer *buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> uint32_t<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_buffer_ge=
t_format(struct wl_buffer *buffer_base);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_buffe=
r_get_format(struct wl_buffer *buffer_base);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void *<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_drm_buffer_ge=
t_buffer(struct wl_buffer *buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_buffe=
r_get_buffer(struct wl_buffer *buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> #endif<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/galli=
um/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.c b/src/galli=
um/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.c<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index 80b3f22..d35cf47=
100644<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/common/native_wayland_drm_bufmgr_helper.c<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.c<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -13,7 +13,7 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include "native_=
wayland_drm_bufmgr_helper.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void *<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-egl_g3d_wl_drm_helper=
_reference_buffer(void *user_data, uint32_t name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+egl_g3d_wl_gbm_he=
lper_reference_buffer(void *user_data, uint32_t name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; int32_t widt=
h, int32_t height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; uint32_t str=
ide, uint32_t format)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -23,10 +23,10 @=
@ egl_g3d_wl_drm_helper_reference_buffer(void *user_data, uint32_t name,<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> enu=
m pipe_format pf;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;switch (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; pf =3D PIPE_FORMAT_B8G8R8A8_UNORM;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; pf =3D PIPE_FORMAT_B8G8R8X8_UNORM;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> def=
ault:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -54,7 +54,7 @@ =
egl_g3d_wl_drm_helper_reference_buffer(void *user_data, uint32_t name,<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-egl_g3d_wl_drm_helper=
_unreference_buffer(void *user_data, void *buffer)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+egl_g3d_wl_gbm_he=
lper_unreference_buffer(void *user_data, void *buffer)<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct pipe_resource *resource =3D buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -62,10 +62,10 @=
@ egl_g3d_wl_drm_helper_unreference_buffer(void *user_data, void *buffer)<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> struct pipe_reso=
urce *<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-egl_g3d_wl_drm_common=
_wl_buffer_get_resource(struct native_display *ndpy,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+egl_g3d_wl_gbm_co=
mmon_wl_buffer_get_resource(struct native_display *ndpy,<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; struct wl_buffer *buffer)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- return w=
ayland_drm_buffer_get_buffer(buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ retu=
rn wayland_gbm_buffer_get_buffer(buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> #endif<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/galli=
um/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.h b/src/galli=
um/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.h<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index 6085875..4d9a41d=
100644<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/common/native_wayland_drm_bufmgr_helper.h<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.h<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -23,21 +23,21 @=
@<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> * DEALINGS IN T=
HE SOFTWARE.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> */<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-#ifndef _NATIVE_WAYLA=
ND_DRM_BUFMGR_HELPER_H_<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-#define _NATIVE_WAYLA=
ND_DRM_BUFMGR_HELPER_H_<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+#ifndef _NATIVE_W=
AYLAND_GBM_BUFMGR_HELPER_H_<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+#define _NATIVE_W=
AYLAND_GBM_BUFMGR_HELPER_H_<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> #include "w=
ayland-drm.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void *<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-egl_g3d_wl_drm_helper=
_reference_buffer(void *user_data, uint32_t name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+egl_g3d_wl_gbm_he=
lper_reference_buffer(void *user_data, uint32_t name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; int32_t widt=
h, int32_t height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; uint32_t str=
ide, uint32_t format);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-egl_g3d_wl_drm_helper=
_unreference_buffer(void *user_data, void *buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+egl_g3d_wl_gbm_he=
lper_unreference_buffer(void *user_data, void *buffer);<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> struct pipe_reso=
urce *<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-egl_g3d_wl_drm_common=
_wl_buffer_get_resource(struct native_display *ndpy,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+egl_g3d_wl_gbm_co=
mmon_wl_buffer_get_resource(struct native_display *ndpy,<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; =
struct wl_buffer *buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-#endif /* _NATIVE_WAY=
LAND_DRM_BUFMGR_HELPER_H_ */<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+#endif /* _NATIVE=
_WAYLAND_GBM_BUFMGR_HELPER_H_ */<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/galli=
um/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm=
/native_drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">index 3c4c19f..95c35e3=
100644<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/drm/native_drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/drm/native_drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -197,10 +197,10=
@@ drm_display_authenticate(void *user_data, uint32_t magic)<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> ret=
urn drmAuthMagic(drmdpy->fd, magic);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-static struct wayland=
_drm_callbacks wl_drm_callbacks =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+static struct way=
land_gbm_callbacks wl_gbm_callbacks =3D {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> drm=
_display_authenticate,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- egl_g3d_=
wl_drm_helper_reference_buffer,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- egl_g3d_=
wl_drm_helper_unreference_buffer<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ egl_=
g3d_wl_gbm_helper_reference_buffer,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ egl_=
g3d_wl_gbm_helper_unreference_buffer<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static boolean<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -209,14 +209,14=
@@ drm_display_bind_wayland_display(struct native_display *ndpy,<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct drm_display *drmdpy =3D drm_display(ndpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (drmd=
py->wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- drmdpy-&=
gt;wl_server_drm =3D wayland_drm_init(wl_dpy,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ drmd=
py->wl_server_gbm =3D wayland_gbm_init(wl_dpy,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; drmdpy->device_name,<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; &wl_drm_callbacks, ndpy);<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ &nbs=
p; &wl_gbm_callbacks, ndpy);<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (!drm=
dpy->wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
!drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> <o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;return TRUE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -228,11 +228,11=
@@ drm_display_unbind_wayland_display(struct native_display *ndpy,<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">{<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> str=
uct drm_display *drmdpy =3D drm_display(ndpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- if (!drm=
dpy->wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
!drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- wayland_=
drm_uninit(drmdpy->wl_server_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- drmdpy-&=
gt;wl_server_drm =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ wayl=
and_gbm_uninit(drmdpy->wl_server_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ drmd=
py->wl_server_gbm =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;return TRUE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -240,7 +240,7 @=
@ drm_display_unbind_wayland_display(struct native_display *ndpy,<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">static struct native_d=
isplay_wayland_bufmgr drm_display_wayland_bufmgr =3D {<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> drm=
_display_bind_wayland_display,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> drm=
_display_unbind_wayland_display,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- egl_g3d_=
wl_drm_common_wl_buffer_get_resource<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ egl_=
g3d_wl_gbm_common_wl_buffer_get_resource<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> #endif /* HAVE_W=
AYLAND_BACKEND */<o:p></o:p></span></p>
</div>
</body>
</html>
--_000_81DD1C3FC6BE1E4EAA454D486F820044092366SHSMSX101ccrcorpi_--
More information about the mesa-dev
mailing list