Commit 5d118681 authored by Rodrigo Vivi's avatar Rodrigo Vivi

drm/xe: Remove mem_access from suspend and resume functions

At these points, we are sure that device is awake in D0.
Likely in the middle of the transition, but awake. So,
these extra protections are useless. Let's remove it and
continue with the killing of xe_device_mem_access.
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240222163937.138342-12-rodrigo.vivi@intel.com
parent 48fef288
...@@ -711,13 +711,11 @@ void xe_gt_reset_async(struct xe_gt *gt) ...@@ -711,13 +711,11 @@ void xe_gt_reset_async(struct xe_gt *gt)
void xe_gt_suspend_prepare(struct xe_gt *gt) void xe_gt_suspend_prepare(struct xe_gt *gt)
{ {
xe_device_mem_access_get(gt_to_xe(gt));
XE_WARN_ON(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));
xe_uc_stop_prepare(&gt->uc); xe_uc_stop_prepare(&gt->uc);
XE_WARN_ON(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));
xe_device_mem_access_put(gt_to_xe(gt));
} }
int xe_gt_suspend(struct xe_gt *gt) int xe_gt_suspend(struct xe_gt *gt)
...@@ -726,7 +724,6 @@ int xe_gt_suspend(struct xe_gt *gt) ...@@ -726,7 +724,6 @@ int xe_gt_suspend(struct xe_gt *gt)
xe_gt_sanitize(gt); xe_gt_sanitize(gt);
xe_device_mem_access_get(gt_to_xe(gt));
err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (err) if (err)
goto err_msg; goto err_msg;
...@@ -736,7 +733,6 @@ int xe_gt_suspend(struct xe_gt *gt) ...@@ -736,7 +733,6 @@ int xe_gt_suspend(struct xe_gt *gt)
goto err_force_wake; goto err_force_wake;
XE_WARN_ON(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));
xe_device_mem_access_put(gt_to_xe(gt));
xe_gt_info(gt, "suspended\n"); xe_gt_info(gt, "suspended\n");
return 0; return 0;
...@@ -744,7 +740,6 @@ int xe_gt_suspend(struct xe_gt *gt) ...@@ -744,7 +740,6 @@ int xe_gt_suspend(struct xe_gt *gt)
err_force_wake: err_force_wake:
XE_WARN_ON(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));
err_msg: err_msg:
xe_device_mem_access_put(gt_to_xe(gt));
xe_gt_err(gt, "suspend failed (%pe)\n", ERR_PTR(err)); xe_gt_err(gt, "suspend failed (%pe)\n", ERR_PTR(err));
return err; return err;
...@@ -754,7 +749,6 @@ int xe_gt_resume(struct xe_gt *gt) ...@@ -754,7 +749,6 @@ int xe_gt_resume(struct xe_gt *gt)
{ {
int err; int err;
xe_device_mem_access_get(gt_to_xe(gt));
err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); err = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (err) if (err)
goto err_msg; goto err_msg;
...@@ -764,7 +758,6 @@ int xe_gt_resume(struct xe_gt *gt) ...@@ -764,7 +758,6 @@ int xe_gt_resume(struct xe_gt *gt)
goto err_force_wake; goto err_force_wake;
XE_WARN_ON(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));
xe_device_mem_access_put(gt_to_xe(gt));
xe_gt_info(gt, "resumed\n"); xe_gt_info(gt, "resumed\n");
return 0; return 0;
...@@ -772,7 +765,6 @@ int xe_gt_resume(struct xe_gt *gt) ...@@ -772,7 +765,6 @@ int xe_gt_resume(struct xe_gt *gt)
err_force_wake: err_force_wake:
XE_WARN_ON(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));
err_msg: err_msg:
xe_device_mem_access_put(gt_to_xe(gt));
xe_gt_err(gt, "resume failed (%pe)\n", ERR_PTR(err)); xe_gt_err(gt, "resume failed (%pe)\n", ERR_PTR(err));
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment