evas-engine-drm: Fix drm engine breakage from Frenchie
authorChris Michael <cp.michael@samsung.com>
Tue, 8 Jul 2014 16:16:07 +0000 (12:16 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 8 Jul 2014 16:20:42 +0000 (12:20 -0400)
We need to have the drm fd & tty setup Prior to creating the output
buffer so that the output buffer knows what drm card to use

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/engines/drm/evas_engine.c

index 41dd8ab..e87f96e 100644 (file)
@@ -26,9 +26,17 @@ _output_setup(Evas_Engine_Info_Drm *info, int w, int h)
    Render_Engine *re;
    Outbuf *ob;
 
+   /* if we have no drm device, get one */
+   if (info->info.fd < 0)
+     {
+        /* try to init drm (this includes openening the card & tty) */
+        if (!evas_drm_init(info, 0))
+          goto on_error;
+     }
+
    /* try to allocate space for our render engine structure */
    if (!(re = calloc(1, sizeof(Render_Engine))))
-     return NULL;
+     goto on_error;
 
    /* try to create new outbuf */
    if (!(ob = evas_outbuf_setup(info, w, h)))
@@ -48,14 +56,6 @@ _output_setup(Evas_Engine_Info_Drm *info, int w, int h)
                                                 w, h))
      goto on_error;
 
-   /* if we have no drm device, get one */
-   if (info->info.fd < 0)
-     {
-        /* try to init drm (this includes openening the card & tty) */
-        if (!evas_drm_init(info))
-          goto on_error;
-     }
-
    /* return the allocated render_engine structure */
    return re;