[Feature]add MT2731_MP2_MR2_SVN388 baseline version
Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-mediatek/recipes-graphics/wayland/weston/0003-compose-engine-turn-to-pixman-if-gl-init-fail.patch b/meta/meta-mediatek/recipes-graphics/wayland/weston/0003-compose-engine-turn-to-pixman-if-gl-init-fail.patch
new file mode 100644
index 0000000..a4bf921
--- /dev/null
+++ b/meta/meta-mediatek/recipes-graphics/wayland/weston/0003-compose-engine-turn-to-pixman-if-gl-init-fail.patch
@@ -0,0 +1,45 @@
+From 46cee2c18276062d45817fd38fedfa737f16f776 Mon Sep 17 00:00:00 2001
+From: Jia Rong <jia.rong@mediatek.com>
+Date: Fri, 20 Apr 2018 11:23:00 +0800
+Subject: [PATCH 3/9] compose-engine: turn to pixman if gl init fail
+
+if init_gl fail then turn to pixman to compose buffer
+Test: test ok
+
+Change-Id: I18979e4d6cc2d12e51bc12e7be581e919b3166e8
+Signed-off-by: Jia Rong <jia.rong@mediatek.com>
+CR-Id: AUTO00016576
+---
+ libweston/compositor-drm.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
+index 1d38f05..4a5cd67 100644
+--- a/libweston/compositor-drm.c
++++ b/libweston/compositor-drm.c
+@@ -1642,6 +1642,7 @@ init_egl(struct drm_backend *b)
+
+ if (drm_backend_create_gl_renderer(b) < 0) {
+ gbm_device_destroy(b->gbm);
++ b->gbm = NULL;
+ return -1;
+ }
+
+@@ -3261,8 +3262,12 @@ drm_backend_create(struct weston_compositor *compositor,
+ }
+ } else {
+ if (init_egl(b) < 0) {
+- weston_log("failed to initialize egl\n");
+- goto err_udev_dev;
++ weston_log("failed to initialize egl, use pixman\n");
++ if (init_pixman(b) < 0) {
++ weston_log("failed to initialize pixman renderer\n");
++ goto err_udev_dev;
++ }
++ b->use_pixman = 1;
+ }
+ }
+
+--
+1.9.1
+