[PATCH 3/9] drm/nouveau: use GEM references instead of TTMs

Christian König ckoenig.leichtzumerken at gmail.com
Tue Jul 16 12:35:13 UTC 2024


Instead of a TTM reference grab a GEM reference whenever necessary.

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 drivers/gpu/drm/nouveau/nouveau_bo.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h
index 4e891752c255..74035b16a381 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.h
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.h
@@ -63,13 +63,13 @@ nouveau_bo_ref(struct nouveau_bo *ref, struct nouveau_bo **pnvbo)
 	prev = *pnvbo;
 
 	if (ref) {
-		ttm_bo_get(&ref->bo);
+		drm_gem_object_get(&ref->bo.base);
 		*pnvbo = nouveau_bo(&ref->bo);
 	} else {
 		*pnvbo = NULL;
 	}
 	if (prev)
-		ttm_bo_put(&prev->bo);
+		drm_gem_object_put(&prev->bo.base);
 
 	return 0;
 }
-- 
2.34.1



More information about the dri-devel mailing list