drm/amdgpu: use generic DMA API
authorNirmoy Das <nirmoy.das@amd.com>
Fri, 20 Nov 2020 15:29:40 +0000 (16:29 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Nov 2020 17:06:10 +0000 (12:06 -0500)
Use generic DMA api instead of bus-specific API.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c

index e01e681..0db9330 100644 (file)
@@ -75,9 +75,9 @@ static int amdgpu_gart_dummy_page_init(struct amdgpu_device *adev)
 
        if (adev->dummy_page_addr)
                return 0;
-       adev->dummy_page_addr = pci_map_page(adev->pdev, dummy_page, 0,
+       adev->dummy_page_addr = dma_map_page(&adev->pdev->dev, dummy_page, 0,
                                             PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
-       if (pci_dma_mapping_error(adev->pdev, adev->dummy_page_addr)) {
+       if (dma_mapping_error(&adev->pdev->dev, adev->dummy_page_addr)) {
                dev_err(&adev->pdev->dev, "Failed to DMA MAP the dummy page\n");
                adev->dummy_page_addr = 0;
                return -ENOMEM;