[PATCH 1/1] drm/amdgpu: use generic DMA API

Nirmoy nirmodas at amd.com
Fri Nov 20 15:43:17 UTC 2020


Sorry, I missed pci_dma_mapping_error() :/ I will resend.


Nirmoy

On 11/20/20 4:41 PM, Nirmoy Das wrote:
> Use generic DMA api instead of bus-specific API.
>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> index e01e681d2a60..ea55d66b3ef6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> @@ -75,7 +75,7 @@ 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)) {
>   		dev_err(&adev->pdev->dev, "Failed to DMA MAP the dummy page\n");


More information about the amd-gfx mailing list