From: Christopher Michael Date: Thu, 21 Mar 2019 18:14:57 +0000 (-0400) Subject: evas drm: Implement support for outbuf_idle_flush X-Git-Tag: submit/tizen/20190402.051338~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4d1a51e0e1825fd2ca02c84728a5607f9437203;p=platform%2Fupstream%2Fefl.git evas drm: Implement support for outbuf_idle_flush --- diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h index 85e16ca..0afb1e3 100644 --- a/src/modules/evas/engines/drm/evas_engine.h +++ b/src/modules/evas/engines/drm/evas_engine.h @@ -83,5 +83,6 @@ void *_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); void _outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage, Evas_Render_Mode render_mode); void _outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage); +void _outbuf_idle_flush(Outbuf *ob); #endif diff --git a/src/modules/evas/engines/drm/evas_outbuf.c b/src/modules/evas/engines/drm/evas_outbuf.c index e30175f..1f22ae7 100644 --- a/src/modules/evas/engines/drm/evas_outbuf.c +++ b/src/modules/evas/engines/drm/evas_outbuf.c @@ -273,8 +273,6 @@ _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth) (ob->depth == depth) && (ob->format == format)) return; - while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE)); - ob->w = w; ob->h = h; ob->depth = depth; @@ -282,7 +280,7 @@ _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth) ob->rotation = rotation; ob->priv.unused_duration = 0; - /* TODO: idle flush */ + _outbuf_idle_flush(ob); } Render_Output_Swap_Mode @@ -572,3 +570,25 @@ _outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage) ecore_drm2_fb_dirty(fb, rects, count); } + +void +_outbuf_idle_flush(Outbuf *ob) +{ + while (ob->priv.pending) + { + RGBA_Image *img; + Eina_Rectangle *rect; + + img = ob->priv.pending->data; + ob->priv.pending = + eina_list_remove_list(ob->priv.pending, ob->priv.pending); + + rect = img->extended_info; + + evas_cache_image_drop(&img->cache_entry); + + eina_rectangle_free(rect); + } + + while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE)); +}