[Mesa-dev] [PATCH mesa 04/21] vulkan: Add EXT_direct_mode_display

Jason Ekstrand jason at jlekstrand.net
Wed Jun 13 21:42:51 UTC 2018


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

> Jason Ekstrand <jason at jlekstrand.net> writes:
>
> > This seems a bit odd.  Why is the FD not stored in the display?  What if
> > you acquire multiple displays for two-player VR?  If the master FD passed
> > in is not -1, we could just create a VkDisplayKHR object containing
> > it.
>
> You want to share the master_fd passed in at init_wsi time among all
> VkDisplayKHR objects, so you need to leave that FD in the global
> structure. However, you're right that when you use
> EXT_acquire_xlib_display, then you get a separate master_fd for each DRM
> output and need to have one per display.
>
> However, extending this code to support multiple master FDs looks tricky
> -- in the case where you have a single master_fd, then enumerating the
> DRM resources for that gives you all of the available
> connectors. However, if you have one DRM master per connector, then you
> need to enumerate each independently to get the complete set of
> available resources. For APIs which don't explicitly include a
> connector, I would have to go find a suitable master FD for each
> resource.
>
> How about I just disallow multiple leases for now? If you want multiple
> outputs, I think you'd want them on the same DRM master anyways, and we
> could get that by creating a new extension which had the application
> pass in a DRM master that had all of the resources you want to access.
>
>    /* XXX no support for multiple leases yet */
>    if (wsi->fd >= 0)
>       return VK_ERROR_OUT_OF_DATE_KHR;
>

That's fine with me.  As long as we do something sensible such as
disallowing it instead of just falling over.

--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180613/f331da08/attachment.html>


More information about the mesa-dev mailing list