FreeBSD/sys/dev/drm/i915_dma.c
/**
 * Sets up the hardware status page for devices that need a physical address
 * in the register.
 */
Sets up the hardware status page for devices that need a physical address
in the register.
Sets up the hardware status page for devices that need a physical address in the register .
static int i915_init_phys_hws(struct drm_device *dev)
{
	drm_i915_private_t *dev_priv = dev->dev_private;
	DRM_UNLOCK();
	dev_priv->status_page_dmah =
		drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff);
	DRM_LOCK();
	if (!dev_priv->status_page_dmah) {
		DRM_ERROR("Can not allocate hardware status page\n");
		return -ENOMEM;
	}
	dev_priv->hw_status_page = dev_priv->status_page_dmah->vaddr;
	dev_priv->dma_status_page = dev_priv->status_page_dmah->busaddr;
	memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
	I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
	DRM_DEBUG("Enabled hardware status page\n");
	return 0;
}
static int i915_init_phys_hws ( struct drm_device * dev ) { drm_i915_private_t * dev_priv = dev -> dev_private ; DRM_UNLOCK ( ) ; dev_priv -> status_page_dmah = drm_pci_alloc ( dev , PAGE_SIZE , PAGE_SIZE , 0xffffffff ) ; DRM_LOCK ( ) ; if ( ! dev_priv -> status_page_dmah ) { DRM_ERROR ( " \n " ) ; return - ENOMEM ; } dev_priv -> hw_status_page = dev_priv -> status_page_dmah -> vaddr ; dev_priv -> dma_status_page = dev_priv -> status_page_dmah -> busaddr ; memset ( dev_priv -> hw_status_page , 0 , PAGE_SIZE ) ; I915_WRITE ( HWS_PGA , dev_priv -> dma_status_page ) ; DRM_DEBUG ( " \n " ) ; return 0 ; }
Sets up the hardware status page for devices that need a physical address
 in the register.
Sets up the hardware status page for devices that need a physical address in the register .
/* Program Hardware Status Page */