From 6b2cbeb0d4d5e7076427d6c325404d8f05728433 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Wed, 26 Feb 2020 14:34:35 +0100 Subject: [PATCH] Indent log on property applying and layer assignment Indent when applying properties and assigning the layers. The log is better to read this way. Example: Apply on output 0x55c447db2b50. Layers on CRTC 62: Layer 0x55c447db2a40: FB_ID = 108 zpos = 0 alpha = 65535 SRC_X = 0 SRC_Y = 0 SRC_W = 3840 SRC_H = 2160 CRTC_X = 0 CRTC_Y = 0 CRTC_W = 3840 CRTC_H = 2160 Disabling planes: 55 52 49 46 43 40 71 69 67 65 63 61 58 Performing allocation for plane 55 (1/13) Layer 0x55c447db2a40 -> plane 55: applying properties... Layer 0x55c447db2a40 -> plane 55: incompatible properties Performing allocation for plane 61 (12/13) Layer 0x55c447db2a40 -> plane 61: applying properties... Layer 0x55c447db2a40 -> plane 61: incompatible properties Performing allocation for plane 58 (13/13) Layer 0x55c447db2a40 -> plane 58: applying properties... Layer 0x55c447db2a40 -> plane 58: success Found a better allocation with score=1 Found plane allocation for output 0x55c447db2b50 with score=1 Assigning layers to planes: Layer 0x55c447db2a40 -> plane 58 --- alloc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/alloc.c b/alloc.c index 5af2be1..6f5526f 100644 --- a/alloc.c +++ b/alloc.c @@ -406,7 +406,7 @@ bool output_choose_layers(struct liftoff_output *output, } /* Try to use this layer for the current plane */ - liftoff_log(LIFTOFF_DEBUG, "Layer %p -> plane %"PRIu32": " + liftoff_log(LIFTOFF_DEBUG, " Layer %p -> plane %"PRIu32": " "applying properties...", (void *)layer, plane->id); if (!plane_apply(plane, layer, result->req, &compatible)) { @@ -414,7 +414,7 @@ bool output_choose_layers(struct liftoff_output *output, } if (!compatible) { liftoff_log(LIFTOFF_DEBUG, - "Layer %p -> plane %"PRIu32": " + " Layer %p -> plane %"PRIu32": " "incompatible properties", (void *)layer, plane->id); continue; @@ -425,7 +425,7 @@ bool output_choose_layers(struct liftoff_output *output, } if (compatible) { liftoff_log(LIFTOFF_DEBUG, - "Layer %p -> plane %"PRIu32": success", + " Layer %p -> plane %"PRIu32": success", (void *)layer, plane->id); /* Continue with the next plane */ plane_step_init_next(&next_step, step, layer); @@ -659,7 +659,7 @@ bool liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req) liftoff_log(LIFTOFF_DEBUG, "Found plane allocation for output %p with " - "score=%d", (void *)output, result.best_score); + "score=%d:", (void *)output, result.best_score); /* Apply the best allocation */ i = 0; @@ -670,8 +670,7 @@ bool liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req) continue; } - liftoff_log(LIFTOFF_DEBUG, - "Assigning layer %p to plane %"PRIu32, + liftoff_log(LIFTOFF_DEBUG, " Layer %p -> plane %"PRIu32, (void *)layer, plane->id); assert(plane->layer == NULL);