Merge branch 'silence' into 'master'

Vendetta against noisy debug logs

See merge request wlroots/wlroots!4836
This commit is contained in:
Kenny Levinsen 2025-05-07 04:20:28 +00:00
commit a3e92a3f3e
5 changed files with 11 additions and 15 deletions

View file

@ -71,16 +71,14 @@ static bool atomic_commit(struct atomic *atom, struct wlr_drm_backend *drm,
int ret = drmModeAtomicCommit(drm->fd, atom->req, flags, page_flip);
if (ret != 0) {
enum wlr_log_importance log_level = WLR_ERROR;
if (flags & DRM_MODE_ATOMIC_TEST_ONLY) {
log_level = WLR_DEBUG;
return false;
}
if (state->connectors_len == 1) {
struct wlr_drm_connector *conn = state->connectors[0].connector;
wlr_drm_conn_log_errno(conn, log_level, "Atomic commit failed");
wlr_drm_conn_log_errno(conn, WLR_ERROR, "Atomic commit failed");
} else {
wlr_log_errno(log_level, "Atomic commit failed");
wlr_log_errno(WLR_ERROR, "Atomic commit failed");
}
char *flags_str = atomic_commit_flags_str(flags);
wlr_log(WLR_DEBUG, "(Atomic commit flags: %s)",

View file

@ -766,8 +766,6 @@ static bool drm_connector_state_update_primary_fb(struct wlr_drm_connector *conn
&plane->formats);
wlr_buffer_unlock(local_buf);
if (!ok) {
wlr_drm_conn_log(conn, WLR_DEBUG,
"Failed to import buffer for scan-out");
return false;
}

View file

@ -144,7 +144,6 @@ static struct wlr_drm_fb *drm_fb_create(struct wlr_drm_backend *drm,
struct wlr_buffer *buf, const struct wlr_drm_format_set *formats) {
struct wlr_dmabuf_attributes attribs;
if (!wlr_buffer_get_dmabuf(buf, &attribs)) {
wlr_log(WLR_DEBUG, "Failed to get DMA-BUF from buffer");
return NULL;
}
@ -169,9 +168,6 @@ static struct wlr_drm_fb *drm_fb_create(struct wlr_drm_backend *drm,
wlr_drm_format_set_has(formats, info->opaque_substitute, attribs.modifier)) {
attribs.format = info->opaque_substitute;
} else {
wlr_log(WLR_DEBUG, "Buffer format 0x%"PRIX32" with modifier "
"0x%"PRIX64" cannot be scanned out",
attribs.format, attribs.modifier);
goto error_fb;
}
}

View file

@ -205,6 +205,14 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor)
return NULL;
}
if (sizes == NULL) {
// No cursor support
wlr_log(WLR_DEBUG, "Output '%s' has no cursor support, disabling permanently",
output->name);
output->software_cursor_locks++;
return NULL;
}
bool found = false;
for (size_t i = 0; i < sizes_len; i++) {
struct wlr_output_cursor_size size = sizes[i];
@ -428,7 +436,6 @@ bool output_cursor_set_texture(struct wlr_output_cursor *cursor,
return true;
}
wlr_log(WLR_DEBUG, "Falling back to software cursor on output '%s'", output->name);
output_disable_hardware_cursor(output);
output_cursor_damage_whole(cursor);
return true;

View file

@ -966,7 +966,6 @@ const struct wlr_drm_format_set *wlr_output_get_primary_formats(
bool wlr_output_is_direct_scanout_allowed(struct wlr_output *output) {
if (output->attach_render_locks > 0) {
wlr_log(WLR_DEBUG, "Direct scan-out disabled by lock");
return false;
}
@ -975,8 +974,6 @@ bool wlr_output_is_direct_scanout_allowed(struct wlr_output *output) {
wl_list_for_each(cursor, &output->cursors, link) {
if (cursor->enabled && cursor->visible &&
cursor != output->hardware_cursor) {
wlr_log(WLR_DEBUG,
"Direct scan-out disabled by software cursor");
return false;
}
}