Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space
@ 2023-12-13 14:42 Christian König
  2023-12-13 14:42 ` [PATCH 2/4] drm/ttm: replace busy placement with flags v3 Christian König
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Christian König @ 2023-12-13 14:42 UTC (permalink / raw)
  To: dri-devel, intel-gfx

Only convert it to ENOMEM in ttm_bo_validate.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index edf10618fe2b..8c1eaa74fa21 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -830,7 +830,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
 			goto error;
 	}
 
-	ret = -ENOMEM;
+	ret = -ENOSPC;
 	if (!type_found) {
 		pr_err(TTM_PFX "No compatible memory type found\n");
 		ret = -EINVAL;
@@ -916,6 +916,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
 		return -EINVAL;
 
 	ret = ttm_bo_move_buffer(bo, placement, ctx);
+	/* For backward compatibility with userspace */
+	if (ret == -ENOSPC)
+		return -ENOMEM;
 	if (ret)
 		return ret;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-12-16  0:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König
2023-12-13 14:42 ` [PATCH 2/4] drm/ttm: replace busy placement with flags v3 Christian König
2023-12-13 14:42 ` [PATCH 3/4] drm/ttm: improve idle/busy handling Christian König
2023-12-14  8:30   ` kernel test robot
2023-12-16  0:44   ` kernel test robot
2023-12-13 14:42 ` [PATCH 4/4] drm/amdgpu: use GTT only as fallback for VRAM|GTT Christian König
2023-12-13 14:50 ` [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König
2023-12-13 21:24 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork
2023-12-13 21:24 ` ✗ Fi.CI.SPARSE: " Patchwork
2023-12-13 21:47 ` ✓ Fi.CI.BAT: success " Patchwork
2023-12-13 22:42 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox