drm/nouveau: fix use of drm_mm_node in semaphore object
authorBen Skeggs <bskeggs@redhat.com>
Thu, 2 Dec 2010 23:05:20 +0000 (09:05 +1000)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 8 Dec 2010 02:00:38 +0000 (03:00 +0100)
At some point in the future, this bo won't necessarily be backed by
a drm_mm_node, so use the start/size fields of the ttm_mem_reg instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_fence.c

index 3d50d5c3b0fe0b82ee2056fa09bf83019073ffb9..01290d2952ae52c9868a2d73cbc189c716f6993d 100644 (file)
@@ -450,12 +450,11 @@ nouveau_fence_channel_init(struct nouveau_channel *chan)
 
        /* Create a DMA object for the shared cross-channel sync area. */
        if (USE_SEMA(dev)) {
-               struct drm_mm_node *mem = dev_priv->fence.bo->bo.mem.mm_node;
+               struct ttm_mem_reg *mem = &dev_priv->fence.bo->bo.mem;
 
                ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY,
                                             mem->start << PAGE_SHIFT,
-                                            mem->size << PAGE_SHIFT,
-                                            NV_MEM_ACCESS_RW,
+                                            mem->size, NV_MEM_ACCESS_RW,
                                             NV_MEM_TARGET_VRAM, &obj);
                if (ret)
                        return ret;