[PATCH i-g-t 3/5] tools/intel_watermark: Clean up SKL plane names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Only print the plane name for planes that actually exist. Also
Also include the pipe in the plane name.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 tools/intel_watermark.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/tools/intel_watermark.c b/tools/intel_watermark.c
index bb776fb3d532..a18b5c8e83c2 100644
--- a/tools/intel_watermark.c
+++ b/tools/intel_watermark.c
@@ -152,6 +152,19 @@ static int skl_max_planes(uint32_t d)
 		return 4;
 }
 
+static const char *skl_plane_name(int pipe, int plane)
+{
+	static char name[32];
+
+	if (plane == 0)
+		snprintf(name, sizeof(name), "CURSOR");
+	else
+		snprintf(name, sizeof(name), "PLANE_%1d%c",
+			 plane, pipe_name(pipe));
+
+	return name;
+}
+
 static const char *skl_wm_linetime_reg_name(int pipe)
 {
 	static char reg_name[32];
@@ -293,7 +306,11 @@ static void skl_wm_dump(void)
 		linetime = REG_DECODE1(wm_linetime[pipe], 0, 9);
 		printf("LINETIME: %d (%.3f usec)\n", linetime, linetime* 0.125f);
 
-		printf("LEVEL   CURSOR   PLANE_1   PLANE_2   PLANE_3   PLANE_4\n");
+		printf("LEVEL");
+		for (plane = 0; plane < num_planes; plane++)
+			printf("%10s", skl_plane_name(pipe, plane));
+		printf("\n");
+
 		for (level = 0; level < num_levels; level++) {
 			printf("%5d  ", level);
 			for (plane = 0; plane < num_planes; plane++) {
-- 
2.13.6

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux