[PATCH 2/4] tests/intel/xe_query: Implement reset stats query test

2025-02-21 Thread Jonathan Cavitt
Add initial test to xe query test suite that exercises the reset stats query. The new test outputs the results of the query. Signed-off-by: Jonathan Cavitt --- tests/intel/xe_query.c | 85 ++ 1 file changed, 85 insertions(+) diff --git a/tests/intel

[PATCH 4/4] tests/intel/xe_query: Exercise ban count in reset stats

2025-02-21 Thread Jonathan Cavitt
Extend the reset stats query tests to exercise the ban count value. Assert that the ban count increases when a pagefault occurs. Signed-off-by: Jonathan Cavitt --- tests/intel/xe_query.c | 202 + 1 file changed, 202 insertions(+) diff --git a/tests/intel

[PATCH 0/4] tests/intel/xe_query: Add per drm client reset stats tests

2025-02-21 Thread Jonathan Cavitt
Add tests that exercise the xe reset stats query. The current tests simply output the result of the tests and assert that the reset and ban counters properly increment. Signed-off-by: Jonathan Cavitt Jonathan Cavitt (4): drm-uapi/xe: Declare reset stats query tests/intel/xe_query

[PATCH 1/4] drm-uapi/xe: Declare reset stats query

2025-02-21 Thread Jonathan Cavitt
Align with 20250220203832.130430-1-jonathan.cav...@intel.com Add initial declarations for the reset stats query, including necessary structures and IOCTL macros. Signed-off-by: Jonathan Cavitt --- include/drm-uapi/xe_drm.h | 50 +++ 1 file changed, 50

[PATCH 3/4] tests/intel/xe_query: Exercise reset count in reset stats

2025-02-21 Thread Jonathan Cavitt
Extend the reset stats query tests to exercise the reset count value. Assert that the reset count increases when an engine reset occurs. Signed-off-by: Jonathan Cavitt --- tests/intel/xe_query.c | 52 ++ 1 file changed, 52 insertions(+) diff --git a

[PATCH v4 5/6] drm/xe/xe_query: Pass drm file to query funcs

2025-02-20 Thread Jonathan Cavitt
Pass the drm file to the query funcs in xe_query.c. This will be necessary for a future query. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 39 --- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/xe

[PATCH v4 3/6] drm/xe/xe_drm_client: Add per drm client pagefault info

2025-02-20 Thread Jonathan Cavitt
were not caused by said pagefault after the reset. v2: Remove exec queue from blame list on destroy and recreate (Joonas) v3: Do not print as part of xe_drm_client_fdinfo (Joonas) v4: Fix formatting and kzalloc during lock warnings Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe

[PATCH v4 2/6] drm/xe/xe_gt_pagefault: Migrate pagefault struct to header

2025-02-20 Thread Jonathan Cavitt
Migrate the pagefault struct from xe_gt_pagefault.c to the xe_gt_pagefault.h header file, along with the associated enum values. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_gt_pagefault.c | 27 --- drivers/gpu/drm/xe/xe_gt_pagefault.h | 28

