Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Always check force_wake_get return code
@ 2024-06-03 11:30 Tejas Upadhyay
  2024-06-03 18:56 ` Daniele Ceraolo Spurio
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Tejas Upadhyay @ 2024-06-03 11:30 UTC (permalink / raw)
  To: intel-xe; +Cc: Daniele Ceraolo Spurio, Tejas Upadhyay

A force_wake_get failure means that the HW might not be awake for the
access we're doing; this can lead to an immediate error or it can be a
more subtle problem.

In this case, user has asked information and in case of forcewake
failure, it might lead to wrong information, so return in case of
error.

Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
---
 drivers/gpu/drm/xe/xe_drm_client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 4a19b771e3a0..e050fc6d8dd7 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -264,7 +264,8 @@ static void show_run_ticks(struct drm_printer *p, struct drm_file *file)
 		if (!hwe)
 			continue;
 
-		xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
+		if (xe_force_wake_get(gt_to_fw(gt), XE_FW_GT))
+			return;
 		gpu_timestamp = xe_hw_engine_read_timestamp(hwe);
 		xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 		break;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-04 21:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-03 11:30 [PATCH] drm/xe: Always check force_wake_get return code Tejas Upadhyay
2024-06-03 18:56 ` Daniele Ceraolo Spurio
2024-06-03 19:39   ` Lucas De Marchi
2024-06-04 18:31     ` Rodrigo Vivi
2024-06-04 16:46 ` ✓ CI.Patch_applied: success for drm/xe: Always check force_wake_get return code (rev3) Patchwork
2024-06-04 16:46 ` ✓ CI.checkpatch: " Patchwork
2024-06-04 16:47 ` ✓ CI.KUnit: " Patchwork
2024-06-04 16:58 ` ✓ CI.Build: " Patchwork
2024-06-04 16:59 ` ✗ CI.Hooks: failure " Patchwork
2024-06-04 17:00 ` ✓ CI.checksparse: success " Patchwork
2024-06-04 17:24 ` ✓ CI.BAT: " Patchwork
2024-06-04 21:01 ` ✗ CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox