diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_fifo.c')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nv04_fifo.c | 20 | 
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_fifo.c b/drivers/gpu/drm/nouveau/nv04_fifo.c index 66fe55983b6..06cedd99c26 100644 --- a/drivers/gpu/drm/nouveau/nv04_fifo.c +++ b/drivers/gpu/drm/nouveau/nv04_fifo.c @@ -112,6 +112,12 @@ nv04_fifo_channel_id(struct drm_device *dev)  			NV03_PFIFO_CACHE1_PUSH1_CHID_MASK;  } +#ifdef __BIG_ENDIAN +#define DMA_FETCH_ENDIANNESS NV_PFIFO_CACHE1_BIG_ENDIAN +#else +#define DMA_FETCH_ENDIANNESS 0 +#endif +  int  nv04_fifo_create_context(struct nouveau_channel *chan)  { @@ -131,18 +137,13 @@ nv04_fifo_create_context(struct nouveau_channel *chan)  	spin_lock_irqsave(&dev_priv->context_switch_lock, flags);  	/* Setup initial state */ -	dev_priv->engine.instmem.prepare_access(dev, true);  	RAMFC_WR(DMA_PUT, chan->pushbuf_base);  	RAMFC_WR(DMA_GET, chan->pushbuf_base);  	RAMFC_WR(DMA_INSTANCE, chan->pushbuf->instance >> 4);  	RAMFC_WR(DMA_FETCH, (NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES |  			     NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES |  			     NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8 | -#ifdef __BIG_ENDIAN -			     NV_PFIFO_CACHE1_BIG_ENDIAN | -#endif -			     0)); -	dev_priv->engine.instmem.finish_access(dev); +			     DMA_FETCH_ENDIANNESS));  	/* enable the fifo dma operation */  	nv_wr32(dev, NV04_PFIFO_MODE, @@ -169,8 +170,6 @@ nv04_fifo_do_load_context(struct drm_device *dev, int chid)  	struct drm_nouveau_private *dev_priv = dev->dev_private;  	uint32_t fc = NV04_RAMFC(chid), tmp; -	dev_priv->engine.instmem.prepare_access(dev, false); -  	nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_PUT, nv_ri32(dev, fc + 0));  	nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_GET, nv_ri32(dev, fc + 4));  	tmp = nv_ri32(dev, fc + 8); @@ -181,8 +180,6 @@ nv04_fifo_do_load_context(struct drm_device *dev, int chid)  	nv_wr32(dev, NV04_PFIFO_CACHE1_ENGINE, nv_ri32(dev, fc + 20));  	nv_wr32(dev, NV04_PFIFO_CACHE1_PULL1, nv_ri32(dev, fc + 24)); -	dev_priv->engine.instmem.finish_access(dev); -  	nv_wr32(dev, NV03_PFIFO_CACHE1_GET, 0);  	nv_wr32(dev, NV03_PFIFO_CACHE1_PUT, 0);  } @@ -223,7 +220,6 @@ nv04_fifo_unload_context(struct drm_device *dev)  		return -EINVAL;  	} -	dev_priv->engine.instmem.prepare_access(dev, true);  	RAMFC_WR(DMA_PUT, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_PUT));  	RAMFC_WR(DMA_GET, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_GET));  	tmp  = nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_DCOUNT) << 16; @@ -233,7 +229,6 @@ nv04_fifo_unload_context(struct drm_device *dev)  	RAMFC_WR(DMA_FETCH, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_FETCH));  	RAMFC_WR(ENGINE, nv_rd32(dev, NV04_PFIFO_CACHE1_ENGINE));  	RAMFC_WR(PULL1_ENGINE, nv_rd32(dev, NV04_PFIFO_CACHE1_PULL1)); -	dev_priv->engine.instmem.finish_access(dev);  	nv04_fifo_do_load_context(dev, pfifo->channels - 1);  	nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH1, pfifo->channels - 1); @@ -297,6 +292,7 @@ nv04_fifo_init(struct drm_device *dev)  	nv04_fifo_init_intr(dev);  	pfifo->enable(dev); +	pfifo->reassign(dev, true);  	for (i = 0; i < dev_priv->engine.fifo.channels; i++) {  		if (dev_priv->fifos[i]) {  |