diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-26 17:51:06 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-26 17:51:47 -0400 |
commit | e20f9c64c79e2282f9eb531509181965ec8f0a92 (patch) | |
tree | 0b5093e19bc9bd7c8490368a7ee871540f2e27d7 | |
parent | 9553426372eef71c849499fb1d232f4b0577c0f9 (diff) |
drm/i915: Clean up leftover bits from hws move to ring structure.
Fixes /debug/dri/0/i915_gem_interrupt output for status page.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 3 |
3 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index eb11e1e049cb..52510ad8b25d 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -144,7 +144,7 @@ static int i915_gem_seqno_info(struct seq_file *m, void *data) | |||
144 | struct drm_device *dev = node->minor->dev; | 144 | struct drm_device *dev = node->minor->dev; |
145 | drm_i915_private_t *dev_priv = dev->dev_private; | 145 | drm_i915_private_t *dev_priv = dev->dev_private; |
146 | 146 | ||
147 | if (dev_priv->hw_status_page != NULL) { | 147 | if (dev_priv->render_ring.status_page.page_addr != NULL) { |
148 | seq_printf(m, "Current sequence: %d\n", | 148 | seq_printf(m, "Current sequence: %d\n", |
149 | i915_get_gem_seqno(dev, &dev_priv->render_ring)); | 149 | i915_get_gem_seqno(dev, &dev_priv->render_ring)); |
150 | } else { | 150 | } else { |
@@ -196,7 +196,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data) | |||
196 | } | 196 | } |
197 | seq_printf(m, "Interrupts received: %d\n", | 197 | seq_printf(m, "Interrupts received: %d\n", |
198 | atomic_read(&dev_priv->irq_received)); | 198 | atomic_read(&dev_priv->irq_received)); |
199 | if (dev_priv->hw_status_page != NULL) { | 199 | if (dev_priv->render_ring.status_page.page_addr != NULL) { |
200 | seq_printf(m, "Current sequence: %d\n", | 200 | seq_printf(m, "Current sequence: %d\n", |
201 | i915_get_gem_seqno(dev, &dev_priv->render_ring)); | 201 | i915_get_gem_seqno(dev, &dev_priv->render_ring)); |
202 | } else { | 202 | } else { |
@@ -252,7 +252,7 @@ static int i915_hws_info(struct seq_file *m, void *data) | |||
252 | int i; | 252 | int i; |
253 | volatile u32 *hws; | 253 | volatile u32 *hws; |
254 | 254 | ||
255 | hws = (volatile u32 *)dev_priv->hw_status_page; | 255 | hws = (volatile u32 *)dev_priv->render_ring.status_page.page_addr; |
256 | if (hws == NULL) | 256 | if (hws == NULL) |
257 | return 0; | 257 | return 0; |
258 | 258 | ||
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index a5f401664845..6577798d3441 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -84,7 +84,6 @@ static void i915_free_hws(struct drm_device *dev) | |||
84 | 84 | ||
85 | if (dev_priv->render_ring.status_page.gfx_addr) { | 85 | if (dev_priv->render_ring.status_page.gfx_addr) { |
86 | dev_priv->render_ring.status_page.gfx_addr = 0; | 86 | dev_priv->render_ring.status_page.gfx_addr = 0; |
87 | dev_priv->status_gfx_addr = 0; | ||
88 | drm_core_ioremapfree(&dev_priv->hws_map, dev); | 87 | drm_core_ioremapfree(&dev_priv->hws_map, dev); |
89 | } | 88 | } |
90 | 89 | ||
@@ -828,7 +827,7 @@ static int i915_set_status_page(struct drm_device *dev, void *data, | |||
828 | drm_core_ioremap_wc(&dev_priv->hws_map, dev); | 827 | drm_core_ioremap_wc(&dev_priv->hws_map, dev); |
829 | if (dev_priv->hws_map.handle == NULL) { | 828 | if (dev_priv->hws_map.handle == NULL) { |
830 | i915_dma_cleanup(dev); | 829 | i915_dma_cleanup(dev); |
831 | dev_priv->status_gfx_addr = 0; | 830 | ring->status_page.gfx_addr = 0; |
832 | DRM_ERROR("can not ioremap virtual address for" | 831 | DRM_ERROR("can not ioremap virtual address for" |
833 | " G33 hw status page\n"); | 832 | " G33 hw status page\n"); |
834 | return -ENOMEM; | 833 | return -ENOMEM; |
@@ -838,9 +837,9 @@ static int i915_set_status_page(struct drm_device *dev, void *data, | |||
838 | I915_WRITE(HWS_PGA, ring->status_page.gfx_addr); | 837 | I915_WRITE(HWS_PGA, ring->status_page.gfx_addr); |
839 | 838 | ||
840 | DRM_DEBUG_DRIVER("load hws HWS_PGA with gfx mem 0x%x\n", | 839 | DRM_DEBUG_DRIVER("load hws HWS_PGA with gfx mem 0x%x\n", |
841 | dev_priv->status_gfx_addr); | 840 | ring->status_page.gfx_addr); |
842 | DRM_DEBUG_DRIVER("load hws at %p\n", | 841 | DRM_DEBUG_DRIVER("load hws at %p\n", |
843 | dev_priv->hw_status_page); | 842 | ring->status_page.page_addr); |
844 | return 0; | 843 | return 0; |
845 | } | 844 | } |
846 | 845 | ||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index e6b4cab6565f..9ed8ecd95801 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -238,14 +238,11 @@ typedef struct drm_i915_private { | |||
238 | struct intel_ring_buffer bsd_ring; | 238 | struct intel_ring_buffer bsd_ring; |
239 | 239 | ||
240 | drm_dma_handle_t *status_page_dmah; | 240 | drm_dma_handle_t *status_page_dmah; |
241 | void *hw_status_page; | ||
242 | void *seqno_page; | 241 | void *seqno_page; |
243 | dma_addr_t dma_status_page; | 242 | dma_addr_t dma_status_page; |
244 | uint32_t counter; | 243 | uint32_t counter; |
245 | unsigned int status_gfx_addr; | ||
246 | unsigned int seqno_gfx_addr; | 244 | unsigned int seqno_gfx_addr; |
247 | drm_local_map_t hws_map; | 245 | drm_local_map_t hws_map; |
248 | struct drm_gem_object *hws_obj; | ||
249 | struct drm_gem_object *seqno_obj; | 246 | struct drm_gem_object *seqno_obj; |
250 | struct drm_gem_object *pwrctx; | 247 | struct drm_gem_object *pwrctx; |
251 | 248 | ||