@@ -159,6 +159,8 @@ __igt_parse_drm_fdinfo(int dir, const char *fd, struct drm_client_fdinfo *info,
info->capacity[idx] = 1;
info->busy[idx] = val;
info->num_engines++;
+ if (idx > info->last_engine_index)
+ info->last_engine_index = idx;
}
} else if (!strncmp(l, "drm-engine-capacity-", 20)) {
idx = parse_engine(l, info,
@@ -36,6 +36,7 @@ struct drm_client_fdinfo {
unsigned long id;
unsigned int num_engines;
+ unsigned int last_engine_index;
unsigned int capacity[16];
char names[16][256];
uint64_t busy[16];