mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 16:42:26 +00:00
backend/drm: refuse to enable an output without a mode
This commit is contained in:
parent
47e5212823
commit
21c6cc5e4c
@ -422,6 +422,15 @@ static bool test_buffer(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 ((output->pending.committed & WLR_OUTPUT_STATE_ENABLED) &&
|
||||
output->pending.enabled) {
|
||||
if (output->current_mode == NULL &&
|
||||
!(output->pending.committed & WLR_OUTPUT_STATE_MODE)) {
|
||||
wlr_log(WLR_DEBUG, "Can't enable an output without a mode");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ((output->pending.committed & WLR_OUTPUT_STATE_BUFFER) &&
|
||||
output->pending.buffer_type == WLR_OUTPUT_STATE_BUFFER_SCANOUT) {
|
||||
if (!test_buffer(conn, output->pending.buffer)) {
|
||||
|
Loading…
Reference in New Issue
Block a user