[Mesa-dev] [PATCH mesa 4/9] vulkan: Add EXT_direct_mode_display [v2]

Jason Ekstrand jason at jlekstrand.net
Wed Jun 13 21:45:38 UTC 2018


patches 4-6 are

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Mon, Jun 11, 2018 at 10:39 PM, Keith Packard <keithp at keithp.com> wrote:

> Add support for the EXT_direct_mode_display extension. This just
> provides the vkReleaseDisplayEXT function.
>
> v2:
>         Adopt Jason Ekstrand's coding conventions
>
>         Declare variables at first use, eliminate extra whitespace
>         between types and names. Wrap lines to 80 columns.
>
>         Suggested-by: Jason Ekstrand <jason.ekstrand at intel.com>
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  src/vulkan/wsi/wsi_common_display.c | 18 ++++++++++++++++++
>  src/vulkan/wsi/wsi_common_display.h |  5 +++++
>  2 files changed, 23 insertions(+)
>
> diff --git a/src/vulkan/wsi/wsi_common_display.c
> b/src/vulkan/wsi/wsi_common_display.c
> index e529d2fc580..7a484c0df95 100644
> --- a/src/vulkan/wsi/wsi_common_display.c
> +++ b/src/vulkan/wsi/wsi_common_display.c
> @@ -1430,3 +1430,21 @@ wsi_display_finish_wsi(struct wsi_device
> *wsi_device,
>        vk_free(alloc, wsi);
>     }
>  }
> +
> +/*
> + * Implement vkReleaseDisplay
> + */
> +VkResult
> +wsi_release_display(VkPhysicalDevice            physical_device,
> +                    struct wsi_device           *wsi_device,
> +                    VkDisplayKHR                display)
> +{
> +   struct wsi_display *wsi =
> +      (struct wsi_display *) wsi_device->wsi[VK_ICD_WSI_
> PLATFORM_DISPLAY];
> +
> +   if (wsi->fd >= 0) {
> +      close(wsi->fd);
> +      wsi->fd = -1;
> +   }
> +   return VK_SUCCESS;
> +}
> diff --git a/src/vulkan/wsi/wsi_common_display.h
> b/src/vulkan/wsi/wsi_common_display.h
> index 4bb86cf2102..dd3a098f80a 100644
> --- a/src/vulkan/wsi/wsi_common_display.h
> +++ b/src/vulkan/wsi/wsi_common_display.h
> @@ -74,4 +74,9 @@ wsi_create_display_surface(VkInstance instance,
>                             const VkDisplaySurfaceCreateInfoKHR
> *pCreateInfo,
>                             VkSurfaceKHR *pSurface);
>
> +VkResult
> +wsi_release_display(VkPhysicalDevice            physical_device,
> +                    struct wsi_device           *wsi_device,
> +                    VkDisplayKHR                display);
> +
>  #endif
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180613/45c81b2f/attachment.html>


More information about the mesa-dev mailing list