summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-06-05 13:39:41 -0400
committerChris Michael <cp.michael@samsung.com>2015-06-05 13:40:35 -0400
commit50a37e72fc6ba7f64000082917f111a26447257a (patch)
tree6dfe1502656bc3711a007b7f0d254f55bd37c92c
parentceda77750bf976f36117e0fb668973211c5fa991 (diff)
evas-gl-drm: Trap for invalid gbm bo
Summary: If we fail to lock the front buffer, we will not get a valid bo returned so we should not be calling other functions which require a bo. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/evas/engines/gl_drm/evas_outbuf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index 6a9d7b8ded..fcb3c6117b 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -69,6 +69,7 @@ _evas_outbuf_cb_pageflip(void *data)
69 if (!(ob = data)) return; 69 if (!(ob = data)) return;
70 70
71 bo = ob->priv.bo[ob->priv.curr]; 71 bo = ob->priv.bo[ob->priv.curr];
72 if (!bo) return;
72 73
73 fb = _evas_outbuf_fb_get(ob->info->info.dev, bo); 74 fb = _evas_outbuf_fb_get(ob->info->info.dev, bo);
74 if (fb) fb->pending_flip = EINA_FALSE; 75 if (fb) fb->pending_flip = EINA_FALSE;
@@ -85,6 +86,11 @@ _evas_outbuf_buffer_swap(Outbuf *ob, Eina_Rectangle *rects, unsigned int count)
85 Ecore_Drm_Fb *fb; 86 Ecore_Drm_Fb *fb;
86 87
87 ob->priv.bo[ob->priv.curr] = gbm_surface_lock_front_buffer(ob->surface); 88 ob->priv.bo[ob->priv.curr] = gbm_surface_lock_front_buffer(ob->surface);
89 if (!ob->priv.bo[ob->priv.curr])
90 {
91 WRN("Could not lock front buffer: %m");
92 return;
93 }
88 94
89 fb = _evas_outbuf_fb_get(ob->info->info.dev, ob->priv.bo[ob->priv.curr]); 95 fb = _evas_outbuf_fb_get(ob->info->info.dev, ob->priv.bo[ob->priv.curr]);
90 if (fb) 96 if (fb)