dev_priv->hw_status_page = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff, &dev_priv->dma_status_page); 
dev_priv->status_page_dmah = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff); 
static int i915_initialize(drm_device_t * dev,			   drm_i915_private_t * dev_priv,			   drm_i915_init_t * init){	memset(dev_priv, 0, sizeof(drm_i915_private_t));	DRM_GETSAREA();	if (!dev_priv->sarea) {		DRM_ERROR("can not find sarea!\n");		dev->dev_private = (void *)dev_priv;		i915_dma_cleanup(dev);		return DRM_ERR(EINVAL);	}	dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset);	if (!dev_priv->mmio_map) {		dev->dev_private = (void *)dev_priv;		i915_dma_cleanup(dev);		DRM_ERROR("can not find mmio map!\n");		return DRM_ERR(EINVAL);	}	dev_priv->sarea_priv = (drm_i915_sarea_t *)	    ((u8 *) dev_priv->sarea->handle + init->sarea_priv_offset);	dev_priv->ring.Start = init->ring_start;	dev_priv->ring.End = init->ring_end;	dev_priv->ring.Size = init->ring_size;	dev_priv->ring.tail_mask = dev_priv->ring.Size - 1;	dev_priv->ring.map.offset = init->ring_start;	dev_priv->ring.map.size = init->ring_size;	dev_priv->ring.map.type = 0;	dev_priv->ring.map.flags = 0;	dev_priv->ring.map.mtrr = 0;	drm_core_ioremap( &dev_priv->ring.map, dev );	if (dev_priv->ring.map.handle == NULL) {		dev->dev_private = (void *)dev_priv;		i915_dma_cleanup(dev);		DRM_ERROR("can not ioremap virtual address for"			  " ring buffer\n");		return DRM_ERR(ENOMEM);	}	dev_priv->ring.virtual_start = dev_priv->ring.map.handle;	dev_priv->back_offset = init->back_offset;	dev_priv->front_offset = init->front_offset;	dev_priv->current_page = 0;	dev_priv->sarea_priv->pf_current_page = dev_priv->current_page;	/* We are using separate values as placeholders for mechanisms for	 * private backbuffer/depthbuffer usage.	 */	dev_priv->use_mi_batchbuffer_start = 0;	/* Allow hardware batchbuffers unless told otherwise.	 */	dev_priv->allow_batchbuffer = 1;	/* Program Hardware Status Page */	dev_priv->hw_status_page = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE,						 0xffffffff, 						 &dev_priv->dma_status_page);	if (!dev_priv->hw_status_page) {		dev->dev_private = (void *)dev_priv;		i915_dma_cleanup(dev);		DRM_ERROR("Can not allocate hardware status page\n");		return DRM_ERR(ENOMEM);	}	memset(dev_priv->hw_status_page, 0, PAGE_SIZE);	DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page);	I915_WRITE(0x02080, dev_priv->dma_status_page);	DRM_DEBUG("Enabled hardware status page\n");	dev->dev_private = (void *)dev_priv;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9c8da5ebbf6f87293cf8555182da271449889a69/i915_dma.c/clean/drivers/char/drm/i915_dma.c