[PATCH v4 4/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-20 Thread Jonathan Cavitt
Add a counter to xe_drm_client that tracks the number of times the engine has been reset since the drm client was created. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.h | 2 ++ drivers/gpu/drm/xe/xe_guc_submit.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion

[PATCH v4 1/6] drm/xe/xe_exec_queue: Add ID param to exec queue struct

2025-02-20 Thread Jonathan Cavitt
Add the exec queue id to the exec queue struct. This is useful for performing a reverse lookup into the xef->exec_queue xarray. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_exec_queue.c | 1 + drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 ++ 2 files changed, 3 inserti

[PATCH v4 6/6] drm/xe/xe_query: Add support for per-drm-client reset stat querying

2025-02-20 Thread Jonathan Cavitt
if CONFIG_PROC_FS is not set in the kernel config, as it is required to trace the reset count and exec queue bans. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 70 +++ include/uapi/drm/xe_drm.h | 50 + 2

[PATCH v4 0/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-20 Thread Jonathan Cavitt
: 20250220203747.130371-1-jonathan.cav...@intel.com Signed-off-by: Jonathan Cavitt Suggested-by: Joonas Lahtinen CC: Tvrtko Ursulin CC: Lucas de Marchi CC: Matthew Brost CC: Simona Vetter Jonathan Cavitt (6): drm/xe/xe_exec_queue: Add ID param to exec queue struct drm/xe/xe_gt_pagefault: Migrate

[PATCH] tests/intel/xe_query: Add per drm client reset stats tests

2025-02-20 Thread Jonathan Cavitt
Add tests that exercise the xe reset stats query. The current tests simply output the result of the tests and assert that the reset and ban counters properly increment. Signed-off-by: Jonathan Cavitt --- include/drm-uapi/xe_drm.h | 50 ++ tests/intel/xe_query.c| 339

[PATCH v4 2/6] drm/xe/xe_gt_pagefault: Migrate pagefault struct to header

2025-02-19 Thread Jonathan Cavitt
Migrate the pagefault struct from xe_gt_pagefault.c to the xe_gt_pagefault.h header file, along with the associated enum values. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_gt_pagefault.c | 27 --- drivers/gpu/drm/xe/xe_gt_pagefault.h | 28

[PATCH v4 5/6] drm/xe/xe_query: Pass drm file to query funcs

2025-02-19 Thread Jonathan Cavitt
Pass the drm file to the query funcs in xe_query.c. This will be necessary for a future query. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 39 --- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/xe

[PATCH v4 3/6] drm/xe/xe_drm_client: Add per drm client pagefault info

2025-02-19 Thread Jonathan Cavitt
were not caused by said pagefault after the reset. v2: Remove exec queue from blame list on destroy and recreate (Joonas) v3: Do not print as part of xe_drm_client_fdinfo (Joonas) v4: Fix formatting and kzalloc during lock warnings Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe

[PATCH v4 0/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-19 Thread Jonathan Cavitt
Cavitt Suggested-by: Joonas Lahtinen CC: Tvrtko Ursulin CC: Lucas de Marchi CC: Matthew Brost CC: Simona Vetter Jonathan Cavitt (6): drm/xe/xe_exec_queue: Add ID param to exec queue struct drm/xe/xe_gt_pagefault: Migrate pagefault struct to header drm/xe/xe_drm_client: Add per drm

[PATCH v4 4/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-19 Thread Jonathan Cavitt
Add a counter to xe_drm_client that tracks the number of times the engine has been reset since the drm client was created. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.h | 2 ++ drivers/gpu/drm/xe/xe_guc_submit.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion

[PATCH v4 1/6] drm/xe/xe_exec_queue: Add ID param to exec queue struct

2025-02-19 Thread Jonathan Cavitt
Add the exec queue id to the exec queue struct. This is useful for performing a reverse lookup into the xef->exec_queue xarray. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_exec_queue.c | 1 + drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 ++ 2 files changed, 3 inserti

[PATCH v4 6/6] drm/xe/xe_query: Add support for per-drm-client reset stat querying

2025-02-19 Thread Jonathan Cavitt
if CONFIG_PROC_FS is not set in the kernel config, as it is required to trace the reset count and exec queue bans. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 70 +++ include/uapi/drm/xe_drm.h | 50 + 2

[PATCH v3 0/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-19 Thread Jonathan Cavitt
query, rather than coopting xe_drm_client_fdinfo (Joonas) v3: Report EOPNOTSUPP during the reset stats query if CONFIG_PROC_FS is not set in the kernel config, as it is required to trace the reset count and exec queue bans. Signed-off-by: Jonathan Cavitt Suggested-by: Joonas Lahtinen CC

[PATCH v3 6/6] drm/xe/xe_query: Add support for per-drm-client reset stat querying

2025-02-19 Thread Jonathan Cavitt
if CONFIG_PROC_FS is not set in the kernel config, as it is required to trace the reset count and exec queue bans. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 70 +++ include/uapi/drm/xe_drm.h | 50 + 2

[PATCH v3 1/6] drm/xe/xe_exec_queue: Add ID param to exec queue struct

2025-02-19 Thread Jonathan Cavitt
Add the exec queue id to the exec queue struct. This is useful for performing a reverse lookup into the xef->exec_queue xarray. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_exec_queue.c | 1 + drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 ++ 2 files changed, 3 inserti

[PATCH v3 3/6] drm/xe/xe_drm_client: Add per drm client pagefault info

2025-02-19 Thread Jonathan Cavitt
were not caused by said pagefault after the reset. v2: Remove exec queue from blame list on destroy and recreate (Joonas) v3: Do not print as part of xe_drm_client_fdinfo (Joonas) Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.c | 66 + drivers

[PATCH v3 4/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-19 Thread Jonathan Cavitt
Add a counter to xe_drm_client that tracks the number of times the engine has been reset since the drm client was created. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.h | 2 ++ drivers/gpu/drm/xe/xe_guc_submit.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion

[PATCH v3 5/6] drm/xe/xe_query: Pass drm file to query funcs

2025-02-19 Thread Jonathan Cavitt
Pass the drm file to the query funcs in xe_query.c. This will be necessary for a future query. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 39 --- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/xe

[PATCH v3 2/6] drm/xe/xe_gt_pagefault: Migrate pagefault struct to header

2025-02-19 Thread Jonathan Cavitt
Migrate the pagefault struct from xe_gt_pagefault.c to the xe_gt_pagefault.h header file, along with the associated enum values. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_gt_pagefault.c | 27 --- drivers/gpu/drm/xe/xe_gt_pagefault.h | 28

[PATCH v2 1/6] drm/xe/xe_exec_queue: Add ID param to exec queue struct

2025-02-18 Thread Jonathan Cavitt
Add the exec queue id to the exec queue struct. This is useful for performing a reverse lookup into the xef->exec_queue xarray. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_exec_queue.c | 1 + drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 ++ 2 files changed, 3 inserti

[PATCH v2 3/6] drm/xe/xe_drm_client: Add per drm client pagefault info

2025-02-18 Thread Jonathan Cavitt
were not caused by said pagefault after the reset. v2: Remove exec queue from blame list on destroy and recreate (Joonas) v3: Do not print as part of xe_drm_client_fdinfo (Joonas) Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.c | 66 + drivers

[PATCH v2 6/6] drm/xe/xe_query: Add support for per-drm-client reset stat querying

2025-02-18 Thread Jonathan Cavitt
: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 66 +++ include/uapi/drm/xe_drm.h | 50 ++ 2 files changed, 116 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c index 3aad4737bfec..934ff0f4f992

[PATCH v2 5/6] drm/xe/xe_query: Pass drm file to query funcs

2025-02-18 Thread Jonathan Cavitt
Pass the drm file to the query funcs in xe_query.c. This will be necessary for a future query. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_query.c | 39 --- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/xe

[PATCH v2 0/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-18 Thread Jonathan Cavitt
, rather than coopting xe_drm_client_fdinfo (Joonas) Signed-off-by: Jonathan Cavitt Suggested-by: Joonas Lahtinen CC: Tvrtko Ursulin CC: Lucas de Marchi CC: Matthew Brost CC: Simona Vetter Jonathan Cavitt (6): drm/xe/xe_exec_queue: Add ID param to exec queue struct drm/xe/xe_gt_pagefault

[PATCH v2 4/6] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-18 Thread Jonathan Cavitt
Add a counter to xe_drm_client that tracks the number of times the engine has been reset since the drm client was created. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.h | 2 ++ drivers/gpu/drm/xe/xe_guc_submit.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion

[PATCH v2 2/6] drm/xe/xe_gt_pagefault: Migrate pagefault struct to header

2025-02-18 Thread Jonathan Cavitt
Migrate the pagefault struct from xe_gt_pagefault.c to the xe_gt_pagefault.h header file, along with the associated enum values. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_gt_pagefault.c | 27 --- drivers/gpu/drm/xe/xe_gt_pagefault.h | 28

[PATCH 4/4] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-14 Thread Jonathan Cavitt
Add a counter to xe_drm_client that tracks the number of times the engine has been reset since the drm client was created. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.c | 2 ++ drivers/gpu/drm/xe/xe_drm_client.h | 2 ++ drivers/gpu/drm/xe/xe_guc_submit.c | 4 +++- 3

[PATCH 1/4] drm/xe/xe_exec_queue: Add ID param to exec queue struct

2025-02-14 Thread Jonathan Cavitt
Add the exec queue id to the exec queue struct. This is useful for performing a reverse lookup into the xef->exec_queue xarray. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_exec_queue.c | 1 + drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 ++ 2 files changed, 3 inserti

[PATCH 2/4] drm/xe/xe_gt_pagefault: Migrate pagefault struct to header

2025-02-14 Thread Jonathan Cavitt
variants will be useful for debugging later. Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_gt_pagefault.c | 27 --- drivers/gpu/drm/xe/xe_gt_pagefault.h | 51 2 files changed, 51 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/xe

[PATCH 0/4] drm/xe/xe_drm_client: Add per drm client reset stats

2025-02-14 Thread Jonathan Cavitt
caused by said pagefault after the reset. Also add a tracker that counts the number of times the drm client has experienced an engine reset. Signed-off-by: Jonathan Cavitt Jonathan Cavitt (4): drm/xe/xe_exec_queue: Add ID param to exec queue struct drm/xe/xe_gt_pagefault: Migrate pagefault

[PATCH 3/4] FIXME: drm/xe/xe_drm_client: Add per drm client pagefault info

2025-02-14 Thread Jonathan Cavitt
not caused by said pagefault after the reset. v2: Remove exec queue from blame list on destroy and recreate (Joonas) Signed-off-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_drm_client.c | 128 drivers/gpu/drm/xe/xe_drm_client.h | 36 +++ drivers/gpu/drm/xe