backend/drm: retry without modifiers for the primary plane

On some Intel cards using modifiers can fill the FIFO and prevent
hotplugged outputs from being properly enabled.

Add a fallback without modifiers.

Fixes: 2bdd1d0896 ("backend/drm: use modifiers for our GBM buffers")
References: https://github.com/swaywm/wlroots/issues/1840
Closes: https://github.com/swaywm/wlroots/issues/1852
This commit is contained in:
Simon Ser 2019-10-22 18:41:47 +02:00 committed by Scott Anderson
parent 51416738ea
commit e97c2c3639
3 changed files with 83 additions and 31 deletions

View file

@ -44,7 +44,7 @@ bool init_drm_surface(struct wlr_drm_surface *surf,
bool init_drm_plane_surfaces(struct wlr_drm_plane *plane,
struct wlr_drm_backend *drm, int32_t width, uint32_t height,
uint32_t format);
uint32_t format, bool with_modifiers);
void finish_drm_surface(struct wlr_drm_surface *surf);
bool make_drm_surface_current(struct wlr_drm_surface *surf, int *buffer_age);