blob: 13d3edbd01a055f5e32fc05d31fe9455e6ab45fa [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001From 621569253b34788e096adda8132010d0a17d0844 Mon Sep 17 00:00:00 2001
2From: Qian Hu <Qian.Hu@mediatek.com>
3Date: Tue, 24 Sep 2019 11:31:09 +0800
4Subject: [PATCH 3/8] [PATCH 3/9] compose-engine: turn to pixman if gl init
5 fail
6
7if init_gl fail then turn to pixman to compose buffer
8
9Signed-off-by: Qian Hu <Qian.Hu@mediatek.com>
10---
11 libweston/compositor-drm.c | 9 +++++++--
12 1 file changed, 7 insertions(+), 2 deletions(-)
13
14diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
15index 3891176..ef38a64 100644
16--- a/libweston/compositor-drm.c
17+++ b/libweston/compositor-drm.c
18@@ -3921,6 +3921,7 @@ init_egl(struct drm_backend *b)
19
20 if (drm_backend_create_gl_renderer(b) < 0) {
21 gbm_device_destroy(b->gbm);
22+ b->gbm = NULL;
23 return -1;
24 }
25
26@@ -6766,8 +6767,12 @@ drm_backend_create(struct weston_compositor *compositor,
27 }
28 } else {
29 if (init_egl(b) < 0) {
30- weston_log("failed to initialize egl\n");
31- goto err_udev_dev;
32+ weston_log("failed to initialize egl, use pixman\n");
33+ if (init_pixman(b) < 0) {
34+ weston_log("failed to initialize pixman renderer\n");
35+ goto err_udev_dev;
36+ }
37+ b->use_pixman = 1;
38 }
39 }
40
41--
422.6.4
43