]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/nouveau: Initialize GEM object before TTM object
authorThierry Reding <treding@nvidia.com>
Wed, 14 Aug 2019 09:00:48 +0000 (11:00 +0200)
committerThierry Reding <treding@nvidia.com>
Wed, 21 Aug 2019 11:38:28 +0000 (13:38 +0200)
commit019cbd4a4feb3aa3a917d78e7110e3011bbff6d5
treee447e3d177c1b6d5817087fbba707beb16ca24c2
parent343bbb1a7f88df49a7166cd949d6cd3b4d3f0919
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
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.h
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_prime.c