diff options
| author | Dave Airlie <airlied@redhat.com> | 2008-09-26 15:37:21 +1000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2008-09-30 14:13:49 +1000 | 
| commit | 972f6572652bc4a2f6c44c525e5e91f2becdb62a (patch) | |
| tree | 60af3dc7e8a7c0f8bef7a3927dae161093b10dbe /linux-core/nouveau_sgdma.c | |
| parent | 89126bb58ec82511758bed36a28e698b721fb435 (diff) | |
| parent | 2db8e0c8ef8c7a66460fceda129533b364f6418c (diff) | |
Merge remote branch 'origin/master' into modesetting-gem
Conflicts:
	libdrm/Makefile.am
	libdrm/dri_bufmgr.h
	linux-core/drm_irq.c
	linux-core/drm_sysfs.c
	linux-core/drm_ttm.c
	shared-core/i915_dma.c
	shared-core/i915_irq.c
	shared-core/nouveau_drv.h
	shared-core/radeon_cp.c
Diffstat (limited to 'linux-core/nouveau_sgdma.c')
| -rw-r--r-- | linux-core/nouveau_sgdma.c | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/linux-core/nouveau_sgdma.c b/linux-core/nouveau_sgdma.c index cc4d5a92..739e0252 100644 --- a/linux-core/nouveau_sgdma.c +++ b/linux-core/nouveau_sgdma.c @@ -48,7 +48,11 @@ nouveau_sgdma_populate(struct drm_ttm_backend *be, unsigned long num_pages,  							 page, o,  							 NV_CTXDMA_PAGE_SIZE,  							 PCI_DMA_BIDIRECTIONAL); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) +			if (pci_dma_mapping_error(nvbe->dev->pdev, nvbe->pagelist[d])) { +#else  			if (pci_dma_mapping_error(nvbe->pagelist[d])) { +#endif  				be->func->clear(be);  				DRM_ERROR("pci_map_page failed\n");  				return -EINVAL; @@ -223,7 +227,11 @@ nouveau_sgdma_init(struct drm_device *dev)  	dev_priv->gart_info.sg_dummy_page =  		alloc_page(GFP_KERNEL|__GFP_DMA32); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) +	set_page_locked(dev_priv->gart_info.sg_dummy_page); +#else  	SetPageLocked(dev_priv->gart_info.sg_dummy_page); +#endif  	dev_priv->gart_info.sg_dummy_bus =  		pci_map_page(dev->pdev, dev_priv->gart_info.sg_dummy_page, 0,  			     PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);  | 
