diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-07-07 21:29:10 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-12 20:13:40 -0400 |
commit | f56cb86f9abd229418f894a8ffedfb9ff465c181 (patch) | |
tree | b29420af53d096e49ff573790c6161ed71599858 /drivers/gpu/drm/nouveau/nv10_fifo.c | |
parent | 2107cce3056dccf37ae5cbfc95df348959b2c717 (diff) |
drm/nouveau: add instmem flush() hook
This removes the previous prepare_access() and finish_access() hooks, and
replaces it with a much simpler flush() hook.
All the chipset-specific code before nv50 has its use removed completely,
as it's not required there at all.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv10_fifo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv10_fifo.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nv10_fifo.c b/drivers/gpu/drm/nouveau/nv10_fifo.c index 7aeabf262bc0..7a4069cf5d0b 100644 --- a/drivers/gpu/drm/nouveau/nv10_fifo.c +++ b/drivers/gpu/drm/nouveau/nv10_fifo.c | |||
@@ -55,7 +55,6 @@ nv10_fifo_create_context(struct nouveau_channel *chan) | |||
55 | /* Fill entries that are seen filled in dumps of nvidia driver just | 55 | /* Fill entries that are seen filled in dumps of nvidia driver just |
56 | * after channel's is put into DMA mode | 56 | * after channel's is put into DMA mode |
57 | */ | 57 | */ |
58 | dev_priv->engine.instmem.prepare_access(dev, true); | ||
59 | nv_wi32(dev, fc + 0, chan->pushbuf_base); | 58 | nv_wi32(dev, fc + 0, chan->pushbuf_base); |
60 | nv_wi32(dev, fc + 4, chan->pushbuf_base); | 59 | nv_wi32(dev, fc + 4, chan->pushbuf_base); |
61 | nv_wi32(dev, fc + 12, chan->pushbuf->instance >> 4); | 60 | nv_wi32(dev, fc + 12, chan->pushbuf->instance >> 4); |
@@ -66,7 +65,6 @@ nv10_fifo_create_context(struct nouveau_channel *chan) | |||
66 | NV_PFIFO_CACHE1_BIG_ENDIAN | | 65 | NV_PFIFO_CACHE1_BIG_ENDIAN | |
67 | #endif | 66 | #endif |
68 | 0); | 67 | 0); |
69 | dev_priv->engine.instmem.finish_access(dev); | ||
70 | 68 | ||
71 | /* enable the fifo dma operation */ | 69 | /* enable the fifo dma operation */ |
72 | nv_wr32(dev, NV04_PFIFO_MODE, | 70 | nv_wr32(dev, NV04_PFIFO_MODE, |
@@ -91,8 +89,6 @@ nv10_fifo_do_load_context(struct drm_device *dev, int chid) | |||
91 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 89 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
92 | uint32_t fc = NV10_RAMFC(chid), tmp; | 90 | uint32_t fc = NV10_RAMFC(chid), tmp; |
93 | 91 | ||
94 | dev_priv->engine.instmem.prepare_access(dev, false); | ||
95 | |||
96 | nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_PUT, nv_ri32(dev, fc + 0)); | 92 | nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_PUT, nv_ri32(dev, fc + 0)); |
97 | nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_GET, nv_ri32(dev, fc + 4)); | 93 | nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_GET, nv_ri32(dev, fc + 4)); |
98 | nv_wr32(dev, NV10_PFIFO_CACHE1_REF_CNT, nv_ri32(dev, fc + 8)); | 94 | nv_wr32(dev, NV10_PFIFO_CACHE1_REF_CNT, nv_ri32(dev, fc + 8)); |
@@ -117,8 +113,6 @@ nv10_fifo_do_load_context(struct drm_device *dev, int chid) | |||
117 | nv_wr32(dev, NV10_PFIFO_CACHE1_DMA_SUBROUTINE, nv_ri32(dev, fc + 48)); | 113 | nv_wr32(dev, NV10_PFIFO_CACHE1_DMA_SUBROUTINE, nv_ri32(dev, fc + 48)); |
118 | 114 | ||
119 | out: | 115 | out: |
120 | dev_priv->engine.instmem.finish_access(dev); | ||
121 | |||
122 | nv_wr32(dev, NV03_PFIFO_CACHE1_GET, 0); | 116 | nv_wr32(dev, NV03_PFIFO_CACHE1_GET, 0); |
123 | nv_wr32(dev, NV03_PFIFO_CACHE1_PUT, 0); | 117 | nv_wr32(dev, NV03_PFIFO_CACHE1_PUT, 0); |
124 | } | 118 | } |
@@ -155,8 +149,6 @@ nv10_fifo_unload_context(struct drm_device *dev) | |||
155 | return 0; | 149 | return 0; |
156 | fc = NV10_RAMFC(chid); | 150 | fc = NV10_RAMFC(chid); |
157 | 151 | ||
158 | dev_priv->engine.instmem.prepare_access(dev, true); | ||
159 | |||
160 | nv_wi32(dev, fc + 0, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_PUT)); | 152 | nv_wi32(dev, fc + 0, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_PUT)); |
161 | nv_wi32(dev, fc + 4, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_GET)); | 153 | nv_wi32(dev, fc + 4, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_GET)); |
162 | nv_wi32(dev, fc + 8, nv_rd32(dev, NV10_PFIFO_CACHE1_REF_CNT)); | 154 | nv_wi32(dev, fc + 8, nv_rd32(dev, NV10_PFIFO_CACHE1_REF_CNT)); |
@@ -179,8 +171,6 @@ nv10_fifo_unload_context(struct drm_device *dev) | |||
179 | nv_wi32(dev, fc + 48, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_GET)); | 171 | nv_wi32(dev, fc + 48, nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_GET)); |
180 | 172 | ||
181 | out: | 173 | out: |
182 | dev_priv->engine.instmem.finish_access(dev); | ||
183 | |||
184 | nv10_fifo_do_load_context(dev, pfifo->channels - 1); | 174 | nv10_fifo_do_load_context(dev, pfifo->channels - 1); |
185 | nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH1, pfifo->channels - 1); | 175 | nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH1, pfifo->channels - 1); |
186 | return 0; | 176 | return 0; |