drm_local_map_t *mmio;
drm_local_map_t *fb;
+ //TODO: Remove me, I'm bogus :)
int cur_fifo;
struct nouveau_object *fb_obj;
int cmdbuf_ch_size;
struct mem_block* cmdbuf_alloc;
+ int fifo_alloc_count;
struct nouveau_fifo fifos[NV_MAX_FIFO_NUMBER];
struct nouveau_object_store objs;
/* RAMFC and RAMRO offsets */
dev_priv->cmdbuf_ch_size = (uint32_t)cb->size / nouveau_fifo_number(dev);
dev_priv->cmdbuf_alloc = cb;
- nouveau_fifo_init(dev);
DRM_INFO("DMA command buffer is %dKiB at 0x%08x(%s)\n",
(uint32_t)cb->size>>10, (uint32_t)cb->start,
config->cmdbuf.location == NOUVEAU_MEM_FB ? "VRAM" : "AGP");
if (ret)
return ret;
}
+ /* Initialise PFIFO regs */
+ if (!dev_priv->fifo_alloc_count)
+ nouveau_fifo_init(dev);
/*
* Alright, here is the full story
/* FIFO has no objects yet */
dev_priv->fifos[init->channel].objs = NULL;
+ dev_priv->fifo_alloc_count++;
DRM_INFO("%s: initialised FIFO %d\n", __func__, init->channel);
return 0;
/* reenable the fifo caches */
NV_WRITE(NV_PFIFO_CACHES, 0x00000001);
+
+ dev_priv->fifo_alloc_count--;
}
/* cleanups all the fifos from filp */