[Intel-gfx] [PATCH i-g-t 3/5] tools/intel_watermark: Clean up SKL plane names
Ville Syrjala
ville.syrjala at linux.intel.com
Tue Nov 21 18:49:28 UTC 2017
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Only print the plane name for planes that actually exist. Also
Also include the pipe in the plane name.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
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
More information about the Intel-gfx
mailing list