[PATCH i-g-t v3 06/13] lib/igt_drm_fdinfo: Parse drm-cycles
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Tue May 7 01:11:07 UTC 2024
On Fri, May 03, 2024 at 11:46:36PM -0700, Lucas De Marchi wrote:
>Read drm-cycles from fdinfo and save it for later use. Like with the mem
>regions, allow the number of engines to be updated regardless if
>drm-engine-* or drm-cycles-* shows up first.
>
>Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>---
> lib/igt_drm_fdinfo.c | 29 +++++++++++++++++++++--------
> lib/igt_drm_fdinfo.h | 4 ++++
> 2 files changed, 25 insertions(+), 8 deletions(-)
>
>diff --git a/lib/igt_drm_fdinfo.c b/lib/igt_drm_fdinfo.c
>index 2d8ad8b81..f0a30677c 100644
>--- a/lib/igt_drm_fdinfo.c
>+++ b/lib/igt_drm_fdinfo.c
>@@ -190,6 +190,21 @@ out:
> } \
> } while (0)
>
>+#define UPDATE_ENGINE(idx, engine, val) \
>+ do { \
>+ if (idx >= 0) { \
>+ info->engine[idx] = val; \
>+ if (!info->capacity[idx]) \
>+ info->capacity[idx] = 1; \
nit^: extra tab
LGTM,
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Umesh
More information about the igt-dev
mailing list