Is this the same thing that happens on VT switch? If so, we may want to return SURFACE_LOST for leases and OUT_OF_DATE for things running directly on the display.
--Jason On Tue, Jun 26, 2018 at 4:23 PM, Keith Packard <kei...@keithp.com> wrote: > Instead of encouraging the client to re-create the swapchain and keep > going with an OUT_OF_DATE error, tell the client that further use of > the current surface will not succeed as the associated kernel objects > are no longer valid. > > In particular, when a DRM lease is revoked, then the client needs to > get another lease and create a new surface for that. > > Signed-off-by: Keith Packard <kei...@keithp.com> > Cc: Jason Ekstrand <jason.ekstr...@intel.com> > --- > src/vulkan/wsi/wsi_common_display.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/vulkan/wsi/wsi_common_display.c > b/src/vulkan/wsi/wsi_common_display.c > index c36b87c18c3..4a2d88ff77e 100644 > --- a/src/vulkan/wsi/wsi_common_display.c > +++ b/src/vulkan/wsi/wsi_common_display.c > @@ -1092,7 +1092,7 @@ wsi_display_acquire_next_image(struct wsi_swapchain > *drv_chain, > ret = wsi_display_wait_for_event(wsi, timeout); > > if (ret && ret != ETIMEDOUT) { > - result = VK_ERROR_OUT_OF_DATE_KHR; > + result = VK_ERROR_SURFACE_LOST_KHR; > goto done; > } > } > @@ -1200,7 +1200,7 @@ wsi_display_setup_connector(wsi_display_connector > *connector, > if (errno == ENOMEM) > result = VK_ERROR_OUT_OF_HOST_MEMORY; > else > - result = VK_ERROR_OUT_OF_DATE_KHR; > + result = VK_ERROR_SURFACE_LOST_KHR; > goto bail; > } > > @@ -1211,7 +1211,7 @@ wsi_display_setup_connector(wsi_display_connector > *connector, > if (errno == ENOMEM) > result = VK_ERROR_OUT_OF_HOST_MEMORY; > else > - result = VK_ERROR_OUT_OF_DATE_KHR; > + result = VK_ERROR_SURFACE_LOST_KHR; > goto bail_mode_res; > } > > @@ -1220,7 +1220,7 @@ wsi_display_setup_connector(wsi_display_connector > *connector, > connector->crtc_id = wsi_display_select_crtc(connector, > mode_res, > drm_connector); > if (!connector->crtc_id) { > - result = VK_ERROR_OUT_OF_DATE_KHR; > + result = VK_ERROR_SURFACE_LOST_KHR; > goto bail_connector; > } > } > @@ -1238,7 +1238,7 @@ wsi_display_setup_connector(wsi_display_connector > *connector, > } > > if (!drm_mode) { > - result = VK_ERROR_OUT_OF_DATE_KHR; > + result = VK_ERROR_SURFACE_LOST_KHR; > goto bail_connector; > } > > @@ -1425,7 +1425,7 @@ _wsi_display_queue_next(struct wsi_swapchain > *drv_chain) > wsi_display_connector *connector = display_mode->connector; > > if (wsi->fd < 0) > - return VK_ERROR_OUT_OF_DATE_KHR; > + return VK_ERROR_SURFACE_LOST_KHR; > > if (display_mode != connector->current_mode) > connector->active = false; > @@ -1497,7 +1497,7 @@ _wsi_display_queue_next(struct wsi_swapchain > *drv_chain) > if (ret != -EACCES) { > connector->active = false; > image->state = WSI_IMAGE_IDLE; > - return VK_ERROR_OUT_OF_DATE_KHR; > + return VK_ERROR_SURFACE_LOST_KHR; > } > > /* Some other VT is currently active. Sit here waiting for > -- > 2.17.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev