summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2022-08-23 14:15:55 +0800
committerJoerg Roedel <jroedel@suse.de>2022-09-07 15:14:56 +0200
commit53fc7ad6edf210b497230ce74b61b322a202470c (patch)
treea6339ee620841a793f8bad9a50b3d8a8f9a239df /drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
parent0c5f6c0d8201a809a6585b07b6263e9db2c874a3 (diff)
iommu/vt-d: Correctly calculate sagaw value of IOMMU
The Intel IOMMU driver possibly selects between the first-level and the second-level translation tables for DMA address translation. However, the levels of page-table walks for the 4KB base page size are calculated from the SAGAW field of the capability register, which is only valid for the second-level page table. This causes the IOMMU driver to stop working if the hardware (or the emulated IOMMU) advertises only first-level translation capability and reports the SAGAW field as 0. This solves the above problem by considering both the first level and the second level when calculating the supported page table levels. Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level") Cc: stable@vger.kernel.org Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/20220817023558.3253263-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c')
0 files changed, 0 insertions, 0 deletions