Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: set adev->num_vmhubs for gmc6,7,8

So that we properly handle them on older asics.

Fixes: 3ff985485b29 ("drm/amdgpu: Export function to flush TLB of specific vm hub")
Tested-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+6
+2
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
··· 841 841 int r; 842 842 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 843 843 844 + adev->num_vmhubs = 1; 845 + 844 846 if (adev->flags & AMD_IS_APU) { 845 847 adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN; 846 848 } else {
+2
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
··· 961 961 int r; 962 962 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 963 963 964 + adev->num_vmhubs = 1; 965 + 964 966 if (adev->flags & AMD_IS_APU) { 965 967 adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN; 966 968 } else {
+2
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
··· 1081 1081 int r; 1082 1082 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 1083 1083 1084 + adev->num_vmhubs = 1; 1085 + 1084 1086 if (adev->flags & AMD_IS_APU) { 1085 1087 adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN; 1086 1088 } else {