diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-11-21 20:18:54 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-11-29 15:34:24 +0200 |
commit | 4aebd4af430a62452a6a34542c053f3c594b9408 (patch) | |
tree | 03c817135849fc7fcbf77d167d99e1afd1d1586c /tools | |
parent | 4a1e83956f70d264fa0228f35d1c42d299c910a8 (diff) |
tools/intel_watermark: Clean up SKL plane names
Only print the plane name for planes that actually exist. Also
Also include the pipe in the plane name.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/intel_watermark.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/intel_watermark.c b/tools/intel_watermark.c index bb776fb3..a18b5c8e 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++) { |