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) {
|
static bool drm_connector_test(struct wlr_output *output) {
|
||||||
struct wlr_drm_connector *conn = get_drm_connector_from_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) &&
|
if ((output->pending.committed & WLR_OUTPUT_STATE_BUFFER) &&
|
||||||
output->pending.buffer_type == WLR_OUTPUT_STATE_BUFFER_SCANOUT) {
|
output->pending.buffer_type == WLR_OUTPUT_STATE_BUFFER_SCANOUT) {
|
||||||
if (!test_buffer(conn, output->pending.buffer)) {
|
if (!test_buffer(conn, output->pending.buffer)) {
|
||||||
|
|
Loading…
Reference in New Issue