aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-22 13:44:39 -0400
committerKeith Packard <keithp@keithp.com>2011-07-22 16:36:52 -0400
commitf3234706a77bd6e1592ae71fb3268e04cb030dba (patch)
tree6426ac38abc9091cfd988b79904d8bdaac94cdde /drivers/gpu/drm/i915/i915_dma.c
parent842d452985300f4ec14c68cb86046e8a1a3b7251 (diff)
drm/i915: Initialize RCS ring status page address in intel_render_ring_init_dri
Physically-addressed hardware status pages are initialized early in the driver load process by i915_init_phys_hws. For UMS environments, the ring structure is not initialized until the X server starts. At that point, the entire ring structure is re-initialized with all new values. Any values set in the ring structure (including ring->status_page.page_addr) will be lost when the ring is re-initialized. This patch moves the initialization of the status_page.page_addr value to intel_render_ring_init_dri. Signed-off-by: Keith Packard <keithp@keithp.com> Cc: stable@kernel.org
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 296fbd66f0e1..7eef6e11d9ac 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -61,7 +61,6 @@ static void i915_write_hws_pga(struct drm_device *dev)
61static int i915_init_phys_hws(struct drm_device *dev) 61static int i915_init_phys_hws(struct drm_device *dev)
62{ 62{
63 drm_i915_private_t *dev_priv = dev->dev_private; 63 drm_i915_private_t *dev_priv = dev->dev_private;
64 struct intel_ring_buffer *ring = LP_RING(dev_priv);
65 64
66 /* Program Hardware Status Page */ 65 /* Program Hardware Status Page */
67 dev_priv->status_page_dmah = 66 dev_priv->status_page_dmah =
@@ -71,10 +70,9 @@ static int i915_init_phys_hws(struct drm_device *dev)
71 DRM_ERROR("Can not allocate hardware status page\n"); 70 DRM_ERROR("Can not allocate hardware status page\n");
72 return -ENOMEM; 71 return -ENOMEM;
73 } 72 }
74 ring->status_page.page_addr =
75 (void __force __iomem *)dev_priv->status_page_dmah->vaddr;
76 73
77 memset_io(ring->status_page.page_addr, 0, PAGE_SIZE); 74 memset_io((void __force __iomem *)dev_priv->status_page_dmah->vaddr,
75 0, PAGE_SIZE);
78 76
79 i915_write_hws_pga(dev); 77 i915_write_hws_pga(dev);
80 78