mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
media: staging/ipu7: Fix the loop bound in l2 table alloc
This patch fixes the incorrect loop bound in alloc_l2_pt(). When
initializing L2 page table entries, the loop was incorrectly using
ISP_L1PT_PTES instead of ISP_L2PT_PTES though the ISP_L1PT_PTES is
equal to ISP_L2PT_PTES.
Fixes: 71d81c2568 ("media: staging/ipu7: add IPU7 DMA APIs and MMU mapping")
Cc: stable@vger.kernel.org
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
@@ -231,7 +231,7 @@ static u32 *alloc_l2_pt(struct ipu7_mmu_info *mmu_info)
|
||||
|
||||
dev_dbg(mmu_info->dev, "alloc_l2: get_zeroed_page() = %p\n", pt);
|
||||
|
||||
for (i = 0; i < ISP_L1PT_PTES; i++)
|
||||
for (i = 0; i < ISP_L2PT_PTES; i++)
|
||||
pt[i] = mmu_info->dummy_page_pteval;
|
||||
|
||||
return pt;
|
||||
|
||||
Reference in New Issue
Block a user