Skip to content

Commit bb99c51

Browse files
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 <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6c9e14e commit bb99c51

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/gpu/drm/loongson/lsdc_ttm.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,12 @@ void lsdc_bo_unpin(struct lsdc_bo *lbo)
341341

342342
void lsdc_bo_ref(struct lsdc_bo *lbo)
343343
{
344-
struct ttm_buffer_object *tbo = &lbo->tbo;
345-
346-
ttm_bo_get(tbo);
344+
drm_gem_object_get(&lbo->tbo.base);
347345
}
348346

349347
void lsdc_bo_unref(struct lsdc_bo *lbo)
350348
{
351-
struct ttm_buffer_object *tbo = &lbo->tbo;
352-
353-
ttm_bo_put(tbo);
349+
drm_gem_object_put(&lbo->tbo.base);
354350
}
355351

356352
int lsdc_bo_kmap(struct lsdc_bo *lbo)

0 commit comments

Comments
 (0)