diff options
author | Maxime Ripard <mripard@kernel.org> | 2023-11-15 12:45:19 +0300 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2023-11-15 12:56:44 +0300 |
commit | 3bf3e21c15d4386a5f15118ec39bbc1b67ea5759 (patch) | |
tree | a8880bb7b152d913ebd86e7cd858600dbe22ed38 /drivers/accel/ivpu/ivpu_mmu_context.c | |
parent | 34b98a5f7a185c19715cc98c57d7e27b4785dfdf (diff) | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) | |
download | linux-3bf3e21c15d4386a5f15118ec39bbc1b67ea5759.tar.xz |
Merge drm/drm-next into drm-misc-next
Let's kickstart the v6.8 release cycle.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/accel/ivpu/ivpu_mmu_context.c')
-rw-r--r-- | drivers/accel/ivpu/ivpu_mmu_context.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/accel/ivpu/ivpu_mmu_context.c b/drivers/accel/ivpu/ivpu_mmu_context.c index 122c90fecf66..12a8c09d4547 100644 --- a/drivers/accel/ivpu/ivpu_mmu_context.c +++ b/drivers/accel/ivpu/ivpu_mmu_context.c @@ -14,6 +14,7 @@ #include "ivpu_mmu.h" #include "ivpu_mmu_context.h" +#define IVPU_MMU_VPU_ADDRESS_MASK GENMASK(47, 12) #define IVPU_MMU_PGD_INDEX_MASK GENMASK(47, 39) #define IVPU_MMU_PUD_INDEX_MASK GENMASK(38, 30) #define IVPU_MMU_PMD_INDEX_MASK GENMASK(29, 21) @@ -340,12 +341,8 @@ ivpu_mmu_context_map_sgt(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx, if (!IS_ALIGNED(vpu_addr, IVPU_MMU_PAGE_SIZE)) return -EINVAL; - /* - * VPU is only 32 bit, but DMA engine is 38 bit - * Ranges < 2 GB are reserved for VPU internal registers - * Limit range to 8 GB - */ - if (vpu_addr < SZ_2G || vpu_addr > SZ_8G) + + if (vpu_addr & ~IVPU_MMU_VPU_ADDRESS_MASK) return -EINVAL; prot = IVPU_MMU_ENTRY_MAPPED; |