aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 9a813d834f1a..9a170e37fbe7 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -22,6 +22,7 @@
22 */ 22 */
23#include <linux/firmware.h> 23#include <linux/firmware.h>
24#include <drm/drmP.h> 24#include <drm/drmP.h>
25#include <drm/drm_cache.h>
25#include "amdgpu.h" 26#include "amdgpu.h"
26#include "gmc_v8_0.h" 27#include "gmc_v8_0.h"
27#include "amdgpu_ucode.h" 28#include "amdgpu_ucode.h"
@@ -1085,6 +1086,7 @@ static int gmc_v8_0_sw_init(void *handle)
1085 */ 1086 */
1086 adev->need_dma32 = false; 1087 adev->need_dma32 = false;
1087 dma_bits = adev->need_dma32 ? 32 : 40; 1088 dma_bits = adev->need_dma32 ? 32 : 40;
1089 adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
1088 r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits)); 1090 r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
1089 if (r) { 1091 if (r) {
1090 adev->need_dma32 = true; 1092 adev->need_dma32 = true;
@@ -1096,6 +1098,7 @@ static int gmc_v8_0_sw_init(void *handle)
1096 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32)); 1098 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
1097 pr_warn("amdgpu: No coherent DMA available\n"); 1099 pr_warn("amdgpu: No coherent DMA available\n");
1098 } 1100 }
1101 adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
1099 1102
1100 r = gmc_v8_0_init_microcode(adev); 1103 r = gmc_v8_0_init_microcode(adev);
1101 if (r) { 1104 if (r) {