[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>&nbsp;</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&#8217;t been used by vappi yet since EGL doesn&#8217;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&#8217;s ok to export wl_gbm thr=
ough libEGL?<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</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>&nbsp;</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>&nbsp;</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 &lt;=
halley.zhao at intel.com&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">Date: Thu, 19 Apr 2012=
 16:33:21 &#43;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>&nbsp;</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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; 34 &#43;&#43=
;&#43;---<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/drivers/dri2/e=
gl_dri2.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; 6 &#43=
;-<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/drivers/dri2/p=
latform_wayland.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; |&nbsp;&nbsp; 72 &#43;&#43;&#43;&#43;&#43;&#43;&#43;-------<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../wayland/wayland-dr=
m/protocol/wayland-drm.xml&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; 8 &#43;-<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/wayland/waylan=
d-drm/wayland-drm.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |=
&nbsp; 110 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;----------<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/wayland/waylan=
d-drm/wayland-drm.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |=
&nbsp;&nbsp; 22 &#43;&#43;--<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../egl/common/native_=
wayland_drm_bufmgr_helper.c&nbsp; |&nbsp;&nbsp; 12 &#43;-<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../egl/common/native_=
wayland_drm_bufmgr_helper.h&nbsp; |&nbsp;&nbsp; 12 &#43;-<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&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; 22 &#43;&#43;--<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&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; 2 &#43;-<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../state_trackers/egl=
/wayland/native_drm.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbs=
p; 66 &#43;&#43;&#43;&#43;&#43;&#43;------<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&nbsp;&nbsp; |&nbsp;&nbsp; 24 &#43;&#43;--<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">12 files changed, 195 =
insertions(&#43;), 195 deletions(-)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
&gt; 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=
&gt; 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=
&gt; 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>&nbsp;</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">&#43;&#43;&#43; 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 &#43;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">&nbsp;&nbsp;&nbsp; _EG=
LImageAttribs attrs;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp; if (!way=
land_buffer_is_drm(buffer))<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
!wayland_buffer_is_gbm(buffer))<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp; 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">&#43;&nbsp;&nbsp; dri_=
image =3D wayland_gbm_buffer_get_buffer(buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; <o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;dri2_dpy-&gt;image-&gt;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">&nbsp;&nbsp;&nbsp; dri=
2_dpy-&gt;image-&gt;queryImage(dri_image, __DRI_IMAGE_ATTRIB_STRIDE, &amp;s=
tride);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1093,11 &#43;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">&nbsp;&nbsp;&nbsp; att=
rs.Width =3D buffer-&gt;width;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; att=
rs.Height =3D buffer-&gt;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">-&nbsp;&nbsp; switch (=
wayland_drm_buffer_get_format(buffer)) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; swit=
ch (wayland_gbm_buffer_get_format(buffer)) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; format =3D __DRI_IMAGE_FORMAT_ARGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; format =3D __DRI_IMAGE_FORMAT_XRGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; def=
ault:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1272,10 &#43;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">&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;switch (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri_format =3D__DRI_IMAGE_FORMAT_ARGB8888;<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri_format =3D __DRI_IMAGE_FORMAT_XRGB8888;<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; def=
ault:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1300,7 &#43;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">&nbsp;&nbsp;&nbsp; dri=
2_dpy-&gt;image-&gt;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .authenticat=
e =3D NULL,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .reference_b=
uffer =3D dri2_wl_reference_buffer,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .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 &#43;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">&nbsp;&nbsp;&nbsp;&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">-&nbsp;&nbsp; if (dri2=
_dpy-&gt;wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
dri2_dpy-&gt;wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp;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">-&nbsp;&nbsp; wl_drm_c=
allbacks.authenticate =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wl_g=
bm_callbacks.authenticate =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; (int(*)(void *, uint32_t)) dri2_dpy-&gt;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">-&nbsp;&nbsp; dri2_dpy=
-&gt;wl_server_drm =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; wayl=
and_drm_init(wl_dpy, dri2_dpy-&gt;device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;wl_=
drm_callbacks, disp);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; dri2=
_dpy-&gt;wl_server_gbm =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
wayland_gbm_init(wl_dpy, dri2_dpy-&gt;device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp=
;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">-&nbsp;&nbsp; if (!dri=
2_dpy-&gt;wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
!dri2_dpy-&gt;wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp;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">&nbsp;&nbsp;&nbsp;&nbs=
p;return EGL_TRUE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1338,11 &#43;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">&nbsp;&nbsp;&nbsp;&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">-&nbsp;&nbsp; if (!dri=
2_dpy-&gt;wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
!dri2_dpy-&gt;wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp;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">-&nbsp;&nbsp; wayland_=
drm_uninit(dri2_dpy-&gt;wl_server_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; dri2_dpy=
-&gt;wl_server_drm =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wayl=
and_gbm_uninit(dri2_dpy-&gt;wl_server_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; dri2=
_dpy-&gt;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">&nbsp;&nbsp;&nbsp;&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">&#43;&#43;&#43; 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 &#43;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">&nbsp;#ifdef HAVE_WAYL=
AND_PLATFORM<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; str=
uct wl_display&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *wl_dpy;<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; struct w=
l_drm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *wl=
_server_drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; struct w=
l_drm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *wl=
_drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; stru=
ct wl_gbm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 *wl_server_gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; stru=
ct wl_gbm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 *wl_gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; int=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &n=
bsp;&nbsp;&nbsp;&nbsp; authenticated;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; int=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &n=
bsp;&nbsp;&nbsp;&nbsp; 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 &#43;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">&nbsp;&nbsp;&nbsp; str=
uct wl_egl_window&nbsp; *wl_win;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; str=
uct wl_egl_pixmap&nbsp; *wl_pix;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; struct w=
l_buffer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *wl_drm_buffer[WL_BUFFER_COUNT];<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; stru=
ct wl_buffer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *wl_gbm_buffer[WL_BUFFER_COUNT];=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; int=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_buffer_lock[WL_BUFFER_COUNT];<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; int=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dx;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; int=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&#43;&#43;&#43; 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 &#43;40,7 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include &lt;wayland-c=
lient.h&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include &quot;wayland=
-drm-client-protocol.h&quot;<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">&#43;enum wl_gbm_forma=
t_flags {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; HAS=
_ARGB8888 =3D 1,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; 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 &#43;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">&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;for (i =3D 0; i &lt; WL_BUFFER_COUNT; &#43;&#43;i)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; if (dri2_surf-&gt;wl_drm_buffer[i] =3D=3D buffer)<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43; &nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;if (dri2_surf-&gt;wl_gbm_buffer[i] =3D=3D buffer)<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;assert(i &lt;=3D WL_BUFFER_COUNT);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -95,7 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;for (i =3D 0; i &lt; WL_BUFFER_COUNT; &#43;&#43;i) {<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; dri2_surf-&gt;wl_drm_buffer[i] =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; dri2_surf-&gt;wl_gbm_buffer[i] =3D NULL;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri2_surf-&gt;wl_buffer_lock[i] =3D 0;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; }<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 &#43;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">&nbsp;&nbsp;&nbsp; dri=
2_surf-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;if (conf-&gt;AlphaSize =3D=3D 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; dri2_surf-&gt;format =3D WL_DRM_FORMAT_XRGB8888;<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; dri2_surf-&gt;format =3D WL_GBM_FORMAT_XRGB8888;<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; els=
e<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; dri2_surf-&gt;format =3D WL_DRM_FORMAT_ARGB8888;<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; dri2_surf-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;switch (type) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; cas=
e EGL_WINDOW_BIT:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -193,8 &#43;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">&nbsp;&nbsp;&nbsp; (*d=
ri2_dpy-&gt;core-&gt;destroyDrawable)(dri2_surf-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;for (i =3D 0; i &lt; WL_BUFFER_COUNT; &#43;&#43;i)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; if (dri2_surf-&gt;wl_drm_buffer[i])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; if (dri2_surf-&gt;wl_gbm_buffer[i])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_buffer_destroy(dri2_surf-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;for (i =3D 0; i &lt; __DRI_BUFFER_COUNT; &#43;&#43;i)<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; if (dri2_surf-&gt;dri_buffers[i] &amp;&amp; !(i =3D=3D __DRI=
_BUFFER_FRONT_LEFT &amp;&amp;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -236,7 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri2_egl_display(dri2_surf-&gt;base.Resource.Display);<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp; buf =3D =
wl_drm_create_buffer(dri2_dpy-&gt;wl_drm, buffer-&gt;name,<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; buf =
=3D wl_gbm_create_buffer(dri2_dpy-&gt;wl_gbm, buffer-&gt;name,<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; dri2_surf-&gt;base.Width, dri2_surf-&gt;base.Height,<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; buffer-&gt;pitch, dri2_surf-&gt;format);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; wl_=
buffer_add_listener(buf, &amp;wl_buffer_listener, dri2_surf);<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -370,9 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; dri2_surf-&gt;third_buffer);<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; dri=
2_surf-&gt;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">-&nbsp;&nbsp; if (dri2=
_surf-&gt;wl_drm_buffer[WL_BUFFER_THIRD])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; wl_buffer_destroy(dri2_surf-&gt;wl_drm_buffer[WL_BUFFER_THIRD]);<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; dri2_sur=
f-&gt;wl_drm_buffer[WL_BUFFER_THIRD] =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
dri2_surf-&gt;wl_gbm_buffer[WL_BUFFER_THIRD])<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; wl_buffer_destroy(dri2_surf-&gt;wl_gbm_buffer[WL_BUFFER_THIRD=
]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; dri2=
_surf-&gt;wl_gbm_buffer[WL_BUFFER_THIRD] =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; dri=
2_surf-&gt;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 &#43;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">&nbsp;&nbsp;&nbsp; dri=
2_surf-&gt;wl_buffer_lock[a] =3D dri2_surf-&gt;wl_buffer_lock[b];<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; dri=
2_surf-&gt;wl_buffer_lock[b] =3D tmp;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; <o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; pointer_=
swap((const void **) &amp;dri2_surf-&gt;wl_drm_buffer[a],<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cons=
t void **) &amp;dri2_surf-&gt;wl_drm_buffer[b]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; poin=
ter_swap((const void **) &amp;dri2_surf-&gt;wl_gbm_buffer[a],<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (=
const void **) &amp;dri2_surf-&gt;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">&nbsp;static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -442,9 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri2_surf-&gt;dy =3D dri2_surf-&gt;wl_win-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;for (i =3D 0; i &lt; WL_BUFFER_COUNT; &#43;&#43;i) {<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; if (dri2_surf-&gt;wl_drm_buffer[i])<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; dri2_surf-&gt;wl_drm_buffer[i]&nbsp; =3D NULL;<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dri2_surf-&gt;wl_gbm_buffer[i])<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_buffer_destroy(dri2_su=
rf-&gt;wl_gbm_buffer[i]);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dri2_surf-&gt;wl_gbm_buffer[i]&nbsp; =3D NU=
LL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dri2_surf-&gt;wl_buffer_lock[i] =3D 0;<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; }<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -593,13 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; if (!dri2_surf-&gt;wl_drm_buffer[WL_BUFFER_FRONT])<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dri2_surf-&gt;wl_=
drm_buffer[WL_BUFFER_FRONT] =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; if (!dri2_surf-&gt;wl_gbm_buffer[WL_BUFFER_FRONT])<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dri2_surf-&gt=
;wl_gbm_buffer[WL_BUFFER_FRONT] =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp;&nbsp;wayland_create_buffer(dri2_surf,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;dri2_surf-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;wl_surface_attach(dri2_surf-&gt;wl_win-&gt;surface,<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
; dri2_surf-&gt;wl_drm_buffer[WL_BUFFER_FRONT],<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&=
nbsp; dri2_surf-&gt;wl_gbm_buffer[WL_BUFFER_FRONT],<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp;&nbsp;dri2_surf-&gt;dx, dri2_surf-&gt;dy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri2_surf-&gt;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 &#43;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">&nbsp;&nbsp;&nbsp; /* =
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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; wl_egl_piaxmap.&nbsp; */<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; wl_=
egl_pixmap-&gt;buffer =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; wl_drm_create_buffer(dri2_dpy-&gt;wl_drm,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; wl_gbm_create_buffer(dri2_dpy-&gt;wl_gbm,<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;dri2_buf-&gt;dri_buffer-&gt=
;name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;wl_egl_pixmap-&gt;width,<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;wl_egl_pixmap-&gt;height,<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;dri2_buf-&gt;dri_buffer-&gt=
;pitch,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; WL_DRM_FORMAT_ARGB8888);<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;wl_attr_list[1] =3D wl_egl_pixmap-&gt;width;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; wl_=
attr_list[3] =3D wl_egl_pixmap-&gt;height;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -699,7 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;dri2_dpy-&gt;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">-&nbsp;&nbsp; wl_drm_a=
uthenticate(dri2_dpy-&gt;wl_drm, id);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wl_g=
bm_authenticate(dri2_dpy-&gt;wl_gbm, id);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; wl_=
display_roundtrip(dri2_dpy-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;if (!dri2_dpy-&gt;authenticated)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -727,7 &#43;727,7 @=
@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; dlc=
lose(dri2_dpy-&gt;driver);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; fre=
e(dri2_dpy-&gt;driver_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; fre=
e(dri2_dpy-&gt;device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; wl_drm_d=
estroy(dri2_dpy-&gt;wl_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wl_g=
bm_destroy(dri2_dpy-&gt;wl_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; if =
(dri2_dpy-&gt;own_device)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; wl_display_disconnect(dri2_dpy-&gt;wl_dpy);<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; fre=
e(dri2_dpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -737,7 &#43;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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp; str=
uct dri2_egl_display *dri2_dpy =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; drm=
_magic_t magic;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -763,33 &#43;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">&nbsp;&nbsp;&nbsp; }<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">&nbsp;&nbsp;&nbsp;&nbs=
p;drmGetMagic(dri2_dpy-&gt;fd, &amp;magic);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; wl_drm_a=
uthenticate(dri2_dpy-&gt;wl_drm, magic);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wl_g=
bm_authenticate(dri2_dpy-&gt;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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;switch (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri2_dpy-&gt;formats |=3D HAS_ARGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri2_dpy-&gt;formats |=3D HAS_XRGB8888;<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; }<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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;dri2_dpy-&gt;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm_handle_d=
evice,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm_handle_f=
ormat,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm_handle_a=
uthenticated<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -829,16 &#43;829,16=
 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; dri2_dpy-&gt;wl_dpy =3D disp-&gt;PlatformDisplay;<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; }<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">-&nbsp;&nbsp; id =3D w=
l_display_get_global(dri2_dpy-&gt;wl_dpy, &quot;wl_drm&quot;, 1);<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; id =
=3D wl_display_get_global(dri2_dpy-&gt;wl_dpy, &quot;wl_gbm&quot;, 1);<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; if =
(id =3D=3D 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; wl_display_roundtrip(dri2_dpy-&gt;wl_dpy);<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; id =3D w=
l_display_get_global(dri2_dpy-&gt;wl_dpy, &quot;wl_drm&quot;, 1);<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; id =
=3D wl_display_get_global(dri2_dpy-&gt;wl_dpy, &quot;wl_gbm&quot;, 1);<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; if =
(id =3D=3D 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; goto cleanup_dpy;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; dri2_dpy=
-&gt;wl_drm =3D wl_display_bind(dri2_dpy-&gt;wl_dpy, id, &amp;wl_drm_interf=
ace);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; if (!dri=
2_dpy-&gt;wl_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; dri2=
_dpy-&gt;wl_gbm =3D wl_display_bind(dri2_dpy-&gt;wl_dpy, id, &amp;wl_gbm_in=
terface);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
!dri2_dpy-&gt;wl_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; goto cleanup_dpy;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; wl_drm_a=
dd_listener(dri2_dpy-&gt;wl_drm, &amp;drm_listener, dri2_dpy);<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wl_g=
bm_add_listener(dri2_dpy-&gt;wl_gbm, &amp;drm_listener, dri2_dpy);<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; wl_=
display_roundtrip(dri2_dpy-&gt;wl_dpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; if =
(dri2_dpy-&gt;fd =3D=3D -1)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; goto cleanup_drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -899,7 &#43;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">&nbsp;&nbsp;&nbsp; clo=
se(dri2_dpy-&gt;fd);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp; cleanup_drm:<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; fre=
e(dri2_dpy-&gt;device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; wl_drm_d=
estroy(dri2_dpy-&gt;wl_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wl_g=
bm_destroy(dri2_dpy-&gt;wl_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp; cleanup_dpy:<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; fre=
e(dri2_dpy);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; <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">&#43;&#43;&#43; 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 &#43;1,5 @@<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&lt;?xml version=3D&qu=
ot;1.0&quot; encoding=3D&quot;UTF-8&quot;?&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&lt;protocol name=3D&=
quot;drm&quot;&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&lt;protocol name=
=3D&quot;gbm&quot;&gt;<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">&nbsp;&nbsp;&nbsp;&lt;=
copyright&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&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 &#43;27,9 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p; THIS SOFTWARE.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp; &lt;/copy=
right&gt;<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">-&nbsp; &lt;!-- 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">&#43;&nbsp; &lt;!-- 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; using the display's global event. --&gt;<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp; &lt;interface =
name=3D&quot;wl_drm&quot; version=3D&quot;1&quot;&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp; &lt;interf=
ace name=3D&quot;wl_gbm&quot; version=3D&quot;1&quot;&gt;<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p; &lt;enum name=3D&quot;error&quot;&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; &lt;entry name=3D&quot;authenticate_fail&quot; value=3D&quot=
;0&quot;/&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; &lt;entry name=3D&quot;invalid_format&quot; value=3D&quot;1&=
quot;/&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -37,7 &#43;37,7 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p; &lt;/enum&gt;<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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&lt;enum name=3D&quot;format&quot;&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; &lt;!-- 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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; &lt;!-- 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The formats actually supported=
 by the compositor will be<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reported by the format event. =
--&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; &lt;entry name=3D&quot;c8&quot; value=3D&quot;0x20203843&quo=
t;/&gt;<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">&#43;&#43;&#43; 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 &#43;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">&#43;struct wl_gbm {<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void *=
user_data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wayland_dr=
m_callbacks *callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&#43;struct wl_gbm_buf=
fer {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_bu=
ffer buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm *dr=
m;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_gbm=
 *gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void *=
driver_buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -67,10 &#43;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm_buf=
fer *buffer =3D resource-&gt;data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm *dr=
m =3D buffer-&gt;drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_gbm=
_buffer *buffer =3D resource-&gt;data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_gbm=
 *gbm =3D buffer-&gt;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm-&gt;callbacks=
-&gt;release_buffer(drm-&gt;user_data,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gbm-&gt;callb=
acks-&gt;release_buffer(gbm-&gt;user_data,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;buffer-&gt;driver_buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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 &#43;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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 &#43;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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm *dr=
m =3D resource-&gt;data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm_buf=
fer *buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_gbm=
 *gbm =3D resource-&gt;data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; switch=
 (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case WL_DRM_FORMA=
T_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case WL_DRM_FORMA=
T_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case WL_GBM_F=
ORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case WL_GBM_F=
ORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default:<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; WL_DRM_ERROR_INVALID_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; WL_GBM_ERROR_INVALID_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&quot;invalid format&quot;);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -125,19 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;drm =
=3D drm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;gb=
m =3D gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;b=
uffer.width =3D width;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;b=
uffer.height =3D height;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer=
-&gt;driver_buffer =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; drm-&gt;callbacks-&gt;reference_buffer(drm-&gt;user_data, name,<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; gbm-&gt;callbacks-&gt;reference_buffer(gbm-&gt;user_data, name,<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; &nbsp;width, height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; &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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (bu=
ffer-&gt;driver_buffer =3D=3D NULL) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; WL_DRM_ERROR_INVALID_NAME,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; WL_GBM_ERROR_INVALID_NAME,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&quot;invalid name&quot;);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -145,7 &#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;b=
uffer.resource.object.id =3D id;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;b=
uffer.resource.object.interface =3D &amp;wl_buffer_interface;<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;b=
uffer.resource.object.implementation =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; (void (**)(void)) &amp;drm_buffer_interface;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; (void (**)(void)) &amp;gbm_buffer_interface;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer-&gt;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer=
-&gt;buffer.resource.destroy =3D destroy_buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -155,86 &#43;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">&nbsp;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">&#43;gbm_authenticate(=
struct wl_client *client,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm *dr=
m =3D resource-&gt;data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_gbm=
 *gbm =3D resource-&gt;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (drm-&gt;callb=
acks-&gt;authenticate(drm-&gt;user_data, id) &lt; 0)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (gbm-&gt;c=
allbacks-&gt;authenticate(gbm-&gt;user_data, id) &lt; 0)<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; WL_DRM_ERROR_AUTHENTICATE_FAIL,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; WL_GBM_ERROR_AUTHENTICATE_FAIL,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&quot;authenicate failed&quot;);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm_authenticate,=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm_create_buffer=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gbm_authentic=
ate,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;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">&#43;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm *dr=
m =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_gbm=
 *gbm =3D data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resource =3D wl_c=
lient_add_object(client, &amp;wl_drm_interface,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;drm=
_interface, id, data);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_resource_post_=
event(resource, WL_DRM_DEVICE, drm-&gt;device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_resource_post_=
event(resource, WL_DRM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WL_DRM_FORMAT=
_ARGB8888);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_resource_post_=
event(resource, WL_DRM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WL_DRM_FORMAT=
_XRGB8888);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resource =3D =
wl_client_add_object(client, &amp;wl_gbm_interface,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp=
;gbm_interface, id, data);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_resource_p=
ost_event(resource, WL_GBM_DEVICE, gbm-&gt;device_name);<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_resource_p=
ost_event(resource, WL_GBM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WL_GBM_FO=
RMAT_ARGB8888);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_resource_p=
ost_event(resource, WL_GBM_FORMAT,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 struct wayland_drm_callbacks *callbacks, void *user_data)<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;struct wl_gbm *<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct wl_drm *dr=
m;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm =3D malloc(si=
zeof *drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm-&gt;display =
=3D display;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm-&gt;device_na=
me =3D strdup(device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm-&gt;callbacks=
 =3D callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drm-&gt;user_data=
 =3D user_data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gbm-&gt;displ=
ay =3D display;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gbm-&gt;devic=
e_name =3D strdup(device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gbm-&gt;callb=
acks =3D callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gbm-&gt;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_display_add_gl=
obal(display, &amp;wl_drm_interface, drm, bind_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wl_display_ad=
d_global(display, &amp;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return drm;<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;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">&#43;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; free(drm-&gt;devi=
ce_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; free(gbm-&gt;=
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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; free(drm);<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return buffe=
r-&gt;resource.object.implementation =3D=3D
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; (void (**)(void)) &amp;drm_buffer_interface;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; (void (**)(void)) &amp;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">&nbsp;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">&#43;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return=
 buffer-&gt;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">&nbsp;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">&#43;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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return=
 buffer-&gt;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">&#43;&#43;&#43; 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 &#43;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">&#43;#ifndef WAYLAND_G=
BM_H<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;#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">&nbsp;#include &quot;e=
gldisplay.h&quot;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include &quot;eglimag=
e.h&quot;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -7,9 &#43;7,9 @@<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include &lt;wayland-s=
erver.h&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include &quot;wayland=
-drm-server-protocol.h&quot;<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">&#43;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">&#43;struct wayland_gb=
m_callbacks {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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 &#43;19,20 @=
@ struct wayland_drm_callbacks {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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">&#43;struct wl_gbm *<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;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">&#43;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; 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">&nbsp;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">&#43;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">&nbsp;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">&#43;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">&nbsp;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">&#43;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">&nbsp;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">&#43;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">&nbsp;#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">&#43;&#43;&#43; 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 &#43;13,7 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include &quot;native_=
wayland_drm_bufmgr_helper.h&quot;<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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int32_t widt=
h, int32_t height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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 &#43;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">&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbs=
p;switch (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; pf =3D PIPE_FORMAT_B8G8R8A8_UNORM;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; case WL_=
DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; case=
 WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; pf =3D PIPE_FORMAT_B8G8R8X8_UNORM;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; def=
ault:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -54,7 &#43;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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp; 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 &#43;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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&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">-&nbsp;&nbsp; return w=
ayland_drm_buffer_get_buffer(buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; 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">&nbsp;#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">&#43;&#43;&#43; 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 &#43;23,21 @=
@<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp; * DEALINGS IN T=
HE SOFTWARE.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp; */<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">&#43;#ifndef _NATIVE_W=
AYLAND_GBM_BUFMGR_HELPER_H_<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;#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">&nbsp;#include &quot;w=
ayland-drm.h&quot;<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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int32_t widt=
h, int32_t height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;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">&#43;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">&nbsp;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">&#43;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">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&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">-#endif /* _NATIVE_WAY=
LAND_DRM_BUFMGR_HELPER_H_ */<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;#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">&#43;&#43;&#43; 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 &#43;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">&nbsp;&nbsp;&nbsp; ret=
urn drmAuthMagic(drmdpy-&gt;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">&#43;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">&nbsp;&nbsp;&nbsp; drm=
_display_authenticate,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; egl_g3d_=
wl_drm_helper_reference_buffer,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; egl_g3d_=
wl_drm_helper_unreference_buffer<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; egl_=
g3d_wl_gbm_helper_reference_buffer,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; 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">&nbsp;static boolean<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -209,14 &#43;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">&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp; if (drmd=
py-&gt;wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
drmdpy-&gt;wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; 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">-&nbsp;&nbsp; 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">&#43;&nbsp;&nbsp; drmd=
py-&gt;wl_server_gbm =3D wayland_gbm_init(wl_dpy,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drmdpy-&gt;device_name,<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;wl_drm_callbacks, ndpy);<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43; &nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;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">-&nbsp;&nbsp; if (!drm=
dpy-&gt;wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
!drmdpy-&gt;wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; return FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp; <o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;return TRUE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -228,11 &#43;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">&nbsp;&nbsp;&nbsp; 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">-&nbsp;&nbsp; if (!drm=
dpy-&gt;wl_server_drm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; if (=
!drmdpy-&gt;wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; 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">-&nbsp;&nbsp; wayland_=
drm_uninit(drmdpy-&gt;wl_server_drm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; drmdpy-&=
gt;wl_server_drm =3D NULL;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; wayl=
and_gbm_uninit(drmdpy-&gt;wl_server_gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; drmd=
py-&gt;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">&nbsp;&nbsp;&nbsp;&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 &#43;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">&nbsp;&nbsp;&nbsp; drm=
_display_bind_wayland_display,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&nbsp; &nbsp;&nbsp;drm=
_display_unbind_wayland_display,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-&nbsp;&nbsp; egl_g3d_=
wl_drm_common_wl_buffer_get_resource<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&#43;&nbsp;&nbsp; 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">&nbsp;#endif /* HAVE_W=
AYLAND_BACKEND */<o:p></o:p></span></p>
</div>
</body>
</html>

--_000_81DD1C3FC6BE1E4EAA454D486F820044092366SHSMSX101ccrcorpi_--


More information about the mesa-dev mailing list