aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorRouven Czerwinski <rouven@czerwinskis.de>2020-01-24 19:53:51 +0100
committerSimon Ser <contact@emersion.fr>2020-01-24 19:57:09 +0100
commit144d2041adfba155e7596d5e5e16beecfd05a0e3 (patch)
tree42701425cf4831c3805ab9bc52f22410fe111311 /backend/drm
parentf0594fb732259606c0652f5fb1b847b86a746b35 (diff)
backend/drm: remove overzealous finish_drm_surface
The previous PR was overzealous in adding a finish_drm_surface call which was also done by the caller. Remove the call and also move the comment to the correct code location.
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index f8812b4e..a97915ec 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -613,17 +613,17 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
if (!init_drm_plane_surfaces(plane, drm, width, height, format, modifiers) ||
!drm_connector_pageflip_renderer(conn, mode)) {
- // If page-flipping with modifiers enabled doesn't work, retry without
- // modifiers
- finish_drm_surface(&plane->surf);
- finish_drm_surface(&plane->mgpu_surf);
-
if (!modifiers) {
wlr_log(WLR_ERROR, "Failed to initialize renderer "
"on connector '%s': initial page-flip failed",
conn->output.name);
return false;
}
+
+ // If page-flipping with modifiers enabled doesn't work, retry without
+ // modifiers
+ finish_drm_surface(&plane->surf);
+ finish_drm_surface(&plane->mgpu_surf);
wlr_log(WLR_INFO, "Page-flip failed with primary FB modifiers enabled, "
"retrying without modifiers");
modifiers = false;
@@ -636,8 +636,6 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
wlr_log(WLR_ERROR, "Failed to initialize renderer "
"on connector '%s': initial page-flip failed",
conn->output.name);
- finish_drm_surface(&plane->surf);
- finish_drm_surface(&plane->mgpu_surf);
return false;
}
}