Commit a8b214f0 authored by Ben Skeggs's avatar Ben Skeggs Committed by Francisco Jerez

drm/nouveau: fix use of drm_mm_node in semaphore object

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7a45d764
...@@ -450,12 +450,11 @@ nouveau_fence_channel_init(struct nouveau_channel *chan) ...@@ -450,12 +450,11 @@ nouveau_fence_channel_init(struct nouveau_channel *chan)
/* Create a DMA object for the shared cross-channel sync area. */ /* Create a DMA object for the shared cross-channel sync area. */
if (USE_SEMA(dev)) { 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, ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY,
mem->start << PAGE_SHIFT, mem->start << PAGE_SHIFT,
mem->size << PAGE_SHIFT, mem->size, NV_MEM_ACCESS_RW,
NV_MEM_ACCESS_RW,
NV_MEM_TARGET_VRAM, &obj); NV_MEM_TARGET_VRAM, &obj);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment