backend/drm: move legacy-specific checks to legacy.c

Now that we have a test_only arg in crtc_commit, we can move the
legacy checks to legacy.c.
This commit is contained in:
Simon Ser 2021-07-08 16:23:22 +02:00 committed by Simon Zeni
parent 017555651b
commit fde56c20b4
2 changed files with 15 additions and 8 deletions

View file

@ -419,14 +419,6 @@ static bool drm_connector_set_pending_fb(struct wlr_drm_connector *conn,
}
break;
case WLR_OUTPUT_STATE_BUFFER_SCANOUT:;
/* 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. */
if (drm->iface == &legacy_iface) {
wlr_drm_conn_log(conn, WLR_DEBUG,
"Cannot use direct scan-out with legacy KMS API");
return false;
}
if (!drm_fb_import(&plane->pending_fb, drm, state->buffer,
&crtc->primary->formats)) {
wlr_drm_conn_log(conn, WLR_DEBUG,