Skip to content
  1. Apr 10, 2018
  2. Apr 09, 2018
    • Keith Packard's avatar
      vulkan: Add EXT_acquire_xlib_display [v2] · cd69960b
      Keith Packard authored and Faith Ekstrand's avatar Faith Ekstrand committed
      
      
      This extension adds the ability to borrow an X RandR output for
      temporary use directly by a Vulkan application. For DRM, we use the
      Linux resource leasing mechanism.
      
      v2:
      	Clean up xlib_lease detection
      
      	* Use separate temporary '_xlib_lease' variable to hold the
      	  option value to avoid changin the type of a variable.
      
      	* Use boolean expressions instead of additional if statements
      	  to compute resulting with_xlib_lease value.
      
      	* Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to
                vulkan_wsi_args
      
      Suggested-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
      
      	Move mode list from wsi_display to wsi_display_connector
      
      	Fix scope for wsi_display_mode and wsi_display_connector allocs
      
      Suggested-by: default avatarJason Ekstrand <jason@jlekstrand.net>
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      cd69960b
    • Keith Packard's avatar
      radv: Add EXT_direct_mode_display to radv driver · f0f6f7ca
      Keith Packard authored and Faith Ekstrand's avatar Faith Ekstrand committed
      
      
      Add support for the EXT_direct_mode_display extension. This just
      provides the vkReleaseDisplayEXT function.
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      f0f6f7ca
    • Keith Packard's avatar
      anv: Add EXT_direct_mode_display to anv driver · a62df190
      Keith Packard authored and Faith Ekstrand's avatar Faith Ekstrand committed
      
      
      Add support for the EXT_direct_mode_display extension. This just
      provides the vkReleaseDisplayEXT function.
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      a62df190
    • Keith Packard's avatar
      vulkan: Add EXT_direct_mode_display · 0a96560e
      Keith Packard authored and Faith Ekstrand's avatar Faith Ekstrand committed
      
      
      Add support for the EXT_direct_mode_display extension. This just
      provides the vkReleaseDisplayEXT function.
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      0a96560e
    • Keith Packard's avatar
      radv: Add KHR_display extension to radv [v3] · 6689c855
      Keith Packard authored and Faith Ekstrand's avatar Faith Ekstrand committed
      
      
      This adds support for the KHR_display extension to the radv Vulkan
      driver. The driver now attempts to open the master DRM node when the
      KHR_display extension is requested so that the common winsys code can
      perform the necessary operations.
      
      v2:
      	* Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to
                vulkan_wsi_args
      
      Suggested-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
      
      v3:
      	Adapt to new wsi_device_init API (added display_fd)
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      6689c855
    • Keith Packard's avatar
      anv: Add KHR_display extension to anv [v4] · c6c38fa2
      Keith Packard authored and Faith Ekstrand's avatar Faith Ekstrand committed
      
      
      This adds support for the KHR_display extension to the anv Vulkan
      driver. The driver now attempts to open the master DRM node when the
      KHR_display extension is requested so that the common winsys code can
      perform the necessary operations.
      
      v2: Make sure primary fd is usable
      
      	When KHR_display is selected, we try to open the primary node
      	instead of the render node in case the user wants to use
      	KHR_display for presentation. However, if we're actually going
      	to end up using RandR leases, then we don't care if the
      	resulting fd can't be used for display, but the kernel also
      	prevents us from using it for drawing when someone else has
      	master.
      
      v3:
      	Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args
      
      Suggested-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
      
      v4:
      	Adapt primary node usage to new wsi_device_init API
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      c6c38fa2
    • Faith Ekstrand's avatar
    • Faith Ekstrand's avatar
      fixup! Add and use list iterator helpers · 8ce3ad8a
      Faith Ekstrand authored
      8ce3ad8a
    • Keith Packard's avatar
      vulkan: Add KHR_display extension using DRM [v6] · 517bc915
      Keith Packard authored and Faith Ekstrand's avatar Faith Ekstrand committed
      
      
      This adds support for the KHR_display extension support to the vulkan
      WSI layer. Driver support will be added separately.
      
      v2:
      	* fix double ;; in wsi_common_display.c
      
      	* Move mode list from wsi_display to wsi_display_connector
      
      	* Fix scope for wsi_display_mode andwsi_display_connector
                allocs
      
      	* Switch all allocations to vk_zalloc instead of vk_alloc.
      
      	* Fix DRM failure in
                wsi_display_get_physical_device_display_properties
      
      	  When DRM fails, or when we don't have a master fd
      	  (presumably due to application errors), just return 0
      	  properties from this function, which is at least a valid
      	  response.
      
      	* Use vk_outarray for all property queries
      
      	  This is a bit less error-prone than open-coding the same
      	  stuff.
      
      	* Remove VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR from surface caps
      
      	  Until we have multi-plane support, we shouldn't pretend to
      	  have any multi-plane semantics, even if undefined.
      
      Suggested-by: default avatarJason Ekstrand <jason@jlekstrand.net>
      
      	* Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to
                vulkan_wsi_args
      
      Suggested-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
      
      v3:
      	Add separate 'display_fd' and 'render_fd' arguments to
      	wsi_device_init API. This allows drivers to use different FDs
      	for the different aspects of the device.
      
      	Use largest mode as display size when no preferred mode.
      
      	If the display doesn't provide a preferred mode, we'll assume
      	that the largest supported mode is the "physical size" of the
      	device and report that.
      
      v4:
      	Make wsi_image_state enumeration values uppercase.
      	Follow more common mesa conventions.
      
      	Remove 'render_fd' from wsi_device_init API.  The
      	wsi_common_display code doesn't use this fd at all, so stop
      	passing it in. This avoids any potential confusion over which
      	fd to use when creating display-relative object handles.
      
      	Remove call to wsi_create_prime_image which would never have
      	been reached as the necessary condition (use_prime_blit) is
      	never set.
      
      	whitespace cleanups in wsi_common_display.c
      
      Suggested-by: default avatarJason Ekstrand <jason@jlekstrand.net>
      
      	Add depth/bpp info to available surface formats.  Instead of
      	hard-coding depth 24 bpp 32 in the drmModeAddFB call, use the
      	requested format to find suitable values.
      
      	Destroy kernel buffers and FBs when swapchain is destroyed. We
      	were leaking both of these kernel objects across swapchain
      	destruction.
      
      	Note that wsi_display_wait_for_event waits for anything to
      	happen.  wsi_display_wait_for_event is simply a yield so that
      	the caller can then check to see if the desired state change
      	has occurred.
      
      	Record swapchain failures in chain for later return. If some
      	asynchronous swapchain activity fails, we need to tell the
      	application eventually. Record the failure in the swapchain
      	and report it at the next acquire_next_image or queue_present
      	call.
      
      	Fix error returns from wsi_display_setup_connector.  If a
      	malloc failed, then the result should be
      	VK_ERROR_OUT_OF_HOST_MEMORY. Otherwise, the associated ioctl
      	failed and we're either VT switched away, or our lease has
      	been revoked, in which case we should return
      	VK_ERROR_OUT_OF_DATE_KHR.
      
      	Make sure both sides of if/else brace use matches
      
      	Note that we assume drmModeSetCrtc is synchronous. Add a
      	comment explaining why we can idle any previous displayed
      	image as soon as the mode set returns.
      
      	Note that EACCES from drmModePageFlip means VT inactive.  When
      	vt switched away drmModePageFlip returns EACCES. Poll once a
      	second waiting until we get some other return value back.
      
      	Clean up after alloc failure in
      	wsi_display_surface_create_swapchain. Destroy any created
      	images, free the swapchain.
      
      	Remove physical_device from wsi_display_init_wsi. We never
      	need this value, so remove it from the API and from the
      	internal wsi_display structure.
      
      	Use drmModeAddFB2 in wsi_display_image_init.  This takes a drm
      	format instead of depth/bpp, which provides more control over
      	the format of the data.
      
      v5:
      	Set the 'currentStackIndex' member of the
      	VkDisplayPlanePropertiesKHR record to zero, instead of
      	indexing across all displays. This value is the stack depth of
      	the plane within an individual display, and as the current
      	code supports only a single plane per display, should be set
      	to zero for all elements
      
      Discovered-by: default avatarDavid Mao <David.Mao@amd.com>
      
      v6:
      	Remove 'platform_display' bits from the build and use the
      	existing 'platform_drm' instead.
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      517bc915
  3. Apr 06, 2018
  4. Apr 05, 2018
Loading