diff options
author | Dave Airlie <airlied@linux.ie> | 2009-01-10 18:03:49 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-01-12 07:01:34 -0500 |
commit | 3a03ac1a0223f779a3de313523408ddb099e5679 (patch) | |
tree | 5f07abaf710b39fbdd238524074c9ed41f76a8ff /drivers | |
parent | dc1336ff4fe08ae7cfe8301bfd7f0b2cfd31d20a (diff) |
drm/i915: setup sarea properly in master_priv
If we are running DRI1 userspace, we really need to set the sarea up properly.
thanks to Richard for finding/testing this.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 62a4bf7b49df..868f574363ad 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -177,6 +177,14 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init) | |||
177 | drm_i915_private_t *dev_priv = dev->dev_private; | 177 | drm_i915_private_t *dev_priv = dev->dev_private; |
178 | struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv; | 178 | struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv; |
179 | 179 | ||
180 | master_priv->sarea = drm_getsarea(dev); | ||
181 | if (master_priv->sarea) { | ||
182 | master_priv->sarea_priv = (drm_i915_sarea_t *) | ||
183 | ((u8 *)master_priv->sarea->handle + init->sarea_priv_offset); | ||
184 | } else { | ||
185 | DRM_DEBUG("sarea not found assuming DRI2 userspace\n"); | ||
186 | } | ||
187 | |||
180 | if (init->ring_size != 0) { | 188 | if (init->ring_size != 0) { |
181 | if (dev_priv->ring.ring_obj != NULL) { | 189 | if (dev_priv->ring.ring_obj != NULL) { |
182 | i915_dma_cleanup(dev); | 190 | i915_dma_cleanup(dev); |