[PATCH i-g-t] tools/intel_gpu_top: Fix misaligned rendering

anonymoustranquillity at proton.me anonymoustranquillity at proton.me
Sun Jan 14 21:26:36 UTC 2024


Hello, 

there seems to be a problem with rendering in the interactive mode in intel_gpu_top, seems to be a simple off-by-one. Below is a patch. I am new to contributing via email, so I apologize if I did something wrong - I tried to follow CONTRIBUTING.md to the best of my ability.

Have a nice day,
- Ity.

---
 tools/intel_gpu_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 046ead15a..24363e72f 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -2178,7 +2178,7 @@ print_client(struct igt_drm_client *c, struct engines *engines, double t, int li
 			len += *class_w;
 		}
 
-		printf(" %-*s\n", con_w - len - 1, c->print_name);
+		printf(" %-*s\n", con_w - len - 2, c->print_name);
 	} else if (output_mode == JSON) {
 		char buf[64];
 
-- 
2.43.0



More information about the igt-dev mailing list