[PATCH] drm/xe/gsc: Check for possible err in forcewake GT
Tejas Upadhyay
tejas.upadhyay at intel.com
Tue Mar 12 14:24:24 UTC 2024
GT Forcewake can fail, check for success before
moving forward
Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
---
drivers/gpu/drm/xe/xe_gsc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c
index d9aa815a5bc2..a5ee1b39f4a7 100644
--- a/drivers/gpu/drm/xe/xe_gsc.c
+++ b/drivers/gpu/drm/xe/xe_gsc.c
@@ -287,7 +287,11 @@ static void gsc_work(struct work_struct *work)
spin_unlock_irq(&gsc->lock);
xe_pm_runtime_get(xe);
- xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC);
+ ret = xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC);
+ if (ret) {
+ xe_pm_runtime_put(xe);
+ return;
+ }
if (actions & GSC_ACTION_FW_LOAD) {
ret = gsc_upload_and_init(gsc);
--
2.25.1
More information about the Intel-xe
mailing list