mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 13:40:53 +07:00
drm: pcigart use proper pci map interfaces.
Switch to using more correct pci dma mapping interfaces. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
b554305905
commit
7ec700fcaf
@ -76,7 +76,7 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
|
|||||||
for (i = 0; i < pages; i++) {
|
for (i = 0; i < pages; i++) {
|
||||||
if (!entry->busaddr[i])
|
if (!entry->busaddr[i])
|
||||||
break;
|
break;
|
||||||
pci_unmap_single(dev->pdev, entry->busaddr[i],
|
pci_unmap_page(dev->pdev, entry->busaddr[i],
|
||||||
PAGE_SIZE, PCI_DMA_TODEVICE);
|
PAGE_SIZE, PCI_DMA_TODEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,10 +137,8 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
|
|||||||
|
|
||||||
for (i = 0; i < pages; i++) {
|
for (i = 0; i < pages; i++) {
|
||||||
/* we need to support large memory configurations */
|
/* we need to support large memory configurations */
|
||||||
entry->busaddr[i] = pci_map_single(dev->pdev,
|
entry->busaddr[i] = pci_map_page(dev->pdev, entry->pagelist[i],
|
||||||
page_address(entry->
|
0, PAGE_SIZE, PCI_DMA_TODEVICE);
|
||||||
pagelist[i]),
|
|
||||||
PAGE_SIZE, PCI_DMA_TODEVICE);
|
|
||||||
if (entry->busaddr[i] == 0) {
|
if (entry->busaddr[i] == 0) {
|
||||||
DRM_ERROR("unable to map PCIGART pages!\n");
|
DRM_ERROR("unable to map PCIGART pages!\n");
|
||||||
drm_ati_pcigart_cleanup(dev, gart_info);
|
drm_ati_pcigart_cleanup(dev, gart_info);
|
||||||
|
Loading…
Reference in New Issue
Block a user