mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 08:10:11 +01:00
nouveau: compile with 2.6.27
This commit is contained in:
parent
8122872739
commit
a8a7106cda
3 changed files with 15 additions and 3 deletions
|
|
@ -48,7 +48,11 @@ nouveau_sgdma_populate(struct drm_ttm_backend *be, unsigned long num_pages,
|
||||||
page, o,
|
page, o,
|
||||||
NV_CTXDMA_PAGE_SIZE,
|
NV_CTXDMA_PAGE_SIZE,
|
||||||
PCI_DMA_BIDIRECTIONAL);
|
PCI_DMA_BIDIRECTIONAL);
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||||
|
if (pci_dma_mapping_error(be->dev->pdev, nvbe->pagelist[d])) {
|
||||||
|
#else
|
||||||
if (pci_dma_mapping_error(nvbe->pagelist[d])) {
|
if (pci_dma_mapping_error(nvbe->pagelist[d])) {
|
||||||
|
#endif
|
||||||
be->func->clear(be);
|
be->func->clear(be);
|
||||||
DRM_ERROR("pci_map_page failed\n");
|
DRM_ERROR("pci_map_page failed\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
@ -223,7 +227,11 @@ nouveau_sgdma_init(struct drm_device *dev)
|
||||||
|
|
||||||
dev_priv->gart_info.sg_dummy_page =
|
dev_priv->gart_info.sg_dummy_page =
|
||||||
alloc_page(GFP_KERNEL|__GFP_DMA32);
|
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);
|
SetPageLocked(dev_priv->gart_info.sg_dummy_page);
|
||||||
|
#endif
|
||||||
dev_priv->gart_info.sg_dummy_bus =
|
dev_priv->gart_info.sg_dummy_bus =
|
||||||
pci_map_page(dev->pdev, dev_priv->gart_info.sg_dummy_page, 0,
|
pci_map_page(dev->pdev, dev_priv->gart_info.sg_dummy_page, 0,
|
||||||
PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
|
PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
|
||||||
|
|
|
||||||
|
|
@ -944,7 +944,7 @@ static enum drm_connector_status nv50_kms_connector_detect(struct drm_connector
|
||||||
hpd_detect = connector->hpd_detect(connector);
|
hpd_detect = connector->hpd_detect(connector);
|
||||||
|
|
||||||
/* load detect */
|
/* load detect */
|
||||||
output = connector->to_output(connector, FALSE); /* analog */
|
output = connector->to_output(connector, false); /* analog */
|
||||||
if (output && output->detect)
|
if (output && output->detect)
|
||||||
load_detect = output->detect(output);
|
load_detect = output->detect(output);
|
||||||
|
|
||||||
|
|
@ -1034,7 +1034,7 @@ static void nv50_kms_connector_fill_modes(struct drm_connector *drm_connector, u
|
||||||
rval = drm_add_edid_modes(drm_connector, edid);
|
rval = drm_add_edid_modes(drm_connector, edid);
|
||||||
|
|
||||||
/* Only update when relevant and when detect couldn't determine type. */
|
/* Only update when relevant and when detect couldn't determine type. */
|
||||||
nv50_kms_connector_set_digital(drm_connector, edid->digital ? 1 : 0, FALSE);
|
nv50_kms_connector_set_digital(drm_connector, edid->digital ? 1 : 0, false);
|
||||||
|
|
||||||
kfree(edid);
|
kfree(edid);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -738,8 +738,12 @@ nouveau_gpuobj_dma_new(struct nouveau_channel *chan, int class,
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE,
|
PAGE_SIZE,
|
||||||
DMA_BIDIRECTIONAL);
|
DMA_BIDIRECTIONAL);
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||||
|
/* Not a 100% sure this is the right kdev in all cases. */
|
||||||
|
if (dma_mapping_error(&dev->primary->kdev, dev->sg->busaddr[idx])) {
|
||||||
|
#else
|
||||||
if (dma_mapping_error(dev->sg->busaddr[idx])) {
|
if (dma_mapping_error(dev->sg->busaddr[idx])) {
|
||||||
|
#endif
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue