vulkan: Allow RegisterDisplayEventEXT before first page flip
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14685>
This commit is contained in:
parent
360f7c5d64
commit
a53fd9b089
|
@ -1701,6 +1701,17 @@ wsi_register_vblank_event(struct wsi_display_fence *fence,
|
|||
if (wsi->fd < 0)
|
||||
return VK_ERROR_INITIALIZATION_FAILED;
|
||||
|
||||
/* A display event may be registered before the first page flip at which
|
||||
* point crtc_id will be 0. If this is the case we setup the connector
|
||||
* here to allow drmCrtcQueueSequence to succeed.
|
||||
*/
|
||||
if (!connector->crtc_id) {
|
||||
VkResult ret = wsi_display_setup_connector(connector,
|
||||
connector->current_mode);
|
||||
if (ret != VK_SUCCESS)
|
||||
return VK_ERROR_INITIALIZATION_FAILED;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
int ret = drmCrtcQueueSequence(wsi->fd, connector->crtc_id,
|
||||
flags,
|
||||
|
|
Loading…
Reference in New Issue