diff options
author | Dave Airlie <airlied@redhat.com> | 2012-04-02 06:53:06 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-23 05:46:55 -0400 |
commit | 22b33e8ed0e38b8ddcf082e35580f2e67a3a0262 (patch) | |
tree | d6e51cc2c960d8ee5f0b2fa598971d985031532e /drivers/gpu/drm/nouveau/nouveau_sgdma.c | |
parent | 129b78bfca591e736e56a294f0e357d73d938f7e (diff) |
nouveau: add PRIME support
This adds prime->fd and fd->prime support to nouveau,
it passes the SG object to TTM, and then populates the
GART entries using it.
v2: add stubbed kmap + use new function to fill out pages array
for faulting + add reimport test.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_sgdma.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_sgdma.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 47f245edf53..27aac9ada73 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c | |||
@@ -290,7 +290,10 @@ nv50_sgdma_bind(struct ttm_tt *ttm, struct ttm_mem_reg *mem) | |||
290 | struct nouveau_mem *node = mem->mm_node; | 290 | struct nouveau_mem *node = mem->mm_node; |
291 | 291 | ||
292 | /* noop: bound in move_notify() */ | 292 | /* noop: bound in move_notify() */ |
293 | node->pages = nvbe->ttm.dma_address; | 293 | if (ttm->sg) { |
294 | node->sg = ttm->sg; | ||
295 | } else | ||
296 | node->pages = nvbe->ttm.dma_address; | ||
294 | return 0; | 297 | return 0; |
295 | } | 298 | } |
296 | 299 | ||