drm/xe: Use separate rpm lockdep map for non-d3cold-capable devices
Subsystems (2)
Thomas Hellström
maintainerPATCH v3 1/1 drm/xe: Use separate rpm lockdep map for non-d3cold-capable devices
For non-d3cold-capable devices we'd like to be able to wake up the device from reclaim. In particular, for Lunar Lake we'd like to be able to blit CCS metadata to system at shrink time; at least from kswapd where it's reasonable OK to wait for rpm resume and a preceding rpm suspend.
Therefore use a separate lockdep map for such devices and prime it reclaim-tainted.
v2:
- Rename lockmap acquire- and release functions. (Rodrigo Vivi).
- Reinstate the old xe_pm_runtime_lockdep_prime() function and rename it to xe_rpm_might_enter_cb(). (Matthew Auld).
- Introduce a separate xe_pm_runtime_lockdep_prime function called from module init for known required locking orders.
v3:
- Actually hook up the prime function at module init.
--- drivers/gpu/drm/xe/xe_module.c | 9 ++++ drivers/gpu/drm/xe/xe_pm.c | 79 ++++++++++++++++++++++++++++------ drivers/gpu/drm/xe/xe_pm.h | 1 + 3 files changed, 75 insertions(+), 14 deletions(-)
drivers/gpu/drm/xe/xe_module.c +9 -0
@@ -11,6 +11,7 @@#include "xe_drv.h" #include "xe_hw_fence.h" #include "xe_pci.h" +#include "xe_pm.h" #include "xe_observation.h" #include "xe_sched_job.h"
@@ -69,6 +70,10 @@ struct init_funcs {void (*exit)(void ); }; +static void xe_dummy_exit (void ) +{ +} +static const struct init_funcs init_funcs[] = { { .init = xe_hw_fence_module_init,
@@ -86,6 +91,10 @@ static const struct init_funcs init_funcs[] = { .init = xe_observation_sysctl_register, .exit = xe_observation_sysctl_unregister, }, + { + .init = xe_pm_module_init, + .exit = xe_dummy_exit, + }, };static int __init xe_init (void )
drivers/gpu/drm/xe/xe_pm.c +65 -14
143 lines not on this page · raw message
drivers/gpu/drm/xe/xe_pm.h +1 -0
@@ -32,5 +32,6 @@ void xe_pm_assert_unbounded_bridge(struct xe_device *xe);int xe_pm_set_vram_threshold (struct xe_device *xe,u32 threshold);void xe_pm_d3cold_allowed_toggle (struct xe_device *xe);struct task_struct *xe_pm_read_callback_task (struct xe_device *xe); +int xe_pm_module_init (void );#endif
Signature · 1 line
2.44.0
Patchwork
CI✗ CI.Patch_applied: failure for drm/xe: Use separate rpm lockdep map for non-d3cold-capable devices (rev2)
== Series Details ==
== Series Details ==
Series: drm/xe: Use separate rpm lockdep map for non-d3cold-capable devices (rev2)
URL : https://patchwork.freedesktop.org/series/137730/
State : failure
== Summary ==
=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: f83dc30335e9 drm-tip: 2024y-08m-25d-23h-58m-42s UTC integration manifest === git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_pm.c:437
error: drivers/gpu/drm/xe/xe_pm.c: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Applying: drm/xe: Use separate rpm lockdep map for non-d3cold-capable devices Patch failed at 0001 drm/xe: Use separate rpm lockdep map for non-d3cold-capable devices