* [PATCH] drm/nouveau: fix bad ret code in nouveau_bo_move_prep
@ 2025-10-07 16:17 Shuhao Fu
2025-10-07 19:52 ` Petr Vorel
2025-10-07 20:17 ` Danilo Krummrich
0 siblings, 2 replies; 3+ messages in thread
From: Shuhao Fu @ 2025-10-07 16:17 UTC (permalink / raw)
To: Lyude Paul, Danilo Krummrich; +Cc: dri-devel, nouveau, linux-kernel
In `nouveau_bo_move_prep`, if `nouveau_mem_map` fails, an error code
should be returned. Currently, it returns zero even if vmm addr is not
correctly mapped.
Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
Fixes: 9ce523cc3bf2 ("drm/nouveau: separate buffer object backing memory from nvkm structures")
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index b96f0555ca14..f26562eafffc 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -929,7 +929,7 @@ nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo,
nvif_vmm_put(vmm, &old_mem->vma[1]);
nvif_vmm_put(vmm, &old_mem->vma[0]);
}
- return 0;
+ return ret;
}
static int
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/nouveau: fix bad ret code in nouveau_bo_move_prep
2025-10-07 16:17 [PATCH] drm/nouveau: fix bad ret code in nouveau_bo_move_prep Shuhao Fu
@ 2025-10-07 19:52 ` Petr Vorel
2025-10-07 20:17 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2025-10-07 19:52 UTC (permalink / raw)
To: Shuhao Fu
Cc: Lyude Paul, Danilo Krummrich, dri-devel, nouveau, linux-kernel,
Ben Skeggs
Hi,
[ Cc Ben ]
> In `nouveau_bo_move_prep`, if `nouveau_mem_map` fails, an error code
> should be returned. Currently, it returns zero even if vmm addr is not
> correctly mapped.
> Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
> Fixes: 9ce523cc3bf2 ("drm/nouveau: separate buffer object backing memory from nvkm structures")
> ---
> drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index b96f0555ca14..f26562eafffc 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -929,7 +929,7 @@ nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo,
> nvif_vmm_put(vmm, &old_mem->vma[1]);
> nvif_vmm_put(vmm, &old_mem->vma[0]);
> }
> - return 0;
> + return ret;
LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/nouveau: fix bad ret code in nouveau_bo_move_prep
2025-10-07 16:17 [PATCH] drm/nouveau: fix bad ret code in nouveau_bo_move_prep Shuhao Fu
2025-10-07 19:52 ` Petr Vorel
@ 2025-10-07 20:17 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Danilo Krummrich @ 2025-10-07 20:17 UTC (permalink / raw)
To: Shuhao Fu; +Cc: Lyude Paul, dri-devel, nouveau, linux-kernel
On 10/7/25 6:17 PM, Shuhao Fu wrote:
> In `nouveau_bo_move_prep`, if `nouveau_mem_map` fails, an error code
> should be returned. Currently, it returns zero even if vmm addr is not
> correctly mapped.
>
> Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
> Fixes: 9ce523cc3bf2 ("drm/nouveau: separate buffer object backing memory from nvkm structures")
Applied to drm-misc-fixes, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-07 20:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-07 16:17 [PATCH] drm/nouveau: fix bad ret code in nouveau_bo_move_prep Shuhao Fu
2025-10-07 19:52 ` Petr Vorel
2025-10-07 20:17 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).