display: Disabled tdm_display_init(). 26/169626/1 accepted/tizen/unified/20180208.163712 submit/tizen/20180208.053156
authorjoonbum.ko <joonbum.ko@samsung.com>
Thu, 8 Feb 2018 04:33:03 +0000 (13:33 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Thu, 8 Feb 2018 04:33:06 +0000 (13:33 +0900)
     - Currently, the Tizen platform does not support D2D mode.
     - So calling tdm_display_init() is always failed.
     - If Tizen will be possible D2D mode later, will need to add some codes about tdm_display.

Change-Id: I3fb71e51779d1f06df5cf706bf97338055a56ecd
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
src/wsi/display.c

index 9e503b6..acb2795 100644 (file)
@@ -166,30 +166,15 @@ vk_physical_device_init_display(vk_physical_device_t *pdev)
        tdm_error                        err;
        int                                      output_count, i;
 
+       /* Cannot support the feature direct display */
        pdev->tdm_display = NULL;
        pdev->display_count = 0;
        pdev->plane_count = 0;
 
-       /* Initialize TDM display. */
-       pdev->tdm_display = tdm_display_init(&err);
-       VK_CHECK(err == TDM_ERROR_NONE, goto error, "tdm_display_init() failed.\n");
-
-       /* Get total output count. */
-       err = tdm_display_get_output_count(pdev->tdm_display, &output_count);
-       VK_CHECK(err == TDM_ERROR_NONE, goto error, "tdm_display_get_output_count() failed.\n");
-
-       /* Add TDM outputs. */
-       for (i = 0; i < output_count; i++) {
-               tdm_output *output = tdm_display_get_output(pdev->tdm_display, i, &err);
-               VK_CHECK(err == TDM_ERROR_NONE, goto error, "tdm_display_get_output() failed.\n");
-               add_tdm_output(pdev, output);
-       }
-
+       /* Currently, the Tizen platform does not support D2D mode.
+        * We will need tdm_display_init() in this part if wsi will be supporting it later.
+        */
        return VK_TRUE;
-
-error:
-       vk_physical_device_fini_display(pdev);
-       return VK_FALSE;
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL
@@ -356,6 +341,8 @@ vk_GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice                           pdev,
        vk_display_plane_t              *plane = &phydev->planes[plane_index];
        vk_display_t                    *disp = plane->current_display;
 
+       VK_CHECK(disp->tdm_output != NULL, return VK_ERROR_DEVICE_LOST, "tdm_output_get_available_size failed.\n");
+
        tdm_err = tdm_output_get_available_size(disp->tdm_output, &min_w, &min_h,
                                                                                        &max_w, &max_h, NULL);
        VK_CHECK(tdm_err == TDM_ERROR_NONE, return VK_ERROR_DEVICE_LOST, "tdm_output_get_available_size failed.\n");