diff options
author | Simon Ser <contact@emersion.fr> | 2021-04-06 19:43:51 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-06-13 10:57:17 +0200 |
commit | eca5d2f37f03a2044628f7084ca83d96b0f80395 (patch) | |
tree | af5c168dcb5a192e6553747b978a574bced31088 | |
parent | 758f117442c274aa37016b37b07b0bf548c636af (diff) |
backend/drm: move session check from test_buffer to drm_connector_test
The other caller (drm_connector_commit_state) already checks this.
-rw-r--r-- | backend/drm/drm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 1f9a8384..48b55e41 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -391,10 +391,6 @@ static bool test_buffer(struct wlr_drm_connector *conn, struct wlr_buffer *wlr_buffer) { struct wlr_drm_backend *drm = conn->backend; - if (!drm->session->active) { - return false; - } - /* Legacy never gets to have nice things. But I doubt this would ever work, * and there is no reliable way to try, without risking messing up the * modesetting state. */ @@ -449,6 +445,10 @@ static bool drm_connector_alloc_crtc(struct wlr_drm_connector *conn); static bool drm_connector_test(struct wlr_output *output) { struct wlr_drm_connector *conn = get_drm_connector_from_output(output); + if (!conn->backend->session->active) { + return false; + } + if ((output->pending.committed & WLR_OUTPUT_STATE_ENABLED) && output->pending.enabled) { if (output->current_mode == NULL && |