summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/intel_gpu_top.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index d1149eb8..72ad7cbe 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1640,6 +1640,11 @@ int main(int argc, char **argv)
} else if (ioctl(0, TIOCGWINSZ, &ws) != -1) {
con_w = ws.ws_col;
con_h = ws.ws_row;
+ if (con_w == 0 && con_h == 0) {
+ /* Serial console. */
+ con_w = 80;
+ con_h = 24;
+ }
}
pmu_sample(engines);