diff --git a/alloc.c b/alloc.c index 1342422..1e2e60c 100644 --- a/alloc.c +++ b/alloc.c @@ -568,20 +568,6 @@ static void log_reuse(struct liftoff_output *output) output->alloc_reused_counter++; } -static void log_no_reuse(struct liftoff_output *output) -{ - liftoff_log(LIFTOFF_DEBUG, "Computing plane allocation on output %p", - (void *)output); - - if (output->alloc_reused_counter != 0) { - liftoff_log(LIFTOFF_DEBUG, - "Stopped reusing previous plane allocation on " - "output %p (had reused it %d times)", - (void *)output, output->alloc_reused_counter); - output->alloc_reused_counter = 0; - } -} - bool liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req) { struct liftoff_device *device; @@ -600,7 +586,6 @@ bool liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req) log_reuse(output); return true; } - log_no_reuse(output); output_log_layers(output); diff --git a/output.c b/output.c index d771616..4730c39 100644 --- a/output.c +++ b/output.c @@ -23,8 +23,11 @@ struct liftoff_output *liftoff_output_create(struct liftoff_device *device, return NULL; } + liftoff_log(LIFTOFF_DEBUG, "Creating output for CRTC id: %"PRIu32 " index: %zu", crtc_id, crtc_index); + output = calloc(1, sizeof(*output)); if (output == NULL) { + liftoff_log_errno(LIFTOFF_ERROR, "calloc"); return NULL; } output->device = device; @@ -63,7 +66,17 @@ void output_log_layers(struct liftoff_output *output) { return; } - liftoff_log(LIFTOFF_DEBUG, "Layers on CRTC %"PRIu32":", output->crtc_id); + liftoff_log(LIFTOFF_DEBUG, "\n== Apply request for output %"PRIu32" ==", output->crtc_id); + + if (output->alloc_reused_counter != 0) { + liftoff_log(LIFTOFF_DEBUG, + " Note: Reused previous plane allocation %d times.", + output->alloc_reused_counter); + output->alloc_reused_counter = 0; + } + + liftoff_log(LIFTOFF_DEBUG, "Active layers:"); + liftoff_list_for_each(layer, &output->layers, link) { if (layer->force_composition) { liftoff_log(LIFTOFF_DEBUG, " Layer %p "