summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAaron Liu <aaron.liu@amd.com>2022-04-19 14:17:05 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-07-25 17:14:19 -0400
commit3616d49da5dab635c4bb0eeb183b61df72cd0757 (patch)
treeb8e3ef7fd6766e14d3bda17e8182aedd70aaea22 /drivers/gpu
parent9dd4545f65679042273a93054ec3bb665ecf7366 (diff)
downloadlinux-3616d49da5dab635c4bb0eeb183b61df72cd0757.tar.bz2
drm/amdgpu: enable swiotlb for gmc 10.0 (V2)
Enable swiotlb for gmc 10.0. v2: include drm_cache.h to use the function ‘drm_need_swiotlb’ Signed-off-by: Aaron Liu <aaron.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 1772f006c61a..9ae8cdaa033e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -22,6 +22,9 @@
*/
#include <linux/firmware.h>
#include <linux/pci.h>
+
+#include <drm/drm_cache.h>
+
#include "amdgpu.h"
#include "amdgpu_atomfirmware.h"
#include "gmc_v10_0.h"
@@ -980,6 +983,8 @@ static int gmc_v10_0_sw_init(void *handle)
return r;
}
+ adev->need_swiotlb = drm_need_swiotlb(44);
+
r = gmc_v10_0_mc_init(adev);
if (r)
return r;