[PATCH 2/2] drm/radeon: use generic DMA API

Alex Deucher alexdeucher at gmail.com
Fri Nov 20 16:06:30 UTC 2020


Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

On Fri, Nov 20, 2020 at 11:04 AM Nirmoy Das <nirmoy.das at amd.com> wrote:
>
> Use generic DMA api instead of bus-specific API.
>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
>  drivers/gpu/drm/radeon/radeon_device.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 7f384ffe848a..a5588b0a454c 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -784,9 +784,9 @@ int radeon_dummy_page_init(struct radeon_device *rdev)
>         rdev->dummy_page.page = alloc_page(GFP_DMA32 | GFP_KERNEL | __GFP_ZERO);
>         if (rdev->dummy_page.page == NULL)
>                 return -ENOMEM;
> -       rdev->dummy_page.addr = pci_map_page(rdev->pdev, rdev->dummy_page.page,
> +       rdev->dummy_page.addr = dma_map_page(&rdev->pdev->dev, rdev->dummy_page.page,
>                                         0, PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
> -       if (pci_dma_mapping_error(rdev->pdev, rdev->dummy_page.addr)) {
> +       if (dma_mapping_error(&rdev->pdev->dev, rdev->dummy_page.addr)) {
>                 dev_err(&rdev->pdev->dev, "Failed to DMA MAP the dummy page\n");
>                 __free_page(rdev->dummy_page.page);
>                 rdev->dummy_page.page = NULL;
> --
> 2.29.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list