Skip to content

Commit 489d195

Browse files
icklejlahtine-intel
authored andcommitted
drm/i915/gem: Leave reloading kernel context on resume to GT
As we already do reload the kernel context in intel_gt_resume, repeating that action inside i915_gem_resume() as well is redundant. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit c8f6cfc) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent fd6fe08 commit 489d195

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

drivers/gpu/drm/i915/gem/i915_gem_pm.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,6 @@
1111

1212
#include "i915_drv.h"
1313

14-
static bool switch_to_kernel_context_sync(struct intel_gt *gt)
15-
{
16-
bool result = !intel_gt_is_wedged(gt);
17-
18-
if (intel_gt_wait_for_idle(gt, I915_GEM_IDLE_TIMEOUT) == -ETIME) {
19-
/* XXX hide warning from gem_eio */
20-
if (i915_modparams.reset) {
21-
dev_err(gt->i915->drm.dev,
22-
"Failed to idle engines, declaring wedged!\n");
23-
GEM_TRACE_DUMP();
24-
}
25-
26-
/*
27-
* Forcibly cancel outstanding work and leave
28-
* the gpu quiet.
29-
*/
30-
intel_gt_set_wedged(gt);
31-
result = false;
32-
}
33-
34-
if (intel_gt_pm_wait_for_idle(gt))
35-
result = false;
36-
37-
return result;
38-
}
39-
4014
static void user_forcewake(struct intel_gt *gt, bool suspend)
4115
{
4216
int count = atomic_read(&gt->user_wakeref);
@@ -158,10 +132,6 @@ void i915_gem_resume(struct drm_i915_private *i915)
158132
if (intel_gt_resume(&i915->gt))
159133
goto err_wedged;
160134

161-
/* Always reload a context for powersaving. */
162-
if (!switch_to_kernel_context_sync(&i915->gt))
163-
goto err_wedged;
164-
165135
user_forcewake(&i915->gt, false);
166136

167137
out_unlock:

0 commit comments

Comments
 (0)