[Nouveau] [PATCH 01/10] drm/nouveau/nvkm: fini object children in reverse order

Lyude Paul lyude at redhat.com
Tue Jun 13 21:52:33 UTC 2023


For the whole series:

Reviewed-by: Lyude Paul <lyude at redhat.com>

On Thu, 2023-05-25 at 10:30 +1000, Ben Skeggs wrote:
> From: Ben Skeggs <bskeggs at redhat.com>
> 
> 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 at redhat.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/core/object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat



More information about the Nouveau mailing list