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>
This commit is contained in:
parent
dc1336ff4f
commit
3a03ac1a02
|
@ -177,6 +177,14 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
|
||||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||||
struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
|
struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
|
||||||
|
|
||||||
|
master_priv->sarea = drm_getsarea(dev);
|
||||||
|
if (master_priv->sarea) {
|
||||||
|
master_priv->sarea_priv = (drm_i915_sarea_t *)
|
||||||
|
((u8 *)master_priv->sarea->handle + init->sarea_priv_offset);
|
||||||
|
} else {
|
||||||
|
DRM_DEBUG("sarea not found assuming DRI2 userspace\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (init->ring_size != 0) {
|
if (init->ring_size != 0) {
|
||||||
if (dev_priv->ring.ring_obj != NULL) {
|
if (dev_priv->ring.ring_obj != NULL) {
|
||||||
i915_dma_cleanup(dev);
|
i915_dma_cleanup(dev);
|
||||||
|
|
Loading…
Reference in New Issue