Skip to content

Commit

Permalink
drm/nouveau/nvkm: fini object children in reverse order
Browse files Browse the repository at this point in the history
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 <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230525003106.3853741-1-skeggsb@gmail.com
  • Loading branch information
Ben Skeggs authored and Karol Herbst committed Jul 6, 2023
1 parent c69f9d9 commit 83775e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/core/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 83775e1

Please sign in to comment.