From patchwork Fri Jun 15 06:43:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 10465779 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F98860348 for ; Fri, 15 Jun 2018 06:43:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E94226E49 for ; Fri, 15 Jun 2018 06:43:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5066D28756; Fri, 15 Jun 2018 06:43:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1C99226E49 for ; Fri, 15 Jun 2018 06:43:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53C306E996; Fri, 15 Jun 2018 06:43:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 30F276E994 for ; Fri, 15 Jun 2018 06:43:13 +0000 (UTC) Received: by mail-wm0-x22d.google.com with SMTP id p126-v6so1738459wmb.2 for ; Thu, 14 Jun 2018 23:43:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eJk3PB4a6uonVTgn1Y/pLgnlorkKwfnuxA8N4MO4n3Y=; b=D0w3bUR69020mz12Lq5oiDi8SkwC+R4NyoKG+MAi88s9Bv/XMf3e+0PYHqXISfSbe4 pdjx4zoDxkpWCBdumKsJNbwnIcHFMr8Z+CwLPaT051dF5EPoaEBgUQ65YrckyAAms+/q wxJWwGpHVOnNhBq2CMWTF7rWtzbvfCvprB1XHFiggKN+qHr8W7tZgqof8G3pBcpnWx8z t+XjGwBQ2PH8Va1+yZU9MljGotQk8oouFQxPMlp3iN5llk0E4mjAxTE7N35begx8wUv0 yMXqEJe0qbE2XmtWzFtBm1VKOGNJuZOgdmJRSQLUweqaCHBBFZfpkGm87EO51nXXjSUO pvOQ== X-Gm-Message-State: APt69E0v+AArI3Wrb4xcAmnE1zcbBgZ+VH27Hv1H+Q7tAzczvtbUWKIG 6prxFfujUwlxMsb5Q/IsXnB7/FMYvq02NnbFQ7P0Eg== X-Google-Smtp-Source: ADUXVKLmjI2PUiOR5T5CathmSnvbc8c8w+OgVV5jb24He51dd+0/QUyE080WxHq0l6mELHzmBb3dGCfr0Q5EXtq6MKw= X-Received: by 2002:a1c:1695:: with SMTP id 143-v6mr191394wmw.12.1529044991614; Thu, 14 Jun 2018 23:43:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:a02d:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 23:43:10 -0700 (PDT) X-Originating-IP: [50.43.41.117] In-Reply-To: <87k1r0x21g.fsf@keithp.com> References: <20180615005701.22266-1-keithp@keithp.com> <87k1r0x21g.fsf@keithp.com> From: Jason Ekstrand Date: Thu, 14 Jun 2018 23:43:10 -0700 Message-ID: Subject: Re: [Mesa-dev] [PATCH] wsi_common_display: Deal with vscan values To: Keith Packard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ML mesa-dev , Maling list - DRI developers Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 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