move the position of the code 37/207837/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 13 Jun 2019 07:01:58 +0000 (16:01 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 13 Jun 2019 07:04:10 +0000 (16:04 +0900)
Change-Id: I43fb58e6744ceef47003ea9aeec67bc56063b852

src/tdm_exynos.c
src/tdm_exynos.h
src/tdm_exynos_types.h

index a37c39886c212173ef54331cc6c4d706efb01b01..9adcb7cda79bd5c132e16964630e9b2f3c2f90b4 100644 (file)
@@ -152,6 +152,26 @@ tdm_exynos_init(tdm_display *dpy, tdm_error *error)
        LIST_INITHEAD(&exynos_data->output_list);
        LIST_INITHEAD(&exynos_data->buffer_list);
 
+       exynos_data->dpy = dpy;
+       exynos_data->drm_fd = -1;
+
+       /* The drm master fd can be opened by a tbm backend module in
+        * tbm_bufmgr_init() time. In this case, we just get it from tbm.
+        */
+       exynos_data->drm_fd = tbm_drm_helper_get_master_fd();
+       if (exynos_data->drm_fd < 0) {
+               exynos_data->drm_fd = _tdm_exynos_open_drm();
+
+               if (exynos_data->drm_fd < 0) {
+                       ret = TDM_ERROR_OPERATION_FAILED;
+                       goto failed_l;
+               }
+
+               tbm_drm_helper_set_tbm_master_fd(exynos_data->drm_fd);
+       }
+
+       TDM_INFO("master fd: %d", exynos_data->drm_fd);
+
        memset(&exynos_func_display, 0, sizeof(exynos_func_display));
        exynos_func_display.display_get_capability = exynos_display_get_capabilitiy;
        exynos_func_display.display_get_pp_capability = exynos_display_get_pp_capability;
@@ -263,26 +283,6 @@ tdm_exynos_init(tdm_display *dpy, tdm_error *error)
        if (ret != TDM_ERROR_NONE)
                goto failed_l;
 
-       exynos_data->dpy = dpy;
-       exynos_data->drm_fd = -1;
-
-       /* The drm master fd can be opened by a tbm backend module in
-        * tbm_bufmgr_init() time. In this case, we just get it from tbm.
-        */
-       exynos_data->drm_fd = tbm_drm_helper_get_master_fd();
-       if (exynos_data->drm_fd < 0) {
-               exynos_data->drm_fd = _tdm_exynos_open_drm();
-
-               if (exynos_data->drm_fd < 0) {
-                       ret = TDM_ERROR_OPERATION_FAILED;
-                       goto failed_l;
-               }
-
-               tbm_drm_helper_set_tbm_master_fd(exynos_data->drm_fd);
-       }
-
-       TDM_INFO("master fd: %d", exynos_data->drm_fd);
-
 #if 0
        if (drmSetClientCap(exynos_data->drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1) < 0)
                TDM_WRN("Set DRM_CLIENT_CAP_UNIVERSAL_PLANES failed_l");
index 438c8a63322f604d3dde0020274df6eba540407d..98007c721f1272fd7516c96e11735b2e3f1a778d 100644 (file)
@@ -21,6 +21,7 @@
 #include <tdm_log.h>
 #include <tdm_list.h>
 #include "exynos_pp.h"
+
 #if 1
 #include "exynos9110_decon-fb.h"
 #else
index 82995241010169d67d5e2dad862ed6d12b783642..439a2a4dc8e164de144d75b1b57670ab2c68cc42 100644 (file)
@@ -217,6 +217,10 @@ struct _tdm_exynos_layer_data {
        tdm_layer_capability capabilities;
        int zpos;
 
+       //list of exynos formats
+       int format_count;
+       tbm_format *formats;
+
        /* not fixed data below */
        tdm_info_layer info;
        int info_changed;
@@ -228,9 +232,6 @@ struct _tdm_exynos_layer_data {
        struct decon_win_config win_cfg;
        int enabled_flag;
 
-       tbm_format *formats;
-       int format_count;
-
        tdm_prop *props;
        int prop_count;
 };