<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="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.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {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="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Send half of the first patch.<o:p></o:p></span></p>
<p class="MsoNormal">This patch is just term change from drm to gbm in source files.<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">By the way:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I still got the message of “</span>Message body is too big: 164397 bytes with a limit of 128 KB<span style="color:#1F497D">”, though the total size of my patch is 38K.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Anyway, try to send it first.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">diff --git a/src/gallium/state_trackers/egl/drm/native_drm.h b/src/gallium/state_trackers/egl/drm/native_drm.h<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">index 18cebf4..2ef98db 100644<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">--- a/src/gallium/state_trackers/egl/drm/native_drm.h<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+++ b/src/gallium/state_trackers/egl/drm/native_drm.h<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -70,7 +70,7 @@ struct drm_display {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct drm_crtc *saved_crtcs;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> #ifdef HAVE_WAYLAND_BACKEND<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- struct wl_drm *wl_server_drm; /* for EGL_WL_bind_wayland_display */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ struct wl_gbm *wl_server_gbm; /* for EGL_WL_bind_wayland_display */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">#endif<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">diff --git a/src/gallium/state_trackers/egl/wayland/native_drm.c b/src/gallium/state_trackers/egl/wayland/native_drm.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">old mode 100644<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">new mode 100755<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">index e3bd628..6b011ce<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">--- a/src/gallium/state_trackers/egl/wayland/native_drm.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+++ b/src/gallium/state_trackers/egl/wayland/native_drm.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -53,8 +53,8 @@ struct wayland_drm_display {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> const struct native_event_handler *event_handler;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- struct wl_drm *wl_drm;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- struct wl_drm *wl_server_drm; /* for EGL_WL_bind_wayland_display */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ struct wl_gbm *wl_gbm;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ struct wl_gbm *wl_server_gbm; /* for EGL_WL_bind_wayland_display */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> int fd;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> char *device_name;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> boolean authenticated;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -73,8 +73,8 @@ wayland_drm_display_destroy(struct native_display *ndpy)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if (drmdpy->fd)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> close(drmdpy->fd);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (drmdpy->wl_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- wl_drm_destroy(drmdpy->wl_drm);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (drmdpy->wl_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ wl_gbm_destroy(drmdpy->wl_gbm);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if (drmdpy->device_name)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> FREE(drmdpy->device_name);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if (drmdpy->base.configs)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -97,7 +97,7 @@ wayland_create_drm_buffer(struct wayland_display *display,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct pipe_resource *resource;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct winsys_handle wsh;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> uint width, height;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- enum wl_drm_format format;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ enum wl_gbm_format format;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> resource = resource_surface_get_single_resource(surface->rsurf, attachment);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> resource_surface_get_size(surface->rsurf, &width, &height);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -109,22 +109,22 @@ wayland_create_drm_buffer(struct wayland_display *display,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> switch (surface->color_format) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> case PIPE_FORMAT_B8G8R8A8_UNORM:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- format = WL_DRM_FORMAT_ARGB8888;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ format = WL_GBM_FORMAT_ARGB8888;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> case PIPE_FORMAT_B8G8R8X8_UNORM:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- format = WL_DRM_FORMAT_XRGB8888;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ format = WL_GBM_FORMAT_XRGB8888;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> default:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- return wl_drm_create_buffer(drmdpy->wl_drm, wsh.handle,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ return wl_gbm_create_buffer(drmdpy->wl_gbm, wsh.handle,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> width, height, wsh.stride, format);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static void<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-drm_handle_device(void *data, struct wl_drm *drm, const char *device)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+drm_handle_device(void *data, struct wl_gbm *drm, const char *device)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct wayland_drm_display *drmdpy = data;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drm_magic_t magic;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -149,33 +149,33 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drmGetMagic(drmdpy->fd, &magic);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- wl_drm_authenticate(drmdpy->wl_drm, magic);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ wl_gbm_authenticate(drmdpy->wl_gbm, magic);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static void<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+drm_handle_format(void *data, struct wl_gbm *drm, uint32_t format)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct wayland_drm_display *drmdpy = data;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> switch (format) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- case WL_DRM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ case WL_GBM_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drmdpy->base.formats |= HAS_ARGB8888;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- case WL_DRM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ case WL_GBM_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drmdpy->base.formats |= HAS_XRGB8888;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static void<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-drm_handle_authenticated(void *data, struct wl_drm *drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+drm_handle_authenticated(void *data, struct wl_gbm *drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct wayland_drm_display *drmdpy = data;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drmdpy->authenticated = true;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-static const struct wl_drm_listener drm_listener = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+static const struct wl_gbm_listener drm_listener = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drm_handle_device,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drm_handle_format,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> drm_handle_authenticated<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -187,18 +187,18 @@ wayland_drm_display_init_screen(struct native_display *ndpy)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct wayland_drm_display *drmdpy = wayland_drm_display(ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> uint32_t id;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- id = wl_display_get_global(drmdpy->base.dpy, "wl_drm", 1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ id = wl_display_get_global(drmdpy->base.dpy, "wl_gbm", 1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if (id == 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> wl_display_roundtrip(drmdpy->base.dpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- id = wl_display_get_global(drmdpy->base.dpy, "wl_drm", 1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ id = wl_display_get_global(drmdpy->base.dpy, "wl_gbm", 1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if (id == 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- drmdpy->wl_drm = wl_display_bind(drmdpy->base.dpy, id, &wl_drm_interface);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (!drmdpy->wl_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ drmdpy->wl_gbm = wl_display_bind(drmdpy->base.dpy, id, &wl_gbm_interface);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (!drmdpy->wl_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- wl_drm_add_listener(drmdpy->wl_drm, &drm_listener, drmdpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ wl_gbm_add_listener(drmdpy->wl_gbm, &drm_listener, drmdpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> wl_display_roundtrip(drmdpy->base.dpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if (drmdpy->fd == -1)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -238,7 +238,7 @@ wayland_drm_display_authenticate(void *user_data, uint32_t magic)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> current_authenticate = drmdpy->authenticated;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- wl_drm_authenticate(drmdpy->wl_drm, magic);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ wl_gbm_authenticate(drmdpy->wl_gbm, magic);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> wl_display_roundtrip(drmdpy->base.dpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> authenticated = drmdpy->authenticated;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -247,10 +247,10 @@ wayland_drm_display_authenticate(void *user_data, uint32_t magic)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return authenticated ? 0 : -1;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-static struct wayland_drm_callbacks wl_drm_callbacks = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+static struct wayland_gbm_callbacks wl_gbm_callbacks = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> wayland_drm_display_authenticate,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- egl_g3d_wl_drm_helper_reference_buffer,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- egl_g3d_wl_drm_helper_unreference_buffer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ egl_g3d_wl_gbm_helper_reference_buffer,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ egl_g3d_wl_gbm_helper_unreference_buffer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static boolean<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -259,14 +259,14 @@ wayland_drm_display_bind_wayland_display(struct native_display *ndpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct wayland_drm_display *drmdpy = wayland_drm_display(ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (drmdpy->wl_server_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- drmdpy->wl_server_drm =<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- wayland_drm_init(wl_dpy, drmdpy->device_name,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- &wl_drm_callbacks, ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ drmdpy->wl_server_gbm =<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ wayland_gbm_init(wl_dpy, drmdpy->device_name,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ &wl_gbm_callbacks, ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (!drmdpy->wl_server_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (!drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return TRUE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -278,11 +278,11 @@ wayland_drm_display_unbind_wayland_display(struct native_display *ndpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct wayland_drm_display *drmdpy = wayland_drm_display(ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (!drmdpy->wl_server_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (!drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- wayland_drm_uninit(drmdpy->wl_server_drm);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- drmdpy->wl_server_drm = NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ wayland_gbm_uninit(drmdpy->wl_server_gbm);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ drmdpy->wl_server_gbm = NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return TRUE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -290,7 +290,7 @@ wayland_drm_display_unbind_wayland_display(struct native_display *ndpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">static struct native_display_wayland_bufmgr wayland_drm_display_wayland_bufmgr = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> wayland_drm_display_bind_wayland_display,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> wayland_drm_display_unbind_wayland_display,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- egl_g3d_wl_drm_common_wl_buffer_get_resource<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ egl_g3d_wl_gbm_common_wl_buffer_get_resource<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">index 5d7d379..75ef09b 100644<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">--- a/src/gallium/state_trackers/egl/x11/native_dri2.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -62,7 +62,7 @@ struct dri2_display {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct util_hash_table *surfaces;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">#ifdef HAVE_WAYLAND_BACKEND<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- struct wl_drm *wl_server_drm; /* for EGL_WL_bind_wayland_display */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ struct wl_gbm *wl_server_gbm; /* for EGL_WL_bind_wayland_display */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">#endif<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -847,10 +847,10 @@ dri2_display_authenticate(void *user_data, uint32_t magic)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return x11_screen_authenticate(dri2dpy->xscr, magic);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-static struct wayland_drm_callbacks wl_drm_callbacks = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+static struct wayland_gbm_callbacks wl_gbm_callbacks = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> dri2_display_authenticate,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- egl_g3d_wl_drm_helper_reference_buffer,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- egl_g3d_wl_drm_helper_unreference_buffer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ egl_g3d_wl_gbm_helper_reference_buffer,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ egl_g3d_wl_gbm_helper_unreference_buffer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static boolean<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -859,14 +859,14 @@ dri2_display_bind_wayland_display(struct native_display *ndpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct dri2_display *dri2dpy = dri2_display(ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (dri2dpy->wl_server_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (dri2dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- dri2dpy->wl_server_drm = wayland_drm_init(wl_dpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ dri2dpy->wl_server_gbm = wayland_gbm_init(wl_dpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> x11_screen_get_device_name(dri2dpy->xscr),<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- &wl_drm_callbacks, ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ &wl_gbm_callbacks, ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (!dri2dpy->wl_server_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (!dri2dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return TRUE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -878,11 +878,11 @@ dri2_display_unbind_wayland_display(struct native_display *ndpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct dri2_display *dri2dpy = dri2_display(ndpy);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- if (!dri2dpy->wl_server_drm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ if (!dri2dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return FALSE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- wayland_drm_uninit(dri2dpy->wl_server_drm);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- dri2dpy->wl_server_drm = NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ wayland_gbm_uninit(dri2dpy->wl_server_gbm);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ dri2dpy->wl_server_gbm = NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return TRUE;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -890,7 +890,7 @@ dri2_display_unbind_wayland_display(struct native_display *ndpy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">static struct native_display_wayland_bufmgr dri2_display_wayland_bufmgr = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> dri2_display_bind_wayland_display,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> dri2_display_unbind_wayland_display,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- egl_g3d_wl_drm_common_wl_buffer_get_resource<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+ egl_g3d_wl_gbm_common_wl_buffer_get_resource<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> #endif /* HAVE_WAYLAND_BACKEND */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-- <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">1.7.5.4<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
</div>
</body>
</html>