diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-02-11 12:35:35 +0300 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-02-11 12:35:35 +0300 |
commit | d588100baa28dae6a5c32d02bfe744d0792ed2ad (patch) | |
tree | 3be3984cea35a07b4259f8ebe55ce0e52e416d1c /drivers/gpu/drm/nouveau/nouveau_bo.h | |
parent | 7bd0a3271e239d34bae5fa51e4f44ed9ee861a59 (diff) | |
parent | 16065fcdd19ddb9e093192914ac863884f308766 (diff) | |
download | linux-d588100baa28dae6a5c32d02bfe744d0792ed2ad.tar.xz |
Merge drm/drm-next into drm-misc-next
We need to backmerge drm-next to fix the komeda build failure.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h index 73c48440d4d7..846f4bdec0de 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.h +++ b/drivers/gpu/drm/nouveau/nouveau_bo.h @@ -61,12 +61,14 @@ nouveau_bo_ref(struct nouveau_bo *ref, struct nouveau_bo **pnvbo) return -EINVAL; prev = *pnvbo; - *pnvbo = ref ? nouveau_bo(ttm_bo_reference(&ref->bo)) : NULL; - if (prev) { - struct ttm_buffer_object *bo = &prev->bo; - - ttm_bo_unref(&bo); + if (ref) { + ttm_bo_get(&ref->bo); + *pnvbo = nouveau_bo(&ref->bo); + } else { + *pnvbo = NULL; } + if (prev) + ttm_bo_put(&prev->bo); return 0; } |