aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2024-02-25 04:12:52 -0500
committerAlexander Orzechowski <alex@ozal.ski>2024-02-25 04:12:52 -0500
commitf9a371717c9331d21af092cf2d689a3f496813ec (patch)
tree419e5e09a887b2642259fa30ddb7ff5002eabff7 /backend
parent672ff1e14ee63ecb2018c9bafbac6060663e3c22 (diff)
backend/drm: Remove dead code
We can never hit the case where we try to light up an output without a buffer. output_ensure_buffer() will catch this for now, and when that's removed, output_basic_test() will catch this case.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index b6c43fc9..20e56318 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -672,20 +672,12 @@ static bool drm_connector_test(struct wlr_output *output,
}
}
- if ((state->committed & WLR_OUTPUT_STATE_ENABLED) ? state->enabled : output->enabled) {
- if ((state->committed &
- (WLR_OUTPUT_STATE_ENABLED | WLR_OUTPUT_STATE_MODE)) &&
- !(state->committed & WLR_OUTPUT_STATE_BUFFER)) {
- wlr_drm_conn_log(conn, WLR_DEBUG,
- "Can't enable an output without a buffer");
- return false;
- }
-
- if (!drm_connector_alloc_crtc(conn)) {
- wlr_drm_conn_log(conn, WLR_DEBUG,
- "No CRTC available for this connector");
- return false;
- }
+ if (((state->committed & WLR_OUTPUT_STATE_ENABLED)
+ ? state->enabled : output->enabled) &&
+ !drm_connector_alloc_crtc(conn)) {
+ wlr_drm_conn_log(conn, WLR_DEBUG,
+ "No CRTC available for this connector");
+ return false;
}
bool ok = false;