Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Check return values of functions in xe_gt_shutdown()
@ 2024-09-23 11:06 apoorva.singh
  2024-09-23 11:57 ` Jani Nikula
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: apoorva.singh @ 2024-09-23 11:06 UTC (permalink / raw)
  To: intel-xe; +Cc: himal.prasad.ghimiray, Apoorva Singh

From: Apoorva Singh <apoorva.singh@intel.com>

Check the return values of the functions xe_force_wake_get()
and xe_force_wake_put() to prevent mistakenly treating them as
void returns.

Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Signed-off-by: Apoorva Singh <apoorva.singh@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
 drivers/gpu/drm/xe/xe_gt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 274737417b0f..eaeaae1df198 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -890,9 +890,9 @@ int xe_gt_suspend(struct xe_gt *gt)
 
 void xe_gt_shutdown(struct xe_gt *gt)
 {
-	xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL));
 	do_gt_reset(gt);
-	xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
 }
 
 /**
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread
* [PATCH] drm/xe: Check return values of functions in xe_gt_shutdown()
@ 2024-09-26 11:00 apoorva.singh
  2024-09-26 11:11 ` Maarten Lankhorst
  2024-09-30 21:26 ` Matt Roper
  0 siblings, 2 replies; 18+ messages in thread
From: apoorva.singh @ 2024-09-26 11:00 UTC (permalink / raw)
  To: intel-xe; +Cc: himal.prasad.ghimiray, Apoorva Singh

From: Apoorva Singh <apoorva.singh@intel.com>

Check the return values of the functions xe_force_wake_get()
and xe_force_wake_put() to prevent mistakenly treating them as
void returns.

Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Signed-off-by: Apoorva Singh <apoorva.singh@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
 drivers/gpu/drm/xe/xe_gt.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 274737417b0f..317640554310 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -890,9 +890,12 @@ int xe_gt_suspend(struct xe_gt *gt)
 
 void xe_gt_shutdown(struct xe_gt *gt)
 {
-	xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	int err;
+	err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	xe_gt_WARN(gt, err, "Acknowledgment for domain awake timedout");
 	do_gt_reset(gt);
-	xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	err = xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	xe_gt_WARN(gt, err, "Acknowledgment for domain sleep timedout");
 }
 
 /**
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread
* [PATCH] drm/xe: Check return values of functions in xe_gt_shutdown()
@ 2024-09-20 10:53 apoorva.singh
  2024-09-23  5:09 ` Ghimiray, Himal Prasad
  0 siblings, 1 reply; 18+ messages in thread
From: apoorva.singh @ 2024-09-20 10:53 UTC (permalink / raw)
  To: intel-xe; +Cc: himal.prasad.ghimiray, Apoorva Singh

From: Apoorva Singh <apoorva.singh@intel.com>

Put check on the return value of functions xe_force_wake_get()
and xe_force_wake_put() to avoid mistakenly considering error
values as normal values.

Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Signed-off-by: Apoorva Singh <apoorva.singh@intel.com>
---
 drivers/gpu/drm/xe/xe_gt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 274737417b0f..eaeaae1df198 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -890,9 +890,9 @@ int xe_gt_suspend(struct xe_gt *gt)
 
 void xe_gt_shutdown(struct xe_gt *gt)
 {
-	xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL));
 	do_gt_reset(gt);
-	xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+	XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
 }
 
 /**
-- 
2.34.1


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

end of thread, other threads:[~2024-09-30 21:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 11:06 [PATCH] drm/xe: Check return values of functions in xe_gt_shutdown() apoorva.singh
2024-09-23 11:57 ` Jani Nikula
2024-09-26  6:48   ` Ghimiray, Himal Prasad
2024-09-25 16:13 ` ✓ CI.Patch_applied: success for drm/xe: Check return values of functions in xe_gt_shutdown() (rev2) Patchwork
2024-09-25 16:13 ` ✓ CI.checkpatch: " Patchwork
2024-09-25 16:14 ` ✓ CI.KUnit: " Patchwork
2024-09-25 16:26 ` ✓ CI.Build: " Patchwork
2024-09-25 16:28 ` ✓ CI.Hooks: " Patchwork
2024-09-25 16:30 ` ✓ CI.checksparse: " Patchwork
2024-09-25 16:57 ` ✗ CI.BAT: failure " Patchwork
2024-09-25 18:26 ` ✗ CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-09-26 11:00 [PATCH] drm/xe: Check return values of functions in xe_gt_shutdown() apoorva.singh
2024-09-26 11:11 ` Maarten Lankhorst
2024-09-26 11:19   ` Ghimiray, Himal Prasad
2024-09-30  7:21     ` Ghimiray, Himal Prasad
2024-09-30 21:26 ` Matt Roper
2024-09-20 10:53 apoorva.singh
2024-09-23  5:09 ` Ghimiray, Himal Prasad

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