ecore_drm: do not allocate the drm_dumb memory 48/89648/2
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 20 Sep 2016 11:37:33 +0000 (20:37 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 26 Sep 2016 08:22:56 +0000 (01:22 -0700)
Change-Id: I9b86d7259b3bd0c7c8e52b91688d785b4d685266

packaging/efl.spec
src/lib/ecore_drm/ecore_drm_fb.c

index dbcef45..e886827 100755 (executable)
@@ -1,5 +1,6 @@
 %bcond_with wayland
 %bcond_with x
+%bcond_with emulator
 
 Name:           efl
 Version:        1.16.0
@@ -684,6 +685,10 @@ cp %{SOURCE1001} .
 CFLAGS+=" -DMESA_EGL_NO_X11_HEADERS "
 %endif
 
+%if %{with emulator}
+CFLAGS+=" -DEFL_FEATURE_EMULATOR "
+%endif
+
 %reconfigure \
     --with-glib=always \
     --disable-xim \
index a992562..10a8da6 100644 (file)
@@ -65,6 +65,11 @@ ecore_drm_fb_create(Ecore_Drm_Device *dev, int width, int height)
    EINA_SAFETY_ON_NULL_RETURN_VAL(dev, NULL);
    EINA_SAFETY_ON_TRUE_RETURN_VAL((width < 1) || (height < 1), NULL);
 
+// ecore_drm_fb creates the Ecore_Drm_Fb from only TDM, not from drm dumb except emulator.
+// emulator supports only drm dumb memory to display the images on the screen.
+#ifndef EFL_FEATURE_EMULATOR
+   return _ecore_drm_display_fb_create(dev, width, height);
+#else
 #ifdef HAVE_TDM
    drmVersionPtr ver = drmGetVersion(ecore_drm_device_fd_get(dev));
    if (ver)
@@ -148,6 +153,7 @@ add_err:
 create_err:
    free(fb);
    return NULL;
+#endif // EFL_FEATURE_EMULATOR
 }
 
 EAPI void