diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-21 16:55:54 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-26 15:36:00 -0400 |
commit | d3301d86b4bf2bcf649982ae464211d8bcf9575a (patch) | |
tree | e3334543a973874297421d57a63f8c452ae76455 /drivers/gpu/drm/i915/i915_dma.c | |
parent | 62fdfeaf8b1f487060b6e160e7b5cd90287607c9 (diff) |
drm/i915: Rename dev_priv->ring to dev_priv->render_ring.
With the advent of the BSD ring, be clear about which ring this is.
The docs are pretty consistent with calling this the Render engine at
this point.
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index a657e3315950..6de7eace4319 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -95,7 +95,7 @@ void i915_kernel_lost_context(struct drm_device * dev) | |||
95 | { | 95 | { |
96 | drm_i915_private_t *dev_priv = dev->dev_private; | 96 | drm_i915_private_t *dev_priv = dev->dev_private; |
97 | struct drm_i915_master_private *master_priv; | 97 | struct drm_i915_master_private *master_priv; |
98 | drm_i915_ring_buffer_t *ring = &(dev_priv->ring); | 98 | drm_i915_ring_buffer_t *ring = &(dev_priv->render_ring); |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * We should never lose context on the ring with modesetting | 101 | * We should never lose context on the ring with modesetting |
@@ -128,11 +128,11 @@ static int i915_dma_cleanup(struct drm_device * dev) | |||
128 | if (dev->irq_enabled) | 128 | if (dev->irq_enabled) |
129 | drm_irq_uninstall(dev); | 129 | drm_irq_uninstall(dev); |
130 | 130 | ||
131 | if (dev_priv->ring.virtual_start) { | 131 | if (dev_priv->render_ring.virtual_start) { |
132 | drm_core_ioremapfree(&dev_priv->ring.map, dev); | 132 | drm_core_ioremapfree(&dev_priv->render_ring.map, dev); |
133 | dev_priv->ring.virtual_start = NULL; | 133 | dev_priv->render_ring.virtual_start = NULL; |
134 | dev_priv->ring.map.handle = NULL; | 134 | dev_priv->render_ring.map.handle = NULL; |
135 | dev_priv->ring.map.size = 0; | 135 | dev_priv->render_ring.map.size = 0; |
136 | } | 136 | } |
137 | 137 | ||
138 | /* Clear the HWS virtual address at teardown */ | 138 | /* Clear the HWS virtual address at teardown */ |
@@ -156,24 +156,24 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init) | |||
156 | } | 156 | } |
157 | 157 | ||
158 | if (init->ring_size != 0) { | 158 | if (init->ring_size != 0) { |
159 | if (dev_priv->ring.ring_obj != NULL) { | 159 | if (dev_priv->render_ring.ring_obj != NULL) { |
160 | i915_dma_cleanup(dev); | 160 | i915_dma_cleanup(dev); |
161 | DRM_ERROR("Client tried to initialize ringbuffer in " | 161 | DRM_ERROR("Client tried to initialize ringbuffer in " |
162 | "GEM mode\n"); | 162 | "GEM mode\n"); |
163 | return -EINVAL; | 163 | return -EINVAL; |
164 | } | 164 | } |
165 | 165 | ||
166 | dev_priv->ring.Size = init->ring_size; | 166 | dev_priv->render_ring.Size = init->ring_size; |
167 | 167 | ||
168 | dev_priv->ring.map.offset = init->ring_start; | 168 | dev_priv->render_ring.map.offset = init->ring_start; |
169 | dev_priv->ring.map.size = init->ring_size; | 169 | dev_priv->render_ring.map.size = init->ring_size; |
170 | dev_priv->ring.map.type = 0; | 170 | dev_priv->render_ring.map.type = 0; |
171 | dev_priv->ring.map.flags = 0; | 171 | dev_priv->render_ring.map.flags = 0; |
172 | dev_priv->ring.map.mtrr = 0; | 172 | dev_priv->render_ring.map.mtrr = 0; |
173 | 173 | ||
174 | drm_core_ioremap_wc(&dev_priv->ring.map, dev); | 174 | drm_core_ioremap_wc(&dev_priv->render_ring.map, dev); |
175 | 175 | ||
176 | if (dev_priv->ring.map.handle == NULL) { | 176 | if (dev_priv->render_ring.map.handle == NULL) { |
177 | i915_dma_cleanup(dev); | 177 | i915_dma_cleanup(dev); |
178 | DRM_ERROR("can not ioremap virtual address for" | 178 | DRM_ERROR("can not ioremap virtual address for" |
179 | " ring buffer\n"); | 179 | " ring buffer\n"); |
@@ -181,7 +181,7 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init) | |||
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | dev_priv->ring.virtual_start = dev_priv->ring.map.handle; | 184 | dev_priv->render_ring.virtual_start = dev_priv->render_ring.map.handle; |
185 | 185 | ||
186 | dev_priv->cpp = init->cpp; | 186 | dev_priv->cpp = init->cpp; |
187 | dev_priv->back_offset = init->back_offset; | 187 | dev_priv->back_offset = init->back_offset; |
@@ -203,7 +203,7 @@ static int i915_dma_resume(struct drm_device * dev) | |||
203 | 203 | ||
204 | DRM_DEBUG_DRIVER("%s\n", __func__); | 204 | DRM_DEBUG_DRIVER("%s\n", __func__); |
205 | 205 | ||
206 | if (dev_priv->ring.map.handle == NULL) { | 206 | if (dev_priv->render_ring.map.handle == NULL) { |
207 | DRM_ERROR("can not ioremap virtual address for" | 207 | DRM_ERROR("can not ioremap virtual address for" |
208 | " ring buffer\n"); | 208 | " ring buffer\n"); |
209 | return -ENOMEM; | 209 | return -ENOMEM; |
@@ -332,7 +332,7 @@ static int i915_emit_cmds(struct drm_device * dev, int *buffer, int dwords) | |||
332 | int i; | 332 | int i; |
333 | RING_LOCALS; | 333 | RING_LOCALS; |
334 | 334 | ||
335 | if ((dwords+1) * sizeof(int) >= dev_priv->ring.Size - 8) | 335 | if ((dwords+1) * sizeof(int) >= dev_priv->render_ring.Size - 8) |
336 | return -EINVAL; | 336 | return -EINVAL; |
337 | 337 | ||
338 | BEGIN_LP_RING((dwords+1)&~1); | 338 | BEGIN_LP_RING((dwords+1)&~1); |
@@ -563,7 +563,7 @@ static int i915_quiescent(struct drm_device * dev) | |||
563 | drm_i915_private_t *dev_priv = dev->dev_private; | 563 | drm_i915_private_t *dev_priv = dev->dev_private; |
564 | 564 | ||
565 | i915_kernel_lost_context(dev); | 565 | i915_kernel_lost_context(dev); |
566 | return i915_wait_ring(dev, dev_priv->ring.Size - 8, __func__); | 566 | return i915_wait_ring(dev, dev_priv->render_ring.Size - 8, __func__); |
567 | } | 567 | } |
568 | 568 | ||
569 | static int i915_flush_ioctl(struct drm_device *dev, void *data, | 569 | static int i915_flush_ioctl(struct drm_device *dev, void *data, |