Re: [Mesa-dev] [PATCH] wsi_common_display: Deal with vscan values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Before we get too happy to merge things, I ran the CTS tests and there are some failures...  I've attached a fixup patch that fixes three bugs I found:

 1) We weren't setting planeReorderPossible at all and we were using 0 instead of VK_FALSE (they're the same but we should use the enum) for persistentContent
 2) We weren't advertising disconnected connectors via GetPhysicalDeviceDisplayProperties but were returning them from GetPhysicalDeviceDisplayPlaneProperties.
 3) We weren't setting result if the condition variable failed to initialize (thanks GCC!)
There is one outstanding issue that the CTS is complaining about, namely that you can't create modes.  It tests that mode creation fails for a mode with a zero width, height, or refresh rate and that's all fine.  It then tries to re-create one of the modes that we've returned to it in GetDisplayModeProperties and assumes that it will work.  We should probably at least make sure that works by walking the list and looking for a mode that matches the requested one and returning it.  I don't think anything actually requires us to return a unique pointer so it can be a search instead of a create.

--Jason

From 4fbd63dc00a17f3ec8f71ec65a0b444316bac95f Mon Sep 17 00:00:00 2001
From: Jason Ekstrand <jason.ekstrand@xxxxxxxxx>
Date: Thu, 14 Jun 2018 23:22:17 -0700
Subject: [PATCH] Fixups

---
 src/vulkan/wsi/wsi_common_display.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c
index e140e71c518..d1453368dfd 100644
--- a/src/vulkan/wsi/wsi_common_display.c
+++ b/src/vulkan/wsi/wsi_common_display.c
@@ -384,7 +384,8 @@ wsi_display_fill_in_display_properties(struct wsi_device *wsi_device,
       floor(properties->physicalResolution.height * MM_PER_PIXEL + 0.5);
 
    properties->supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
-   properties->persistentContent = 0;
+   properties->planeReorderPossible = VK_FALSE;
+   properties->persistentContent = VK_FALSE;
 }
 
 /*
@@ -488,7 +489,7 @@ wsi_display_get_display_plane_supported_displays(
    int c = 0;
 
    wsi_for_each_connector(connector, wsi) {
-      if (c == plane_index) {
+      if (c == plane_index && connector->connected) {
          vk_outarray_append(&conn, display) {
             *display = wsi_display_connector_to_handle(connector);
          }
@@ -1387,8 +1388,10 @@ wsi_display_init_wsi(struct wsi_device *wsi_device,
       goto fail_mutex;
    }
 
-   if (!wsi_init_pthread_cond_monotonic(&wsi->wait_cond))
+   if (!wsi_init_pthread_cond_monotonic(&wsi->wait_cond)) {
+      result = VK_ERROR_OUT_OF_HOST_MEMORY;
       goto fail_cond;
+   }
 
    wsi->base.get_support = wsi_display_surface_get_support;
    wsi->base.get_capabilities = wsi_display_surface_get_capabilities;
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux