aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2023-05-25 10:30:57 +1000
committerKarol Herbst <[email protected]>2023-07-06 17:22:32 +0200
commit83775e158a3d2dc437132ab357ed6c9214ef0ae9 (patch)
tree617a00f22c1761c1590c7645eab60d5cc3f3c91a
parentc69f9d92f7ca5cf88690b63af8a7d74cad2bc668 (diff)
drm/nouveau/nvkm: fini object children in reverse order
Turns out, we're currently tearing down the disp core channel *before* the satellite channels (wndw, etc) during suspend. This makes RM return NV_ERR_NOT_SUPPORTED on attempting to reallocate the core channel on resume for some reason, but we probably shouldn't be doing it on HW either. Tear down children in the reverse of allocation order instead. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/object.c b/drivers/gpu/drm/nouveau/nvkm/core/object.c
index 301a5e5b5f7f..7c554c14e884 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/object.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/object.c
@@ -185,7 +185,7 @@ nvkm_object_fini(struct nvkm_object *object, bool suspend)
nvif_debug(object, "%s children...\n", action);
time = ktime_to_us(ktime_get());
- list_for_each_entry(child, &object->tree, head) {
+ list_for_each_entry_reverse(child, &object->tree, head) {
ret = nvkm_object_fini(child, suspend);
if (ret && suspend)
goto fail_child;