[PATCH 2/3] use wayland-gbm to create/destroy wl_buffer
Halley Zhao
halley.zhao at intel.com
Thu Apr 19 02:15:53 PDT 2012
---
src/egl/drivers/dri2/egl_dri2.c | 2 +-
src/egl/wayland/wayland-drm/Makefile.am | 4 +-
src/egl/wayland/wayland-drm/wayland-drm.c | 33 ++++++-----
src/egl/wayland/wayland-drm/wayland-drm.h | 5 +--
src/gallium/state_trackers/egl/drm/native_drm.c | 2 +-
.../state_trackers/egl/wayland/native_drm.c | 2 +-
src/gallium/state_trackers/egl/x11/native_dri2.c | 2 +-
src/gallium/state_trackers/egl/x11/x11_screen.c | 6 ++
src/gallium/state_trackers/egl/x11/x11_screen.h | 3 +
src/gbm/backends/dri/gbm_dri.c | 56 +++++++++++++++++=
+++
src/gbm/main/gbm.c | 14 +++++
src/gbm/main/gbm.h | 5 ++
src/gbm/main/gbmint.h | 4 ++
13 files changed, 114 insertions(+), 24 deletions(-)
mode change 100644 =3D> 100755 src/egl/drivers/dri2/egl_dri2.c
mode change 100644 =3D> 100755 src/egl/wayland/wayland-drm/Makefile.am
mode change 100644 =3D> 100755 src/egl/wayland/wayland-drm/wayland-drm.c
mode change 100644 =3D> 100755 src/gallium/state_trackers/egl/drm/native_dr=
m.c
mode change 100644 =3D> 100755 src/gallium/state_trackers/egl/x11/native_dr=
i2.c
mode change 100644 =3D> 100755 src/gallium/state_trackers/egl/x11/x11_scree=
n.c
mode change 100644 =3D> 100755 src/gallium/state_trackers/egl/x11/x11_scree=
n.h
mode change 100644 =3D> 100755 src/gbm/backends/dri/gbm_dri.c
mode change 100644 =3D> 100755 src/gbm/main/gbm.c
mode change 100644 =3D> 100755 src/gbm/main/gbm.h
mode change 100644 =3D> 100755 src/gbm/main/gbmint.h
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri=
2.c
old mode 100644
new mode 100755
index c9589c1..c6de687
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1321,7 +1321,7 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDis=
play *disp,
(int(*)(void *, uint32_t)) dri2_dpy->authenticate;
dri2_dpy->wl_server_gbm =3D
- wayland_gbm_init(wl_dpy, dri2_dpy->device_name,
+ wayland_gbm_init(wl_dpy, dri2_dpy->device_name, dri2_dpy-=
>fd,
&wl_gbm_callbacks, disp);
if (!dri2_dpy->wl_server_gbm)
diff --git a/src/egl/wayland/wayland-drm/Makefile.am b/src/egl/wayland/wayl=
and-drm/Makefile.am
old mode 100644
new mode 100755
index cf15eda..e7bd7b0
--- a/src/egl/wayland/wayland-drm/Makefile.am
+++ b/src/egl/wayland/wayland-drm/Makefile.am
@@ -1,5 +1,6 @@
AM_CFLAGS =3D -I$(top_srcdir)/src/egl/main \
-I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/gbm/main \
$(DEFINES) \
$(WAYLAND_CFLAGS)
@@ -7,8 +8,9 @@ noinst_LTLIBRARIES =3D libwayland-drm.la
libwayland_drm_la_SOURCES =3D wayland-drm.c wayland-drm-protocol.c
noinst_HEADERS =3D wayland-drm.h
+include_HEADERS =3D wayland-drm-client-protocol.h
+
BUILT_SOURCES =3D wayland-drm-protocol.c \
- wayland-drm-client-protocol.h \
wayland-drm-server-protocol.h
CLEANFILES =3D $(BUILT_SOURCES)
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wa=
yland-drm/wayland-drm.c
old mode 100644
new mode 100755
index a743191..160bc7e
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -35,7 +35,7 @@
#include <wayland-server.h>
#include "wayland-drm.h"
#include "wayland-drm-server-protocol.h"
-
+#include "gbm.h"
/* Git master of Wayland is moving towards a stable version of the
* protocol, but breaking from 0.85 in the process. For the time
* being, it's convenient to be able to build Mesa against both master
@@ -54,6 +54,7 @@ struct wl_gbm {
char *device_name;
struct wayland_gbm_callbacks *callbacks;
+ struct gbm_device *gbm_device;
};
struct wl_gbm_buffer {
@@ -62,6 +63,7 @@ struct wl_gbm_buffer {
uint32_t format;
void *driver_buffer;
+ struct gbm_bo* bo;
};
static void
@@ -70,8 +72,7 @@ destroy_buffer(struct wl_resource *resource)
struct wl_gbm_buffer *buffer =3D resource->data;
struct wl_gbm *gbm =3D buffer->gbm;
- gbm->callbacks->release_buffer(gbm->user_data,
- buffe=
r->driver_buffer);
+ gbm_bo_destroy (buffer->bo);
free(buffer);
}
@@ -107,10 +108,14 @@ gbm_create_buffer(struct wl_client *client, struct wl=
_resource *resource,
{
struct wl_gbm *gbm =3D resource->data;
struct wl_gbm_buffer *buffer;
+ int gbm_format;
switch (format) {
case WL_GBM_FORMAT_ARGB8888:
+ gbm_format =3D GBM_BO_FORMAT_ARGB8888;
+ break;
case WL_GBM_FORMAT_XRGB8888:
+ gbm_format =3D GBM_BO_FORMAT_XRGB8888;
break;
default:
wl_resource_post_error(resource,
@@ -130,17 +135,14 @@ gbm_create_buffer(struct wl_client *client, struct wl=
_resource *resource,
buffer->buffer.height =3D height;
buffer->format =3D format;
- buffer->driver_buffer =3D
- 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_GB=
M_ERROR_INVALID_NAME,
- "inva=
lid name");
- return;
- }
+ buffer->bo =3D gbm_bo_create_from_handle(gbm->gbm_device, name, &(buff=
er->driver_buffer),
+ width, height, stride, gbm_for=
mat, GBM_BO_USE_RENDERING);
+ if (buffer->driver_buffer =3D=3D NULL) {
+ wl_resource_post_error(resource,
+ WL_GBM_ERROR_INVALID_NAME,
+ "invalid name");
+ return;
+ }
buffer->buffer.resource.object.id =3D id;
buffer->buffer.resource.object.interface =3D &wl_buffer_inte=
rface;
@@ -189,7 +191,7 @@ bind_gbm(struct wl_client *client, void *data, uint32_t=
version, uint32_t id)
}
struct wl_gbm *
-wayland_gbm_init(struct wl_display *display, char *device_name,
+wayland_gbm_init(struct wl_display *display, char *device_name, int fd,
struct wayland_gbm_callbacks *callbacks, void *user_data)
{
struct wl_gbm *gbm;
@@ -200,6 +202,7 @@ wayland_gbm_init(struct wl_display *display, char *devi=
ce_name,
gbm->device_name =3D strdup(device_name);
gbm->callbacks =3D callbacks;
gbm->user_data =3D user_data;
+ gbm->gbm_device =3D gbm_create_device(fd);
wl_display_add_global(display, &wl_gbm_interface, gbm, bind=
_gbm);
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.h b/src/egl/wayland/wa=
yland-drm/wayland-drm.h
index 787e00b..0904245 100755
--- a/src/egl/wayland/wayland-drm/wayland-drm.h
+++ b/src/egl/wayland/wayland-drm/wayland-drm.h
@@ -1,9 +1,6 @@
#ifndef WAYLAND_GBM_H
#define WAYLAND_GBM_H
-#include "egldisplay.h"
-#include "eglimage.h"
-
#include <wayland-server.h>
#include "wayland-drm-server-protocol.h"
@@ -20,7 +17,7 @@ struct wayland_gbm_callbacks {
};
struct wl_gbm *
-wayland_gbm_init(struct wl_display *display, char *device_name,
+wayland_gbm_init(struct wl_display *display, char *device_name, int fd,
struct wayland_gbm_callbacks *callbacks, v=
oid *user_data);
void
diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/=
state_trackers/egl/drm/native_drm.c
old mode 100644
new mode 100755
index 95c35e3..4138b6d
--- a/src/gallium/state_trackers/egl/drm/native_drm.c
+++ b/src/gallium/state_trackers/egl/drm/native_drm.c
@@ -213,7 +213,7 @@ drm_display_bind_wayland_display(struct native_display =
*ndpy,
return FALSE;
drmdpy->wl_server_gbm =3D wayland_gbm_init(wl_dpy,
- drmdpy->device_name,
+ drmdpy->device_name, drmdpy->fd,
&wl_gbm_callbacks, ndpy);
if (!drmdpy->wl_server_gbm)
diff --git a/src/gallium/state_trackers/egl/wayland/native_drm.c b/src/gall=
ium/state_trackers/egl/wayland/native_drm.c
index 6b011ce..a96cca8 100755
--- a/src/gallium/state_trackers/egl/wayland/native_drm.c
+++ b/src/gallium/state_trackers/egl/wayland/native_drm.c
@@ -263,7 +263,7 @@ wayland_drm_display_bind_wayland_display(struct native_=
display *ndpy,
return FALSE;
drmdpy->wl_server_gbm =3D
- wayland_gbm_init(wl_dpy, drmdpy->device_name,
+ wayland_gbm_init(wl_dpy, drmdpy->device_name, drmdpy->fd,
&wl_gbm_callbacks, ndpy);
if (!drmdpy->wl_server_gbm)
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium=
/state_trackers/egl/x11/native_dri2.c
old mode 100644
new mode 100755
index 75ef09b..2c38938
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -863,7 +863,7 @@ dri2_display_bind_wayland_display(struct native_display=
*ndpy,
return FALSE;
dri2dpy->wl_server_gbm =3D wayland_gbm_init(wl_dpy,
- x11_screen_get_device_name(dri2dpy->xscr),
+ x11_screen_get_device_name(dri2dpy->xscr), x11_screen_get_dri_fd(=
dri2dpy->xscr),
&wl_gbm_callbacks, ndpy);
if (!dri2dpy->wl_server_gbm)
diff --git a/src/gallium/state_trackers/egl/x11/x11_screen.c b/src/gallium/=
state_trackers/egl/x11/x11_screen.c
old mode 100644
new mode 100755
index f8f9e2a..904dec3
--- a/src/gallium/state_trackers/egl/x11/x11_screen.c
+++ b/src/gallium/state_trackers/egl/x11/x11_screen.c
@@ -321,6 +321,12 @@ x11_screen_get_device_name(struct x11_screen *xscr)
return xscr->dri_device;
}
+int
+x11_screen_get_dri_fd(struct x11_screen *xscr)
+{
+ return xscr->dri_fd;
+}
+
int
x11_screen_authenticate(struct x11_screen *xscr, uint32_t id)
{
diff --git a/src/gallium/state_trackers/egl/x11/x11_screen.h b/src/gallium/=
state_trackers/egl/x11/x11_screen.h
old mode 100644
new mode 100755
index ad7aa97..16bc1a6
--- a/src/gallium/state_trackers/egl/x11/x11_screen.h
+++ b/src/gallium/state_trackers/egl/x11/x11_screen.h
@@ -100,6 +100,9 @@ x11_screen_enable_dri2(struct x11_screen *xscr,
char *
x11_screen_get_device_name(struct x11_screen *xscr);
+int
+x11_screen_get_dri_fd(struct x11_screen *xscr);
+
int
x11_screen_authenticate(struct x11_screen *xscr, uint32_t id);
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.=
c
old mode 100644
new mode 100755
index 4df6e8f..f31e92c
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -381,6 +381,61 @@ gbm_dri_bo_create_from_egl_image(struct gbm_device *gb=
m,
}
static struct gbm_bo *
+gbm_dri_bo_create_from_name(struct gbm_device *gbm,
+ int name, void **image ,
+ uint32_t width, uint32_t height, uint32_t=
stride,
+ uint32_t format, uint32_t usage)
+{
+ struct gbm_dri_device *dri =3D gbm_dri_device(gbm);
+ struct gbm_dri_bo *bo;
+ unsigned dri_use =3D 0;
+ int dri_format;
+
+ bo =3D calloc(1, sizeof *bo);
+ if (bo =3D=3D NULL)
+ return NULL;
+
+ bo->base.base.gbm =3D gbm;
+ bo->base.base.width =3D width;
+ bo->base.base.height =3D height;
+
+ switch (format) {
+ case GBM_BO_FORMAT_XRGB8888:
+ dri_format =3D __DRI_IMAGE_FORMAT_XRGB8888;
+ break;
+ case GBM_BO_FORMAT_ARGB8888:
+ dri_format =3D __DRI_IMAGE_FORMAT_ARGB8888;
+ break;
+ default:
+ return NULL;
+ }
+
+ bo->image =3D dri->image->createImageFromName(dri->screen,
+ width, height,
+ dri_format, name, stride / 4,
+ NULL);
+ *image =3D bo->image;
+
+ if (usage & GBM_BO_USE_SCANOUT)
+ dri_use |=3D __DRI_IMAGE_USE_SCANOUT;
+ if (usage & GBM_BO_USE_CURSOR_64X64)
+ dri_use |=3D __DRI_IMAGE_USE_CURSOR;
+
+ if (dri->image->base.version >=3D 2 &&
+ !dri->image->validateUsage(bo->image, dri_use)) {
+ free(bo);
+ return NULL;
+ }
+
+ dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_HANDLE,
+ &bo->base.base.handle.s32);
+ dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_STRIDE,
+ (int *) &bo->base.base.pitch);
+
+ return &bo->base.base;
+}
+
+static struct gbm_bo *
gbm_dri_bo_create(struct gbm_device *gbm,
uint32_t width, uint32_t height,
uint32_t format, uint32_t usage)
@@ -490,6 +545,7 @@ dri_device_create(int fd)
dri->base.base.fd =3D fd;
dri->base.base.bo_create =3D gbm_dri_bo_create;
dri->base.base.bo_create_from_egl_image =3D gbm_dri_bo_create_from_egl_=
image;
+ dri->base.base.bo_create_from_handle =3D gbm_dri_bo_create_from_name;
dri->base.base.is_format_supported =3D gbm_dri_is_format_supported;
dri->base.base.bo_destroy =3D gbm_dri_bo_destroy;
dri->base.base.destroy =3D dri_destroy;
diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
old mode 100644
new mode 100755
index 79ba650..da7f85f
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -406,3 +406,17 @@ gbm_surface_has_free_buffers(struct gbm_surface *surf)
{
return surf->gbm->surface_has_free_buffers(surf);
}
+
+GBM_EXPORT struct gbm_bo *
+gbm_bo_create_from_handle(struct gbm_device *gbm,
+ int name, void **image/*temp out*/,
+ uint32_t width, uint32_t height,uint32_t =
stride,
+ uint32_t format, uint32_t usage)
+{
+ if (width =3D=3D 0 || height =3D=3D 0 || name =3D=3D 0)
+ return NULL;
+
+ return gbm->bo_create_from_handle(gbm, name, image, width, height, str=
ide, format, usage);
+
+}
+
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
old mode 100644
new mode 100755
index 6748752..8f422ad
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -229,6 +229,11 @@ gbm_bo_create_from_egl_image(struct gbm_device *gbm,
void *egl_dpy, void *egl_img,
uint32_t width, uint32_t height,
uint32_t usage);
+struct gbm_bo *
+gbm_bo_create_from_handle(struct gbm_device *gbm,
+ int name, void **image,
+ uint32_t width, uint32_t height, uint32_t=
stride,
+ uint32_t format, uint32_t usage);
uint32_t
gbm_bo_get_width(struct gbm_bo *bo);
diff --git a/src/gbm/main/gbmint.h b/src/gbm/main/gbmint.h
old mode 100644
new mode 100755
index 53d73f4..e303c3a
--- a/src/gbm/main/gbmint.h
+++ b/src/gbm/main/gbmint.h
@@ -70,6 +70,10 @@ struct gbm_device {
void *egl_dpy, void *egl_img=
,
uint32_t width, uint32_t hei=
ght,
uint32_t usage);
+ struct gbm_bo *(*bo_create_from_handle)(struct gbm_device *gbm,
+ uint32_t handle, void **imag=
e/* temp out */,
+ uint32_t width, uint32_t hei=
ght, uint32_t stride,
+ uint32_t format, uint32_t us=
age);
void (*bo_destroy)(struct gbm_bo *bo);
struct gbm_surface *(*surface_create)(struct gbm_device *gbm,
--
1.7.5.4
--_000_81DD1C3FC6BE1E4EAA454D486F8200440923B5SHSMSX101ccrcorpi_
Content-Type: text/html; charset="us-ascii"
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=3Dus-ascii"=
>
<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.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;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{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"><span style=3D"color:#1F497D">Use gbm to create/dest=
roy wl_buffer<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">From 089bbc3be3050ac76=
110320cdca62461bbacd870 Mon Sep 17 00:00:00 2001<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">From: Halley Zhao <=
halley.zhao at intel.com><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">Date: Thu, 19 Apr 2012=
17:15:53 +0800<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">Subject: [PATCH 2/3] u=
se wayland-gbm to create/destroy wl_buffer<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">---<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/drivers/dri2/e=
gl_dri2.c =
| 2 +=
;-<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/wayland/waylan=
d-drm/Makefile.am &nbs=
p; | 4 +-<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/wayland/waylan=
d-drm/wayland-drm.c |=
33 ++++++-----<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/egl/wayland/waylan=
d-drm/wayland-drm.h |=
5 +--<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 | 2 +-<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">.../state_trackers/egl=
/wayland/native_drm.c | &nbs=
p; 2 +-<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 | 2 +-<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gallium/state_trac=
kers/egl/x11/x11_screen.c | 6 ++=
;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gallium/state_trac=
kers/egl/x11/x11_screen.h | 3 +<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gbm/backends/dri/g=
bm_dri.c &=
nbsp; | 56 +=
;+++++++++++++++=
;++++<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gbm/main/gbm.c&nbs=
p; &=
nbsp; &nbs=
p; | 14 ++++=
;+<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gbm/main/gbm.h&nbs=
p; &=
nbsp; &nbs=
p; | 5 ++<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">src/gbm/main/gbmint.h&=
nbsp; &nbs=
p; &=
nbsp; | 4 ++<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">13 files changed, 114 =
insertions(+), 24 deletions(-)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/egl/drivers/dri2/egl_dri2.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/egl/wayland/wayland-drm/Makefile.am<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/egl/wayland/wayland-drm/wayland-drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gallium/state_trackers/egl/drm/native_drm.c<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gallium/state_trackers/egl/x11/native_dri2.c<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gallium/state_trackers/egl/x11/x11_screen.c<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gallium/state_trackers/egl/x11/x11_screen.h<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gbm/backends/dri/gbm_dri.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gbm/main/gbm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gbm/main/gbm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">mode change 100644 =3D=
> 100755 src/gbm/main/gbmint.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/d=
rivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">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 c9589c1..c6de687=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/drivers/=
dri2/egl_dri2.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/drivers/dri2/egl_dri2.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1321,7 +1321,7=
@@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; (int(*)(void *, uint32_t)) dri2_dpy->authenticate;<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;dri2_dpy->wl_server_gbm =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wayl=
and_gbm_init(wl_dpy, dri2_dpy->device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; =
wayland_gbm_init(wl_dpy, dri2_dpy->device_name, dri2_dpy->fd,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p;&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"> &nbs=
p;if (!dri2_dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/egl/w=
ayland/wayland-drm/Makefile.am b/src/egl/wayland/wayland-drm/Makefile.am<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 cf15eda..e7bd7b0=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/wayland/=
wayland-drm/Makefile.am<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/wayland/wayland-drm/Makefile.am<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1,5 +1,6 @@<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">AM_CFLAGS =3D -I$(top_=
srcdir)/src/egl/main \<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
-I$(top_srcdir)/include \<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &=
nbsp; -I$(top_srcdir)/src/gbm/main \<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
$(DEFINES) \<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; =
$(WAYLAND_CFLAGS)
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> <o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -7,8 +8,9 @@ no=
inst_LTLIBRARIES =3D libwayland-drm.la<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">libwayland_drm_la_SOUR=
CES =3D wayland-drm.c wayland-drm-protocol.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">noinst_HEADERS =3D way=
land-drm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+include_HEADERS =
=3D wayland-drm-client-protocol.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">BUILT_SOURCES =3D wayl=
and-drm-protocol.c \<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; wayland-drm-client-protocol.h \<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; wayland-drm-server-protocol.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">CLEANFILES =3D $(BUILT=
_SOURCES)<o:p></o:p></span></p>
<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.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">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 a743191..160bc7e=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/wayland/=
wayland-drm/wayland-drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/wayland/wayland-drm/wayland-drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -35,7 +35,7 @@<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include <wayland-s=
erver.h><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include "wayland=
-drm.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include "wayland=
-drm-server-protocol.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+#include "gb=
m.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">/* Git master of Wayla=
nd is moving towards a stable version of the<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> * protocol, but=
breaking from 0.85 in the process. For the time<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> * being, it's c=
onvenient to be able to build Mesa against both master<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -54,6 +54,7 @@ =
struct wl_gbm {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; char *device=
_name;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; struct=
wayland_gbm_callbacks *callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct gbm_device *gbm_device;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> struct wl_gbm_bu=
ffer {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -62,6 +63,7 @@ =
struct wl_gbm_buffer {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; uint32_t for=
mat;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; void *=
driver_buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; struct gbm_bo* bo;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">};<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static void<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -70,8 +72,7 @@ =
destroy_buffer(struct wl_resource *resource)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; struct wl_gb=
m_buffer *buffer =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; struct wl_gb=
m *gbm =3D buffer->gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; gbm->callbacks=
->release_buffer(gbm->user_data,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp;  =
; buffer->driver_buffer);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm_bo_destroy (buffer->bo);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; free(buffer)=
;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -107,10 +108,14=
@@ gbm_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"> &nbs=
p; struct wl_gb=
m *gbm =3D resource->data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; struct wl_gb=
m_buffer *buffer;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; int gbm_format;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; switch=
(format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; case WL_GBM_=
FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm_format =3D GBM_BO_FORMAT_ARGB8888;<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; case WL_GBM_=
FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm_format =3D GBM_BO_FORMAT_XRGB8888;<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; default:<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -130,17 +135,14=
@@ gbm_create_buffer(struct wl_client *client, struct wl_resource *resourc=
e,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.height =3D height;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->f=
ormat =3D format;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; buffer->driver=
_buffer =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; gbm->callbacks->reference_buffer(gbm->user_data, name,<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp; =
&nb=
sp; =
width, height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp; =
&nb=
sp; =
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">- &nb=
sp; if (buffer->dr=
iver_buffer =3D=3D NULL) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; wl_resource_post_error(resource,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp;  =
; WL_GBM_ERROR_INVALID_NAME,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; =
&nb=
sp;  =
; "invalid name");<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; =
&nb=
sp; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; }<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; buffer->bo =3D gbm_bo_create_from_handle(gbm->gbm_device, name, &am=
p;(buffer->driver_buffer),<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp; width, height, stride, gbm_format, GBM_BO_USE_RENDERING);<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; if (buffer->driver_buffer =3D=3D NULL) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wl_resource_post_error(resource,<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; WL_GBM_ERROR_INVALID_NAME,<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; "invalid name");<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; return;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ &nbs=
p;}<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer=
->buffer.resource.object.id =3D id;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; buffer->b=
uffer.resource.object.interface =3D &wl_buffer_interface;<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -189,7 +191,7 @=
@ bind_gbm(struct wl_client *client, void *data, uint32_t version, 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"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> struct wl_gbm *<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_gbm_init(stru=
ct wl_display *display, char *device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_init(=
struct wl_display *display, char *device_name, int fd,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
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"> &nbs=
p; struct wl_gb=
m *gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -200,6 +202,7 @=
@ 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"> &nbs=
p; gbm->devi=
ce_name =3D strdup(device_name);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; gbm->call=
backs =3D callbacks;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; gbm->user=
_data =3D user_data;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; gbm->gbm_device =3D gbm_create_device(fd);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; wl_dis=
play_add_global(display, &wl_gbm_interface, gbm, bind_gbm);<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">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">index 787e00b..0904245=
100755<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/egl/wayland/=
wayland-drm/wayland-drm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
egl/wayland/wayland-drm/wayland-drm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -1,9 +1,6 @@<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#ifndef WAYLAND_GBM_H<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#define WAYLAND_GBM_H<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-#include "egldis=
play.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-#include "eglima=
ge.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include <wayland-s=
erver.h><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">#include "wayland=
-drm-server-protocol.h"<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -20,7 +17,7 @@ =
struct wayland_gbm_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_gbm *<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">-wayland_gbm_init(stru=
ct wl_display *display, char *device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+wayland_gbm_init(=
struct wl_display *display, char *device_name, int fd,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; struct wayland_gbm_callbacks *callbacks, void *user_da=
ta);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> void<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">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">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 95c35e3..4138b6d=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/drm/native_drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/drm/native_drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -213,7 +213,7 @=
@ drm_display_bind_wayland_display(struct native_display *ndpy,<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;drmdpy->wl_server_gbm =3D wayland_gbm_init(wl_dpy,<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; drmdpy->device_name,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; drmdpy->device_name, drmdpy->fd,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &wl_gbm_callbacks, ndpy);<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;if (!drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/galli=
um/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=3D"MsoNormal"><span style=3D"color:#1F497D">index 6b011ce..a96cca8=
100755<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/wayland/native_drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/wayland/native_drm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -263,7 +263,7 @=
@ wayland_drm_display_bind_wayland_display(struct native_display *ndpy,<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;drmdpy->wl_server_gbm =3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; wayland_gbm_init(wl_dpy, drmdpy->device_name,<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; wayland_gbm_init(wl_dpy, drmdpy->device_name, drmdpy->f=
d,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &wl_gbm_callbacks, 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"> &nbs=
p;if (!drmdpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/galli=
um/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x1=
1/native_dri2.c<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 75ef09b..2c38938=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/x11/native_dri2.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/x11/native_dri2.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -863,7 +863,7 @=
@ dri2_display_bind_wayland_display(struct native_display *ndpy,<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; return FALSE;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;dri2dpy->wl_server_gbm =3D wayland_gbm_init(wl_dpy,<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">- &nb=
sp; x11_screen_get_device_name(dri2dpy->xscr),<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; x11_screen_get_device_name(dri2dpy->xscr=
), x11_screen_get_dri_fd(dri2dpy->xscr),
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &wl_gbm_callbacks, ndpy);<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;if (!dri2dpy->wl_server_gbm)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/galli=
um/state_trackers/egl/x11/x11_screen.c b/src/gallium/state_trackers/egl/x11=
/x11_screen.c<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 f8f9e2a..904dec3=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/x11/x11_screen.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/x11/x11_screen.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -321,6 +321,12 =
@@ x11_screen_get_device_name(struct x11_screen *xscr)<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> ret=
urn xscr->dri_device;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">}<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+int <o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+x11_screen_get_dr=
i_fd(struct x11_screen *xscr)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+{<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ retu=
rn xscr->dri_fd;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+}<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">int<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">x11_screen_authenticat=
e(struct x11_screen *xscr, 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">diff --git a/src/galli=
um/state_trackers/egl/x11/x11_screen.h b/src/gallium/state_trackers/egl/x11=
/x11_screen.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 ad7aa97..16bc1a6=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gallium/stat=
e_trackers/egl/x11/x11_screen.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gallium/state_trackers/egl/x11/x11_screen.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -100,6 +100,9 @=
@ x11_screen_enable_dri2(struct x11_screen *xscr,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">char *<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">x11_screen_get_device_=
name(struct x11_screen *xscr);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+int <o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+x11_screen_get_dr=
i_fd(struct x11_screen *xscr);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">int<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">x11_screen_authenticat=
e(struct x11_screen *xscr, 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">diff --git a/src/gbm/b=
ackends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c<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 4df6e8f..f31e92c=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gbm/backends=
/dri/gbm_dri.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gbm/backends/dri/gbm_dri.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -381,6 +381,61 =
@@ gbm_dri_bo_create_from_egl_image(struct gbm_device *gbm,<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"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> static struct gb=
m_bo *<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+gbm_dri_bo_create=
_from_name(struct gbm_device *gbm,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; int name, void **image ,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; uint32_t width, uint32_t height, uint32_t stride,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; uint32_t format, uint32_t usage)<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+{<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ stru=
ct gbm_dri_device *dri =3D gbm_dri_device(gbm);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ stru=
ct gbm_dri_bo *bo;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ unsi=
gned dri_use =3D 0;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ int =
dri_format;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ bo =
=3D calloc(1, sizeof *bo);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
bo =3D=3D NULL)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; 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">+ bo-&=
gt;base.base.gbm =3D gbm;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ bo-&=
gt;base.base.width =3D width;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ bo-&=
gt;base.base.height =3D 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">+ swit=
ch (format) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
GBM_BO_FORMAT_XRGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri_format =3D __DRI_IMAGE_FORMAT_XRGB8888;<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ case=
GBM_BO_FORMAT_ARGB8888:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri_format =3D __DRI_IMAGE_FORMAT_ARGB8888;<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; break;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ defa=
ult:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; 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">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; bo->image =3D dri->image->createImageFromName(dri->screen,<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; width, height,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; dri_format, name, stride / 4,<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; NULL);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; *image =3D bo->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">+ if (=
usage & GBM_BO_USE_SCANOUT)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri_use |=3D __DRI_IMAGE_USE_SCANOUT;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
usage & GBM_BO_USE_CURSOR_64X64)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; dri_use |=3D __DRI_IMAGE_USE_CURSOR;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ if (=
dri->image->base.version >=3D 2 &&<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; !dri->image->validateUsage(bo->image, dri_use)=
) {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; free(bo);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; 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">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri-=
>image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_HANDLE,<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; &bo->base=
.base.handle.s32);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri-=
>image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_STRIDE,<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp; (int *) &bo-=
>base.base.pitch);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ retu=
rn &bo->base.base;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+}<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+static struct gbm=
_bo *<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">gbm_dri_bo_create(stru=
ct gbm_device *gbm,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; uint32_t width, uint32_t height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; uint32_t format, uint32_t usage)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -490,6 +545,7 @=
@ dri_device_create(int fd)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
->base.base.fd =3D fd;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
->base.base.bo_create =3D gbm_dri_bo_create;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
->base.base.bo_create_from_egl_image =3D gbm_dri_bo_create_from_egl_imag=
e;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ dri-=
>base.base.bo_create_from_handle =3D gbm_dri_bo_create_from_name;<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
->base.base.is_format_supported =3D gbm_dri_is_format_supported;<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
->base.base.bo_destroy =3D gbm_dri_bo_destroy;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> dri=
->base.base.destroy =3D dri_destroy;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/gbm/m=
ain/gbm.c b/src/gbm/main/gbm.c<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 79ba650..da7f85f=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gbm/main/gbm=
.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gbm/main/gbm.c<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -406,3 +406,17 =
@@ gbm_surface_has_free_buffers(struct gbm_surface *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"> ret=
urn surf->gbm->surface_has_free_buffers(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">+<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+GBM_EXPORT struct=
gbm_bo *<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+gbm_bo_create_fro=
m_handle(struct gbm_device *gbm,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; int name, void **image/*temp out*/,<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; uint32_t width, uint32_t height,uint32_t stride,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; uint32_t format, uint32_t usage)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+{<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; if (width =3D=3D 0 || height =3D=3D 0 || name =3D=3D 0)<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; 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">+  =
; return gbm->bo_create_from_handle(gbm, name, image, width, height, str=
ide, format, usage);<o:p></o:p></span></p>
<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></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">diff --git a/src/gbm/m=
ain/gbm.h b/src/gbm/main/gbm.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 6748752..8f422ad=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gbm/main/gbm=
.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gbm/main/gbm.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -229,6 +229,11 =
@@ gbm_bo_create_from_egl_image(struct gbm_device *gbm,<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; void *egl_dpy, void *egl_img,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; uint32_t width, uint32_t height,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; uint32_t usage);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+struct gbm_bo *<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+gbm_bo_create_fro=
m_handle(struct gbm_device *gbm,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; int name, void **image,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; uint32_t width, uint32_t height, uint32_t stride,=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; uint32_t format, uint32_t usage);<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"> uint32_t<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">gbm_bo_get_width(struc=
t gbm_bo *bo);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">diff --git a/src/gbm/m=
ain/gbmint.h b/src/gbm/main/gbmint.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 53d73f4..e303c3a=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">--- a/src/gbm/main/gbm=
int.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+++ b/src/=
gbm/main/gbmint.h<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">@@ -70,6 +70,10 @@=
struct gbm_device {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; void *egl_dpy, void *egl_img,<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; uint32_t width, uint32_t height,<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; uint32_t usage);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+ stru=
ct gbm_bo *(*bo_create_from_handle)(struct gbm_device *gbm,<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp; uint32_t handle, void **image/* temp out */,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp; uint32_t width, uint32_t height, uint32_t stri=
de,
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">+  =
; &n=
bsp;  =
; &n=
bsp; uint32_t format, uint32_t usage);<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> voi=
d (*bo_destroy)(struct gbm_bo *bo);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"> &nbs=
p;struct gbm_surface *(*surface_create)(struct gbm_device *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">1.7.5.4<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p> </o:p></spa=
n></p>
</div>
</body>
</html>
--_000_81DD1C3FC6BE1E4EAA454D486F8200440923B5SHSMSX101ccrcorpi_--
More information about the mesa-dev
mailing list