summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-08-14 11:00:48 +0200
committerThierry Reding <treding@nvidia.com>2019-08-21 13:38:28 +0200
commit019cbd4a4feb3aa3a917d78e7110e3011bbff6d5 (patch)
treee447e3d177c1b6d5817087fbba707beb16ca24c2 /drivers/gpu/drm/nouveau/nouveau_bo.h
parent343bbb1a7f88df49a7166cd949d6cd3b4d3f0919 (diff)
downloadlinux-019cbd4a4feb3aa3a917d78e7110e3011bbff6d5.tar.bz2
drm/nouveau: Initialize GEM object before TTM object
TTM assumes that drivers initialize the embedded GEM object before calling the ttm_bo_init() function. This is not currently the case in the Nouveau driver. Fix this by splitting up nouveau_bo_new() into nouveau_bo_alloc() and nouveau_bo_init() so that the GEM can be initialized before TTM BO initialization when necessary. Fixes: b96f3e7c8069 ("drm/ttm: use gem vma_node") Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190814093524.GA31345@ulmo
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h
index 3ae84834bd5c..62930d834fba 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.h
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.h
@@ -71,6 +71,10 @@ nouveau_bo_ref(struct nouveau_bo *ref, struct nouveau_bo **pnvbo)
extern struct ttm_bo_driver nouveau_bo_driver;
void nouveau_bo_move_init(struct nouveau_drm *);
+struct nouveau_bo *nouveau_bo_alloc(struct nouveau_cli *, u64 size, u32 flags,
+ u32 tile_mode, u32 tile_flags);
+int nouveau_bo_init(struct nouveau_bo *, u64 size, int align, u32 flags,
+ struct sg_table *sg, struct dma_resv *robj);
int nouveau_bo_new(struct nouveau_cli *, u64 size, int align, u32 flags,
u32 tile_mode, u32 tile_flags, struct sg_table *sg,
struct dma_resv *robj,