Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/loongson: use GEM references instead of TTMs

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

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20240723121750.2086-3-christian.koenig@amd.com

+2 -6
+2 -6
drivers/gpu/drm/loongson/lsdc_ttm.c
··· 341 341 342 342 void lsdc_bo_ref(struct lsdc_bo *lbo) 343 343 { 344 - struct ttm_buffer_object *tbo = &lbo->tbo; 345 - 346 - ttm_bo_get(tbo); 344 + drm_gem_object_get(&lbo->tbo.base); 347 345 } 348 346 349 347 void lsdc_bo_unref(struct lsdc_bo *lbo) 350 348 { 351 - struct ttm_buffer_object *tbo = &lbo->tbo; 352 - 353 - ttm_bo_put(tbo); 349 + drm_gem_object_put(&lbo->tbo.base); 354 350 } 355 351 356 352 int lsdc_bo_kmap(struct lsdc_bo *lbo)