diff mbox

drm/amdgpu: Remove duplicate setting of ->need_swiotlb

Message ID 20180220104450.28652-1-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding Feb. 20, 2018, 10:44 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

There's no need to set this before the number of DMA bits has been
properly determined.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Alex Deucher Feb. 22, 2018, 5:01 p.m. UTC | #1
On Tue, Feb 20, 2018 at 5:44 AM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> There's no need to set this before the number of DMA bits has been
> properly determined.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> index 9a170e37fbe7..9cc849f829d0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> @@ -1086,7 +1086,6 @@ static int gmc_v8_0_sw_init(void *handle)
>          */
>         adev->need_dma32 = false;
>         dma_bits = adev->need_dma32 ? 32 : 40;
> -       adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
>         r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
>         if (r) {
>                 adev->need_dma32 = true;
> --
> 2.15.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 9a170e37fbe7..9cc849f829d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -1086,7 +1086,6 @@  static int gmc_v8_0_sw_init(void *handle)
 	 */
 	adev->need_dma32 = false;
 	dma_bits = adev->need_dma32 ? 32 : 40;
-	adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
 	r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
 	if (r) {
 		adev->need_dma32 = true;